diff --git a/patches/pkgbuild/git.sh b/patches/pkgbuild/git.sh index 709c5a5..12708e6 100755 --- a/patches/pkgbuild/git.sh +++ b/patches/pkgbuild/git.sh @@ -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" diff --git a/patches/pkgbuild/groff.sh b/patches/pkgbuild/groff.sh index 34de981..a976621 100755 --- a/patches/pkgbuild/groff.sh +++ b/patches/pkgbuild/groff.sh @@ -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', diff --git a/patches/pkgbuild/systemd.sh b/patches/pkgbuild/systemd.sh index eb097f6..75b8775 100755 --- a/patches/pkgbuild/systemd.sh +++ b/patches/pkgbuild/systemd.sh @@ -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)"