debian-forge/stages/test
Tomáš Hozza e1df8cea8f Stages/dracut: prepare environment for running dracut in chroot
dracut expects the environment, in which it is run, to have properly
mounted /proc, /dev and /sys. Otherwise, some of its modules don't work
properly. E.g. dracut fails to embed the CA cert bundle into the initram
disk, which means that HTTPS won't work in it. dracut also prints a lot
of errors and warnings about this, but we used to ignore them until now.

The buildroot environment in which the stage runs is OK, but we actually
run dracut using 'chroot', which is the core of the problem. The runtime
environment in such case lacks the necessary mounts.

Add a context manager for setting up and cleaning up all the necessary
mounts in the image FS tree when running dracut.

This change is related to:
https://bugzilla.redhat.com/show_bug.cgi?id=1962975

And the implementation has been inspired by the fix in lorax:
https://github.com/weldr/lorax/pull/1151

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2024-08-15 19:56:20 +02:00
..
conftest.py stages: remove test_schema_supports_bootc_style_mounts tests 2024-05-03 11:26:22 +02:00
test_autotailor.py stages/autotailor: fix stage schema 2024-07-25 11:56:07 +02:00
test_bootc_install_config.py stages: add unit test for bootc.install.config stage 2024-05-06 14:09:47 +02:00
test_bootc_install_to_fs.py stages: fix test values for "images" inputs 2024-04-29 14:11:44 +02:00
test_bootupd.py ostree: add convenience function for using default OSTree deployment 2024-02-07 18:50:38 -05:00
test_cloud-init.py stages/test: introduce 'stage_module' fixture 2024-01-31 17:18:52 +01:00
test_container_deploy.py stages: fix test values for "images" inputs 2024-04-29 14:11:44 +02:00
test_containers_storage_conf.py stages/test: introduce 'stage_schema' fixture 2024-01-31 17:18:52 +01:00
test_coreos_platform.py stages: add test for coreos.platform generate_console_settings_file 2024-02-28 10:37:01 +01:00
test_dmverity.py stages: add stage for creating dm-verity partitions 2024-07-03 16:54:32 +02:00
test_dracut.py Stages/dracut: prepare environment for running dracut in chroot 2024-08-15 19:56:20 +02:00
test_erofs.py stages/test: introduce 'stage_schema' fixture 2024-01-31 17:18:52 +01:00
test_groups.py stages: remove test_schema_supports_bootc_style_mounts tests 2024-05-03 11:26:22 +02:00
test_grub2.py Stages/grub2: extend default config options 2024-02-20 19:28:43 +01:00
test_grub2_legacy.py Stages/grub2.legacy: make config options a subset of grub2 stage 2024-02-21 17:51:28 +01:00
test_gunzip.py Tests: Add unit tests for org.osbuild.gunzip stage 2024-08-02 08:48:06 +02:00
test_gzip.py stages: add small unit test for the gzip stage 2024-03-04 11:18:13 +01:00
test_kickstart.py stages/kickstart: add support for the dir transport 2024-05-03 11:13:44 +02:00
test_machine-id.py stages/test: introduce 'stage_schema' fixture 2024-01-31 17:18:52 +01:00
test_mkfs_btrfs.py Tests: Add unit tests for org.osbuild.mkfs.btrfs stage 2024-04-09 00:39:11 -07:00
test_mkfs_ext4.py stages/test: introduce 'stage_schema' fixture 2024-01-31 17:18:52 +01:00
test_mkfs_fat.py Tests: Add unit tests for org.osbuild.mkfs.fat stage 2024-05-14 09:34:40 +02:00
test_mkfs_xfs.py Tests: Add unit tests for org.osbuild.mkfs.xfs stage 2024-04-09 23:56:06 +02:00
test_ostree_post_copy.py stages/test: introduce 'stage_schema' fixture 2024-01-31 17:18:52 +01:00
test_selinux.py stages: remove test_schema_supports_bootc_style_mounts tests 2024-05-03 11:26:22 +02:00
test_skopeo.py stages/test: Check that remove_signatures is passed to skopeo-copy 2024-05-01 00:23:02 +02:00
test_systemd.py stages/test: introduce 'stage_module' fixture 2024-01-31 17:18:52 +01:00
test_systemd_unit_create.py test/systemd_unit_create: mount unit type creation 2024-05-17 14:26:14 +02:00
test_tar.py stages/org.osbuild.tar: add sparse option 2024-02-27 16:46:19 -05:00
test_users.py stages(users): add additional tests for force_password_reset 2024-05-20 14:13:56 -07:00
test_xz.py stages/test: introduce 'stage_schema' fixture 2024-01-31 17:18:52 +01:00
test_zip.py stages(zip): add test for zip stage 2024-04-04 13:54:34 +02:00
test_zipl_inst.py test: add simple zipl_inst tests 2024-02-07 18:08:44 -05:00
test_zstd.py stages/test: introduce 'stage_schema' fixture 2024-01-31 17:18:52 +01:00