~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to cronscripts/publishing/distro-parts/ubuntu/publish-distro.d/10-sign-releases

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-05-02 01:27:43 UTC
  • mfrom: (7675.1045.297 db-devel)
  • Revision ID: launchpad@pqm.canonical.com-20110502012743-agy2w94xmhmgjhvc
Merging db-stable at revno 10480

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh -e
 
2
 
 
3
# The calling script may set GNUPGHOME to a value set up by Launchpad's
 
4
# script machinery.  In production, we have a dedicated directory set up
 
5
# for this.
 
6
GNUPGHOME=/srv/launchpad.net/ubuntu-archive/gnupg-home
 
7
 
 
8
RELEASE_FILES=`find $DISTSROOT -maxdepth 2 -name Release`
 
9
DIST_UPGRADER_TARBALLS=`
 
10
        find $DISTSROOT/*/*/dist-upgrader* -name "*.tar.gz" || true`
 
11
 
 
12
for CANDIDATE in $RELEASE_FILES $DIST_UPGRADER_TARBALLS
 
13
do
 
14
    if [ ! -f "$CANDIDATE.gpg" ] || [ "$CANDIDATE" -nt "$CANDIDATE.gpg" ]
 
15
    then
 
16
        echo "$(date -R): (re-)signing $CANDIDATE"
 
17
        gpg --yes --detach-sign --armor -o "$CANDIDATE.gpg" \
 
18
            --sign "$CANDIDATE"
 
19
    else
 
20
        echo "$(date -R): Not re-signing $CANDIDATE"
 
21
    fi
 
22
done