From: Peter Palfrader Date: Wed, 8 May 2013 08:57:32 +0000 (+0200) Subject: Support supplying an alternate keyring X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=c378dbc483758173dabb0cfedade6a654d8f10c1;p=mirror%2Fdsa-puppet.git Support supplying an alternate keyring --- diff --git a/modules/porterbox/files/setup-dchroot b/modules/porterbox/files/setup-dchroot index e741b2d84..db098d198 100755 --- a/modules/porterbox/files/setup-dchroot +++ b/modules/porterbox/files/setup-dchroot @@ -39,9 +39,10 @@ OPTIONS: -a ARCH debootstrap arch [$arch] -m MIRROR http mirror to use [$mirror] -b basedir place where to build the chroot/tarball [$basedir] - -f overwrite stuff. - -c write config only. - -h this help. + -c write config only + -f overwrite config and target tarball + -k KEYRING use an alternate keyring [$keyring] + -h this help EOF } @@ -121,10 +122,11 @@ mirror="${mirror:-http://cdn.debian.net/debian}" configonly="" force="" basedir="/srv/chroot" +keyring=/usr/share/keyrings/debian-archive-keyring.gpg declare -a cleanup trap do_cleanup EXIT -while getopts "a:b:cfhm:" OPTION +while getopts "a:b:cfhk:m:" OPTION do case $OPTION in a) @@ -143,6 +145,9 @@ do help exit 0 ;; + k) + keyring="$OPTARG" + ;; m) mirror="$OPTARG" ;; @@ -183,7 +188,7 @@ cleanup+=("umount $rootdir/sys") set -x debootstrap \ - --keyring /usr/share/keyrings/debian-archive-keyring.gpg \ + --keyring "$keyring" \ --include="apt" \ --variant=buildd \ --arch="$arch" \