[FIX] p11-kit's gtk-doc split, tpm2-tss without cmocka
p11-kit is the twelfth instance of removing a documentation build and leaving its install: -D gtk_doc=false stopped the docs being made, and package() still ran `_pick doc "$pkgdir"/usr/share/gtk-doc`. _pick is Arch's helper for moving a path into a sub-package and it is as fatal on a missing path as a bare mv. tpm2-tss had two obstacles and the first hid the second. Before autoconf-archive existed it died on configure.ac:139: error: undefined or overquoted macro: AC_MSG_WARN naming a macro that exists -- an AX_* macro was missing, m4 quoting came apart, and autoconf blamed the next thing it recognised. With the archive installed, configure gets far enough to ask for cmocka, a C unit-test framework wanted only for tests this pass does not run. --- FR --- p11-kit est la douzième occurrence du retrait d'une construction de documentation sans son installation : -D gtk_doc=false a arrêté la production, et package() exécutait toujours `_pick doc "$pkgdir"/usr/share/gtk-doc`. _pick est l'aide d'Arch pour déplacer un chemin vers un sous-paquet, et elle est aussi fatale qu'un mv nu sur un chemin absent. tpm2-tss avait deux obstacles, et le premier masquait le second. Avant l'existence d'autoconf-archive il mourait sur configure.ac:139: error: undefined or overquoted macro: AC_MSG_WARN nommant une macro qui existe — une macro AX_* manquait, la citation m4 s'est défaite, et autoconf a accusé la chose suivante qu'il reconnaissait. L'archive installée, configure va assez loin pour réclamer cmocka, cadre de tests unitaires en C voulu seulement pour des tests que cette passe ne lance pas. Assisted-by: Claude Opus 5
This commit is contained in:
parent
430b49aae2
commit
7fa489b5bb
2 changed files with 56 additions and 0 deletions
|
|
@ -53,3 +53,28 @@ io.open("PKGBUILD", "w", encoding="utf-8").write("\n".join(lines))
|
|||
ZZPY
|
||||
grep -q -- "-D man=false" PKGBUILD || { echo "p11-kit: man not disabled" >&2; exit 1; }
|
||||
echo "p11-kit: man pages disabled (DocBook stylesheets absent, not xsltproc)"
|
||||
|
||||
# --- and the gtk-doc split ----------------------------------------------------
|
||||
#
|
||||
# mv: cannot stat '<pkgdir>/usr/share/gtk-doc': No such file or directory
|
||||
#
|
||||
# TWELFTH time. -D gtk_doc=false above stopped the documentation being built and
|
||||
# left package() splitting it out:
|
||||
#
|
||||
# _pick doc "$pkgdir"/usr/share/gtk-doc
|
||||
#
|
||||
# _pick is Arch's helper for moving a path into a sub-package, and it is as fatal
|
||||
# on a missing path as a bare mv.
|
||||
python3 - <<'ZZPY'
|
||||
import io, re
|
||||
lines = io.open("PKGBUILD", encoding="utf-8").read().split("\n")
|
||||
hit = [i for i, l in enumerate(lines) if "gtk-doc" in l and "_pick" in l]
|
||||
assert len(hit) == 1, "p11-kit: expected one gtk-doc _pick, got %d" % len(hit)
|
||||
i = hit[0]
|
||||
ind = re.match(r"^[ \t]*", lines[i]).group(0)
|
||||
lines[i] = ind + ": # gtk_doc is false above, so usr/share/gtk-doc is never created."
|
||||
io.open("PKGBUILD", "w", encoding="utf-8").write("\n".join(lines))
|
||||
ZZPY
|
||||
grep -qE "_pick doc .*gtk-doc" PKGBUILD && {
|
||||
echo "p11-kit: the gtk-doc pick survived" >&2; exit 1; }
|
||||
echo "p11-kit: gtk-doc split removed (nothing builds it now)"
|
||||
|
|
|
|||
31
patches/pkgbuild/tpm2-tss.sh
Executable file
31
patches/pkgbuild/tpm2-tss.sh
Executable file
|
|
@ -0,0 +1,31 @@
|
|||
#!/usr/bin/env bash
|
||||
# tpm2-tss: no unit tests, because their framework is not here.
|
||||
#
|
||||
# configure: error: Unit test enabled, but cmocka missing or version
|
||||
#
|
||||
# This is the second obstacle in this package, and the first one hid it: before
|
||||
# autoconf-archive existed, configure died on
|
||||
#
|
||||
# configure.ac:139: error: undefined or overquoted macro: AC_MSG_WARN
|
||||
#
|
||||
# which named a macro that exists. An AX_* macro was missing, m4 quoting came
|
||||
# apart, and autoconf blamed the next thing it recognised. With the archive
|
||||
# installed, configure gets far enough to ask for cmocka.
|
||||
#
|
||||
# cmocka is a C unit-test framework, wanted only to build tests that this
|
||||
# bootstrap does not run -- makepkg is invoked with --nocheck for the whole first
|
||||
# pass. --disable-unit is tpm2-tss's own switch; the PKGBUILD passes --enable-unit
|
||||
# in its options array.
|
||||
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.match(r"^[ \t]*--enable-unit[ \t]*$", l)]
|
||||
assert len(hit) == 1, "tpm2-tss: expected one --enable-unit, got %d" % len(hit)
|
||||
lines[hit[0]] = lines[hit[0]].replace("--enable-unit", "--disable-unit")
|
||||
io.open("PKGBUILD", "w", encoding="utf-8").write("\n".join(lines))
|
||||
ZZPY
|
||||
grep -q -- "--disable-unit" PKGBUILD || { echo "tpm2-tss: unit tests not disabled" >&2; exit 1; }
|
||||
grep -qE "^[[:space:]]*--enable-unit[[:space:]]*$" PKGBUILD && {
|
||||
echo "tpm2-tss: --enable-unit survived" >&2; exit 1; }
|
||||
echo "tpm2-tss: unit tests disabled (no cmocka)"
|
||||
Loading…
Reference in a new issue