3 # Executed daily via cron, out of katie's crontab.
6 export SCRIPTVARS=/org/ftp.debian.org/katie/vars
9 ################################################################################
11 echo Archive maintenance started at $(date +%X)
13 NOTICE="$ftpdir/Archive_Maintenance_In_Progress"
14 LOCKCU="$lockdir/daily.lock"
15 LOCKAC="$lockdir/unchecked.lock"
24 lockfile -l 3600 $LOCKCU
26 Packages are currently being installed and indices rebuilt.
27 Maintenance is automatic, starting at 13:52 US Central time, and
28 ending at about 15:30. This file is then removed.
30 You should not mirror the archive during this period.
33 ################################################################################
35 echo "Creating pre-daily-cron-job backup of projectb database..."
36 pg_dump projectb > /org/ftp.debian.org/backup/dump_$(date +%Y.%m.%d-%H:%M:%S)
38 ################################################################################
42 update-mailingliststxt
44 ################################################################################
49 kelly -pa *.changes | tee REPORT | \
50 mail -s "Install for $(date +%D)" ftpmaster@ftp-master.debian.org
58 symlinks -d -r $ftpdir
66 # Generate override files
70 # Update task overrides for testing and unstable
71 # [JT 2004-02-04 disabled; copying in by hand for now]
72 #cat $extoverridedir/task | perl -ne 'print if /^\S+\sTask\s\S+(,\s*\S+)*$/;' > override.sarge.extra.main
73 #cat $extoverridedir/task | perl -ne 'print if /^\S+\sTask\s\S+(,\s*\S+)*$/;' > override.sid.extra.main
76 rm -f override.potato.all3 override.sid.all3
77 for i in main contrib non-free; do cat override.potato.$i >> override.potato.all3; done
78 for i in main contrib non-free main.debian-installer; do cat override.sid.$i >> override.sid.all3; done
80 # Generate Packages and Sources files
82 apt-ftparchive generate apt.conf
83 # Generate *.diff/ incremental updates
85 # Generate Release files
88 # Clean out old packages
92 # Needs to be rebuilt, as files have moved. Due to unaccepts, we need to
93 # update this before wanna-build is updated.
94 psql projectb -A -t -q -c "SELECT filename FROM accepted_autobuild WHERE suite = 5 AND in_accepted = true AND filename ~ 'd(sc|eb)$'" > $dbdir/dists/unstable_accepted.list
95 apt-ftparchive generate apt.conf.buildd
102 sudo -u archvsync /home/archvsync/pushmerkel
105 echo Archive maintenance finished at $(date +%X)
107 ################################################################################
109 echo "Creating post-daily-cron-job backup of projectb database..."
110 POSTDUMP=/org/ftp.debian.org/backup/dump_$(date +%Y.%m.%d-%H:%M:%S)
111 pg_dump projectb > $POSTDUMP
112 (cd /org/ftp.debian.org/backup; ln -sf $POSTDUMP current)
114 ################################################################################
116 # Vacuum the database
117 echo "VACUUM; VACUUM ANALYZE;" | psql projectb 2>&1 | grep -v "^NOTICE: Skipping.*only table owner can VACUUM it$"
119 ################################################################################
121 # Send a report on NEW/BYHAND packages
122 helena | mail -e -s "NEW and BYHAND on $(date +%D)" ftpmaster@ftp-master.debian.org
123 # and one on crufty packages
124 rene | tee $webdir/rene-daily.txt | mail -e -s "rene run for $(date +%D)" ftpmaster@ftp-master.debian.org
126 ################################################################################
132 ################################################################################
134 ulimit -m 90000 -d 90000 -s 10000 -v 90000
136 run-parts --report /org/ftp.debian.org/scripts/distmnt
138 echo Daily cron scripts successful.
142 update-ftpstats $base/log/* > $base/misc/ftpstats.data
143 R --slave --vanilla < $base/misc/ftpstats.R