]> git.deb.at Git - deb/packages.git/commitdiff
Merge branch 'master' into archive-master
authorFrank Lichtenheld <frank@lichtenheld.de>
Thu, 11 Jun 2009 17:44:59 +0000 (19:44 +0200)
committerFrank Lichtenheld <frank@lichtenheld.de>
Thu, 11 Jun 2009 17:44:59 +0000 (19:44 +0200)
Conflicts:
config.sh.sed.in
cron.d/100syncarchive_backports
cron.d/100syncarchive_debports
cron.d/100syncarchive_m68k
lib/Deb/Versions.pm
lib/Packages/DoSearchContents.pm
lib/Packages/DoShow.pm
static/index.tmpl
templates/config.tmpl
templates/config/mirrors.tmpl

1  2 
bin/parse-packages
conf/apache.conf.sed.in
config.sh.sed.in
cron.d/100syncarchive
cron.d/120synctrans
lib/Deb/Versions.pm
lib/Packages/Dispatcher.pm
templates/config.tmpl
templates/html/download.tmpl

diff --combined bin/parse-packages
index 3f282a16a97fbd6702e2b76cfdfbfcbccd822020,6f89070915800afb508d1d56c70bab4e18f721f9..6dad93ea1f8b9cf6d06b17533838badc81858813
@@@ -85,8 -85,6 +85,8 @@@ for my $suite (@SUITES) 
                        $key =~ tr [A-Z] [a-z];
                        $data{$key} = $value;
                }
 +              # Skip broken debs
 +              next unless $data{architecture};
                # Skip double package
                next if exists($packages_all_db{"$data{'package'} $data{'architecture'} $data{'version'}"});
                # Skip arch:all for amd64 & debports, any non-redundancy is
                    foreach (@complete_tags) {
                        my ($facet, $tag) = split( /::/, $_, 2);
                        if ($tag =~ s/^\{(.+)\}$/$1/) {
+                           warn "pkg=$data{package} tags=$data{tag}\n" unless $facet && $tag;
                            foreach (split( /,/, $tag )) {
                                push @tags, "${facet}::$_";
                            }
                        } else {
+                           warn "pkg=$data{package} tags=$data{tag}\n" unless $facet && $tag;
                            push @tags, "${facet}::$tag";
                        }
                    }
diff --combined conf/apache.conf.sed.in
index a3eca9bc10a744d6a4fbba575ee5afdda5b0f960,b0b33e3fbb5c309ce35df5a65ca4bb53a3c220fa..7c78ef65150c468302410bfefa1cd96162bc1390
@@@ -8,7 -8,10 +8,7 @@@
  
    # Nice caching..
    ExpiresActive On
 -  ExpiresDefault "access plus 1 day"
 -  ExpiresByType image/gif  "modification plus 1 year"
 -  ExpiresByType image/jpeg "modification plus 1 year"
 -  ExpiresByType image/png  "modification plus 1 year"
 +  ExpiresDefault "access plus 1 year"
  
    # language stuff
    # you need to keep this in sync with lib/Packages/I18N/Locale.pm
     ErrorLog /var/log/apache2/%SITE%-error.log
     CustomLog /var/log/apache2/%SITE%-access.log combined
  
 -   Alias /cgi-bin/ %TOPDIR%/cgi-bin/
 +   ScriptAlias /cgi-bin/ %TOPDIR%/cgi-bin/
    
     PerlModule ModPerl::Registry
     PerlTaintCheck On
 -   PerlRequire %TOPDIR%/bin/mod_perl-startup
 +#   PerlRequire %TOPDIR%/bin/mod_perl-startup
     PerlSwitches -T
     <Location /cgi-bin/>
 -      SetHandler perl-script
 -      PerlInitHandler Apache2::Reload
 -      PerlHandler ModPerl::Registry
 +#      SetHandler perl-script
 +#      PerlInitHandler Apache2::Reload
 +#      PerlHandler ModPerl::Registry
        Options +ExecCGI
 -      PerlSendHeader On
 +#      PerlSendHeader On
        allow from all
     </Location>
  
     RewriteRule ^/changelog:(.+)$      /changelogs/${changelog-url:$1} [R,L,NE]
     RewriteRule ^/src:([^/]+)$         /search?searchon=sourcenames&keywords=$1 [R,L,NE]
     RewriteRule ^/file:(.+)$           /search?searchon=contents&keywords=$1 [R,L,NE]
-    RewriteCond %{REQUEST_URI} !^/search$ [OR]
-    RewriteCond %{QUERY_STRING} ^$
+    RewriteCond %{QUERY_STRING} ^$ [OR]
+    RewriteCond %{REQUEST_URI} !^/search$
+    RewriteCond %{REQUEST_URI} !^/cgi-bin/search_(contents|packages)\.pl$
     RewriteRule ^/([^/]+)$             /search?keywords=$1 [R,L,NE]
  
     RewriteCond %{QUERY_STRING} =""
diff --combined config.sh.sed.in
index eb9615410326613f667318c728f68b06a08ca417,4e228e46d8171c9f5ffd69937eca7fd27b752355..50f6dc1cfdb868eb1c13c64d2a8c6f5518ae9b7a
@@@ -19,16 -19,17 +19,16 @@@ cachedir=${topdir}/cach
  # unset this if %SITE% moves somewhere where the packages files
  # cannot be obtained locally
  #
 -#localdir=/org/ftp.debian.org/debian
 +localdir=/srv/archive.debian.org/ftp
  
  # path to private ftp directory
  #ftproot=/org/ftp.root
  
 -ftpsite=http://ftp.de.debian.org/debian
 -security_ftpsite=http://security.debian.org/debian-security
 -volatile_ftpsite=http://volatile.debian.org/debian-volatile
 -backports_ftpsite=http://backports.org/debian
 -debports_ftpsite=http://ftp.debian-ports.org/debian
 -ddtp_ftpsite=
 +ftpsite=http://archive.debian.org/debian
 +security_ftpsite=http://archive.debian.org/debian-security
 +volatile_ftpsite=http://archive.debian.org/debian-volatile
 +backports_ftpsite=http://archive.debian.org/backports.org
 +ddtp_ftpsite=http://ftp.de.debian.org/debian
  
  wget_cmd="wget --no-verbose --tries=2 --timeout=60"
  check_release_cmd="perl -I${libdir} ${bindir}/check-release --verbose --ignoremissing --keyring ${configdir}/trusted.gpg"
@@@ -39,21 -40,22 +39,21 @@@ search_url="/search
  
  # Architectures
  #
- polangs="de fi fr hu ja nl ru sv uk zh-cn"
+ polangs="de fi fr hu ja nl ru sk sv uk zh-cn"
  ddtplangs="ca cs da de eo es eu fi fr hu it ja km ko nl pl pt pt-br ru sk sv uk zh zh-cn zh-tw"
 -archives="us security debports backports volatile"
 +archives="us security backports volatile"
  sections="main contrib non-free"
  parts="$sections"
 -suites="etch etch-m68k etch-volatile etch-backports lenny lenny-volatile lenny-backports squeeze sid experimental"
 +suites="bo hamm slink potato woody sarge sarge-volatile sarge-backports"
  priorities="required important standard optional extra"
  dists="$suites"
 -architectures="alpha amd64 arm armel avr32 hppa hurd-i386 i386 ia64 kfreebsd-i386 kfreebsd-amd64 m68k mips mipsel powerpc s390 sparc"
 -arch_etch="alpha amd64 arm hppa i386 ia64 mips mipsel powerpc s390 sparc"
 -arch_lenny="${arch_etch} armel"
 -arch_squeeze="alpha amd64 armel hppa i386 ia64 mips mipsel powerpc s390 sparc"
 -arch_sid="${arch_squeeze} avr32 hurd-i386 kfreebsd-i386 kfreebsd-amd64 m68k"
 -arch_experimental="${arch_sid}"
 -arch_lenny_proposed_updates="${arch_lenny}"
 -arch_etch_proposed_updates="${arch_etch}"
 +architectures="alpha arm hppa i386 ia64 m68k mips mipsel powerpc s390 sparc"
 +arch_bo="i386"
 +arch_hamm="i386 m68k"
 +arch_slink="alpha i386 m68k sparc"
 +arch_potato="alpha arm i386 ia64 m68k powerpc sparc"
 +arch_woody="alpha arm hppa i386 ia64 m68k mips mipsel powerpc s390 sparc"
 +arch_sarge="${arch_woody}"
  
  # Miscellaneous
  #
diff --combined cron.d/100syncarchive
index e57ed70007613000c205802717c5e7ba89df0fc5,d8b9f79bc28b8248fd63b67c1c2af7d6068bd5e1..52315086caf915ea62a04bb1b84c2e0a10f1d863
@@@ -21,8 -21,6 +21,6 @@@ the
        foo=\$arch_${dist//-/_}
        for arch in `eval echo $foo`
        do
-           test ! "$arch" = "kfreebsd-i386" || continue
-           test ! "$arch" = "kfreebsd-amd64" || continue
            for part in ${parts}
            do
                echo retrieve Packages $dist/$part/$arch
@@@ -31,7 -29,6 +29,6 @@@
                    $wget_cmd -N ${ftpsite}/dists/${dist}/${part}/binary-${arch}/Packages.gz)
            done
            #FIXME: no Contents files for p-u
-           test ! "$dist" = "experimental" || continue
            echo retrieve Contents $dist/$arch
            (cd us/${dist} &&
                $wget_cmd -N ${ftpsite}/dists/${dist}/Contents-${arch}.gz)
@@@ -58,8 -55,6 +55,6 @@@ els
        foo=\$arch_${dist//-/_}
        for arch in `eval echo $foo`
        do
-           test ! "$arch" = "kfreebsd-i386" || continue
-           test ! "$arch" = "kfreebsd-amd64" || continue
            for part in ${parts}
            do
                echo retrieve Packages $dist/$part/$arch
@@@ -68,7 -63,6 +63,6 @@@
                    us/${dist}/${part}/binary-${arch}/Packages.gz
            done
            #FIXME: no Contents files for p-u
-           test ! "$dist" = "experimental" || continue
            echo retrieve Contents $dist/$arch
            rsync -t ${localdir}/dists/${dist}/Contents-${arch}.gz \
                us/${dist}/Contents-${arch}.gz
@@@ -87,7 -81,7 +81,7 @@@ f
  
  # security archive
  #
 -for dist in etch lenny
 +for dist in slink potato woody sarge
  do
      echo "retrieve Release(.gpg) $dist"
      test -d security/${dist} || mkdir -p security/${dist}
diff --combined cron.d/120synctrans
index 705d7d097952d67ed5f8ffbcdb90f8245b454f75,bd3e31d17dba8239e059f42cce995e952b897323..c0813c93f5592939e28ce1eb927ca9c6b943ccb6
@@@ -12,7 -12,7 +12,7 @@@ the
        ddtp_ftpsite="$ftpsite"
      fi
      echo using remote mirror $ddtp_ftpsite
 -    for dist in $dists
 +    for dist in sid
      do
        for part in main
        do
            locale=$(echo $lang|perl -p -e 's/^([a-z]{2})-([a-z]{2})$/"$1_".uc($2)/e')
            echo "retrieve translated Descs $dist/$part/$lang ($locale)"
              (cd us/${dist}/${part}/i18n &&
-                 $wget_cmd -N ${ddtp_ftpsite}/dists/${dist}/${part}/i18n/Translation-$locale.gz)
+                 $wget_cmd -N ${ddtp_ftpsite}/dists/${dist}/${part}/i18n/Translation-$locale.bz2)
          done
        done
      done
  else
      echo using local mirror
 -    for dist in $dists
 +    for dist in sid
      do
        for part in main
        do
@@@ -37,8 -37,8 +37,8 @@@
          do
            locale=$(echo $lang|perl -p -e 's/^([a-z]{2})-([a-z]{2})$/"$1_".uc($2)/e')
            echo "retrieve translated Descs $dist/$part/$lang ($locale)"
-             rsync -t ${localdir}/dists/${dist}/${part}/i18n/Translation-$locale.gz \
-               us/${dist}/${part}/i18n/Translation-$locale.gz
+             rsync -t ${localdir}/dists/${dist}/${part}/i18n/Translation-$locale.bz2 \
+               us/${dist}/${part}/i18n/Translation-$locale.bz2
          done
        done
      done
