Merge lp:ubuntu-manpage-repository into lp:~ya-bo-ng/ubuntu-manpage-repository/add-gtm

Proposed by Anthony Dillon
Status: Needs review
Proposed branch: lp:ubuntu-manpage-repository
Merge into: lp:~ya-bo-ng/ubuntu-manpage-repository/add-gtm
Diff against target: 409 lines (+115/-72)
7 files modified
bin/fetch-man-pages.sh (+12/-12)
bin/make-manpage-repo.sh (+83/-45)
bin/manpages-modify-config (+4/-0)
bin/w3mman-to-html.pl (+6/-6)
cgi-bin/search.py (+4/-4)
examples/config (+2/-1)
www/functions.js (+4/-4)
To merge this branch: bzr merge lp:ubuntu-manpage-repository
Reviewer Review Type Date Requested Status
Christian Ehrhardt  (community) Approve
Anthony Dillon Pending
Review via email: mp+455501@code.launchpad.net

Commit message

Add GTM tags to the head and body to enable Google Analytics to track usage

To post a comment you must log in.
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Ack to the changes themselve
This is the new version of https://bazaar.launchpad.net/~dpb/ubuntu-manpage-repository/ga-update/revision/220 which everybody believed to have landed in the past (surprise, it did not)

As coordinated via mail, this MR is the wrong way around and not towards the production repo.
I'll integrate it directly after checking some constraints with the release people usually updating it.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :
review: Approve
lp:ubuntu-manpage-repository updated
234. By Christian Ehrhardt 

Merge production branch back to trunk

235. By Christian Ehrhardt 

config: revert back to just release names

Turns out that we need all pockets anyway and will teach the script
to iterate over them. So the config can be simple release names just
like it always was.

236. By Christian Ehrhardt 

Need to consider all pockets

The former change to allo to define release-updates in the config
worked, but only so far to pick up the content of -updates.

Obviously packages that never got an update so far are not listed
at all in the Packages.gz behind -updates and therefore were forgotten.

Fix this by reverting the config back to just release names and on the
other hand extending make-manpage-repo.sh to always look for release,
-updates and -security.

237. By Christian Ehrhardt 

Use dpkg compare-version

Instead of just hoping they are in order use dpkg compare-version
to identify which content needs to be (re-)rendered.

238. By Christian Ehrhardt 

rename src -> binpkg as we handle binary packages

Many archive tools handle source packages, but this parses and
iterates binaries. Make it less misleading by fixing the
variable names and log out put to say binpkg instead of calling
them src.

239. By Christian Ehrhardt 

Track versions in the right context

The while loop used to be a subshell behind curl + processing.
To properly track versions that were already handled it has to
move into the same context as the rest of the program.

While touching the decision making on which package to process
ensure that each path creates a log entry and make them all
follow the same pattern which eases log reading.

240. By Christian Ehrhardt 

Remove debug output

Further unify output text and remove debug-only content.

241. By Christian Ehrhardt 

Process releases concurrently

Execution is slow and mostly toggling between being CPU bound (conversion)
and network bound (download). Making releases run concurrently allows
to utilize more CPUs at once and the network more continuously.

242. By Christian Ehrhardt 

remove trailing whitespace

243. By Christian Ehrhardt 

Add missing whitespace in log entry

244. By Christian Ehrhardt 

Add timing into to the log entries

Since we are debugging the slow execution on prodstack that might help
to compare and track execution.

Unmerged revisions

244. By Christian Ehrhardt 

Add timing into to the log entries

Since we are debugging the slow execution on prodstack that might help
to compare and track execution.

243. By Christian Ehrhardt 

Add missing whitespace in log entry

242. By Christian Ehrhardt 

remove trailing whitespace

241. By Christian Ehrhardt 

Process releases concurrently

Execution is slow and mostly toggling between being CPU bound (conversion)
and network bound (download). Making releases run concurrently allows
to utilize more CPUs at once and the network more continuously.

240. By Christian Ehrhardt 

Remove debug output

Further unify output text and remove debug-only content.

239. By Christian Ehrhardt 

Track versions in the right context

