3 # Executed daily via cron, out of troup's crontab.
6 export SCRIPTVARS=/org/non-us.debian.org/katie/vars-non-US
9 ################################################################################
11 echo Archive maintenance started at $(date +%X)
13 NOTICE="$ftpdir/Archive_Maintenance_In_Progress"
22 Packages are currently being installed and indices rebuilt.
23 Maintenance is automatic, starting at 13:52 US Central time, and
24 ending at about 15:30. This file is then removed.
26 You should not mirror the archive during this period.
29 ################################################################################
31 echo "Creating pre-daily-cron-job backup of projectb database..."
32 pg_dump projectb > /org/non-us.debian.org/backup/dump_$(date +%Y.%m.%d-%H:%M:%S)
34 ################################################################################
38 ################################################################################
40 if [ ! -z "$(find "$accepted" -name \*.changes -maxdepth 1 -mindepth 1)" ]; then
43 kelly -pa *.changes | tee REPORT | \
44 mail -s "Non-US Install for $(date +%D)" ftpmaster@ftp-master.debian.org
48 echo "kelly: Nothing to install."
52 symlinks -d -r $ftpdir
57 # Generate override files
61 rm -f override.potato.all3
62 for i in main contrib non-free; do cat override.potato.$i >> override.potato.all3; done
64 # Generate Packages and Sources files
66 apt-ftparchive generate apt.conf-non-US
67 # Generate Release files
70 # Clean out old packages
74 # Generate the Maintainers file
76 charisma > .new-maintainers_versions
77 mv -f .new-maintainers_versions Maintainers_Versions
78 sed -e "s/~[^ ]*\([ ]\)/\1/" < Maintainers_Versions | awk '{printf "%-20s ", $1; for (i=2; i<=NF; i++) printf "%s ", $i; printf "\n";}' > .new-maintainers
79 mv -f .new-maintainers Maintainers
80 gzip -9v <Maintainers >.new-maintainers.gz
81 mv -f .new-maintainers.gz Maintainers.gz
82 gzip -9v <Maintainers_Versions >.new-maintainers_versions.gz
83 mv -f .new-maintainers_versions.gz Maintainers_Versions.gz
84 rm -f Maintainers_Versions
92 echo Archive maintenance finished at $(date +%X)
94 ################################################################################
96 echo "Creating post-daily-cron-job backup of projectb database..."
97 pg_dump projectb > /org/non-us.debian.org/backup/dump_$(date +%Y.%m.%d-%H:%M:%S)
99 ################################################################################
101 # Vacuum the database
102 echo "VACUUM; VACUUM ANALYZE;" | psql projectb 2>&1 | grep -v "^NOTICE: Skipping.*only table owner can VACUUM it$"
104 ################################################################################
106 # Send a report on NEW/BYHAND packages
107 helena | mail -e -s "[non-US] NEW and BYHAND on $(date +%D)" ftpmaster@ftp-master.debian.org
108 # and one on crufty packages
109 rene | mail -e -s "[non-US] rene run for $(date +%D)" ftpmaster@ftp-master.debian.org
111 ################################################################################
112 ulimit -m 90000 -d 90000 -s 10000 -v 90000
114 run-parts --report /org/non-us.debian.org/scripts/distmnt
116 echo Daily cron scripts successful.