Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0b1e806cf2 | ||
|
|
28d9f45ca6 |
@ -281,12 +281,15 @@ class BootLoaderConfigGrub2(BootLoaderConfigBase):
|
||||
self.boot_directory_name, 'grub.cfg'
|
||||
]
|
||||
)
|
||||
# Disable os-prober, it takes information from the host it
|
||||
# runs on which is not necessarily matching with the image
|
||||
os.environ.update({'GRUB_DISABLE_OS_PROBER': 'true'})
|
||||
Command.run(
|
||||
[
|
||||
'chroot', self.root_mount.mountpoint,
|
||||
os.path.basename(self._get_grub2_mkconfig_tool()), '-o',
|
||||
config_file.replace(self.root_mount.mountpoint, '')
|
||||
]
|
||||
], os.environ
|
||||
)
|
||||
if boot_options.get('root_device') != boot_options.get('boot_device'):
|
||||
# Create a boot -> . link on the boot partition.
|
||||
|
||||
@ -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
|
||||
)
|
||||
|
||||
@ -981,12 +981,13 @@ class TestBootLoaderConfigGrub2:
|
||||
mock_mount_system.assert_called_once_with(
|
||||
'rootdev', 'bootdev', None, None, None
|
||||
)
|
||||
os.environ.update({'GRUB_DISABLE_OS_PROBER': 'true'})
|
||||
assert mock_Command_run.call_args_list == [
|
||||
call(
|
||||
[
|
||||
'chroot', self.bootloader.root_mount.mountpoint,
|
||||
'grub2-mkconfig', '-o', '/boot/grub2/grub.cfg'
|
||||
]
|
||||
], os.environ
|
||||
),
|
||||
call(
|
||||
[
|
||||
|
||||
@ -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',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user