From 0b52c6e030fc60377a4dfc0a4e142bee50b0344e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Fabian=20Silva=20Delgado?= Date: Wed, 29 Jan 2014 19:01:46 -0200 Subject: add [multilib-testing], [libre-multilib] and [libre-multilib-testing] repos --- config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config b/config index c3f9a55..29c42fe 100644 --- a/config +++ b/config @@ -3,9 +3,9 @@ FTP_BASE="/srv/http/repo/public" SVNREPO="/var/abs" # Repos from Arch -ARCHREPOS=('core' 'testing' 'extra' 'community' 'multilib') +ARCHREPOS=('core' 'testing' 'extra' 'community' 'multilib' 'multilib-testing') # Official Parabola repos -OURREPOS=('libre' 'libre-testing') +OURREPOS=('libre' 'libre-testing' 'libre-multilib' 'libre-multilib-testing') # User repos USERREPOS=('~smv' '~xihh' '~brendan' '~lukeshu' '~emulatorman' '~aurelien' '~jorginho' '~coadde' '~drtan') # Community project repos -- cgit v1.2.3-2-g168b From 5bbd4077065e9a10bab0c709c9e3edb0b7d0fc05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Reynolds?= Date: Wed, 12 Mar 2014 10:46:56 -0300 Subject: Hopefully fix a horrible bug that caused leaked packages Also added a few checks --- db-sync | 24 ++++++++++++++++++------ libremessages | 6 ++++++ 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/db-sync b/db-sync index c90f89b..4a28aa1 100755 --- a/db-sync +++ b/db-sync @@ -62,6 +62,8 @@ init() { msg "%d packages in blacklist" ${#blacklist[@]} + test ${#blacklist[@]} -eq 0 && fatal_error "Empty blacklist" + # Sync the repos databases get_repos @@ -86,10 +88,10 @@ init() { # TODO capture all removed packages for printing on debug mode msg2 "Removing blacklisted packages from %s database..." .db LC_ALL=C repo-remove "${db_file}" "${blacklist[@]}" \ - |& sed -n 's/-> Removing/ &/p' + |& sed -n 's/-> Removing/ &/p' msg2 "Removing blacklisted packages from %s database..." .files LC_ALL=C repo-remove "${files_file}" "${blacklist[@]}" \ - |& sed -n 's/-> Removing/ &/p' + |& sed -n 's/-> Removing/ &/p' # Get db contents db=($(get_repo_content ${db_file})) @@ -98,7 +100,10 @@ init() { # Create a whitelist, add * wildcard to end # TODO due to lack of -arch suffix, the pool sync retrieves every arch even if # we aren't syncing them - printf '%s\n' "${db[@]}" | sed "s|$|*|g" > /tmp/${_repo}-${_arch}.whitelist + # IMPORTANT: the . in the sed command is needed because an empty + # whitelist would consist of a single * allowing any package to + # pass through + printf '%s\n' "${db[@]}" | sed "s|.$|&*|g" > /tmp/${_repo}-${_arch}.whitelist msg2 "$(wc -l /tmp/${_repo}-${_arch}.whitelist | cut -d' ' -f1) packages in whitelist" @@ -130,8 +135,8 @@ init() { msg "Syncing package pool" - # Concatenate all whitelists - cat ${whitelists[@]} | sort -u > /tmp/any.whitelist + # Concatenate all whitelists, check for single *s just in case + cat ${whitelists[@]} | grep -v "^\*$" | sort -u > /tmp/any.whitelist msg2 "Retrieving $(wc -l /tmp/any.whitelist | cut -d' ' -f1) packages from pool" @@ -182,10 +187,17 @@ source "$(dirname "$(readlink -e "$0")")/config" source "$(dirname "$(readlink -e "$0")")/local_config" source "$(dirname "$(readlink -e "$0")")/libremessages" +# Check variables presence +for var in DBEXT FILESEXT mirror mirrorpath WORKDIR BLACKLIST_FILE + FTP_BASE SRCPOOLS PKGPOOLS; do + + test -z "${!var}" && fatal_error "Empty ${var}" +done + # From makepkg set -E for signal in TERM HUP QUIT; do - trap "trap_exit $signal '%s signal caught. Exiting...' $signal" $signal + trap "trap_exit $signal '%s signal caught. Exiting...' $signal" $signal done trap 'trap_exit INT "Aborted by user! Exiting..."' INT trap 'trap_exit USR1 "An unknown error has occurred. Exiting..."' ERR diff --git a/libremessages b/libremessages index 9fbbc2b..0c6ded1 100755 --- a/libremessages +++ b/libremessages @@ -75,3 +75,9 @@ error() { printf "${RED}==> $(gettext "ERROR:")${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2 } +fatal_error() { + local mesg=$1; shift + error "$mesg" "$@" + + exit 1 +} -- cgit v1.2.3-2-g168b From dc7260243263b8e49bbc308eb67945c43f3bf122 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Reynolds?= Date: Wed, 12 Mar 2014 10:48:26 -0300 Subject: oops --- db-sync | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/db-sync b/db-sync index 4a28aa1..58bb465 100755 --- a/db-sync +++ b/db-sync @@ -188,8 +188,7 @@ source "$(dirname "$(readlink -e "$0")")/local_config" source "$(dirname "$(readlink -e "$0")")/libremessages" # Check variables presence -for var in DBEXT FILESEXT mirror mirrorpath WORKDIR BLACKLIST_FILE - FTP_BASE SRCPOOLS PKGPOOLS; do +for var in DBEXT FILESEXT mirror mirrorpath WORKDIR BLACKLIST_FILE FTP_BASE SRCPOOLS PKGPOOLS; do test -z "${!var}" && fatal_error "Empty ${var}" done -- cgit v1.2.3-2-g168b From d902025a8a000c1383c7612e9f442c6734290169 Mon Sep 17 00:00:00 2001 From: Parabola Date: Sun, 15 Jun 2014 22:20:18 +0000 Subject: put our packages in a separate pool --- config | 12 ++++++++---- db-sync | 16 +++++++++------- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/config b/config index 29c42fe..c6efac6 100644 --- a/config +++ b/config @@ -12,14 +12,18 @@ USERREPOS=('~smv' '~xihh' '~brendan' '~lukeshu' '~emulatorman' '~aurelien' '~jor PROJREPOS=('pcr' 'kernels' 'cross' 'java' 'java-ugly' 'nonprism') # Remote repos PKGREPOS=("${ARCHREPOS[@]}" "${OURREPOS[@]}" "${USERREPOS[@]}" "${PROJREPOS[@]}") -PKGPOOL='pool/packages' -SRCPOOL='sources/packages' +PKGPOOL='pool/parabola' +SRCPOOL='sources/parabola' # Directories where packages are shared between repos # *relative to FTP_BASE* -PKGPOOLS=('pool/packages' 'pool/community') +ARCHPKGPOOLS=(pool/{packages,community}) +OURPKGPOOLS=(pool/parabola) +PKGPOOLS=(${OURPKGPOOLS[@]} ${ARCHPKGPOOLS[@]}) # Directories where sources are stored -SRCPOOLS=('sources/packages' 'sources/community') +ARCHSRCPOOLS=(sources/{packages,community}) +OURPKGPOOLS=(sources/parabola) +SRCPOOLS=(${OURSRCPOOLS[@]} ${ARCHSRCPOOLS[@]}) CLEANUP_DESTDIR="$FTP_BASE/old/packages" CLEANUP_DRYRUN=false diff --git a/db-sync b/db-sync index 58bb465..4e692e9 100755 --- a/db-sync +++ b/db-sync @@ -143,14 +143,15 @@ init() { # Sync # *Don't delete-after*, this is the job of cleanup scripts. It will remove our # packages too - for PKGPOOL in ${PKGPOOLS[@]}; do + local pkgpool + for pkgpool in ${ARCHPKGPOOLS[@]}; do rsync ${extra} --no-motd -rtlH \ --delay-updates \ --safe-links \ --include-from=/tmp/any.whitelist \ --exclude="*" \ - rsync://${mirror}/${mirrorpath}/${PKGPOOL}/ \ - ${FTP_BASE}/${PKGPOOL}/ + rsync://${mirror}/${mirrorpath}/${pkgpool}/ \ + ${FTP_BASE}/${pkgpool}/ done # Sync sources @@ -161,14 +162,15 @@ init() { # Sync # *Don't delete-after*, this is the job of cleanup scripts. It will remove our # packages too - for SRCPOOL in ${SRCPOOLS[@]}; do + local srcpool + for srcpool in ${ARCHSRCPOOLS[@]}; do rsync ${extra} --no-motd -rtlH \ --delay-updates \ --safe-links \ --include-from=/tmp/any.whitelist \ --exclude="*" \ - rsync://${mirror}/${mirrorpath}/${SRCPOOL}/ \ - ${FTP_BASE}/${SRCPOOL}/ + rsync://${mirror}/${mirrorpath}/${srcpool}/ \ + ${FTP_BASE}/${srcpool}/ done # Cleanup @@ -188,7 +190,7 @@ source "$(dirname "$(readlink -e "$0")")/local_config" source "$(dirname "$(readlink -e "$0")")/libremessages" # Check variables presence -for var in DBEXT FILESEXT mirror mirrorpath WORKDIR BLACKLIST_FILE FTP_BASE SRCPOOLS PKGPOOLS; do +for var in DBEXT FILESEXT mirror mirrorpath WORKDIR BLACKLIST_FILE FTP_BASE ARCHSRCPOOLS ARCHPKGPOOLS; do test -z "${!var}" && fatal_error "Empty ${var}" done -- cgit v1.2.3-2-g168b