From f0979fae03bcc4767ac4df1cb8fad9277e952637 Mon Sep 17 00:00:00 2001 From: Helmut Grohne 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. --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to '.gitlab-ci.yml') diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 188d919..24cbab1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -28,14 +28,14 @@ release_test: script: - apt-get update - apt-get dist-upgrade --yes - - apt-get --no-install-recommends --yes install curl e2fsprogs genext2fs mmdebstrap openssh-client qemu-kvm dpkg-dev + - apt-get --no-install-recommends --yes install curl e2fsprogs mmdebstrap openssh-client qemu-kvm dpkg-dev - PATH=$(pwd)/bin:$PATH ./tests/create-and-run.sh $(dpkg --print-architecture) "$RELEASE" debci_test: script: - apt-get update - apt-get dist-upgrade --yes - - apt-get --no-install-recommends --yes install e2fsprogs genext2fs mmdebstrap openssh-client qemu-kvm dpkg-dev + - apt-get --no-install-recommends --yes install e2fsprogs mmdebstrap openssh-client qemu-kvm dpkg-dev - PATH=$(pwd)/bin:$PATH ./tests/create-and-run.sh $(dpkg --print-architecture) "" arch_test: @@ -54,6 +54,6 @@ arch_test: - test -e /proc/sys/fs/binfmt_misc/status || mount -t binfmt_misc binfmt_misc /proc/sys/fs/binfmt_misc - apt-get update - apt-get dist-upgrade --yes - - apt-get --no-install-recommends --yes install curl e2fsprogs genext2fs mmdebstrap openssh-client qemu-system arch-test qemu-user-static file systemd dpkg-dev debian-ports-archive-keyring + - apt-get --no-install-recommends --yes install curl e2fsprogs mmdebstrap openssh-client qemu-system arch-test qemu-user-static file systemd dpkg-dev debian-ports-archive-keyring - /lib/systemd/systemd-binfmt - PATH=$(pwd)/bin:$PATH ./tests/create-and-run.sh "$ARCHITECTURE" sid -- cgit v1.2.3