From fa8e08487919453e4aefbb93bf344618f2646fc0 Mon Sep 17 00:00:00 2001 From: Yorhel Date: Mon, 10 Jan 2022 20:05:09 +0100 Subject: [PATCH] Bunch of fixes --- util/debian.sh | 2 +- util/fedora.sh | 2 +- util/ubuntu.sh | 4 ++-- www/index.pl | 24 +++++++++++------------- 4 files changed, 15 insertions(+), 17 deletions(-) diff --git a/util/debian.sh b/util/debian.sh index 7e723ef..79c10a5 100755 --- a/util/debian.sh +++ b/util/debian.sh @@ -65,7 +65,7 @@ case "$1" in ;; bullseye) index_deb debian-bullseye $CMIRROR bullseye "main contrib non-free" cmp amd64 - index_deb debian-bullseye $CMIRROR bullseye-updates "main contrib non-free" cmp amd64 + #index_deb debian-bullseye $CMIRROR bullseye-updates "main contrib non-free" cmp amd64 ;; bookworm) index_deb debian-bookworm $CMIRROR bookworm "main contrib non-free" cmp amd64 diff --git a/util/fedora.sh b/util/fedora.sh index bbd98c2..8151906 100755 --- a/util/fedora.sh +++ b/util/fedora.sh @@ -3,7 +3,7 @@ . ./common.sh AMIRROR=http://archives.fedoraproject.org/pub/archive/fedora/linux/ -CMIRROR=http://ftp.nluug.nl/pub/os/Linux/distr/fedora/linux/ +CMIRROR=http://mirror.nl.leaseweb.net/fedora/linux/ # Fedora 7+ is pretty regular diff --git a/util/ubuntu.sh b/util/ubuntu.sh index 17dd292..b13031c 100755 --- a/util/ubuntu.sh +++ b/util/ubuntu.sh @@ -3,7 +3,7 @@ . ./common.sh AMIRROR=http://old-releases.ubuntu.com/ubuntu/ -CMIRROR=http://nl.archive.ubuntu.com/ubuntu/ +CMIRROR=http://ftp.nluug.nl/os/Linux/distr/ubuntu/ # Shortcut for a standard Ubuntu repo, usage: @@ -162,11 +162,11 @@ case $1 in $0 cosmic $0 disco $0 eoan + $0 groovy ;; current) $0 bionic # until 2023-04 $0 focal # until 2030-04 - $0 groovy # until 2021-07 $0 hirsute # until 2022-01 $0 impish # until 2022-07 ;; diff --git a/www/index.pl b/www/index.pl index fe97206..00b259e 100755 --- a/www/index.pl +++ b/www/index.pl @@ -380,7 +380,7 @@ TUWF::get '/info/about' => sub {
/<name>[.<section>] or /man/<name>[.<section>]
Will try to get the latest and most-close-to-upstream version of a man - page. That this will fetch the man page from any of the available + page. Note that this will fetch the man page from any of the available systems, so may result in confusing scenarios for system-specific documentation. I try to at least keep the selection algorithm stable and deterministic, but can't provide any guarantees. Examples:
@@ -446,9 +446,8 @@ TUWF::get '/info/about' => sub { For a particular version of a package (e.g. /pkg/arch/core/coreutils/8.25-2).
-

Note that this site only indexes packages that actually have manual - pages; Linking to a package that doesn't have any will result in a 404 - page.

+

This site only indexes packages that actually have manual pages, + linking to a package that doesn't have any will result in a 404 page.

The indexing process

@@ -535,9 +534,9 @@ TUWF::get '/info/about' => sub {

The database schema is "documented" at schema.sql - in the git repo. Note that these dumps don't constitute a stable API and, - while this won't happen frequently, incompatible schema changes or Postgres - major version bumps will occassionally occur. + in the git repo. Keep in mind that these dumps don't constitute a stable + API and, while this won't happen frequently, incompatible schema changes + or Postgres major version bumps will occassionally occur.

Other systems

@@ -549,11 +548,10 @@ TUWF::get '/info/about' => sub { binary package based approach, or are otherwise less easy to properly index.

In general, systems that follow an entirely source-based distribution - approach can't be indexed without compiling everything. Since that is both - very resource-heavy and open to security issues, there are no plans to - include manuals from such systems at the moment. So unless someone comes - with a solution I hadn't thought of yet, there won't be any Gentoo manuals - here. :-( + approach can't be indexed without compiling everything. Since that is much + too resource-heavy, there are no plans to include manuals from such + systems at the moment. So unless someone comes with a solution I hadn't + thought of yet, there won't be any Gentoo manuals here. :-(

Future plans

@@ -1042,7 +1040,7 @@ TUWF::get qr{/pkg/([^/]+)/(.+)} => sub { ul_ sub { li_ sub { # Only add the hash or locale to the URL if it's necessary to select the proper man page. - my $ext = $_->{needhash} ? '.'.shorthash_to_hex $_->{shorthash} : $_->{needlang} ? ".$_->{locale}" : ''; + my $ext = $_->{needhash} ? '.'.shorthash_to_hex $_->{shorthash} : $_->{needlang} && length $_->{locale} ? ".$_->{locale}" : ''; a_ href => "/man$ext/$pkgpath/$sel->{version}/$_->{name}.$_->{section}", "$_->{name}($_->{section})"; b_ " $_->{locale}" if $_->{locale}; small_ " $_->{filename}";