[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[dak/master] Generate "extrafiles", (closes: #752134)



A clearsigned sha256sum of files not otherwise having a signed checksum
available.
---
 config/debian/cron.dinstall      |  2 ++
 config/debian/dinstall.functions | 19 +++++++++++++++++++
 2 files changed, 21 insertions(+)

diff --git a/config/debian/cron.dinstall b/config/debian/cron.dinstall
index 001ab11..f1a3dcf 100755
--- a/config/debian/cron.dinstall
+++ b/config/debian/cron.dinstall
@@ -266,6 +266,7 @@ copyoverrides          none                       copyoverrides              fal
 mklslar                none                       mklslar                    false   false
 mkfilesindices         none                       mkfilesindices             false   false
 mkchecksums            none                       mkchecksums                false   false
+signotherfiles         none                       signotherfiles             false   false
 mirror                 none                       mirror\ hardlinks          false   false
 NOSTAGE                remove_locks               none                       false   false
 STATE                  postlock                   none                       false   false
@@ -285,6 +286,7 @@ NOSTAGE                rm\ -f\ "\${LOCK_BRITNEY}" none                       fal
 cleantransactions      none                       none                       false   false
 EOF
         )
+# FUNC                 ARGS                       TIME                       ERR     BG
 
 # we need to wait for the background processes before the end of dinstall
 wait
diff --git a/config/debian/dinstall.functions b/config/debian/dinstall.functions
index 25f8460..9aadf83 100644
--- a/config/debian/dinstall.functions
+++ b/config/debian/dinstall.functions
@@ -662,3 +662,22 @@ function changelogs() {
         trap remove_changelog_lock EXIT TERM HUP INT QUIT
     fi
 }
+
+function signotherfiles() {
+    log "Signing extra mirror files"
+
+    local archiveroot
+
+    for archive in "${public_archives[@]}"; do
+        log "... archive: ${archive}"
+        archiveroot="$(get_archiveroot "${archive}")"
+        local TMPLO=$( mktemp -p ${TMPDIR} )
+        trap "rm -f ${TMPLO}" ERR EXIT TERM HUP INT QUIT
+
+        cd ${archiveroot}
+        rm -f extrafiles
+        sha256sum $(find * -type f | egrep -v '(pool|i18n|dep11|source)/|Contents-.*\.(gz|diff)|installer|binary-|(In)?Release(.gpg)?|\.changes') > ${TMPLO}
+        gpg --no-options --batch --no-tty --armour --personal-digest-preferences=SHA256 --secret-keyring /srv/ftp-master.debian.org/s3kr1t/dot-gnupg/secring.gpg --keyring /srv/ftp-master.debian.org/s3kr1t/dot-gnupg/pubring.gpg --no-options --batch --no-tty --armour --default-key 473041FA --clearsign --output ${archiveroot}/extrafiles ${TMPLO}
+        rm -f ${TMPLO}
+    done
+}
-- 
2.1.4


Reply to: