From d833a5eed5296d1a24c35e8f0802f8291037198d Mon Sep 17 00:00:00 2001 From: Frank Lichtenheld Date: Tue, 11 Sep 2007 17:02:41 +0200 Subject: [PATCH 01/16] Comment clean-up: Remove $Id$, fix FSF address, copyright years - Remove $Id$ since we don't use them with git - Fix some old (and some really old) references to the FSF address - Update some copyright years - Add myself to some files as copyright holder --- BACKEND | 2 -- URLS | 2 -- bin/build-maintainerdb | 4 +--- bin/daily | 2 +- bin/extract_files | 4 ++-- bin/parse-contents | 4 +--- bin/parse-debtags-voc | 4 +--- bin/parse-packages | 6 +++--- bin/parse-sources | 4 +--- bin/parse-translations | 5 ++--- cron.d/010git | 2 +- lib/Deb/Versions.pm | 3 +-- lib/Packages/Dispatcher.pm | 2 +- lib/Packages/I18N/LanguageNames.pm | 2 -- lib/Packages/I18N/Languages.pm | 2 -- lib/Packages/Search.pm | 6 +++--- 16 files changed, 18 insertions(+), 36 deletions(-) diff --git a/BACKEND b/BACKEND index 11f1409..7c87b1c 100644 --- a/BACKEND +++ b/BACKEND @@ -1,5 +1,3 @@ -$Id$ - Most package data is available via sleepycat databases. Those have been specifically crafted for efficient lookup, and reasonable times to generate them, so that both the daily cronjobs and the actual pagerequests take only a diff --git a/URLS b/URLS index 359730d..418e033 100644 --- a/URLS +++ b/URLS @@ -1,5 +1,3 @@ -$Id$ - Proposal for URL layout $ROOT/search <- search handling diff --git a/bin/build-maintainerdb b/bin/build-maintainerdb index 1978854..9125664 100755 --- a/bin/build-maintainerdb +++ b/bin/build-maintainerdb @@ -15,9 +15,7 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -# $Id$ +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # Todo: # . Read maintainer changes from overrides file(s), need to rub diff --git a/bin/daily b/bin/daily index 0a67587..2c54efe 100755 --- a/bin/daily +++ b/bin/daily @@ -14,7 +14,7 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # Should run after the mirror pulse. The mirror tends to finish by # the ctime of rsync.log.* in ~archvsync. diff --git a/bin/extract_files b/bin/extract_files index d6da82c..3bfc559 100755 --- a/bin/extract_files +++ b/bin/extract_files @@ -1,7 +1,7 @@ #!/usr/bin/perl # # Script to extract files from Debian packages -# Copyright 2004 Frank Lichtenheld +# Copyright 2004-2007 Frank Lichtenheld # # based on a shell script which was # Copyright 2003 Noel Köthe @@ -19,7 +19,7 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. use strict; use warnings; diff --git a/bin/parse-contents b/bin/parse-contents index 767aad4..36c90b1 100755 --- a/bin/parse-contents +++ b/bin/parse-contents @@ -2,8 +2,6 @@ # Convert Contents.gz files into Sleepycat db files for efficient usage of # data # -# $Id$ -# # Copyright (C) 2006 Jeroen van Wolffelaar # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -17,7 +15,7 @@ # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. use strict; use lib './lib'; diff --git a/bin/parse-debtags-voc b/bin/parse-debtags-voc index 4caf0b0..85649a6 100755 --- a/bin/parse-debtags-voc +++ b/bin/parse-debtags-voc @@ -1,8 +1,6 @@ #!/usr/bin/perl -w # Convert Debtags vocabulary.gz files into Sleepycat db files # -# $Id: parse-packages 227 2006-11-12 20:24:48Z djpig $ -# # Copyright (C) 2006 Frank Lichtenheld # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -16,7 +14,7 @@ # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. use strict; use warnings; diff --git a/bin/parse-packages b/bin/parse-packages index 64c690d..6e27c3a 100755 --- a/bin/parse-packages +++ b/bin/parse-packages @@ -2,9 +2,9 @@ # Convert Packages.gz files into Sleepycat db files for efficient usage of # data # -# $Id$ -# # Copyright (C) 2006 Jeroen van Wolffelaar +# Copyright (C) 2006-2007 Frank Lichtenheld +# # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or @@ -17,7 +17,7 @@ # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. use strict; use warnings; diff --git a/bin/parse-sources b/bin/parse-sources index 5a9073a..da49d6a 100755 --- a/bin/parse-sources +++ b/bin/parse-sources @@ -2,8 +2,6 @@ # Convert Sources.gz files into Sleepycat db files for efficient usage of # data # -# $Id$ -# # Copyright (C) 2006 Jeroen van Wolffelaar # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -17,7 +15,7 @@ # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. use strict; use lib './lib'; diff --git a/bin/parse-translations b/bin/parse-translations index fa9855d..0958204 100755 --- a/bin/parse-translations +++ b/bin/parse-translations @@ -2,9 +2,8 @@ # Convert Translation.gz files into Sleepycat db files for efficient usage of # data # -# $Id$ -# # Copyright (C) 2006 Jeroen van Wolffelaar +# Copyright (C) 2007 Frank Lichtenheld # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or @@ -17,7 +16,7 @@ # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. use strict; use warnings; diff --git a/cron.d/010git b/cron.d/010git index 7a18d6d..fd91aab 100755 --- a/cron.d/010git +++ b/cron.d/010git @@ -15,7 +15,7 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. . `dirname $0`/../config.sh diff --git a/lib/Deb/Versions.pm b/lib/Deb/Versions.pm index fcc8e31..d8d8282 100644 --- a/lib/Deb/Versions.pm +++ b/lib/Deb/Versions.pm @@ -1,6 +1,5 @@ # # Deb::Versions -# $Id$ # # Copyright 2003, 2004 Frank Lichtenheld # @@ -16,7 +15,7 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # =head1 NAME diff --git a/lib/Packages/Dispatcher.pm b/lib/Packages/Dispatcher.pm index 26437fe..e2b64ad 100755 --- a/lib/Packages/Dispatcher.pm +++ b/lib/Packages/Dispatcher.pm @@ -15,7 +15,7 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. package Packages::Dispatcher; diff --git a/lib/Packages/I18N/LanguageNames.pm b/lib/Packages/I18N/LanguageNames.pm index d414e47..8798f49 100644 --- a/lib/Packages/I18N/LanguageNames.pm +++ b/lib/Packages/I18N/LanguageNames.pm @@ -1,5 +1,3 @@ -# $Id$ -# # Taken from the webwml CVS tree (english/templates/language_names.wml) package Packages::I18N::LanguageNames; diff --git a/lib/Packages/I18N/Languages.pm b/lib/Packages/I18N/Languages.pm index 9f30453..f13ac2f 100644 --- a/lib/Packages/I18N/Languages.pm +++ b/lib/Packages/I18N/Languages.pm @@ -1,5 +1,3 @@ -# $Id$ -# # Taken from the webwml CVS tree (english/templates/languages.wml) package Packages::I18N::Languages; diff --git a/lib/Packages/Search.pm b/lib/Packages/Search.pm index 6c0d799..ebb1b7d 100644 --- a/lib/Packages/Search.pm +++ b/lib/Packages/Search.pm @@ -1,8 +1,8 @@ # # Packages::Search # -# Copyright (C) 2004-2006 Frank Lichtenheld -# +# Copyright (C) 2004-2007 Frank Lichtenheld +# # The code is based on the old search_packages.pl script that # was: # @@ -23,7 +23,7 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # =head1 NAME -- 2.39.2 From 481894d0140e4c0ce1b1e4b339cec691837b5ac5 Mon Sep 17 00:00:00 2001 From: Frank Lichtenheld Date: Tue, 11 Sep 2007 17:19:53 +0200 Subject: [PATCH 02/16] html/show.tmpl: Always use
    for Maintainers Even if we only have one. Just makes for a more consistent display. --- templates/html/show.tmpl | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/templates/html/show.tmpl b/templates/html/show.tmpl index aa3435f..544fe2e 100644 --- a/templates/html/show.tmpl +++ b/templates/html/show.tmpl @@ -101,20 +101,16 @@ [% IF maintainers.size == 1 -%]

    Maintainer:

    - [%- FOREACH maintainers -%] - [% name | html %] - (QA Page) - [%- END -%] [%- ELSE -%]

    Maintainers:

    - [%- FOREACH maintainers -%] - [%- '
      ' IF loop.first -%] +[%- END %] +[%- FOREACH maintainers -%] + [%- '' IF loop.last -%] - [%- END -%] -[%- END %] + [%- '
    ' IF loop.last -%] +[%- END -%] [% url = page.get_newest('url'); url = page.get_newest('homepage'); -- 2.39.2 From 9ee3fd3aa184ba974be690d0834883c54986986f Mon Sep 17 00:00:00 2001 From: Frank Lichtenheld Date: Tue, 11 Sep 2007 17:24:21 +0200 Subject: [PATCH 03/16] html/show.tmpl: Improve display of VCS-* information Suggested by Joey Hess Move the detailed VCS-* links below the download table as these can get very long, and since the URIs can't be broken, this may make the sidebar very huge and ugly. Still leave the links available in the sidebar but don't display the URIs themselves. --- static/packages.css.sed.in | 2 +- templates/html/show.tmpl | 50 +++++++++++++++++++++++++------------- 2 files changed, 34 insertions(+), 18 deletions(-) diff --git a/static/packages.css.sed.in b/static/packages.css.sed.in index 1b2defe..2afe3f3 100644 --- a/static/packages.css.sed.in +++ b/static/packages.css.sed.in @@ -173,7 +173,7 @@ table#pdeplegend, #pdownload table { font-family: monospace; } #pdownload p { - display: inline; + margin-left: 1em; } #pdownloadnotes { diff --git a/templates/html/show.tmpl b/templates/html/show.tmpl index 544fe2e..07fefe7 100644 --- a/templates/html/show.tmpl +++ b/templates/html/show.tmpl @@ -1,5 +1,14 @@ [% PROCESS 'config/archive_layout.tmpl' %] [% PROCESS 'config/mirrors.tmpl' %] +[%- known_vcs = [ [ 'cvs', 'CVS', 'cvs' ], + [ 'svn', 'Subversion', 'subversion' ], + [ 'bzr', 'bzr', 'bzr' ], + [ 'darcs', 'Darcs', 'darcs' ], + [ 'arch', 'arch', 'tla' ], + [ 'git', 'Git', 'git-core' ], + [ 'hg', 'Hg', 'mercurial' ], ]; + vcs_link = page.get_newest("vcs-browser"); +-%] [%- nav_arr = [ { prefix=>'Distribution:', title=>'Overview over this suite', url=>make_url('/','','source',''), name=>suite }, ]; nav_arr.push( { title => 'Source packages', url=>make_url('/'), name=>'Source' } ) IF is_source; nav_arr.push( { prefix=>'Section:', title=>'All packages in this section', url=>make_url("$subsection/"), name=>subsection } ); @@ -65,27 +74,20 @@
  • Debian Changelog
  • Copyright File
  • [% END %] -
-[% vcs_link = page.get_newest("vcs-browser") %] -[% #FIXME: should this only be used for the PTS? - known_vcs = [ [ 'cvs', 'CVS', 'cvs' ], - [ 'svn', 'Subversion', 'subversion' ], - [ 'bzr', 'bzr', 'bzr' ], - [ 'darcs', 'Darcs', 'darcs' ], - [ 'arch', 'arch', 'tla' ], - [ 'git', 'Git', 'git-core' ], - [ 'hg', 'Hg', 'mercurial' ], ]; - FOREACH vcs IN known_vcs; +[% IF vcs_link %] +
  • Debian Source Repository +[%- FOREACH vcs IN known_vcs; vcs_id = vcs.0; vcs_name = vcs.1; vcs_pkg = vcs.2; vcs_info = page.get_newest("vcs-$vcs_id"); SET vcs_info = page.get_newest("x-vcs-$vcs_id") UNLESS vcs_info; - IF vcs_info; %] -

    Debian Package Repository (VCS: -[% vcs_name %]):
    [% vcs_info %]

    -[% IF vcs_link %] -

    Debian Package Repository (Browsable):
    [% vcs_link %]

    -[% END; END; END %] + IF vcs_info %] + ([% vcs_name %]) +[% END %] +
  • +[% END; END %] + + [% IF src %]

    Download Source Package [% src.pkg %]: @@ -314,6 +316,20 @@ Do not install it on a normal Debian system.

    [% IF loop.last -%] +[% FOREACH vcs IN known_vcs; + vcs_id = vcs.0; vcs_name = vcs.1; vcs_pkg = vcs.2; + vcs_info = page.get_newest("vcs-$vcs_id"); + SET vcs_info = page.get_newest("x-vcs-$vcs_id") UNLESS vcs_info; + IF vcs_info; %] +
    +
    Debian Package Source Repository (VCS: [% vcs_name %])
    +
    [% vcs_info %]
    +[% IF vcs_link %] +
    Debian Package Source Repository (Browsable)
    [% vcs_link %]
    +[% END %] +
    +[% END; END %] + [%- END %] [% END %] -- 2.39.2 From 82f5b69623337b547d7a08f4ae1858aa35784185 Mon Sep 17 00:00:00 2001 From: Frank Lichtenheld Date: Sun, 2 Sep 2007 23:44:30 +0000 Subject: [PATCH 04/16] html/show.tmpl: Disable experimental Javascript tabbing (cherry picked from commit b9b77c7ca23d56a4b43c4c497bc739a96ca504a6) --- templates/html/show.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/html/show.tmpl b/templates/html/show.tmpl index 07fefe7..794903a 100644 --- a/templates/html/show.tmpl +++ b/templates/html/show.tmpl @@ -334,6 +334,6 @@ Do not install it on a normal Debian system.

    [%- END %] [% END %] - +[%# %] [%- PROCESS 'html/foot.tmpl' -%] -- 2.39.2 From 49c1ca531e37bbe7bdf673502a2fde7e13012c5b Mon Sep 17 00:00:00 2001 From: Frank Lichtenheld Date: Tue, 11 Sep 2007 17:30:09 +0200 Subject: [PATCH 05/16] txt/index.tmpl: Add missing ']' --- templates/txt/index.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/txt/index.tmpl b/templates/txt/index.tmpl index 383c609..12e249c 100644 --- a/templates/txt/index.tmpl +++ b/templates/txt/index.tmpl @@ -6,7 +6,7 @@ Copyright (C) [% copyright.years %] [% copyright.name %]; See for the license terms. [% FOREACH packages -%] - [%- BLOCK marker %] [[% text %][% END -%] + [%- BLOCK marker %] [[% text %]][% END -%] [%- BLOCK markers -%] [%- PROCESS marker text=section IF section != main_section -%] [%- PROCESS marker text=archive IF archive != main_archive -%] -- 2.39.2 From 8393e1a5b250804d4a0a4cbb242021029b03fff4 Mon Sep 17 00:00:00 2001 From: Joerg Jaspert Date: Tue, 11 Sep 2007 17:36:46 +0200 Subject: [PATCH 06/16] build-maintainerdb: Send copy of mails to the PTS They go to the 'contact' keyword. Also disable the old short alias code. That produces mostly garbage addresses and isn't documented anyway. --- bin/build-maintainerdb | 104 ++++++++++++++++++++++++++++++++++------- 1 file changed, 87 insertions(+), 17 deletions(-) diff --git a/bin/build-maintainerdb b/bin/build-maintainerdb index 9125664..b64be00 100755 --- a/bin/build-maintainerdb +++ b/bin/build-maintainerdb @@ -2,6 +2,7 @@ # build-maintainerdb - convert several Packages files to maintainer database # Copyright (c) 1998,9,2001,3,4,6 Martin Schulze +# Copyright (C) 2007 Joerg Jaspert # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -23,6 +24,11 @@ use strict; use warnings; +use DB_File; + +use lib '../lib'; + +use Deb::Versions; # read the configuration if (!open (C, "../config.sh")) { @@ -36,14 +42,61 @@ while () { close (C); my $maildomain = "packages.debian.org"; +my $ptsdomain = "packages.qa.debian.org"; + -my $maintainerfile = "$topdir/archive/Maintainers"; +my $maintainerfile = "$topdir/../ftp.root/debian/indices/Maintainers"; my $maintainerdb = "$topdir/conf/maintainer"; my $overridefile = "$topdir/conf/maintainerdb.override"; my @postcall = ( "/usr/sbin/postmap", $maintainerdb ); my $opt_verbose = 0; +my $dbdir = "$topdir/files/db"; my %maint; +my %binsrc; + +# Lets take pdo database input files for the source mapping +sub read_bin_src_mapping +{ + tie my %src_packages, 'DB_File', "$dbdir/sources_small.db", + O_RDONLY, 0666, $DB_BTREE + or die "couldn't tie DB $dbdir/sources_small.db: $!"; + tie my %src2bin, 'DB_File', "$dbdir/sources_packages.db", + O_RDONLY, 0666, $DB_BTREE + or die "couldn't open $dbdir/sources_packages.db: $!"; + + my %bin; + while (my ($source, $data) = each %src_packages) { + my @src = map { [ split(/\s+/) ] } split( /\0/, $data ); + my $newest = (sort( { version_cmp($b->[-1],$a->[-1]) } @src))[0]; + my ($section, $version) = @{$newest}[2,5]; + + my $bin_data = $src2bin{$source}; + unless ($bin_data) { + warn "no binary data found for $source\n"; + # source packages without binaries have most + # likely been succeded + next; + } + + my @bin = map { [ split(/\s+/) ] } split( /\0/, $bin_data ); + my %seen; + foreach (@bin) { + my ($pkg, $ver) = @{$_}[2,3]; + next if $seen{"$pkg/$ver"}++; # weed out multiple arches/suites faster + if ($bin{$pkg} + && ($bin{$pkg}{source} ne $source) + && (version_cmp($bin{$pkg}{version},$ver) > 0)) { + next; + } else { + $bin{$pkg} = { version => $ver, source => $source, + target => "$section" }; + $binsrc{$pkg} = $source; + } + } + $binsrc{$source} = $source; + } +} sub package_maintainer { @@ -93,20 +146,23 @@ sub read_maintainer } printf " %s: %s\n", $package, $maint{$package} if ($opt_verbose > 1); - my $pkgshort = ""; - if ($package =~ /(.*[^\d\.]+)([\d\.]*\d)$/) { - $pkgshort = $1; - $maint{$pkgshort} = $maint{$package} if (! exists $maint{$pkgshort}); - printf " %s: %s\n", $pkgshort, $maint{$package} if ($opt_verbose > 1); - } - if ($maint{$package} =~ /([^\@]+)\@(master\.)?debian\.org/) { - my $addrsave = $maint{$package} if ($opt_verbose > 1); - $maint{$package} = package_maintainer ($package, $1, $maint{$package}); - printf " Changed to %s\n", $maint{$package} if ($opt_verbose > 1 && ($addrsave ne $maint{$package})); - if (length ($pkgshort) > 0) { - $maint{$pkgshort} = package_maintainer ($pkgshort, $1, $maint{$pkgshort}); - } - } + +# Short what? Whats this supposed to do, except creating new (and 99% broken) something -> email mappings? +# my $pkgshort = ""; +# if ($package =~ /(.*[^\d\.]+)([\d\.]*\d)$/) { +# $pkgshort = $1; +# print "Short what? $pkgshort (long is $package)\n"; +# $maint{$pkgshort} = $maint{$package} if (! exists $maint{$pkgshort}); +# printf " %s: %s\n", $pkgshort, $maint{$package} if ($opt_verbose > 1); +# } +# if ($maint{$package} =~ /([^\@]+)\@(master\.)?debian\.org/) { +# my $addrsave = $maint{$package} if ($opt_verbose > 1); +# $maint{$package} = package_maintainer ($package, $1, $maint{$package}); +# printf " Changed to %s\n", $maint{$package} if ($opt_verbose > 1 && ($addrsave ne $maint{$package})); +# if (length ($pkgshort) > 0) { +# $maint{$pkgshort} = package_maintainer ($pkgshort, $1, $maint{$pkgshort}); +# } +# } } else { printf "Skipping double $package\n" if ($opt_verbose); printf "LINE: $_" if ($opt_verbose > 2); @@ -115,15 +171,27 @@ sub read_maintainer close (F); } + + sub write_maintainer { my $file = shift; printf "Writing to %s.new\n", $file if ($opt_verbose > 0); open (CONF, ">$file.new") || die "Can't open $file.new, $!"; + my $forward; foreach my $package (sort(keys(%maint))) { - printf "%s -> %s\n", $package, $maint{$package} if ($opt_verbose > 1); - printf CONF "%s@%s\t%s\n", $package, $maildomain, $maint{$package}; +# It is possible that we do not know a source package -> in that case fall back to old behaviour +# and only mail the maintainer. Can happen when pdo doesnt know the suite the source is in, like +# it doesnt know oldstable-proposed-updates at date of writing this code. + $forward = "$maint{$package}"; + if ($binsrc{$package}) { + $forward .= ", $binsrc{$package}_contact\@$ptsdomain"; + } + printf "%s -> %s\n", $package, $forward if ($opt_verbose); + printf CONF "%s@%s\t%s\n", $package, $maildomain, $forward; +# printf "%s -> %s and pts: %s\n", $package, $maint{$package}, $binsrc{$package} if ($opt_verbose); +# printf CONF "%s@%s\t%s, %s_contact@%s\n", $package, $maildomain, $maint{$package}, $binsrc{$package}, $ptsdomain; } close (CONF); printf "Renaming to %s\n", $file if ($opt_verbose > 0); @@ -160,6 +228,8 @@ while ($#ARGV > -1) { shift; } +&read_bin_src_mapping(); + &read_maintainer ($overridefile); &read_maintainer ($maintainerfile); -- 2.39.2 From 78590403023af93dddb2df0683214b9bd6d347d2 Mon Sep 17 00:00:00 2001 From: Frank Lichtenheld Date: Tue, 11 Sep 2007 18:47:57 +0200 Subject: [PATCH 07/16] daily: Simplify and reduce lockfile wait Use exec for redirecting the output to a log file instead of manually redirecting every command's output. Reduce the lockfile wait times from 50 minutes each to 10 minutes each. With the new, faster cron job it is unlikely we want to queue the jobs anyway. --- bin/daily | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/bin/daily b/bin/daily index 2c54efe..44c458e 100755 --- a/bin/daily +++ b/bin/daily @@ -32,22 +32,24 @@ then savelog -c 14 $log > /dev/null fi -date > $log +exec >"$log" 2>&1 -if lockfile -600 -r5 "${files}/cron.lock" >> $log 2>&1 +date + +if lockfile -300 -r2 "${files}/cron.lock" then - run-parts --verbose $topdir/cron.d >> $log 2>&1 + run-parts --verbose $topdir/cron.d rm -f "${files}/cron.lock" else - echo "couldn't aquire cron lock file in due time" >> $log + echo "couldn't aquire cron lock file in due time" fi -date >> $log +date -if lockfile -600 -r5 "${files}/changelogs.lock" >> $log 2>&1 +if lockfile -300 -r2 "${files}/changelogs.lock" then - $topdir/bin/extract_changelogs >> $log 2>&1 + $topdir/bin/extract_changelogs rm -f "${files}/changelogs.lock" else - echo "couldn't aquire changelogs lock file in due time" >> $log + echo "couldn't aquire changelogs lock file in due time" fi -date >> $log +date -- 2.39.2 From 2c71b8762f8312acd1f6ae592f3e87cdb183cc3b Mon Sep 17 00:00:00 2001 From: Frank Lichtenheld Date: Tue, 11 Sep 2007 18:52:37 +0200 Subject: [PATCH 08/16] daily: Rename to daily.sed.in to be able to use %TOPDIR% This makes the script independent from where it is called from, which is a good thing for something called from cronjobs and the like. --- bin/{daily => daily.sed.in} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename bin/{daily => daily.sed.in} (98%) diff --git a/bin/daily b/bin/daily.sed.in similarity index 98% rename from bin/daily rename to bin/daily.sed.in index 44c458e..28c8333 100755 --- a/bin/daily +++ b/bin/daily.sed.in @@ -19,7 +19,7 @@ # Should run after the mirror pulse. The mirror tends to finish by # the ctime of rsync.log.* in ~archvsync. -source config.sh +source %TOPDIR%/config.sh files=$topdir/files logs=$files/logs log=$logs/cron.log -- 2.39.2 From 771e5b00536cc85cd6a948a759a00dea8820f9a2 Mon Sep 17 00:00:00 2001 From: Frank Lichtenheld Date: Tue, 11 Sep 2007 18:57:47 +0200 Subject: [PATCH 09/16] setup-site: Use cp -p and sed -i instead of just sed old > new This lets us easily preserve the modes of the original file which might be important for executables and private files. --- bin/setup-site | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/setup-site b/bin/setup-site index c277ecb..a0a7839 100755 --- a/bin/setup-site +++ b/bin/setup-site @@ -16,6 +16,7 @@ do wdir=$(dirname "$file") newfile="$wdir/"$(basename "$file" .sed.in) echo -e "processing\n\t$file\n->\t$newfile" - sed -e "s#%SITE%#$site#g;s#%TOPDIR%#$topdir#g" "$file" > "$newfile" + cp -p "$file" "$newfile" + sed -i -e "s#%SITE%#$site#g;s#%TOPDIR%#$topdir#g" "$newfile" diff -u "$file" "$newfile" done -- 2.39.2 From cc46373b0745372463947d3b7d1c9c5a73f52db5 Mon Sep 17 00:00:00 2001 From: Frank Lichtenheld Date: Wed, 12 Sep 2007 01:42:54 +0200 Subject: [PATCH 10/16] html/index.tmpl: Fix listing of providers The commas were missing. --- templates/html/index.tmpl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/templates/html/index.tmpl b/templates/html/index.tmpl index 11cab5c..043274a 100644 --- a/templates/html/index.tmpl +++ b/templates/html/index.tmpl @@ -31,7 +31,9 @@ [% END %] [% IF providers.size %]
    [% name %]
    -
    virtual package provided by [% FOREACH provider IN providers %][% provider %][% END %]
    +
    virtual package provided by + [% FOREACH provider IN providers %][% provider %] + [%- ', ' UNLESS loop.last %][% END %]
    [% IF versions.length %]
    [% name %] ([% versions %])[% PROCESS markers %]
    [% desc | html %]
    -- 2.39.2 From 2dc3efc2e8bcf87332099291fe7bf51f3c67d393 Mon Sep 17 00:00:00 2001 From: Frank Lichtenheld Date: Wed, 12 Sep 2007 01:43:41 +0200 Subject: [PATCH 11/16] Packages::Search: Fix fallback suites Leftover from the codenames move. --- lib/Packages/Search.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/Packages/Search.pm b/lib/Packages/Search.pm index ebb1b7d..d387267 100644 --- a/lib/Packages/Search.pm +++ b/lib/Packages/Search.pm @@ -103,11 +103,11 @@ sub read_entry { #FIXME: make configurable my %fallback_suites = ( - 'oldstable-backports' => 'oldstable', - 'oldstable-volatile' => 'oldstable', - 'stable-backports' => 'stable', - 'stable-volatile' => 'stable', - experimental => 'unstable' ); + 'sarge-backports' => 'sarge', + 'sarge-volatile' => 'sarge', + 'etch-backports' => 'etch', + 'etch-volatile' => 'etch', + experimental => 'sid' ); sub read_entry_simple { my ($hash, $key, $archives, $suite) = @_; -- 2.39.2 From ee1229bf379cb681a4805bf97ecdea9e60a7efb8 Mon Sep 17 00:00:00 2001 From: Frank Lichtenheld Date: Wed, 12 Sep 2007 01:46:49 +0200 Subject: [PATCH 12/16] html/show.tmpl: Improve Homepage link Enclose in
      to make it more consistent with other links. Use the word "Homepage" as the link and only note the hostname (think slashdot). Also fix the handling of the legacy Url field --- lib/Packages/Dispatcher.pm | 6 ++++++ templates/html/show.tmpl | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/Packages/Dispatcher.pm b/lib/Packages/Dispatcher.pm index e2b64ad..a360ddf 100755 --- a/lib/Packages/Dispatcher.pm +++ b/lib/Packages/Dispatcher.pm @@ -25,6 +25,7 @@ use warnings; use CGI; use POSIX; use File::Basename; +use URI; use URI::Escape; use HTML::Entities; use Template; @@ -332,6 +333,11 @@ Packages::CGI::init_url( $input, \%params, \%opts ); $page_content{make_search_url} = sub { return &Packages::CGI::make_search_url(@_) }; $page_content{make_url} = sub { return &Packages::CGI::make_url(@_) }; + $page_content{extract_host} = sub { my $uri = URI->new($_[0]); + my $host = $uri->host; + $host .= ':'.$uri->port if $uri->port != $uri->default_port; + return $host; + }; # needed to work around the limitations of the the FILTER syntax $page_content{html_encode} = sub { return HTML::Entities::encode_entities(@_,'<>&"') }; $page_content{uri_escape} = sub { return URI::Escape::uri_escape(@_) }; diff --git a/templates/html/show.tmpl b/templates/html/show.tmpl index 794903a..2be8071 100644 --- a/templates/html/show.tmpl +++ b/templates/html/show.tmpl @@ -115,10 +115,12 @@ [%- END -%] [% url = page.get_newest('url'); - url = page.get_newest('homepage'); + SET url = page.get_newest('homepage') IF page.get_newest('homepage'); IF url %]

      External Resources:

      -

      Homepage: [% url | html %]

      + [% END %] [% FOREACH sim IN similar %] -- 2.39.2 From e3267460f5a73aba7118b0b90918981fd12099d1 Mon Sep 17 00:00:00 2001 From: Frank Lichtenheld Date: Wed, 12 Sep 2007 02:12:56 +0200 Subject: [PATCH 13/16] Templates: Also display the suite's alias name in selected places --- templates/config/archive_layout.tmpl | 7 +++++++ templates/html/search.tmpl | 6 ++++-- templates/html/show.tmpl | 4 +++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/templates/config/archive_layout.tmpl b/templates/config/archive_layout.tmpl index 1eacb16..6e501c7 100644 --- a/templates/config/archive_layout.tmpl +++ b/templates/config/archive_layout.tmpl @@ -2,4 +2,11 @@ main_section = 'main' main_archive = 'us' standard_priority = 'optional' + + suite_aliases = { + sarge => 'oldstable', + etch => 'stable', + lenny => 'testing', + sid => 'unstable', + } %] diff --git a/templates/html/search.tmpl b/templates/html/search.tmpl index 0bc23e6..faf582c 100644 --- a/templates/html/search.tmpl +++ b/templates/html/search.tmpl @@ -85,8 +85,10 @@ Please consider using a longer keyword or more keywords.

      [% FOREACH packages %]

      Package [% pkg %]

        - [% FOREACH s IN suites %] -
      • [% s.suite %][% ' (' _ s.subsection _ ')' IF s.subsection %]: [% s.desc %] [%- IF s.section != main_section %] [[% s.section %]][% END %] + [% FOREACH s IN suites; + suite = s.suite %] +
      • [% suite %] + [%- ' (' _ suite_aliases.$suite _ ')' IF suite_aliases.$suite %][% ' (' _ s.subsection _ ')' IF s.subsection %]: [% s.desc %] [%- IF s.section != main_section %] [[% s.section %]][% END %] [% FOREACH s.versions %]
        [% version %] [%- IF archive != main_archive %] [[% archive %]][% END %]: [% architectures.join(' ') %] [% END %] diff --git a/templates/html/show.tmpl b/templates/html/show.tmpl index 2be8071..554f48f 100644 --- a/templates/html/show.tmpl +++ b/templates/html/show.tmpl @@ -9,7 +9,9 @@ [ 'hg', 'Hg', 'mercurial' ], ]; vcs_link = page.get_newest("vcs-browser"); -%] -[%- nav_arr = [ { prefix=>'Distribution:', title=>'Overview over this suite', url=>make_url('/','','source',''), name=>suite }, ]; +[%- suite_name = suite; + SET suite_name = suite_name _ ' (' _ suite_aliases.$suite _ ')' IF suite_aliases.$suite; + nav_arr = [ { prefix=>'Distribution:', title=>'Overview over this suite', url=>make_url('/','','source',''), name=>suite_name }, ]; nav_arr.push( { title => 'Source packages', url=>make_url('/'), name=>'Source' } ) IF is_source; nav_arr.push( { prefix=>'Section:', title=>'All packages in this section', url=>make_url("$subsection/"), name=>subsection } ); nav_arr.push( { prefix=>'Package:', name=>pkg } ); -%] -- 2.39.2 From 5fa4677a30bf12808f781367893a9d66ff839da4 Mon Sep 17 00:00:00 2001 From: Frank Lichtenheld Date: Sun, 9 Sep 2007 03:06:55 +0200 Subject: [PATCH 14/16] html/show.tmpl: Improve dependency list readability for blind people Suggested by Richard Atterer Use @media to define .visual/.nonvisual to be used instead of the slightly broken hidecss. Replace by since we don't intend to show images here most of the time anyway. Also let the list-style-type differ so that people can see the difference even without images. --- static/packages.css.sed.in | 12 ++++++++++-- templates/html/show.tmpl | 4 ++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/static/packages.css.sed.in b/static/packages.css.sed.in index 2afe3f3..bf44d3d 100644 --- a/static/packages.css.sed.in +++ b/static/packages.css.sed.in @@ -1,3 +1,11 @@ +@media handheld, print, projection, screen, tv { + .nonvisual { display: none; } +} + +@media braille, embossed, speech, tty { + .visual { display: none; } +} + #hpacketsearch { display: block; padding-top: 1px; @@ -82,12 +90,12 @@ h1 { } #pdeps ul.ulrec, #pdeps ul.ulidep { - list-style-type: disc; + list-style-type: square; list-style-image: url(http://%SITE%/Pics/rec.gif); } #pdeps ul.ulsug { - list-style-type: disc; + list-style-type: circle; list-style-image: url(http://%SITE%/Pics/sug.gif); } diff --git a/templates/html/show.tmpl b/templates/html/show.tmpl index 554f48f..7c7dd17 100644 --- a/templates/html/show.tmpl +++ b/templates/html/show.tmpl @@ -217,7 +217,7 @@ Do not install it on a normal Debian system.

        Other Packages Related to [% pkg %]

        - +
        [% IF is_source %] @@ -234,7 +234,7 @@ Do not install it on a normal Debian system.

        [% '
      • ' UNLESS is_old_pkgs %] [% FOREACH alternatives %] [% '
        ' IF loop.first %] -
        [% IF loop.first %][[% id %]][% ELSE %]or [% END %] +
        [% IF loop.first %][% id %]:[% ELSE %]or [% END %] [% IF suite %][% name %][% ELSE %][% name %][% END %] [% ' (' _ version _ ')' IF version %] [% ' [' _ arch_str _ ']' IF arch_str %]
        -- 2.39.2 From cfd901631e57f7184e96c132817cbb4de0fd7929 Mon Sep 17 00:00:00 2001 From: Frank Lichtenheld Date: Sun, 9 Sep 2007 14:28:55 +0200 Subject: [PATCH 15/16] html/show.tmpl: Improve the dependency legend Suggested by MJ Ray Directly imitate the dependency listing in the legend by using
        • inside the table cells. This makes the legend autoadjust to any changes in the CSS for the dependency listing and mirrors the appearance completly. --- static/packages.css.sed.in | 4 ++++ templates/html/show.tmpl | 10 +++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/static/packages.css.sed.in b/static/packages.css.sed.in index bf44d3d..9e09dd8 100644 --- a/static/packages.css.sed.in +++ b/static/packages.css.sed.in @@ -84,6 +84,10 @@ h1 { list-style-type: none; } +#pdeps table ul { + margin: 0; +} + #pdeps ul.uldep, #pdeps ul.uladep { list-style-type: disc; list-style-image: url(http://%SITE%/Pics/dep.gif); diff --git a/templates/html/show.tmpl b/templates/html/show.tmpl index 7c7dd17..1d9f655 100644 --- a/templates/html/show.tmpl +++ b/templates/html/show.tmpl @@ -219,12 +219,12 @@ Do not install it on a normal Debian system.

      • [adep]= build-depends [idep]= build-depends-indep
        [% IF is_source %] - - + + [% ELSE %] - - - + + + [% END %]
        [adep]= build-depends[idep]= build-depends-indep
        • build-depends
        • build-depends-indep
        [dep]= depends[rec]= recommends[sug]= suggests
        • depends
        • recommends
        • suggests
        [%- END %] -- 2.39.2 From 14ad98deaba3efa56740908b2c33a4bf3fd03299 Mon Sep 17 00:00:00 2001 From: Frank Lichtenheld Date: Thu, 13 Sep 2007 00:44:21 +0200 Subject: [PATCH 16/16] 600prepare_newpkg: Forgot one s/unstable/sid/ --- cron.d/600prepare_newpkg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cron.d/600prepare_newpkg b/cron.d/600prepare_newpkg index bddf65b..f722cb2 100755 --- a/cron.d/600prepare_newpkg +++ b/cron.d/600prepare_newpkg @@ -7,7 +7,7 @@ test -d ${packagesdir} || mkdir -p ${packagesdir} LANG=C cat ${filesdir}/db/package_names_sid.txt \ | sort | uniq > ${packagesdir}/package_names_sid.$(date -I) -LANG=C cat ${filesdir}/db/source_names_unstable.txt \ +LANG=C cat ${filesdir}/db/source_names_sid.txt \ | sort | uniq > ${packagesdir}/source_names_sid.$(date -I) cd $topdir -- 2.39.2