Fixed missing selinux context setup for live ISOs

When building live ISO images the selinux context was not created
for eventually new created files during the live ISO creation
process. This Fixes OSInside/kiwi-boxed-plugin#99
This commit is contained in:
Marcus Schäfer 2026-03-06 16:21:06 +01:00 committed by Andrew Lukoshko
parent 28d9f45ca6
commit 0b1e806cf2
2 changed files with 9 additions and 0 deletions

View File

@ -189,6 +189,8 @@ class LiveImageBuilder:
working_directory=self.root_dir
)
self.system_setup.setup_selinux_file_contexts()
# prepare dracut initrd call
self.boot_image.prepare()
@ -251,6 +253,9 @@ class LiveImageBuilder:
'mount_options': self.xml_state.get_fs_mount_option_list(),
'create_options': self.xml_state.get_fs_create_option_list()
}
self.system_setup.setup_selinux_file_contexts()
filesystem_setup = FileSystemSetup(
self.xml_state, self.root_dir
)

View File

@ -227,6 +227,10 @@ class TestLiveImageBuilder:
self.setup.import_cdroot_files.assert_called_once_with('temp_media_dir')
assert self.setup.setup_selinux_file_contexts.call_args_list == [
call(), call()
]
assert kiwi.builder.live.FileSystem.new.call_args_list == [
call(
device_provider=self.loop, name='ext4',