2026-08-23 18:03:10 -04:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
# p11-kit: no gtk-doc manual.
|
|
|
|
|
#
|
|
|
|
|
# meson.build:65:18: ERROR: Dependency "glib-2.0" not found (tried pkgconfig)
|
|
|
|
|
#
|
|
|
|
|
# THIS ONE WAS NEARLY A SUB-PROJECT. glib-2.0 is not in this port, and adding it
|
|
|
|
|
# is not one package: Arch's glib2 wants gobject-introspection (which itself
|
|
|
|
|
# needs glib2 -- a cycle to bootstrap), libsysprof-capture, dconf and gi-docgen.
|
|
|
|
|
# Several packages and a circular dependency, for one entry in one build.
|
|
|
|
|
#
|
|
|
|
|
# Reading where the requirement actually comes from changed the answer entirely.
|
|
|
|
|
# The file is doc/manual/meson.build, and the line is
|
|
|
|
|
#
|
|
|
|
|
# glib_prefix = dependency('glib-2.0').get_variable(pkgconfig : 'prefix')
|
|
|
|
|
#
|
|
|
|
|
# glib is consulted to find where gtk-doc keeps its cross-reference files. It is
|
|
|
|
|
# not linked, not called, and nothing in p11-kit's code touches it. -D gtk_doc
|
|
|
|
|
# is already in the PKGBUILD's option list, set to true; turning it false drops
|
|
|
|
|
# the whole doc/manual subdirectory and the dependency with it.
|
|
|
|
|
#
|
|
|
|
|
# The lesson is the one this port keeps relearning: the error names glib, and
|
|
|
|
|
# glib is not the subject. Six lines of context said so.
|
|
|
|
|
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]*-D gtk_doc=true[ \t]*$", l)]
|
|
|
|
|
assert len(hit) == 1, "p11-kit: expected one -D gtk_doc=true, got %d" % len(hit)
|
|
|
|
|
lines[hit[0]] = lines[hit[0]].replace("gtk_doc=true", "gtk_doc=false")
|
|
|
|
|
io.open("PKGBUILD", "w", encoding="utf-8").write("\n".join(lines))
|
|
|
|
|
ZZPY
|
|
|
|
|
grep -q -- "-D gtk_doc=false" PKGBUILD || { echo "p11-kit: gtk_doc not disabled" >&2; exit 1; }
|
|
|
|
|
echo "p11-kit: gtk-doc manual disabled (glib was only locating its xrefs)"
|
[FIX] stage 2 could not clone, its pacman had no user, and it installed conflicts
Three gaps in the driver, all found by packages advancing to their next obstacle.
no checkout for python-jinja
Stage 2 could only rebuild what stage 1 had cloned -- wrong for every package
stage 2 builds and stage 1 cannot. libxslt was the first (Ubuntu's libxml2 is too
old to configure it), the Python set followed. They are named in
CHROOT_STAGE2_PKGS because only this stage can produce them, and this stage would
not fetch them. It clones now, pinned to upstream.lock.
error: problem setting DownloadUser 'alpm' (user does not exist)
The rebuilt pacman drops privileges for downloads to a user created by
sysusers.d, which `pacman --root` does not run -- the same reason the CA bundle
was never generated. Nothing in the chroot downloads anything.
:: zlib-ng-compat and zlib are in conflict
zlib-ng produces zlib-ng-compat, correct and belonging in repo2, uninstallable
beside the zlib this chroot uses. CHROOT_EXCLUDE already said so for populate;
the same list now applies to the per-package install.
--- FR ---
Trois lacunes du pilote, toutes révélées par des paquets parvenus à leur obstacle
suivant.
no checkout for python-jinja
L'étage 2 ne savait reconstruire que ce que l'étage 1 avait cloné — faux pour
tout paquet que l'étage 2 bâtit et que l'étage 1 ne peut pas. libxslt fut le
premier (le libxml2 d'Ubuntu est trop ancien), l'ensemble Python a suivi. Ils
figurent dans CHROOT_STAGE2_PKGS parce que seul cet étage les produit, et cet
étage refusait de les chercher. Il clone désormais, épinglé sur upstream.lock.
error: problem setting DownloadUser 'alpm' (user does not exist)
Le pacman reconstruit abaisse ses privilèges vers un utilisateur créé par
sysusers.d, que `pacman --root` n'exécute pas — la raison même pour laquelle le
faisceau de certificats n'était jamais généré. Rien ne télécharge dans ce chroot.
:: zlib-ng-compat et zlib sont en conflit
zlib-ng produit zlib-ng-compat, juste et à sa place dans repo2, ininstallable à
côté du zlib de ce chroot. CHROOT_EXCLUDE le disait déjà pour le peuplement ; la
même liste vaut maintenant pour l'installation par paquet.
Assisted-by: Claude Opus 5
2026-08-23 18:38:46 -04:00
|
|
|
|
|
|
|
|
# --- and no man pages either --------------------------------------------------
|
|
|
|
|
#
|
|
|
|
|
# With gtk_doc off, the next line was
|
|
|
|
|
#
|
|
|
|
|
# meson.build:94:4: ERROR: Problem encountered: Docbook stylesheet for man
|
|
|
|
|
# pages not found
|
|
|
|
|
#
|
|
|
|
|
# The stylesheets, not xsltproc -- which our libxslt supplies. Third package to
|
|
|
|
|
# stop on exactly this: pam validates DocBook sources it cannot fetch, shadow
|
|
|
|
|
# renders man pages from them. Shipping docbook-xsl would be a package that only
|
|
|
|
|
# documentation needs; -D man is already in the option list.
|
|
|
|
|
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]*-D man=true[ \t]*$", l)]
|
|
|
|
|
assert len(hit) == 1, "p11-kit: expected one -D man=true, got %d" % len(hit)
|
|
|
|
|
lines[hit[0]] = lines[hit[0]].replace("man=true", "man=false")
|
|
|
|
|
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)"
|
[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
2026-08-23 22:33:58 -04:00
|
|
|
|
|
|
|
|
# --- 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)"
|