[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#847919: live-build: Simplify live-build bootstrap code



Package: live-build
Version: 1:20161202
Severity: normal

Dear Maintainer,
I've simplified the live-build code for bootstrapping foreign architectures
by using the qemu-debootstrap tool provided with qemu-user-static.

Please take a look at the attached patch.

Control: tag -1 + patch

-- Package-specific info:

-- System Information:
Debian Release: stretch/sid
  APT prefers testing-debug
  APT policy: (500, 'testing-debug'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: armhf, i386

Kernel: Linux 4.9.0-rc8-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages live-build depends on:
ii  debootstrap  1.0.87

Versions of packages live-build recommends:
ii  apt-utils                       1.4~beta1
ii  cpio                            2.11+dfsg-6
ii  live-boot-doc                   1:20160511
ii  live-config-doc                 5.20160608
ii  live-manual                     2:20151217.1
ii  live-manual-epub [live-manual]  2:20151217.1
ii  live-manual-html [live-manual]  2:20151217.1
ii  live-manual-odf [live-manual]   2:20151217.1
ii  live-manual-pdf [live-manual]   2:20151217.1
ii  live-manual-txt [live-manual]   2:20151217.1
ii  wget                            1.18-4

live-build suggests no packages.

-- no debconf information
>From f17c04ab0cfca1a4d771226b42941be2cba653e9 Mon Sep 17 00:00:00 2001
From: Rohan Garg <rohan@garg.io>
Date: Mon, 12 Dec 2016 11:49:03 +0100
Subject: [PATCH] Run debootstrap with qemu-debootstrap if the binary is
 present

---
 scripts/build/bootstrap_debootstrap | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/scripts/build/bootstrap_debootstrap b/scripts/build/bootstrap_debootstrap
index a89fc42..419a031 100755
--- a/scripts/build/bootstrap_debootstrap
+++ b/scripts/build/bootstrap_debootstrap
@@ -108,12 +108,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
-- 
2.10.2


Reply to: