From 8583d8bf15878165fea6ad0a4b24864485909615 Mon Sep 17 00:00:00 2001 From: Kees Cook Date: Sat, 3 Jan 2009 10:50:53 -0800 Subject: [PATCH] mk-sbuild-lv: add --skip-updates to allow building security-only chroots. --- debian/changelog | 5 ++++- doc/mk-sbuild-lv.1 | 23 ++++++++++++++++------- mk-sbuild-lv | 14 +++++++++++++- 3 files changed, 33 insertions(+), 9 deletions(-) diff --git a/debian/changelog b/debian/changelog index 01ef5dc..69cc96a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,7 +10,10 @@ ubuntu-dev-tools (0.52) UNRELEASED; urgency=low - Pass -xu arguments to dget to be consistant with pull-lp-source - Add support for packages with a name beginning with "lib" - -- Nathan Handler Fri, 02 Jan 2009 11:35:36 -0600 + [ Kees Cook ] + * mk-sbuild-lv: add --skip-updates to allow building security-only chroots. + + -- Kees Cook Sat, 03 Jan 2009 10:44:02 -0800 ubuntu-dev-tools (0.51) jaunty; urgency=low diff --git a/doc/mk-sbuild-lv.1 b/doc/mk-sbuild-lv.1 index 4eaf6e7..59ddddc 100644 --- a/doc/mk-sbuild-lv.1 +++ b/doc/mk-sbuild-lv.1 @@ -18,16 +18,19 @@ Listed below are the command line options for mk\-sbuild\-lv: What architecture to select (defaults to the native architecture). .TP .B \-\-name=NAME -Base name for the schroot (arch is appended) +Base name for the schroot (arch is appended). .TP .B \-\-personality=PERSONALITY -What personality to use (defaults to match \-\-arch) +What personality to use (defaults to match \-\-arch). .TP .B \-\-debug -Turn on script debugging +Turn on script debugging. +.TP +.B \-\-skip\-updates +Do not include the -updates pocket in the installed sources.list. .TP .B \-\-source\-template=FILE -Use FILE as the sources.list template (defaults to $HOME/.mk\-sbuild\-lv.sources) +Use FILE as the sources.list template (defaults to $HOME/.mk\-sbuild\-lv.sources). .TP .B \-\-debootstrap\-mirror=URL Use URL as the debootstrap source (defaults to http://ports.ubuntu.com for lpia, @@ -36,16 +39,22 @@ official Ubuntu repositories for the supported architectures). .SH ENVIRONMENT VARIABLES .TP .B LV_SIZE -Size of source LVs (defaults to 5G) +Size of source LVs (defaults to 5G). .TP .B SNAPSHOT_SIZE -Size of snapshot LVs (defaults to 4G) +Size of snapshot LVs (defaults to 4G). .TP .B SCHROOT_CONF_SUFFIX -Lines to append to schroot entries +Lines to append to schroot entries. +.TP +.B SKIP_UPDATES +Do not include the -updates pocket in the installed sources.list. .SH FILES .TP +.B $HOME/.mk\-sbuild\-lv.rc +Sourced for environment variables (defined above). +.TP .B $HOME/.mk\-sbuild\-lv.sources Can contain a customized sources.list. It will be read when creating the schroot. diff --git a/mk-sbuild-lv b/mk-sbuild-lv index ea771d9..501cd4c 100755 --- a/mk-sbuild-lv +++ b/mk-sbuild-lv @@ -107,6 +107,7 @@ function usage() echo " --name=NAME Base name for the schroot (arch is appended)" echo " --personality=PERSONALITY What personality to use (defaults to match --arch)" echo " --debug Turn on script debugging" + echo " --skip-updates Do not include -updates pocket in sources.list" echo " --source-template=FILE Use FILE as the sources.list template" echo " --debootstrap-mirror=URL Use URL as the debootstrap source" echo "" @@ -114,6 +115,7 @@ function usage() echo " LV_SIZE Size of source LVs (default ${LV_SIZE})" echo " SNAPSHOT_SIZE Size of snapshot LVs (default ${SNAPSHOT_SIZE})" echo " SCHROOT_CONF_SUFFIX Lines to append to schroot.conf entries" + echo " SKIP_UPDATES Enable --skip-updates" exit 1 } @@ -121,7 +123,7 @@ function usage() if [ -z "$1" ]; then usage fi -OPTS=`getopt -o '' --long "help,debug,arch:,name:,source-template:,debootstrap-mirror:,personality:" -- "$@"` +OPTS=`getopt -o '' --long "help,debug,skip-updates,arch:,name:,source-template:,debootstrap-mirror:,personality:" -- "$@"` eval set -- "$OPTS" name="" @@ -145,6 +147,10 @@ while :; do personality="$2" shift 2 ;; + --skip-updates) + SKIP_UPDATES="1" + shift + ;; --name) name="$2" shift 2 @@ -231,8 +237,14 @@ else cat > "$TEMP_SOURCES" <> "$TEMP_SOURCES" <> "$TEMP_SOURCES" <