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

Bug#790033: Allow custom configuration of the debootstrap script to use



Package: live-build
Version: 5.0~a9-1
Severity: wishlist
Tags: patch

Debootstrap likes using specific scripts for each distribution it builds,
however for derivates that don't have their own script in debootstrap it's
quite convenient to use the existing Debian script if possible. Attached patch
adds support to live-build to specify this.

-- Package-specific info:

-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable'), (500, 'oldstable'), (101, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386, armhf, armel

Kernel: Linux 4.0.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (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.70

Versions of packages live-build recommends:
ii  apt-utils                       1.0.9.10
ii  cpio                            2.11+dfsg-4.1
ii  live-boot-doc                   5.0~a4-1
ii  live-config-doc                 5.0~a3-1
ii  live-manual-html [live-manual]  1:5.0~a1-1
ii  wget                            1.16.3-3

Versions of packages live-build suggests:
ii  debian-keyring  2015.06.19
ii  gpgv            1.4.19-3

-- no debconf information
>From 8807f764683bbec3d00d8a5a1d1d75a28317ea68 Mon Sep 17 00:00:00 2001
From: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Date: Fri, 26 Jun 2015 15:10:30 +0200
Subject: [PATCH] Add an internal debootstrap-script option

Similar to the debootstrap-options, this allows one to set the
debootstrap script debootstrap will use. This is useful for building
derivatives that don't have debootstrap scripts available in debians
debootstrap package

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
---
 scripts/build/bootstrap_debootstrap | 6 +++---
 scripts/build/config                | 8 +++++++-
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/scripts/build/bootstrap_debootstrap b/scripts/build/bootstrap_debootstrap
index bd646ff..d79f670 100755
--- a/scripts/build/bootstrap_debootstrap
+++ b/scripts/build/bootstrap_debootstrap
@@ -87,7 +87,7 @@ then
 		fi
 
 		Echo_breakage "Running debootstrap (download-only)... "
-		debootstrap ${DEBOOTSTRAP_OPTIONS} --download-only "${LB_PARENT_DISTRIBUTION}" chroot "${LB_PARENT_MIRROR_BOOTSTRAP}"
+		debootstrap ${DEBOOTSTRAP_OPTIONS} --download-only "${LB_PARENT_DISTRIBUTION}" chroot "${LB_PARENT_MIRROR_BOOTSTRAP}" "${DEBOOTSTRAP_SCRIPT}"
 
 		# Removing old cache
 		rm -f cache/packages.bootstrap/*.deb
@@ -108,13 +108,13 @@ then
 		fi
 
 		Echo_message "Bootstrap will be foreign"
-		debootstrap ${DEBOOTSTRAP_OPTIONS} --foreign "${LB_PARENT_DISTRIBUTION}" chroot "${LB_PARENT_MIRROR_BOOTSTRAP}"
+		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
 	else
-		debootstrap ${DEBOOTSTRAP_OPTIONS} "${LB_PARENT_DISTRIBUTION}" chroot "${LB_PARENT_MIRROR_BOOTSTRAP}"
+		debootstrap ${DEBOOTSTRAP_OPTIONS} "${LB_PARENT_DISTRIBUTION}" chroot "${LB_PARENT_MIRROR_BOOTSTRAP}" "${DEBOOTSTRAP_SCRIPT}"
 	fi
 
 	# Deconfiguring debootstrap configurations
diff --git a/scripts/build/config b/scripts/build/config
index 66bf64f..d0e8cf4 100755
--- a/scripts/build/config
+++ b/scripts/build/config
@@ -125,7 +125,7 @@ USAGE="${PROGRAM}   [--apt apt|aptitude]\n\
 
 Local_arguments ()
 {
-	LONG_OPTIONS="apt:,apt-ftp-proxy:,apt-http-proxy:,apt-options:,aptitude-options:,debootstrap-options:,
+	LONG_OPTIONS="apt:,apt-ftp-proxy:,apt-http-proxy:,apt-options:,aptitude-options:,debootstrap-options:,debootstrap-script:,
 		apt-pipeline:,apt-recommends:,apt-secure:,apt-source-archives:,bootstrap:,cache:,cache-indices:,cache-packages:,
 		cache-stages:,debconf-frontend:,debconf-priority:,dump,
 		initramfs:,initramfs-compression:,initsystem:,fdisk:,losetup:,mode:,system:,tasksel:,
@@ -258,6 +258,11 @@ Local_arguments ()
 				shift 2
 				;;
 
+			--debootstrap-script)
+				DEBOOTSTRAP_SCRIPT="${2}"
+				shift 2
+				;;
+
 			--cache)
 				LB_CACHE="${2}"
 				shift 2
@@ -990,6 +995,7 @@ _QUIET="${_QUIET}"
 APT_OPTIONS="${APT_OPTIONS}"
 APTITUDE_OPTIONS="${APTITUDE_OPTIONS}"
 DEBOOTSTRAP_OPTIONS="${DEBOOTSTRAP_OPTIONS}"
+DEBOOTSTRAP_SCRIPT="${DEBOOTSTRAP_SCRIPT}"
 GZIP_OPTIONS="${GZIP_OPTIONS}"
 ISOHYBRID_OPTIONS="${ISOHYBRID_OPTIONS}"
 EOF
-- 
2.1.4


Reply to: