diff --git a/patches/pkgbuild/libevent.sh b/patches/pkgbuild/libevent.sh index 22ed5f3..bbe3526 100755 --- a/patches/pkgbuild/libevent.sh +++ b/patches/pkgbuild/libevent.sh @@ -18,3 +18,32 @@ io.open("PKGBUILD", "w", encoding="utf-8").write(s) ZZPY grep -q "EVENT__DOXYGEN=OFF" PKGBUILD || { echo "libevent: doxygen not disabled" >&2; exit 1; } echo "libevent: Doxygen reference disabled" + +# --- and the docs split, which I left behind ---------------------------------- +# +# mv: cannot stat '/usr/share/doc': No such file or directory +# +# Turning EVENT__DOXYGEN off above stopped the documentation being BUILT and left +# package() moving it into the libevent-doc split: +# +# mv {"$pkgdir",doc}/usr/share/doc +# +# NINTH time in this port, and the second time I have made it myself rather than +# inherited it: fakeroot was the other. Removing a documentation build without +# removing its install is apparently the easiest mistake available here, so it is +# worth stating the rule plainly -- after disabling documentation anywhere, +# search package() for share/doc, man, and the split arrays before believing the +# hook is finished. +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"share/doc", l) and l.lstrip().startswith("mv ")] +assert len(hit) == 1, "libevent: expected one share/doc move, got %d" % len(hit) +i = hit[0] +ind = re.match(r"^[ \t]*", lines[i]).group(0) +lines[i] = ind + ': # doxygen is off above, so usr/share/doc is never created.' +io.open("PKGBUILD", "w", encoding="utf-8").write("\n".join(lines)) +ZZPY +grep -qE "^[[:space:]]*mv .*share/doc" PKGBUILD && { + echo "libevent: the docs move survived" >&2; exit 1; } +echo "libevent: docs split removed (nothing builds them now)" diff --git a/patches/pkgbuild/pam.sh b/patches/pkgbuild/pam.sh index 3580034..f2a063c 100755 --- a/patches/pkgbuild/pam.sh +++ b/patches/pkgbuild/pam.sh @@ -22,3 +22,31 @@ 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" + +# --- and the PDFs it no longer produces --------------------------------------- +# +# rm: cannot remove '/usr/share/doc/Linux-PAM/*.pdf': No such file +# +# The line above it says why it exists: +# +# # remove unreproducible pdf files +# +# pam builds PDFs whose bytes differ between runs, so the PKGBUILD deletes them +# to keep the package reproducible. With -Ddocs=disabled they are never built, +# and a cleanup step that finds nothing to clean is fatal under set -e. +# +# The rm becomes tolerant rather than being deleted: on a machine that does have +# the DocBook stack, the PDFs WILL be there and they still have to go. +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"\*\.pdf", l) and l.lstrip().startswith("rm ")] +assert len(hit) == 1, "pam: expected one pdf removal, got %d" % len(hit) +i = hit[0] +ind = re.match(r"^[ \t]*", lines[i]).group(0) +lines[i] = ind + "rm -f " + lines[i].lstrip()[3:].lstrip() +io.open("PKGBUILD", "w", encoding="utf-8").write("\n".join(lines)) +ZZPY +grep -qE "^[[:space:]]*rm -f .*\*\.pdf" PKGBUILD || { + echo "pam: the pdf removal was not made tolerant" >&2; exit 1; } +echo "pam: PDF cleanup tolerates their absence" diff --git a/scripts/packages.sh b/scripts/packages.sh index 915578a..cb0815f 100644 --- a/scripts/packages.sh +++ b/scripts/packages.sh @@ -287,6 +287,21 @@ STAGE1_PACKAGES=( # comes with it, as jinja's only dependency. python-markupsafe python-jinja + # Three more the chroot asked for by name, each a build tool: + # + # python-pkgconfig brotli: ERROR Missing dependencies: pkgconfig + # -- the python MODULE, not pkg-config the program, + # which has been there since the lib64 fix. + # cython libseccomp: ERROR Backend subprocess exited when + # trying to invoke get_requires_for_build_wheel + # -- its python bindings are Cython. + # autoconf-archive tpm2-tss: configure.ac:139: error: undefined or + # overquoted macro: AC_MSG_WARN + # -- an AX_* macro is missing, so autoconf misreads the + # line and blames one it does know. + python-pkgconfig + cython + autoconf-archive # libaio: a real closure gap. lvm2 stops on # # device/bcache.c:30:10: fatal error: libaio.h: No such file or directory