--- /dev/null
+INSTALL
+=======
+
+This should give you an idea about the basic steps. It is probably very rough
+around the edges, feel free to ask for clarifications so we can improve it.
+
+This guide assumes you are working on a Debian etch system. If that is not the
+case, you might have to adjust some of the steps.
+
+1) Install git (package git-core). You will get a much more pleasant user
+ experience if you use a version from backports.org or a self-compiled one
+ instead of etch's version.
+2) Download the code from git://source.djpig.de/git/packages.git
+ (Something like `git clone git://source.djpig.de/git/packages.git')
+3) Install the needed dependencies. A list can be found in cron.d/050checkinst.
+ One dependency can't be fulfilled directly from etch and is therefor not listed
+ there: the Search::Xapian perl module. You can either compile that yourself against
+ libxapian from etch, backport all of xapian and libsearch-xapian-perl from
+ lenny, or install the 0.9.9-1 deb from snapshots.debian.net.
+4) Install apache2 (apache2-mpm-worker) and mod_perl (libapache2-mod-perl2)
+5) Adjust the configuration to your needs. You should at least edit the following
+ files before starting to test:
+ - ./config.sh.sed.in
+ - ./templates/config.tmpl
+ - ./templates/config/*
+ - ./conf/apache.conf.sed.in
+6) run `./bin/setup-site <topdir> <site>'
+ (e.g. `./bin/setup-site /org/packages.debian.org packages.debian.org')
+7) create a cache directory for the compiled templates, it needs to be writable by
+ apache (i.e. on default etch by www-data). Default location is
+ <topdir>/cache
+7) Include ./conf/apache.conf in apache's configuration, e.g. by symlinking it from
+ /etc/apache2/sites-available/ and then using a2ensite
+8) Run ./bin/daily
#use Data::Dumper;
#print STDERR Dumper($sections, $subsections, $priorities);
-my (%pages);
+my (%pages, %tt_vars);
-my $template = new Packages::Template( "$TOPDIR/templates", 'html', {} );
+$tt_vars{make_search_url} = sub { return &Packages::CGI::make_search_url(@_) };
+$tt_vars{make_url} = sub { return &Packages::CGI::make_url(@_) };
+# needed to work around the limitations of the the FILTER syntax
+$tt_vars{html_encode} = sub { return HTML::Entities::encode_entities(@_,'<>&"') };
+$tt_vars{uri_escape} = sub { return URI::Escape::uri_escape(@_) };
+$tt_vars{quotemeta} = sub { return quotemeta($_[0]) };
+
+my $template = new Packages::Template( "$TOPDIR/templates", 'html', \%tt_vars );
print "write suite index files ...\n";
foreach my $s (@SUITES) {
my %content = ( subsections => [], suite => $s,
lang => $lang, charset => $charset,
used_langs => \@LANGUAGES, suites => \@SUITES );
- $content{make_search_url} = sub { return &Packages::CGI::make_search_url(@_) };
- $content{make_url} = sub { return &Packages::CGI::make_url(@_) };
- # needed to work around the limitations of the the FILTER syntax
- $content{html_encode} = sub { return HTML::Entities::encode_entities(@_,'<>&"') };
- $content{uri_escape} = sub { return URI::Escape::uri_escape(@_) };
- $content{quotemeta} = sub { return quotemeta($_[0]) };
-
foreach my $ssec ((keys %{$subsections->{$s}}, 'virtual')) {
next if $ssec eq '-';
if ($sections_descs{$ssec}) {
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
],
australia => [
"mirror.linux.org.au/backports.org",
+ "mirror.pacific.net.au/linux/debian-backports",
],
},
amd64 => {
+ mirror_list => 'http://amd64.debian.net/README.mirrors.html',
unofficial_port => {
amd64 => {
url_name => 'amd64',
europa => [
"amd64.debian.net/debian",
"ftp.de.debian.org/debian-amd64/debian",
- "bach.hpc2n.umu.se/debian-amd64/debian",
+ "ftp.es.debian.org/debian-amd64/debian",
+ "ftp.nl.debian.org/debian-amd64/debian",
+ "ftp.sk.debian.org/debian-amd64/debian",
"bytekeeper.as28747.net/debian-amd64/debian",
"mirror.switch.ch/debian-amd64/debian",
- "ftp.nl.debian.org/debian-amd64/debian",
],
asia => [
+ "ftp.jp.debian.org/debian-amd64/debian/",
"hanzubon.jp/debian-amd64/debian",
],
north_america => [
"mirror.espri.arizona.edu/debian-amd64/debian",
+ "debian.csail.mit.edu/debian-amd64/debian",
+ ],
+ australia => [
+ "public.planetmirror.com/pub/debian-amd64/debian",
],
},
gnuab => {
+ mirror_list => 'http://wiki.debian.org/Debian_GNU/kFreeBSD_Mirrors',
unofficial_port => {
'kfreebsd-amd64' => {
url_name => 'kfreebsd-gnu',
"kfreebsd-gnu.debian.net/debian",
"ftp.easynet.be/ftp/gnuab/debian",
"ftp.de.debian.org/debian-kfreebsd",
- "ftp.sh.cvut.cz/MIRRORS/debian-non-linux",
- "ftp.eila.jussieu.fr/pub/Debian-gnuab",
- ],
- asia => [
- "ftp.citkit.ru/pub/HURD/debian",
+ "ftp.ch.debian.org/debian-kfreebsd",
],
},
}
[%- PROCESS 'html/head.tmpl'
- title_tag = 'Package Download Selection'
+ title_tag = "Package Download Selection -- $filename.file"
description = desc
keywords = "$suite, $archive, $section, $subsection, $version"
navigation = [ { prefix=>'Distribution:', title=>'Overview over this suite', url=>make_url('/'), name=>suite },
nav_last = { name=>'All Packages' };
END;
nav_arr.push( { name=>'Source',
- url=>make_url('/','','suite',suite,'source',source) } )
- IF source;
+ url=>make_url('/','','suite',suite,'source','source') } )
+ IF is_source;
nav_arr.push( nav_last );
%]
[% PROCESS 'html/head.tmpl'
[%- PROCESS 'config/archive_layout.tmpl' -%]
-[%- PROCESS 'html/head.tmpl'
- title_tag = 'Debian Package Search Results'
- print_search_field = 'packages'
- search_field_values = {
- keywords => search_keywords.join(' '),
- searchon => opts.searchon_form,
- suite => params.values.suite.no_replace.join(','),
- architectures => params.values.arch.no_replace.join(','),
- sections => params.values.section.no_replace.join(','),
- }
- navigation = [ { name => 'Package Search Results' } ]
--%]
-
-[% keyword_str = search_keywords.join(' ');
+[%- keyword_str = search_keywords.join(' ');
keyword_esc = uri_escape(keyword_str);
keyword_enc = html_encode(keyword_str);
architectures_str = params.values.arch.no_replace.join(', ');
architectures_esc = uri_escape(architectures_str);
architectures_enc = html_encode(architectures_str);
-%]
+-%]
+[%- PROCESS 'html/head.tmpl'
+ title_tag = "Package Search Results -- $keyword_enc"
+ print_search_field = 'packages'
+ search_field_values = {
+ keywords => search_keywords.join(' '),
+ searchon => opts.searchon_form,
+ suite => params.values.suite.no_replace.join(','),
+ architectures => params.values.arch.no_replace.join(','),
+ sections => params.values.section.no_replace.join(','),
+ }
+ navigation = [ { name => 'Package Search Results' } ]
+-%]
<div id="psearchsug">
[% UNLESS results %]
+[%- keyword_str = search_keywords.join(' ');
+ keyword_esc = uri_escape(keyword_str);
+ keyword_enc = html_encode(keyword_str);
+
+ section_str = params.values.section.no_replace.join(', ');
+ section_esc = uri_escape(section_str);
+ section_enc = html_encode(section_str);
+
+ architectures_str = params.values.arch.no_replace.join(', ');
+ architectures_esc = uri_escape(architectures_str);
+ architectures_enc = html_encode(architectures_str);
+-%]
[%- PROCESS 'html/head.tmpl'
- title_tag = "$organisation Package Contents Search Results"
+ title_tag = "Package Contents Search Results -- $keyword_enc"
keywords = "$suite"
print_search_field = 'packages'
- navigation = [ { title => '', name => 'Packages Contents Search Results', url => '' } ]
+ navigation = [ { title => '', name => 'Package Contents Search Results', url => '' } ]
search_field_values = {
keywords => search_keywords.join(' '),
searchon => 'contents',
}
-%]
-[% keyword_str = search_keywords.join(' ');
- keyword_esc = uri_escape(keyword_str);
- keyword_enc = html_encode(keyword_str);
-
- section_str = params.values.section.no_replace.join(', ');
- section_esc = uri_escape(section_str);
- section_enc = html_encode(section_str);
-
- architectures_str = params.values.arch.no_replace.join(', ');
- architectures_esc = uri_escape(architectures_str);
- architectures_enc = html_encode(architectures_str);
-%]
<div id="psearchsug">
<ul class="linklist">