/[qa]/trunk/pts/www/bin/update_incoming.sh
ViewVC logotype

Contents of /trunk/pts/www/bin/update_incoming.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2518 - (hide annotations) (download) (as text)
Sun May 1 20:34:08 2011 UTC (2 years, 1 month ago) by hertzog
File MIME type: application/x-sh
File size: 5359 byte(s)
Stop relying on sources.map file that used to be provided by the BTS.
Instead we compute our own map.

Various cleanups to be compatible with python 2.6 and Squeeze.

Do not fail if svnbuildstat file is not there, it's disabled
in update_incoming and unlikely to come back.
1 hertzog 344 #!/bin/sh
2    
3 hertzog 2518 # Copyright: © 2002-2011 Raphaël Hertzog
4 zack 2223 # Copyright: © 2007-2009 Stefano Zacchiroli <zack@debian.org>
5 zack 1953
6 hertzog 351 # This file is distributed under the terms of the General Public License
7     # version 2 or (at your option) any later version.
8    
9 geissert 2480 mirror="http://cdn.debian.net/debian"
10 zack 1953 security="http://security.debian.org"
11 zack 2223 piuparts="http://piuparts.debian.org"
12 hertzog 344
13 hertzog 2476 official_distros="oldstable stable testing unstable experimental"
14 myon 2500 pu_distros="stable-updates stable-proposed-updates testing-proposed-updates"
15 hertzog 2476 security_distros="oldstable stable testing"
16 zack 1953
17 hertzog 692 umask 002
18 jeroen 910 set -e
19 hertzog 692
20 hertzog 344 if [ -d "../incoming" ]; then
21     root=$PWD/..
22     elif [ -d "incoming" ]; then
23     root=$PWD
24     else
25 hertzog 345 root=/org/packages.qa.debian.org/www
26 hertzog 344 fi
27    
28     cd $root/incoming
29    
30 hertzog 372 nice_wget() {
31     # $1: url
32     # $2: filename
33 jeroen 910 # For timestamping to work, copy to .new (not link, wget will not break
34     # the link)
35 jeroen 911 cp -a $2 $2.new || true
36 jeroen 913 # Beware that -N conflicts with -O (#88176, #202911)
37 zack 2047 if wget -U pts -q -O $2.new "$1" ; then
38 hertzog 2383 mv -f $2.new $2
39 hertzog 1900 else
40 filippo 1898 echo "Downloading $1 failed, $2 is stale now"
41     rm -f $2.new
42     fi
43 hertzog 372 }
44    
45 zack 2047 http_head() {
46     # $1: url
47     # return 0 if the URL exists (HEAD was OK), non-0 otherwise
48     curl --head --fail --silent "$1" > /dev/null
49     return $?
50     }
51    
52 zack 1949 nice_redirect_to() {
53     # $1 : target file
54     # $2-... : shell command
55     dest="$1"
56     shift
57     if [ -f "$dest" ] ; then
58 hertzog 2383 mv -f "$dest" "$dest.bak"
59 zack 1949 fi
60     $* > "$dest" || (echo "Failure while executing $* . Continuing ..." ; cp "$dest.bak" "$dest")
61     }
62    
63 hertzog 344 # Download all Sources.gz
64     for comp in main contrib non-free
65     do
66 zack 1953 for dist in $official_distros ; do
67     nice_wget $mirror/dists/$dist/$comp/source/Sources.gz \
68     Sources-${dist}_$comp.gz
69 hertzog 344 done
70 zack 1953 for dist in $pu_distros ; do
71     nice_wget $mirror/dists/$dist/$comp/source/Sources.gz \
72     Sources-${dist}_$comp.gz
73     done
74     for dist in $security_distros ; do
75     nice_wget $security/dists/$dist/updates/$comp/source/Sources.gz \
76     Sources-security-${dist}_$comp.gz
77     done
78 hertzog 344 done
79    
80 zack 1933 # Download mentors.d.n Sources
81     for comp in main contrib non-free
82     do
83     nice_wget http://mentors.debian.net/debian/dists/unstable/$comp/source/Sources.gz \
84     Sources-mentors_$comp.gz
85     done
86    
87 hertzog 344 # Download update_excuses.html
88 jeroen 910 nice_wget http://ftp-master.debian.org/testing/update_excuses.html.gz \
89     update_excuses.html.gz
90 hertzog 344
91     # Download PTS subscription count
92 zack 1953 nice_wget http://packages.qa.debian.org/data/pts-subscription-count.txt \
93     count.txt
94 hertzog 344
95 jeroen 947 # Download override disparities
96     nice_wget http://qa.debian.org/data/ftp/override-disparities.unstable \
97     override-disparities.unstable
98     nice_wget http://qa.debian.org/data/ftp/override-disparities.experimental \
99     override-disparities.experimental
100 jeroen 944
101 zack 1927 # Download lintian.d.o run info
102     #nice_wget http://lintian.debian.org/lintian.log lintian.log
103     nice_wget http://lintian.debian.org/qa-list.txt lintian.qa-list.txt
104    
105 hertzog 344 # Download bugs summary
106 hertzog 2274 nice_wget http://udd.debian.org/cgi-bin/bugs-binpkgs-pts.cgi bugs.txt
107 hertzog 2272 nice_wget http://udd.debian.org/cgi-bin/ddpo-bugs.cgi bugs-src.txt
108 zack 1949 nice_redirect_to bugs.help.txt $root/bin/tagged_bugs.py "help"
109     nice_redirect_to bugs.gift.txt \
110     $root/bin/tagged_bugs.py "gift" "debian-qa@lists.debian.org"
111 zack 2353 piuparts_distros="sid lenny2squeeze"
112 zack 2223 for distro in $piuparts_distros ; do
113     nice_wget $piuparts/$distro/sources.txt piuparts-$distro.txt
114     done
115 hertzog 344
116 hertzog 372 # Download debcheck lists
117 jeroen 914 DCROOT=http://qa.debian.org/data/debcheck/result
118 hertzog 2383 #nice_wget $DCROOT/oldstable/lists/ALL-pkglist debcheck-oldstable
119 jeroen 914 nice_wget $DCROOT/stable/lists/ALL-pkglist debcheck-stable
120     nice_wget $DCROOT/testing/lists/ALL-pkglist debcheck-testing
121     nice_wget $DCROOT/unstable/lists/ALL-pkglist debcheck-unstable
122 hertzog 344
123 zack 2230 # Download the translation status of packages
124     nice_wget http://i18n.debian.net/l10n-pkg-status/pkglist l10n-status.txt
125 hertzog 479
126 jeroen 912 # Get wnpp information
127     nice_wget http://qa.debian.org/data/bts/wnpp_rm wnpp_rm
128 hertzog 560
129 hertzog 1049 # get patches from ubuntu
130 hertzog 1355 nice_wget http://patches.ubuntu.com/PATCHES patches.ubuntu
131 hertzog 2291 # get packages version in Ubuntu
132     nice_wget http://udd.debian.org/cgi-bin/ubuntupackages.cgi versions.ubuntu
133     # get bugs in Ubuntu
134     nice_wget http://udd.debian.org/cgi-bin/ubuntubugs.cgi bugs.ubuntu
135 hertzog 1049
136 zack 1750 # download LowThresholdNmu list
137     nice_wget 'http://wiki.debian.org/LowThresholdNmu?action=raw' \
138     low_threshold_nmu.txt
139    
140 zack 1866 # ongoing transitions
141     nice_wget http://ftp-master.debian.org/transitions.yaml \
142     transitions.yaml
143    
144 zack 1800 # download the list of packages indexed by svnbuildstat
145 hertzog 2286 #nice_wget http://svnbuildstat.debian.net/packages/flatlist \
146     # svnbuildstat_list.txt
147 zack 1800
148 zack 1823 # download DEHS (http://dehs.alioth.debian.org)
149     nice_wget http://dehs.alioth.debian.org/no_updated.txt \
150     dehs_out_of_date.txt
151     nice_wget http://dehs.alioth.debian.org/no_upstream.txt \
152     dehs_error.txt
153    
154 geissert 2277 # download list of security issues
155 geissert 2292 nice_wget http://security-tracker.debian.org/tracker/data/pts/1 \
156 geissert 2277 security_issues.txt
157    
158 zack 2224 # download NEW queue info
159     nice_wget http://ftp-master.debian.org/new.822 new.822
160    
161 zack 1950 # retrieve package descriptions from UDD
162 zack 2323 nice_wget http://qa.debian.org/data/pts/shortdesc.txt shortdesc.txt
163 zack 1950
164 geissert 2422 # download the Debian fonts review
165     nice_wget http://pkg-fonts.alioth.debian.org/review/debian-font-review.yaml debian-font-review.yaml
166    
167 hertzog 344 # What more ?
168    
169     # Decompress all files
170     for file in *.gz; do
171 jeroen 910 gzip -d -c $file > ${file%%.gz}.new
172     touch -r $file ${file%%.gz}.new
173 hertzog 2383 mv -f ${file%%.gz}.new ${file%%.gz}
174 hertzog 344 done
175    
176 jeroen 910 # vim: ts=8

Properties

Name Value
svn:eol-style native
svn:executable *
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.5