The while loop used to be a subshell behind curl + processing.
To properly track versions that were already handled it has to
move into the same context as the rest of the program.

While touching the decision making on which package to process
ensure that each path creates a log entry and make them all
follow the same pattern which eases log reading.

238. By Christian Ehrhardt 

rename src -> binpkg as we handle binary packages

Many archive tools handle source packages, but this parses and
iterates binaries. Make it less misleading by fixing the
variable names and log out put to say binpkg instead of calling
them src.

237. By Christian Ehrhardt 

Use dpkg compare-version

Instead of just hoping they are in order use dpkg compare-version
to identify which content needs to be (re-)rendered.

236. By Christian Ehrhardt 

Need to consider all pockets

The former change to allo to define release-updates in the config
worked, but only so far to pick up the content of -updates.

Obviously packages that never got an update so far are not listed
at all in the Packages.gz behind -updates and therefore were forgotten.

Fix this by reverting the config back to just release names and on the
other hand extending make-manpage-repo.sh to always look for release,
-updates and -security.

235. By Christian Ehrhardt 

config: revert back to just release names

Turns out that we need all pockets anyway and will teach the script
to iterate over them. So the config can be simple release names just
like it always was.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'bin/fetch-man-pages.sh'
--- bin/fetch-man-pages.sh 2018-06-05 23:34:38 +0000
+++ bin/fetch-man-pages.sh 2023-12-07 08:37:19 +0000
@@ -43,7 +43,7 @@
43NAME_AND_VER=$(echo "$PKG" | sed "s/\.deb$//")43NAME_AND_VER=$(echo "$PKG" | sed "s/\.deb$//")
44DEB="$TEMPDIR/$PKG"44DEB="$TEMPDIR/$PKG"
4545
46echo "INFO: fetching: $PKGURL"46echo "INFO ($(date '+%H:%M:%S.%N')) - ${DIST}: fetching: $PKGURL"
47curl --silent "$PKGURL" > "$DEB"47curl --silent "$PKGURL" > "$DEB"
4848
49DESTDIR="$PUBLIC_HTML_DIR/manpages/$DIST"49DESTDIR="$PUBLIC_HTML_DIR/manpages/$DIST"
@@ -52,13 +52,13 @@
52export W3MMAN_MAN='man --no-hyphenation'52export W3MMAN_MAN='man --no-hyphenation'
53export MAN_KEEP_FORMATTING=153export MAN_KEEP_FORMATTING=1
5454
55echo "INFO: Looking for manpages in [$DEB]"55echo "INFO ($(date '+%H:%M:%S.%N')) - ${DIST}: Looking for manpages in [$DEB]"
56# The .*man bit is to handle postgres' inane manpage installation56# The .*man bit is to handle postgres' inane manpage installation
57man=$(dpkg-deb -c "$DEB" | grep -E " \./usr/share.*/man/.*\.[0-9][a-zA-Z0-9\.\-]*\.gz$" | sed -e "s/^.*\.\//\.\//" -e "s/ \-> /\->/")57man=$(dpkg-deb -c "$DEB" | grep -E " \./usr/share.*/man/.*\.[0-9][a-zA-Z0-9\.\-]*\.gz$" | sed -e "s/^.*\.\//\.\//" -e "s/ \-> /\->/")
5858
59# Exit immediately if this package does not contain manpages59# Exit immediately if this package does not contain manpages
60if [ -z "$man" ]; then60if [ -z "$man" ]; then
61 echo "INFO: No manpages: [$DIST] [$PKG]"61 echo "INFO ($(date '+%H:%M:%S.%N')) - ${DIST}: No manpages: [$DIST] [$PKG]"
62 # Touch the cache file so we don't look again until package updated62 # Touch the cache file so we don't look again until package updated
63 sha1sum "$DEB" | awk '{ print $1 }' > "$DESTDIR/.cache/$NAME"63 sha1sum "$DEB" | awk '{ print $1 }' > "$DESTDIR/.cache/$NAME"
64 exit 064 exit 0
@@ -68,22 +68,22 @@
6868
69dpkg-deb -x "$DEB" "$TEMPDIR"69dpkg-deb -x "$DEB" "$TEMPDIR"
70for i in $man; do70for i in $man; do
71 #printf "%s\n" "INFO: Considering entry [$i]"71 #printf "%s\n" "DEBUG: Considering entry [$i]"
72 i=$(printf "%s" "$i" | sed "s/^.*\.\///")72 i=$(printf "%s" "$i" | sed "s/^.*\.\///")
73 if printf "%s" "$i" | grep -qs "\->"; then73 if printf "%s" "$i" | grep -qs "\->"; then
74 SYMLINK=174 SYMLINK=1
75 symlink_src_html=$(printf "%s" "$i" | sed -e "s/^.*\->//" -e "s/\.gz$/\.html/")75 symlink_src_html=$(printf "%s" "$i" | sed -e "s/^.*\->//" -e "s/\.gz$/\.html/")
76 i=$(printf "%s" "$i" | sed "s/\->.*$//") 76 i=$(printf "%s" "$i" | sed "s/\->.*$//")
77 #printf "%s\n" "INFO: [$i] is a symbolic link"77 #printf "%s\n" "DEBUG: [$i] is a symbolic link"
78 else78 else
79 SYMLINK=079 SYMLINK=0
80 fi80 fi
81 manpage="$TEMPDIR/$i"81 manpage="$TEMPDIR/$i"
82 i=$(printf "%s" "$i" | sed -e "s/usr\/share.*\/man\///i" -e "s/\.gz$//")82 i=$(printf "%s" "$i" | sed -e "s/usr\/share.*\/man\///i" -e "s/\.gz$//")
83 #printf "%s\n" "INFO: Considering manpage [$i]"83 #printf "%s\n" "DEBUG: Considering manpage [$i]"
84 # shellcheck disable=SC216684 # shellcheck disable=SC2166
85 if [ ! -s "$manpage" -o -z "$i" ] && [ "$SYMLINK" = "0" ]; then85 if [ ! -s "$manpage" -o -z "$i" ] && [ "$SYMLINK" = "0" ]; then
86 #printf "%s\n" "INFO: Skipping empty manpage [$manpage]"86 #printf "%s\n" "DEBUG: Skipping empty manpage [$manpage]"
87 continue87 continue
88 fi88 fi
89 out="$DESTDIR"/"$i".html89 out="$DESTDIR"/"$i".html
@@ -91,12 +91,12 @@
91 mkdir -p "$(dirname "$out")" "$outgz" > /dev/null || true91 mkdir -p "$(dirname "$out")" "$outgz" > /dev/null || true
92 if [ "$SYMLINK" = "1" ]; then92 if [ "$SYMLINK" = "1" ]; then
93 ln -f -s "$symlink_src_html" "$out"93 ln -f -s "$symlink_src_html" "$out"
94 printf "%s\n" "INFO: Created symlink [$out]"94 printf "%s\n" "INFO ($(date '+%H:%M:%S.%N')) - ${DIST}: Created symlink [$out]"
95 else95 else
96 if LN=$(zcat "$manpage" | head -n1 | grep "^\.so "); then96 if LN=$(zcat "$manpage" | head -n1 | grep "^\.so "); then
97 LN=$(printf "%s" "$LN" | sed -e 's/^\.so /\.\.\//' -e 's/\/\.\.\//\//g' -e 's/$/\.html/')97 LN=$(printf "%s" "$LN" | sed -e 's/^\.so /\.\.\//' -e 's/\/\.\.\//\//g' -e 's/$/\.html/')
98 ln -f -s "$LN" "$out"98 ln -f -s "$LN" "$out"
99 printf "INFO: Created symlink [%s]" "$out"99 printf "INFO ($(date '+%H:%M:%S.%N')) - ${DIST}: Created symlink [%s]" "$out"
100 else100 else
101 BODY=$(COLUMNS=100 /usr/lib/w3m/cgi-bin/w3mman2html.cgi "local=$manpage" | grep -A 1000000 "^<b>" | sed -e '/<\/body>/,+100 d' -e 's:^<b>\(.*\)</b>$:</pre><h4><b>\1</b></h4><pre>:g' -e 's:<a href="file\:///[^?]*?\([^(]*\)(\([^)]*\))">:<a href="../man\2/\1.\2.html">:g')101 BODY=$(COLUMNS=100 /usr/lib/w3m/cgi-bin/w3mman2html.cgi "local=$manpage" | grep -A 1000000 "^<b>" | sed -e '/<\/body>/,+100 d' -e 's:^<b>\(.*\)</b>$:</pre><h4><b>\1</b></h4><pre>:g' -e 's:<a href="file\:///[^?]*?\([^(]*\)(\([^)]*\))">:<a href="../man\2/\1.\2.html">:g')
102 TITLE=$(printf "%s" "$BODY" | head -n2 | tail -n1 | sed "s/<[^>]\+>//g")102 TITLE=$(printf "%s" "$BODY" | head -n2 | tail -n1 | sed "s/<[^>]\+>//g")
@@ -110,7 +110,7 @@
110$BODY110$BODY
111</pre><!--#include virtual='/below.html' -->" > "$out"111</pre><!--#include virtual='/below.html' -->" > "$out"
112112
113 printf "%s\n" "INFO: Created manpage [$out]"113 printf "%s\n" "INFO ($(date '+%H:%M:%S.%N')) - ${DIST}: Created manpage [$out]"
114 fi114 fi
115 fi115 fi
116 mv -f "$manpage" "$outgz"116 mv -f "$manpage" "$outgz"
@@ -121,7 +121,7 @@
121done121done
122122
123# After extracting all manpages, cache the sha1sum, so we don't123# After extracting all manpages, cache the sha1sum, so we don't
124# repeat the downloads 124# repeat the downloads
125sha1sum "$DEB" | awk '{ print $1 }' > "$DESTDIR/.cache/$NAME"125sha1sum "$DEB" | awk '{ print $1 }' > "$DESTDIR/.cache/$NAME"
126126
127# In the case of freakish package permissions, fix them on rm failure.127# In the case of freakish package permissions, fix them on rm failure.
128128
=== modified file 'bin/make-manpage-repo.sh'
--- bin/make-manpage-repo.sh 2018-06-05 23:29:26 +0000
+++ bin/make-manpage-repo.sh 2023-12-07 08:37:19 +0000
@@ -2,23 +2,23 @@
22
3###############################################################################3###############################################################################
4# Copyright (C) 2008 Canonical Ltd.4# Copyright (C) 2008 Canonical Ltd.
5# 5#
6# This code was originally written by Dustin Kirkland <kirkland@ubuntu.com>,6# This code was originally written by Dustin Kirkland <kirkland@ubuntu.com>,
7# based on a framework by Kees Cook <kees@ubuntu.com>.7# based on a framework by Kees Cook <kees@ubuntu.com>.
8# 8#
9# This program is free software: you can redistribute it and/or modify9# This program is free software: you can redistribute it and/or modify
10# it under the terms of the GNU General Public License as published by10# it under the terms of the GNU General Public License as published by
11# the Free Software Foundation, either version 3 of the License, or11# the Free Software Foundation, either version 3 of the License, or
12# (at your option) any later version.12# (at your option) any later version.
13# 13#
14# This program is distributed in the hope that it will be useful,14# This program is distributed in the hope that it will be useful,
15# but WITHOUT ANY WARRANTY; without even the implied warranty of15# but WITHOUT ANY WARRANTY; without even the implied warranty of
16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17# GNU General Public License for more details.17# GNU General Public License for more details.
18# 18#
19# You should have received a copy of the GNU General Public License19# You should have received a copy of the GNU General Public License
20# along with this program. If not, see <http://www.gnu.org/licenses/>.20# along with this program. If not, see <http://www.gnu.org/licenses/>.
21# 21#
22# On Debian-based systems, the complete text of the GNU General Public22# On Debian-based systems, the complete text of the GNU General Public
23# License can be found in /usr/share/common-licenses/GPL-323# License can be found in /usr/share/common-licenses/GPL-3
24###############################################################################24###############################################################################
@@ -29,7 +29,9 @@
29ARCH=""29ARCH=""
3030
31# shellcheck disable=SC109031# shellcheck disable=SC1090
32. "$DIR/../config"32config="$DIR/../config"
33echo "INFO: source $config"
34. "$config"
3335
34# Establish some locking, to keep multiple updates from running36# Establish some locking, to keep multiple updates from running
35mkdir -p "$PUBLIC_HTML_DIR/manpages"37mkdir -p "$PUBLIC_HTML_DIR/manpages"
@@ -46,9 +48,9 @@
46FORCE="$1"48FORCE="$1"
4749
48get_packages_url() {50get_packages_url() {
49 dist=$151 local dist=$1
50 repo=$252 local repo=$2
51 arch=$353 local arch=$3
52 if [ -e "$DEBDIR/dists/$dist/$repo/binary-$arch/Packages.gz" ]; then54 if [ -e "$DEBDIR/dists/$dist/$repo/binary-$arch/Packages.gz" ]; then
53 echo "file://$DEBDIR/dists/$dist/$repo/binary-$arch/Packages.gz"55 echo "file://$DEBDIR/dists/$dist/$repo/binary-$arch/Packages.gz"
54 else56 else
@@ -58,7 +60,7 @@
5860
5961
60get_deb_url() {62get_deb_url() {
61 deb=$163 local deb=$1
62 if [ -e "$DEBDIR/$deb" ]; then64 if [ -e "$DEBDIR/$deb" ]; then
63 echo "file://$DEBDIR/$deb"65 echo "file://$DEBDIR/$deb"
64 else66 else
@@ -71,50 +73,51 @@
71 if [ "$FORCE" = "-f" ] || [ "$FORCE" = "--force" ]; then73 if [ "$FORCE" = "-f" ] || [ "$FORCE" = "--force" ]; then
72 return 074 return 0
73 fi75 fi
74 deb="$1"76 local deb="$1"
75 sum="$2"77 local sum="$2"
76 name=$(basename "$deb" | awk -F_ '{print $1}')78 local distnopocket="$3"
79 local name=$(basename "$deb" | awk -F_ '{print $1}')
77 existing_sum=$(cat "$PUBLIC_HTML_DIR/manpages/$dist/.cache/$name" 2>/dev/null)80 existing_sum=$(cat "$PUBLIC_HTML_DIR/manpages/$dist/.cache/$name" 2>/dev/null)
7881
79 # Take the first two digits of the existing_sum modulo 28 to82 # Take the first two digits of the existing_sum modulo 28 to
80 # compare to the current day of month.83 # compare to the current day of month.
81 # 84 #
82 # Reasoning: this will invalidate the cache for everything ~85 # Reasoning: this will invalidate the cache for everything ~
83 # once per month (days: 1-28)86 # once per month (days: 1-28)
84 day_mod=$((0x$(echo "$existing_sum" | cut -b 1-2)%27 + 1))87 day_mod=$((0x$(echo "$existing_sum" | cut -b 1-2)%27 + 1))
85 if [ "$day_mod" -eq "$(date +%d)" ]; then88 if [ "$day_mod" -eq "$(date +%d)" ]; then
86 echo "INFO: date_mod match, regnerating: $deb ($day_mod)"89 echo "INFO ($(date '+%H:%M:%S.%N')) - ${distnopocket}: date_mod match, regnerating: $deb ($day_mod)"
87 return 090 return 0
88 fi91 fi
8992
90 # Of course, if the sum found in the packages file for this93 # Of course, if the sum found in the packages file for this
91 # package does not equal the sum I have on disk, regenerate.94 # package does not equal the sum I have on disk, regenerate.
92 if [ "$existing_sum" = "$sum" ]; then95 if [ "$existing_sum" = "$sum" ]; then
93 echo "INFO: cksum skip: $deb"96 echo "INFO ($(date '+%H:%M:%S.%N')) - ${distnopocket}: cksum skip: $deb"
94 return 197 return 1
95 else98 else
96 echo "INFO: cksum mismatch: $deb"99 echo "INFO ($(date '+%H:%M:%S.%N')) - ${distnopocket}: cksum mismatch: $deb"
97 return 0100 return 0
98 fi101 fi
99}102}
100103
101handle_deb() {104handle_deb() {
102 dist="$1"105 local distnopocket="$1"
103 deb="$2"106 local deb="$2"
104 sum="$3"107 local sum="$3"
105 deburl=$(get_deb_url "$deb")108 local deburl=$(get_deb_url "$deb")
106 # FIXME: the || true needs to bubble up to a list of things wrong obviously.109 # FIXME: the || true needs to bubble up to a list of things wrong obviously.
107 # shellcheck disable=SC2015110 # shellcheck disable=SC2015
108 is_pkg_cache_invalid "$deb" "$sum" && "$DIR/fetch-man-pages.sh" "$dist" "$deburl" || true111 is_pkg_cache_invalid "$deb" "$sum" "$distnopocket" && "$DIR/fetch-man-pages.sh" "$distnopocket" "$deburl" || true
109}112}
110113
111link_en_locale() {114link_en_locale() {
112 dist="$1"115 local distnopocket="$1"
113 mkdir -p "$PUBLIC_HTML_DIR/manpages/$dist/en"116 mkdir -p "$PUBLIC_HTML_DIR/manpages/$distnopocket/en"
114 for i in $(seq 1 9); do117 for i in $(seq 1 9); do
115 for j in "manpages" "manpages.gz"; do118 for j in "manpages" "manpages.gz"; do
116 mkdir -p "$PUBLIC_HTML_DIR/$j/$dist/en"119 mkdir -p "$PUBLIC_HTML_DIR/$j/$distnopocket/en"
117 dir="$PUBLIC_HTML_DIR/$j/$dist/en/man$i"120 dir="$PUBLIC_HTML_DIR/$j/$distnopocket/en/man$i"
118 if [ -L "$dir" ]; then121 if [ -L "$dir" ]; then
119 # link exists: we're good122 # link exists: we're good
120 continue123 continue
@@ -133,26 +136,61 @@
133 return 0136 return 0
134}137}
135138
136139handle_series() {
140 local dist="${1}"
141 # On one hand in some cases we do not want to know the pocket, as it
142 # would show up in paths, URLs and bug links
143 distnopocket="${dist}"
144 # Yet on the other hand we need to process all pockets. Without -release
145 # we'd miss content that never got an update, without -updates we'd not
146 # pick up changes.
147 # It orders by likely most up-to-date pocket first and only re-renders if
148 # a newer version of the same source package is found later (even single
149 # Packages files can list the same source multiple times).
150 declare -A pkg_handled
151 pkg_handled=()
152 for pocket in "-updates" "-security" ""; do
153 mkdir -p "$PUBLIC_HTML_DIR/manpages/$distnopocket/.cache" "$PUBLIC_HTML_DIR/manpages.gz/$distnopocket" || true
154 link_en_locale "$distnopocket"
155 for repo in $REPOS; do
156 for arch in $ARCH; do
157 file=$(get_packages_url "${dist}${pocket}" "$repo" "$arch")
158 echo "INFO ($(date '+%H:%M:%S.%N')) - ${dist}: Packages.gz: $file"
159 plist=$(mktemp "/tmp/XXXXXXX.manpages.${dist}${pocket}.$repo.$arch.plist")
160 curl -s "$file" \
161 | gunzip -c \
162 | grep -E "(^Package: |^Version: |^Filename: |^SHA1: )" \
163 | awk '{print $2}' \
164 | sed 'N;N;N;s/\n/ /g' \
165 | sort -u > "${plist}"
166 while read -r binpkg version deb sum; do
167 if dpkg --compare-versions "${version}" gt "${pkg_handled["$binpkg"]}"; then
168 if [[ -n "${pkg_handled[$binpkg]}" ]]; then
169 echo "INFO ($(date '+%H:%M:%S.%N')) - ${dist}: binpkg: $binpkg ${version} > ${pkg_handled["$binpkg"]} (processing it again)"
170 else
171 echo "INFO ($(date '+%H:%M:%S.%N')) - ${dist}: First encounter of binpkg: $binpkg ${version} (processing)"
172 fi
173 pkg_handled["$binpkg"]="${version}"
174 handle_deb "$distnopocket" "$deb" "$sum"
175 else
176 echo "INFO ($(date '+%H:%M:%S.%N')) - ${dist}: binpkg: $binpkg ${version} < ${pkg_handled["$binpkg"]} (not processing)"
177 fi
178 done < "${plist}"
179 rm -f "${plist}"
180 done
181 done
182 done
183
184}
185
186# Simple parallelization on the level of releases; they do not overlap
187# in regard to directories/files, but doing so help to keep the network
188# connection utilized as one can fetch while the other is converting.
189# Furthermore it avoids that issues, or a lot of new content, in one release
190# (e.g. -dev opened) will make the regular update on the others take ages.
137for dist in $DISTROS; do191for dist in $DISTROS; do
138 export dist192 handle_series "${dist}" &
139 mkdir -p "$PUBLIC_HTML_DIR/manpages/$dist/.cache" "$PUBLIC_HTML_DIR/manpages.gz/$dist" || true
140 link_en_locale "$dist"
141 for repo in $REPOS; do
142 for arch in $ARCH; do
143 file=$(get_packages_url "$dist" "$repo" "$arch")
144 echo "INFO: Packages.gz: $file"
145 curl -s "$file" \
146 | gunzip -c \
147 | grep -E "(^Filename: |^SHA1: )" \
148 | awk '{print $2}' \
149 | sed 'N;s/\n/ /' \
150 | sort -u \
151 | while read -r deb sum; do
152 handle_deb "$dist" "$deb" "$sum"
153 done
154 done
155 done
156done193done
194wait
157195
158"$DIR/make-sitemaps.sh"196"$DIR/make-sitemaps.sh"
159197
=== modified file 'bin/manpages-modify-config'
--- bin/manpages-modify-config 2020-10-21 12:52:23 +0000
+++ bin/manpages-modify-config 2023-12-07 08:37:19 +0000
@@ -13,6 +13,10 @@
13# launchpad = Launchpad.login_anonymously('manpages', launchpadlib.uris.STAGING_SERVICE_ROOT)13# launchpad = Launchpad.login_anonymously('manpages', launchpadlib.uris.STAGING_SERVICE_ROOT)
14launchpad = Launchpad.login_anonymously('manpages', launchpadlib.uris.LPNET_SERVICE_ROOT)14launchpad = Launchpad.login_anonymously('manpages', launchpadlib.uris.LPNET_SERVICE_ROOT)
1515
16ubuntu = launchpad.distributions["ubuntu"]
17archive = ubuntu.main_archive
18current_series = ubuntu.current_series
19
16active_series = []20active_series = []
17for s in launchpad.projects['ubuntu'].series:21for s in launchpad.projects['ubuntu'].series:
18 if not s.active:22 if not s.active:
1923
=== modified file 'bin/w3mman-to-html.pl'
--- bin/w3mman-to-html.pl 2009-02-09 21:37:49 +0000
+++ bin/w3mman-to-html.pl 2023-12-07 08:37:19 +0000
@@ -2,25 +2,25 @@
22
3##############################################################################3##############################################################################
4# This is the Ubuntu manpage repository generator and interface.4# This is the Ubuntu manpage repository generator and interface.
5# 5#
6# Copyright (C) 2008 Canonical Ltd.6# Copyright (C) 2008 Canonical Ltd.
7# 7#
8# This code was originally written by Dustin Kirkland <kirkland@ubuntu.com>,8# This code was originally written by Dustin Kirkland <kirkland@ubuntu.com>,
9# based on a framework by Kees Cook <kees@ubuntu.com>.9# based on a framework by Kees Cook <kees@ubuntu.com>.
10# 10#
11# This program is free software: you can redistribute it and/or modify11# This program is free software: you can redistribute it and/or modify
12# it under the terms of the GNU General Public License as published by12# it under the terms of the GNU General Public License as published by
13# the Free Software Foundation, either version 3 of the License, or13# the Free Software Foundation, either version 3 of the License, or
14# (at your option) any later version.14# (at your option) any later version.
15# 15#
16# This program is distributed in the hope that it will be useful,16# This program is distributed in the hope that it will be useful,
17# but WITHOUT ANY WARRANTY; without even the implied warranty of17# but WITHOUT ANY WARRANTY; without even the implied warranty of
18# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the18# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19# GNU General Public License for more details.19# GNU General Public License for more details.
20# 20#
21# You should have received a copy of the GNU General Public License21# You should have received a copy of the GNU General Public License
22# along with this program. If not, see <http://www.gnu.org/licenses/>.22# along with this program. If not, see <http://www.gnu.org/licenses/>.
23# 23#
24# On Debian-based systems, the complete text of the GNU General Public24# On Debian-based systems, the complete text of the GNU General Public
25# License can be found in /usr/share/common-licenses/GPL-325# License can be found in /usr/share/common-licenses/GPL-3
26##############################################################################26##############################################################################
2727
=== modified file 'cgi-bin/search.py'
--- cgi-bin/search.py 2021-04-23 15:01:08 +0000
+++ cgi-bin/search.py 2023-12-07 08:37:19 +0000
@@ -114,11 +114,11 @@
114 lr = "en"114 lr = "en"
115115
116versions = OrderedDict()116versions = OrderedDict()
117versions["bionic"] = "18.04 LTS"
118versions["focal"] = "20.04 LTS"117versions["focal"] = "20.04 LTS"
119versions["groovy"] = "20.10"118versions["jammy"] = "22.04 LTS"
120versions["hirsute"] = "21.04"119versions["lunar"] = "23.04"
121versions["impish"] = "21.10"120versions["mantic"] = "23.10"
121versions["noble"] = "24.04 LTS"
122122
123distros = versions.keys()123distros = versions.keys()
124title_html += ("</div></div><div class='p-strip u-no-padding--top'>"124title_html += ("</div></div><div class='p-strip u-no-padding--top'>"
125125
=== modified file 'examples/config'
--- examples/config 2021-04-23 15:01:08 +0000
+++ examples/config 2023-12-07 08:37:19 +0000
@@ -20,7 +20,8 @@
20SITE="http://manpages.ubuntu.com"20SITE="http://manpages.ubuntu.com"
2121
22# These form a combinatorial download matrix22# These form a combinatorial download matrix
23DISTROS="impish hirsute groovy focal bionic"23# The release names will be automatically modified by bin/manpages-modify-config
24DISTROS="noble mantic lunar jammy focal"
24REPOS="main restricted universe multiverse"25REPOS="main restricted universe multiverse"
2526
26# For now, stick to a single arch27# For now, stick to a single arch
2728
=== modified file 'www/functions.js'
--- www/functions.js 2021-04-23 15:01:08 +0000
+++ www/functions.js 2023-12-07 08:37:19 +0000
@@ -58,11 +58,11 @@
58 var navigationContainer = document.getElementById('navigation-container');58 var navigationContainer = document.getElementById('navigation-container');
59 var navigationOutput = "";59 var navigationOutput = "";
60 versions = new Array();60 versions = new Array();
61 versions.push({"name":"bionic", "number":"18.04 LTS"});
62 versions.push({"name":"focal", "number":"20.04 LTS"});61 versions.push({"name":"focal", "number":"20.04 LTS"});
63 versions.push({"name":"groovy", "number":"20.10"});62 versions.push({"name":"jammy", "number":"22.04 LTS"});
64 versions.push({"name":"hirsute", "number":"21.04"});63 versions.push({"name":"lunar", "number":"23.04"});
65 versions.push({"name":"impish", "number":"21.10"});64 versions.push({"name":"mantic", "number":"23.10"});
65 versions.push({"name":"noble", "number":"24.04 LTS"});
66 for (var i = 0; i < versions.length; i++) {66 for (var i = 0; i < versions.length; i++) {
67 if (location.href.match("\.html$")) {67 if (location.href.match("\.html$")) {
68 href = location.href;68 href = location.href;

Subscribers

People subscribed via source and target branches