- cd $configdir
- apt-ftparchive -qq -o APT::FTPArchive::Contents=off generate apt.conf.buildd
-
- cd ${incoming}
- rm -f buildd/Release*
- apt-ftparchive -qq -o APT::FTPArchive::Release::Origin="Debian" -o APT::FTPArchive::Release::Label="Debian" -o APT::FTPArchive::Release::Description="buildd incoming" -o APT::FTPArchive::Release::Architectures="${archs}" release buildd > Release
- 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 Release.gpg Release
- mv Release* buildd/.
-
- cd ${incoming}
- mkdir -p tree/${STAMP}
- cp -al ${incoming}/buildd/. tree/${STAMP}/
- ln -sfT tree/${STAMP} ${incoming}/builddweb
- find ./tree -mindepth 1 -maxdepth 1 -not -name "${STAMP}" -type d -print0 | xargs --no-run-if-empty -0 rm -rf
-}
-
-# move accepted NEW packages from stagedir into queue/accepted
-function acceptnew () {
- cd $newstage
- for file in $(find . -maxdepth 1 -mindepth 1 -type f -name \*.changes | sed -e "s,./,," | xargs); do
- sed '1,/Files:/d' "${file}" | sed '/BEGIN PGP SIGNATURE/,$d' \
- | while read notused1 notused2 notused3 notused4 NAME; do
- if [ -z "${NAME}" ]; then
- # Sometimes there is a newline after the Files:, ignore it
- continue
- fi
- if [ -f "${NAME}" ]; then
- mv --target-directory="${accepted}" "${NAME}"
- else
- log_error "Error, couldn't find file ${NAME} to move to ${accepted}"
- fi
- done
- mv --target-directory="${accepted}" "${file}" "${file%%.changes}.dak"
- done
+ # We generate straight into the static mirror location for incoming
+ dak manage-build-queues -a
+ dak generate-packages-sources2 -a build-queues
+ dak generate-releases -a build-queues >/dev/null
+
+ # Stick a last modified date in the page footer
+ echo "<p>Last updated: `date -u`</p>" > ${incoming}/web/README.html
+
+ # Tell the mirrors that we've updated
+ chronic /usr/local/bin/static-update-component incoming.debian.org
+}
+
+# Process (oldstable)-proposed-updates "NEW" queue
+function punew_do() {
+ local queue="$1"
+ local qdir="$2"
+ local to="${3}"
+
+ date -u -R >> REPORT
+ dak process-policy "${queue}" | tee -a REPORT | mail -a "X-Debian: DAK" -e -s "NEW changes in ${queue}" -a "From: Debian FTP Masters <ftpmaster@ftp-master.debian.org>" "${to}"
+ echo >> REPORT
+
+ dak generate-packages-sources2 -s "${queue}"
+
+ STAMP=${STAMP:-$(date "+%Y%m%d%H%M")}
+
+ local exportdir="${qdir}/tree/${STAMP}"
+ local targetdir="${qdir}/export"
+ mkdir -p -- ${exportdir}
+ dak export -q "${queue}" -d "${exportdir}" --all
+ ln -sfT ${exportdir} ${targetdir}
+ find "${qdir}/tree" -mindepth 1 -maxdepth 1 -not -name "${STAMP}" -type d -print0 | xargs --no-run-if-empty -0 rm -rf
+}
+
+# These versions used in dinstall
+function punew() {
+ if [ "${PROGRAM}" = "dinstall" ]; then
+ log "Doing automated p-u-new processing"
+ fi
+ cd "${queuedir}/p-u-new"
+ punew_do "$1" "${queuedir}/p-u-new" "debian-release@lists.debian.org"
+}
+
+function opunew() {
+ if [ "${PROGRAM}" = "dinstall" ]; then
+ log "Doing automated o-p-u-new processing"
+ fi
+ cd "${queuedir}/o-p-u-new"
+ punew_do "$1" "${queuedir}/o-p-u-new" "debian-release@lists.debian.org"
+}
+
+function backports_policy() {
+ local queue="backports-policy"
+ local qdir="/srv/backports-master.debian.org/queue/policy"
+ local to="backports-team@debian.org"
+
+ if [ "${PROGRAM}" = "dinstall" ]; then
+ log "Doing automated ${queue} processing"
+ fi
+
+ cd "${qdir}"
+ punew_do "${queue}" "${qdir}" "${to}"