diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2010-09-01 19:34:47 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2010-09-01 19:34:47 +0200 |
commit | 328b1ce478e25902aba5d8f19024dadeaaf3f678 (patch) | |
tree | 83620bdcb713057e32887b6e54d23137d78c8b22 | |
parent | 3c07e2e3ff951242a5d9fc124c6937e75e961da2 (diff) |
Simplify repo configuration
* Repositories can now be defined in the config file for each host
* added community-staging, gnome-unstable and kde-unstable
* Exception is the adjust-permission cron-job; but we might want to use acls in future anyway
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
-rw-r--r-- | config | 8 | ||||
-rwxr-xr-x | cron-jobs/adjust-permissions | 6 | ||||
-rwxr-xr-x | cron-jobs/create-filelists | 3 | ||||
-rwxr-xr-x | cron-jobs/integrity-check | 2 | ||||
-rwxr-xr-x | cron-jobs/sourceballs | 3 | ||||
-rw-r--r-- | db-functions | 12 | ||||
-rw-r--r-- | test/lib/common.inc | 16 |
7 files changed, 36 insertions, 14 deletions
@@ -4,6 +4,14 @@ FTP_BASE="/srv/ftp" SVNREPO="file:///srv/svn-packages" SVNREPOCOMMUNITY="file:///srv/svn-community" +declare -A PKGREPO +PKGREPO['default']='core extra testing staging kde-unstable gnome-unstable' +PKGREPO['sigurd']='community community-testing community-staging multilib' + +declare -A PKGPOOL +PKGPOOL['default']='pool/packages' +PKGPOOL['sigurd']='pool/community' + CLEANUP_DESTDIR="/srv/package-cleanup" CLEANUP_DRYRUN=false SOURCE_CLEANUP_DESTDIR="/srv/source-cleanup" diff --git a/cron-jobs/adjust-permissions b/cron-jobs/adjust-permissions index a68584c..e0b6e4e 100755 --- a/cron-jobs/adjust-permissions +++ b/cron-jobs/adjust-permissions @@ -15,10 +15,16 @@ get_dir_owner() { echo "ftp:ftp-extra" ;; staging) echo "ftp:ftp-extra" ;; + kde-unstable) + echo "ftp:ftp-extra" ;; + gnome-unstable) + echo "ftp:ftp-extra" ;; community) echo "root:tusers" ;; community-testing) echo "root:tusers" ;; + community-staging) + echo "root:tusers" ;; multilib) echo "root:multilib" ;; pool/packages) diff --git a/cron-jobs/create-filelists b/cron-jobs/create-filelists index e280f84..a37080f 100755 --- a/cron-jobs/create-filelists +++ b/cron-jobs/create-filelists @@ -5,7 +5,6 @@ reposdir=${FTP_BASE} targetdir=${FTP_BASE} -repos=(core extra testing community community-testing staging multilib) script_lock @@ -28,7 +27,7 @@ esac FILESEXT="${DBEXT//db/files}" -for repo in ${repos[@]}; do +for repo in ${PKGREPO[@]}; do REPO_DB_FILE="${repo}$DBEXT" FILES_DB_FILE="${repo}$FILESEXT" for arch in ${ARCHES[@]}; do diff --git a/cron-jobs/integrity-check b/cron-jobs/integrity-check index 0b2b9c7..c120cfd 100755 --- a/cron-jobs/integrity-check +++ b/cron-jobs/integrity-check @@ -7,7 +7,7 @@ if [ $# -ne 2 ]; then exit 1 fi -for arch in i686 x86_64; do +for arch in ${ARCHES[@]}; do $basedir/check_archlinux/check_packages.py \ --repos="$1" \ --abs-tree="/srv/abs/rsync/$arch,/srv/abs/rsync/any" --arch="$arch" |\ diff --git a/cron-jobs/sourceballs b/cron-jobs/sourceballs index a482eb7..0cf062f 100755 --- a/cron-jobs/sourceballs +++ b/cron-jobs/sourceballs @@ -5,7 +5,6 @@ ftpbase="${FTP_BASE}" srcbase="${FTP_BASE}/sources" -repos=(core extra testing community community-testing staging multilib) script_lock @@ -18,7 +17,7 @@ FAILED_PKGS="" [ -e "$srcbase/errors.txt" ] && /bin/mv "$srcbase/errors.txt" "$srcbase/errors.txt.old" echo "Errors occured during run:" > "$srcbase/errors.txt" -for repo in ${repos[@]}; do +for repo in ${PKGREPO[@]}; do for arch in ${ARCHES[@]} any; do ftppath="$ftpbase/$repo/os/$arch" if [ ! -d "$ftppath" ]; then diff --git a/db-functions b/db-functions index 9f87298..28928da 100644 --- a/db-functions +++ b/db-functions @@ -313,18 +313,18 @@ check_pkgsvn() { } get_repos_for_host() { - if [ "$(hostname)" = "sigurd" ]; then - echo "community community-testing multilib" + if [ -n "${PKGREPO[$(hostname -s)]}" ]; then + echo "${PKGREPO[$(hostname -s)]}" else - echo "core extra testing staging" + echo "${PKGREPO['default']}" fi } get_pkgpool_for_host() { - if [ "$(hostname)" = "sigurd" ]; then - echo "pool/community" + if [ -n "${PKGPOOL[$(hostname -s)]}" ]; then + echo "${PKGPOOL[$(hostname -s)]}" else - echo "pool/packages" + echo "${PKGPOOL['default']}" fi } diff --git a/test/lib/common.inc b/test/lib/common.inc index 9017aa5..71dfd3d 100644 --- a/test/lib/common.inc +++ b/test/lib/common.inc @@ -1,5 +1,6 @@ set -E +. "${curdir}/../config" . "${curdir}/../db-functions" oneTimeSetUp() { @@ -25,15 +26,24 @@ oneTimeTearDown() { setUp() { local p local pkg + local r + local a #[ -f "${curdir}/../config.local" ] && die "${curdir}/../config.local exists" TMP="$(mktemp -d /dev/shm/$(basename $0).XXXXXXXXXX)" #msg "Using ${TMP}" mkdir -p "${TMP}/"{ftp,tmp,staging,{package,source}-cleanup,svn-{packages,community}-{copy,repo}} - mkdir -p "${TMP}/ftp/"{core,extra,community,testing,community-testing,staging,multilib}/os/{i686,any,x86_64} - mkdir -p "${TMP}/ftp/pool/"{packages,community} - mkdir -p "${TMP}/staging/"{core,extra,community,testing,community-testing,staging,multilib} + + for r in ${PKGREPO[@]}; do + mkdir -p "${TMP}/staging/${r}" + for a in ${ARCHES[@]} any; do + mkdir -p "${TMP}/ftp/${r}/os/${a}" + done + done + for p in ${PKGPOOL[@]}; do + mkdir -p "${TMP}/ftp/${p}" + done msg 'Creating svn repository...' svnadmin create "${TMP}/svn-packages-repo" |