forked from josch/mmdebstrap
rename install-libmagic-mgc-on-arm64 test and allow running it on both amd64 and arm64
This commit is contained in:
parent
b54564a84d
commit
4bcd6fa015
2 changed files with 17 additions and 3 deletions
|
@ -365,11 +365,11 @@ Variants: custom
|
||||||
Modes: chrootless
|
Modes: chrootless
|
||||||
Needs-APT-Config: true
|
Needs-APT-Config: true
|
||||||
|
|
||||||
Test: install-libmagic-mgc-on-arm64
|
Test: install-libmagic-mgc-on-foreign
|
||||||
Variants: custom
|
Variants: custom
|
||||||
Modes: chrootless
|
Modes: chrootless
|
||||||
Skip-If:
|
Skip-If:
|
||||||
hostarch != "amd64"
|
hostarch not in ["amd64", "arm64"]
|
||||||
not have_binfmt
|
not have_binfmt
|
||||||
|
|
||||||
Test: install-busybox-based-sub-essential-system
|
Test: install-busybox-based-sub-essential-system
|
||||||
|
|
|
@ -17,13 +17,27 @@ if [ "$(id -u)" -eq 0 ] && [ "{{ MODE }}" != "root" ] && [ "{{ MODE }}" != "auto
|
||||||
prefix="runuser -u ${SUDO_USER:-user} --"
|
prefix="runuser -u ${SUDO_USER:-user} --"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
$prefix {{ CMD }} --mode={{ MODE }} --variant={{ VARIANT }} --architectures=arm64 --include=libmagic-mgc {{ DIST }} /tmp/debian-chroot {{ MIRROR }}
|
case "$(dpkg --print-architecture)" in
|
||||||
|
arm64)
|
||||||
|
foreign_arch=amd64
|
||||||
|
;;
|
||||||
|
amd64)
|
||||||
|
foreign_arch=arm64
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "unsupported native architecture" >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
$prefix {{ CMD }} --mode={{ MODE }} --variant={{ VARIANT }} --architectures="$foreign_arch" --include=libmagic-mgc {{ DIST }} /tmp/debian-chroot {{ MIRROR }}
|
||||||
# delete contents of libmagic-mgc
|
# delete contents of libmagic-mgc
|
||||||
rm /tmp/debian-chroot/usr/lib/file/magic.mgc
|
rm /tmp/debian-chroot/usr/lib/file/magic.mgc
|
||||||
rm /tmp/debian-chroot/usr/share/doc/libmagic-mgc/README.Debian
|
rm /tmp/debian-chroot/usr/share/doc/libmagic-mgc/README.Debian
|
||||||
rm /tmp/debian-chroot/usr/share/doc/libmagic-mgc/changelog.Debian.gz
|
rm /tmp/debian-chroot/usr/share/doc/libmagic-mgc/changelog.Debian.gz
|
||||||
rm /tmp/debian-chroot/usr/share/doc/libmagic-mgc/changelog.gz
|
rm /tmp/debian-chroot/usr/share/doc/libmagic-mgc/changelog.gz
|
||||||
rm /tmp/debian-chroot/usr/share/doc/libmagic-mgc/copyright
|
rm /tmp/debian-chroot/usr/share/doc/libmagic-mgc/copyright
|
||||||
|
rm /tmp/debian-chroot/usr/share/doc/libmagic-mgc/"changelog.Debian.$foreign_arch.gz"
|
||||||
rm /tmp/debian-chroot/usr/share/file/magic.mgc
|
rm /tmp/debian-chroot/usr/share/file/magic.mgc
|
||||||
rm /tmp/debian-chroot/usr/share/misc/magic.mgc
|
rm /tmp/debian-chroot/usr/share/misc/magic.mgc
|
||||||
# delete real files
|
# delete real files
|
Loading…
Reference in a new issue