-$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
-$Id$
-
Proposal for URL layout
$ROOT/search <- search handling
# build-maintainerdb - convert several Packages files to maintainer database
# Copyright (c) 1998,9,2001,3,4,6 Martin Schulze <joey@debian.org>
+# Copyright (C) 2007 Joerg Jaspert <joerg@debian.org>
#
# 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
#
# 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
use strict;
use warnings;
+use DB_File;
+
+use lib '../lib';
+
+use Deb::Versions;
# read the configuration
if (!open (C, "../config.sh")) {
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
{
}
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);
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);
shift;
}
+&read_bin_src_mapping();
+
&read_maintainer ($overridefile);
&read_maintainer ($maintainerfile);
my $sections = retrieve "$DBDIR/sections.info";
my $subsections = retrieve "$DBDIR/subsections.info";
-# work around problems with non-US security updates
-$subsections->{oldstable}{us}{'non-US'}++;
my $priorities = retrieve "$DBDIR/priorities.info";
#use Data::Dumper;
+++ /dev/null
-#! /bin/bash
-
-# Copyright (c) 2004 Martin Schulze <joey@debian.org>
-#
-# 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
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# 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.
-
-# Should run after the mirror pulse. The mirror tends to finish by
-# the ctime of rsync.log.* in ~archvsync.
-
-source config.sh
-files=$topdir/files
-logs=$files/logs
-log=$logs/cron.log
-
-test -d $files || mkdir -p $files
-test -d $logs || mkdir -p $logs
-
-if [ -s $log ]
-then
- savelog -c 14 $log > /dev/null
-fi
-
-date > $log
-
-if lockfile -600 -r5 "${files}/cron.lock" >> $log 2>&1
-then
- run-parts --verbose $topdir/cron.d >> $log 2>&1
- rm -f "${files}/cron.lock"
-else
- echo "couldn't aquire cron lock file in due time" >> $log
-fi
-date >> $log
-
-if lockfile -600 -r5 "${files}/changelogs.lock" >> $log 2>&1
-then
- $topdir/bin/extract_changelogs >> $log 2>&1
- rm -f "${files}/changelogs.lock"
-else
- echo "couldn't aquire changelogs lock file in due time" >> $log
-fi
-date >> $log
--- /dev/null
+#! /bin/bash
+
+# Copyright (c) 2004 Martin Schulze <joey@debian.org>
+#
+# 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
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# 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., 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.
+
+source %TOPDIR%/config.sh
+files=$topdir/files
+logs=$files/logs
+log=$logs/cron.log
+
+test -d $files || mkdir -p $files
+test -d $logs || mkdir -p $logs
+
+if [ -s $log ]
+then
+ savelog -c 14 $log > /dev/null
+fi
+
+exec >"$log" 2>&1
+
+date
+
+if lockfile -300 -r2 "${files}/cron.lock"
+then
+ run-parts --verbose $topdir/cron.d
+ rm -f "${files}/cron.lock"
+else
+ echo "couldn't aquire cron lock file in due time"
+fi
+date
+
+if lockfile -300 -r2 "${files}/changelogs.lock"
+then
+ $topdir/bin/extract_changelogs
+ rm -f "${files}/changelogs.lock"
+else
+ echo "couldn't aquire changelogs lock file in due time"
+fi
+date
(
date
+successful=1
for part in $parts; do
time "${bindir}/extract_files" -v -d "${localdir}/pool/$part/" \
-t "${htmldir}/changelogs/pool/$part/" \
-c "$configdir" -w "$tmpdir" \
--dumpfile "${filesdir}/changelogs.$part.dump" \
- --cachefile "${filesdir}/changelogs.cache"
+ --cachefile "${filesdir}/changelogs.cache" --debug
+ if [ $? -ne 0 ]; then
+ echo program exited with non-zero exitcode: $? >&2
+ successful=0
+ fi
done
-find "${htmldir}/changelogs/" -name log -cmin +7200 \
- | while read logfile; do
- dir=$(dirname "$logfile")
+if [ "$successful" -eq 1 ]; then
+ find "${htmldir}/changelogs/" -name log -cmin +14440 \
+ | while read logfile; do
+ dir=$(dirname "$logfile")
echo deleting $dir
rm -r "$dir"
rmdir --ignore-fail-on-non-empty $(dirname "$dir")
-done
-
+ done
+else
+ echo clean-up skipped because at least one of the extraction runs failed >&2
+fi
date
) > $log 2>&1
#!/usr/bin/perl
#
# Script to extract files from Debian packages
-# Copyright 2004 Frank Lichtenheld
+# Copyright 2004-2007 Frank Lichtenheld <frank@lichtenheld.de>
#
# based on a shell script which was
# Copyright 2003 Noel Köthe
#
# 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;
'help' => \$help,
);
-my (%src_packages, %bin_packages, %cache, %stats);
+my (%src_packages, %bin_packages, %cache);
+
+my %stats = (
+ src_pkgs => 0,
+ src_cache => 0,
+ already_extracted => 0,
+ bin_pkgs => 0,
+ bin_cache => 0,
+ );
Getopt::Long::config('no_getopt_compat', 'no_auto_abbrev');
# PACKAGE HANDLING (UNPACKING/CLEANUP)
sub unpack_srcpkg {
- my ( $dscname, $log ) = @_;
+ my ( $pkgname, $dscname, $log ) = @_;
chdir( $TEMPDIR ) or do_error( "couldn't change working directory to $TEMPDIR" );
- add_log( $log, "dpkg-source -sn -x $dscname" );
-
- my $out = qx/dpkg-source -sn -x "$dscname" 2>&1/;
- my ($dir) = ($out =~ /(\S+)$/mo);
+ add_log( $log, "dpkg-source -sn -x $dscname $pkgname+source" );
- add_log( $log, "dpkg-source output: ", $out );
-
-#Bug#246802
-# system("dpkg-source", "-x", $dscname ) == 0
-# or do {
-# do_warning( "couldn't unpack $dscname" );
-# add_log( $log, "couldn't unpack $dscname" );
-# return;
-# };
+ system("dpkg-source", "-sn", "-x", $dscname, "$pkgname+source" ) == 0
+ or do {
+ do_warning( "couldn't unpack $dscname: $!" );
+ add_log( $log, "couldn't unpack $dscname: $!" );
+ return;
+ };
- return $dir;
+ return "$pkgname+source";
}
sub unpack_binpkg {
return;
}
- if (my $source_dir = unpack_srcpkg( $pkg_data->{dsc}, \$log )) {
+ if (my $source_dir = unpack_srcpkg( $pkg_data->{src_name}, $pkg_data->{dsc}, \$log )) {
$source_dir = "$TEMPDIR/$source_dir";
dsc => $dscname,
};
- unless( $pkg_data->{src_name} && $pkg_data->{src_version}
+ unless( $pkg_data->{src_name} && defined($pkg_data->{src_version})
&& $pkg_data->{dsc} ) {
use Data::Dumper;
do_error( "something fishy happened.\n", Dumper( $pkg_data ) );
$changes{$_} = -1;
}
- my %archives = map { $_ => 1 } qw( us security non-US );
+ my %archives = map { $_ => 1 } qw( us security );
foreach (sort keys %changes) {
- my $entry = read_entry_simple( \%packages, $_, \%archives, $suite)
- or die "Fatal Error: Can't find entry for package $_\n";
- shift @$entry; # remove virtual pkg info
+ my $entry = [];
+ if ($changes{$_} == 1) {
+ $entry = read_entry_simple( \%packages, $_, \%archives, $suite);
+ die "Fatal Error: Can't find entry for package $_\n"
+ unless @$entry;
+ shift @$entry; # remove virtual pkg info
+ }
print CHANGES join(" ", $_, $age, @$entry)."\n";
print "Wrote entry: ".join(" ", $_, $age, @$entry)."\n";
}
# Convert Contents.gz files into Sleepycat db files for efficient usage of
# data
#
-# $Id$
-#
# Copyright (C) 2006 Jeroen van Wolffelaar <jeroen@wolffelaar.nl>
# 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
# 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';
#!/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 <djpig@debian.org>
# 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
# 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;
# Convert Packages.gz files into Sleepycat db files for efficient usage of
# data
#
-# $Id$
-#
# Copyright (C) 2006 Jeroen van Wolffelaar <jeroen@wolffelaar.nl>
+# Copyright (C) 2006-2007 Frank Lichtenheld <frank@lichtenheld.de>
+#
# 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
# 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;
my $subsection = $data{section} || '-';
if ($data{section} && ($data{section} =~ m=/=o)) {
($section, $subsection) = split m=/=o, $data{section}, 2;
- ($subsection, $section) = split m=/=o, $data{section}, 2
- if $section eq 'non-US';
}
$data{'section'} = $section;
$data{'subsection'} = $subsection;
for (my $i=1; $i<= $#descriptions; $i++) {
# strip away additional data
my ($only_desc, $pkg, $tags) = split /\000/o, $descriptions[$i], 3;
+ my $orig_desc = $only_desc;
# WARNING: This needs to correspond with what happens in
# Packages/Search.pm:do_xapian_search
$only_desc =~ s#[^\w/+]+# #og;
};
die $@ if $@;
- $descriptions_db{$i} = $only_desc;
+ $descriptions_db{$i} = $orig_desc;
}
untie %descriptions_db;
$xapian_db->flush;
# Convert Sources.gz files into Sleepycat db files for efficient usage of
# data
#
-# $Id$
-#
# Copyright (C) 2006 Jeroen van Wolffelaar <jeroen@wolffelaar.nl>
# 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
# 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';
my $subsection = $data{section} || '-';
if ($data{section} && ($data{section} =~ m=/=o)) {
($section, $subsection) = split m=/=o, $data{section}, 2;
- ($subsection, $section) = split m=/=o, $data{section}, 2
- if $section eq 'non-US';
}
$data{'section'} = $section;
$data{'subsection'} = $subsection;
# Convert Translation.gz files into Sleepycat db files for efficient usage of
# data
#
-# $Id$
-#
# Copyright (C) 2006 Jeroen van Wolffelaar <jeroen@wolffelaar.nl>
+# Copyright (C) 2007 Frank Lichtenheld <frank@lichtenheld.de>
# 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
# 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;
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
<option value="main">main</option>
<option value="contrib">contrib</option>
<option value="non-free">non-free</option>
- <option value="non-us">non-US</option>
<option value="all" selected="selected">any</option>
</select>
# RSS stuff
AddType application/rss+xml .rdf .xml
+
+ RemoveType .gz
+ AddEncoding x-gzip .gz
</Directory>
<VirtualHost *>
# PerlModule ModPerl::Registry
# PerlTaintCheck On
# PerlRequire %TOPDIR%/bin/mod_perl-startup
+# PerlSwitches -T
<Location /cgi-bin/>
# SetHandler perl-script
# mod-perl etch
RewriteRule ^/([^/+]*)([+])([^/]*)$ "/$1%%{%}2B$3" [N]
RewriteRule ^/changelog:(.+)$ http://%SITE%/changelogs/${changelog-url:$1} [R,L,NE]
RewriteRule ^/src:([^/]+)$ /source/$1 [R,L,NE]
+ RewriteRule ^/file:(.+)$ http://%SITE%/search?searchon=contents&keywords=$1 [R,L,NE]
+
+ RewriteCond %{QUERY_STRING} =""
+ RewriteCond %TOPDIR%/www%{REQUEST_FILENAME} -f [OR]
+ RewriteCond %TOPDIR%/www%{REQUEST_FILENAME}.en.html -f [OR]
+ RewriteCond %TOPDIR%/www%{REQUEST_FILENAME} -l [OR]
+ RewriteCond %TOPDIR%/www%{REQUEST_FILENAME} -d
+ RewriteRule . - [L]
RewriteRule ^/(.+)$ /cgi-bin/dispatcher.pl/$1 [L,PT]
# unset this if %SITE% moves somewhere where the packages files
# cannot be obtained locally
#
-localdir=/org/ftp.debian.org/debian
+#localdir=/org/ftp.debian.org/debian
# path to private ftp directory
#ftproot=/org/ftp.root
ftpsite=http://archive.ubuntu.com/ubuntu
security_ftpsite=$ftpsite
+ddtp_ftpsite=http://ddtp.debian.net/debian
root=""
# Architectures
#
polangs="de fi nl fr uk"
-ddtplangs="de cs da eo es fi fr hu it ja nl pl pt_BR pt_PT ru sk sv_SE uk"
+ddtplangs="ca cs da de eo es fi fr go hu it ja km_KH ko nl pl pt pt_BR ru sk sv uk zh zh_CN zh_TW"
archives="us security"
sections="main multiverse restricted universe"
parts="${sections}"
suites="warty hoary hoary-backports breezy breezy-backports dapper dapper-backports edgy edgy-backports feisty"
priorities="required important standard optional extra"
-dists="${suites}"
architectures="i386 amd64 powerpc"
arch_warty="i386 amd64 powerpc"
arch_warty_updates="${arch_warty}"
#
# 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
required="$required libclass-accessor-perl"
required="$required liburi-perl libxml-rss-perl"
required="$required libtemplate-perl libi18n-acceptlanguage-perl"
+required="$required liblingua-stem-perl"
-locales="de_DE.UTF-8 en_US.UTF-8 nl_NL fr_FR.UTF-8"
+locales="de_DE.UTF-8 en_US.UTF-8 nl_NL fr_FR.UTF-8 uk_UA.UTF-8"
packages=`tempfile`
locs=`tempfile`
do
echo "retrieve Releases(.gpg) $dist"
test -d us/${dist} || mkdir -p us/${dist}
- (cd us/${dist} &&
- rsync -t ${localdir}/dists/${dist}/Release &&
- rsync -t ${localdir}/dists/${dist}/Release.gpg )
+ rsync -t ${localdir}/dists/${dist}/Release us/${dist}/Release
+ rsync -t ${localdir}/dists/${dist}/Release.gpg us/${dist}/Release.gpg
foo=\$arch_${dist//-/_}
for arch in `eval echo $foo`
# security archive
#
-for dist in oldstable stable testing
+for dist in sarge etch lenny
do
echo "retrieve Release(.gpg) $dist"
test -d security/${dist} || mkdir -p security/${dist}
#
architectures="armel kfreebsd-i386 kfreebsd-amd64"
-for dist in unstable experimental
+for dist in sid experimental
do
echo "retrieve Release(.gpg) $dist"
test -d gnuab/${dist} || mkdir -p gnuab/${dist}
test -d ${archivedir} || mkdir -p ${archivedir}
cd ${archivedir}
-if [ -z "${localdir}" ]
+if [ -z "${localdir}" ] || [ -n "$ddtp_ftpsite" ]
then
- echo using remote mirror
- for dist in unstable
+ if [ -z "$ddtp_ftpsite" ]
+ then
+ ddtp_ftpsite="$ftpsite"
+ fi
+ echo using remote mirror $ddtp_ftpsite
+ for dist in sid
do
for part in main
do
do
echo retrieve translated Descs $dist/$part/$lang
(cd us/${dist}/${part}/i18n &&
- wget -q -N ${ftpsite}/dists/${dist}/${part}/i18n/Translations-$lang.gz)
+ wget -q -N ${ddtp_ftpsite}/dists/${dist}/${part}/i18n/Translation-$lang.gz)
done
done
done
else
echo using local mirror
- for dist in unstable
+ for dist in sid
do
for part in main
do
date
./bin/parse-sources
date
-./bin/parse-contents
-date
./bin/parse-translations
date
+./bin/parse-contents
+date
packagesdir=${filesdir}/packages
test -d ${packagesdir} || mkdir -p ${packagesdir}
-LANG=C cat ${filesdir}/db/package_names_unstable.txt \
- | sort | uniq > ${packagesdir}/package_names_unstable.$(date -I)
+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 \
- | sort | uniq > ${packagesdir}/source_names_unstable.$(date -I)
+ | sort | uniq > ${packagesdir}/source_names_sid.$(date -I)
cd $topdir
-./bin/newpkg_info unstable
+./bin/newpkg_info sid
#
# Deb::Versions
-# $Id$
#
# Copyright 2003, 2004 Frank Lichtenheld <frank@lichtenheld.de>
#
#
# 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
for ( my $i = 0; $i <= length( $v1 ); $i++ ) {
my ( $n1, $n2 ) = ( ord( substr( $v1, $i, 1 ) ),
ord( substr( $v2, $i, 1 ) ) );
- $n1 += 256 if $n1 < 65; # letters sort earlier than non-letters
+ $n1 += 256 if $n1 && $n1 < 65; # letters sort earlier than non-letters
$n1 = -1 if $n1 == 126; # '~' sorts earlier than everything else
- $n2 += 256 if $n2 < 65;
+ $n2 += 256 if $n2 && $n2 < 65;
$n2 = -1 if $n2 == 126;
if ( my $r = ($n1 <=> $n2) ) {
return $r;
}
our @SUITES_SORT = qw( woody oldstable sarge stable stable-proposed-updates
- etch etch-m68k testing testing-proposed-updates sid unstable
- experimental warty hoary hoary-backports breezy
- breezy-backports dapper );
+ etch etch-m68k testing testing-proposed-updates lenny
+ sid unstable experimental
+ warty hoary breezy breezy dapper edgy feisty gutsy );
our @ARCHIVE_SORT = qw( non-US security updates volatile backports );
our @PRIORITY_SORT = qw( required important standard optional extra );
my $i = 1000;
#
# 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;
use CGI;
use POSIX;
use File::Basename;
+use URI;
use URI::Escape;
use HTML::Entities;
use Template;
delete $ENV{'LC_ALL'};
delete $ENV{'LC_MESSAGES'};
+ my %SUITES_ALIAS = ( oldstable => 'sarge',
+ stable => 'etch',
+ testing => 'lenny',
+ unstable => 'sid',
+ '3.1' => 'sarge',
+ '4.0' => 'etch' );
+
# Read in all the variables set by the form
my $input;
if ($ARGV[0] && ($ARGV[0] eq 'php')) {
}
my %SUITES = map { $_ => 1 } @SUITES;
- my %SUITES_ALIAS = ( sarge => 'oldstable',
- etch => 'stable',
- lenny => 'testing',
- sid => 'unstable', );
my %SECTIONS = map { $_ => 1 } @SECTIONS;
my %ARCHIVES = map { $_ => 1 } @ARCHIVES;
my %ARCHITECTURES = map { $_ => 1 } (@ARCHITECTURES, 'all', 'any');
set_param_once( $input, \%params_set, 'archive', $_);
} elsif (!$need_pkg && $sections_descs{$_}) {
set_param_once( $input, \%params_set, 'subsection', $_);
- } elsif (!$need_pkg && ($_ eq 'non-us')) { # non-US hack
- set_param_once( $input, \%params_set, 'subsection', 'non-US');
} elsif (!$need_pkg && ($_ eq 'source')) {
set_param_once( $input, \%params_set, 'source', 1);
} elsif ($ARCHITECTURES{$_}) {
} # else if (@components == 1)
if (@components) {
- $input->param( 'keywords', $components[0] );
- $input->param( 'package', $components[0] );
+ my $c = uri_unescape($components[0]);
+ $input->param( 'keywords', $c );
+ $input->param( 'package', $c );
}
}
suite => { default => 'default', match => '^([\w-]+)$',
array => ',', var => \@suites,
replace => { all => \@SUITES,
- default => \@SUITES } },
+ default => \@SUITES,
+ %SUITES_ALIAS } },
archive => { default => ($what_to_do eq 'search') ?
'all' : 'default',
match => '^([\w-]+)$',
array => ',', var => \@archs, replace =>
{ any => \@ARCHITECTURES } },
format => { default => 'html', match => '^([\w.]+)$', },
- mode => { default => undef, match => '^(\w+)$', },
+ mode => { default => '', match => '^(\w+)$', },
sort_by => { default => 'file', match => '^(\w+)$', },
);
my %opts;
debug => ( DEBUG ? $opts{debug} : 0 ) },
( $CACHEDIR ? { COMPILE_DIR => $CACHEDIR } : {} ) );
- unless (-e "$TEMPLATEDIR/$opts{format}/${what_to_do}.tmpl") {
+ #FIXME: ugly hack
+ unless (($what_to_do eq 'allpackages' and $opts{format} =~ /^(html|txt\.gz)/)
+ || -e "$TEMPLATEDIR/$opts{format}/${what_to_do}.tmpl") {
fatal_error( "requested format not available for this document",
"406 requested format not available");
}
$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(@_) };
$page_content->{archive} = $archive;
$page_content->{suite} = $suite;
$page_content->{pkg} = $pkg;
- $page_content->{pkgsize} = sprintf( '%.1f', floor(($data{size}/102.4)+0.5)/10 );
- $page_content->{pkgsize_unit} = _g( 'kByte' );
- if ($page_content->{pkgsize} > 1024) {
+ my $pkgsize = floor(($data{size}/102.4)+0.5)/10;
+ if ($pkgsize < 1024) {
+ $page_content->{pkgsize} = sprintf( '%.1f', $pkgsize );
+ $page_content->{pkgsize_unit} = _g( 'kByte' );
+ } else {
$page_content->{pkgsize} = sprintf( '%.1f', floor(($data{size}/(102.4*102.4))+0.5)/100 );
$page_content->{pkgsize_unit} = _g( 'MByte' );
}
fatal_error( _g( "No such package in this suite on this architecture." ) );
} else {
my @files = unpack "L/(CC/a)", $contents{$pkg};
- my $file;
+ my $file = '';
$page_content->{files} = [];
for (my $i=0; $i<scalar @files;) {
$path .= "$opts->{priority}[0]/" if @{$opts->{priority}};
# we don't have translated index pages for subsections yet
$opts->{lang} = 'en' if @{$opts->{subsection}} or $file eq 'allpackages';
- $path .= "$file.$opts->{lang}.$opts->{format}";
+
+ #FIXME: ugly hack
+ if ($opts->{lang} ne 'en' and !-f "$wwwdir/$path$file.$opts->{lang}.$opts->{format}") {
+ $opts->{lang} = 'en';
+ }
+ $path .= "$file.$opts->{lang}.$opts->{format}";
unless (@Packages::CGI::fatal_errors) {
my $buffer;
$headers{'-charset'} = get_charset( $opts->{lang} );
$headers{'-type'} = get_mime( $opts->{format}, 'text/plain' );
$headers{'-content-encoding'} = $encoding{$opts->{format}} if exists $encoding{$opts->{format}};
+ my ($size,$mtime) = (stat("$wwwdir/$path"))[7,9];
+ $headers{'-content-length'} = $size;
+ $headers{'-last-modified'} = gmtime($mtime);
print header( %headers );
binmode INDEX;
my $sort_func = sub { $_[0][0] cmp $_[1][0] };
$sort_func = sub { $_[0][1] <=> $_[1][1] or $_[0][0] cmp $_[1][0] }
- if $opts->{mode} eq 'byage';
+ if $opts->{mode} eq 'byage';
my $suite = $opts->{suite}[0];
my $one_archive = @{$opts->{archive}} == 1 ?
chomp;
my @data = split /\s/, $_, 10;
+ next unless $data[2]; #removed packages
next unless $data[3] eq $suite;
next if $one_archive and $data[2] ne $one_archive;
next if $one_section and $data[5] ne $one_section;
$version) = @$_;
my $real_archive = '';
- if ($archive =~ /^(security|non-US)$/) {
+ if ($archive eq 'security') {
$real_archive = $archive;
$archive = 'us';
}
use Deb::Versions;
use Packages::I18N::Locale;
use Packages::Search qw( :all );
-use Packages::CGI;
+use Packages::CGI qw( :DEFAULT error );
use Packages::DB;
use Packages::Config qw( $DBDIR @SUITES @ARCHIVES @ARCHITECTURES $ROOT );
#FIXME: that's extremely hacky atm
if ($params->{values}{suite}{no_replace}[0] eq 'default') {
$params->{values}{suite}{no_replace} =
- $params->{values}{suite}{final} = $opts->{suite} = [ 'stable' ];
+ $params->{values}{suite}{final} = $opts->{suite} = [ 'etch' ];
}
if (@{$opts->{suite}} > 1) {
if @keywords;
my $kw = reverse $first_kw;
+ $kw =~ s{/+$}{};
# exact filename searching follows trivially:
$kw = "$kw/" if $mode eq 'exactfilename';
my $std = timediff($st1, $st0);
debug( "Data search and merging took ".timestr($std) ) if DEBUG;
+ my @similar = find_similar( $pkg, "$DBDIR/xapian/",
+ \%did2pkg );
+ $contents{similar} = \@similar;
+
my $did = $page->get_newest( 'description' );
my $desc_md5 = $page->get_newest( 'description-md5' );
- my @complete_tags = split(/, /, $page->get_newest( 'tag' ));
+ my @complete_tags = split(/, /, $page->get_newest( 'tag' )||'' );
my @tags;
foreach (@complete_tags) {
my ($facet, $tag) = split( /::/, $_, 2);
foreach( @$source_files ) {
my ($src_file_md5, $src_file_size, $src_file_name)
= split /\s+/, $_;
- (my $server = lc $archive) =~ s/-//go; # non-US hack
- $server = $FTP_SITES{$server}
+ my $server = $FTP_SITES{lc $archive}
|| $FTP_SITES{us};
my $path = "/$source_dir/$src_file_name";
foreach( @$files ) {
my ($src_file_md5, $src_file_size, $src_file_name) = split /\s/o, $_;
my ($server, $path);
- # non-US hack
- ($server = lc $page->get_newest('archive')) =~ s/-//go;
- $server = $env->{$server}||$env->{us};
+ $server = $env->{lc $page->get_newest('archive')}||$env->{us};
$path = "/$src_dir/$src_file_name";
push @downloads, { name => $src_file_name, server => $server, path => $path };
}
(my $src_basename = $source_version) =~ s,^\d+:,,; # strip epoche
$src_basename = "${source}_$src_basename";
$src_dir =~ s,pool/updates,pool,o;
- $src_dir =~ s,pool/non-US,pool,o;
$contents->{files}{changelog}{path} = "$src_dir/$src_basename/changelog";
$contents->{files}{copyright}{path} = "$src_dir/$src_basename/".( $is_source ? 'copyright' : "$name.copyright" );
-# $Id$
-#
# Taken from the webwml CVS tree (english/templates/language_names.wml)
package Packages::I18N::LanguageNames;
-# $Id$
-#
# Taken from the webwml CVS tree (english/templates/languages.wml)
package Packages::I18N::Languages;
}
our @TAKE_NEWEST = qw( description description-md5 essential priority section subsection tag
- archive source source-version url );
+ archive source source-version url homepage );
our @STORE_ALL = qw( version source source-version installed-size size
filename md5sum sha1 sha256 task
origin bugs suite archive section );
#
# Packages::Search
#
-# Copyright (C) 2004-2006 Frank Lichtenheld <frank@lichtenheld.de>
-#
+# Copyright (C) 2004-2007 Frank Lichtenheld <frank@lichtenheld.de>
+#
# The code is based on the old search_packages.pl script that
# was:
#
#
# 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
our @EXPORT_OK = qw( read_entry read_entry_all read_entry_simple
read_src_entry read_src_entry_all find_binaries
do_names_search do_fulltext_search do_xapian_search
+ find_similar
);
our %EXPORT_TAGS = ( all => [ @EXPORT_OK ] );
}
}
- foreach (split /\000/o, $result) {
+ foreach (split(/\000/o, $result||'')) {
my @data = split ( /\s/o, $_, 8 );
debug( "Considering entry ".join( ':', @data), 2) if DEBUG;
if ($opts->{h_suites}{$data[1]}
}
sub do_xapian_search {
- my ($keywords, $db, $did2pkg, $packages, $read_entry, $opts,
+ my ($keywords, $dbpath, $did2pkg, $packages, $read_entry, $opts,
$results, $non_results) = @_;
# NOTE: this needs to correspond with parse-packages!
my $stemmer = Lingua::Stem->new();
my $stemmed_keywords = $stemmer->stem( @tmp );
- my $db = Search::Xapian::Database->new( $db );
+ my $db = Search::Xapian::Database->new( $dbpath );
my $enq = $db->enquire( OP_OR, @$keywords, @$stemmed_keywords );
debug( "Xapian Query was: ".$enq->get_query()->get_description(), 1) if DEBUG;
my @matches = $enq->matches(0, 999);
}
}
+sub find_similar {
+ my ($pkg, $dbpath, $did2pkg) = @_;
+
+ my $db = Search::Xapian::Database->new( $dbpath );
+ my $enq = $db->enquire( "P$pkg" );
+ debug( "Xapian Query was: ".$enq->get_query()->get_description(), 1) if DEBUG;
+ my $first_match = ($enq->matches(0,1))[0]->get_document();
+
+ my @terms;
+ my $term_it = $first_match->termlist_begin();
+ my $term_end = $first_match->termlist_end();
+
+ for (; $term_it ne $term_end; $term_it++) {
+ debug( "TERM: ".$term_it->get_termname(), 3);
+ push @terms, $term_it->get_termname();
+ }
+
+ my $rel_enq = $db->enquire( OP_OR, @terms );
+ debug( "Xapian Query was: ".$rel_enq->get_query()->get_description(), 1) if DEBUG;
+ my @rel_pkg = $rel_enq->matches(2,20);
+
+# use Data::Dumper;
+# debug(Dumper(\@rel_pkg),1);
+
+ my (@order, %tmp_results);
+ foreach my $match ( @rel_pkg ) {
+ my $id = $match->get_docid();
+ my $result = $did2pkg->{$id};
+
+ foreach (split /\000/o, $result) {
+ my @data = split /\s/, $_, 3;
+ debug ("Considering $data[0], arch = $data[2], relevance=".$match->get_percent(), 3) if DEBUG;
+ next if $data[0] eq $pkg;
+ unless ($tmp_results{$data[0]}++) {
+ push @order, $data[0];
+ }
+ }
+ }
+ undef $db;
+
+ debug ("ORDER: @order", 2) if DEBUG;
+ return @order[0..10];
+}
+
sub find_binaries {
my ($pkg, $archive, $suite, $src2bin) = @_;
N_("Daemons and clients to connect your Debian GNU/Linux system to the world.") ],
news => [ N_("Newsgroups"),
N_("Software to access Usenet, to set up news servers, etc.") ],
- 'non-US' => [ N_("Software restricted in the U.S."),
- N_("These packages probably may not be used in or distributed from the U.S. due to software patents. You should check the regulations in your country before using this software.") ],
oldlibs => [ N_("Old Libraries"),
N_("Old versions of libraries, kept for backward compatibility with old applications.") ],
otherosfs => [ N_("Other OS\'s and file systems"),
+@media handheld, print, projection, screen, tv {
+ .nonvisual { display: none; }
+}
+
+@media braille, embossed, speech, tty {
+ .visual { display: none; }
+}
+
#hpacketsearch {
display: block;
padding-top: 1px;
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);
}
#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);
}
font-family: monospace;
}
#pdownload p {
- display: inline;
+ margin-left: 1em;
}
#pdownloadnotes {
main_section = 'main'
main_archive = 'us'
standard_priority = 'optional'
+
+ suite_aliases = {
+ sarge => 'oldstable',
+ etch => 'stable',
+ lenny => 'testing',
+ sid => 'unstable',
+ }
%]
#only amd64,i386 "ftp.debian.org/debian",
"ftp.egr.msu.edu/debian",
"mirrors.kernel.org/debian",
- "debian.crosslink.net/debian",
#not amd64 "ftp-mirror.internap.com/pub/debian",
#only amd64,i386 "ftp.cerias.purdue.edu/pub/os/debian",
- "ftp.lug.udel.edu/debian",
"debian.lcs.mit.edu/debian",
- "debian.teleglobe.net",
"debian.oregonstate.edu/debian",
],
europa => [
"ftp.citkit.ru/pub/HURD/debian",
],
},
-
- nonus => {
- mirror_list => 'http://www.debian.org/mirror/list-non-US',
- north_america => [
-# "ftp.ca.debian.org/debian-non-US",
- "debian.yorku.ca/debian/non-US",
- "mirror.direct.ca/linux/debian-non-US",
- ],
- europa => [
- "non-us.debian.org/debian-non-US",
- "ftp.de.debian.org/debian-non-US",
- "ftp.at.debian.org/debian-non-US",
- "ftp.bg.debian.org/debian-non-US",
- "ftp.cz.debian.org/debian-non-US",
- "ftp.fi.debian.org/debian-non-US",
- "ftp.fr.debian.org/debian-non-US",
- "ftp.hr.debian.org/debian-non-US",
- "ftp.hu.debian.org/debian-non-US",
- "ftp.ie.debian.org/debian-non-US",
- "ftp.is.debian.org/debian-non-US",
- "ftp.it.debian.org/debian-non-US",
- "ftp.nl.debian.org/debian-non-US",
- "ftp.no.debian.org/debian-non-US",
- "ftp.pl.debian.org/debian/non-US",
- "ftp.si.debian.org/debian-non-US",
- "ftp.es.debian.org/debian-non-US",
- "ftp.se.debian.org/debian-non-US",
- "ftp.tr.debian.org/debian-non-US",
- "ftp.uk.debian.org/debian/non-US",
- ],
- australia => [
- "ftp.au.debian.org/debian-non-US",
- "ftp.wa.au.debian.org/debian-non-US",
- "ftp.nz.debian.org/debian-non-US",
- ],
- asia => [
- "ftp.jp.debian.org/debian-non-US",
-# "ftp.kr.debian.org/debian-non-US",
- "linux.csie.nctu.edu.tw/debian-non-US",
- "debian.linux.org.tw/debian-non-US",
- "linux.cdpa.nsysu.edu.tw/debian-non-US",
- ],
- south_america => [
- "ftp.br.debian.org/debian-non-US",
- "ftp.cl.debian.org/debian-non-US",
- ],
- },
}
ports_url = 'http://www.debian.org/ports/'
[% file %]
[% '</pre></div>' IF loop.last -%]
[% END %]
+
+[%- PROCESS 'html/foot.tmpl' -%]
<!--UdmComment-->
<p>This page is also available in the following languages:</p>
<p class="navpara">
-[% FOREACH langs %]
-<a href="[% "$page_name?lang=$lang" %]" title="[% tooltip %]" hreflang="[% lang %]" lang="[% lang %]" rel="alternate">[% selfname %]
-[%- IF transliteration %] ([% transliteration %])[% END %]</a>
+[% FOREACH l IN langs %]
+<a href="[% "$page_name?lang=$l.lang" %]" title="[% l.tooltip %]" hreflang="[% l.lang %]" lang="[% l.lang %]" rel="alternate">[% l.selfname %]
+[%- IF l.transliteration %] ([% l.transliteration %])[% END %]</a>
[% END %]
</p>
<p>How to set <a href="[% cn_help_url %]">the default document language</a></p>
package names</option>
<option value="all" [% selected IF search_field_values.searchon == 'all' %]>descriptions</option>
<option value="sourcenames" [% selected IF search_field_values.searchon == 'sourcenames' %]>source package names</option>
-<option value="contents" [% selected IF search_field_values.searchon == 'contents' %]>package contents</option
+<option value="contents" [% selected IF search_field_values.searchon == 'contents' %]>package contents</option>
</select>
<input type="text" size="30" name="keywords" value="[% search_field_values.keywords | html %]" id="kw">
<span style="font-size: 60%"><a href="[% searchformurl %]">all options</a></span>
[% END %]
[% IF providers.size %]
<dt><a href="[% name %]" id="[% name %]">[% name %]</a></dt>
- <dd>virtual package provided by [% FOREACH provider IN providers %]<a href="../[% provider | uri %]">[% provider %]</a>[% END %]</dd>
+ <dd>virtual package provided by
+ [% FOREACH provider IN providers %]<a href="../[% provider | uri %]">[% provider %]</a>
+ [%- ', ' UNLESS loop.last %][% END %]</dd>
[% IF versions.length %]
<dt><a href="[% name %]">[% name %]</a> ([% versions %])[% PROCESS markers %]</dt>
<dd>[% desc | html %]</dd>
-%]
<h1>New Packages in "[% suite %]"</h1>
-<p>The following packages were added to suite <em>[% suite %]</em>[% " (section $section)" IF section %] in the [% organisation %] archive during the last 7 days.</p>
+<p>The following packages were added to suite <em>[% suite %]</em>[% " (section $section)" IF section %] in the [% organisation %] archive during the last 7 days. You can also display this list
+[%- IF opts.mode == 'byage' %]
+ <a href="[% make_url('newpkg','','mode','') %]">sorted by name</a>
+[%- ELSE %]
+ <a href="[% make_url('newpkg','mode=byage') %]">sorted by age</a>
+[%- END %].</p>
<p>This information is also available as an <a href="newpkg?format=rss">RSS feed</a>
<a href="newpkg?format=rss"><img src="http://planet.debian.org/rss10.png" alt="[RSS 1.0 Feed]"></a></p>
[% END %]
[% IF too_many_hits %]
-[% IF opts.search != "names" %]
+[% IF opts.searchon != "names" %]
<p id="psearchtoomanyhits">Note that this only shows the best matches, sorted by relevance.
If the first few packages don't match what you searched for, try using more keywords or alternative
keywords.</p>
[% FOREACH packages %]
<h3>Package [% pkg %]</h3>
<ul>
- [% FOREACH s IN suites %]
- <li class="[% s.suite %]"><a class="resultlink" href="[% make_url(pkg,'','suite',s.suite,'arch','','section','') %]">[% s.suite %]</a>[% ' (' _ s.subsection _ ')' IF s.subsection %]: [% s.desc %] [%- IF s.section != main_section %] [<strong class="pmarker">[% s.section %]</strong>][% END %]
+ [% FOREACH s IN suites;
+ suite = s.suite %]
+ <li class="[% suite %]"><a class="resultlink" href="[% make_url(pkg,'','suite',suite,'arch','','section','') %]">[% suite %]
+ [%- ' (' _ suite_aliases.$suite _ ')' IF suite_aliases.$suite %]</a>[% ' (' _ s.subsection _ ')' IF s.subsection %]: [% s.desc %] [%- IF s.section != main_section %] [<strong class="pmarker">[% s.section %]</strong>][% END %]
[% FOREACH s.versions %]
<br>[% version %] [%- IF archive != main_archive %] [<strong class="pmarker">[% archive %]</strong>][% END %]: [% architectures.join(' ') %]
[% END %]
[% PROCESS 'config/archive_layout.tmpl' %]
[% PROCESS 'config/mirrors.tmpl' %]
-[%- nav_arr = [ { prefix=>'Distribution:', title=>'Overview over this suite', url=>make_url('/','','source',''), name=>suite }, ];
+[%- 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");
+-%]
+[%- 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 } ); -%]
<h1>Package: [% pkg %] ([% versions.short %])
[% END %]
[%- PROCESS marker text=archive IF archive && archive != main_archive %]
-[%- PROCESS marker text=subsection IF subsection == 'non-US' and archive != 'non-US' %]
[%- PROCESS marker text=section IF section && section != main_section %]
[%- PROCESS marker text='essential' IF page.get_newest('essential') == 'yes' %]</h1>
<li><a href="[% pts_url _ pkg | uri %]">Developer Information (PTS)</a></li>
[%- END %]
-[% IF files %]
+[% IF files && (!archive or archive == main_archive or archive == 'security') %]
<li><a href="[% changelogs_url _ files.changelog.path %]">Debian Changelog</a></li>
<li><a href="[% changelogs_url _ files.copyright.path %]">Copyright File</a></li>
[% END %]
-</ul>
-[% 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 %]
+<li><a href="[% vcs_link %]" class="pvcslink">Debian Source Repository</a>
+[%- 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; %]
-<p>Debian Package Repository (<acronym title="Version Control System">VCS</acronym>:
-<a href="[% make_url(vcs_pkg,'','source','') %]">[% vcs_name %]</a>):<br> <a href="[% vcs_info %]" class="pvcslink">[% vcs_info %]</a></p>
-[% IF vcs_link %]
-<p>Debian Package Repository (Browsable):<br> <a href="[% vcs_link %]" class="pvcslink">[% vcs_link %]</a></p>
-[% END; END; END %]
+ IF vcs_info %]
+ (<a href="[% vcs_info %]" class="pvcslink">[% vcs_name %]</a>)
+[% END %]
+</li>
+[% END; END %]
+
+</ul>
[% IF src %]
<p>Download Source Package <a href="[% src.url %]">[% src.pkg %]</a>:
[% IF maintainers.size == 1 -%]
<h3>Maintainer:</h3>
- [%- FOREACH maintainers -%]
- <a href="mailto:[% mail %]">[% name | html %]</a>
- (<a href="[% ddpo_url _ mail %]" title="An overview over the maintainer's packages and uploads">QA Page</a>)
- [%- END -%]
[%- ELSE -%]
<h3>Maintainers:</h3>
- [%- FOREACH maintainers -%]
- [%- '<ul>' IF loop.first -%]
+[%- END %]
+[%- FOREACH maintainers -%]
+ [%- '<ul>' IF loop.first -%]
<li><a href="mailto:[% mail %]">[% name | html %]</a>
(<a href="[% ddpo_url _ mail %]" title="An overview over the maintainer's packages and uploads">QA Page</a>)
</li>
- [%- '</ul>' IF loop.last -%]
- [%- END -%]
-[%- END %]
+ [%- '</ul>' IF loop.last -%]
+[%- END -%]
[% url = page.get_newest('url');
+ SET url = page.get_newest('homepage') IF page.get_newest('homepage');
IF url %]
<h3>External Resources:</h3>
-<p>Homepage: <a href="[% url | uri %]">[% url | html %]</a></p>
+<ul>
+<li><a href="[% url | uri %]">Homepage</a> [[% extract_host(url) %]]</li>
+</ul>
+[% END %]
+
+[% FOREACH sim IN similar %]
+ [% IF loop.first %]
+ <h3>Similar packages:</h3>
+ <ul>
+ [% END %]
+ <li><a href="/[% sim %]">[% sim %]</a></li>
+ [% '</ul>' IF loop.last %]
[% END %]
</div> <!-- end pmoreinfo -->
<div id="pdeps">
<h2>Other Packages Related to [% pkg %]</h2>
- <table id="pdeplegend" summary="legend"><tr>
+ <table id="pdeplegend" class="visual" summary="legend"><tr>
[% IF is_source %]
- <td><img src="/Pics/adep.gif" alt="[adep]" width="16" height="16">= build-depends</td>
- <td><img src="/Pics/idep.gif" alt="[idep]" width="16" height="16">= build-depends-indep</td>
+ <td><ul class="uladep"><li>build-depends</li></ul></td>
+ <td><ul class="ulidep"><li>build-depends-indep</li></ul></td>
[% ELSE %]
- <td><img src="/Pics/dep.gif" alt="[dep]" width="16" height="16">= depends</td>
- <td><img src="/Pics/rec.gif" alt="[rec]" width="16" height="16">= recommends</td>
- <td><img src="/Pics/sug.gif" alt="[sug]" width="16" height="16">= suggests</td>
+ <td><ul class="uldep"><li>depends</li></ul></td>
+ <td><ul class="ulrec"><li>recommends</li></ul></td>
+ <td><ul class="ulsug"><li>suggests</li></ul></td>
[% END %]
</tr></table>
[%- END %]
[% '<li>' UNLESS is_old_pkgs %]
[% FOREACH alternatives %]
[% '<dl>' IF loop.first %]
- <dt>[% IF loop.first %]<img class="hidecss" src="/Pics/[% id %].gif" alt="[[% id %]]">[% ELSE %]or [% END %]
+ <dt>[% IF loop.first %]<span class="nonvisual">[% id %]:</span>[% ELSE %]or [% END %]
[% IF suite %]<a href="[% make_url(name,'','suite',suite,'source','') %]">[% name %]</a>[% ELSE %][% name %][% END %]
[% ' (' _ version _ ')' IF version %]
[% ' [' _ arch_str _ ']' IF arch_str %]</dt>
[% IF loop.last -%]
</table>
+[% 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; %]
+<dl>
+<dt>Debian Package Source Repository (<acronym title="Version Control System">VCS</acronym>: <a href="[% make_url(vcs_pkg,'','source','') %]">[% vcs_name %]</a>)</dt>
+<dd><a href="[% vcs_info %]" class="pvcslink">[% vcs_info %]</a></dd>
+[% IF vcs_link %]
+<dt>Debian Package Source Repository (Browsable)</dt><dd><a href="[% vcs_link %]" class="pvcslink">[% vcs_link %]</a></dd>
+[% END %]
+</dl>
+[% END; END %]
+
</div> <!-- end pdownload -->
[%- END %]
[% END %]
-<script type="text/javascript">init_tab_list("ptablist")</script>
+[%# <script type="text/javascript">init_tab_list("ptablist")</script> %]
[%- PROCESS 'html/foot.tmpl' -%]
See <URL:[% license.url %]> 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 -%]
[%- END -%]
- [%- IF providers %]
+ [%- IF providers.size %]
[% name %] virtual package provided by [% providers.join(', ') %]
[%- END -%]
[%- IF versions %]