]> git.decadent.org.uk Git - dak.git/blobdiff - config/debian-security/cron.unchecked
Add (incomplete) configuration for signing code for linux
[dak.git] / config / debian-security / cron.unchecked
index dcf26f43df55cb8a1ed405bb0155f34aebf1ee4c..cba7c05ffcedae2270a0535629f81eff5f5708c4 100755 (executable)
@@ -18,6 +18,10 @@ doanything=false
 dopolicy=false
 LOCKFILE="$lockdir/unchecked.lock"
 
+last_changed() {
+    psql -qAtc "SELECT MAX(last_changed) FROM suite WHERE archive_id=(SELECT id FROM archive WHERE name='$1')"
+}
+
 cleanup() {
     rm -f "$LOCKFILE"
 }
@@ -28,6 +32,8 @@ if ! lockfile -r8 "$LOCKFILE"; then
 fi
 trap cleanup EXIT
 
+old_last_changed=$(last_changed security)
+
 cd $unchecked
 changes=$(find . -maxdepth 1 -mindepth 1 -type f -name \*.changes | sed -e "s,./,," | xargs)
 if [ -n "$changes" ]; then
@@ -73,25 +79,28 @@ if [ "${doanything}" = "false" ] && [ "${dopolicy}" = "false" ]; then
     exit 0
 fi
 
+# Update stable-kfreebsd
+dak update-suite stable stable-kfreebsd
+
 # manage build queues
 dak manage-build-queues -a
 dak generate-packages-sources2 -a build-queues
 dak generate-releases -a build-queues >/dev/null
 ${scriptsdir}/update-buildd-archive ${base}/build-queues ${incoming}/debian-security-buildd
+$configdir/cron.buildd
+
+new_last_changed=$(last_changed security)
 
-if [ "x${dopolicy}x" = "xtruex" ]; then
+if [[ "${old_last_changed}" != "${new_last_changed}" ]]; then
     # We had something approved from a policy queue, push out new archive
     dak dominate
-    #dak generate-filelist
     cd $configdir
     $configdir/map.sh
     dak generate-packages-sources2 -a security
-    dak generate-releases -a security
-    /srv/security-master.debian.org/dak/config/debian-security/make-mirror.sh
+    dak generate-releases -a security >/dev/null
+    /srv/security-master.debian.org/dak/config/debian-security/make-mirror.sh >/dev/null
     sudo -u archvsync -H /home/archvsync/signal_security
 fi
 
 cleanup
 trap - EXIT
-
-$configdir/cron.buildd