[FIX] groff's remaining lists, systemd man pages, git without libsecret

groff was the third round on the same package: DOC_GNU_EPS, then
PROCESSEDEXAMPLEFILES_PS, then HDTBL -- and mom's examples were waiting behind
those. groff renders its own manuals and every contrib package's examples with
the groff being built, each list a separate variable. Finding them one failure at
a time cost three passes; all seven are emptied together now.

systemd is the fourth package to stop on missing DocBook DATA rather than a
missing tool -- xsltproc exists, our libxslt supplies it:

  compilation error: file ../systemd/man/custom-man.xsl line 12 element import

It has the largest man page set here, which is the strongest argument in this port
for shipping docbook-xsl eventually.

git's libsecret helper needed THREE places, one spanning two lines. The first
version asserted "expected one _make, got 2" and stopped -- the guard working.
Replacing the install's first line alone would have left its continuation as a
command of its own, which is the binutils trap again.

--- FR ---

groff en était au troisième tour sur le même paquet : DOC_GNU_EPS, puis
PROCESSEDEXAMPLEFILES_PS, puis HDTBL — et les exemples de mom attendaient
derrière. groff rend ses propres manuels et les exemples de chaque contrib avec le
groff en cours de construction, chaque liste étant une variable distincte. Les
trouver un échec à la fois a coûté trois passes ; les sept sont vidées ensemble.

systemd est le quatrième paquet à s'arrêter sur des DONNÉES DocBook absentes et
non sur un outil manquant — xsltproc existe, notre libxslt le fournit :

  compilation error: file ../systemd/man/custom-man.xsl line 12 element import

Il porte le plus grand ensemble de pages de manuel du portage : c'est le meilleur
argument pour livrer docbook-xsl à terme.

L'aide libsecret de git demandait TROIS endroits, dont un sur deux lignes. La
première version a affirmé « expected one _make, got 2 » et s'est arrêtée — le
garde faisant son travail. Remplacer la première ligne de l'installation aurait
laissé sa continuation comme commande à part, soit le piège de binutils à nouveau.

Assisted-by: Claude Opus 5
This commit is contained in:
Mathieu Benoit 2026-08-23 23:58:32 -04:00
parent 3d2a1485af
commit 8d9e8a4dce
3 changed files with 94 additions and 2 deletions

View file

