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