The resolver reported satisfied. The rootfs installed 102 packages. bash, coreutils, tar, sed and find all ran inside the chroot, on s390x, against glibc 2.44. Every check passed. Then a fourth check, reading ELF headers instead of metadata, found seventeen libraries that some shipped binary asks for and no shipped package provides. Most are the ordinary stage-1 artefact -- the host's soname where Arch's differs, libgpgme.so.11 against our .45 -- and stage 2 dissolves those by rebuilding inside the chroot. One was not. kbd's loadkeys needed libxkbcommon.so.0 while kbd declared glibc, gzip and pam. An UNDER-DECLARED dependency: invisible to pacman's resolver and to this port's own closure computation, because both read declarations. And the cause was mine -- libxkbcommon-dev went into install_host_deps for systemd, and kbd, built later, probed for it and linked it. Arch declares it nowhere, so its chroot fails the same probe; --disable-xkb converges rather than diverges. Also here: the test now uses its own package cache. The shared one held a coreutils from before its selinux fix, at the same pkgver-pkgrel, and pacman called it corrupted. --- FR --- Le résolveur se déclarait satisfait. Le rootfs installait 102 paquets. bash, coreutils, tar, sed et find tournaient tous dans le chroot, sur s390x, contre la glibc 2.44. Toutes les vérifications passaient. Puis une quatrième, lisant les en-têtes ELF au lieu des métadonnées, a trouvé dix-sept bibliothèques qu'un binaire livré réclame et qu'aucun paquet livré ne fournit. La plupart sont l'artefact ordinaire de l'étage 1 — le soname de l'hôte là où celui d'Arch diffère, libgpgme.so.11 contre notre .45 — et l'étage 2 les dissout en reconstruisant dans le chroot. Une ne l'était pas. Le loadkeys de kbd réclamait libxkbcommon.so.0 quand kbd déclarait glibc, gzip et pam. Une dépendance SOUS-DÉCLARÉE : invisible au résolveur de pacman comme au calcul de fermeture de ce portage, puisque tous deux lisent des déclarations. Et la cause était mienne — libxkbcommon-dev est entré dans install_host_deps pour systemd, et kbd, bâti plus tard, l'a sondé et lié. Arch ne le déclare nulle part, son chroot échoue donc à la même sonde ; --disable-xkb converge au lieu de diverger. Aussi ici : le test utilise désormais son propre cache de paquets. Le cache partagé gardait un coreutils d'avant son correctif selinux, au même pkgver-pkgrel, et pacman le déclarait corrompu. Assisted-by: Claude Opus 5
44 lines
2.2 KiB
Bash
Executable file
44 lines
2.2 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
# kbd: --disable-xkb. Found by nothing except the artefact.
|
|
#
|
|
# $ readelf -d usr/bin/loadkeys | grep NEEDED
|
|
# (NEEDED) Shared library: [libxkbcommon.so.0]
|
|
#
|
|
# $ bsdtar -xOf kbd-*.pkg.tar.gz .PKGINFO | grep depend
|
|
# depend = glibc
|
|
# depend = gzip
|
|
# depend = pam
|
|
#
|
|
# THE POINT OF THIS HOOK IS THE GAP BETWEEN THOSE TWO OUTPUTS. loadkeys needs
|
|
# a library the package does not declare, so pacman's resolver is satisfied,
|
|
# the rootfs installs cleanly, and loadkeys does not start. No dependency
|
|
# check can see this -- not pacman's, and not the closure computation in this
|
|
# port, because both read declarations. Only reading the binaries finds it.
|
|
# scripts/test-chroot.sh grew a fourth check for exactly this class.
|
|
#
|
|
# WHERE IT CAME FROM, and it is worth admitting plainly: configure.ac:362
|
|
#
|
|
# AC_ARG_ENABLE([xkb], ... [default=auto])
|
|
# AS_IF([test "x$USE_XKB" != xno],
|
|
# [PKG_CHECK_MODULES(XKBCOMMON, xkbcommon, [USE_XKB=yes], [USE_XKB=no])])
|
|
#
|
|
# 'auto' again -- a default read from the build host. libxkbcommon-dev is on
|
|
# this machine because it was added to install_host_deps FOR SYSTEMD. kbd, an
|
|
# unrelated package built later, probed for it, found it, and silently linked
|
|
# a library nothing in this port ships. One host package, one broken binary in
|
|
# a different package, undeclared.
|
|
#
|
|
# Arch's kbd declares neither libxkbcommon in depends nor in makedepends, so
|
|
# Arch's build chroot fails the same probe and Arch ships loadkeys without xkb
|
|
# support. Disabling converges with Arch rather than diverging from it.
|
|
#
|
|
# The alternative was building libxkbcommon, and it is not close: measured, it
|
|
# wants libxcb and xkeyboard-config behind it -- an X11 subtree, to generate
|
|
# keymaps from an XKB database, on a mainframe with no graphics adapter.
|
|
set -euo pipefail
|
|
grep -q '^\s\+--disable-tests$' PKGBUILD || {
|
|
echo "kbd: configure block not in the expected form" >&2; exit 1; }
|
|
sed -i 's|^\(\s*\)--disable-tests$|\1--disable-tests \\\n\1--disable-xkb|' PKGBUILD
|
|
[ "$(grep -c -- '--disable-xkb' PKGBUILD)" = 1 ] || {
|
|
echo "kbd: --disable-xkb not inserted exactly once" >&2; exit 1; }
|
|
echo "kbd: --disable-xkb (host libxkbcommon-dev, installed for systemd, leaked in)"
|