archlinux-s390x/patches/pkgbuild/brotli.sh

78 lines
3.8 KiB
Bash
Raw Normal View History

[ADD] host deps: the tools six packages needed and nobody declared --nodeps means every makedepend must be named here by hand. Seven builds stopped on one, each naming a different tool: itstool, convert, fig2dev, asciidoctor, libnsl, python -m build, libbpf, history. The list was also a lie by omission. libreadline-dev, libncurses-dev, zlib1g-dev, python3-dev, doxygen, xsltproc, docbook-xsl, elinks and libcap2-bin were on this VM by hand and never declared. They made the builds pass here and would fail on a fresh Ubuntu, for reasons that have nothing to do with s390x. history.pc is generated rather than copied: our own readline package ships a correct one, but its libdir names /usr/lib, which on a multiarch host holds no libhistory. The .pc has to describe THIS host. Three hooks for what apt cannot buy. systemd asks for an EFI arch s390x does not have -- and says "python3 is missing modules: elftools", which sends you to apt for four lines before admitting the real reason. --- FR --- --nodeps veut dire que chaque makedepend doit être nommé ici à la main. Sept compilations se sont arrêtées sur l'une d'elles, chacune désignant un outil différent : itstool, convert, fig2dev, asciidoctor, libnsl, python -m build, libbpf, history. La liste mentait aussi par omission. libreadline-dev, libncurses-dev, zlib1g-dev, python3-dev, doxygen, xsltproc, docbook-xsl, elinks et libcap2-bin étaient posés à la main sur cette VM, jamais déclarés. Ils faisaient passer les compilations ici et auraient échoué sur un Ubuntu neuf, pour des raisons étrangères à s390x. history.pc est généré et non copié : notre propre paquet readline en livre un correct, mais son libdir nomme /usr/lib, qui sur un hôte multiarch ne contient aucun libhistory. Le .pc doit décrire CET hôte-ci. Trois crochets pour ce qu'apt n'achète pas. systemd réclame une architecture EFI que s390x n'a pas — et annonce « python3 is missing modules: elftools », ce qui envoie chez apt pour quatre lignes avant d'avouer la vraie raison. Assisted-by: Claude Opus 5
2026-08-17 01:33:41 -04:00
#!/usr/bin/env bash
[REM] sub-packages: four that cost more closure than they carry pacman's resolver named 70 unresolved dependencies. Excluding python-brotli alone took that to 47 and removed `python` outright, with libffi, mpdecimal and gdbm behind it. python-libseccomp would have re-admitted the same tree, and nothing across 135 packages depends on either. Both wheels are unusable on the target anyway: built by the host's python 3.13, ABI-tagged cpython-313, while Arch ships 3.14. Stage 2 produces real ones. systemd-ukify is different -- it is architectural. ukify assembles a PE binary and its EFI_ARCH_MAP has no s390x entry, so guess_efi_arch() raises ValueError on this machine. Shipping it would put a program in the repository that cannot start. systemd-tests followed it out: a test suite behind --nocheck, and the only reason five more python packages were wanted. The dropped artefacts were still indexed in core.db afterwards. repo-add only adds, so a sub-package removed from pkgname leaves its last build installable forever. Removed by hand; TODO.md records the gap. --- FR --- Le résolveur de pacman nommait 70 dépendances non résolues. Écarter le seul python-brotli a ramené le compte à 47 et retiré `python` d'un coup, avec libffi, mpdecimal et gdbm derrière. python-libseccomp aurait réadmis le même arbre, et rien parmi 135 paquets ne dépend de l'un ou de l'autre. Les deux roues sont de toute façon inutilisables sur la cible : bâties par le python 3.13 de l'hôte, marquées cpython-313, quand Arch livre la 3.14. L'étage 2 en produira de vraies. systemd-ukify est d'une autre nature — architectural. ukify assemble un binaire PE et son EFI_ARCH_MAP n'a pas d'entrée s390x : guess_efi_arch() lève donc ValueError sur cette machine. Le livrer mettrait au dépôt un programme incapable de démarrer. systemd-tests l'a suivi : une suite de tests derrière --nocheck, et la seule raison de réclamer cinq paquets python de plus. Les artefacts écartés restaient indexés dans core.db. repo-add n'ajoute que : un sous-paquet retiré de pkgname laisse sa dernière compilation installable à jamais. Retirés à la main ; TODO.md consigne le manque. Assisted-by: Claude Opus 5
2026-08-19 05:28:32 -04:00
# brotli: a Debian default that ships silently, and a sub-package that costs
# more than it is worth.
[ADD] host deps: the tools six packages needed and nobody declared --nodeps means every makedepend must be named here by hand. Seven builds stopped on one, each naming a different tool: itstool, convert, fig2dev, asciidoctor, libnsl, python -m build, libbpf, history. The list was also a lie by omission. libreadline-dev, libncurses-dev, zlib1g-dev, python3-dev, doxygen, xsltproc, docbook-xsl, elinks and libcap2-bin were on this VM by hand and never declared. They made the builds pass here and would fail on a fresh Ubuntu, for reasons that have nothing to do with s390x. history.pc is generated rather than copied: our own readline package ships a correct one, but its libdir names /usr/lib, which on a multiarch host holds no libhistory. The .pc has to describe THIS host. Three hooks for what apt cannot buy. systemd asks for an EFI arch s390x does not have -- and says "python3 is missing modules: elftools", which sends you to apt for four lines before admitting the real reason. --- FR --- --nodeps veut dire que chaque makedepend doit être nommé ici à la main. Sept compilations se sont arrêtées sur l'une d'elles, chacune désignant un outil différent : itstool, convert, fig2dev, asciidoctor, libnsl, python -m build, libbpf, history. La liste mentait aussi par omission. libreadline-dev, libncurses-dev, zlib1g-dev, python3-dev, doxygen, xsltproc, docbook-xsl, elinks et libcap2-bin étaient posés à la main sur cette VM, jamais déclarés. Ils faisaient passer les compilations ici et auraient échoué sur un Ubuntu neuf, pour des raisons étrangères à s390x. history.pc est généré et non copié : notre propre paquet readline en livre un correct, mais son libdir nomme /usr/lib, qui sur un hôte multiarch ne contient aucun libhistory. Le .pc doit décrire CET hôte-ci. Trois crochets pour ce qu'apt n'achète pas. systemd réclame une architecture EFI que s390x n'a pas — et annonce « python3 is missing modules: elftools », ce qui envoie chez apt pour quatre lignes avant d'avouer la vraie raison. Assisted-by: Claude Opus 5
2026-08-17 01:33:41 -04:00
#
[REM] sub-packages: four that cost more closure than they carry pacman's resolver named 70 unresolved dependencies. Excluding python-brotli alone took that to 47 and removed `python` outright, with libffi, mpdecimal and gdbm behind it. python-libseccomp would have re-admitted the same tree, and nothing across 135 packages depends on either. Both wheels are unusable on the target anyway: built by the host's python 3.13, ABI-tagged cpython-313, while Arch ships 3.14. Stage 2 produces real ones. systemd-ukify is different -- it is architectural. ukify assembles a PE binary and its EFI_ARCH_MAP has no s390x entry, so guess_efi_arch() raises ValueError on this machine. Shipping it would put a program in the repository that cannot start. systemd-tests followed it out: a test suite behind --nocheck, and the only reason five more python packages were wanted. The dropped artefacts were still indexed in core.db afterwards. repo-add only adds, so a sub-package removed from pkgname leaves its last build installable forever. Removed by hand; TODO.md records the gap. --- FR --- Le résolveur de pacman nommait 70 dépendances non résolues. Écarter le seul python-brotli a ramené le compte à 47 et retiré `python` d'un coup, avec libffi, mpdecimal et gdbm derrière. python-libseccomp aurait réadmis le même arbre, et rien parmi 135 paquets ne dépend de l'un ou de l'autre. Les deux roues sont de toute façon inutilisables sur la cible : bâties par le python 3.13 de l'hôte, marquées cpython-313, quand Arch livre la 3.14. L'étage 2 en produira de vraies. systemd-ukify est d'une autre nature — architectural. ukify assemble un binaire PE et son EFI_ARCH_MAP n'a pas d'entrée s390x : guess_efi_arch() lève donc ValueError sur cette machine. Le livrer mettrait au dépôt un programme incapable de démarrer. systemd-tests l'a suivi : une suite de tests derrière --nocheck, et la seule raison de réclamer cinq paquets python de plus. Les artefacts écartés restaient indexés dans core.db. repo-add n'ajoute que : un sous-paquet retiré de pkgname laisse sa dernière compilation installable à jamais. Retirés à la main ; TODO.md consigne le manque. Assisted-by: Claude Opus 5
2026-08-19 05:28:32 -04:00
# The first produces no error. makepkg exits 0 and the repository gains a
# package whose library sits where nothing on the target will look -- the case
# "an exit code proves nothing, only the artefact proves" was written for,
# where the symptom arrives months later, far from the cause.
#
# The second is a closure decision, not a defect, and it is measured rather
# than argued.
[ADD] host deps: the tools six packages needed and nobody declared --nodeps means every makedepend must be named here by hand. Seven builds stopped on one, each naming a different tool: itstool, convert, fig2dev, asciidoctor, libnsl, python -m build, libbpf, history. The list was also a lie by omission. libreadline-dev, libncurses-dev, zlib1g-dev, python3-dev, doxygen, xsltproc, docbook-xsl, elinks and libcap2-bin were on this VM by hand and never declared. They made the builds pass here and would fail on a fresh Ubuntu, for reasons that have nothing to do with s390x. history.pc is generated rather than copied: our own readline package ships a correct one, but its libdir names /usr/lib, which on a multiarch host holds no libhistory. The .pc has to describe THIS host. Three hooks for what apt cannot buy. systemd asks for an EFI arch s390x does not have -- and says "python3 is missing modules: elftools", which sends you to apt for four lines before admitting the real reason. --- FR --- --nodeps veut dire que chaque makedepend doit être nommé ici à la main. Sept compilations se sont arrêtées sur l'une d'elles, chacune désignant un outil différent : itstool, convert, fig2dev, asciidoctor, libnsl, python -m build, libbpf, history. La liste mentait aussi par omission. libreadline-dev, libncurses-dev, zlib1g-dev, python3-dev, doxygen, xsltproc, docbook-xsl, elinks et libcap2-bin étaient posés à la main sur cette VM, jamais déclarés. Ils faisaient passer les compilations ici et auraient échoué sur un Ubuntu neuf, pour des raisons étrangères à s390x. history.pc est généré et non copié : notre propre paquet readline en livre un correct, mais son libdir nomme /usr/lib, qui sur un hôte multiarch ne contient aucun libhistory. Le .pc doit décrire CET hôte-ci. Trois crochets pour ce qu'apt n'achète pas. systemd réclame une architecture EFI que s390x n'a pas — et annonce « python3 is missing modules: elftools », ce qui envoie chez apt pour quatre lignes avant d'avouer la vraie raison. Assisted-by: Claude Opus 5
2026-08-17 01:33:41 -04:00
set -euo pipefail
# 1. The C library, and the one that actually matters.
#
# brotli's PKGBUILD calls plain `cmake`, not the arch-cmake stand-in, so it
# never sees the -DCMAKE_INSTALL_LIBDIR=lib that stand-in passes. CMake's
# GNUInstallDirs then picks its branch by sniffing the host: no
# /etc/arch-release, /etc/debian_version present, so
#
# CMAKE_INSTALL_LIBDIR = lib/s390x-linux-gnu
#
# Measured on a DESTDIR install of a real build: libbrotlicommon.so.1,
# libbrotlidec.so.1, libbrotlienc.so.1 and their .pc files all under
# /usr/lib/s390x-linux-gnu. brotli is in stage 1 only because the chroot said
# openssl and curl need libbrotli*.so -- and the filesystem package's
# /etc/ld.so.conf reads only ld.so.conf.d, so the target would never find
# them. A no-op in stage 2, where CMake takes the /etc/arch-release branch.
python3 - <<'PY'
import io
s = io.open("PKGBUILD", encoding="utf-8").read()
old = ' -DCMAKE_INSTALL_PREFIX=/usr \\\n'
assert s.count(old) == 1, "expected exactly one cmake configure, found %d" % s.count(old)
s = s.replace(old, old + ' -DCMAKE_INSTALL_LIBDIR=lib \\\n', 1)
io.open("PKGBUILD", "w", encoding="utf-8").write(s)
PY
grep -q 'DCMAKE_INSTALL_LIBDIR=lib' PKGBUILD || {
echo "brotli: libdir not pinned" >&2; exit 1; }
echo "brotli: cmake libdir pinned to lib (host GNUInstallDirs says multiarch)"
[REM] sub-packages: four that cost more closure than they carry pacman's resolver named 70 unresolved dependencies. Excluding python-brotli alone took that to 47 and removed `python` outright, with libffi, mpdecimal and gdbm behind it. python-libseccomp would have re-admitted the same tree, and nothing across 135 packages depends on either. Both wheels are unusable on the target anyway: built by the host's python 3.13, ABI-tagged cpython-313, while Arch ships 3.14. Stage 2 produces real ones. systemd-ukify is different -- it is architectural. ukify assembles a PE binary and its EFI_ARCH_MAP has no s390x entry, so guess_efi_arch() raises ValueError on this machine. Shipping it would put a program in the repository that cannot start. systemd-tests followed it out: a test suite behind --nocheck, and the only reason five more python packages were wanted. The dropped artefacts were still indexed in core.db afterwards. repo-add only adds, so a sub-package removed from pkgname leaves its last build installable forever. Removed by hand; TODO.md records the gap. --- FR --- Le résolveur de pacman nommait 70 dépendances non résolues. Écarter le seul python-brotli a ramené le compte à 47 et retiré `python` d'un coup, avec libffi, mpdecimal et gdbm derrière. python-libseccomp aurait réadmis le même arbre, et rien parmi 135 paquets ne dépend de l'un ou de l'autre. Les deux roues sont de toute façon inutilisables sur la cible : bâties par le python 3.13 de l'hôte, marquées cpython-313, quand Arch livre la 3.14. L'étage 2 en produira de vraies. systemd-ukify est d'une autre nature — architectural. ukify assemble un binaire PE et son EFI_ARCH_MAP n'a pas d'entrée s390x : guess_efi_arch() lève donc ValueError sur cette machine. Le livrer mettrait au dépôt un programme incapable de démarrer. systemd-tests l'a suivi : une suite de tests derrière --nocheck, et la seule raison de réclamer cinq paquets python de plus. Les artefacts écartés restaient indexés dans core.db. repo-add n'ajoute que : un sous-paquet retiré de pkgname laisse sa dernière compilation installable à jamais. Retirés à la main ; TODO.md consigne le manque. Assisted-by: Claude Opus 5
2026-08-19 05:28:32 -04:00
# 2. python-brotli: dropped, because it costs the entire python closure.
[ADD] host deps: the tools six packages needed and nobody declared --nodeps means every makedepend must be named here by hand. Seven builds stopped on one, each naming a different tool: itstool, convert, fig2dev, asciidoctor, libnsl, python -m build, libbpf, history. The list was also a lie by omission. libreadline-dev, libncurses-dev, zlib1g-dev, python3-dev, doxygen, xsltproc, docbook-xsl, elinks and libcap2-bin were on this VM by hand and never declared. They made the builds pass here and would fail on a fresh Ubuntu, for reasons that have nothing to do with s390x. history.pc is generated rather than copied: our own readline package ships a correct one, but its libdir names /usr/lib, which on a multiarch host holds no libhistory. The .pc has to describe THIS host. Three hooks for what apt cannot buy. systemd asks for an EFI arch s390x does not have -- and says "python3 is missing modules: elftools", which sends you to apt for four lines before admitting the real reason. --- FR --- --nodeps veut dire que chaque makedepend doit être nommé ici à la main. Sept compilations se sont arrêtées sur l'une d'elles, chacune désignant un outil différent : itstool, convert, fig2dev, asciidoctor, libnsl, python -m build, libbpf, history. La liste mentait aussi par omission. libreadline-dev, libncurses-dev, zlib1g-dev, python3-dev, doxygen, xsltproc, docbook-xsl, elinks et libcap2-bin étaient posés à la main sur cette VM, jamais déclarés. Ils faisaient passer les compilations ici et auraient échoué sur un Ubuntu neuf, pour des raisons étrangères à s390x. history.pc est généré et non copié : notre propre paquet readline en livre un correct, mais son libdir nomme /usr/lib, qui sur un hôte multiarch ne contient aucun libhistory. Le .pc doit décrire CET hôte-ci. Trois crochets pour ce qu'apt n'achète pas. systemd réclame une architecture EFI que s390x n'a pas — et annonce « python3 is missing modules: elftools », ce qui envoie chez apt pour quatre lignes avant d'avouer la vraie raison. Assisted-by: Claude Opus 5
2026-08-17 01:33:41 -04:00
#
[REM] sub-packages: four that cost more closure than they carry pacman's resolver named 70 unresolved dependencies. Excluding python-brotli alone took that to 47 and removed `python` outright, with libffi, mpdecimal and gdbm behind it. python-libseccomp would have re-admitted the same tree, and nothing across 135 packages depends on either. Both wheels are unusable on the target anyway: built by the host's python 3.13, ABI-tagged cpython-313, while Arch ships 3.14. Stage 2 produces real ones. systemd-ukify is different -- it is architectural. ukify assembles a PE binary and its EFI_ARCH_MAP has no s390x entry, so guess_efi_arch() raises ValueError on this machine. Shipping it would put a program in the repository that cannot start. systemd-tests followed it out: a test suite behind --nocheck, and the only reason five more python packages were wanted. The dropped artefacts were still indexed in core.db afterwards. repo-add only adds, so a sub-package removed from pkgname leaves its last build installable forever. Removed by hand; TODO.md records the gap. --- FR --- Le résolveur de pacman nommait 70 dépendances non résolues. Écarter le seul python-brotli a ramené le compte à 47 et retiré `python` d'un coup, avec libffi, mpdecimal et gdbm derrière. python-libseccomp aurait réadmis le même arbre, et rien parmi 135 paquets ne dépend de l'un ou de l'autre. Les deux roues sont de toute façon inutilisables sur la cible : bâties par le python 3.13 de l'hôte, marquées cpython-313, quand Arch livre la 3.14. L'étage 2 en produira de vraies. systemd-ukify est d'une autre nature — architectural. ukify assemble un binaire PE et son EFI_ARCH_MAP n'a pas d'entrée s390x : guess_efi_arch() lève donc ValueError sur cette machine. Le livrer mettrait au dépôt un programme incapable de démarrer. systemd-tests l'a suivi : une suite de tests derrière --nocheck, et la seule raison de réclamer cinq paquets python de plus. Les artefacts écartés restaient indexés dans core.db. repo-add n'ajoute que : un sous-paquet retiré de pkgname laisse sa dernière compilation installable à jamais. Retirés à la main ; TODO.md consigne le manque. Assisted-by: Claude Opus 5
2026-08-19 05:28:32 -04:00
# THE MEASUREMENT THAT DECIDED IT. pacman resolver named 70 missing
# dependencies. Excluding this one sub-package from the ledger took that to
# 47 and removed `python` outright -- with libffi, mpdecimal and gdbm behind
# it. Three packages of closure, for one module.
[ADD] host deps: the tools six packages needed and nobody declared --nodeps means every makedepend must be named here by hand. Seven builds stopped on one, each naming a different tool: itstool, convert, fig2dev, asciidoctor, libnsl, python -m build, libbpf, history. The list was also a lie by omission. libreadline-dev, libncurses-dev, zlib1g-dev, python3-dev, doxygen, xsltproc, docbook-xsl, elinks and libcap2-bin were on this VM by hand and never declared. They made the builds pass here and would fail on a fresh Ubuntu, for reasons that have nothing to do with s390x. history.pc is generated rather than copied: our own readline package ships a correct one, but its libdir names /usr/lib, which on a multiarch host holds no libhistory. The .pc has to describe THIS host. Three hooks for what apt cannot buy. systemd asks for an EFI arch s390x does not have -- and says "python3 is missing modules: elftools", which sends you to apt for four lines before admitting the real reason. --- FR --- --nodeps veut dire que chaque makedepend doit être nommé ici à la main. Sept compilations se sont arrêtées sur l'une d'elles, chacune désignant un outil différent : itstool, convert, fig2dev, asciidoctor, libnsl, python -m build, libbpf, history. La liste mentait aussi par omission. libreadline-dev, libncurses-dev, zlib1g-dev, python3-dev, doxygen, xsltproc, docbook-xsl, elinks et libcap2-bin étaient posés à la main sur cette VM, jamais déclarés. Ils faisaient passer les compilations ici et auraient échoué sur un Ubuntu neuf, pour des raisons étrangères à s390x. history.pc est généré et non copié : notre propre paquet readline en livre un correct, mais son libdir nomme /usr/lib, qui sur un hôte multiarch ne contient aucun libhistory. Le .pc doit décrire CET hôte-ci. Trois crochets pour ce qu'apt n'achète pas. systemd réclame une architecture EFI que s390x n'a pas — et annonce « python3 is missing modules: elftools », ce qui envoie chez apt pour quatre lignes avant d'avouer la vraie raison. Assisted-by: Claude Opus 5
2026-08-17 01:33:41 -04:00
#
[REM] sub-packages: four that cost more closure than they carry pacman's resolver named 70 unresolved dependencies. Excluding python-brotli alone took that to 47 and removed `python` outright, with libffi, mpdecimal and gdbm behind it. python-libseccomp would have re-admitted the same tree, and nothing across 135 packages depends on either. Both wheels are unusable on the target anyway: built by the host's python 3.13, ABI-tagged cpython-313, while Arch ships 3.14. Stage 2 produces real ones. systemd-ukify is different -- it is architectural. ukify assembles a PE binary and its EFI_ARCH_MAP has no s390x entry, so guess_efi_arch() raises ValueError on this machine. Shipping it would put a program in the repository that cannot start. systemd-tests followed it out: a test suite behind --nocheck, and the only reason five more python packages were wanted. The dropped artefacts were still indexed in core.db afterwards. repo-add only adds, so a sub-package removed from pkgname leaves its last build installable forever. Removed by hand; TODO.md records the gap. --- FR --- Le résolveur de pacman nommait 70 dépendances non résolues. Écarter le seul python-brotli a ramené le compte à 47 et retiré `python` d'un coup, avec libffi, mpdecimal et gdbm derrière. python-libseccomp aurait réadmis le même arbre, et rien parmi 135 paquets ne dépend de l'un ou de l'autre. Les deux roues sont de toute façon inutilisables sur la cible : bâties par le python 3.13 de l'hôte, marquées cpython-313, quand Arch livre la 3.14. L'étage 2 en produira de vraies. systemd-ukify est d'une autre nature — architectural. ukify assemble un binaire PE et son EFI_ARCH_MAP n'a pas d'entrée s390x : guess_efi_arch() lève donc ValueError sur cette machine. Le livrer mettrait au dépôt un programme incapable de démarrer. systemd-tests l'a suivi : une suite de tests derrière --nocheck, et la seule raison de réclamer cinq paquets python de plus. Les artefacts écartés restaient indexés dans core.db. repo-add n'ajoute que : un sous-paquet retiré de pkgname laisse sa dernière compilation installable à jamais. Retirés à la main ; TODO.md consigne le manque. Assisted-by: Claude Opus 5
2026-08-19 05:28:32 -04:00
# And the module could not work anyway. The wheel is built by the host python
# 3.13 and is ABI-tagged cpython-313; Arch ships 3.14. No destination makes it
# importable on the target, so stage 2 is what has to produce a real one.
# TODO.md carries that entry already.
[ADD] host deps: the tools six packages needed and nobody declared --nodeps means every makedepend must be named here by hand. Seven builds stopped on one, each naming a different tool: itstool, convert, fig2dev, asciidoctor, libnsl, python -m build, libbpf, history. The list was also a lie by omission. libreadline-dev, libncurses-dev, zlib1g-dev, python3-dev, doxygen, xsltproc, docbook-xsl, elinks and libcap2-bin were on this VM by hand and never declared. They made the builds pass here and would fail on a fresh Ubuntu, for reasons that have nothing to do with s390x. history.pc is generated rather than copied: our own readline package ships a correct one, but its libdir names /usr/lib, which on a multiarch host holds no libhistory. The .pc has to describe THIS host. Three hooks for what apt cannot buy. systemd asks for an EFI arch s390x does not have -- and says "python3 is missing modules: elftools", which sends you to apt for four lines before admitting the real reason. --- FR --- --nodeps veut dire que chaque makedepend doit être nommé ici à la main. Sept compilations se sont arrêtées sur l'une d'elles, chacune désignant un outil différent : itstool, convert, fig2dev, asciidoctor, libnsl, python -m build, libbpf, history. La liste mentait aussi par omission. libreadline-dev, libncurses-dev, zlib1g-dev, python3-dev, doxygen, xsltproc, docbook-xsl, elinks et libcap2-bin étaient posés à la main sur cette VM, jamais déclarés. Ils faisaient passer les compilations ici et auraient échoué sur un Ubuntu neuf, pour des raisons étrangères à s390x. history.pc est généré et non copié : notre propre paquet readline en livre un correct, mais son libdir nomme /usr/lib, qui sur un hôte multiarch ne contient aucun libhistory. Le .pc doit décrire CET hôte-ci. Trois crochets pour ce qu'apt n'achète pas. systemd réclame une architecture EFI que s390x n'a pas — et annonce « python3 is missing modules: elftools », ce qui envoie chez apt pour quatre lignes avant d'avouer la vraie raison. Assisted-by: Claude Opus 5
2026-08-17 01:33:41 -04:00
#
[REM] sub-packages: four that cost more closure than they carry pacman's resolver named 70 unresolved dependencies. Excluding python-brotli alone took that to 47 and removed `python` outright, with libffi, mpdecimal and gdbm behind it. python-libseccomp would have re-admitted the same tree, and nothing across 135 packages depends on either. Both wheels are unusable on the target anyway: built by the host's python 3.13, ABI-tagged cpython-313, while Arch ships 3.14. Stage 2 produces real ones. systemd-ukify is different -- it is architectural. ukify assembles a PE binary and its EFI_ARCH_MAP has no s390x entry, so guess_efi_arch() raises ValueError on this machine. Shipping it would put a program in the repository that cannot start. systemd-tests followed it out: a test suite behind --nocheck, and the only reason five more python packages were wanted. The dropped artefacts were still indexed in core.db afterwards. repo-add only adds, so a sub-package removed from pkgname leaves its last build installable forever. Removed by hand; TODO.md records the gap. --- FR --- Le résolveur de pacman nommait 70 dépendances non résolues. Écarter le seul python-brotli a ramené le compte à 47 et retiré `python` d'un coup, avec libffi, mpdecimal et gdbm derrière. python-libseccomp aurait réadmis le même arbre, et rien parmi 135 paquets ne dépend de l'un ou de l'autre. Les deux roues sont de toute façon inutilisables sur la cible : bâties par le python 3.13 de l'hôte, marquées cpython-313, quand Arch livre la 3.14. L'étage 2 en produira de vraies. systemd-ukify est d'une autre nature — architectural. ukify assemble un binaire PE et son EFI_ARCH_MAP n'a pas d'entrée s390x : guess_efi_arch() lève donc ValueError sur cette machine. Le livrer mettrait au dépôt un programme incapable de démarrer. systemd-tests l'a suivi : une suite de tests derrière --nocheck, et la seule raison de réclamer cinq paquets python de plus. Les artefacts écartés restaient indexés dans core.db. repo-add n'ajoute que : un sous-paquet retiré de pkgname laisse sa dernière compilation installable à jamais. Retirés à la main ; TODO.md consigne le manque. Assisted-by: Claude Opus 5
2026-08-19 05:28:32 -04:00
# Note what is NOT the reason. The wheel also lands in
# /usr/local/lib/python3.13/dist-packages, because Debian patches sysconfig to
# prefer its posix_local scheme, and an Arch package may not ship /usr/local.
# That was worth a relocation while the sub-package existed; with the
# sub-package gone there is nothing to relocate, and keeping the relocation
# would be editing a package() function makepkg never calls.
[ADD] host deps: the tools six packages needed and nobody declared --nodeps means every makedepend must be named here by hand. Seven builds stopped on one, each naming a different tool: itstool, convert, fig2dev, asciidoctor, libnsl, python -m build, libbpf, history. The list was also a lie by omission. libreadline-dev, libncurses-dev, zlib1g-dev, python3-dev, doxygen, xsltproc, docbook-xsl, elinks and libcap2-bin were on this VM by hand and never declared. They made the builds pass here and would fail on a fresh Ubuntu, for reasons that have nothing to do with s390x. history.pc is generated rather than copied: our own readline package ships a correct one, but its libdir names /usr/lib, which on a multiarch host holds no libhistory. The .pc has to describe THIS host. Three hooks for what apt cannot buy. systemd asks for an EFI arch s390x does not have -- and says "python3 is missing modules: elftools", which sends you to apt for four lines before admitting the real reason. --- FR --- --nodeps veut dire que chaque makedepend doit être nommé ici à la main. Sept compilations se sont arrêtées sur l'une d'elles, chacune désignant un outil différent : itstool, convert, fig2dev, asciidoctor, libnsl, python -m build, libbpf, history. La liste mentait aussi par omission. libreadline-dev, libncurses-dev, zlib1g-dev, python3-dev, doxygen, xsltproc, docbook-xsl, elinks et libcap2-bin étaient posés à la main sur cette VM, jamais déclarés. Ils faisaient passer les compilations ici et auraient échoué sur un Ubuntu neuf, pour des raisons étrangères à s390x. history.pc est généré et non copié : notre propre paquet readline en livre un correct, mais son libdir nomme /usr/lib, qui sur un hôte multiarch ne contient aucun libhistory. Le .pc doit décrire CET hôte-ci. Trois crochets pour ce qu'apt n'achète pas. systemd réclame une architecture EFI que s390x n'a pas — et annonce « python3 is missing modules: elftools », ce qui envoie chez apt pour quatre lignes avant d'avouer la vraie raison. Assisted-by: Claude Opus 5
2026-08-17 01:33:41 -04:00
#
[REM] sub-packages: four that cost more closure than they carry pacman's resolver named 70 unresolved dependencies. Excluding python-brotli alone took that to 47 and removed `python` outright, with libffi, mpdecimal and gdbm behind it. python-libseccomp would have re-admitted the same tree, and nothing across 135 packages depends on either. Both wheels are unusable on the target anyway: built by the host's python 3.13, ABI-tagged cpython-313, while Arch ships 3.14. Stage 2 produces real ones. systemd-ukify is different -- it is architectural. ukify assembles a PE binary and its EFI_ARCH_MAP has no s390x entry, so guess_efi_arch() raises ValueError on this machine. Shipping it would put a program in the repository that cannot start. systemd-tests followed it out: a test suite behind --nocheck, and the only reason five more python packages were wanted. The dropped artefacts were still indexed in core.db afterwards. repo-add only adds, so a sub-package removed from pkgname leaves its last build installable forever. Removed by hand; TODO.md records the gap. --- FR --- Le résolveur de pacman nommait 70 dépendances non résolues. Écarter le seul python-brotli a ramené le compte à 47 et retiré `python` d'un coup, avec libffi, mpdecimal et gdbm derrière. python-libseccomp aurait réadmis le même arbre, et rien parmi 135 paquets ne dépend de l'un ou de l'autre. Les deux roues sont de toute façon inutilisables sur la cible : bâties par le python 3.13 de l'hôte, marquées cpython-313, quand Arch livre la 3.14. L'étage 2 en produira de vraies. systemd-ukify est d'une autre nature — architectural. ukify assemble un binaire PE et son EFI_ARCH_MAP n'a pas d'entrée s390x : guess_efi_arch() lève donc ValueError sur cette machine. Le livrer mettrait au dépôt un programme incapable de démarrer. systemd-tests l'a suivi : une suite de tests derrière --nocheck, et la seule raison de réclamer cinq paquets python de plus. Les artefacts écartés restaient indexés dans core.db. repo-add n'ajoute que : un sous-paquet retiré de pkgname laisse sa dernière compilation installable à jamais. Retirés à la main ; TODO.md consigne le manque. Assisted-by: Claude Opus 5
2026-08-19 05:28:32 -04:00
# build() still builds the wheel -- it is one function for all three
# sub-packages -- and the result is simply not packaged. Cheap, and it keeps
# this hook to one line of real change.
[ADD] host deps: the tools six packages needed and nobody declared --nodeps means every makedepend must be named here by hand. Seven builds stopped on one, each naming a different tool: itstool, convert, fig2dev, asciidoctor, libnsl, python -m build, libbpf, history. The list was also a lie by omission. libreadline-dev, libncurses-dev, zlib1g-dev, python3-dev, doxygen, xsltproc, docbook-xsl, elinks and libcap2-bin were on this VM by hand and never declared. They made the builds pass here and would fail on a fresh Ubuntu, for reasons that have nothing to do with s390x. history.pc is generated rather than copied: our own readline package ships a correct one, but its libdir names /usr/lib, which on a multiarch host holds no libhistory. The .pc has to describe THIS host. Three hooks for what apt cannot buy. systemd asks for an EFI arch s390x does not have -- and says "python3 is missing modules: elftools", which sends you to apt for four lines before admitting the real reason. --- FR --- --nodeps veut dire que chaque makedepend doit être nommé ici à la main. Sept compilations se sont arrêtées sur l'une d'elles, chacune désignant un outil différent : itstool, convert, fig2dev, asciidoctor, libnsl, python -m build, libbpf, history. La liste mentait aussi par omission. libreadline-dev, libncurses-dev, zlib1g-dev, python3-dev, doxygen, xsltproc, docbook-xsl, elinks et libcap2-bin étaient posés à la main sur cette VM, jamais déclarés. Ils faisaient passer les compilations ici et auraient échoué sur un Ubuntu neuf, pour des raisons étrangères à s390x. history.pc est généré et non copié : notre propre paquet readline en livre un correct, mais son libdir nomme /usr/lib, qui sur un hôte multiarch ne contient aucun libhistory. Le .pc doit décrire CET hôte-ci. Trois crochets pour ce qu'apt n'achète pas. systemd réclame une architecture EFI que s390x n'a pas — et annonce « python3 is missing modules: elftools », ce qui envoie chez apt pour quatre lignes avant d'avouer la vraie raison. Assisted-by: Claude Opus 5
2026-08-17 01:33:41 -04:00
#
[REM] sub-packages: four that cost more closure than they carry pacman's resolver named 70 unresolved dependencies. Excluding python-brotli alone took that to 47 and removed `python` outright, with libffi, mpdecimal and gdbm behind it. python-libseccomp would have re-admitted the same tree, and nothing across 135 packages depends on either. Both wheels are unusable on the target anyway: built by the host's python 3.13, ABI-tagged cpython-313, while Arch ships 3.14. Stage 2 produces real ones. systemd-ukify is different -- it is architectural. ukify assembles a PE binary and its EFI_ARCH_MAP has no s390x entry, so guess_efi_arch() raises ValueError on this machine. Shipping it would put a program in the repository that cannot start. systemd-tests followed it out: a test suite behind --nocheck, and the only reason five more python packages were wanted. The dropped artefacts were still indexed in core.db afterwards. repo-add only adds, so a sub-package removed from pkgname leaves its last build installable forever. Removed by hand; TODO.md records the gap. --- FR --- Le résolveur de pacman nommait 70 dépendances non résolues. Écarter le seul python-brotli a ramené le compte à 47 et retiré `python` d'un coup, avec libffi, mpdecimal et gdbm derrière. python-libseccomp aurait réadmis le même arbre, et rien parmi 135 paquets ne dépend de l'un ou de l'autre. Les deux roues sont de toute façon inutilisables sur la cible : bâties par le python 3.13 de l'hôte, marquées cpython-313, quand Arch livre la 3.14. L'étage 2 en produira de vraies. systemd-ukify est d'une autre nature — architectural. ukify assemble un binaire PE et son EFI_ARCH_MAP n'a pas d'entrée s390x : guess_efi_arch() lève donc ValueError sur cette machine. Le livrer mettrait au dépôt un programme incapable de démarrer. systemd-tests l'a suivi : une suite de tests derrière --nocheck, et la seule raison de réclamer cinq paquets python de plus. Les artefacts écartés restaient indexés dans core.db. repo-add n'ajoute que : un sous-paquet retiré de pkgname laisse sa dernière compilation installable à jamais. Retirés à la main ; TODO.md consigne le manque. Assisted-by: Claude Opus 5
2026-08-19 05:28:32 -04:00
# brotli-testdata stays: nothing depends on it, it costs no closure, and
# removing it would be churn.
python3 - <<'PYB'
[ADD] host deps: the tools six packages needed and nobody declared --nodeps means every makedepend must be named here by hand. Seven builds stopped on one, each naming a different tool: itstool, convert, fig2dev, asciidoctor, libnsl, python -m build, libbpf, history. The list was also a lie by omission. libreadline-dev, libncurses-dev, zlib1g-dev, python3-dev, doxygen, xsltproc, docbook-xsl, elinks and libcap2-bin were on this VM by hand and never declared. They made the builds pass here and would fail on a fresh Ubuntu, for reasons that have nothing to do with s390x. history.pc is generated rather than copied: our own readline package ships a correct one, but its libdir names /usr/lib, which on a multiarch host holds no libhistory. The .pc has to describe THIS host. Three hooks for what apt cannot buy. systemd asks for an EFI arch s390x does not have -- and says "python3 is missing modules: elftools", which sends you to apt for four lines before admitting the real reason. --- FR --- --nodeps veut dire que chaque makedepend doit être nommé ici à la main. Sept compilations se sont arrêtées sur l'une d'elles, chacune désignant un outil différent : itstool, convert, fig2dev, asciidoctor, libnsl, python -m build, libbpf, history. La liste mentait aussi par omission. libreadline-dev, libncurses-dev, zlib1g-dev, python3-dev, doxygen, xsltproc, docbook-xsl, elinks et libcap2-bin étaient posés à la main sur cette VM, jamais déclarés. Ils faisaient passer les compilations ici et auraient échoué sur un Ubuntu neuf, pour des raisons étrangères à s390x. history.pc est généré et non copié : notre propre paquet readline en livre un correct, mais son libdir nomme /usr/lib, qui sur un hôte multiarch ne contient aucun libhistory. Le .pc doit décrire CET hôte-ci. Trois crochets pour ce qu'apt n'achète pas. systemd réclame une architecture EFI que s390x n'a pas — et annonce « python3 is missing modules: elftools », ce qui envoie chez apt pour quatre lignes avant d'avouer la vraie raison. Assisted-by: Claude Opus 5
2026-08-17 01:33:41 -04:00
import io
s = io.open("PKGBUILD", encoding="utf-8").read()
[REM] sub-packages: four that cost more closure than they carry pacman's resolver named 70 unresolved dependencies. Excluding python-brotli alone took that to 47 and removed `python` outright, with libffi, mpdecimal and gdbm behind it. python-libseccomp would have re-admitted the same tree, and nothing across 135 packages depends on either. Both wheels are unusable on the target anyway: built by the host's python 3.13, ABI-tagged cpython-313, while Arch ships 3.14. Stage 2 produces real ones. systemd-ukify is different -- it is architectural. ukify assembles a PE binary and its EFI_ARCH_MAP has no s390x entry, so guess_efi_arch() raises ValueError on this machine. Shipping it would put a program in the repository that cannot start. systemd-tests followed it out: a test suite behind --nocheck, and the only reason five more python packages were wanted. The dropped artefacts were still indexed in core.db afterwards. repo-add only adds, so a sub-package removed from pkgname leaves its last build installable forever. Removed by hand; TODO.md records the gap. --- FR --- Le résolveur de pacman nommait 70 dépendances non résolues. Écarter le seul python-brotli a ramené le compte à 47 et retiré `python` d'un coup, avec libffi, mpdecimal et gdbm derrière. python-libseccomp aurait réadmis le même arbre, et rien parmi 135 paquets ne dépend de l'un ou de l'autre. Les deux roues sont de toute façon inutilisables sur la cible : bâties par le python 3.13 de l'hôte, marquées cpython-313, quand Arch livre la 3.14. L'étage 2 en produira de vraies. systemd-ukify est d'une autre nature — architectural. ukify assemble un binaire PE et son EFI_ARCH_MAP n'a pas d'entrée s390x : guess_efi_arch() lève donc ValueError sur cette machine. Le livrer mettrait au dépôt un programme incapable de démarrer. systemd-tests l'a suivi : une suite de tests derrière --nocheck, et la seule raison de réclamer cinq paquets python de plus. Les artefacts écartés restaient indexés dans core.db. repo-add n'ajoute que : un sous-paquet retiré de pkgname laisse sa dernière compilation installable à jamais. Retirés à la main ; TODO.md consigne le manque. Assisted-by: Claude Opus 5
2026-08-19 05:28:32 -04:00
old = "pkgname=('brotli' 'python-brotli' 'brotli-testdata')"
assert s.count(old) == 1, "brotli: expected exactly one pkgname line"
s = s.replace(old, "pkgname=('brotli' 'brotli-testdata')", 1)
[ADD] host deps: the tools six packages needed and nobody declared --nodeps means every makedepend must be named here by hand. Seven builds stopped on one, each naming a different tool: itstool, convert, fig2dev, asciidoctor, libnsl, python -m build, libbpf, history. The list was also a lie by omission. libreadline-dev, libncurses-dev, zlib1g-dev, python3-dev, doxygen, xsltproc, docbook-xsl, elinks and libcap2-bin were on this VM by hand and never declared. They made the builds pass here and would fail on a fresh Ubuntu, for reasons that have nothing to do with s390x. history.pc is generated rather than copied: our own readline package ships a correct one, but its libdir names /usr/lib, which on a multiarch host holds no libhistory. The .pc has to describe THIS host. Three hooks for what apt cannot buy. systemd asks for an EFI arch s390x does not have -- and says "python3 is missing modules: elftools", which sends you to apt for four lines before admitting the real reason. --- FR --- --nodeps veut dire que chaque makedepend doit être nommé ici à la main. Sept compilations se sont arrêtées sur l'une d'elles, chacune désignant un outil différent : itstool, convert, fig2dev, asciidoctor, libnsl, python -m build, libbpf, history. La liste mentait aussi par omission. libreadline-dev, libncurses-dev, zlib1g-dev, python3-dev, doxygen, xsltproc, docbook-xsl, elinks et libcap2-bin étaient posés à la main sur cette VM, jamais déclarés. Ils faisaient passer les compilations ici et auraient échoué sur un Ubuntu neuf, pour des raisons étrangères à s390x. history.pc est généré et non copié : notre propre paquet readline en livre un correct, mais son libdir nomme /usr/lib, qui sur un hôte multiarch ne contient aucun libhistory. Le .pc doit décrire CET hôte-ci. Trois crochets pour ce qu'apt n'achète pas. systemd réclame une architecture EFI que s390x n'a pas — et annonce « python3 is missing modules: elftools », ce qui envoie chez apt pour quatre lignes avant d'avouer la vraie raison. Assisted-by: Claude Opus 5
2026-08-17 01:33:41 -04:00
io.open("PKGBUILD", "w", encoding="utf-8").write(s)
[REM] sub-packages: four that cost more closure than they carry pacman's resolver named 70 unresolved dependencies. Excluding python-brotli alone took that to 47 and removed `python` outright, with libffi, mpdecimal and gdbm behind it. python-libseccomp would have re-admitted the same tree, and nothing across 135 packages depends on either. Both wheels are unusable on the target anyway: built by the host's python 3.13, ABI-tagged cpython-313, while Arch ships 3.14. Stage 2 produces real ones. systemd-ukify is different -- it is architectural. ukify assembles a PE binary and its EFI_ARCH_MAP has no s390x entry, so guess_efi_arch() raises ValueError on this machine. Shipping it would put a program in the repository that cannot start. systemd-tests followed it out: a test suite behind --nocheck, and the only reason five more python packages were wanted. The dropped artefacts were still indexed in core.db afterwards. repo-add only adds, so a sub-package removed from pkgname leaves its last build installable forever. Removed by hand; TODO.md records the gap. --- FR --- Le résolveur de pacman nommait 70 dépendances non résolues. Écarter le seul python-brotli a ramené le compte à 47 et retiré `python` d'un coup, avec libffi, mpdecimal et gdbm derrière. python-libseccomp aurait réadmis le même arbre, et rien parmi 135 paquets ne dépend de l'un ou de l'autre. Les deux roues sont de toute façon inutilisables sur la cible : bâties par le python 3.13 de l'hôte, marquées cpython-313, quand Arch livre la 3.14. L'étage 2 en produira de vraies. systemd-ukify est d'une autre nature — architectural. ukify assemble un binaire PE et son EFI_ARCH_MAP n'a pas d'entrée s390x : guess_efi_arch() lève donc ValueError sur cette machine. Le livrer mettrait au dépôt un programme incapable de démarrer. systemd-tests l'a suivi : une suite de tests derrière --nocheck, et la seule raison de réclamer cinq paquets python de plus. Les artefacts écartés restaient indexés dans core.db. repo-add n'ajoute que : un sous-paquet retiré de pkgname laisse sa dernière compilation installable à jamais. Retirés à la main ; TODO.md consigne le manque. Assisted-by: Claude Opus 5
2026-08-19 05:28:32 -04:00
PYB
grep -q "^pkgname=('brotli' 'brotli-testdata')$" PKGBUILD || {
echo "brotli: python-brotli not removed from pkgname" >&2; exit 1; }
grep -q "python-brotli" PKGBUILD && echo "brotli: python-brotli remains only in its own package function (never called)"
echo "brotli: python-brotli dropped (pulled the whole python closure)"