1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118
|
#! /bin/sh
#
# Executed daily via cron, out of troup's crontab.
set -e
export SCRIPTVARS=/org/ftp.debian.org/katie/vars
. $SCRIPTVARS
################################################################################
echo Archive maintenance started at $(date +%X)
NOTICE="$ftpdir/Archive_Maintenance_In_Progress"
cleanup() {
rm -f "$NOTICE"
}
trap cleanup 0
rm -f "$NOTICE"
cat > "$NOTICE" <<EOF
Packages are currently being installed and indices rebuilt.
Maintenance is automatic, starting at 13:52 US Central time, and
ending at about 15:30. This file is then removed.
You should not mirror the archive during this period.
EOF
################################################################################
echo "Creating pre-daily-cron-job backup of projectb database..."
pg_dump projectb > /org/ftp.debian.org/backup/dump_$(date +%Y.%m.%d-%H:%M:%S)
################################################################################
update-bugdoctxt
update-mirrorlists
update-mailingliststxt
################################################################################
cd $accepted
rm -f REPORT
kelly -pa *.changes | tee REPORT | \
mail -s "Install for $(date +%D)" EMAILADDRESS
chgrp debadmin REPORT
chmod 664 REPORT
cd $masterdir
symlinks -d -r $ftpdir
cd $masterdir
jenna
# Generate override files
cd $overridedir
denise
# Update task overrides for testing and unstable
# [JT 2004-02-04 disabled; copying in by hand for now]
#cat $extoverridedir/task | perl -ne 'print if /^\S+\sTask\s\S+(,\s*\S+)*$/;' > override.sarge.extra.main
#cat $extoverridedir/task | perl -ne 'print if /^\S+\sTask\s\S+(,\s*\S+)*$/;' > override.sid.extra.main
# FIXME
rm -f override.potato.all3 override.sid.all3
for i in main contrib non-free; do cat override.potato.$i >> override.potato.all3; done
for i in main contrib non-free main.debian-installer; do cat override.sid.$i >> override.sid.all3; done
# Generate Packages and Sources files
cd $masterdir
apt-ftparchive generate apt.conf
# Generate Release files
ziyi
# Clean out old packages
rhona
shania
mkmaintainers
copyoverrides
mklslar
mkchecksums
rm -f $NOTICE
echo Archive maintenance finished at $(date +%X)
################################################################################
echo "Creating post-daily-cron-job backup of projectb database..."
POSTDUMP=/org/ftp.debian.org/backup/dump_$(date +%Y.%m.%d-%H:%M:%S)
pg_dump projectb > $POSTDUMP
(cd /org/ftp.debian.org/backup; ln -sf $POSTDUMP current)
################################################################################
# Vacuum the database
echo "VACUUM; VACUUM ANALYZE;" | psql projectb 2>&1 | grep -v "^NOTICE: Skipping.*only table owner can VACUUM it$"
################################################################################
# Send a report on NEW/BYHAND packages
helena | mail -e -s "NEW and BYHAND on $(date +%D)" EMAILADDRESS
# and one on crufty packages
rene | mail -e -s "rene run for $(date +%D)" EMAILADDRESS
################################################################################
# Run billie
time billie
################################################################################
ulimit -m 90000 -d 90000 -s 10000 -v 90000
run-parts --report /org/ftp.debian.org/scripts/distmnt
echo Daily cron scripts successful.
|