#! /bin/bash # # Executed after cron.unchecked ARCHS_oldstable="alpha amd64 arm hppa i386 ia64 mips mipsel powerpc sparc s390" ARCHS_stable="alpha amd64 arm armel hppa i386 ia64 mips mipsel powerpc sparc s390" ARCHS_testing="alpha amd64 armel hppa i386 ia64 kfreebsd-i386 kfreebsd-amd64 mips mipsel powerpc sparc s390" DISTS="oldstable stable testing" SSH_SOCKET=~/.ssh/buildd.debian.org.socket set -e export SCRIPTVARS=/org/security-master.debian.org/dak/config/debian-security/vars . $SCRIPTVARS if [ -e $ftpdir/Archive_Maintenance_In_Progress ]; then exit 0 fi cd $masterdir for d in $DISTS; do eval SOURCES_$d=`stat -c "%Y" $base/buildd/$d/Sources.gz` eval PACKAGES_$d=`stat -c "%Y" $base/buildd/$d/Packages.gz` done apt-ftparchive -qq -o APT::FTPArchive::Contents=off generate apt.conf.buildd dists= for d in $DISTS; do eval NEW_SOURCES_$d=`stat -c "%Y" $base/buildd/$d/Sources.gz` eval NEW_PACKAGES_$d=`stat -c "%Y" $base/buildd/$d/Packages.gz` old=SOURCES_$d new=NEW_$old if [ ${!new} -gt ${!old} ]; then if [ -z "$dists" ]; then dists="$d" else dists="$dists $d" fi continue fi old=PACKAGES_$d new=NEW_$old if [ ${!new} -gt ${!old} ]; then if [ -z "$dists" ]; then dists="$d" else dists="$dists $d" fi continue fi done if [ ! -z "$dists" ]; then # setup ssh master process ssh wbadm@buildd -S $SSH_SOCKET -MN 2> /dev/null & SSH_PID=$! while [ ! -S $SSH_SOCKET ]; do sleep 1 done trap 'kill -TERM $SSH_PID' 0 for d in $dists; do ssh wbadm@buildd -S $SSH_SOCKET trigger.security $d done fi