From e74ae0ae675fa1a1e8ac4d4663bf53124346eba8 Mon Sep 17 00:00:00 2001 From: Yorhel Date: Wed, 20 Jun 2012 17:59:28 +0200 Subject: [PATCH] Added the remaining Ubuntu releases --- schema.sql | 25 +++++++++----- util/deb.sh | 94 ++++++++++++++++++++++++++++++++++++++++++++++++++-- www/index.pl | 15 +++++---- 3 files changed, 116 insertions(+), 18 deletions(-) diff --git a/schema.sql b/schema.sql index 30932c1..93936a8 100644 --- a/schema.sql +++ b/schema.sql @@ -53,14 +53,23 @@ CREATE INDEX ON man USING hash (hash); INSERT INTO systems (id, name, release, short, relorder) VALUES - (1, 'Arch Linux', NULL, 'arch', 0), - (2, 'Ubuntu', '4.10', 'ubuntu-warty', 0), - (3, 'Ubuntu', '5.04', 'ubuntu-hoary', 1), - (4, 'Ubuntu', '5.10', 'ubuntu-breezy', 2), - (5, 'Ubuntu', '6.06', 'ubuntu-dapper', 3), - (6, 'Ubuntu', '6.10', 'ubuntu-edgy', 4), - (7, 'Ubuntu', '7.04', 'ubuntu-feisty', 5), - (8, 'Ubuntu', '7.10', 'ubuntu-gutsy', 6); + (1, 'Arch Linux', NULL, 'arch', 0), + (2, 'Ubuntu', '4.10', 'ubuntu-warty', 0), + (3, 'Ubuntu', '5.04', 'ubuntu-hoary', 1), + (4, 'Ubuntu', '5.10', 'ubuntu-breezy', 2), + (5, 'Ubuntu', '6.06', 'ubuntu-dapper', 3), + (6, 'Ubuntu', '6.10', 'ubuntu-edgy', 4), + (7, 'Ubuntu', '7.04', 'ubuntu-feisty', 5), + (8, 'Ubuntu', '7.10', 'ubuntu-gutsy', 6), + (9, 'Ubuntu', '8.04', 'ubuntu-hardy', 7), + (10, 'Ubuntu', '8.10', 'ubuntu-intrepid', 8), + (11, 'Ubuntu', '9.04', 'ubuntu-jaunty', 9), + (12, 'Ubuntu', '9.10', 'ubuntu-karmic', 10), + (13, 'Ubuntu', '10.04', 'ubuntu-lucid', 11), + (14, 'Ubuntu', '10.10', 'ubuntu-maverick', 12), + (15, 'Ubuntu', '11.04', 'ubuntu-natty', 13), + (16, 'Ubuntu', '11.10', 'ubuntu-oneiric', 14), + (17, 'Ubuntu', '12.04', 'ubuntu-precise', 15); -- Removes any path components and compression extensions from the filename. diff --git a/util/deb.sh b/util/deb.sh index 0cacc7b..f87f8f4 100755 --- a/util/deb.sh +++ b/util/deb.sh @@ -30,7 +30,16 @@ checkpkg() { # Extract and handle the man pages if [ "$?" -eq 0 -a -n "$PKGID" ]; then - ar p "$FN" data.tar.gz | ./add_tar.sh - $PKGID -z + DATAFN=`ar t $FN | grep -F data.tar` + case "$DATAFN" in + "data.tar.gz") DATAZ="-z" ;; + "data.tar.bz2") DATAZ="-j" ;; + "data.tar.lzma") DATAZ="--lzma" ;; + "data.tar.xz") DATAZ="-J" ;; + *) echo "No data.tar found, or unknown compression format."; DATAZ="ERR" ;; + esac + + [ "$DATAZ" != "ERR" ] && ar p "$FN" "$DATAFN" | ./add_tar.sh - $PKGID $DATAZ fi rm "$FN" @@ -89,7 +98,7 @@ syncrepo() { if($p && $v && $s && $f) { print "$p $v $s $f" if $pkg{$p} && $pkg{$p} == 1 && !$db->selectrow_arrayref(q{SELECT 1 FROM package WHERE system = ? AND name = ? AND version = ?}, {}, $sysid, $p, $v); - warn "Duplicate package? $p\n" if $pkg{$p} && $pkg{$p} == 2; + #warn "Duplicate package? $p\n" if $pkg{$p} && $pkg{$p} == 2; $pkg{$p} = 2; } $p=$v=$f=undef @@ -106,6 +115,8 @@ EOP } + + # TODO: backports? ubuntu_warty() { @@ -162,7 +173,84 @@ ubuntu_gutsy() { syncrepo 8 "http://old-releases.ubuntu.com/ubuntu/" "gutsy-security" "main multiverse restricted universe" } -ubuntu_gutsy +ubuntu_hardy() { + syncrepo 9 "http://nl.archive.ubuntu.com/ubuntu/" "hardy" "main multiverse restricted universe" + syncrepo 9 "http://nl.archive.ubuntu.com/ubuntu/" "hardy-updates" "main multiverse restricted universe" + syncrepo 9 "http://nl.archive.ubuntu.com/ubuntu/" "hardy-security" "main multiverse restricted universe" +} + +ubuntu_intrepid() { + syncrepo 10 "http://old-releases.ubuntu.com/ubuntu/" "intrepid" "main multiverse restricted universe" + syncrepo 10 "http://old-releases.ubuntu.com/ubuntu/" "intrepid-updates" "main multiverse restricted universe" + syncrepo 10 "http://old-releases.ubuntu.com/ubuntu/" "intrepid-security" "main multiverse restricted universe" +} + +ubuntu_jaunty() { + syncrepo 11 "http://old-releases.ubuntu.com/ubuntu/" "jaunty" "main multiverse restricted universe" + syncrepo 11 "http://old-releases.ubuntu.com/ubuntu/" "jaunty-updates" "main multiverse restricted universe" + syncrepo 11 "http://old-releases.ubuntu.com/ubuntu/" "jaunty-security" "main multiverse restricted universe" +} + +ubuntu_karmic() { + syncrepo 12 "http://old-releases.ubuntu.com/ubuntu/" "karmic" "main multiverse restricted universe" + syncrepo 12 "http://old-releases.ubuntu.com/ubuntu/" "karmic-updates" "main multiverse restricted universe" + syncrepo 12 "http://old-releases.ubuntu.com/ubuntu/" "karmic-security" "main multiverse restricted universe" +} + +ubuntu_lucid() { + syncrepo 13 "http://nl.archive.ubuntu.com/ubuntu/" "lucid" "main multiverse restricted universe" + syncrepo 13 "http://nl.archive.ubuntu.com/ubuntu/" "lucid-updates" "main multiverse restricted universe" + syncrepo 13 "http://nl.archive.ubuntu.com/ubuntu/" "lucid-security" "main multiverse restricted universe" +} + +ubuntu_maverick() { + syncrepo 14 "http://nl.archive.ubuntu.com/ubuntu/" "maverick" "main multiverse restricted universe" + syncrepo 14 "http://nl.archive.ubuntu.com/ubuntu/" "maverick-updates" "main multiverse restricted universe" + syncrepo 14 "http://nl.archive.ubuntu.com/ubuntu/" "maverick-security" "main multiverse restricted universe" +} + +ubuntu_natty() { + syncrepo 15 "http://nl.archive.ubuntu.com/ubuntu/" "natty" "main multiverse restricted universe" + syncrepo 15 "http://nl.archive.ubuntu.com/ubuntu/" "natty-updates" "main multiverse restricted universe" + syncrepo 15 "http://nl.archive.ubuntu.com/ubuntu/" "natty-security" "main multiverse restricted universe" +} + +ubuntu_oneiric() { + syncrepo 16 "http://nl.archive.ubuntu.com/ubuntu/" "oneiric" "main multiverse restricted universe" + syncrepo 16 "http://nl.archive.ubuntu.com/ubuntu/" "oneiric-updates" "main multiverse restricted universe" + syncrepo 16 "http://nl.archive.ubuntu.com/ubuntu/" "oneiric-security" "main multiverse restricted universe" +} + +ubuntu_precise() { + syncrepo 17 "http://nl.archive.ubuntu.com/ubuntu/" "precise" "main multiverse restricted universe" + syncrepo 17 "http://nl.archive.ubuntu.com/ubuntu/" "precise-updates" "main multiverse restricted universe" + syncrepo 17 "http://nl.archive.ubuntu.com/ubuntu/" "precise-security" "main multiverse restricted universe" +} + +ubuntu_old() { + ubuntu_warty + ubuntu_hoary + ubuntu_breezy + ubuntu_dapper + ubuntu_edgy + ubuntu_feisty + ubuntu_gutsy + ubuntu_intrepid + ubuntu_jaunty + ubuntu_karmic + ubuntu_maverick +} + +ubuntu_active() { + ubuntu_hardy # until 2013-04 + ubuntu_lucid # until 2015-04 + ubuntu_natty # until 2012-10 + ubuntu_oneiric # until 2013-04 + ubuntu_precise # until 2017-04 +} + + +"$@" rm -rf "$TMP" diff --git a/www/index.pl b/www/index.pl index 7783210..6ba499f 100755 --- a/www/index.pl +++ b/www/index.pl @@ -56,9 +56,9 @@ sub home { p style => 'float: none'; # Relevant query: SELECT count(distinct hash), count(distinct name), count(*), count(distinct package) FROM man; # It's far too slow to run that on every pageview. :-( - lit 'Indexing 185,211 versions of 76,549 manual pages found in 515,783 files of 52,088 packages.'; + lit 'Indexing 483,771 versions of 119,397 manual pages found in 1,574,505 files of 169,949 packages.'; br; - txt 'At this point only Arch Linux and some Ubuntu releases have been indexed. More systems and repositories will be added later on.'; + txt 'At this point only Arch Linux and Ubuntu have been indexed. More systems and repositories will be added later on.'; end; h2 'Browse the manuals'; @@ -116,11 +116,12 @@ sub about { The core, extra and community repositories are fetched from a local Arch mirror.
Ubuntu
- Historical releases were fetched from - http://old-releases.ubuntu.com/ubuntu/. - All components (main, universe, restricted and multiverse) are fetched - from the $release, $release-updates and $release-security repositories. - Backports are not included at the moment.
+ Historical releases were fetched from http://old-releases.ubuntu.com/ubuntu/, + supported releases from a local mirror. All components (main, universe, + restricted and multiverse) from the $release, $release-updates and + $release-security repositories are indexed. Backports are not included at + the moment.
Only packages for a single architecture (i386 or i686) are scanned. To my knowledge, packages that come with different manuals for different