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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 566 by hertzog, Fri Apr 25 13:49:25 2003 UTC revision 2286 by hertzog, Mon Sep 28 06:56:34 2009 UTC
# Line 1  Line 1 
1  #!/bin/sh  #!/bin/sh
2    
3  # Copyright 2002 Raphaël Hertzog  # Copyright: © 2002-2008 Raphaël Hertzog
4    # Copyright: © 2007-2009 Stefano Zacchiroli <zack@debian.org>
5    
6  # This file is distributed under the terms of the General Public License  # This file is distributed under the terms of the General Public License
7  # version 2 or (at your option) any later version.  # version 2 or (at your option) any later version.
8    
9  mirror="http://gluck.debian.org/debian"  #mirror="http://gluck.debian.org/debian"
10  nonus="http://non-us.debian.org/debian-non-US"  mirror="http://ftp.us.debian.org/debian"
11  wgetopt="-t 5 -q -N"  security="http://security.debian.org"
12    volatile="http://volatile.debian.org"
13    piuparts="http://piuparts.debian.org"
14    
15    official_distros="oldstable stable testing unstable experimental"
16    pu_distros="stable-proposed-updates testing-proposed-updates"
17    security_distros="oldstable stable"
18    
19    umask 002
20    set -e
21    
22  if [ -d "../incoming" ]; then  if [ -d "../incoming" ]; then
23      root=$PWD/..      root=$PWD/..
# Line 21  cd $root/incoming Line 32  cd $root/incoming
32  nice_wget() {  nice_wget() {
33      # $1: url      # $1: url
34      # $2: filename      # $2: filename
35      file=`basename $1`      # For timestamping to work, copy to .new (not link, wget will not break
36      if [ -e "$2" ]; then      # the link)
37          cp -a $2 $file      cp -a $2 $2.new || true
38        # Beware that -N conflicts with -O (#88176, #202911)
39        if wget -U pts -q -O $2.new "$1" ; then
40            mv $2.new $2
41        else
42            echo "Downloading $1 failed, $2 is stale now"
43            rm -f $2.new
44      fi      fi
45      wget $wgetopt $1  }
46      mv $file $2  
47    http_head() {
48        # $1: url
49        # return 0 if the URL exists (HEAD was OK), non-0 otherwise
50        curl --head --fail --silent "$1" > /dev/null
51        return $?
52    }
53    
54    nice_redirect_to() {
55      # $1 : target file
56      # $2-... : shell command
57      dest="$1"
58      shift
59      if [ -f "$dest" ] ; then
60        mv "$dest" "$dest.bak"
61      fi
62      $* > "$dest" || (echo "Failure while executing $* . Continuing ..." ; cp "$dest.bak" "$dest")
63  }  }
64    
65  # Download all Sources.gz  # Download all Sources.gz
66  for comp in main contrib non-free  for comp in main contrib non-free
67  do  do
68      for dist in stable testing unstable      for dist in $official_distros ; do
69      do        nice_wget $mirror/dists/$dist/$comp/source/Sources.gz \
70          nice_wget $mirror/dists/$dist/$comp/source/Sources.gz \          Sources-${dist}_$comp.gz
71              Sources_${dist}_$comp.gz      done
72          nice_wget $nonus/dists/$dist/non-US/$comp/source/Sources.gz \      for dist in $pu_distros ; do
73              Sources-nonus_${dist}_$comp.gz        nice_wget $mirror/dists/$dist/$comp/source/Sources.gz \
74            Sources-${dist}_$comp.gz
75      done      done
76      nice_wget $mirror/project/experimental/$comp/source/Sources.gz \      for dist in $security_distros ; do
77          Sources-experimental_$comp.gz        nice_wget $security/dists/$dist/updates/$comp/source/Sources.gz \
78      nice_wget $mirror/dists/stable-proposed-updates/$comp/source/Sources.gz \          Sources-security-${dist}_$comp.gz
79          Sources-spu_$comp.gz      done
80      nice_wget $mirror/dists/testing-proposed-updates/$comp/source/Sources.gz \      nice_wget $volatile/debian-volatile/dists/stable/volatile/$comp/source/Sources.gz \
81          Sources-tpu_$comp.gz          Sources-volatile_$comp.gz
82      nice_wget $nonus/dists/stable-proposed-updates/non-US/$comp/source/Sources.gz \  done
83          Sources-nonus-spu_$comp.gz  
84      nice_wget $nonus/dists/testing-proposed-updates/non-US/$comp/source/Sources.gz \  # Download mentors.d.n Sources
85          Sources-nonus-tpu_$comp.gz  for comp in main contrib non-free
86      nice_wget http://security.debian.org/dists/stable/updates/$comp/source/Sources.gz \  do
87          Sources-security-stable_$comp.gz    nice_wget http://mentors.debian.net/debian/dists/unstable/$comp/source/Sources.gz \
88      nice_wget http://security.debian.org/dists/testing/updates/$comp/source/Sources.gz \      Sources-mentors_$comp.gz
         Sources-security-testing_$comp.gz  
