diff --git a/patches/pkgbuild/libassuan.sh b/patches/pkgbuild/libassuan.sh new file mode 100755 index 0000000..daae3ab --- /dev/null +++ b/patches/pkgbuild/libassuan.sh @@ -0,0 +1,17 @@ +#!/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)" diff --git a/scripts/bootstrap-pacman.sh b/scripts/bootstrap-pacman.sh index 06a2d51..31325ba 100755 --- a/scripts/bootstrap-pacman.sh +++ b/scripts/bootstrap-pacman.sh @@ -74,6 +74,19 @@ configure_makepkg() { # pacman refuses to initialise alpm without its database directory. The # error is only a warning during packaging, but it hides real ones. sudo mkdir -p /var/lib/pacman + # CHOST must be the CANONICAL triplet, not the Debian-style one. + # + # gcc -dumpmachine reports s390x-linux-gnu here, 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, with the 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. + sudo sed -i 's|^CHOST=.*|CHOST="s390x-ibm-linux-gnu"|' /etc/makepkg.conf grep -E '^(CARCH|CHOST|MAKEFLAGS)=' /etc/makepkg.conf }