#!/bin/sh # Copyright: © 2002-2011 Raphaël Hertzog # Copyright: © 2007-2009 Stefano Zacchiroli # This file is distributed under the terms of the General Public License # version 2 or (at your option) any later version. mirror="http://cdn.debian.net/debian" security="http://security.debian.org" backports="http://backports.debian.org/debian-backports/" piuparts="http://piuparts.debian.org" official_distros="oldstable stable testing unstable experimental" pu_distros="stable-updates stable-proposed-updates testing-proposed-updates" security_distros="oldstable stable testing" backports_distros="oldstable-backports stable-backports" umask 002 set -e if [ -d "../incoming" ]; then root=$PWD/.. elif [ -d "incoming" ]; then root=$PWD else root=/org/packages.qa.debian.org/www fi cd $root/incoming nice_wget() { # $1: url # $2: filename # For timestamping to work, copy to .new (not link, wget will not break # the link) test -e $2 && cp -a $2 $2.new || true # Beware that -N conflicts with -O (#88176, #202911) if wget -U pts -q -O $2.new "$1" ; then mv -f $2.new $2 else echo "Downloading $1 failed, $2 is stale now" rm -f $2.new fi } http_head() { # $1: url # return 0 if the URL exists (HEAD was OK), non-0 otherwise curl --head --fail --silent "$1" > /dev/null return $? } nice_redirect_to() { # $1 : target file # $2-... : shell command dest="$1" shift if [ -f "$dest" ] ; then mv -f "$dest" "$dest.bak" fi $* > "$dest" || (echo "Failure while executing $* . Continuing ..." ; cp "$dest.bak" "$dest") } # Download all Sources.gz for comp in main contrib non-free do for dist in $official_distros $pu_distros; do nice_wget $mirror/dists/$dist/$comp/source/Sources.gz \ Sources-${dist}_$comp.gz done for dist in $security_distros ; do nice_wget $security/dists/$dist/updates/$comp/source/Sources.gz \ Sources-security-${dist}_$comp.gz done for dist in $backports_distros ; do nice_wget $backports/dists/$dist/$comp/source/Sources.gz \ Sources-${dist}_$comp.gz done nice_wget http://mentors.debian.net/debian/dists/unstable/$comp/source/Sources.gz \ Sources-mentors_$comp.gz done # Download update_excuses.html nice_wget http://ftp-master.debian.org/testing/update_excuses.html.gz \ update_excuses.html.gz # Download PTS subscription count nice_wget http://packages.qa.debian.org/data/pts-subscription-count.txt \ count.txt # Download override disparities nice_wget http://qa.debian.org/data/ftp/override-disparities.unstable \ override-disparities.unstable nice_wget http://qa.debian.org/data/ftp/override-disparities.experimental \ override-disparities.experimental # Download lintian.d.o run info #nice_wget http://lintian.debian.org/lintian.log lintian.log nice_wget http://lintian.debian.org/qa-list.txt lintian.qa-list.txt # Download builddlogcheck info nice_wget https://buildd.debian.org/~brlink/logcheck.txt logcheck.txt # Download bugs summary nice_wget http://udd.debian.org/cgi-bin/bugs-binpkgs-pts.cgi bugs.txt nice_wget http://udd.debian.org/cgi-bin/ddpo-bugs.cgi bugs-src.txt nice_redirect_to bugs.help.txt $root/bin/tagged_bugs.py "help" nice_redirect_to bugs.gift.txt \ $root/bin/tagged_bugs.py "gift" "debian-qa@lists.debian.org" piuparts_distros="sid lenny2squeeze" for distro in $piuparts_distros ; do nice_wget $piuparts/$distro/sources.txt piuparts-$distro.txt done # Download debcheck lists DCROOT=http://qa.debian.org/data/debcheck/result #nice_wget $DCROOT/oldstable/lists/ALL-pkglist debcheck-oldstable nice_wget $DCROOT/stable/lists/ALL-pkglist debcheck-stable nice_wget $DCROOT/testing/lists/ALL-pkglist debcheck-testing nice_wget $DCROOT/unstable/lists/ALL-pkglist debcheck-unstable # Download the translation status of packages nice_wget http://i18n.debian.net/l10n-pkg-status/pkglist l10n-status.txt # Get wnpp information nice_wget http://qa.debian.org/data/bts/wnpp_rm wnpp_rm # get patches from ubuntu nice_wget http://patches.ubuntu.com/PATCHES patches.ubuntu # get packages version in Ubuntu nice_wget http://udd.debian.org/cgi-bin/ubuntupackages.cgi versions.ubuntu # get bugs in Ubuntu nice_wget http://udd.debian.org/cgi-bin/ubuntubugs.cgi bugs.ubuntu # download LowThresholdNmu list nice_wget 'http://wiki.debian.org/LowThresholdNmu?action=raw' \ low_threshold_nmu.txt # ongoing transitions nice_wget http://ftp-master.debian.org/transitions.yaml \ transitions.yaml # release goals nice_wget http://release.debian.org/testing/goals.yaml release-goals.yaml nice_wget http://udd.debian.org/pts-release-goals.cgi \ release-goals-bugs.yaml # download the list of packages indexed by svnbuildstat #nice_wget http://svnbuildstat.debian.net/packages/flatlist \ # svnbuildstat_list.txt # download watch file information nice_wget http://qa.debian.org/cgi-bin/udd-dehs dehs.yaml # download list of security issues nice_wget http://security-tracker.debian.org/tracker/data/pts/1 \ security_issues.txt # download NEW queue info nice_wget http://ftp-master.debian.org/new.822 new.822 # retrieve package descriptions from UDD nice_wget http://qa.debian.org/data/pts/shortdesc.txt shortdesc.txt # download the Debian fonts review nice_wget http://pkg-fonts.alioth.debian.org/review/debian-font-review.yaml debian-font-review.yaml # What more ? # Decompress all files for file in *.gz; do gzip -d -c $file > ${file%%.gz}.new touch -r $file ${file%%.gz}.new mv -f ${file%%.gz}.new ${file%%.gz} done # filter out some packages from Sources-mentors_* ../bin/filter_mentors.pl mv Sources-mentors_main_new Sources-mentors_main mv Sources-mentors_contrib_new Sources-mentors_contrib mv Sources-mentors_non-free_new Sources-mentors_non-free # vim: ts=8