summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRaphaël Hertzog <hertzog@debian.org>2016-11-28 16:43:50 +0100
committerRaphaël Hertzog <hertzog@debian.org>2016-11-28 20:58:19 +0100
commit164f23368e8870857c1092d59d92b314d86a1260 (patch)
tree881c81e39ac1b5c8f7a20ac7cc6ae12ff6a65372 /scripts
parent822459c7b25589f4065c25bcd8b3ab440ae0e4cd (diff)
downloadvyos-live-build-164f23368e8870857c1092d59d92b314d86a1260.tar.gz
vyos-live-build-164f23368e8870857c1092d59d92b314d86a1260.zip
Support “lb config --debootstrap-script <script>”
This option lets you use an alternate bootstrap script when running debootstrap. Thanks to Sjoerd Simons <sjoerd@debian.org> for the initial patch. Closes: #790033
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build/bootstrap_debootstrap6
-rwxr-xr-xscripts/build/config10
2 files changed, 12 insertions, 4 deletions
diff --git a/scripts/build/bootstrap_debootstrap b/scripts/build/bootstrap_debootstrap
index 446cc6ca4..a89fc42a1 100755
--- a/scripts/build/bootstrap_debootstrap
+++ b/scripts/build/bootstrap_debootstrap
@@ -88,7 +88,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
@@ -109,13 +109,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 ${FOREIGN_DEBOOTSTRAP_OPTIONS}
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 e5810b45d..9c2d90444 100755
--- a/scripts/build/config
+++ b/scripts/build/config
@@ -51,6 +51,8 @@ USAGE="${PROGRAM} [--apt apt|aptitude]\n\
\t [--debian-installer-distribution daily|CODENAME]\n\
\t [--debian-installer-preseedfile FILE|URL]\n\
\t [--debian-installer-gui true|false]\n\
+\t [--debootstrap-options OPTIONS]\n\
+\t [--debootstrap-script SCRIPT]\n\
\t [--debug]\n\
\t [-d|--distribution CODENAME]\n\
\t [--parent-distribution CODENAME]\n\
@@ -126,7 +128,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:,
@@ -259,6 +261,11 @@ Local_arguments ()
shift 2
;;
+ --debootstrap-script)
+ DEBOOTSTRAP_SCRIPT="${2}"
+ shift 2
+ ;;
+
--cache)
LB_CACHE="${2}"
shift 2
@@ -996,6 +1003,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