summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2016-10-30 12:45:40 +0100
committerJonas Smedegaard <dr@jones.dk>2016-11-01 11:31:03 +0100
commit637bcddd06552345b672627e19d686f0252026aa (patch)
tree23f0996ad414f97aadb26de61ff61826214f8235
parent47c8f454347af07881281b088c1e99f8be8aa1b8 (diff)
Fix support alien-arch as real root (by use of static QEMU).
-rwxr-xr-xskel/multistrap-hooks/completion_50_configscript.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/skel/multistrap-hooks/completion_50_configscript.sh b/skel/multistrap-hooks/completion_50_configscript.sh
index 17b3a77..31e3896 100755
--- a/skel/multistrap-hooks/completion_50_configscript.sh
+++ b/skel/multistrap-hooks/completion_50_configscript.sh
@@ -7,9 +7,11 @@
# multistrap completion hook supporting alien arch with fakeroot
#
# Recommends: fakeroot proot qemu-user
+# Suggests: qemu-user-static
# Enhances: multistrap
#
# TODO: avoid need for libfakeroot installed into target system
+# TODO: avoid install static QEMU into target system when run as real root
# TODO: optimize by having proot bypass select binaries
# candidates:
# * /bin/sh
@@ -52,7 +54,9 @@ else
$sudo mount --bind /proc "$fs/proc"
$sudo mount --bind /sys "$fs/sys"
$sudo mount --bind /dev "$fs/dev"
+ [ -z "$qemu" ] || cp "/usr/bin/$qemu" "$fs/usr/bin/"
$sudo chroot "$fs" /multistrap-configure.sh
+ [ -z "$qemu" ] || rm "$fs/usr/bin/$qemu"
$sudo umount "$fs/proc"
$sudo umount "$fs/sys"
$sudo umount "$fs/dev"