diff options
-rwxr-xr-x | bin/debvm-create | 14 | ||||
-rwxr-xr-x | tests/create-and-run.sh | 4 |
2 files changed, 13 insertions, 5 deletions
diff --git a/bin/debvm-create b/bin/debvm-create index 1c59a83..526fc89 100755 --- a/bin/debvm-create +++ b/bin/debvm-create @@ -55,6 +55,7 @@ By default, it is written to F<rootfs.ext4>. Use the given Debian release. By default, B<unstable> is being used. +If you pass a complete F<sources.list> that includes release names to B<mmdebstrap>, you may pass an empty string here. =item B<-s> I<task>, B<--skip>=I<task> @@ -118,7 +119,7 @@ Without the hook, dependencies will pull the B<usrmerge> package as needed, whic Specify the minimum image size as an integer and optional unit (example: 10K is 10*1024). Units are K,M,G,T (powers of 1024). The resulting image will be grown as a sparse file to this size if necessary. -The default is 1 GB. +The default is 2 GB. =item B<--> I<mmdebstrap options> @@ -175,11 +176,12 @@ set -u ARCHITECTURE= IMAGE=rootfs.ext4 INITSYSTEM=systemd -SIZE=1G +SIZE=2G SKIP=, SSHKEY= SUITE=unstable VMNAME=testvm +EXT_FEATURES= SHARE_DIR="${0%/*}/../share" @@ -389,6 +391,7 @@ if test "$SUITE" = jessie; then set -- '--keyring=/usr/share/keyrings/debian-archive-removed-keys.gpg' "$@" set -- --aptopt='Apt::Key::gpgvcommand "/usr/libexec/mmdebstrap/gpgvnoexpkeysig"' "$@" set -- --hook-dir=/usr/share/mmdebstrap/hooks/jessie-or-older "$@" + EXT_FEATURES="${EXT_FEATURES:+$EXT_FEATURES,}^metadata_csum,^metadata_csum_seed,^orphan_file" fi if ! check_skip usrmerge; then @@ -437,4 +440,9 @@ set -ex mmdebstrap "$@" -run_inside_userns /sbin/mkfs.ext4 -L debvm -d "$TEMPROOT" "$IMAGE" "$SIZE" +set -- -L debvm -d "$TEMPROOT" "$IMAGE" "$SIZE" +if test -n "$EXT_FEATURES"; then + set -- -O "$EXT_FEATURES" "$@" +fi + +run_inside_userns /sbin/mkfs.ext4 "$@" diff --git a/tests/create-and-run.sh b/tests/create-and-run.sh index 1f164b9..228ca6c 100755 --- a/tests/create-and-run.sh +++ b/tests/create-and-run.sh @@ -52,9 +52,9 @@ fi debvm-create -k "$SSH_KEYPATH.pub" -o "$IMAGE" -r "$RELEASE" "$@" SSH_PORT=2222 -timeout 300s debvm-run -s "$SSH_PORT" -i "$IMAGE" & +timeout 600s debvm-run -s "$SSH_PORT" -i "$IMAGE" & set -- localhost test "$RELEASE" = jessie && set -- -o PubkeyAcceptedKeyTypes=+ssh-rsa "$@" -debvm-waitssh -t 240 "$SSH_PORT" +debvm-waitssh -t 540 "$SSH_PORT" run_ssh "$@" poweroff wait |