From 018b1d41474618caa58ad5999ab2d9c994b9adcb Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Wed, 7 May 2014 14:15:30 +1000 Subject: [PATCH] Add DIB_DEBOOTSTRAP_EXTRA_ARGS environment variable This allows extra arguments to be passed to the debootstrap command when creating an image using the debian element. Change-Id: I87eb856365ff6a17f051e2e56587235648328d57 Co-Authored-By: Ghe Rivero --- elements/debian/README.md | 5 +++++ elements/debian/root.d/08-debootstrap | 2 ++ 2 files changed, 7 insertions(+) diff --git a/elements/debian/README.md b/elements/debian/README.md index cc78e857..c009c295 100644 --- a/elements/debian/README.md +++ b/elements/debian/README.md @@ -19,3 +19,8 @@ and Fedora. The `DIB_OFFLINE` or more specific `DIB_DEBIAN_USE_DEBOOTSTRAP_CACHE` variables can be set to prefer the use of a pre-cached root filesystem tarball. + +The `DIB_DEBOOTSTRAP_EXTRA_ARGS` environment variable may be used to +pass extra arguments to the debootstrap command used to create the +base filesystem image. If --keyring is is used in `DIB_DEBOOTSTRAP_EXTRA_ARGS`, +it will override `DIB_DEBIAN_KEYRING` if that is used as well. diff --git a/elements/debian/root.d/08-debootstrap b/elements/debian/root.d/08-debootstrap index 723002b7..3034f0b8 100755 --- a/elements/debian/root.d/08-debootstrap +++ b/elements/debian/root.d/08-debootstrap @@ -22,6 +22,7 @@ fi DISTRO_NAME=${DISTRO_NAME:-debian} DIB_RELEASE=${DIB_RELEASE:-unstable} DIB_DEBIAN_ALT_INIT_PACKAGE=${DIB_DEBIAN_ALT_INIT_PACKAGE:-sysvinit} +DIB_DEBOOTSTRAP_EXTRA_ARGS=${DIB_DEBOOTSTRAP_EXTRA_ARGS:-} DEBOOTSTRAP_TARBALL=$DIB_IMAGE_CACHE/debootstrap-${DISTRO_NAME}-${DIB_DEBIAN_ALT_INIT_PACKAGE}-${DIB_RELEASE}-${ARCH}.tar.gz if [ -n "${DIB_DEBIAN_MIRROR:-}" ]; then echo "Use of DIB_DEBIAN_MIRROR environment variable to configure mirror is deprecated." @@ -48,6 +49,7 @@ else --arch=${ARCH} \ --include=${ADD_PACKAGES} \ $KEYRING_OPT \ + $DIB_DEBOOTSTRAP_EXTRA_ARGS \ $DIB_RELEASE \ $TARGET_ROOT \ $DIB_DISTRIBUTION_MIRROR \