archlinux-s390x/patches/pkgbuild/libassuan.sh

18 lines
973 B
Bash
Raw Permalink Normal View History

[FIX] canonical CHOST, and a reachable libassuan source CHOST was the Debian-style triplet. gcc -dumpmachine reports s390x-linux-gnu on this host, but config.sub canonicalises that to s390x-ibm-linux-gnu and GCC builds its tree under the canonical name. Arch PKGBUILDs assume the canonical form -- theirs is x86_64-pc-linux-gnu, vendor field present -- so gcc's own PKGBUILD looked for $CHOST/libstdc++-v3/doc and found nothing: make: *** s390x-linux-gnu/libstdc++-v3/doc: No such file or directory while the build had created s390x-ibm-linux-gnu/libstdc++-v3/doc. This is a port-wide setting, not a gcc quirk: every PKGBUILD that derives a path from CHOST was pointing one directory sideways. libassuan fetches from dev.gnupg.org, which is unreachable from this build host -- measured HTTP 000, while github.com/gpg/libassuan.git and gnupg.org/ftp both answer. That is a network fact, not a port problem, so only the transport changes: the pinned tag is untouched and what gets built is what Arch specifies. Host dependencies again: doxygen for xz, libunistring for libpsl, systemd-dev for util-linux. Every one of them was invisible until a build stopped on it, because --nodeps means pacman never checks makedepends. --- FR --- CHOST portait le triplet de style Debian. Sur cet hote, gcc -dumpmachine rend s390x-linux-gnu, mais config.sub le canonise en s390x-ibm-linux-gnu, et GCC batit son arbre sous le nom canonique. Les PKGBUILD d Arch supposent la forme canonique -- la leur est x86_64-pc-linux-gnu, champ constructeur present -- si bien que le PKGBUILD de gcc cherchait $CHOST/libstdc++-v3/doc sans rien trouver : make: *** s390x-linux-gnu/libstdc++-v3/doc: No such file or directory alors que la compilation avait cree s390x-ibm-linux-gnu/libstdc++-v3/doc. C est un reglage de portage, pas une bizarrerie de gcc : tout PKGBUILD derivant un chemin de CHOST visait un repertoire a cote. libassuan se telecharge depuis dev.gnupg.org, injoignable depuis cet hote -- mesure : HTTP 000, quand github.com/gpg/libassuan.git et gnupg.org/ftp repondent tous deux. C est un fait de reseau, pas un probleme de portage : seul le transport change, l etiquette epinglee reste intacte et ce qui se batit est ce qu Arch specifie. Dependances d hote, encore : doxygen pour xz, libunistring pour libpsl, systemd-dev pour util-linux. Chacune est restee invisible jusqu a ce qu une compilation s y arrete, parce que --nodeps interdit a pacman de verifier les makedepends. Assisted-by: Claude Opus 5
2026-08-16 00:45:50 -04:00
#!/usr/bin/env bash
# libassuan: fetch from the GitHub mirror instead of dev.gnupg.org.
#
# fatal: unable to access 'https://dev.gnupg.org/source/libassuan.git/'
#
# This is NOT a port problem. dev.gnupg.org is simply unreachable from this
# build host -- measured: HTTP 000, while github.com/gpg/libassuan.git and
# gnupg.org/ftp both answer. The GnuPG project publishes the same history to
# GitHub, so the mirror is the upstream content, not a third-party copy.
#
# The commit the PKGBUILD pins is untouched: only the transport changes, so
# what gets built is bit-for-bit what Arch specifies.
set -euo pipefail
sed -i 's|https://dev\.gnupg\.org/source/libassuan\.git|https://github.com/gpg/libassuan.git|' PKGBUILD
grep -q 'dev.gnupg.org' PKGBUILD && { echo "libassuan: dev.gnupg.org still referenced" >&2; exit 1; }
grep -m1 'github.com/gpg/libassuan' PKGBUILD | sed 's/^\s*//'
echo "libassuan: source switched to the GitHub mirror (dev.gnupg.org unreachable here)"