mirror of
https://gitlab.archlinux.org/archlinux/devtools.git
synced 2025-09-13 18:06:19 +02:00
Compare commits
11 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
0e6780f2c8 | ||
![]() |
45c8269441 | ||
![]() |
7e3013b2ae | ||
![]() |
c16e7c25c9 | ||
![]() |
c955ecf35d | ||
![]() |
160e936bba | ||
![]() |
69f9e64aa3 | ||
![]() |
71efb148df | ||
![]() |
48ccc1c7fb | ||
![]() |
563ffa7be8 | ||
![]() |
f01097f22c |
7
Makefile
7
Makefile
@@ -1,4 +1,4 @@
|
||||
V=0.9.18
|
||||
V=0.9.20
|
||||
|
||||
BINPROGS = \
|
||||
checkpkg \
|
||||
@@ -68,4 +68,7 @@ uninstall:
|
||||
dist:
|
||||
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!'
|
||||
fi
|
||||
|
||||
echo -n 'releasing package...'
|
||||
echo -n "releasing package to ${1}..."
|
||||
pushd .. >/dev/null
|
||||
if [ -d "repos/${1}" ]; then
|
||||
svn rm --force -q "repos/${1}"
|
||||
|
79
commitpkg
79
commitpkg
@@ -51,38 +51,31 @@ fi
|
||||
. PKGBUILD
|
||||
pkgbase=${pkgbase:-$pkgname}
|
||||
|
||||
# set up repo-specific opts depending on how we were called
|
||||
server='gerolde.archlinux.org'
|
||||
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
|
||||
case "$cmd" in
|
||||
commitpkg)
|
||||
if [ $# -eq 0 ]; then
|
||||
abort 'usage: commitpkg <reponame> [-l limit] [commit message]'
|
||||
fi
|
||||
repo="$1"
|
||||
shift
|
||||
;;
|
||||
*pkg)
|
||||
repo="${cmd%pkg}"
|
||||
;;
|
||||
*)
|
||||
abort 'usage: commitpkg <reponame> [-l limit] [commit message]'
|
||||
fi
|
||||
repo="$1"
|
||||
shift
|
||||
fi
|
||||
;;
|
||||
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
|
||||
for s in ${source[@]}; do
|
||||
@@ -104,9 +97,9 @@ for i in 'changelog' 'install'; do
|
||||
done
|
||||
|
||||
# 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
|
||||
rsyncopts="--bwlimit=$2"
|
||||
rsyncopts="$rsyncopts --bwlimit=$2"
|
||||
shift 2
|
||||
fi
|
||||
|
||||
@@ -119,25 +112,37 @@ else
|
||||
fi
|
||||
echo 'done'
|
||||
|
||||
declare -a uploads
|
||||
|
||||
for _arch in ${arch[@]}; do
|
||||
for _pkgname in ${pkgname[@]}; do
|
||||
fullver=$(get_full_version ${epoch:-0} $pkgver $pkgrel)
|
||||
pkgfile=$(getpkgfile "$_pkgname-$fullver-${_arch}".pkg.tar.?z 2>/dev/null)
|
||||
pkgdestfile=$(getpkgfile "$PKGDEST/$_pkgname-$fullver-${_arch}".pkg.tar.?z 2>/dev/null)
|
||||
|
||||
if [ ! -f "$pkgfile" -a -f "$pkgdestfile" ]; then
|
||||
if [ -f "$pkgfile" ]; then
|
||||
pkgfile="./$pkgfile"
|
||||
elif [ -f "$pkgdestfile" ]; then
|
||||
pkgfile="$pkgdestfile"
|
||||
elif [ ! -f "$pkgfile" ]; then
|
||||
else
|
||||
echo "skipping ${_arch}"
|
||||
continue 2
|
||||
fi
|
||||
uploads+=("$pkgfile")
|
||||
|
||||
echo -n 'uploading '
|
||||
rsync -p --chmod 'ug=rw,o=r' -c -h -L --progress $rsyncopts --partial "./${pkgfile}" -e ssh "$server:staging/$repo/${pkgfile##*/}" || abort
|
||||
sigfile="${pkgfile}.sig"
|
||||
if [ -f "${sigfile}" ]; then
|
||||
uploads+=("$sigfile")
|
||||
fi
|
||||
done
|
||||
archrelease $repo-${_arch} || abort
|
||||
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 [ -d ../repos/$repo-i686 -a -d ../repos/$repo-x86_64 ]; then
|
||||
pushd ../repos/ >/dev/null
|
||||
|
@@ -156,7 +156,7 @@ if [ -n "$install_pkg" ]; then
|
||||
mkarchroot -r "pacman -U /$pkgname" "$copydir"
|
||||
ret=$?
|
||||
rm "$copydir/$pkgname"
|
||||
#exit early, we've done all we need to
|
||||
# Exit early, we've done all we need to
|
||||
exit $ret
|
||||
fi
|
||||
|
||||
@@ -167,11 +167,11 @@ fi
|
||||
[ -d "$copydir/build" ] || mkdir "$copydir/build"
|
||||
|
||||
if [ "$REPACK" != "1" ]; then
|
||||
#Remove anything in there UNLESS -R (repack) was passed to makepkg
|
||||
# Remove anything in there UNLESS -R (repack) was passed to makepkg
|
||||
rm -rf "$copydir/build/"*
|
||||
fi
|
||||
|
||||
# read .makpekg.conf even if called via sudo
|
||||
# Read .makepkg.conf even if called via sudo
|
||||
if [ -n "${SUDO_USER}" ]; then
|
||||
makepkg_conf="/$(eval echo ~${SUDO_USER})/.makepkg.conf"
|
||||
else
|
||||
|
Reference in New Issue
Block a user