mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-05-08 15:31:29 +00:00
* Merge Christopher James Halse Rogers's branch.
This commit is contained in:
commit
2fa699e44b
25
mk-sbuild-lv
25
mk-sbuild-lv
@ -52,11 +52,6 @@ if [ ! -w /var/lib/sbuild ]; then
|
|||||||
# (mandatory, no default!).
|
# (mandatory, no default!).
|
||||||
\$maintainer_name='$USER <$USER@localhost>';
|
\$maintainer_name='$USER <$USER@localhost>';
|
||||||
|
|
||||||
# Chroot behaviour; possible values are "split" (apt and dpkg are run
|
|
||||||
# from the host system) and "schroot" (all package operations are done in
|
|
||||||
# the chroot with schroot, but the chroot must allow networking)
|
|
||||||
\$chroot_mode = "schroot";
|
|
||||||
|
|
||||||
# Directory for chroot symlinks and sbuild logs. Defaults to the
|
# Directory for chroot symlinks and sbuild logs. Defaults to the
|
||||||
# current directory if unspecified.
|
# current directory if unspecified.
|
||||||
#\$build_dir='$HOME/ubuntu/build';
|
#\$build_dir='$HOME/ubuntu/build';
|
||||||
@ -91,6 +86,8 @@ function usage()
|
|||||||
echo " --arch=ARCH What architecture to select"
|
echo " --arch=ARCH What architecture to select"
|
||||||
echo " --name=NAME Base name for the schroot (arch is appended)"
|
echo " --name=NAME Base name for the schroot (arch is appended)"
|
||||||
echo " --debug Turn on script debugging"
|
echo " --debug Turn on script debugging"
|
||||||
|
echo " --source-template=FILE Use FILE as the sources.list template"
|
||||||
|
echo " --debootstrap-mirror=URL Use URL as the debootstrap source"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -98,7 +95,7 @@ function usage()
|
|||||||
if [ -z "$1" ]; then
|
if [ -z "$1" ]; then
|
||||||
usage
|
usage
|
||||||
fi
|
fi
|
||||||
OPTS=`getopt -o '' --long "help,debug,arch:,name::" -- "$@"`
|
OPTS=`getopt -o '' --long "help,debug,arch:,name:,source-template:,debootstrap-mirror:" -- "$@"`
|
||||||
eval set -- "$OPTS"
|
eval set -- "$OPTS"
|
||||||
|
|
||||||
name=""
|
name=""
|
||||||
@ -118,6 +115,18 @@ while :; do
|
|||||||
name="$2"
|
name="$2"
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
|
--source-template)
|
||||||
|
TEMPLATE_SOURCES="$2"
|
||||||
|
shift 2
|
||||||
|
if [ ! -r $TEMPLATE_SOURCES ]; then
|
||||||
|
echo "W: Template file $TEMPLATE_SOURCES is not readable"
|
||||||
|
echo "W: Continuing with default sources!"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
--debootstrap-mirror)
|
||||||
|
DEBOOTSTRAP_MIRROR="$2"
|
||||||
|
shift 2
|
||||||
|
;;
|
||||||
--)
|
--)
|
||||||
shift
|
shift
|
||||||
break
|
break
|
||||||
@ -169,7 +178,9 @@ sudo mount "$CHROOT_PATH" "$MNT"
|
|||||||
sudo debootstrap $arch_opt $variant_opt "$RELEASE" "$MNT" "${DEBOOTSTRAP_MIRROR:-http://archive.ubuntu.com/ubuntu}"
|
sudo debootstrap $arch_opt $variant_opt "$RELEASE" "$MNT" "${DEBOOTSTRAP_MIRROR:-http://archive.ubuntu.com/ubuntu}"
|
||||||
# Update the package sources
|
# Update the package sources
|
||||||
TEMP_SOURCES=`mktemp -t sources-XXXXXX`
|
TEMP_SOURCES=`mktemp -t sources-XXXXXX`
|
||||||
|
if [ -z "$TEMPLATE_SOURCES" ]; then
|
||||||
TEMPLATE_SOURCES=~/.mk-sbuild-lv.sources
|
TEMPLATE_SOURCES=~/.mk-sbuild-lv.sources
|
||||||
|
fi
|
||||||
if [ -r "$TEMPLATE_SOURCES" ]; then
|
if [ -r "$TEMPLATE_SOURCES" ]; then
|
||||||
cat "$TEMPLATE_SOURCES" > "$TEMP_SOURCES"
|
cat "$TEMPLATE_SOURCES" > "$TEMP_SOURCES"
|
||||||
else
|
else
|
||||||
@ -229,7 +240,7 @@ set -e
|
|||||||
# Reload package lists
|
# Reload package lists
|
||||||
apt-get update || true
|
apt-get update || true
|
||||||
# Pull down signature requirements
|
# Pull down signature requirements
|
||||||
apt-get -y --force-yes install gnupg ubuntu-keyring
|
#apt-get -y --force-yes install gnupg ubuntu-keyring
|
||||||
# Reload package lists
|
# Reload package lists
|
||||||
apt-get update || true
|
apt-get update || true
|
||||||
# Disable debconf questions so that automated builds won't prompt
|
# Disable debconf questions so that automated builds won't prompt
|
||||||
|
Loading…
x
Reference in New Issue
Block a user