diff --git a/patches/pkgbuild/pacman.sh b/patches/pkgbuild/pacman.sh index 8c124a4..9a3371a 100755 --- a/patches/pkgbuild/pacman.sh +++ b/patches/pkgbuild/pacman.sh @@ -53,3 +53,29 @@ PY [ "$(grep -c -- '--libdir=lib' PKGBUILD)" = 1 ] || { echo "pacman: libdir not forced to lib exactly once" >&2; exit 1; } echo "pacman: libdir forced to /usr/lib (Debian host defaults it to multiarch)" + +# --- no asciidoc documentation ------------------------------------------------ +# +# ERROR: Program 'asciidoc' not found or not executable +# +# pacman's man pages come from asciidoc, a Python toolchain this port declined +# along with doxygen, asciidoctor and a2x -- each of them a language runtime +# whose only job is rendering documentation. -Ddoc=disabled is meson's own +# switch. +# +# Worth noting where this one lands: pacman IS the package manager, so its man +# pages are the ones a user reaches for first. This is the most visible of the +# documentation cuts and the strongest argument for restoring them at stage 3, +# where the tools can be built against a self-hosted toolchain. +set -euo pipefail +python3 - <<'ZZPY' +import io +s = io.open("PKGBUILD", encoding="utf-8").read() +old = "-Ddoc=enabled" +assert s.count(old) == 1, "pacman: expected one doc option, got %d" % s.count(old) +s = s.replace(old, "-Ddoc=disabled", 1) +io.open("PKGBUILD", "w", encoding="utf-8").write(s) +ZZPY +grep -q -- "-Ddoc=disabled" PKGBUILD || { + echo "pacman: doc was not disabled" >&2; exit 1; } +echo "pacman: man pages disabled (no asciidoc)" diff --git a/patches/pkgbuild/systemd.sh b/patches/pkgbuild/systemd.sh index a1d31f1..3556c0e 100755 --- a/patches/pkgbuild/systemd.sh +++ b/patches/pkgbuild/systemd.sh @@ -237,3 +237,29 @@ if left: print("systemd: pkgname -> %s" % " ".join(names)) PYGUARD echo "systemd: ukify disabled (guess_efi_arch raises on s390x), tests dropped" + +# --- no BPF framework --------------------------------------------------------- +# +# meson.build:1052:9: ERROR: Dependency "libbpf" not found (tried pkgconfig) +# +# libbpf is not in this port's package list, and adding it is not a small step: +# systemd's BPF programs are compiled with clang and llvm, so the dependency is +# an entire second compiler toolchain for a feature that only matters to +# systemd's own resource-control and socket-binding units. +# +# -Dbpf-framework=disabled is systemd's own switch for building without it, +# which is what every distribution that does not ship BPF-based unit features +# uses. Revisit if something on the target actually needs IPAddressAllow= or +# RestrictNetworkInterfaces=. +set -euo pipefail +python3 - <<'ZZPY' +import io +s = io.open("PKGBUILD", encoding="utf-8").read() +old = "-Dbpf-framework=enabled" +assert s.count(old) == 1, "systemd: expected one bpf-framework option, got %d" % s.count(old) +s = s.replace(old, "-Dbpf-framework=disabled", 1) +io.open("PKGBUILD", "w", encoding="utf-8").write(s) +ZZPY +grep -q -- "-Dbpf-framework=disabled" PKGBUILD || { + echo "systemd: bpf-framework was not disabled" >&2; exit 1; } +echo "systemd: BPF framework disabled (no libbpf, no clang)"