3 # Executed daily via cron, out of dak's crontab.
6 export SCRIPTVARS=/org/ftp.debian.org/dak/config/debian/vars
9 ################################################################################
11 echo Archive maintenance started at $(date +%X)
14 NOTICE="$ftpdir/Archive_Maintenance_In_Progress"
15 LOCKCU="$lockdir/daily.lock"
16 LOCKAC="$lockdir/unchecked.lock"
25 lockfile -l 3600 $LOCKCU
27 Packages are currently being installed and indices rebuilt.
28 Maintenance is automatic, starting at 13:52 US Central time, and
29 ending at about 15:30. This file is then removed.
31 You should not mirror the archive during this period.
34 ################################################################################
36 echo "Creating pre-daily-cron-job backup of projectb database..."
37 pg_dump projectb > /org/ftp.debian.org/backup/dump_$(date +%Y.%m.%d-%H:%M:%S)
39 ################################################################################
41 TS=$(($TS+1)); echo Archive maintenance timestamp $TS: $(date +%X)
43 $scriptsdir/update-bugdoctxt
44 $scriptsdir/update-mirrorlists
45 $scriptsdir/update-mailingliststxt
47 ################################################################################
49 TS=$(($TS+1)); echo Archive maintenance timestamp $TS: $(date +%X)
53 dak process-unchecked -pa *.changes | tee REPORT | \
54 mail -s "Install for $(date +%D)" ftpmaster@ftp-master.debian.org
58 TS=$(($TS+1)); echo Archive maintenance timestamp $TS: $(date +%X)
63 symlinks -d -r $ftpdir
65 TS=$(($TS+1)); echo Archive maintenance timestamp $TS: $(date +%X)
67 dak make-suite-file-list
69 TS=$(($TS+1)); echo Archive maintenance timestamp $TS: $(date +%X)
72 # [JT - disabled, dak import-ldap-fingerprints currently can ask questions]
73 #dak import-ldap-fingerprints
75 # Generate override files
79 # Update task overrides for testing and unstable
80 # [JT 2004-02-04 disabled; copying in by hand for now]
81 #cat $extoverridedir/task | perl -ne 'print if /^\S+\sTask\s\S+(,\s*\S+)*$/;' > override.sarge.extra.main
82 #cat $extoverridedir/task | perl -ne 'print if /^\S+\sTask\s\S+(,\s*\S+)*$/;' > override.sid.extra.main
85 rm -f override.potato.all3 override.sid.all3
86 for i in main contrib non-free; do cat override.potato.$i >> override.potato.all3; done
87 for i in main contrib non-free main.debian-installer; do cat override.sid.$i >> override.sid.all3; done
89 TS=$(($TS+1)); echo Archive maintenance timestamp $TS: $(date +%X)
91 # Generate Packages and Sources files
93 apt-ftparchive generate apt.conf
94 # Generate *.diff/ incremental updates
95 dak generate-index-diffs
96 # Generate Release files
99 TS=$(($TS+1)); echo Archive maintenance timestamp $TS: $(date +%X)
101 # Clean out old packages
105 TS=$(($TS+1)); echo Archive maintenance timestamp $TS: $(date +%X)
107 # Needs to be rebuilt, as files have moved. Due to unaccepts, we need to
108 # update this before wanna-build is updated.
109 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
110 apt-ftparchive generate apt.conf.buildd
112 TS=$(($TS+1)); echo Archive maintenance timestamp $TS: $(date +%X)
121 # Fetch bugs information before unchecked processing is allowed again.
122 /org/ftp.debian.org/testing/britney bugs
124 ssh buildd@buildd /org/wanna-build/trigger.daily
127 echo Archive maintenance finished at $(date +%X)
129 ################################################################################
131 echo "Creating post-daily-cron-job backup of projectb database..."
132 POSTDUMP=/org/ftp.debian.org/backup/dump_$(date +%Y.%m.%d-%H:%M:%S)
133 pg_dump projectb > $POSTDUMP
134 (cd /org/ftp.debian.org/backup; ln -sf $POSTDUMP current)
136 ################################################################################
138 TS=$(($TS+1)); echo Archive maintenance timestamp $TS: $(date +%X)
140 # Vacuum the database
141 echo "VACUUM; VACUUM ANALYZE;" | psql projectb 2>&1 | grep -v "^NOTICE: Skipping.*only table owner can VACUUM it$"
143 ################################################################################
145 TS=$(($TS+1)); echo Archive maintenance timestamp $TS: $(date +%X)
147 # Send a report on NEW/BYHAND packages
148 dak queue-report | mail -e -s "NEW and BYHAND on $(date +%D)" ftpmaster@ftp-master.debian.org
149 # and one on crufty packages
150 dak cruft-report | tee $webdir/cruft-report-daily.txt | mail -e -s "Debian archive cruft report for $(date +%D)" ftpmaster@ftp-master.debian.org
152 ################################################################################
156 #time dak mirror-split
158 ################################################################################
160 TS=$(($TS+1)); echo Archive maintenance timestamp $TS: $(date +%X)
162 ulimit -m 90000 -d 90000 -s 10000 -v 90000
164 run-parts --report /org/ftp.debian.org/scripts/distmnt
166 echo Daily cron scripts successful.
168 TS=$(($TS+1)); echo Archive maintenance timestamp $TS: $(date +%X)
172 $scriptsdir/update-ftpstats $base/log/* > $base/misc/ftpstats.data
173 R --slave --vanilla < $base/misc/ftpstats.R
175 TS=$(($TS+1)); echo Archive maintenance timestamp $TS: $(date +%X)