diff --combined lib/Deb/Versions.pm
index eb83819b7e4794ab4efa0c40357dbbb304b9a9f9,774c9b51ec886bd257421f84b4f8d7e20392370f..9c50a4c36407205d916480da8cbaebff3c2914a9
@@@ -70,11 -70,12 +70,12 @@@ our @EXPORT = qw( version_cmp version_s
  
  our $VERSION = v1.0.0;
  
- sub version_cmp {
+ my $re = qr/^(?:(\d+):)?([\w.+:~-]+?)(?:-([\w+.~]+))?$/;
+ sub version_cmp_pp {
+     return 0 if $_[0] eq $_[1];
      my ( $ver1, $ver2 ) = @_;
  
      my ( $e1, $e2, $u1, $u2, $d1, $d2 );
-     my $re = qr/^(?:(\d+):)?([\w.+:~-]+?)(?:-([\w+.~]+))?$/;
      if ( $ver1 =~ $re ) {
        ( $e1, $u1, $d1 ) = ( $1, $2, $3 );
        $e1 ||= 0;
      return $res;
  }
  
+ *version_cmp = \&version_cmp_pp;
+ eval {
+     require AptPkg::Config;
+     require AptPkg::System;
+     require AptPkg::Version;
+     
+     $AptPkg::Config::_config->init;
+     $AptPkg::System::_system = $AptPkg::Config::_config->system;
+     my $apt_ver = $AptPkg::System::_system->versioning;
+     *version_cmp = sub { return $apt_ver->compare(@_) };
+ };
  sub version_sort {
      return sort { version_cmp( $b, $a ) } @_;
  }
@@@ -152,11 -165,16 +165,16 @@@ sub _lcmp 
      return length( $v1 ) <=> length( $v2 );
  }
  
- our @SUITES_SORT = qw( bo hamm slink potato woody
-                      oldstable sarge stable stable-proposed-updates
-                      etch etch-m68k testing testing-proposed-updates lenny
-                      sid unstable experimental
-                      warty hoary breezy dapper edgy feisty gutsy intrepid jaunty);
 -our @SUITES_SORT = qw(  woody
++our @SUITES_SORT = qw(  bo hamm slink potato woody
+                       sarge
+                       oldstable
+                       etch etch-m68k
+                       stable stable-proposed-updates
+                       lenny
+                       testing testing-proposed-updates
+                       squeeze
+                       sid unstable experimental
+                       warty hoary breezy dapper edgy feisty gutsy hardy intrepid jaunty);
  our @ARCHIVE_SORT = qw( non-US security updates volatile backports );
  our @PRIORITY_SORT = qw( required important standard optional extra );
  my $i = 1000;
index 0856ef4e4d9a458e00bb0a3a8ffd7b30ec6b5409,484e222f02bd0e433038c329309fa240a2119beb..a46b2d54e4ad637c0fbc43f1d4f34bceb256402b
@@@ -64,11 -64,12 +64,12 @@@ sub do_dispatch 
      delete $ENV{'LC_ALL'};
      delete $ENV{'LC_MESSAGES'};
  
-     my %SUITES_ALIAS = ( #oldstable => 'sarge',
-                        stable => 'etch',
-                        testing => 'lenny',
+     my %SUITES_ALIAS = ( oldstable => 'etch',
+                        stable => 'lenny',
+                        testing => 'squeeze',
                         unstable => 'sid',
-                        '4.0' => 'etch' );
+                        '4.0' => 'etch',
+                        '5.0' => 'lenny' );
  
      # Read in all the variables set by the form
      my $input;
@@@ -93,7 -94,7 +94,7 @@@
      &Packages::DB::init();
      my $last_modified = $Packages::DB::db_read_time;
      my $now = time;
 -    my $expires = $last_modified + (12*3600);
 +    my $expires = $last_modified + (365*24*3600);
      $expires = $now + 3600 if $expires < $now;
      # allow some fudge, since the db mod time is not the end of
      # the cron job
diff --combined templates/config.tmpl
index 50d7b75057a441c68daecc1b413a9b0aa2af9a70,77e6db13984fe4f7fbb116c57f29f702b771e852..828a1c8698ece0708c10519e71e3442070423c6d
@@@ -5,7 -5,8 +5,8 @@@
  
     organisation = 'Debian'
     project_homepage = 'http://www.debian.org/'
-    packages_homepage = 'http://archive.debian.net/'
+    packages_homepage = '/'
 -   packages_homepage_abs = 'http://packages.debian.net/'
++   packages_homepage_abs = 'http://archive.debian.net/'
     searchformurl = packages_homepage
     search_url = '/search'
     tags_url = 'http://debtags.alioth.debian.org/'
     security_mirror = 'security.debian.org'
     security_mirror_url = security_mirror _ '/debian-security'
     security_suite_suffix = '/updates'
 -   changelogs_url = 'http://packages.debian.org/changelogs/'
 +   changelogs_url = 'http://archive.debian.net/changelogs/'
     policy_url = 'http://www.debian.org/doc/debian-policy/'
     cn_help_url = project_homepage _ 'intro/cn'
 -   patch_tracking_url = 'http://patch-tracking.debian.net/package'
 +#   patch_tracking_url = 'http://patch-tracking.debian.net/package'
     logo = {
        url => project_homepage,
          src => '/Pics/openlogo-nd-25.png',
        url => project_homepage _ 'trademark'
     }
     contact = {
 -      name => g('Debian Web Mailinglist'),
 -      mail => 'debian-www@lists.debian.org',
 +      name => 'Frank Lichtenheld',
 +      mail => 'djpig@debian.org',
          url => project_homepage _ 'contact',
     }
     admin = {
 -      name => g('%s Webmaster', organisation),
 -      mail => 'webmaster@debian.org',
 +      name => 'Frank Lichtenheld',
 +      mail => 'djpig@debian.org',
     }
     trademarknotes = g('%s is a <a href="%s">trademark</a> of %s', organisation, trademark.url, trademark.name)
- #   sponsor = {
- #     url => 'http://example.invalid/',
- #     name => 'Example Sponsor, Inc.',
- #   }
+    sponsors = [
+    {
+       url => 'http://example.invalid/',
+       name => 'Example Sponsor, Inc.',
+    },
+    {
+       url => 'http://example2.invalid/',
+       name => 'Example2 Sponsor, Inc.',
+    },
+    ]
  -%]
  [%-
     # possible values for importance: high, normal, low
 +   #sitewidemsg = { importance => "high",
 +   #             txt => g('Please note that this is an experimental version of <a href="http://%s/">%s</a>. Errors and obsolete information should be expected', 'packages.debian.org', 'packages.debian.org') }
     sitewidemsg = { importance => "high",
 -                 txt => g('Please note that this is an experimental version of <a href="http://%s/">%s</a>. Errors and obsolete information should be expected', 'packages.debian.org', 'packages.debian.org') }
 +                 txt => g('Please note that this site contains information about obsolete %s releases; if you search for current data, please use <a href="http://%s/">%s</a>.', organisation, 'packages.debian.org', 'packages.debian.org') }
  -%]
  [%# @translators: . = decimal_point , = thousands_sep, see Number::Format %]
  [%- USE num = Number.Format( decimal_point => g('.'),
index 07e36110207df14fa8bb3d51d06e3fb16a67fcb6,01dd76a654fc007aac2e93b5e2143668fd53f847..d1dfbc372c17162a9158804d5071c6271e6b56b9
@@@ -94,7 -94,7 +94,7 @@@ deb http://<em>[% mirrors.$archive.euro
  [% IF port.url_name;
     SET port.url = ports_url _ port.url_name _ '/';
     END -%]
- <p style="clear:both">[% g('Note that %s is not officially included in the %s archive yet, but the %s porter group keeps their archive in sync with the official archive as close as possible. See the <a href="%s">%s ports page</a> for current information.',
+ <p style="clear:both">[% g('Note that %s is not officially included in the %s archive, but the %s porter group keeps their archive in sync with the official archive as close as possible. See the <a href="%s">%s ports page</a> for current information.',
        port.name, organisation, port.name, port.url, port.name) %]</p>
  [% END %]
  
  <table id="pdownloadmeta">
  <tr><th>[% g('Exact Size') %]</th>    <td class="size">[% g('%s Byte (%s %s)', size, num.format_number(pkgsize,1), pkgsize_unit) %]</td>
  <tr><th>[% g('MD5 checksum') %]</th>  <td><tt>[% md5sum %]</tt></td>
 -<tr><th>[% g('SHA1 checksum') %]</th> <td><tt>[% sha1 || g('Not Available') %]</tt></td>
 -<tr><th>[% g('SHA256 checksum') %]</th>       <td><tt>[% sha256  || g('Not Available') %]</tt></td>
 +<!-- <tr><th>[% g('SHA1 checksum') %]</th>    <td><tt>[% sha1 || g('Not Available') %]</tt></td>
 +<tr><th>[% g('SHA256 checksum') %]</th>       <td><tt>[% sha256  || g('Not Available') %]</tt></td> -->
  </table>
  
  [%- PROCESS 'html/foot.tmpl' page_name="$pkg/download" -%]