mk-sbuild-lv: add --skip-updates to allow building security-only chroots.

This commit is contained in:
Kees Cook 2009-01-03 10:50:53 -08:00
parent d91f26495b
commit 8583d8bf15
3 changed files with 33 additions and 9 deletions

5
debian/changelog vendored
View File

@ -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 <nhandler@ubuntu.com> Fri, 02 Jan 2009 11:35:36 -0600
[ Kees Cook ]
* mk-sbuild-lv: add --skip-updates to allow building security-only chroots.
-- Kees Cook <kees@ubuntu.com> Sat, 03 Jan 2009 10:44:02 -0800
ubuntu-dev-tools (0.51) jaunty; urgency=low

View File

@ -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.

View File

@ -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" <<EOM
deb ${DEBOOTSTRAP_MIRROR:-http://archive.ubuntu.com/ubuntu} RELEASE main restricted universe multiverse
deb-src ${DEBOOTSTRAP_MIRROR:-http://archive.ubuntu.com/ubuntu} RELEASE main restricted universe multiverse
EOM
if [ -z "$SKIP_UPDATES" ]; then
cat >> "$TEMP_SOURCES" <<EOM
deb ${DEBOOTSTRAP_MIRROR:-http://archive.ubuntu.com/ubuntu} RELEASE-updates main restricted universe multiverse
deb-src ${DEBOOTSTRAP_MIRROR:-http://archive.ubuntu.com/ubuntu} RELEASE-updates main restricted universe multiverse
EOM
fi
cat >> "$TEMP_SOURCES" <<EOM
deb http://security.ubuntu.com/ubuntu RELEASE-security main restricted universe multiverse
deb-src http://security.ubuntu.com/ubuntu RELEASE-security main restricted universe multiverse
EOM