Bug#694102: live-build: Add support for cdebootstrap with qemu
Package: live-build
Version: 3.0~a51-1
Severity: wishlist
Dear Maintainer,
While bootstrapping with debootstrap and qemu for e.g. armhf architecture on an
x86 PC works, it seems support for cdebootstrap and qemu is not currently
implemented in live-build.
Here is a patch against lb_bootstrap_cdebootstrap, which implements minimal
support for cdebootstrap with qemu. This is pretty much the transposition of
what was done for debootstrap. A number of warnings are produced while running
the second stage of cdebootstrap (under qemu) though.
Best regards,
V.
-- Package-specific info:
-- System Information:
Debian Release: wheezy/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 3.5-trunk-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages live-build depends on:
ii cdebootstrap 0.5.9
ii debootstrap 1.0.43
Versions of packages live-build recommends:
ii cpio 2.11-8
pn gnu-fdisk <none>
pn live-boot-doc <none>
pn live-config-doc <none>
pn live-manual-html | live-manual <none>
Versions of packages live-build suggests:
ii dosfstools 3.0.13-1
ii fakeroot 1.18.4-2
ii genisoimage 9:1.1.11-2
ii memtest86+ 4.20-1.1
ii mtools 4.0.17-1
pn parted <none>
ii squashfs-tools 1:4.2-5
ii sudo 1.8.5p2-1
ii syslinux 2:4.05+dfsg-6
ii uuid-runtime 2.20.1-5.2
pn win32-loader <none>
-- no debconf information
-- debsums errors found:
debsums: changed file /usr/share/live/build/scripts/build/lb_bootstrap_cdebootstrap (from live-build package)
--- lb_bootstrap_cdebootstrap.orig 2012-11-23 22:57:43.279296782 +0100
+++ lb_bootstrap_cdebootstrap 2012-11-23 23:03:58.887274618 +0100
@@ -145,7 +145,24 @@
fi
Echo_breakage "Running ${LB_BOOTSTRAP}... "
- ${LB_ROOT_COMMAND} ${LB_BOOTSTRAP} ${CDEBOOTSTRAP_OPTIONS} "${LB_PARENT_DISTRIBUTION}" chroot "${LB_PARENT_MIRROR_BOOTSTRAP}"
+
+ # Run appropriate bootstrap, i.e. foreign or regular bootstrap
+ if [ "${LB_BOOTSTRAP_QEMU_ARCHITECTURES}" = "${LB_ARCHITECTURES}" ]; then
+
+ if [ -n "${LB_BOOTSTRAP_QEMU_EXCLUDE}" ]
+ then
+ CDEBOOTSTRAP_OPTIONS="${CDEBOOTSTRAP_OPTIONS} --exclude=$(echo ${LB_BOOTSTRAP_QEMU_EXCLUDE} | sed 's| *|,|g')"
+ fi
+
+ Echo_message "Bootstrap will be foreign"
+ ${LB_ROOT_COMMAND} ${LB_BOOTSTRAP} ${CDEBOOTSTRAP_OPTIONS} --foreign "${LB_PARENT_DISTRIBUTION}" chroot "${LB_PARENT_MIRROR_BOOTSTRAP}"
+
+ Echo_message "Running debootstrap second stage under QEMU"
+ cp ${LB_BOOTSTRAP_QEMU_STATIC} chroot/usr/bin
+ Chroot chroot /bin/sh /sbin/cdebootstrap-foreign
+ else
+ ${LB_ROOT_COMMAND} ${LB_BOOTSTRAP} ${CDEBOOTSTRAP_OPTIONS} "${LB_PARENT_DISTRIBUTION}" chroot "${LB_PARENT_MIRROR_BOOTSTRAP}"
+ fi
if [ -n "${LB_ROOT_COMMAND}" ]
then
Reply to: