3
# Launchpad cron.daily (currently just for Ubuntu)
5
# Informational -- this *MUST* match the database
6
ARCHIVEROOT=/srv/launchpad.net/ubuntu-archive/ubuntu
7
DISTSROOT=$ARCHIVEROOT/dists
8
OVERRIDEROOT=$ARCHIVEROOT/../ubuntu-overrides
9
INDICES=$ARCHIVEROOT/indices
11
# Configuration options
13
LAUNCHPADROOT=/srv/launchpad.net/codelines/current
14
LOCKFILE=/srv/launchpad.net/cron.daily.lock
16
GNUPGHOME=/srv/launchpad.net/ubuntu-archive/gnupg-home
17
TOUCHLIST=$ARCHIVEROOT/project/trace/$(hostname --fqdn)
19
# Manipulate the environment
22
PATH=$PATH:$LAUNCHPADROOT/scripts:$LAUNCHPADROOT/cronscripts
26
if ! lockfile -r1 $LOCKFILE; then
27
echo "Could not claim lock file."
32
echo "Cleaning up lockfile."
40
# Process the accepted queue into the publishing records.
41
process-accepted.py $DISTRONAME
43
# Publish the results.
44
publish-distro.py -d $DISTRONAME
46
# Find all the Release files for which the Release.GPG is missing/too-old
47
for RELEASEFILE in $(find $DISTSROOT -name Release); do
48
# [ Release.gpg missing ] or [ Release is newer than Release.gpg ]
49
if [ ! -f $RELEASEFILE.gpg ] || [ $RELEASEFILE -nt $RELEASEFILE.gpg ]; then
50
gpg --detach-sign --armor -o $RELEASEFILE.gpg --sign $RELEASEFILE
56
cp $OVERRIDEROOT/override.* $INDICES
58
# Touch everything you asked us to do
59
for FILE in $TOUCHLIST; do