From 5bf8c3fcf9fcda16a05915b613703e1a60503392 Mon Sep 17 00:00:00 2001 From: Johannes 'josch' Schauer Date: Thu, 6 Feb 2020 08:14:19 +0100 Subject: [PATCH] add sync, umount and shutdown to guestfish calls --- make_mirror.sh | 5 ++++- mmdebstrap | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/make_mirror.sh b/make_mirror.sh index d7fc31a..9d1e777 100755 --- a/make_mirror.sh +++ b/make_mirror.sh @@ -539,7 +539,10 @@ END copy-in "$tmpdir/worker.sh" / : \ copy-in "$tmpdir/mini-httpd" /etc/default : \ copy-in "$tmpdir/hosts" /etc/ : \ - touch /mmdebstrap-testenv : + touch /mmdebstrap-testenv : \ + sync : \ + umount / : \ + shutdown qemu-img convert -O qcow2 "$tmpdir/debian-$DEFAULT_DIST.img" "$newcachedir/debian-$DEFAULT_DIST.qcow" cleanuptmpdir trap "cleanup_newcachedir" EXIT INT TERM diff --git a/mmdebstrap b/mmdebstrap index 696a21d..f1a0f68 100755 --- a/mmdebstrap +++ b/mmdebstrap @@ -5079,8 +5079,8 @@ Use as replacement for autopkgtest-build-qemu and vmdb2: part-set-bootable /dev/sda 1 true : \ mkfs ext2 /dev/sda1 : mount /dev/sda1 / : \ tar-in debian-unstable.tar / xattrs:true : \ - extlinux / : \ - copy-in extlinux.conf / + extlinux / : copy-in extlinux.conf / : \ + sync : umount / : shutdown $ qemu-img convert -O qcow2 debian-unstable.img debian-unstable.qcow2 =end comment