[FIX] our flit_core is too new, and savannah would not serve a patch
python-jinja: ERROR Missing dependencies: flit_core<4 flit_core is installed and importable -- 4.0.2. jinja's pyproject.toml pins flit_core<4, so build refuses before compiling anything. A new shape here, and the mirror image of one already recorded: libxslt could not be built on the host because Ubuntu's libxml2 was too OLD; this is our own package being too NEW for another's ceiling. Both read as a missing dependency and neither is one. --skip-dependency-check is what Arch's own python-packaging passes for the same class of reason. autoconf-archive: curl: (52) Empty reply from server The tarball arrives fine from ftpmirror.gnu.org. What fails is one patch from savannah's cgit /patch/?id= endpoint, which returns nothing while savannah's root answers 302 -- measured on both, plus 200 and 2463 bytes from a git mirror for the same commit hash. Asking a mirror for the SAME COMMIT changes where the bytes come from, not which bytes they are. Also: pkill -f "[c]url.*autoconf-arc" killed the shell running it, because the pattern matched that shell's own command line. Fourth time in this port. --- FR --- python-jinja: ERROR Missing dependencies: flit_core<4 flit_core est installé et importable — 4.0.2. Le pyproject.toml de jinja épingle flit_core<4 : build refuse avant de compiler. Forme nouvelle ici, et miroir d'une déjà consignée : libxslt ne se bâtissait pas sur l'hôte car le libxml2 d'Ubuntu était trop ANCIEN ; ici notre propre paquet est trop RÉCENT pour le plafond d'un autre. Les deux se lisent comme une dépendance manquante, aucune ne l'est. --skip-dependency-check est ce que passe le python-packaging d'Arch pour la même raison. autoconf-archive: curl: (52) Empty reply from server L'archive arrive très bien de ftpmirror.gnu.org. Ce qui échoue est un correctif tiré du point /patch/?id= de cgit chez savannah, qui ne renvoie rien alors que la racine de savannah répond 302 — mesuré sur les deux, plus 200 et 2463 octets depuis un miroir git pour le même commit. Demander le MÊME COMMIT à un miroir change d'où viennent les octets, pas lesquels. Aussi : pkill -f "[c]url.*autoconf-arc" a tué le shell qui l'exécutait, son motif correspondant à la ligne de commande de ce shell. Quatrième fois dans ce portage. Assisted-by: Claude Opus 5
This commit is contained in:
parent
a8eef0e460
commit
8a41d00a90
3 changed files with 88 additions and 2 deletions
47
patches/pkgbuild/autoconf-archive.sh
Executable file
47
patches/pkgbuild/autoconf-archive.sh
Executable file
|
|
@ -0,0 +1,47 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# autoconf-archive: take the patch from a mirror savannah's cgit will serve.
|
||||||
|
#
|
||||||
|
# curl: (52) Empty reply from server
|
||||||
|
# ==> ERROR: Failure while downloading
|
||||||
|
# https://cgit.git.savannah.gnu.org/cgit/autoconf-archive.git/patch/?id=241f7ae...
|
||||||
|
#
|
||||||
|
# The tarball comes from ftpmirror.gnu.org and arrives fine. What fails is a
|
||||||
|
# single patch fetched from savannah's cgit /patch/?id= endpoint, which returns
|
||||||
|
# nothing at all -- measured, not assumed:
|
||||||
|
#
|
||||||
|
# savannah /patch/?id= (no response)
|
||||||
|
# github /commit/.patch 200, 2463 bytes
|
||||||
|
#
|
||||||
|
# savannah itself is up (its root answers 302); it is that endpoint, which cgit
|
||||||
|
# generates on demand and rate-limits.
|
||||||
|
#
|
||||||
|
# The mirror is asked for THE SAME COMMIT, by its full hash, so this changes
|
||||||
|
# where the bytes come from and not which bytes they are -- the substantive
|
||||||
|
# difference from replacing a source with a different version of itself. GitHub
|
||||||
|
# renders `git format-patch` output where cgit renders its own; both are what
|
||||||
|
# `patch` expects, and the build fails loudly if that were untrue.
|
||||||
|
#
|
||||||
|
# WHY NOT DROP THE PATCH. It is 0001_fix_AX_CXX_COMPILE_STDCXX.patch, a fix to a
|
||||||
|
# macro this port needs -- tpm2-tss stopped on a missing AX_* macro, which is why
|
||||||
|
# autoconf-archive is in the list at all.
|
||||||
|
set -euo pipefail
|
||||||
|
python3 - <<'ZZPY'
|
||||||
|
import io, re
|
||||||
|
s = io.open("PKGBUILD", encoding="utf-8").read()
|
||||||
|
old = "https://cgit.git.savannah.gnu.org/cgit/autoconf-archive.git/patch/?id="
|
||||||
|
assert s.count(old) == 1, "autoconf-archive: expected one cgit patch URL, got %d" % s.count(old)
|
||||||
|
# The commit hash follows the URL, up to the closing quote. Reused verbatim: the
|
||||||
|
# point of the substitution is that the content is identical.
|
||||||
|
m = re.search(re.escape(old) + r"([0-9a-f]{40})", s)
|
||||||
|
assert m, "autoconf-archive: no 40-character commit hash after the cgit URL"
|
||||||
|
sha = m.group(1)
|
||||||
|
s = s.replace(old + sha,
|
||||||
|
"https://github.com/autoconf-archive/autoconf-archive/commit/%s.patch" % sha, 1)
|
||||||
|
io.open("PKGBUILD", "w", encoding="utf-8").write(s)
|
||||||
|
print(" patch commit: %s" % sha[:12])
|
||||||
|
ZZPY
|
||||||
|
grep -q "cgit.git.savannah.gnu.org" PKGBUILD && {
|
||||||
|
echo "autoconf-archive: a cgit URL survived" >&2; exit 1; }
|
||||||
|
grep -qE "github.com/autoconf-archive/autoconf-archive/commit/[0-9a-f]{40}\.patch" PKGBUILD || {
|
||||||
|
echo "autoconf-archive: the mirror URL is malformed" >&2; exit 1; }
|
||||||
|
echo "autoconf-archive: patch taken from the git mirror (same commit)"
|
||||||
38
patches/pkgbuild/python-jinja.sh
Executable file
38
patches/pkgbuild/python-jinja.sh
Executable file
|
|
@ -0,0 +1,38 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# python-jinja: our flit_core is NEWER than jinja will accept.
|
||||||
|
#
|
||||||
|
# * Getting build dependencies for wheel...
|
||||||
|
# ERROR Missing dependencies:
|
||||||
|
# flit_core<4
|
||||||
|
#
|
||||||
|
# flit_core IS installed, and importable: 4.0.2. jinja's pyproject.toml pins
|
||||||
|
# `flit_core<4`, so `python -m build` refuses before compiling anything.
|
||||||
|
#
|
||||||
|
# A NEW SHAPE for this port, and the mirror image of the one already recorded.
|
||||||
|
# libxslt could not be built on the host because Ubuntu's libxml2 was too OLD.
|
||||||
|
# Here our own package is too NEW for another package's declared ceiling. Both
|
||||||
|
# read as a missing dependency; neither is one.
|
||||||
|
#
|
||||||
|
# --skip-dependency-check tells build to compile anyway, and it is not an
|
||||||
|
# invention: Arch's own python-packaging PKGBUILD passes `-wn
|
||||||
|
# --skip-dependency-check` for the same class of reason. The pin is upstream
|
||||||
|
# caution -- flit_core 4 changed no API jinja uses, and jinja builds and imports
|
||||||
|
# fine against it.
|
||||||
|
#
|
||||||
|
# The honest alternative was pinning flit-core to 3.x for the whole
|
||||||
|
# distribution, which would trade one package's ceiling for every other
|
||||||
|
# package's floor.
|
||||||
|
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.search(r"python -m build\b", l)]
|
||||||
|
assert len(hit) == 1, "python-jinja: expected one `python -m build`, got %d" % len(hit)
|
||||||
|
i = hit[0]
|
||||||
|
assert "--skip-dependency-check" not in lines[i], "python-jinja: already skipping"
|
||||||
|
lines[i] = lines[i].rstrip() + " --skip-dependency-check"
|
||||||
|
io.open("PKGBUILD", "w", encoding="utf-8").write("\n".join(lines))
|
||||||
|
ZZPY
|
||||||
|
grep -q -- "python -m build .*--skip-dependency-check" PKGBUILD || {
|
||||||
|
echo "python-jinja: the flag is not on the build line" >&2; exit 1; }
|
||||||
|
echo "python-jinja: dependency check skipped (our flit_core is 4.x, the pin says <4)"
|
||||||
|
|
@ -736,7 +736,8 @@ NOTE
|
||||||
STAGE2_FIRST=(texinfo libxml2 binutils pkgconf wget libxslt
|
STAGE2_FIRST=(texinfo libxml2 binutils pkgconf wget libxslt
|
||||||
python-packaging python-pyproject-hooks python-build
|
python-packaging python-pyproject-hooks python-build
|
||||||
python-installer python-setuptools python-wheel
|
python-installer python-setuptools python-wheel
|
||||||
python-setuptools-scm python-markupsafe python-jinja)
|
python-setuptools-scm python-markupsafe python-jinja
|
||||||
|
python-pkgconfig cython)
|
||||||
|
|
||||||
# Packages the chroot needs that can only come from repo2.
|
# Packages the chroot needs that can only come from repo2.
|
||||||
#
|
#
|
||||||
|
|
@ -797,7 +798,7 @@ CHROOT_STAGE2_PKGS=(
|
||||||
python-packaging python-pyproject-hooks python-build
|
python-packaging python-pyproject-hooks python-build
|
||||||
python-installer python-setuptools python-wheel
|
python-installer python-setuptools python-wheel
|
||||||
python-setuptools-scm
|
python-setuptools-scm
|
||||||
python-markupsafe python-jinja
|
python-markupsafe python-jinja python-pkgconfig cython
|
||||||
)
|
)
|
||||||
|
|
||||||
# Packages whose sources must be extracted on the HOST, because the chroot
|
# Packages whose sources must be extracted on the HOST, because the chroot
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue