From f0979fae03bcc4767ac4df1cb8fad9277e952637 Mon Sep 17 00:00:00 2001
From: Helmut Grohne <helmut@subdivi.de>
Date: Mon, 26 Feb 2024 14:39:12 +0100
Subject: debvm-create: switch from genext2fs to mkfs.ext4

Why?

genext2fs is slow. It has O(n^2) behaviour, which becomes annoying with
larger filesystems. It also creates an ext2 image and we have to upgrade
it to ext4 in multiple steps. Even then, the image has an inode size of
128, which is incompatible with 2038 and does not allow storing
sub-second precision time stamps.

How?

We use mkfs.ext4 from e2fsprogs (which is required anyway) instead.
Running this from within a --customize-hook does not work, because the
user namespace used for the hook often has no privileges to write to the
output image. Instead, we now ask mmdebstrap to output to a directory
and create the filesystem separately. We construct a special namespace
that has both access to the tree and to the output image and perform the
mkfs.ext4 there. As a consequence, we no longer support any mode but
unshare and since mkfs.ext4 consumes the size parameter, the size syntax
is reduced a bit.
---
 tests/dist-upgrades.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'tests')

diff --git a/tests/dist-upgrades.sh b/tests/dist-upgrades.sh
index 121f87e..171500a 100755
--- a/tests/dist-upgrades.sh
+++ b/tests/dist-upgrades.sh
@@ -2,7 +2,7 @@
 # Copyright 2022 Jochen Sprickerhof <debvm@jochen.sprickerhof.de>
 # SPDX-License-Identifier: MIT
 #
-# apt install e2fsprogs genext2fs mmdebstrap openssh-client qemu-kvm
+# apt install e2fsprogs mmdebstrap openssh-client qemu-kvm
 
 set -x
 
-- 
cgit v1.2.3