summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRohan Garg <rohan@garg.io>2016-12-12 11:49:03 +0100
committerRaphaƫl Hertzog <hertzog@debian.org>2018-02-24 17:52:44 +0100
commit952ac834e4bf63bccfc84715d6e69bd3fd9b3ff0 (patch)
tree227fb9272769b4c9fdf3e02310475a2cb45cac10
parent842e971a65edf049a33dbba738d30c8c7edb85bc (diff)
downloadvyos-live-build-952ac834e4bf63bccfc84715d6e69bd3fd9b3ff0.tar.gz
vyos-live-build-952ac834e4bf63bccfc84715d6e69bd3fd9b3ff0.zip
Simplify bootstrapping of foreign architectures with qemu-debootstrap
We already require qemu-user-static for this case, we might as well rely on the qemu-debootstrap script that this package provides. Closes: #847919
-rwxr-xr-xscripts/build/bootstrap_debootstrap9
1 files changed, 2 insertions, 7 deletions
diff --git a/scripts/build/bootstrap_debootstrap b/scripts/build/bootstrap_debootstrap
index a89fc42a1..99f0a22e5 100755
--- a/scripts/build/bootstrap_debootstrap
+++ b/scripts/build/bootstrap_debootstrap
@@ -62,7 +62,6 @@ if [ "${LB_ARCHIVE_AREAS}" != "main" ]
then
# Modify archive areas to remove leading/trailing whitespaces and replace other whitepspace with commas
DEBOOTSTRAP_OPTIONS="${DEBOOTSTRAP_OPTIONS} --components=$(echo ${LB_ARCHIVE_AREAS} | sed -e 's| |,|g')"
- FOREIGN_DEBOOTSTRAP_OPTIONS="--components=$(echo ${LB_ARCHIVE_AREAS} | sed -e 's| |,|g')"
fi
if [ "${_VERBOSE}" = "true" ]
@@ -108,12 +107,8 @@ then
DEBOOTSTRAP_OPTIONS="${DEBOOTSTRAP_OPTIONS} --exclude=$(echo ${LB_BOOTSTRAP_QEMU_EXCLUDE} | sed 's| *|,|g')"
fi
- Echo_message "Bootstrap will be foreign"
- debootstrap ${DEBOOTSTRAP_OPTIONS} --foreign "${LB_PARENT_DISTRIBUTION}" chroot "${LB_PARENT_MIRROR_BOOTSTRAP}" ${DEBOOTSTRAP_SCRIPT}
-
- Echo_message "Running debootstrap second stage under QEMU"
- cp ${LB_BOOTSTRAP_QEMU_STATIC} chroot/usr/bin
- Chroot chroot /bin/sh /debootstrap/debootstrap --second-stage ${FOREIGN_DEBOOTSTRAP_OPTIONS}
+ Echo_message "Running debootstrap with qemu-debootstrap"
+ qemu-debootstrap ${DEBOOTSTRAP_OPTIONS} "${LB_PARENT_DISTRIBUTION}" chroot "${LB_PARENT_MIRROR_BOOTSTRAP}" ${DEBOOTSTRAP_SCRIPT}
else
debootstrap ${DEBOOTSTRAP_OPTIONS} "${LB_PARENT_DISTRIBUTION}" chroot "${LB_PARENT_MIRROR_BOOTSTRAP}" ${DEBOOTSTRAP_SCRIPT}
fi