From: Joerg Jaspert Date: Sat, 3 Dec 2011 14:40:12 +0000 (+0100) Subject: change security build queues X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=41034f1347f3bd08b197e1c13612bddba8f2df90;p=dak.git change security build queues they are now using dak manage-build-queue also adjust the way the trigger gets generated Signed-off-by: Joerg Jaspert --- diff --git a/config/debian-security/cron.buildd b/config/debian-security/cron.buildd index 043d5481..1b60593d 100755 --- a/config/debian-security/cron.buildd +++ b/config/debian-security/cron.buildd @@ -14,53 +14,23 @@ if [ -e $ftpdir/Archive_Maintenance_In_Progress ]; then exit 0 fi -for dist in $DISTS; do - eval SOURCES_$dist=`stat -c "%Y" $base/buildd/$dist/Sources.gz` - eval PACKAGES_$dist=`stat -c "%Y" $base/buildd/$dist/Packages.gz` -done - -cd $configdir -apt-ftparchive -qq -o APT::FTPArchive::Contents=off generate apt.conf.buildd - -cd ${base}/buildd -for dist in $DISTS; do - rm -f $dist/Release* - darchs=$(dak admin s-a list-arch $dist | tr '\n' ' ') - codename=$(dak admin s show ${dist} | grep ^Codename | awk '{print $2}') - apt-ftparchive -qq -o APT::FTPArchive::Release::Codename="${codename}" -o APT::FTPArchive::Release::Origin="Debian" -o APT::FTPArchive::Release::Label="Debian" -o APT::FTPArchive::Release::Description="buildd $dist security" -o APT::FTPArchive::Release::Architectures="${darchs}" release $dist > Release - gpg --secret-keyring ${base}/s3kr1t/dot-gnupg/secring.gpg --keyring ${base}/s3kr1t/dot-gnupg/pubring.gpg --no-options --batch --no-tty --armour --default-key 55BE302B --detach-sign -o Release.gpg Release - mv Release* $dist/. -done - dists= - +now=$(date +%s) +check=$(( now - 3*60 )) for dist in $DISTS; do - eval NEW_SOURCES_$dist=`stat -c "%Y" $base/buildd/$dist/Sources.gz` - eval NEW_PACKAGES_$dist=`stat -c "%Y" $base/buildd/$dist/Packages.gz` - old=SOURCES_$dist - new=NEW_$old - if [ ${!new} -gt ${!old} ]; then - if [ -z "$dists" ]; then - dists="$dist" - else - dists="$dists $dist" - fi - continue - fi - old=PACKAGES_$dist - new=NEW_$old - if [ ${!new} -gt ${!old} ]; then - if [ -z "$dists" ]; then - dists="$dist" - else - dists="$dists $dist" - fi + smodtime=$(stat -c "%Y" $base/buildd/$dist/Sources.gz) + pmodtime=$(stat -c "%Y" $base/buildd/$dist/Packages.gz) + + if [ ${smodtime} -gt ${check} ] || [ ${pmodtime} -gt ${check} ]; then + # Packages/Sources changed in the last minutes + dists="${dists} ${dist}" + else continue fi done -if [ ! -z "$dists" ]; then +if [ ! -z "${dists}" ]; then # setup ssh master process ssh wbadm@buildd -S $SSH_SOCKET -MN 2> /dev/null & SSH_PID=$! @@ -68,8 +38,8 @@ if [ ! -z "$dists" ]; then sleep 1 done trap 'kill -TERM $SSH_PID' 0 - for d in $dists; do - case $d in + for d in ${dists}; do + case ${d} in oldstable) send=lenny ;; @@ -77,7 +47,7 @@ if [ ! -z "$dists" ]; then send=squeeze ;; testing) - send=testing + send=wheezy ;; *) send=unknown diff --git a/config/debian-security/cron.unchecked b/config/debian-security/cron.unchecked index 100e5878..7b850763 100755 --- a/config/debian-security/cron.unchecked +++ b/config/debian-security/cron.unchecked @@ -55,6 +55,8 @@ if ! $doanything; then exit 0 fi +dak manage-build-queues -a + if [ "x${dopolicy}x" = "xtruex" ]; then # We had something approved from a policy queue, push out new archive dak dominate