Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/arch-nspawn.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 /arch-nspawn.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 'arch-nspawn.in')
-rw-r--r--arch-nspawn.in7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch-nspawn.in b/arch-nspawn.in
index cde1f60..eb4d52f 100644
--- a/arch-nspawn.in
+++ b/arch-nspawn.in
@@ -126,8 +126,13 @@ copy_hostconf
eval "$(grep -a '^CARCH=' "$working_dir/etc/makepkg.conf")"
[[ -z $nosetarch ]] || unset CARCH
+if [[ -f "@pkgdatadir@/setarch-aliases.d/${CARCH}" ]]; then
+ set_arch=$(cat "@pkgdatadir@/setarch-aliases.d/${CARCH}")
+else
+ set_arch="${CARCH}"
+fi
-exec ${CARCH:+setarch "$CARCH"} systemd-nspawn -q \
+exec ${CARCH:+setarch "$set_arch"} systemd-nspawn -q \
-D "$working_dir" \
-E "PATH=/usr/local/sbin:/usr/local/bin:/usr/bin" \
--register=no --keep-unit --as-pid2 \