From bae9b3817ddc784a45968c9ff37cd1ccae20b003 Mon Sep 17 00:00:00 2001 From: Luke Faraone Date: Sun, 8 May 2016 23:18:28 -0600 Subject: [PATCH] mk-sbuild: Add a --debootstrap-opts argument for arbitrary options. --- debian/changelog | 4 ++++ mk-sbuild | 12 +++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 7371ef5..c6d67b0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,12 @@ ubuntu-dev-tools (0.156) unstable; urgency=medium + [ Adam Conrad ] * mk-sbuild: Remove references to the obsolete arm architecture, and allow armhf and armel to be native on arm64 systems (LP: #1579619) + [ Luke Faraone ] + * mk-sbuild: Add a --debootstrap-opts argument for arbitrary options. + -- Adam Conrad Sun, 08 May 2016 23:06:34 -0600 ubuntu-dev-tools (0.155) unstable; urgency=medium diff --git a/mk-sbuild b/mk-sbuild index 3d4f607..b957862 100755 --- a/mk-sbuild +++ b/mk-sbuild @@ -56,6 +56,7 @@ function usage() echo " --debootstrap-mirror=URL Use URL as the debootstrap source" echo " --debootstrap-include=list Comma separated list of packages to include" echo " --debootstrap-exclude=list Comma separated list of packages to exclude" + echo " --debootstrap-opts=OPTS Extra options passed to debootstrap" echo " --debootstrap-proxy=URL Use PROXY as apt proxy" echo " --debootstrap-keyring=KEYRING" echo " Use KEYRING to check signatures of retrieved Release files" @@ -82,6 +83,7 @@ function usage() echo " DEBOOTSTRAP_MIRROR Mirror location (same as --debootstrap-mirror)" echo " DEBOOTSTRAP_INCLUDE Included packages (same as --debootstrap-include)" echo " DEBOOTSTRAP_EXCLUDE Excluded packages (same as --debootstrap-exclude)" + echo " DEBOOTSTRAP_OPTS Extra options passed to debootstrap (same as --debootstrap-opts)" echo " DEBOOTSTRAP_PROXY Apt proxy (same as --debootstrap-proxy)" echo " DEBOOTSTRAP_KEYRING GPG keyring (same as --debootstrap-keyring)" echo " DEBOOTSTRAP_NO_CHECK_GPG Disable GPG verification (same as --debootstrap-no-check-gpg)" @@ -98,7 +100,7 @@ function usage() if [ -z "$1" ]; then usage fi -OPTS=`getopt -o 'h' --long "help,debug,skip-updates,skip-proposed,eatmydata,arch:,name:,source-template:,debootstrap-mirror:,debootstrap-include:,debootstrap-exclude:,debootstrap-proxy:,debootstrap-no-check-gpg,debootstrap-keyring:,personality:,distro:,vg:,type:,target:" -- "$@"` +OPTS=`getopt -o 'h' --long "help,debug,skip-updates,skip-proposed,eatmydata,arch:,name:,source-template:,debootstrap-mirror:,debootstrap-include:,debootstrap-exclude:,debootstrap-opts:,debootstrap-proxy:,debootstrap-no-check-gpg,debootstrap-keyring:,personality:,distro:,vg:,type:,target:" -- "$@"` eval set -- "$OPTS" VG="" @@ -158,6 +160,10 @@ while :; do DEBOOTSTRAP_EXCLUDE="$2" shift 2 ;; + --debootstrap-opts) + DEBOOTSTRAP_OPTS="$2" + shift 2 + ;; --debootstrap-proxy) proxy="$2" shift 2 @@ -552,6 +558,10 @@ elif [ -n "$DEBOOTSTRAP_KEYRING" ]; then debootstrap_opts="$debootstrap_opts --keyring=$DEBOOTSTRAP_KEYRING" fi +if [ -n "$DEBOOTSTRAP_OPTS" ] ; then + debootstrap_opts="$debootstrap_opts $DEBOOTSTRAP_OPTS" +fi + # if http_proxy is set in the environment (even empty) set 'proxy' to it [ "$proxy" = "_unset_" -a "${DEBOOTSTRAP_PROXY-xx}" != "xx" ] && proxy=${DEBOOTSTRAP_PROXY}