diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-04-24 11:03:38 -0400 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-04-24 11:03:38 -0400 |
commit | 7eadec0ab1c0c09c4d940b20d6f88f81a4ab149e (patch) | |
tree | 6e1d88dcf869bf567f852c3ea169ff79a8b31ed5 | |
parent | 7358ca574bf6fd133a5d883f2da6e359335ac830 (diff) | |
parent | 280d5501b00945fdf4e8de13724ec22b87a41576 (diff) | |
download | devtools-7eadec0ab1c0c09c4d940b20d6f88f81a4ab149e.tar.xz |
Merge commit '280d55' into complete
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | archbuild.in | 16 | ||||
-rw-r--r-- | archco.in | 2 | ||||
-rw-r--r-- | commitpkg.in | 10 | ||||
-rw-r--r-- | crossrepomove.in | 42 | ||||
-rw-r--r-- | makechrootpkg.in | 24 | ||||
-rw-r--r-- | rebuildpkgs.in | 2 |
7 files changed, 45 insertions, 55 deletions
@@ -1,4 +1,4 @@ -V=20121115 +V=20130127 PREFIX = /usr/local @@ -115,6 +115,6 @@ dist: gpg --detach-sign --use-agent devtools-$(V).tar.gz upload: - scp devtools-$(V).tar.gz devtools-$(V).tar.gz.sig gerolde.archlinux.org:/srv/ftp/other/devtools/ + scp devtools-$(V).tar.gz devtools-$(V).tar.gz.sig nymeria.archlinux.org:/srv/ftp/other/devtools/ .PHONY: all clean install uninstall dist upload diff --git a/archbuild.in b/archbuild.in index a41d490..a343bec 100644 --- a/archbuild.in +++ b/archbuild.in @@ -3,6 +3,7 @@ m4_include(lib/common.sh) base_packages=(base base-devel sudo) +makechrootpkg_args=(-c -n) cmd="${0##*/}" if [[ "${cmd%%-*}" == 'multilib' ]]; then @@ -18,13 +19,17 @@ chroots='/var/lib/archbuild' clean_first=false usage() { - echo "Usage: $cmd" + echo "Usage: $cmd [options] -- [makechrootpkg args]" + echo ' -h This help' echo ' -c Recreate the chroot before building' echo ' -r <dir> Create chroots in this directory' + echo '' + echo "Default makechrootpkg args: ${makechrootpkg_args[*]}" + echo '' exit 1 } -while getopts 'cr:' arg; do +while getopts 'hcr:' arg; do case "${arg}" in c) clean_first=true ;; r) chroots="$OPTARG" ;; @@ -32,7 +37,10 @@ while getopts 'cr:' arg; do esac done -if [[ "$EUID" != '0' ]]; then +# Pass all arguments after -- right to makepkg +makechrootpkg_args+=("${@:$OPTIND}") + +if (( EUID )); then die 'This script must be run as root.' fi @@ -66,4 +74,4 @@ else fi msg "Building in chroot for [${repo}] (${arch})..." -exec setarch "${arch}" makechrootpkg -c -n -r "${chroots}/${repo}-${arch}" +exec setarch "${arch}" makechrootpkg "${makechrootpkg_args[@]}" -r "${chroots}/${repo}-${arch}" @@ -11,7 +11,7 @@ fi case $scriptname in archco) - SVNURL="svn+ssh://gerolde.archlinux.org/srv/svn-packages";; + SVNURL="svn+ssh://svn-packages@nymeria.archlinux.org/srv/repos/svn-packages/svn";; communityco) SVNURL="svn+ssh://svn-community@nymeria.archlinux.org/srv/repos/svn-community/svn";; *) diff --git a/commitpkg.in b/commitpkg.in index d9ee0aa..db78517 100644 --- a/commitpkg.in +++ b/commitpkg.in @@ -105,15 +105,7 @@ for _arch in ${arch[@]}; do done if [[ -z $server ]]; then - case "$repo" in - core|extra|testing|staging|kde-unstable|gnome-unstable) - server='gerolde.archlinux.org' ;; - community*|multilib*) - server='nymeria.archlinux.org' ;; - *) - server='gerolde.archlinux.org' - msg "Non-standard repository $repo in use, defaulting to server $server" ;; - esac + server='nymeria.archlinux.org' fi if [[ -n $(svn status -q) ]]; then diff --git a/crossrepomove.in b/crossrepomove.in index 8794326..b1204af 100644 --- a/crossrepomove.in +++ b/crossrepomove.in @@ -11,26 +11,16 @@ fi pkgbase="${1}" -packages_svn='svn+ssh://gerolde.archlinux.org/srv/svn-packages' -packages_server='gerolde.archlinux.org' -community_svn='svn+ssh://svn-community@nymeria.archlinux.org/srv/repos/svn-community/svn' -community_server='nymeria.archlinux.org' -mirror='http://mirrors.kernel.org/archlinux' - case $scriptname in extra2community) - source_svn="${packages_svn}" - target_svn="${community_svn}" - source_server="${packages_server}" - target_server="${community_server}" + source_name='packages' + target_name='community' source_repo='extra' target_repo='community' ;; community2extra) - source_svn="${community_svn}" - target_svn="${packages_svn}" - source_server="${community_server}" - target_server="${packages_server}" + source_name='community' + target_name='packages' source_repo='community' target_repo='extra' ;; @@ -39,6 +29,13 @@ case $scriptname in ;; esac +server='nymeria.archlinux.org' +mirror="http://${server}" +source_svn="svn+ssh://svn-${source_name}@${server}/srv/repos/svn-${source_name}/svn" +target_svn="svn+ssh://svn-${target_name}@${server}/srv/repos/svn-${target_name}/svn" +source_dbscripts="/srv/repos/svn-${source_name}/dbscripts" +target_dbscripts="/srv/repos/svn-${target_name}/dbscripts" + setup_workdir pushd $WORKDIR >/dev/null @@ -59,7 +56,7 @@ for _arch in ${arch[@]}; do for _pkgname in ${pkgname[@]}; do fullver=$(get_full_version $_pkgname) # FIXME: this only works with .xz packages - ssh "${target_server}" "cd staging/${target_repo} + ssh "${server}" "cd staging/${target_repo} curl -O ${mirror}/${source_repo}/os/${repo_arch}/$_pkgname-$fullver-${_arch}.pkg.tar.xz curl -O ${mirror}/${source_repo}/os/${repo_arch}/$_pkgname-$fullver-${_arch}.pkg.tar.xz.sig" || die done @@ -73,22 +70,11 @@ pushd "target_checkout/${pkgbase}/trunk" >/dev/null archrelease "${arch[@]/#/$target_repo-}" || die popd >/dev/null -if [[ "${target_server}" == "${community_server}" ]]; then - dbscripts_path='/srv/repos/svn-community/dbscripts' -else - dbscripts_path='/arch' -fi - -ssh "${target_server}" "${dbscripts_path}/db-update" || die +ssh "${server}" "${target_dbscripts}/db-update" || die msg "Removing ${pkgbase} from ${source_repo}" -if [[ "${source_server}" == "${community_server}" ]]; then - dbscripts_path='/srv/repos/svn-community/dbscripts' -else - dbscripts_path='/arch' -fi for _arch in ${arch[@]}; do - ssh "${source_server}" "${dbscripts_path}/db-remove ${source_repo} ${_arch} ${pkgbase}" + ssh "${server}" "${source_dbscripts}/db-remove ${source_repo} ${_arch} ${pkgbase}" done svn -q checkout -N "${source_svn}" source_checkout svn -q up "source_checkout/${pkgbase}" diff --git a/makechrootpkg.in b/makechrootpkg.in index 244700c..a48f658 100644 --- a/makechrootpkg.in +++ b/makechrootpkg.in @@ -21,6 +21,7 @@ add_to_db=false run_namcap=false chrootdir= passeddir= +declare -a install_pkgs default_copy=$USER [[ -n $SUDO_USER ]] && default_copy=$SUDO_USER @@ -66,7 +67,7 @@ while getopts 'hcudr:I:l:n' arg; do u) update_first=true ;; d) add_to_db=true ;; r) passeddir="$OPTARG" ;; - I) install_pkg="$OPTARG" ;; + I) install_pkgs+=("$OPTARG") ;; l) copy="$OPTARG" ;; n) run_namcap=true; makepkg_args="$makepkg_args -i" ;; *) makepkg_args="$makepkg_args -$arg $OPTARG" ;; @@ -98,7 +99,7 @@ if (( EUID )); then die 'This script must be run as root.' fi -if [[ ! -f PKGBUILD && -z $install_pkg ]]; then +if [[ ! -f PKGBUILD && -z "${install_pkgs[*]}" ]]; then die 'This must be run in a directory containing a PKGBUILD.' fi @@ -141,17 +142,20 @@ if [[ ! -d $copydir ]] || $clean_first; then lock_close 8 fi -if [[ -n $install_pkg ]]; then - pkgname="${install_pkg##*/}" - cp "$install_pkg" "$copydir/$pkgname" +if [[ -n "${install_pkgs[*]}" ]]; then + declare -i ret=0 + for install_pkg in "${install_pkgs[@]}"; do + pkgname="${install_pkg##*/}" + cp "$install_pkg" "$copydir/$pkgname" - mkarchroot -r "pacman -U /$pkgname --noconfirm" "$copydir" - ret=$? + mkarchroot -r "pacman -U /$pkgname --noconfirm" "$copydir" + (( ret += !! $? )) - rm "$copydir/$pkgname" + rm "$copydir/$pkgname" + done - # Exit early, we've done all we need to - exit $ret + # If there is no PKGBUILD we have done + [[ -f PKGBUILD ]] || exit $ret fi $update_first && mkarchroot -u "$copydir" diff --git a/rebuildpkgs.in b/rebuildpkgs.in index a4c8969..2f71c40 100644 --- a/rebuildpkgs.in +++ b/rebuildpkgs.in @@ -47,7 +47,7 @@ pkg_from_pkgbuild() { chrootdir="$1"; shift pkgs="$@" -SVNPATH='svn+ssh://gerolde.archlinux.org/srv/svn-packages' +SVNPATH='svn+ssh://nymeria.archlinux.org/srv/repos/svn-packages/svn' msg "Work will be done in $(pwd)/rebuilds" |