From 30ed6920c7e7962b7161bc2405c63e9a1ab95be2 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 9 Apr 2020 21:27:11 +0200 Subject: allow to call setarch with a different value than $CARCH Introduce setarch-aliases.d/ which gets installed inside /usr/share/devtools. This allows to assign aliases which map one CARCH to a different name which gets provided as argument for setarch. This is necessary on archlinuxarm ("armv6h" -> "armv6l", "armv7h" -> "armv7l") and allows for more fine-grained architectures (e.g. archlinux32 has "i686" and "pentium4", which differ in the required cpu capabilities). Signed-off-by: Levente Polyak --- archbuild.in | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'archbuild.in') diff --git a/archbuild.in b/archbuild.in index 5b98976..7cd65bd 100644 --- a/archbuild.in +++ b/archbuild.in @@ -17,6 +17,11 @@ else repo=${tag%-*} arch=${tag##*-} fi +if [[ -f "@pkgdatadir@/setarch-aliases.d/${arch}" ]]; then + read -r set_arch < "@pkgdatadir@/setarch-aliases.d/${arch}" +else + set_arch="${arch}" +fi chroots='/var/lib/archbuild' clean_first=false @@ -69,7 +74,7 @@ if ${clean_first} || [[ ! -d "${chroots}/${repo}-${arch}" ]]; then rm -rf --one-file-system "${chroots}/${repo}-${arch}" (umask 0022; mkdir -p "${chroots}/${repo}-${arch}") - setarch "${arch}" mkarchroot \ + setarch "${set_arch}" mkarchroot \ -C "${pacman_config}" \ -M "${makepkg_config}" \ "${chroots}/${repo}-${arch}/root" \ -- cgit v1.2.3-70-g09d2