[FIX] libdir: the Debian host hid the libraries from Arch
meson and cmake both ask the HOST where libraries go. On Ubuntu the
answer is lib/s390x-linux-gnu, so five packages already in the repository
ship theirs where Arch's ld.so and pkgconf never look. Measured:
expat 12 lz4 6 pacman 6 pkgconf 6 zstd 12 entries
Nothing failed. util-linux is where it finally shouted, and even there
the rm was the first victim, not the cause.
pacman is the one that matters: libalpm.so.16 landed where pacman's own
binary cannot load it, and a target installed from that package has no
working package manager left to repair itself with.
arch-meson now states the libdir devtools has no need to state, and is
reinstalled on every run -- editing the copy here changed nothing while
/usr/local/bin held a stale one. Four packages call bare meson or cmake
and get their own hook. util-linux's old hook chased lib64, which never
existed here; it is deleted.
--- FR ---
meson et cmake demandent tous deux à l'HÔTE où vont les bibliothèques.
Sous Ubuntu la réponse est lib/s390x-linux-gnu : cinq paquets déjà dans
le dépôt livrent donc les leurs là où ld.so et pkgconf d'Arch ne
regarderont jamais. Mesuré :
expat 12 lz4 6 pacman 6 pkgconf 6 zstd 12 entrées
Rien n'a échoué. util-linux est l'endroit où cela a fini par crier, et
même là le rm était la première victime, pas la cause.
pacman est celui qui compte : libalpm.so.16 atterrissait là où le binaire
de pacman ne peut pas la charger, et une cible installée depuis ce paquet
n'a plus de gestionnaire de paquets pour se réparer.
arch-meson énonce désormais le libdir que devtools n'a pas besoin
d'énoncer, et se réinstalle à chaque exécution : éditer la copie du dépôt
ne changeait rien tant que /usr/local/bin en gardait une périmée. Quatre
paquets appellent meson ou cmake nu et reçoivent leur crochet. L'ancien
crochet util-linux poursuivait un lib64 qui n'a jamais existé ici : il
est supprimé.
Assisted-by: Claude Opus 5
2026-08-17 01:33:41 -04:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
# pacman: bare meson takes its libdir from the Debian host.
|
|
|
|
|
#
|
|
|
|
|
# The build host is Ubuntu, so meson's default_libdir() asks
|
|
|
|
|
# dpkg-architecture for the multiarch tuple and hands back
|
|
|
|
|
#
|
|
|
|
|
# lib/s390x-linux-gnu
|
|
|
|
|
#
|
|
|
|
|
# devtools' arch-meson would override that, but this PKGBUILD calls BARE
|
|
|
|
|
# `meson`, so nothing does. The build then succeeds, makepkg exits 0, and the
|
|
|
|
|
# package ships
|
|
|
|
|
#
|
|
|
|
|
# usr/lib/s390x-linux-gnu/libalpm.so.16
|
|
|
|
|
#
|
|
|
|
|
# where Arch's ld.so never looks -- it reads /usr/lib. libalpm is pacman's
|
|
|
|
|
# OWN library, so a target installed from this package has a package manager
|
|
|
|
|
# that cannot start, and no way to pacman -U the fix. Nothing in the build log
|
|
|
|
|
# says a word about it. This is the single most expensive instance of the
|
|
|
|
|
# libdir slip in the port, which is why it gets its own hook rather than
|
|
|
|
|
# waiting for the arch-meson stand-in to cover it.
|
|
|
|
|
#
|
|
|
|
|
# The same slip poisons two things downstream of the library file:
|
|
|
|
|
# - .../pkgconfig/libalpm.pc, whose `libdir=${prefix}/lib/s390x-linux-gnu`
|
|
|
|
|
# then aims every consumer at the same dead directory;
|
|
|
|
|
# - makepkg's own autodep. /etc/makepkg.conf sets
|
|
|
|
|
# LIB_DIRS=('lib:usr/lib' 'lib32:usr/lib32') and library_provides.sh runs
|
|
|
|
|
# `find "$pkgdir/$dir" -maxdepth 1`, so it never descends into the
|
|
|
|
|
# multiarch directory. .PKGINFO recorded a bare `provides = libalpm.so`
|
|
|
|
|
# with no version, where it should read libalpm.so=16-64 -- so every
|
|
|
|
|
# `libalpm.so=16-64` dependency in the port would go unsatisfiable, and
|
|
|
|
|
# the error would name the package that wanted it, never pacman.
|
|
|
|
|
#
|
|
|
|
|
# Only the configure call takes a libdir. The other four `meson` words in the
|
|
|
|
|
# file -- makedepends, compile, test, install -- take none and are left alone.
|
|
|
|
|
# The count is asserted rather than assumed.
|
|
|
|
|
#
|
|
|
|
|
# libdir only. sbindir and libexecdir also keep non-Arch defaults here, but
|
|
|
|
|
# pacman installs nothing into either -- the manifest is /usr/{bin,include,
|
|
|
|
|
# lib,share} and /etc, nothing else. Setting them would be a change with no
|
|
|
|
|
# artefact behind it, and if upstream ever does add an sbin binary we want to
|
|
|
|
|
# see it rather than have it silently absorbed.
|
|
|
|
|
set -euo pipefail
|
|
|
|
|
python3 - <<'PY'
|
|
|
|
|
import io
|
|
|
|
|
s = io.open("PKGBUILD", encoding="utf-8").read()
|
|
|
|
|
old = " meson --prefix=/usr \\\n"
|
|
|
|
|
n = s.count(old)
|
|
|
|
|
assert n == 1, "pacman: expected 1 meson configure call, found %d" % n
|
|
|
|
|
assert "libdir" not in s, "pacman: PKGBUILD already sets a libdir, re-read it"
|
|
|
|
|
s = s.replace(old, old + " --libdir=lib \\\n", 1)
|
|
|
|
|
io.open("PKGBUILD", "w", encoding="utf-8").write(s)
|
|
|
|
|
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)"
|
[FIX] systemd without BPF, pacman without asciidoc
Two more documentation-and-toolchain cuts, both using the project's own switch.
systemd asked for libbpf, which this port does not package -- and packaging it
means clang and llvm, an entire second compiler toolchain for unit features
nothing here uses yet. pacman asked for asciidoc, the same Python documentation
stack already declined for doxygen, asciidoctor and a2x.
pacman is worth naming out loud: it 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 single argument for restoring them at stage 3.
--- FR ---
Deux coupes de plus, documentation et chaîne d'outils, chacune par l'interrupteur
prévu par le projet lui-même.
systemd réclamait libbpf, que ce portage ne paquette pas — et le paqueter suppose
clang et llvm, soit une seconde chaîne de compilation entière pour des fonctions
d'unité dont rien ici ne se sert encore. pacman réclamait asciidoc, la même pile
Python déjà écartée pour doxygen, asciidoctor et a2x.
pacman mérite d'être nommé : c'est le gestionnaire de paquets, donc ses pages de
manuel sont les premières qu'un utilisateur cherche. C'est la plus visible de ces
coupes, et le meilleur argument pour les restaurer à l'étage 3.
Assisted-by: Claude Opus 5
2026-08-21 21:25:20 -04:00
|
|
|
|
|
|
|
|
# --- 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)"
|