From: Frank Lichtenheld Date: Fri, 14 Sep 2007 21:35:54 +0000 (+0000) Subject: Merge commit 'origin/master' into debian-master X-Git-Url: https://git.deb.at/?a=commitdiff_plain;h=47685c8e28d6888967c28f9975a973a616bc0762;hp=eb6e312fd73061c1f55d0696ab6686d567831498;p=deb%2Fpackages.git Merge commit 'origin/master' into debian-master --- diff --git a/INSTALL b/INSTALL new file mode 100644 index 0000000..1ebdbb7 --- /dev/null +++ b/INSTALL @@ -0,0 +1,34 @@ +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 ' + (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 + /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 diff --git a/bin/.gitignore b/bin/.gitignore index 77934f6..5f69523 100644 --- a/bin/.gitignore +++ b/bin/.gitignore @@ -1 +1,2 @@ mod_perl-startup +daily diff --git a/bin/create_index_pages b/bin/create_index_pages index 30962ea..8586671 100755 --- a/bin/create_index_pages +++ b/bin/create_index_pages @@ -49,9 +49,16 @@ my $priorities = retrieve "$DBDIR/priorities.info"; #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) { @@ -70,13 +77,6 @@ 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}) { 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 diff --git a/templates/config/mirrors.tmpl b/templates/config/mirrors.tmpl index d80342d..a23ec99 100644 --- a/templates/config/mirrors.tmpl +++ b/templates/config/mirrors.tmpl @@ -113,10 +113,12 @@ mirrors = { ], 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', @@ -126,20 +128,27 @@ mirrors = { 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', @@ -162,11 +171,7 @@ mirrors = { "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", ], }, } diff --git a/templates/html/download.tmpl b/templates/html/download.tmpl index 27a4cf5..4a405f2 100644 --- a/templates/html/download.tmpl +++ b/templates/html/download.tmpl @@ -1,5 +1,5 @@ [%- 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 }, diff --git a/templates/html/index.tmpl b/templates/html/index.tmpl index 043274a..74a30b0 100644 --- a/templates/html/index.tmpl +++ b/templates/html/index.tmpl @@ -10,8 +10,8 @@ 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' diff --git a/templates/html/search.tmpl b/templates/html/search.tmpl index faf582c..78b4786 100644 --- a/templates/html/search.tmpl +++ b/templates/html/search.tmpl @@ -1,18 +1,5 @@ [%- 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); @@ -27,7 +14,19 @@ 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' } ] +-%]
[% UNLESS results %] diff --git a/templates/html/search_contents.tmpl b/templates/html/search_contents.tmpl index 7cfc54f..71a0019 100644 --- a/templates/html/search_contents.tmpl +++ b/templates/html/search_contents.tmpl @@ -1,8 +1,20 @@ +[%- 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', @@ -14,18 +26,6 @@ } -%] -[% 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); -%]