Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archbuild.in
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2020-04-09 21:27:11 +0200
committerErich Eckner <git@eckner.net>2021-02-13 14:05:37 +0100
commitf02e83e667fe7890ec6af7baff7f8e3bc67c33ef (patch)
tree139c23bc781b91e1707e5463d553f27c7a100283 /archbuild.in
parent15a4ae46a29612513eda53909536b81bcec44859 (diff)
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).
Diffstat (limited to 'archbuild.in')
-rw-r--r--archbuild.in7
1 files changed, 6 insertions, 1 deletions
diff --git a/archbuild.in b/archbuild.in
index 32f0d03..c317cc2 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
+ set_arch=$(cat "@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" \