diff options
author | Helmut Grohne <helmut@subdivi.de> | 2023-01-13 09:38:40 +0100 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2023-01-13 09:38:40 +0100 |
commit | 636fdb3b8fe582d2ba5da2d8b04276335e8451ab (patch) | |
tree | 5ec45c229e935a97f6ee7c341648ce68997ee222 /bin/debvm-create | |
parent | 51c511409116cea70d61db5c6baf1325b31329c7 (diff) | |
download | debvm-636fdb3b8fe582d2ba5da2d8b04276335e8451ab.tar.gz |
debvm-create: remove --package option
This option was meant to make it convenient to add packages, but
mmdebstrap's --include provides the same convenience at more
flexibility. You can provide apt patterns there provided that you use
multiple --include options. So rather than duplicate this functionality
under a different name, just refer to mmdebstrap thus reinforcing the
notion of being a thin wrapper.
This also removes the convenience of overriding the kernel image. You
need to use --skip=kernel when passing --include=linux-image-something
to mmdebstrap now. This implements "explicit is better than implicit".
Diffstat (limited to 'bin/debvm-create')
-rwxr-xr-x | bin/debvm-create | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/bin/debvm-create b/bin/debvm-create index 59811e8..b34399b 100755 --- a/bin/debvm-create +++ b/bin/debvm-create @@ -11,7 +11,7 @@ debvm-create - Create a VM image for various Debian releases and architectures =head1 SYNOPSIS -B<debvm-create> [B<-a> I<architecture>] [B<-h> I<hostname>] [B<-k> F<sshkey>] [B<-m> I<mirror>] [B<-o> F<output>] [B<-p> I<package>] [B<-r> I<release>] [B<-s> <task>] [B<-z> I<size_in_GB>] [B<--> I<mmdebstrap options>] +B<debvm-create> [B<-a> I<architecture>] [B<-h> I<hostname>] [B<-k> F<sshkey>] [B<-m> I<mirror>] [B<-o> F<output>] [B<-r> I<release>] [B<-s> <task>] [B<-z> I<size_in_GB>] [B<--> I<mmdebstrap options>] =head1 DESCRIPTION @@ -54,13 +54,6 @@ By default, L<http://deb.debian.org/debian> is being used. Specify the file name of the resulting virtual machine image. By default, it is written to F<rootfs.ext4>. -=item B<-p> I<package>, B<--package>=I<package> - -Request additional packages to be installed into the virtual machine image. -This option can be specified multiple times and packages can be separated by a comma. -Package recommendations are not honoured. -If a linux-image is passed here, it will also C<--skip=kernel>. - =item B<-r> I<release>, B<--release>=I<release> Use the given Debian release. @@ -108,6 +101,7 @@ The default is 1 GB. All options beyond a double dash are passed to B<mmdebstrap> before the suite, target and mirror specification. This can be used to provide additional hooks for image customization. +You can also request additional packages to be installed into the image using B<mmdebstrap>'s B<--include> option. =back @@ -142,7 +136,7 @@ die() { exit 1 } usage() { - die "usage: $0 [-a architecture] [-h hostname] [-k sshkey] [-m mirror] [-o output] [-p packages] [-r release] [-z size_in_GB] [-- mmdebstrap options]" + die "usage: $0 [-a architecture] [-h hostname] [-k sshkey] [-m mirror] [-o output] [-r release] [-s task] [-z size_in_GB] [-- mmdebstrap options]" } usage_error() { echo "error: $*" 1>&2 @@ -167,12 +161,6 @@ opt_sshkey() { opt_output() { IMAGE=$1 } -opt_package() { - INCLUDE_PACKAGES="$INCLUDE_PACKAGES,$1" - case "$1" in linux-image*) - opt_skip kernel - ;; esac -} opt_release() { SUITE=$1 } @@ -180,14 +168,13 @@ opt_size() { SIZE=$(($1*1024*1024*1024)) } -while getopts :a:h:k:m:o:p:r:s:z:-: OPTCHAR; do +while getopts :a:h:k:m:o:r:s:z:-: OPTCHAR; do case "$OPTCHAR" in a) opt_architecture "$OPTARG" ;; h) opt_hostname "$OPTARG" ;; k) opt_sshkey "$OPTARG" ;; m) opt_mirror "$OPTARG" ;; o) opt_output "$OPTARG" ;; - p) opt_package "$OPTARG" ;; r) opt_release "$OPTARG" ;; s) opt_skip "$OPTARG" ;; z) opt_size "$OPTARG" ;; @@ -196,12 +183,12 @@ while getopts :a:h:k:m:o:p:r:s:z:-: OPTCHAR; do help) usage ;; - architecture|hostname|mirror|output|package|release|size|skip|sshkey) + architecture|hostname|mirror|output|release|size|skip|sshkey) test "$OPTIND" -gt "$#" && usage_error "missing argument for --$OPTARG" "opt_$OPTARG" "$(nth_arg "$OPTIND" "$@")" OPTIND=$((OPTIND+1)) ;; - architecture=*|hostname=*|mirror=*|output=*|package=*|release=*|size=*|skip=*|sshkey=*) + architecture=*|hostname=*|mirror=*|output=*|release=*|size=*|skip=*|sshkey=*) "opt_${OPTARG%%=*}" "${OPTARG#*=}" ;; *) |