mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-05-24 07:11:29 +00:00
mk-sbuild: support debootstrap keyring and no-check-gpg
options. (Closes: 754327)
This commit is contained in:
parent
427ac0d620
commit
24d9ce3e7c
4
debian/changelog
vendored
4
debian/changelog
vendored
@ -7,6 +7,10 @@ ubuntu-dev-tools (0.154) UNRELEASED; urgency=medium
|
|||||||
* mk-sbuild: better message for cross build so that new start have
|
* mk-sbuild: better message for cross build so that new start have
|
||||||
correct sbuild command from the last message of mk-sbuild.
|
correct sbuild command from the last message of mk-sbuild.
|
||||||
|
|
||||||
|
[ Niklas Fiekas ]
|
||||||
|
* mk-sbuild: support debootstrap keyring and no-check-gpg
|
||||||
|
options. (Closes: 754327)
|
||||||
|
|
||||||
[ Dimitri John Ledkov ]
|
[ Dimitri John Ledkov ]
|
||||||
* Port ubuntutools module to python3.
|
* Port ubuntutools module to python3.
|
||||||
|
|
||||||
|
@ -55,6 +55,15 @@ Pass along a comma separated list of packages to debootstrap's
|
|||||||
\fBWARNING:\fR be careful using this option as you can end up
|
\fBWARNING:\fR be careful using this option as you can end up
|
||||||
excluding essential package. See \fBdebootstrap \fR(8) for more details.
|
excluding essential package. See \fBdebootstrap \fR(8) for more details.
|
||||||
.TP
|
.TP
|
||||||
|
.B \-\-debootstrap\-keyring\fR=\fIkeyring
|
||||||
|
Pass along the path to a gpg keyring file to debootsrap's
|
||||||
|
\fB\-\-keyring\fR argument. See \fBdebootstrap\fR (8) for more details.
|
||||||
|
.TP
|
||||||
|
.B \-\-debootstrap\-no\-check\-gpg
|
||||||
|
Disable checking gpg signatures of downloaded Release files by using
|
||||||
|
debootstrap's \fB\-\-no\-check\-gpg\fR option. See \fBdebootstrap\fR (8)
|
||||||
|
for more details.
|
||||||
|
.TP
|
||||||
.B \-\-distro\fR=\fIDISTRO
|
.B \-\-distro\fR=\fIDISTRO
|
||||||
Enable distro-specific logic.
|
Enable distro-specific logic.
|
||||||
When not provided, the distribution is determined from \fIrelease\fR.
|
When not provided, the distribution is determined from \fIrelease\fR.
|
||||||
@ -103,6 +112,14 @@ Comma separated list of packages to include when bootstrapping (same as
|
|||||||
Comma separated list of packages to exclude when bootstrapping (same as
|
Comma separated list of packages to exclude when bootstrapping (same as
|
||||||
\fB\-\-debootstrap-exclude\fR; see warning above)
|
\fB\-\-debootstrap-exclude\fR; see warning above)
|
||||||
.TP
|
.TP
|
||||||
|
.B DEBOOTSTRAP_KEYRING
|
||||||
|
Keyring file to use for checking gpg signatures of retrieved release files
|
||||||
|
(same as \fB\-\-debootstrap\-keyring\fR)
|
||||||
|
.TP
|
||||||
|
.B DEBOOTSTRAP_NO_CHECK_GPG
|
||||||
|
Disable gpg verification of retrieved release files (same as
|
||||||
|
\fB\-\-debootstrap\-no\-check\-gpg\fR)
|
||||||
|
.TP
|
||||||
.B SOURCE_CHROOTS_DIR
|
.B SOURCE_CHROOTS_DIR
|
||||||
Use \fBSOURCE_CHROOTS_DIR\fR as home of schroot source directories.
|
Use \fBSOURCE_CHROOTS_DIR\fR as home of schroot source directories.
|
||||||
(default \fB/var/lib/schroot/chroots\fR)
|
(default \fB/var/lib/schroot/chroots\fR)
|
||||||
|
23
mk-sbuild
23
mk-sbuild
@ -57,6 +57,9 @@ function usage()
|
|||||||
echo " --debootstrap-include=list Comma separated list of packages to include"
|
echo " --debootstrap-include=list Comma separated list of packages to include"
|
||||||
echo " --debootstrap-exclude=list Comma separated list of packages to exclude"
|
echo " --debootstrap-exclude=list Comma separated list of packages to exclude"
|
||||||
echo " --debootstrap-proxy=URL Use PROXY as apt proxy"
|
echo " --debootstrap-proxy=URL Use PROXY as apt proxy"
|
||||||
|
echo " --debootstrap-keyring=KEYRING"
|
||||||
|
echo " Use KEYRING to check signatures of retrieved Release files"
|
||||||
|
echo " --debootstrap-no-check-gpg Disables checking gpg signatures of retrieved Release files"
|
||||||
echo " --eatmydata Install and use eatmydata"
|
echo " --eatmydata Install and use eatmydata"
|
||||||
echo " --distro=DISTRO Install specific distro:"
|
echo " --distro=DISTRO Install specific distro:"
|
||||||
echo " 'ubuntu' or 'debian' "
|
echo " 'ubuntu' or 'debian' "
|
||||||
@ -80,6 +83,8 @@ function usage()
|
|||||||
echo " DEBOOTSTRAP_INCLUDE Included packages (same as --debootstrap-include)"
|
echo " DEBOOTSTRAP_INCLUDE Included packages (same as --debootstrap-include)"
|
||||||
echo " DEBOOTSTRAP_EXCLUDE Excluded packages (same as --debootstrap-exclude)"
|
echo " DEBOOTSTRAP_EXCLUDE Excluded packages (same as --debootstrap-exclude)"
|
||||||
echo " DEBOOTSTRAP_PROXY Apt proxy (same as --debootstrap-proxy)"
|
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)"
|
||||||
echo " EATMYDATA Enable --eatmydata"
|
echo " EATMYDATA Enable --eatmydata"
|
||||||
echo " TEMPLATE_SOURCES A template for sources.list"
|
echo " TEMPLATE_SOURCES A template for sources.list"
|
||||||
echo " TEMPLATE_SCHROOTCONF A template for schroot.conf stanza"
|
echo " TEMPLATE_SCHROOTCONF A template for schroot.conf stanza"
|
||||||
@ -93,13 +98,14 @@ function usage()
|
|||||||
if [ -z "$1" ]; then
|
if [ -z "$1" ]; then
|
||||||
usage
|
usage
|
||||||
fi
|
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:,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-proxy:,debootstrap-no-check-gpg,debootstrap-keyring:,personality:,distro:,vg:,type:,target:" -- "$@"`
|
||||||
eval set -- "$OPTS"
|
eval set -- "$OPTS"
|
||||||
|
|
||||||
VG=""
|
VG=""
|
||||||
DISTRO=""
|
DISTRO=""
|
||||||
name=""
|
name=""
|
||||||
proxy="_unset_"
|
proxy="_unset_"
|
||||||
|
DEBOOTSTRAP_NO_CHECK_GPG=0
|
||||||
EATMYDATA=0
|
EATMYDATA=0
|
||||||
|
|
||||||
while :; do
|
while :; do
|
||||||
@ -156,6 +162,15 @@ while :; do
|
|||||||
proxy="$2"
|
proxy="$2"
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
|
--debootstrap-keyring)
|
||||||
|
# Store the absolute path because we cd to the root directory later.
|
||||||
|
DEBOOTSTRAP_KEYRING=$(readlink -f "$2")
|
||||||
|
shift 2
|
||||||
|
;;
|
||||||
|
--debootstrap-no-check-gpg)
|
||||||
|
DEBOOTSTRAP_NO_CHECK_GPG=1
|
||||||
|
shift
|
||||||
|
;;
|
||||||
--eatmydata)
|
--eatmydata)
|
||||||
EATMYDATA=1
|
EATMYDATA=1
|
||||||
shift
|
shift
|
||||||
@ -531,6 +546,12 @@ if [ -n "$DEBOOTSTRAP_EXCLUDE" ] ; then
|
|||||||
debootstrap_opts="$debootstrap_opts --exclude=$DEBOOTSTRAP_EXCLUDE"
|
debootstrap_opts="$debootstrap_opts --exclude=$DEBOOTSTRAP_EXCLUDE"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ $DEBOOTSTRAP_NO_CHECK_GPG -eq 1 ]; then
|
||||||
|
debootstrap_opts="$debootstrap_opts --no-check-gpg"
|
||||||
|
elif [ -n "$DEBOOTSTRAP_KEYRING" ]; then
|
||||||
|
debootstrap_opts="$debootstrap_opts --keyring=$DEBOOTSTRAP_KEYRING"
|
||||||
|
fi
|
||||||
|
|
||||||
# if http_proxy is set in the environment (even empty) set 'proxy' to it
|
# if http_proxy is set in the environment (even empty) set 'proxy' to it
|
||||||
[ "$proxy" = "_unset_" -a "${DEBOOTSTRAP_PROXY-xx}" != "xx" ] &&
|
[ "$proxy" = "_unset_" -a "${DEBOOTSTRAP_PROXY-xx}" != "xx" ] &&
|
||||||
proxy=${DEBOOTSTRAP_PROXY}
|
proxy=${DEBOOTSTRAP_PROXY}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user