89  done  done
90    
91  # Download update_excuses.html  # Download update_excuses.html
92  wget $wgetopt http://ftp-master.debian.org/testing/update_excuses.html.gz  nice_wget http://ftp-master.debian.org/testing/update_excuses.html.gz \
93        update_excuses.html.gz
94    
95  # Download PTS subscription count  # Download PTS subscription count
96  wget $wgetopt http://master.debian.org/~hertzog/pts/count.txt  nice_wget http://packages.qa.debian.org/data/pts-subscription-count.txt \
97      count.txt
98    
99    # Download override disparities
100    nice_wget http://qa.debian.org/data/ftp/override-disparities.unstable \
101        override-disparities.unstable
102    nice_wget http://qa.debian.org/data/ftp/override-disparities.experimental \
103        override-disparities.experimental
104    
105    # Download lintian.d.o run info
106    #nice_wget http://lintian.debian.org/lintian.log lintian.log
107    nice_wget http://lintian.debian.org/qa-list.txt lintian.qa-list.txt
108    
109  # Download bugs summary  # Download bugs summary
110  wget $wgetopt http://master.debian.org/~hertzog/pts/bugs.txt  nice_wget http://udd.debian.org/cgi-bin/bugs-binpkgs-pts.cgi bugs.txt
111  wget $wgetopt http://master.debian.org/~hertzog/pts/sources  nice_wget http://udd.debian.org/cgi-bin/ddpo-bugs.cgi bugs-src.txt
112  cut -f1,3 sources >sources.new  nice_wget http://qa.debian.org/data/bts/sources sources
113  touch -r sources sources.new  cut -f1,3 sources >sources.map.new
114  mv sources.new sources  touch -r sources sources.map.new
115    mv sources.map.new sources.map
116    nice_redirect_to bugs.help.txt $root/bin/tagged_bugs.py "help"
117    nice_redirect_to bugs.gift.txt \
118      $root/bin/tagged_bugs.py "gift" "debian-qa@lists.debian.org"
119    piuparts_distros="sid"
120    for distro in $piuparts_distros ; do
121      nice_wget $piuparts/$distro/sources.txt piuparts-$distro.txt
122    done
123    
124  # Download debcheck lists  # Download debcheck lists
125  nice_wget http://qa.debian.org/~weasel/debcheck-result/stable/lists/ALL-pkglist \  DCROOT=http://qa.debian.org/data/debcheck/result
126      debcheck-stable  nice_wget $DCROOT/oldstable/lists/ALL-pkglist debcheck-oldstable
127  nice_wget http://qa.debian.org/~weasel/debcheck-result/testing/lists/ALL-pkglist \  nice_wget $DCROOT/stable/lists/ALL-pkglist debcheck-stable
128      debcheck-testing  nice_wget $DCROOT/testing/lists/ALL-pkglist debcheck-testing
129  nice_wget http://qa.debian.org/~weasel/debcheck-result/unstable/lists/ALL-pkglist \  nice_wget $DCROOT/unstable/lists/ALL-pkglist debcheck-unstable
130      debcheck-unstable  
131    # Download the translation status of packages
132  # Download the list of packages with debconf templates  nice_wget http://i18n.debian.net/l10n-pkg-status/pkglist l10n-status.txt
133  nice_wget http://ddtp.debian.org/cgi-bin/debconf_list.cgi debconf-list  
134    # Get wnpp information
135  # Get wnpp information (and parse it) [PvR]  nice_wget http://qa.debian.org/data/bts/wnpp_rm wnpp_rm
136  wget $wgetopt -O wnpp.html "http://bugs.debian.org/cgi-bin/pkgreport.cgi?which=pkg&data=wnpp&archive=no&pend-exc=done"  
137  ../bin/parse-wnpp.pl < wnpp.html > wnpp.txt  # get patches from ubuntu
138    nice_wget http://patches.ubuntu.com/PATCHES patches.ubuntu
139    # get packages version in Ubuntu (preprocessed by Lucas on merkel)
140    nice_wget http://qa.debian.org/~lucas/ubuntu/sources-versions.txt \
141      versions.ubuntu
142    # get bugs in Ubuntu (preprocessed by Lucas on merkel)
143    nice_wget http://qa.debian.org/~lucas/ubuntu/ubuntu-bugs.txt bugs.ubuntu
144    
145    # download LowThresholdNmu list
146    nice_wget 'http://wiki.debian.org/LowThresholdNmu?action=raw' \
147        low_threshold_nmu.txt
148    
149    # ongoing transitions
150    nice_wget http://ftp-master.debian.org/transitions.yaml \
151        transitions.yaml
152    
153    # download the list of packages indexed by svnbuildstat
154    #nice_wget http://svnbuildstat.debian.net/packages/flatlist \
155    #    svnbuildstat_list.txt
156    
157    # download DEHS (http://dehs.alioth.debian.org)
158    nice_wget http://dehs.alioth.debian.org/no_updated.txt \
159        dehs_out_of_date.txt
160    nice_wget http://dehs.alioth.debian.org/no_upstream.txt \
161        dehs_error.txt
162    
163    # download list of security issues
164    nice_wget http://alioth.debian.org/~geissert/security-packages.txt \
165        security_issues.txt
166    
167    # download NEW queue info
168    nice_wget http://ftp-master.debian.org/new.822 new.822
169    
170    # retrieve package descriptions from UDD
171    #nice_redirect_to shortdesc.txt $root/bin/retrieve_shortdesc.sh
172    nice_wget http://master.debian.org/~zack/pts/shortdesc.txt shortdesc.txt
173    
174  # What more ?  # What more ?
175    
176  # Decompress all files  # Decompress all files
177  for file in *.gz; do  for file in *.gz; do
178      gzip -d -c $file > ${file%%.gz}      gzip -d -c $file > ${file%%.gz}.new
179        touch -r $file ${file%%.gz}.new
180        mv ${file%%.gz}.new ${file%%.gz}
181  done  done
182    
183    # vim: ts=8

Legend:
Removed from v.566  
changed lines
  Added in v.2286

  ViewVC Help
Powered by ViewVC 1.1.5