]> git.decadent.org.uk Git - dak.git/blob - config/debian/cron.dinstall
dinstall
[dak.git] / config / debian / cron.dinstall
1 #!/bin/bash
2 # No way I try to deal with a crippled sh just for POSIX foo.
3
4 # Copyright (C) 2009 Joerg Jaspert <joerg@debian.org>
5 #
6 # This program is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU General Public License as
8 # published by the Free Software Foundation; version 2.
9 #
10 # This program is distributed in the hope that it will be useful, but
11 # WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13 # General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18
19 # Homer: Are you saying you're never going to eat any animal again? What
20 #        about bacon?
21 # Lisa: No.
22 # Homer: Ham?
23 # Lisa: No.
24 # Homer: Pork chops?
25 # Lisa: Dad, those all come from the same animal.
26 # Homer: Heh heh heh. Ooh, yeah, right, Lisa. A wonderful, magical animal.
27
28 # exit on errors
29 set -e
30 # make sure to only use defined variables
31 set -u
32 # ERR traps should be inherited from functions too. (And command
33 # substitutions and subshells and whatnot, but for us the functions is
34 # the important part here)
35 set -E
36
37 # import the general variable set.
38 export SCRIPTVARS=/srv/ftp.debian.org/dak/config/debian/vars
39 . $SCRIPTVARS
40
41 ########################################################################
42 # Functions                                                            #
43 ########################################################################
44 # common functions are "outsourced"
45 . "${configdir}/common"
46
47 # Timestamp. Used for dinstall stat graphs
48 function ts() {
49         TS=$(($TS+1));
50         echo "Archive maintenance timestamp $TS ($1): $(date +%H:%M:%S)"
51 }
52
53 # Cleanup actions
54 function cleanup() {
55         rm -f ${LOCK_DAILY}
56         rm -f ${LOCK_ACCEPTED}
57 }
58
59 # If we error out this one is called, *FOLLOWED* by cleanup above
60 function onerror() {
61     ERRDATE=$(date "+%Y.%m.%d-%H:%M:%S")
62     cat "${STAGEFILE}.log" | mail -s "ATTENTION ATTENTION! dinstall error at ${ERRDATE} in ${STAGEFILE} - (Be quiet, Brain, or I'll stab you with a Q-tip)" cron@ftp-master.debian.org
63 }
64
65 ########################################################################
66 # the actual dinstall functions follow                                 #
67 ########################################################################
68
69 # Setup the notice file to tell bad mirrors they used the wrong time
70 function notice() {
71     rm -f "$NOTICE"
72     cat > "$NOTICE" <<EOF
73 Packages are currently being installed and indices rebuilt.
74 Maintenance is automatic, starting at 01|07|13|19:52 UTC,
75 and ending about an hour later.  This file is then removed.
76
77 You should not mirror the archive during this period.
78 EOF
79 }
80
81 # pushing merkels QA user, part one
82 function merkel1() {
83     log "Telling merkels QA user that we start dinstall"
84     ssh -2 -i ~dak/.ssh/push_merkel_qa  -o BatchMode=yes -o SetupTimeOut=90 -o ConnectTimeout=90 qa@merkel.debian.org sleep 1
85 }
86
87 # Create the postgres dump files
88 function pgdump_pre() {
89     log "Creating pre-daily-cron-job backup of projectb database..."
90     pg_dump projectb > $base/backup/dump_pre_$(date +%Y.%m.%d-%H:%M:%S)
91 }
92
93 function pgdump_post() {
94     log "Creating post-daily-cron-job backup of projectb database..."
95     cd $base/backup
96     POSTDUMP=$(date +%Y.%m.%d-%H:%M:%S)
97     pg_dump projectb > $base/backup/dump_$POSTDUMP
98     pg_dumpall --globals-only > $base/backup/dumpall_$POSTDUMP
99     ln -sf $base/backup/dump_$POSTDUMP current
100     ln -sf $base/backup/dumpall_$POSTDUMP currentall
101 }
102
103 # Load the dak-dev projectb
104 function pgdakdev() {
105     cd $base/backup
106     echo "drop database projectb" | psql -p 5433 template1
107         cat currentall | psql -p 5433 template1
108     createdb -p 5433 -T template0 projectb
109     fgrep -v '\connect' current | psql -p 5433 projectb
110 }
111
112 # Updating various files
113 function updates() {
114     log "Updating Bugs docu, Mirror list and mailing-lists.txt"
115     cd $configdir
116     $scriptsdir/update-bugdoctxt
117     $scriptsdir/update-mirrorlists
118     $scriptsdir/update-mailingliststxt
119     $scriptsdir/update-pseudopackages.sh
120 }
121
122 # Process (oldstable)-proposed-updates "NEW" queue
123 function punew_do() {
124     cd "${queuedir}/${1}"
125     date -u -R >> REPORT
126     dak process-new -a -C COMMENTS >> REPORT || true
127     echo >> REPORT
128 }
129 function punew() {
130     log "Doing automated p-u-new processing"
131     punew_do "$1"
132 }
133 function opunew() {
134     log "Doing automated o-p-u-new processing"
135     punew_do "$1"
136 }
137
138 # The first i18n one, syncing new descriptions
139 function i18n1() {
140     log "Synchronizing i18n package descriptions"
141     # First sync their newest data
142     cd ${scriptdir}/i18nsync
143     rsync -aq --delete --delete-after ddtp-sync:/does/not/matter . || true
144
145     # Now check if we still know about the packages for which they created the files
146     # is the timestamp signed by us?
147     if $(gpgv --keyring /srv/ftp.debian.org/s3kr1t/dot-gnupg/pubring.gpg timestamp.gpg timestamp); then
148         # now read it. As its signed by us we are sure the content is what we expect, no need
149         # to do more here. And we only test -d a directory on it anyway.
150         TSTAMP=$(cat timestamp)
151         # do we have the dir still?
152         if [ -d ${scriptdir}/i18n/${TSTAMP} ]; then
153             # Lets check!
154             if ${scriptsdir}/ddtp-i18n-check.sh . ${scriptdir}/i18n/${TSTAMP}; then
155                 # Yay, worked, lets copy around
156                 for dir in squeeze sid; do
157                     if [ -d dists/${dir}/ ]; then
158                         cd dists/${dir}/main/i18n
159                         rsync -aq --delete --delete-after  . ${ftpdir}/dists/${dir}/main/i18n/.
160                     fi
161                     cd ${scriptdir}/i18nsync
162                 done
163             else
164                 echo "ARRRR, bad guys, wrong files, ARRR"
165                 echo "Arf, Arf, Arf, bad guys, wrong files, arf, arf, arf" | mail -s "Don't you kids take anything. I'm watching you. I've got eye implants in the back of my head." debian-l10n-devel@lists.alioth.debian.org
166             fi
167         else
168             echo "ARRRR, missing the timestamp ${TSTAMP} directory, not updating i18n, ARRR"
169             echo "Arf, Arf, Arf, missing the timestamp ${TSTAMP} directory, not updating i18n, arf, arf, arf" | mail -s "Lisa, if you don't like your job you don't strike. You just go in every day and do it really half-assed. That's the American way." debian-l10n-devel@lists.alioth.debian.org
170         fi
171     else
172         echo "ARRRRRRR, could not verify our timestamp signature, ARRR. Don't mess with our files, i18n guys, ARRRRR."
173         echo "Arf, Arf, Arf, could not verify our timestamp signature, arf. Don't mess with our files, i18n guys, arf, arf, arf" | mail -s "You can't keep blaming yourself. Just blame yourself once, and move on." debian-l10n-devel@lists.alioth.debian.org
174     fi
175 }
176
177 # Process the accepted queue
178 function accepted() {
179     log "Processing queue/accepted"
180     rm -f "$accepted/REPORT"
181     dak process-accepted -pa -d "$accepted" > "$accepted/REPORT"
182     cat "$accepted/REPORT" | mail -s "Install for $(date +"%D - %R")" ftpmaster@ftp-master.debian.org
183     chgrp debadmin "$accepted/REPORT"
184     chmod 664 "$accepted/REPORT"
185 }
186
187 function cruft() {
188     log "Checking for cruft in overrides"
189     dak check-overrides
190
191     log "Fixing symlinks in $ftpdir"
192     symlinks -d -r $ftpdir
193 }
194
195 function msfl() {
196     log "Generating suite file lists for apt-ftparchive"
197     dak make-suite-file-list
198 }
199
200 function fingerprints() {
201     log "Updating fingerprints"
202     dak import-keyring -L /srv/keyring.debian.org/keyrings/debian-keyring.gpg
203 }
204
205 function overrides() {
206     log "Writing overrides into text files"
207     cd $overridedir
208     dak make-overrides
209
210     # FIXME
211     rm -f override.sid.all3
212     for i in main contrib non-free main.debian-installer; do cat override.sid.$i >> override.sid.all3; done
213 }
214
215 function mpfm() {
216     log "Generating package / file mapping"
217     dak make-pkg-file-mapping | bzip2 -9 > $base/ftp/indices/package-file.map.bz2
218 }
219
220 function packages() {
221     log "Generating Packages and Sources files"
222     cd $configdir
223     apt-ftparchive generate apt.conf
224 }
225
226 function pdiff() {
227     log "Generating pdiff files"
228     dak generate-index-diffs
229 }
230
231 function release() {
232     log "Generating Release files"
233     dak generate-releases
234 }
235
236 function dakcleanup() {
237     log "Cleanup old packages/files"
238     dak clean-suites -m 10000
239     dak clean-queues
240 }
241
242 function buildd() {
243     # Needs to be rebuilt, as files have moved.  Due to unaccepts, we need to
244     # update this before wanna-build is updated.
245     log "Regenerating wanna-build/buildd information"
246     psql projectb -A -t -q -c "SELECT filename FROM queue_build WHERE suite = 5 AND queue = 0 AND in_queue = true AND filename ~ 'd(sc|eb)$'" > $dbdir/dists/unstable_accepted.list
247     symlinks -d /srv/incoming.debian.org/buildd > /dev/null
248     apt-ftparchive generate apt.conf.buildd
249 }
250
251 function buildd_dir() {
252     # Rebuilt the buildd dir to avoid long times of 403
253     log "Regenerating the buildd incoming dir"
254     STAMP=$(date "+%Y%m%d%H%M")
255     make_buildd_dir
256 }
257
258 function scripts() {
259     log "Running various scripts from $scriptsdir"
260     cd $scriptsdir
261     ./mkmaintainers
262     ./copyoverrides
263     ./mklslar
264     ./mkfilesindices
265     ./mkchecksums
266 }
267
268 function mirror() {
269     echo "Regenerating \"public\" mirror/ hardlink fun"
270     cd ${mirrordir}
271     rsync -aH --link-dest ${ftpdir} --exclude Archive_Maintenance_In_Progress --delete --delete-after --ignore-errors ${ftpdir}/. .
272 }
273
274 function wb() {
275     log "Trigger daily wanna-build run"
276     ssh -o BatchMode=yes -o SetupTimeOut=90 -o ConnectTimeout=90 wbadm@buildd /org/wanna-build/trigger.daily || echo "W-B trigger.daily failed" | mail -s "W-B Daily trigger failed" ftpmaster@ftp-master.debian.org
277 }
278
279 function expire() {
280     log "Expiring old database dumps..."
281     cd $base/backup
282     $scriptsdir/expire_dumps -d . -p -f "dump_*"
283 }
284
285 function transitionsclean() {
286     log "Removing out of date transitions..."
287     cd $base
288     dak transitions -c -a
289 }
290
291 function reports() {
292     # Send a report on NEW/BYHAND packages
293     log "Nagging ftpteam about NEW/BYHAND packages"
294     dak queue-report | mail -e -s "NEW and BYHAND on $(date +%D)" ftpmaster@ftp-master.debian.org
295     # and one on crufty packages
296     log "Sending information about crufty packages"
297     dak cruft-report > $webdir/cruft-report-daily.txt
298     dak cruft-report -s experimental >> $webdir/cruft-report-daily.txt
299     cat $webdir/cruft-report-daily.txt | mail -e -s "Debian archive cruft report for $(date +%D)" ftpmaster@ftp-master.debian.org
300 }
301
302 function dm() {
303     log "Updating DM html page"
304     $scriptsdir/dm-monitor >$webdir/dm-uploaders.html
305 }
306
307 function bts() {
308     log "Categorizing uncategorized bugs filed against ftp.debian.org"
309     dak bts-categorize
310 }
311
312 function merkel2() {
313     # Push dak@merkel so it syncs the projectb there. Returns immediately, the sync runs detached
314     log "Trigger merkel/flotows projectb sync"
315     ssh -2 -o BatchMode=yes -o SetupTimeOut=30 -o ConnectTimeout=30 -i ~/.ssh/push_merkel_projectb dak@merkel.debian.org sleep 1
316     # Also trigger flotow, the ftpmaster test box
317     ssh -2 -o BatchMode=yes -o SetupTimeOut=30 -o ConnectTimeout=30 -i ~/.ssh/push_flotow_projectb dak@flotow.debconf.org sleep 1
318 }
319
320 function merkel3() {
321     # Push dak@merkel to tell it to sync the dd accessible parts. Returns immediately, the sync runs detached
322     log "Trigger merkels dd accessible parts sync"
323     ssh -2 -o BatchMode=yes -o SetupTimeOut=30 -o ConnectTimeout=30 -i ~/.ssh/push_merkel_ddaccess dak@merkel.debian.org sleep 1
324 }
325
326 function runparts() {
327     log "Using run-parts to run scripts in $base/scripts/distmnt"
328     run-parts --report $base/scripts/distmnt
329 }
330
331 function i18n2() {
332     log "Exporting package data foo for i18n project"
333     STAMP=$(date "+%Y%m%d%H%M")
334     mkdir -p ${scriptdir}/i18n/${STAMP}
335     cd ${scriptdir}/i18n/${STAMP}
336     dak control-suite -l stable > lenny
337     dak control-suite -l testing > squeeze
338     dak control-suite -l unstable > sid
339     echo "${STAMP}" > timestamp
340     gpg --secret-keyring /srv/ftp.debian.org/s3kr1t/dot-gnupg/secring.gpg --keyring /srv/ftp.debian.org/s3kr1t/dot-gnupg/pubring.gpg --no-options --batch --no-tty --armour --default-key 6070D3A1 --detach-sign -o timestamp.gpg timestamp
341     rm -f md5sum
342     md5sum * > md5sum
343     cd ${webdir}/
344     ln -sfT ${scriptdir}/i18n/${STAMP} i18n
345
346     cd ${scriptdir}
347     find ./i18n -mindepth 1 -maxdepth 1 -mtime +2 -not -name "${STAMP}" -type d -print0 | xargs --no-run-if-empty -0 rm -rf
348 }
349
350 function stats() {
351     log "Updating stats data"
352     cd $configdir
353     $scriptsdir/update-ftpstats $base/log/* > $base/misc/ftpstats.data
354     R --slave --vanilla < $base/misc/ftpstats.R
355     dak stats arch-space > $webdir/arch-space
356     dak stats pkg-nums > $webdir/pkg-nums
357 }
358
359 function aptftpcleanup() {
360     log "Clean up apt-ftparchive's databases"
361     cd $configdir
362     apt-ftparchive -q clean apt.conf
363 }
364
365 function compress() {
366     log "Compress old psql backups"
367     cd $base/backup/
368     find -maxdepth 1 -mindepth 1 -type f -name 'dump_pre_*' -mtime +2 -print0 | xargs -0 --no-run-if-empty rm
369
370     find -maxdepth 1 -mindepth 1 -type f -name 'dump_*' \! -name '*.bz2' \! -name '*.gz' -mmin +720 |
371     while read dumpname; do
372         echo "Compressing $dumpname"
373         bzip2 -9fv "$dumpname"
374     done
375     find -maxdepth 1 -mindepth 1 -type f -name "dumpall_*" \! -name '*.bz2' \! -name '*.gz' -mmin +720 |
376     while read dumpname; do
377         echo "Compressing $dumpname"
378         bzip2 -9fv "$dumpname"
379     done
380     finddup -l -d $base/backup
381 }
382
383 function logstats() {
384     $masterdir/tools/logs.py "$1"
385 }
386
387 # save timestamp when we start
388 function savetimestamp() {
389         NOW=`date "+%Y.%m.%d-%H:%M:%S"`
390         echo ${NOW} > "${dbdir}/dinstallstart"
391 }
392
393 function maillogfile() {
394     cat "$LOGFILE" | mail -s "Log for dinstall run of ${NOW}" cron@ftp-master.debian.org
395 }
396
397 function renamelogfile() {
398     if [ -f "${dbdir}/dinstallstart" ]; then
399         NOW=$(cat "${dbdir}/dinstallstart")
400         maillogfile
401     mv "$LOGFILE" "$logdir/dinstall_${NOW}.log"
402         logstats "$logdir/dinstall_${NOW}.log"
403         bzip2 -9 "$logdir/dinstall_${NOW}.log"
404     else
405         error "Problem, I don't know when dinstall started, unable to do log statistics."
406         NOW=`date "+%Y.%m.%d-%H:%M:%S"`
407         maillogfile
408         mv "$LOGFILE" "$logdir/dinstall_${NOW}.log"
409         bzip2 -9 "$logdir/dinstall_${NOW}.log"
410     fi
411 }
412
413 function testingsourcelist() {
414     dak ls -s testing -f heidi -r .| egrep 'source$' > ${webdir}/testing.list
415 }
416
417 # do a last run of process-unchecked before dinstall is on.
418 function process_unchecked() {
419     log "Processing the unchecked queue"
420     acceptnew
421     UNCHECKED_WITHOUT_LOCK="-p"
422     do_unchecked
423     sync_debbugs
424 }
425
426 ########################################################################
427 ########################################################################
428
429 # Function to save which stage we are in, so we can restart an interrupted
430 # dinstall. Or even run actions in parallel, if we dare to, by simply
431 # backgrounding the call to this function. But that should only really be
432 # done for things we dont care much about.
433 #
434 # This should be called with the first argument being an array, with the
435 # members
436 #  - FUNC - the function name to call
437 #  - ARGS - Possible arguments to hand to the function. Can be the empty string
438 #  - TS   - The timestamp name. Can be the empty string
439 #  - ERR  - if this is the string false, then the call will be surrounded by
440 #           set +e ... set -e calls, so errors in the function do not exit
441 #           dinstall. Can be the empty string, meaning true.
442 #
443 # MAKE SURE TO KEEP THIS THE LAST FUNCTION, AFTER ALL THE VARIOUS ONES
444 # ADDED FOR DINSTALL FEATURES!
445 function stage() {
446     ARGS='GO[@]'
447     local "${!ARGS}"
448
449     STAGEFILE="${stagedir}/${FUNC}"
450     if [ -f "${STAGEFILE}" ]; then
451         stamptime=$(/usr/bin/stat -c %Z "${STAGEFILE}")
452         unixtime=$(date +%s)
453         difference=$(( $unixtime - $stamptime ))
454         if [ ${difference} -ge 14400 ]; then
455             log_error "Did already run ${FUNC}, stagefile exists, but that was ${difference} seconds ago. Please check."
456         else
457             log "Did already run ${FUNC}, not calling again..."
458         fi
459         return
460     fi
461
462     debug "Now calling function ${FUNC}. Arguments: ${ARGS}. Timestamp: ${TS}"
463
464     # Make sure we are always at the same place. If a function wants to be elsewhere,
465     # it has to cd first!
466     cd ${configdir}
467
468     # Now redirect the output into $STAGEFILE.log. In case it errors out somewhere our
469     # errorhandler trap can then mail the contents of $STAGEFILE.log only, instead of a whole
470     # dinstall logfile. Short error mails ftw!
471     exec >> "${STAGEFILE}.log" 2>&1
472
473     if [ -f "${LOCK_STOP}" ]; then
474         log "${LOCK_STOP} exists, exiting immediately"
475         exit 42
476     fi
477
478     if [ "${ERR}" = "false" ]; then
479         set +e
480     fi
481     ${FUNC} ${ARGS}
482
483     # No matter what happened in the function, we make sure we have set -e default state back
484     set -e
485
486     # Make sure we are always at the same place.
487     cd ${configdir}
488
489     touch "${STAGEFILE}"
490
491     if [ -n "${TIME}" ]; then
492         ts "${TIME}"
493     fi
494
495     # And the output goes back to the normal logfile
496     exec >> "$LOGFILE" 2>&1
497
498     # Now we should make sure that we have a usable dinstall.log, so append the $STAGEFILE.log
499     # to it.
500     cat "${STAGEFILE}.log" >> "${LOGFILE}"
501     rm -f "${STAGEFILE}.log"
502
503     if [ -f "${LOCK_STOP}" ]; then
504         log "${LOCK_STOP} exists, exiting immediately"
505         exit 42
506     fi
507 }
508
509 ########################################################################
510
511 # We need logs.
512 LOGFILE="$logdir/dinstall.log"
513
514 exec >> "$LOGFILE" 2>&1
515
516 # usually we are not using debug logs. Set to 1 if you want them.
517 DEBUG=0
518
519 # our name
520 PROGRAM="dinstall"
521
522 # where do we want mails to go? For example log entries made with error()
523 if [ "x$(hostname -s)x" != "xriesx" ]; then
524     # Not our ftpmaster host
525     MAILTO=${MAILTO:-"root"}
526 else
527     # Yay, ftpmaster
528     MAILTO=${MAILTO:-"ftpmaster@debian.org"}
529 fi
530
531 # How many logfiles to keep
532 LOGROTATE=${LOGROTATE:-400}
533
534 # Marker for dinstall start
535 DINSTALLSTART="${lockdir}/dinstallstart"
536 # Marker for dinstall end
537 DINSTALLEND="${lockdir}/dinstallend"
538
539 # Timestamps start at -1. so first gets 0
540 TS=-1
541 touch "${DINSTALLSTART}"
542 ts "startup"
543
544 # Tell everyone we are doing some work
545 NOTICE="$ftpdir/Archive_Maintenance_In_Progress"
546
547 # lock cron.unchecked (it immediately exits when this exists)
548 LOCK_DAILY="$lockdir/daily.lock"
549
550 # Lock cron.unchecked from doing work
551 LOCK_ACCEPTED="$lockdir/unchecked.lock"
552
553 # Lock process-new from doing work
554 LOCK_NEW="$lockdir/processnew.lock"
555
556 # This file is simply used to indicate to britney whether or not
557 # the Packages file updates completed sucessfully.  It's not a lock
558 # from our point of view
559 LOCK_BRITNEY="$lockdir/britney.lock"
560
561 # If this file exists we exit immediately after the currently running
562 # function is done
563 LOCK_STOP="$lockdir/archive.stop"
564
565 lockfile -l 3600 "${LOCK_DAILY}"
566 trap onerror ERR
567 trap cleanup EXIT TERM HUP INT QUIT
568
569 touch "${LOCK_BRITNEY}"
570
571 GO=(
572     FUNC="savetimestamp"
573     TIME=""
574     ARGS=""
575     ERR="false"
576 )
577 stage $GO
578
579 GO=(
580     FUNC="notice"
581     TIME=""
582     ARGS=""
583     ERR="false"
584 )
585 stage $GO
586
587 GO=(
588     FUNC="merkel1"
589     TIME="init"
590     ARGS=""
591     ERR="false"
592 )
593 stage $GO
594
595 GO=(
596     FUNC="pgdump_pre"
597     TIME="pg_dump1"
598     ARGS=""
599     ERR=""
600 )
601 stage $GO
602
603 GO=(
604     FUNC="updates"
605     TIME="External Updates"
606     ARGS=""
607     ERR="false"
608 )
609 stage $GO
610
611 GO=(
612     FUNC="punew"
613     TIME="p-u-new"
614     ARGS="p-u-new"
615     ERR=""
616 )
617 stage $GO
618
619 GO=(
620     FUNC="opunew"
621     TIME="o-p-u-new"
622     ARGS="o-p-u-new"
623     ERR=""
624 )
625 stage $GO
626
627 GO=(
628     FUNC="i18n1"
629     TIME="i18n 1"
630     ARGS=""
631     ERR="false"
632 )
633 stage $GO
634
635 lockfile "$LOCK_ACCEPTED"
636 lockfile "$LOCK_NEW"
637
638 GO=(
639     FUNC="process_unchecked"
640     TIME=""
641     ARGS=""
642     ERR=""
643 )
644 stage $GO
645
646
647 GO=(
648     FUNC="accepted"
649     TIME="accepted"
650     ARGS=""
651     ERR=""
652 )
653 stage $GO
654
655 GO=(
656     FUNC="buildd_dir"
657     TIME="buildd_dir"
658     ARGS=""
659     ERR="false"
660 )
661 stage $GO
662
663 GO=(
664     FUNC="cruft"
665     TIME="cruft"
666     ARGS=""
667     ERR=""
668 )
669 stage $GO
670
671 rm -f "$LOCK_ACCEPTED"
672 rm -f "$LOCK_NEW"
673
674 GO=(
675     FUNC="msfl"
676     TIME="make-suite-file-list"
677     ARGS=""
678     ERR=""
679 )
680 stage $GO
681
682 GO=(
683     FUNC="fingerprints"
684     TIME="import-keyring"
685     ARGS=""
686     ERR="false"
687 )
688 stage $GO
689
690 GO=(
691     FUNC="overrides"
692     TIME="overrides"
693     ARGS=""
694     ERR=""
695 )
696 stage $GO
697
698 GO=(
699     FUNC="mpfm"
700     TIME="pkg-file-mapping"
701     ARGS=""
702     ERR="false"
703 )
704 stage $GO
705
706 GO=(
707     FUNC="packages"
708     TIME="apt-ftparchive"
709     ARGS=""
710     ERR=""
711 )
712 stage $GO
713
714 GO=(
715     FUNC="pdiff"
716     TIME="pdiff"
717     ARGS=""
718     ERR=""
719 )
720 stage $GO
721
722 GO=(
723     FUNC="release"
724     TIME="release files"
725     ARGS=""
726     ERR=""
727 )
728 stage $GO
729
730 GO=(
731     FUNC="dakcleanup"
732     TIME="cleanup"
733     ARGS=""
734     ERR=""
735 )
736 stage $GO
737
738 GO=(
739     FUNC="buildd"
740     TIME="buildd"
741     ARGS=""
742     ERR=""
743 )
744 stage $GO
745
746 GO=(
747     FUNC="scripts"
748     TIME="scripts"
749     ARGS=""
750     ERR=""
751 )
752 stage $GO
753
754 GO=(
755     FUNC="mirror"
756     TIME="mirror hardlinks"
757     ARGS=""
758     ERR=""
759 )
760 stage $GO
761
762 GO=(
763     FUNC="wb"
764     TIME="w-b"
765     ARGS=""
766     ERR=""
767 )
768 stage $GO
769
770 rm -f "${NOTICE}"
771 rm -f "${LOCK_DAILY}"
772
773 ts "locked part finished"
774
775 GO=(
776     FUNC="pgdump_post"
777     TIME="pg_dump2"
778     ARGS=""
779     ERR=""
780 )
781 stage $GO
782
783 GO=(
784     FUNC="expire"
785     TIME="expire_dumps"
786     ARGS=""
787     ERR=""
788 )
789 stage $GO
790
791 GO=(
792     FUNC="transitionsclean"
793     TIME="transitionsclean"
794     ARGS=""
795     ERR=""
796 )
797 stage $GO
798
799 GO=(
800     FUNC="reports"
801     TIME="reports"
802     ARGS=""
803     ERR=""
804 )
805 stage $GO
806
807 GO=(
808     FUNC="dm"
809     TIME=""
810     ARGS=""
811     ERR=""
812 )
813 stage $GO
814
815 GO=(
816     FUNC="bts"
817     TIME=""
818     ARGS=""
819     ERR="false"
820 )
821 stage $GO
822
823 GO=(
824     FUNC="merkel2"
825     TIME="merkel projectb push"
826     ARGS=""
827     ERR="false"
828 )
829 stage $GO
830
831 GO=(
832     FUNC="runparts"
833     TIME="run-parts"
834     ARGS=""
835     ERR="false"
836 )
837 stage $GO
838
839 GO=(
840     FUNC="i18n2"
841     TIME="i18n 2"
842     ARGS=""
843     ERR="false"
844 )
845 stage $GO
846
847 GO=(
848     FUNC="stats"
849     TIME="stats"
850     ARGS=""
851     ERR="false"
852 )
853 stage $GO
854
855 GO=(
856     FUNC="testingsourcelist"
857     TIME=""
858     ARGS=""
859     ERR="false"
860 )
861 stage $GO
862
863 rm -f ${LOCK_BRITNEY}
864
865 GO=(
866     FUNC="pgdakdev"
867     TIME="dak-dev db"
868     ARGS=""
869     ERR="false"
870 )
871 stage $GO
872
873 GO=(
874     FUNC="aptftpcleanup"
875     TIME="apt-ftparchive cleanup"
876     ARGS=""
877     ERR="false"
878 )
879 stage $GO
880
881 GO=(
882     FUNC="merkel3"
883     TIME="merkel ddaccessible sync"
884     ARGS=""
885     ERR="false"
886 )
887 stage $GO
888
889 GO=(
890     FUNC="compress"
891     TIME="compress"
892     ARGS=""
893     ERR=""
894 )
895 stage $GO
896
897 log "Daily cron scripts successful, all done"
898
899 exec > "$logdir/afterdinstall.log" 2>&1
900
901 GO=(
902     FUNC="renamelogfile"
903     TIME=""
904     ARGS=""
905     ERR="false"
906 )
907 stage $GO
908
909
910 # Now, at the very (successful) end of dinstall, make sure we remove
911 # our stage files, so the next dinstall run will do it all again.
912 rm -f ${stagedir}/*
913 touch "${DINSTALLEND}"