mirror of
https://gitlab.archlinux.org/archlinux/devtools.git
synced 2025-09-14 10:26:18 +02:00
Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
0e6780f2c8 | ||
![]() |
45c8269441 | ||
![]() |
7e3013b2ae | ||
![]() |
c16e7c25c9 | ||
![]() |
c955ecf35d | ||
![]() |
160e936bba | ||
![]() |
69f9e64aa3 | ||
![]() |
71efb148df | ||
![]() |
48ccc1c7fb |
7
Makefile
7
Makefile
@@ -1,4 +1,4 @@
|
|||||||
V=0.9.19
|
V=0.9.20
|
||||||
|
|
||||||
BINPROGS = \
|
BINPROGS = \
|
||||||
checkpkg \
|
checkpkg \
|
||||||
@@ -68,4 +68,7 @@ uninstall:
|
|||||||
dist:
|
dist:
|
||||||
git archive --format=tar --prefix=devtools-$(V)/ $(V) | gzip -9 > devtools-$(V).tar.gz
|
git archive --format=tar --prefix=devtools-$(V)/ $(V) | gzip -9 > devtools-$(V).tar.gz
|
||||||
|
|
||||||
.PHONY: all install uninstall dist
|
upload:
|
||||||
|
scp devtools-$(V).tar.gz gerolde.archlinux.org:/srv/ftp/other/devtools/
|
||||||
|
|
||||||
|
.PHONY: all install uninstall dist upload
|
||||||
|
@@ -23,7 +23,7 @@ if [ ! -z "$(svn status -q)" ]; then
|
|||||||
abort 'archrelease: You have not committed your changes yet!'
|
abort 'archrelease: You have not committed your changes yet!'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -n 'releasing package...'
|
echo -n "releasing package to ${1}..."
|
||||||
pushd .. >/dev/null
|
pushd .. >/dev/null
|
||||||
if [ -d "repos/${1}" ]; then
|
if [ -d "repos/${1}" ]; then
|
||||||
svn rm --force -q "repos/${1}"
|
svn rm --force -q "repos/${1}"
|
||||||
|
65
commitpkg
65
commitpkg
@@ -51,38 +51,31 @@ fi
|
|||||||
. PKGBUILD
|
. PKGBUILD
|
||||||
pkgbase=${pkgbase:-$pkgname}
|
pkgbase=${pkgbase:-$pkgname}
|
||||||
|
|
||||||
# set up repo-specific opts depending on how we were called
|
case "$cmd" in
|
||||||
server='gerolde.archlinux.org'
|
commitpkg)
|
||||||
if [ "$cmd" == 'extrapkg' ]; then
|
|
||||||
repo='extra'
|
|
||||||
elif [ "$cmd" == 'corepkg' ]; then
|
|
||||||
repo='core'
|
|
||||||
elif [ "$cmd" == 'testingpkg' ]; then
|
|
||||||
repo='testing'
|
|
||||||
elif [ "$cmd" == 'stagingpkg' ]; then
|
|
||||||
repo='staging'
|
|
||||||
elif [ "$cmd" == 'communitypkg' ]; then
|
|
||||||
repo='community'
|
|
||||||
server='aur.archlinux.org'
|
|
||||||
elif [ "$cmd" == 'community-testingpkg' ]; then
|
|
||||||
repo='community-testing'
|
|
||||||
server='aur.archlinux.org'
|
|
||||||
elif [ "$cmd" == 'community-stagingpkg' ]; then
|
|
||||||
repo='community-staging'
|
|
||||||
server='aur.archlinux.org'
|
|
||||||
elif [ "$cmd" == 'multilibpkg' ]; then
|
|
||||||
repo='multilib'
|
|
||||||
server='aur.archlinux.org'
|
|
||||||
elif [ "$cmd" == 'multilib-testingpkg' ]; then
|
|
||||||
repo='multilib-testing'
|
|
||||||
server='aur.archlinux.org'
|
|
||||||
else
|
|
||||||
if [ $# -eq 0 ]; then
|
if [ $# -eq 0 ]; then
|
||||||
abort 'usage: commitpkg <reponame> [-l limit] [commit message]'
|
abort 'usage: commitpkg <reponame> [-l limit] [commit message]'
|
||||||
fi
|
fi
|
||||||
repo="$1"
|
repo="$1"
|
||||||
shift
|
shift
|
||||||
fi
|
;;
|
||||||
|
*pkg)
|
||||||
|
repo="${cmd%pkg}"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
abort 'usage: commitpkg <reponame> [-l limit] [commit message]'
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
case "$repo" in
|
||||||
|
core|extra|testing|staging)
|
||||||
|
server='gerolde.archlinux.org' ;;
|
||||||
|
community*|multilib*)
|
||||||
|
server='aur.archlinux.org' ;;
|
||||||
|
*)
|
||||||
|
server='gerolde.archlinux.org'
|
||||||
|
echo "Non-standard repository $repo in use, defaulting to server $server" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
# check if all local source files are under version control
|
# check if all local source files are under version control
|
||||||
for s in ${source[@]}; do
|
for s in ${source[@]}; do
|
||||||
@@ -104,9 +97,9 @@ for i in 'changelog' 'install'; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
# see if any limit options were passed, we'll send them to rsync
|
# see if any limit options were passed, we'll send them to rsync
|
||||||
unset rsyncopts
|
rsyncopts='-e ssh -p --chmod=ug=rw,o=r -c -h -L --progress --partial -y'
|
||||||
if [ "$1" = '-l' ]; then
|
if [ "$1" = '-l' ]; then
|
||||||
rsyncopts="--bwlimit=$2"
|
rsyncopts="$rsyncopts --bwlimit=$2"
|
||||||
shift 2
|
shift 2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -119,6 +112,8 @@ else
|
|||||||
fi
|
fi
|
||||||
echo 'done'
|
echo 'done'
|
||||||
|
|
||||||
|
declare -a uploads
|
||||||
|
|
||||||
for _arch in ${arch[@]}; do
|
for _arch in ${arch[@]}; do
|
||||||
for _pkgname in ${pkgname[@]}; do
|
for _pkgname in ${pkgname[@]}; do
|
||||||
fullver=$(get_full_version ${epoch:-0} $pkgver $pkgrel)
|
fullver=$(get_full_version ${epoch:-0} $pkgver $pkgrel)
|
||||||
@@ -133,13 +128,21 @@ for _arch in ${arch[@]}; do
|
|||||||
echo "skipping ${_arch}"
|
echo "skipping ${_arch}"
|
||||||
continue 2
|
continue 2
|
||||||
fi
|
fi
|
||||||
|
uploads+=("$pkgfile")
|
||||||
|
|
||||||
echo -n 'uploading '
|
sigfile="${pkgfile}.sig"
|
||||||
rsync -p --chmod 'ug=rw,o=r' -c -h -L --progress $rsyncopts --partial "${pkgfile}" -e ssh "$server:staging/$repo/${pkgfile##*/}" || abort
|
if [ -f "${sigfile}" ]; then
|
||||||
|
uploads+=("$sigfile")
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
archrelease $repo-${_arch} || abort
|
archrelease $repo-${_arch} || abort
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if [[ ${#uploads[*]} -gt 0 ]]; then
|
||||||
|
echo 'uploading all package and signature files'
|
||||||
|
rsync $rsyncopts "${uploads[@]}" "$server:staging/$repo/" || abort
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "${arch[*]}" == 'any' ]; then
|
if [ "${arch[*]}" == 'any' ]; then
|
||||||
if [ -d ../repos/$repo-i686 -a -d ../repos/$repo-x86_64 ]; then
|
if [ -d ../repos/$repo-i686 -a -d ../repos/$repo-x86_64 ]; then
|
||||||
pushd ../repos/ >/dev/null
|
pushd ../repos/ >/dev/null
|
||||||
|
@@ -156,7 +156,7 @@ if [ -n "$install_pkg" ]; then
|
|||||||
mkarchroot -r "pacman -U /$pkgname" "$copydir"
|
mkarchroot -r "pacman -U /$pkgname" "$copydir"
|
||||||
ret=$?
|
ret=$?
|
||||||
rm "$copydir/$pkgname"
|
rm "$copydir/$pkgname"
|
||||||
#exit early, we've done all we need to
|
# Exit early, we've done all we need to
|
||||||
exit $ret
|
exit $ret
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -171,7 +171,7 @@ if [ "$REPACK" != "1" ]; then
|
|||||||
rm -rf "$copydir/build/"*
|
rm -rf "$copydir/build/"*
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# read .makpekg.conf even if called via sudo
|
# Read .makepkg.conf even if called via sudo
|
||||||
if [ -n "${SUDO_USER}" ]; then
|
if [ -n "${SUDO_USER}" ]; then
|
||||||
makepkg_conf="/$(eval echo ~${SUDO_USER})/.makepkg.conf"
|
makepkg_conf="/$(eval echo ~${SUDO_USER})/.makepkg.conf"
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user