@ -144,3 +144,56 @@ grep -qE "^[[:space:]]*WITH_RUST=1" PKGBUILD && { echo "git: WITH_RUST survived"
grep -qE "^[[:space:]]*NO_RUST=1" PKGBUILD || { echo "git: NO_RUST=1 was not set" >&2; exit 1; }
grep -q "'rust'" PKGBUILD && { echo "git: rust still in makedepends" >&2; exit 1; }
echo "git: built without Rust (no rustc to bootstrap from on s390x)"
# --- no libsecret credential helper -------------------------------------------
#
# make: *** [Makefile:20: git-credential-libsecret.o] Error 1
#
# contrib/credential/libsecret needs libsecret's headers, and libsecret is not in
# this port -- it is a GNOME keyring client, and behind it sit glib2 and
# gobject-introspection, the sub-project already declined for p11-kit.
#
# THREE PLACES, and one of them spans two lines:
#
# 52 _make -C contrib/credential/libsecret
# 106 install -m 0755 contrib/credential/libsecret/git-credential-libsecret \
# 107 "$pkgdir"/usr/lib/git-core/git-credential-libsecret
# 108 _make -C contrib/credential/libsecret clean
#
# The first version of this section asserted "expected one _make, got 2" and
# stopped, which is the guard doing its job. Replacing line 106 alone would leave
# 107 as a command of its own -- the binutils continuation trap again, and the
# reason the install is deleted as a range rather than commented.
#
# The optdepend line stays: it describes what the helper would need if someone
# built it, and it is a sentence, not a dependency.
python3 - <<'ZZPY'
import io, re
lines = io.open("PKGBUILD", encoding="utf-8").read().split("\n")
mk = [i for i, l in enumerate(lines)
if re.search(r"_make -C contrib/credential/libsecret", l)]
assert len(mk) == 2, "git: expected two libsecret _make lines, got %d" % len(mk)
ins = [i for i, l in enumerate(lines)
if re.match(r"^[ \t]*install ", l) and "credential/libsecret" in l]
assert len(ins) == 1, "git: expected one libsecret install, got %d" % len(ins)
i = ins[0]
j = i
while lines[j].rstrip().endswith("\\"):
j += 1
# Delete the install and its continuations, then neutralise both _make lines.
# Backwards, so earlier indices stay valid.
for k in reversed(mk):
ind = re.match(r"^[ \t]*", lines[k]).group(0)
lines[k] = ind + ": # libsecret is not packaged here (glib2, gobject-introspection)."
del lines[i:j + 1]
io.open("PKGBUILD", "w", encoding="utf-8").write("\n".join(lines))
ZZPY
grep -qE "^[[:space:]]*_make -C contrib/credential/libsecret" PKGBUILD && {
echo "git: a libsecret build survived" >&2; exit 1; }
grep -qE "^[[:space:]]*install .*credential/libsecret" PKGBUILD && {
echo "git: the libsecret install survived" >&2; exit 1; }
grep -q "git-credential-libsecret" PKGBUILD && {
echo "git: a reference to the helper binary survived" >&2; exit 1; }
echo "git: libsecret credential helper dropped"

View file

@ -59,8 +59,24 @@ lines[i:i] = [
ind + "# the GNU logo. HDTBLPROCESSEDEXAMPLEFILES lists all twelve; the whole",
ind + "# list goes, because there is no reason to render eleven examples of a",
ind + "# table macro package into a documentation set nothing here reads.",
ind + 'sed -i "/^HDTBLPROCESSEDEXAMPLEFILES = /,/^$/ s|^.*$||" Makefile',
ind + 'grep -q "^HDTBLPROCESSEDEXAMPLEFILES" Makefile && { echo "groff: hdtbl example list not emptied" >&2; exit 1; }',
ind + "# ALL of them, not one per failure. This is the third round on the",
ind + "# same package: DOC_GNU_EPS, then PROCESSEDEXAMPLEFILES_PS, then",
ind + "# HDTBL, and mom's examples were waiting behind those --",
ind + "#",
ind + "# pdfmom: fatal error: test-groff exited with status 4",
ind + "# contrib/mom/examples/typesetting.pdf",
ind + "#",
ind + "# groff renders its own manuals and every contrib package's examples",
ind + "# to PostScript and PDF using the groff being built. Each list is a",
ind + "# separate variable, and finding them one failure at a time is how",
ind + "# three passes went by. They are emptied together.",
ind + 'for _v in HDTBLPROCESSEDEXAMPLEFILES MOMPROCESSEDEXAMPLEFILES \\',
ind + ' PROCESSEDDOCFILES_PDF PROCESSEDDOCFILES_PS \\',
ind + ' PROCESSEDDOCFILES_TXT PROCESSEDDOCFILES \\',
ind + ' GENERATEDDOCFILES; do',
ind + ' sed -i "/^$_v = /,/^$/ s|^.*$||" Makefile',
ind + ' grep -q "^$_v" Makefile && { echo "groff: $_v not emptied" >&2; exit 1; }',
ind + 'done',
ind + "# And say it out loud: if a THIRD consumer appears, this is the pattern",
ind + "# to look for, not a new kind of problem.",
ind + 'if grep -rl "gnu\\.eps" --include="*.roff" --include="*.ms" . 2>/dev/null | grep -qv "^\\./doc/webpage.ms$\\|mixed_pickles"; then',

View file

@ -286,3 +286,26 @@ io.open("PKGBUILD", "w", encoding="utf-8").write(s)
ZZPY
grep -q -- "-Dapparmor=disabled" PKGBUILD || { echo "systemd: apparmor not disabled" >&2; exit 1; }
echo "systemd: AppArmor disabled"
# --- no man pages -------------------------------------------------------------
#
# compilation error: file ../systemd/man/custom-man.xsl line 12 element import
#
# An XSLT import that cannot resolve: systemd renders its man pages from DocBook,
# and the stylesheets its own custom-man.xsl imports are not installed. xsltproc
# exists -- our libxslt supplies it -- so this is the FOURTH package to stop on
# missing DocBook DATA rather than a missing tool, after pam, shadow and p11-kit.
#
# systemd has by far the largest man page set of any package here, which is the
# strongest argument in the port for shipping docbook-xsl eventually. Not now.
set -euo pipefail
python3 - <<'ZZPY'
import io
s = io.open("PKGBUILD", encoding="utf-8").read()
old = "-Dman=enabled"
assert s.count(old) == 1, "systemd: expected one man option, got %d" % s.count(old)
s = s.replace(old, "-Dman=disabled", 1)
io.open("PKGBUILD", "w", encoding="utf-8").write(s)
ZZPY
grep -q -- "-Dman=disabled" PKGBUILD || { echo "systemd: man not disabled" >&2; exit 1; }
echo "systemd: man pages disabled (DocBook stylesheets absent, not xsltproc)"