git, xz, meson and pam. Each uses the project's own switch where one exists. git is the one worth reading: `man` appears as a make target twice and `install-man` twice, once each for git proper and once for contrib/subtree. Removing the build targets and leaving the install targets gives "No rule to make target 'install-man'", which reads like a broken Makefile. Four places, again. pam is different in kind from the others: xmllint EXISTS here, from our own libxml2. It fails because pam validates its DocBook sources against DTDs that are not installed and --nonet forbids fetching them. Shipping the DocBook XML data would be a package; disabling the documentation is a flag. --- FR --- git, xz, meson et pam. Chacun par l'interrupteur du projet lui-même, quand il existe. git mérite lecture : `man` figure deux fois comme cible make et `install-man` deux fois, une paire pour git et une pour contrib/subtree. Retirer les cibles de construction en laissant celles d'installation donne « No rule to make target 'install-man' », ce qui se lit comme un Makefile cassé. Quatre endroits, encore. pam diffère en nature : xmllint EXISTE ici, il vient de notre libxml2. Il échoue parce que pam valide ses sources DocBook contre des DTD non installées, et que --nonet interdit de les chercher. Livrer les données DocBook serait un paquet ; désactiver la documentation est un drapeau. Assisted-by: Claude Opus 5
24 lines
1.1 KiB
Bash
Executable file
24 lines
1.1 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
# pam: no XML documentation.
|
|
#
|
|
# meson.build:42:2: ERROR: Command `/usr/bin/xmllint --nonet --noout ...`
|
|
#
|
|
# xmllint EXISTS here -- it comes from our libxml2 -- and that is what makes this
|
|
# one different from the other documentation failures. It fails because pam
|
|
# validates its DocBook sources against DTDs that are not installed, and
|
|
# --nonet forbids fetching them. Shipping the DocBook XML data would be a
|
|
# package; disabling the documentation is a flag.
|
|
set -euo pipefail
|
|
python3 - <<'ZZPY'
|
|
import io, re
|
|
lines = io.open("PKGBUILD", encoding="utf-8").read().split("\n")
|
|
hit = [i for i, l in enumerate(lines) if re.search(r"^[ \t]*-Dselinux=disabled", l)]
|
|
assert len(hit) == 1, "pam: expected one -Dselinux option line, got %d" % len(hit)
|
|
i = hit[0]
|
|
ind = re.match(r"^[ \t]*", lines[i]).group(0)
|
|
assert lines[i].rstrip().endswith("\\"), "pam: the option list does not continue"
|
|
lines.insert(i + 1, ind + "-Ddocs=disabled \\")
|
|
io.open("PKGBUILD", "w", encoding="utf-8").write("\n".join(lines))
|
|
ZZPY
|
|
grep -q -- "-Ddocs=disabled" PKGBUILD || { echo "pam: docs not disabled" >&2; exit 1; }
|
|
echo "pam: DocBook documentation disabled"
|