From e32a8a1faa150b6d495205c638adca4a653344c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20Sch=C3=A4fer?= Date: Mon, 22 Jan 2024 17:15:18 +0100 Subject: [PATCH 1/3] Update build tests Delete use of syslinux/isolinux --- .../archlinux/test-image-live-disk-kis/appliance.kiwi | 2 -- .../x86/centos/test-image-live-disk-v8/appliance.kiwi | 1 - .../x86/centos/test-image-live-disk-v9/appliance.kiwi | 1 - .../x86/debian/test-image-live-disk/appliance.kiwi | 3 --- .../x86/fedora/test-image-live-disk/appliance.kiwi | 3 --- .../x86/leap/test-image-custom-partitions/appliance.kiwi | 1 - .../x86/leap/test-image-disk-ramdisk/appliance.kiwi | 1 - .../x86/leap/test-image-disk-selinux/appliance.kiwi | 1 - .../x86/leap/test-image-disk-simple/appliance.kiwi | 1 - build-tests/x86/leap/test-image-disk/appliance.kiwi | 1 - build-tests/x86/leap/test-image-docker/appliance.kiwi | 1 - build-tests/x86/leap/test-image-live/appliance.kiwi | 1 - build-tests/x86/leap/test-image-luks/appliance.kiwi | 1 - build-tests/x86/leap/test-image-lvm/appliance.kiwi | 1 - .../x86/leap/test-image-overlayroot/appliance.kiwi | 1 - .../x86/rawhide/test-image-live-disk/appliance.kiwi | 3 --- .../x86/tumbleweed/test-image-azure/appliance.kiwi | 1 - .../tumbleweed/test-image-bundle-format/appliance.kiwi | 1 - .../test-image-custom-partitions/appliance.kiwi | 1 - .../x86/tumbleweed/test-image-disk-legacy/appliance.kiwi | 1 - .../tumbleweed/test-image-disk-ramdisk/appliance.kiwi | 1 - .../x86/tumbleweed/test-image-disk-simple/appliance.kiwi | 1 - .../x86/tumbleweed/test-image-disk/appliance.kiwi | 1 - .../x86/tumbleweed/test-image-docker/appliance.kiwi | 1 - build-tests/x86/tumbleweed/test-image-ec2/appliance.kiwi | 1 - build-tests/x86/tumbleweed/test-image-gce/appliance.kiwi | 1 - .../x86/tumbleweed/test-image-live/appliance.kiwi | 9 --------- .../x86/tumbleweed/test-image-luks/appliance.kiwi | 1 - build-tests/x86/tumbleweed/test-image-lvm/appliance.kiwi | 1 - .../x86/tumbleweed/test-image-orthos/appliance.kiwi | 1 - .../x86/tumbleweed/test-image-overlayroot/appliance.kiwi | 1 - .../test-image-partitions-and-volumes/appliance.kiwi | 1 - build-tests/x86/tumbleweed/test-image-pxe/appliance.kiwi | 1 - .../tumbleweed/test-image-qcow-openstack/appliance.kiwi | 1 - .../x86/tumbleweed/test-image-raid/appliance.kiwi | 1 - .../x86/tumbleweed/test-image-suse-on-dnf/appliance.kiwi | 1 - build-tests/x86/tumbleweed/test-image-wsl/appliance.kiwi | 1 - .../x86/ubuntu/test-image-live-disk/appliance.kiwi | 3 --- 38 files changed, 55 deletions(-) diff --git a/build-tests/x86/archlinux/test-image-live-disk-kis/appliance.kiwi b/build-tests/x86/archlinux/test-image-live-disk-kis/appliance.kiwi index bd424388368..0a6c4dbadf2 100644 --- a/build-tests/x86/archlinux/test-image-live-disk-kis/appliance.kiwi +++ b/build-tests/x86/archlinux/test-image-live-disk-kis/appliance.kiwi @@ -105,11 +105,9 @@ - - diff --git a/build-tests/x86/centos/test-image-live-disk-v8/appliance.kiwi b/build-tests/x86/centos/test-image-live-disk-v8/appliance.kiwi index 90f5697e73b..4ddb3ddb124 100644 --- a/build-tests/x86/centos/test-image-live-disk-v8/appliance.kiwi +++ b/build-tests/x86/centos/test-image-live-disk-v8/appliance.kiwi @@ -100,7 +100,6 @@ - diff --git a/build-tests/x86/centos/test-image-live-disk-v9/appliance.kiwi b/build-tests/x86/centos/test-image-live-disk-v9/appliance.kiwi index 3a712d590aa..1f8a2e0fc4a 100644 --- a/build-tests/x86/centos/test-image-live-disk-v9/appliance.kiwi +++ b/build-tests/x86/centos/test-image-live-disk-v9/appliance.kiwi @@ -55,7 +55,6 @@ - diff --git a/build-tests/x86/debian/test-image-live-disk/appliance.kiwi b/build-tests/x86/debian/test-image-live-disk/appliance.kiwi index e00da1f1a5c..81733786f23 100644 --- a/build-tests/x86/debian/test-image-live-disk/appliance.kiwi +++ b/build-tests/x86/debian/test-image-live-disk/appliance.kiwi @@ -72,9 +72,6 @@ - - - diff --git a/build-tests/x86/fedora/test-image-live-disk/appliance.kiwi b/build-tests/x86/fedora/test-image-live-disk/appliance.kiwi index 1ed4b3495e1..635b38f78dc 100644 --- a/build-tests/x86/fedora/test-image-live-disk/appliance.kiwi +++ b/build-tests/x86/fedora/test-image-live-disk/appliance.kiwi @@ -74,9 +74,6 @@ - - - diff --git a/build-tests/x86/leap/test-image-custom-partitions/appliance.kiwi b/build-tests/x86/leap/test-image-custom-partitions/appliance.kiwi index 8dd7cc88b33..ad9fbeb4336 100644 --- a/build-tests/x86/leap/test-image-custom-partitions/appliance.kiwi +++ b/build-tests/x86/leap/test-image-custom-partitions/appliance.kiwi @@ -45,7 +45,6 @@ - diff --git a/build-tests/x86/leap/test-image-disk-ramdisk/appliance.kiwi b/build-tests/x86/leap/test-image-disk-ramdisk/appliance.kiwi index 2243b6ceea5..db58a65410e 100644 --- a/build-tests/x86/leap/test-image-disk-ramdisk/appliance.kiwi +++ b/build-tests/x86/leap/test-image-disk-ramdisk/appliance.kiwi @@ -45,7 +45,6 @@ - diff --git a/build-tests/x86/leap/test-image-disk-selinux/appliance.kiwi b/build-tests/x86/leap/test-image-disk-selinux/appliance.kiwi index 974e9f5bb37..6edfd6d8f22 100644 --- a/build-tests/x86/leap/test-image-disk-selinux/appliance.kiwi +++ b/build-tests/x86/leap/test-image-disk-selinux/appliance.kiwi @@ -46,7 +46,6 @@ - diff --git a/build-tests/x86/leap/test-image-disk-simple/appliance.kiwi b/build-tests/x86/leap/test-image-disk-simple/appliance.kiwi index a814e61aa41..871ee9214a5 100644 --- a/build-tests/x86/leap/test-image-disk-simple/appliance.kiwi +++ b/build-tests/x86/leap/test-image-disk-simple/appliance.kiwi @@ -40,7 +40,6 @@ - diff --git a/build-tests/x86/leap/test-image-disk/appliance.kiwi b/build-tests/x86/leap/test-image-disk/appliance.kiwi index d02dba7dfb4..cbe1e357544 100644 --- a/build-tests/x86/leap/test-image-disk/appliance.kiwi +++ b/build-tests/x86/leap/test-image-disk/appliance.kiwi @@ -44,7 +44,6 @@ - diff --git a/build-tests/x86/leap/test-image-docker/appliance.kiwi b/build-tests/x86/leap/test-image-docker/appliance.kiwi index 3b4ceede490..1436338b760 100644 --- a/build-tests/x86/leap/test-image-docker/appliance.kiwi +++ b/build-tests/x86/leap/test-image-docker/appliance.kiwi @@ -43,7 +43,6 @@ - diff --git a/build-tests/x86/leap/test-image-live/appliance.kiwi b/build-tests/x86/leap/test-image-live/appliance.kiwi index b62f7778321..d6dd20d62e6 100644 --- a/build-tests/x86/leap/test-image-live/appliance.kiwi +++ b/build-tests/x86/leap/test-image-live/appliance.kiwi @@ -37,7 +37,6 @@ - diff --git a/build-tests/x86/leap/test-image-luks/appliance.kiwi b/build-tests/x86/leap/test-image-luks/appliance.kiwi index 596a188429d..8a111d1cbf9 100644 --- a/build-tests/x86/leap/test-image-luks/appliance.kiwi +++ b/build-tests/x86/leap/test-image-luks/appliance.kiwi @@ -40,7 +40,6 @@ - diff --git a/build-tests/x86/leap/test-image-lvm/appliance.kiwi b/build-tests/x86/leap/test-image-lvm/appliance.kiwi index ce3e76e1642..9dfcde37b70 100644 --- a/build-tests/x86/leap/test-image-lvm/appliance.kiwi +++ b/build-tests/x86/leap/test-image-lvm/appliance.kiwi @@ -43,7 +43,6 @@ - diff --git a/build-tests/x86/leap/test-image-overlayroot/appliance.kiwi b/build-tests/x86/leap/test-image-overlayroot/appliance.kiwi index 9b50091d4ab..68515c85368 100644 --- a/build-tests/x86/leap/test-image-overlayroot/appliance.kiwi +++ b/build-tests/x86/leap/test-image-overlayroot/appliance.kiwi @@ -41,7 +41,6 @@ - diff --git a/build-tests/x86/rawhide/test-image-live-disk/appliance.kiwi b/build-tests/x86/rawhide/test-image-live-disk/appliance.kiwi index 7e6f33d08fc..02f5e980ee9 100644 --- a/build-tests/x86/rawhide/test-image-live-disk/appliance.kiwi +++ b/build-tests/x86/rawhide/test-image-live-disk/appliance.kiwi @@ -74,9 +74,6 @@ - - - diff --git a/build-tests/x86/tumbleweed/test-image-azure/appliance.kiwi b/build-tests/x86/tumbleweed/test-image-azure/appliance.kiwi index 90b5b8a4a3c..bec44268e27 100644 --- a/build-tests/x86/tumbleweed/test-image-azure/appliance.kiwi +++ b/build-tests/x86/tumbleweed/test-image-azure/appliance.kiwi @@ -40,7 +40,6 @@ - diff --git a/build-tests/x86/tumbleweed/test-image-bundle-format/appliance.kiwi b/build-tests/x86/tumbleweed/test-image-bundle-format/appliance.kiwi index 5039800835f..2ba1c7c5916 100644 --- a/build-tests/x86/tumbleweed/test-image-bundle-format/appliance.kiwi +++ b/build-tests/x86/tumbleweed/test-image-bundle-format/appliance.kiwi @@ -45,7 +45,6 @@ - diff --git a/build-tests/x86/tumbleweed/test-image-custom-partitions/appliance.kiwi b/build-tests/x86/tumbleweed/test-image-custom-partitions/appliance.kiwi index 663bb983c2a..fa245a003ca 100644 --- a/build-tests/x86/tumbleweed/test-image-custom-partitions/appliance.kiwi +++ b/build-tests/x86/tumbleweed/test-image-custom-partitions/appliance.kiwi @@ -46,7 +46,6 @@ - diff --git a/build-tests/x86/tumbleweed/test-image-disk-legacy/appliance.kiwi b/build-tests/x86/tumbleweed/test-image-disk-legacy/appliance.kiwi index e61f48147c0..304aad9437b 100644 --- a/build-tests/x86/tumbleweed/test-image-disk-legacy/appliance.kiwi +++ b/build-tests/x86/tumbleweed/test-image-disk-legacy/appliance.kiwi @@ -48,7 +48,6 @@ - diff --git a/build-tests/x86/tumbleweed/test-image-disk-ramdisk/appliance.kiwi b/build-tests/x86/tumbleweed/test-image-disk-ramdisk/appliance.kiwi index 39848080763..ab3e7f75f25 100644 --- a/build-tests/x86/tumbleweed/test-image-disk-ramdisk/appliance.kiwi +++ b/build-tests/x86/tumbleweed/test-image-disk-ramdisk/appliance.kiwi @@ -46,7 +46,6 @@ - diff --git a/build-tests/x86/tumbleweed/test-image-disk-simple/appliance.kiwi b/build-tests/x86/tumbleweed/test-image-disk-simple/appliance.kiwi index b66324ba897..5734394ac8e 100644 --- a/build-tests/x86/tumbleweed/test-image-disk-simple/appliance.kiwi +++ b/build-tests/x86/tumbleweed/test-image-disk-simple/appliance.kiwi @@ -41,7 +41,6 @@ - diff --git a/build-tests/x86/tumbleweed/test-image-disk/appliance.kiwi b/build-tests/x86/tumbleweed/test-image-disk/appliance.kiwi index d3f6ba49121..72413ce72b7 100644 --- a/build-tests/x86/tumbleweed/test-image-disk/appliance.kiwi +++ b/build-tests/x86/tumbleweed/test-image-disk/appliance.kiwi @@ -45,7 +45,6 @@ - diff --git a/build-tests/x86/tumbleweed/test-image-docker/appliance.kiwi b/build-tests/x86/tumbleweed/test-image-docker/appliance.kiwi index 341a2a60d13..76716ae9729 100644 --- a/build-tests/x86/tumbleweed/test-image-docker/appliance.kiwi +++ b/build-tests/x86/tumbleweed/test-image-docker/appliance.kiwi @@ -43,7 +43,6 @@ - diff --git a/build-tests/x86/tumbleweed/test-image-ec2/appliance.kiwi b/build-tests/x86/tumbleweed/test-image-ec2/appliance.kiwi index 63f7897cb07..6cd9708a7f4 100644 --- a/build-tests/x86/tumbleweed/test-image-ec2/appliance.kiwi +++ b/build-tests/x86/tumbleweed/test-image-ec2/appliance.kiwi @@ -41,7 +41,6 @@ - diff --git a/build-tests/x86/tumbleweed/test-image-gce/appliance.kiwi b/build-tests/x86/tumbleweed/test-image-gce/appliance.kiwi index 792c18c382a..6108eb2947d 100644 --- a/build-tests/x86/tumbleweed/test-image-gce/appliance.kiwi +++ b/build-tests/x86/tumbleweed/test-image-gce/appliance.kiwi @@ -45,7 +45,6 @@ - diff --git a/build-tests/x86/tumbleweed/test-image-live/appliance.kiwi b/build-tests/x86/tumbleweed/test-image-live/appliance.kiwi index 598e078802b..b39653ca113 100644 --- a/build-tests/x86/tumbleweed/test-image-live/appliance.kiwi +++ b/build-tests/x86/tumbleweed/test-image-live/appliance.kiwi @@ -11,7 +11,6 @@ live iso test build - @@ -27,11 +26,6 @@ breeze openSUSE - - - - - @@ -63,9 +57,6 @@ - - - diff --git a/build-tests/x86/tumbleweed/test-image-luks/appliance.kiwi b/build-tests/x86/tumbleweed/test-image-luks/appliance.kiwi index 48ca2bf5c83..1b0d99e4839 100644 --- a/build-tests/x86/tumbleweed/test-image-luks/appliance.kiwi +++ b/build-tests/x86/tumbleweed/test-image-luks/appliance.kiwi @@ -46,7 +46,6 @@ - diff --git a/build-tests/x86/tumbleweed/test-image-lvm/appliance.kiwi b/build-tests/x86/tumbleweed/test-image-lvm/appliance.kiwi index abac7b53597..be287f2c3a8 100644 --- a/build-tests/x86/tumbleweed/test-image-lvm/appliance.kiwi +++ b/build-tests/x86/tumbleweed/test-image-lvm/appliance.kiwi @@ -46,7 +46,6 @@ - diff --git a/build-tests/x86/tumbleweed/test-image-orthos/appliance.kiwi b/build-tests/x86/tumbleweed/test-image-orthos/appliance.kiwi index 9f87a6a6c88..5211e958642 100644 --- a/build-tests/x86/tumbleweed/test-image-orthos/appliance.kiwi +++ b/build-tests/x86/tumbleweed/test-image-orthos/appliance.kiwi @@ -37,7 +37,6 @@ - diff --git a/build-tests/x86/tumbleweed/test-image-overlayroot/appliance.kiwi b/build-tests/x86/tumbleweed/test-image-overlayroot/appliance.kiwi index cc19c9a6d75..8c02207e0a0 100644 --- a/build-tests/x86/tumbleweed/test-image-overlayroot/appliance.kiwi +++ b/build-tests/x86/tumbleweed/test-image-overlayroot/appliance.kiwi @@ -42,7 +42,6 @@ - diff --git a/build-tests/x86/tumbleweed/test-image-partitions-and-volumes/appliance.kiwi b/build-tests/x86/tumbleweed/test-image-partitions-and-volumes/appliance.kiwi index 384eabb22a6..27e345a7087 100644 --- a/build-tests/x86/tumbleweed/test-image-partitions-and-volumes/appliance.kiwi +++ b/build-tests/x86/tumbleweed/test-image-partitions-and-volumes/appliance.kiwi @@ -50,7 +50,6 @@ - diff --git a/build-tests/x86/tumbleweed/test-image-pxe/appliance.kiwi b/build-tests/x86/tumbleweed/test-image-pxe/appliance.kiwi index 06954a302d9..db401eb3a0e 100644 --- a/build-tests/x86/tumbleweed/test-image-pxe/appliance.kiwi +++ b/build-tests/x86/tumbleweed/test-image-pxe/appliance.kiwi @@ -48,7 +48,6 @@ - diff --git a/build-tests/x86/tumbleweed/test-image-qcow-openstack/appliance.kiwi b/build-tests/x86/tumbleweed/test-image-qcow-openstack/appliance.kiwi index 21607497afc..2bb16e25b3c 100644 --- a/build-tests/x86/tumbleweed/test-image-qcow-openstack/appliance.kiwi +++ b/build-tests/x86/tumbleweed/test-image-qcow-openstack/appliance.kiwi @@ -41,7 +41,6 @@ - diff --git a/build-tests/x86/tumbleweed/test-image-raid/appliance.kiwi b/build-tests/x86/tumbleweed/test-image-raid/appliance.kiwi index ddc47bbe397..9ee254e597c 100644 --- a/build-tests/x86/tumbleweed/test-image-raid/appliance.kiwi +++ b/build-tests/x86/tumbleweed/test-image-raid/appliance.kiwi @@ -51,7 +51,6 @@ - diff --git a/build-tests/x86/tumbleweed/test-image-suse-on-dnf/appliance.kiwi b/build-tests/x86/tumbleweed/test-image-suse-on-dnf/appliance.kiwi index d824875ba1b..b6f00bafdf9 100644 --- a/build-tests/x86/tumbleweed/test-image-suse-on-dnf/appliance.kiwi +++ b/build-tests/x86/tumbleweed/test-image-suse-on-dnf/appliance.kiwi @@ -42,7 +42,6 @@ - diff --git a/build-tests/x86/tumbleweed/test-image-wsl/appliance.kiwi b/build-tests/x86/tumbleweed/test-image-wsl/appliance.kiwi index d62b11837ed..dc596458ec4 100644 --- a/build-tests/x86/tumbleweed/test-image-wsl/appliance.kiwi +++ b/build-tests/x86/tumbleweed/test-image-wsl/appliance.kiwi @@ -42,7 +42,6 @@ - diff --git a/build-tests/x86/ubuntu/test-image-live-disk/appliance.kiwi b/build-tests/x86/ubuntu/test-image-live-disk/appliance.kiwi index 06172ca86fc..1414066b69a 100644 --- a/build-tests/x86/ubuntu/test-image-live-disk/appliance.kiwi +++ b/build-tests/x86/ubuntu/test-image-live-disk/appliance.kiwi @@ -68,9 +68,6 @@ - - - From 54f92d2a9f53527492fc5265941b4bea2cc7d0d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20Sch=C3=A4fer?= Date: Mon, 22 Jan 2024 17:22:15 +0100 Subject: [PATCH 2/3] Drop support for syslinux/isolinux SYSLINUX has been abandoned for several years now, and it does not even work with modern versions of the filesystems supported in kiwi. This commit drops it and Fixes #2433 --- kiwi/bootloader/config/__init__.py | 1 - kiwi/bootloader/config/base.py | 7 +- kiwi/bootloader/config/grub2.py | 2 +- kiwi/bootloader/config/isolinux.py | 241 --------------- kiwi/bootloader/template/isolinux.py | 285 ------------------ kiwi/builder/install.py | 48 +-- kiwi/builder/live.py | 41 +-- kiwi/defaults.py | 84 ++---- kiwi/exceptions.py | 6 - kiwi/iso_tools/base.py | 16 +- kiwi/iso_tools/iso.py | 43 --- kiwi/iso_tools/xorriso.py | 61 ++-- kiwi/runtime_checker.py | 72 ----- kiwi/schema/kiwi.rnc | 15 +- kiwi/schema/kiwi.rng | 20 +- kiwi/tasks/base.py | 2 - package/python-kiwi-spec-template | 3 - test/unit/bootloader/config/base_test.py | 8 - test/unit/bootloader/config/init_test.py | 8 - test/unit/bootloader/config/isolinux_test.py | 215 ------------- .../unit/bootloader/template/isolinux_test.py | 220 -------------- test/unit/builder/install_test.py | 18 +- test/unit/builder/live_test.py | 11 - test/unit/iso_tools/base_test.py | 144 --------- test/unit/iso_tools/iso_test.py | 46 +-- test/unit/iso_tools/xorriso_test.py | 69 ++--- test/unit/runtime_checker_test.py | 34 --- test/unit/tasks/system_build_test.py | 3 - test/unit/tasks/system_prepare_test.py | 3 - 29 files changed, 118 insertions(+), 1608 deletions(-) delete mode 100644 kiwi/bootloader/config/isolinux.py delete mode 100644 kiwi/bootloader/template/isolinux.py delete mode 100644 test/unit/bootloader/config/isolinux_test.py delete mode 100644 test/unit/bootloader/template/isolinux_test.py diff --git a/kiwi/bootloader/config/__init__.py b/kiwi/bootloader/config/__init__.py index db6f55ce21b..f0001fd52b0 100644 --- a/kiwi/bootloader/config/__init__.py +++ b/kiwi/bootloader/config/__init__.py @@ -48,7 +48,6 @@ def new( name_map = { 'grub2': {'grub2': 'BootLoaderConfigGrub2'}, 'grub2_s390x_emu': {'grub2': 'BootLoaderConfigGrub2'}, - 'isolinux': {'isolinux': 'BootLoaderConfigIsoLinux'}, 'systemd_boot': {'systemd_boot': 'BootLoaderSystemdBoot'} } try: diff --git a/kiwi/bootloader/config/base.py b/kiwi/bootloader/config/base.py index 33078ccc32b..676ccc05771 100644 --- a/kiwi/bootloader/config/base.py +++ b/kiwi/bootloader/config/base.py @@ -353,10 +353,7 @@ def get_install_image_boot_default(self, loader=None): log.warning('Switching to standard install') boot_id = 1 - if loader and loader == 'isolinux': - return menu_list[boot_id].name - else: - return menu_list[boot_id].menu_id + return menu_list[boot_id].menu_id def get_boot_path(self, target='disk'): """ @@ -499,8 +496,6 @@ def get_gfxmode(self, target): if target == 'grub2': return gfxmode_map[gfxmode].grub2 - elif target == 'isolinux': - return gfxmode_map[gfxmode].isolinux else: return gfxmode diff --git a/kiwi/bootloader/config/grub2.py b/kiwi/bootloader/config/grub2.py index 7f30b8e4b56..b7ac77b94ed 100644 --- a/kiwi/bootloader/config/grub2.py +++ b/kiwi/bootloader/config/grub2.py @@ -936,7 +936,7 @@ def _setup_bios_image(self, mbrid, lookup_path=None): os.sep.join( [ self._get_bios_modules_path(lookup_path), - Defaults.get_isolinux_bios_grub_loader() + Defaults.get_iso_grub_loader() ] ) ] diff --git a/kiwi/bootloader/config/isolinux.py b/kiwi/bootloader/config/isolinux.py deleted file mode 100644 index 8cd86616c63..00000000000 --- a/kiwi/bootloader/config/isolinux.py +++ /dev/null @@ -1,241 +0,0 @@ -# Copyright (c) 2015 SUSE Linux GmbH. All rights reserved. -# -# This file is part of kiwi. -# -# kiwi is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# kiwi is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with kiwi. If not, see -# -import os -import logging - -# project -from kiwi.bootloader.config.base import BootLoaderConfigBase -from kiwi.bootloader.template.isolinux import BootLoaderTemplateIsoLinux -from kiwi.path import Path -from kiwi.defaults import Defaults - -from kiwi.exceptions import KiwiTemplateError - -log = logging.getLogger('kiwi') - - -class BootLoaderConfigIsoLinux(BootLoaderConfigBase): - """ - **isolinux bootloader configuration.** - """ - def post_init(self, custom_args): - """ - isolinux post initialization method - - :param dict custom_args: custom isolinux config arguments - """ - self.custom_args = custom_args - self.arch = Defaults.get_platform_name() - - self.install_volid = self.xml_state.build_type.get_volid() or \ - Defaults.get_install_volume_id() - self.volume_id = self.xml_state.build_type.get_volid() or \ - Defaults.get_volume_id() - - self.live_type = self.xml_state.build_type.get_flags() - if not self.live_type: - self.live_type = Defaults.get_default_live_iso_type() - - self.live_boot_options = [ - 'root=live:CDLABEL={0}'.format(self.volume_id), - 'rd.live.image' - ] - self.install_boot_options = [ - 'loglevel=0' - ] - if self.xml_state.get_initrd_system() == 'dracut': - self.install_boot_options.append( - 'root=install:CDLABEL={0}'.format(self.install_volid) - ) - - if self.xml_state.build_type.get_hybridpersistent(): - self.live_boot_options += \ - Defaults.get_live_iso_persistent_boot_options( - self.xml_state.build_type.get_hybridpersistent_filesystem() - ) - - self.terminal = self.xml_state.get_build_type_bootloader_console()[0] - self.gfxmode = self.get_gfxmode('isolinux') - # isolinux counts the timeout in units of 1/10 sec - self.timeout = self.get_boot_timeout_seconds() * 10 - self.continue_on_timeout = self.get_continue_on_timeout() - self.cmdline = self.get_boot_cmdline(boot_device=None) - self.cmdline_failsafe = ' '.join( - [self.cmdline, Defaults.get_failsafe_kernel_options()] - ) - self.failsafe_boot = self.failsafe_boot_entry_requested() - self.mediacheck_boot = self.xml_state.build_type.get_mediacheck() - - self.multiboot = False - if self.xml_state.is_xen_server(): - self.multiboot = True - - self.isolinux = BootLoaderTemplateIsoLinux() - self.config = None - self.config_message = None - - def write(self): - """ - Write isolinux.cfg and isolinux.msg file - """ - log.info('Writing isolinux.cfg file') - config_dir = self._get_iso_boot_path() - config_file = config_dir + '/isolinux.cfg' - if self.config: - Path.create(config_dir) - with open(config_file, 'w') as config: - config.write(self.config) - - config_file_message = config_dir + '/isolinux.msg' - if self.config_message: - with open(config_file_message, 'w') as config: - config.write(self.config_message) - - def setup_install_image_config( - self, mbrid, hypervisor='xen.gz', kernel='linux', initrd='initrd' - ): - """ - Create isolinux.cfg in memory from a template suitable to boot - from an ISO image in BIOS boot mode - - :param string mbrid: mbrid file name on boot device - :param string hypervisor: hypervisor name - :param string kernel: kernel name - :param string initrd: initrd name - """ - # mbrid parameter is not used, the information is placed as the - # application id when creating the iso filesystem. Thus not part - # of the configuration file - log.info('Creating isolinux install config file from template') - parameters = { - 'default_boot': self.get_install_image_boot_default('isolinux'), - 'kernel_file': kernel, - 'initrd_file': initrd, - 'boot_options': ' '.join( - [self.cmdline] + self.install_boot_options - ), - 'failsafe_boot_options': ' '.join( - [self.cmdline_failsafe] + self.install_boot_options - ), - 'gfxmode': self.gfxmode, - 'boot_timeout': self.timeout, - 'title': self.get_menu_entry_install_title() - } - if self.multiboot: - log.info('--> Using multiboot install template') - parameters['hypervisor'] = hypervisor - template = self.isolinux.get_multiboot_install_template( - self.failsafe_boot, self._have_theme(), self.terminal, - self.continue_on_timeout - ) - else: - log.info('--> Using install template') - template = self.isolinux.get_install_template( - self.failsafe_boot, self._have_theme(), self.terminal, - self.continue_on_timeout - ) - try: - self.config = template.substitute(parameters) - template = self.isolinux.get_install_message_template() - self.config_message = template.substitute(parameters) - except Exception as e: - raise KiwiTemplateError( - '%s: %s' % (type(e).__name__, format(e)) - ) - - def setup_live_image_config( - self, mbrid, hypervisor='xen.gz', kernel='linux', initrd='initrd' - ): - """ - Create isolinux.cfg in memory from a template suitable to boot - a live system from an ISO image in BIOS boot mode - - :param string mbrid: mbrid file name on boot device - :param string hypervisor: hypervisor name - :param string kernel: kernel name - :param string initrd: initrd name - """ - # mbrid parameter is not used, the information is placed as the - # application id when creating the iso filesystem. Thus not part - # of the configuration file - log.info('Creating isolinux live ISO config file from template') - parameters = { - 'default_boot': self.get_menu_entry_title(plain=True), - 'kernel_file': kernel, - 'initrd_file': initrd, - 'boot_options': ' '.join( - [self.cmdline] + self.live_boot_options - ), - 'failsafe_boot_options': ' '.join( - [self.cmdline_failsafe] + self.live_boot_options - ), - 'gfxmode': self.gfxmode, - 'boot_timeout': self.timeout, - 'title': self.get_menu_entry_title(plain=True) - } - if self.multiboot: - log.info('--> Using multiboot standard ISO template') - parameters['hypervisor'] = hypervisor - template = self.isolinux.get_multiboot_template( - self.failsafe_boot, self._have_theme(), - self.terminal, self.mediacheck_boot - ) - else: - log.info('--> Using standard ISO template') - template = self.isolinux.get_template( - self.failsafe_boot, self._have_theme(), - self.terminal, self.mediacheck_boot - ) - try: - self.config = template.substitute(parameters) - template = self.isolinux.get_message_template() - self.config_message = template.substitute(parameters) - except Exception as e: - raise KiwiTemplateError( - '%s: %s' % (type(e).__name__, format(e)) - ) - - def setup_install_boot_images(self, mbrid, lookup_path=None): - """ - Provide isolinux boot metadata - - No extra boot images must be created for isolinux - - :param string mbrid: unused - :param string lookup_path: unused - """ - pass - - def setup_live_boot_images(self, mbrid, lookup_path=None): - """ - Provide isolinux boot metadata - - No extra boot images must be created for isolinux - - :param string mbrid: unused - :param string lookup_path: unused - """ - pass - - def _get_iso_boot_path(self): - return self.boot_dir + '/boot/' + self.arch + '/loader' - - def _have_theme(self): - if os.path.exists(self._get_iso_boot_path() + '/bootlogo'): - return True - return False diff --git a/kiwi/bootloader/template/isolinux.py b/kiwi/bootloader/template/isolinux.py deleted file mode 100644 index 5496713fe96..00000000000 --- a/kiwi/bootloader/template/isolinux.py +++ /dev/null @@ -1,285 +0,0 @@ -# Copyright (c) 2015 SUSE Linux GmbH. All rights reserved. -# -# This file is part of kiwi. -# -# kiwi is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# kiwi is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with kiwi. If not, see -# -from string import Template -from textwrap import dedent - - -class BootLoaderTemplateIsoLinux: - """ - **isolinux configuraton file templates** - """ - def __init__(self): - self.cr = '\n' - - self.install_message = dedent(''' - Welcome ! - - Boot_from_Hard_Disk - Install_${title} - Failsafe_--_Install_${title} - - - Have a lot of fun... - ''').strip() + self.cr - - self.message = dedent(''' - Welcome ! - - ${title} - Failsafe_${title} - - - Have a lot of fun... - ''').strip() + self.cr - - self.serial = dedent(''' - serial 0 9600 - ''') - - self.header = dedent(''' - # kiwi generated isolinux config file - implicit 1 - prompt 1 - display isolinux.msg - default ${default_boot} - ''').strip() + self.cr - - self.timeout = dedent(''' - timeout ${boot_timeout} - ''').strip() + self.cr - - self.ui_theme = dedent(''' - ui gfxboot bootlogo isolinux.msg - MENU RESOLUTION ${gfxmode} - ''').strip() + self.cr - - self.ui_plain = dedent(''' - ui menu.c32 - ''').strip() + self.cr - - self.menu_harddisk_entry = dedent(''' - label Boot_from_Hard_Disk - localboot 0x80 - ''').strip() + self.cr - - self.menu_install_entry_multiboot = dedent(''' - label Install_${title} - kernel mboot.c32 - append ${hypervisor} --- ${kernel_file} ${boot_options} cdinst=1 showopts --- ${initrd_file} showopts - ''').strip() + self.cr - - self.menu_install_entry_failsafe_multiboot = dedent(''' - label Failsafe_--_Install_${title} - kernel mboot.c32 - append ${hypervisor} --- ${kernel_file} ${failsafe_boot_options} cdinst=1 showopts --- ${initrd_file} showopts - ''').strip() + self.cr - - self.menu_entry_multiboot = dedent(''' - label ${title} - kernel mboot.c32 - append ${hypervisor} --- ${kernel_file} ${boot_options} showopts --- ${initrd_file} showopts - ''').strip() + self.cr - - self.menu_entry_failsafe_multiboot = dedent(''' - label Failsafe_--_${title} - kernel mboot.c32 - append ${hypervisor} --- ${kernel_file} ${failsafe_boot_options} showopts --- ${initrd_file} showopts - ''').strip() + self.cr - - self.menu_mediacheck_entry_multiboot = dedent(''' - label Mediacheck - kernel mboot.c32 - append ${hypervisor} --- ${kernel_file} ${boot_options} mediacheck=1 plymouth.enable=0 showopts --- ${initrd_file} showopts - ''').strip() + self.cr - - self.menu_install_entry = dedent(''' - label Install_${title} - kernel ${kernel_file} - append initrd=${initrd_file} ${boot_options} cdinst=1 showopts - ''').strip() + self.cr - - self.menu_install_entry_failsafe = dedent(''' - label Failsafe_--_Install_${title} - kernel ${kernel_file} - append initrd=${initrd_file} ${failsafe_boot_options} cdinst=1 showopts - ''').strip() + self.cr - - self.menu_entry = dedent(''' - label ${title} - kernel ${kernel_file} - append initrd=${initrd_file} ${boot_options} showopts - ''').strip() + self.cr - - self.menu_entry_failsafe = dedent(''' - label Failsafe_--_${title} - kernel ${kernel_file} - append initrd=${initrd_file} ${failsafe_boot_options} showopts - ''').strip() + self.cr - - self.menu_mediacheck_entry = dedent(''' - label Mediacheck - kernel ${kernel_file} - append initrd=${initrd_file} ${boot_options} mediacheck=1 plymouth.enable=0 showopts - ''').strip() + self.cr - - def get_install_message_template(self): - """ - Bootloader template for text message file in install mode. - isolinux displays this as menu if no graphics mode can be - initialized - - :return: instance of :class:`Template` - - :rtype: Template - """ - return Template(self.install_message) - - def get_message_template(self): - """ - Bootloader template for text message file. isolinux - displays this as menu if no graphics mode can be initialized - - :return: instance of :class:`Template` - - :rtype: Template - """ - return Template(self.message) - - def get_template( - self, failsafe=True, with_theme=True, terminal=None, checkiso=False - ): - """ - Bootloader configuration template for live media - - :param bool failsafe: with failsafe true|false - :param bool with_theme: with graphics theme true|false - - :return: instance of :class:`Template` - - :rtype: Template - """ - template_data = self.header - template_data += self.timeout - if terminal and 'serial' in terminal: - template_data += self.serial - with_theme = False - if terminal != 'serial': - if with_theme: - template_data += self.ui_theme - else: - template_data += self.ui_plain - template_data += self.menu_entry - if failsafe: - template_data += self.menu_entry_failsafe - template_data += self.menu_harddisk_entry - if checkiso: - template_data += self.menu_mediacheck_entry - return Template(template_data) - - def get_multiboot_template( - self, failsafe=True, with_theme=True, terminal=None, checkiso=False - ): - """ - Bootloader configuration template for live media with - hypervisor, e.g Xen dom0 - - :param bool failsafe: with failsafe true|false - :param bool with_theme: with graphics theme true|false - - :return: instance of :class:`Template` - - :rtype: Template - """ - template_data = self.header - template_data += self.timeout - if terminal and 'serial' in terminal: - template_data += self.serial - with_theme = False - if terminal != 'serial': - if with_theme: - template_data += self.ui_theme - else: - template_data += self.ui_plain - template_data += self.menu_entry_multiboot - if failsafe: - template_data += self.menu_entry_failsafe_multiboot - template_data += self.menu_harddisk_entry - if checkiso: - template_data += self.menu_mediacheck_entry_multiboot - return Template(template_data) - - def get_install_template( - self, failsafe=True, with_theme=True, terminal=None, with_timeout=True - ): - """ - Bootloader configuration template for install media - - :param bool failsafe: with failsafe true|false - :param bool with_theme: with graphics theme true|false - - :return: instance of :class:`Template` - - :rtype: Template - """ - template_data = self.header - if with_timeout: - template_data += self.timeout - if terminal and 'serial' in terminal: - template_data += self.serial - with_theme = False - if terminal != 'serial': - if with_theme: - template_data += self.ui_theme - else: - template_data += self.ui_plain - template_data += self.menu_harddisk_entry - template_data += self.menu_install_entry - if failsafe: - template_data += self.menu_install_entry_failsafe - return Template(template_data) - - def get_multiboot_install_template( - self, failsafe=True, with_theme=True, terminal=None, with_timeout=True - ): - """ - Bootloader configuration template for install media with - hypervisor, e.g Xen dom0 - - :param bool failsafe: with failsafe true|false - :param bool with_theme: with graphics theme true|false - - :return: instance of :class:`Template` - - :rtype: Template - """ - template_data = self.header - if with_timeout: - template_data += self.timeout - if terminal and 'serial' in terminal: - template_data += self.serial - with_theme = False - if terminal != 'serial': - if with_theme: - template_data += self.ui_theme - else: - template_data += self.ui_plain - template_data += self.menu_harddisk_entry - template_data += self.menu_install_entry_multiboot - if failsafe: - template_data += self.menu_install_entry_failsafe_multiboot - return Template(template_data) diff --git a/kiwi/builder/install.py b/kiwi/builder/install.py index e9191ffb2fb..c230b7d6b37 100644 --- a/kiwi/builder/install.py +++ b/kiwi/builder/install.py @@ -42,7 +42,6 @@ from kiwi.system.setup import SystemSetup from kiwi.iso_tools.base import IsoToolsBase from kiwi.xml_state import XMLState -from kiwi.iso_tools.iso import Iso from kiwi.exceptions import ( @@ -207,20 +206,16 @@ def create_install_iso(self) -> None: log.info( 'Setting up install image bootloader configuration' ) - with self._bootloader_instance() as bootloader_config: - if self.firmware.efi_mode(): - bootloader_config.setup_install_boot_images( - mbrid=self.mbrid, - lookup_path=self.boot_image_task.boot_root_directory - ) - + with self._create_bootloader_instance() as bootloader_config: + bootloader_config.setup_install_boot_images( + mbrid=self.mbrid, + lookup_path=self.boot_image_task.boot_root_directory + ) IsoToolsBase.setup_media_loader_directory( self.boot_image_task.boot_root_directory, self.media_dir.name, bootloader_config.get_boot_theme() ) - if self.firmware.bios_mode(): - Iso(self.media_dir.name).setup_isolinux_boot_path() bootloader_config.write_meta_data() bootloader_config.setup_install_image_config( mbrid=self.mbrid @@ -361,29 +356,16 @@ def create_install_pxe_archive(self) -> None: archive.create(self.pxe_dir.name) self.boot_image_task.cleanup() - def _bootloader_instance(self): - if self.firmware.efi_mode(): - # setup bootloader config to boot the ISO via EFI - # This also embedds an MBR and the respective BIOS modules - # for compat boot. The complete bootloader setup will be - # based on grub - return BootLoaderConfig.new( - self.bootloader, self.xml_state, root_dir=self.root_dir, - boot_dir=self.media_dir.name, custom_args={ - 'grub_directory_name': - Defaults.get_grub_boot_directory_name(self.root_dir), - 'grub_load_command': - 'configfile' - } - ) - else: - # setup bootloader config to boot the ISO via isolinux. - # This allows for booting on x86 platforms in BIOS mode - # only. - return BootLoaderConfig.new( - 'isolinux', self.xml_state, root_dir=self.root_dir, - boot_dir=self.media_dir.name - ) + def _create_bootloader_instance(self): + return BootLoaderConfig.new( + self.bootloader, self.xml_state, root_dir=self.root_dir, + boot_dir=self.media_dir.name, custom_args={ + 'grub_directory_name': + Defaults.get_grub_boot_directory_name(self.root_dir), + 'grub_load_command': + 'configfile' + } + ) def _create_pxe_install_kernel_and_initrd(self) -> None: kernelname = 'pxeboot.{0}.kernel'.format(self.pxename) diff --git a/kiwi/builder/live.py b/kiwi/builder/live.py index a931792474c..501fc946a5b 100644 --- a/kiwi/builder/live.py +++ b/kiwi/builder/live.py @@ -148,17 +148,13 @@ def create(self) -> Result: 'Setting up live image bootloader configuration' ) with self._create_bootloader_instance() as bootloader_config: - if self.firmware.efi_mode(): - bootloader_config.setup_live_boot_images( - mbrid=self.mbrid, lookup_path=self.root_dir - ) - + bootloader_config.setup_live_boot_images( + mbrid=self.mbrid, lookup_path=self.root_dir + ) IsoToolsBase.setup_media_loader_directory( self.boot_image.boot_root_directory, self.media_dir.name, bootloader_config.get_boot_theme() ) - if self.firmware.bios_mode(): - Iso(self.media_dir.name).setup_isolinux_boot_path() bootloader_config.write_meta_data() bootloader_config.setup_live_image_config( mbrid=self.mbrid @@ -348,28 +344,15 @@ def create(self) -> Result: return self.result def _create_bootloader_instance(self) -> BootLoaderConfigBase: - if self.firmware.efi_mode(): - # setup bootloader config to boot the ISO via EFI - # This also embedds an MBR and the respective BIOS modules - # for compat boot. The complete bootloader setup will be - # based on grub - return BootLoaderConfig.new( - self.bootloader, self.xml_state, root_dir=self.root_dir, - boot_dir=self.media_dir.name, custom_args={ - 'grub_directory_name': - Defaults.get_grub_boot_directory_name(self.root_dir), - 'grub_load_command': - 'configfile' - } - ) - else: - # setup bootloader config to boot the ISO via isolinux. - # This allows for booting on x86 platforms in BIOS mode - # only. - return BootLoaderConfig.new( - 'isolinux', self.xml_state, root_dir=self.root_dir, - boot_dir=self.media_dir.name - ) + return BootLoaderConfig.new( + self.bootloader, self.xml_state, root_dir=self.root_dir, + boot_dir=self.media_dir.name, custom_args={ + 'grub_directory_name': + Defaults.get_grub_boot_directory_name(self.root_dir), + 'grub_load_command': + 'configfile' + } + ) def _setup_live_iso_kernel_and_initrd(self) -> None: """ diff --git a/kiwi/defaults.py b/kiwi/defaults.py index 126fdfc8a76..2ac3f5bd56c 100644 --- a/kiwi/defaults.py +++ b/kiwi/defaults.py @@ -475,31 +475,31 @@ def get_video_mode_map(): .. code:: python - {'kernel_hex_mode': video_type(grub2='mode', isolinux='mode')} + {'kernel_hex_mode': video_type(grub2='mode')} :rtype: dict """ video_type = namedtuple( - 'video_type', ['grub2', 'isolinux'] + 'video_type', ['grub2'] ) return { - '0x301': video_type(grub2='640x480', isolinux='640 480'), - '0x310': video_type(grub2='640x480', isolinux='640 480'), - '0x311': video_type(grub2='640x480', isolinux='640 480'), - '0x312': video_type(grub2='640x480', isolinux='640 480'), - '0x303': video_type(grub2='800x600', isolinux='800 600'), - '0x313': video_type(grub2='800x600', isolinux='800 600'), - '0x314': video_type(grub2='800x600', isolinux='800 600'), - '0x315': video_type(grub2='800x600', isolinux='800 600'), - '0x305': video_type(grub2='1024x768', isolinux='1024 768'), - '0x316': video_type(grub2='1024x768', isolinux='1024 768'), - '0x317': video_type(grub2='1024x768', isolinux='1024 768'), - '0x318': video_type(grub2='1024x768', isolinux='1024 768'), - '0x307': video_type(grub2='1280x1024', isolinux='1280 1024'), - '0x319': video_type(grub2='1280x1024', isolinux='1280 1024'), - '0x31a': video_type(grub2='1280x1024', isolinux='1280 1024'), - '0x31b': video_type(grub2='1280x1024', isolinux='1280 1024'), - 'auto': video_type(grub2='auto', isolinux='800 600') + '0x301': video_type(grub2='640x480'), + '0x310': video_type(grub2='640x480'), + '0x311': video_type(grub2='640x480'), + '0x312': video_type(grub2='640x480'), + '0x303': video_type(grub2='800x600'), + '0x313': video_type(grub2='800x600'), + '0x314': video_type(grub2='800x600'), + '0x315': video_type(grub2='800x600'), + '0x305': video_type(grub2='1024x768'), + '0x316': video_type(grub2='1024x768'), + '0x317': video_type(grub2='1024x768'), + '0x318': video_type(grub2='1024x768'), + '0x307': video_type(grub2='1280x1024'), + '0x319': video_type(grub2='1280x1024'), + '0x31a': video_type(grub2='1280x1024'), + '0x31b': video_type(grub2='1280x1024'), + 'auto': video_type(grub2='auto') } @staticmethod @@ -937,56 +937,26 @@ def get_grub_bios_core_loader(root_path): return bios_grub_core @staticmethod - def get_syslinux_modules(): + def get_iso_grub_loader(): """ - Returns list of syslinux modules to include on ISO - images that boots via isolinux + Return name of eltorito grub image used as ISO loader - :return: base file names - - :rtype: list - """ - return [ - 'isolinux.bin', - 'ldlinux.c32', - 'libcom32.c32', - 'libutil.c32', - 'gfxboot.c32', - 'gfxboot.com', - 'menu.c32', - 'chain.c32', - 'mboot.c32' - ] - - @staticmethod - def get_syslinux_search_paths(): - """ - syslinux is packaged differently between distributions. - This method returns a list of directories to search for - syslinux data - - :return: directory names + :return: file base name - :rtype: list + :rtype: str """ - return [ - '/usr/share/syslinux', - '/usr/lib/syslinux/bios', - '/usr/lib/syslinux/modules/bios', - '/usr/lib/ISOLINUX' - ] + return 'eltorito.img' @staticmethod - def get_isolinux_bios_grub_loader(): + def get_iso_grub_mbr(): """ - Return name of eltorito grub image used as isolinux loader - in BIOS mode if isolinux.bin should not be used + Return name of hybrid MBR image used as ISO boot record :return: file base name :rtype: str """ - return 'eltorito.img' + return 'boot_hybrid.img' @staticmethod def get_signed_grub_loader( diff --git a/kiwi/exceptions.py b/kiwi/exceptions.py index d15399d0de2..376169eb854 100644 --- a/kiwi/exceptions.py +++ b/kiwi/exceptions.py @@ -352,12 +352,6 @@ class KiwiPackagesDeletePhaseFailed(KiwiError): """ -class KiwiIsoLoaderError(KiwiError): - """ - Exception raised if no isolinux loader file could be found. - """ - - class KiwiIsoMetaDataError(KiwiError): """ Exception raised if an inconsistency in the ISO header diff --git a/kiwi/iso_tools/base.py b/kiwi/iso_tools/base.py index 07103bfea3c..bd580df903b 100644 --- a/kiwi/iso_tools/base.py +++ b/kiwi/iso_tools/base.py @@ -64,7 +64,7 @@ def init_iso_creation_parameters( self, custom_args: Dict[str, str] = None ) -> None: """ - Create a set of standard parameters for the main isolinux loader + Create a set of standard parameters for the main loader Implementation in specialized tool class @@ -122,8 +122,8 @@ def setup_media_loader_directory( Path.wipe(loader_data) Path.create(loader_data) grub_image_file_names = [ - Defaults.get_isolinux_bios_grub_loader(), - 'boot_hybrid.img' + Defaults.get_iso_grub_loader(), + Defaults.get_iso_grub_mbr() ] loader_files = [] for grub_image_file_name in grub_image_file_names: @@ -134,16 +134,6 @@ def setup_media_loader_directory( if grub_file and os.path.exists(grub_file): loader_files.append(grub_file) - for syslinux_file_name in Defaults.get_syslinux_modules(): - for syslinux_dir in Defaults.get_syslinux_search_paths(): - syslinux_file = os.path.normpath( - os.sep.join( - [lookup_path, syslinux_dir, syslinux_file_name] - ) - ) - if os.path.exists(syslinux_file): - loader_files.append(syslinux_file) - log.debug('Copying loader files to {0}'.format(loader_data)) for loader_file in loader_files: log.debug('--> Copying {0}'.format(loader_file)) diff --git a/kiwi/iso_tools/iso.py b/kiwi/iso_tools/iso.py index c732011c9bf..43ece9c5eb0 100644 --- a/kiwi/iso_tools/iso.py +++ b/kiwi/iso_tools/iso.py @@ -15,12 +15,9 @@ # You should have received a copy of the GNU General Public License # along with kiwi. If not, see # -import os - # project from kiwi.defaults import Defaults from kiwi.command import Command -from kiwi.exceptions import KiwiIsoLoaderError class Iso: @@ -54,43 +51,3 @@ def set_media_tag(isofile: str) -> None: isofile ] ) - - def setup_isolinux_boot_path(self) -> None: - """ - Write the base boot path into the isolinux loader binary - - :raises KiwiIsoLoaderError: if loader/isolinux.bin is not found - """ - loader_base_directory = self.boot_path + '/loader' - loader_file = '/'.join( - [self.source_dir, self.boot_path, 'loader/isolinux.bin'] - ) - if not os.path.exists(loader_file): - raise KiwiIsoLoaderError( - 'No isolinux loader {} found'.format(loader_file) - ) - try: - Command.run( - [ - 'isolinux-config', '--base', loader_base_directory, - loader_file - ] - ) - except Exception: - # Setup of the base directory failed. This happens if - # isolinux-config was not able to identify the isolinux - # signature. As a workaround a compat directory /isolinux - # is created which hardlinks all loader files - loader_source_directory = os.sep.join( - [self.source_dir, loader_base_directory] - ) - loader_compat_target_directory = os.sep.join( - [self.source_dir, 'isolinux'] - ) - Command.run( - [ - 'cp', '-a', '-l', - loader_source_directory + os.sep, - loader_compat_target_directory + os.sep - ] - ) diff --git a/kiwi/iso_tools/xorriso.py b/kiwi/iso_tools/xorriso.py index 1a737559713..f59cd43bcfa 100644 --- a/kiwi/iso_tools/xorriso.py +++ b/kiwi/iso_tools/xorriso.py @@ -16,6 +16,7 @@ # along with kiwi. If not, see # import os +import logging from typing import ( Dict, List, Optional ) @@ -24,9 +25,11 @@ from kiwi.iso_tools.base import IsoToolsBase from kiwi.path import Path from kiwi.command import Command -from kiwi.exceptions import KiwiFileNotFound, KiwiIsoToolError +from kiwi.exceptions import KiwiIsoToolError from kiwi.defaults import Defaults +log = logging.getLogger('kiwi') + class IsoToolsXorrIso(IsoToolsBase): """ @@ -70,10 +73,7 @@ def init_iso_creation_parameters( :param list custom_args: custom ISO meta data """ - efi_mode = False if custom_args: - if custom_args.get('efi_mode'): - efi_mode = True if 'mbr_id' in custom_args: self.iso_parameters += [ '-application_id', custom_args['mbr_id'] @@ -96,39 +96,30 @@ def init_iso_creation_parameters( ] if Defaults.is_x86_arch(self.arch): - if efi_mode: - mbr_file = os.sep.join( - [self.source_dir, self.boot_path, '/loader/boot_hybrid.img'] - ) - if os.path.exists(mbr_file): - loader_file = os.sep.join( - [ - self.boot_path, 'loader', - Defaults.get_isolinux_bios_grub_loader() - ] - ) - self.iso_loaders += [ - '-boot_image', 'grub', 'bin_path={0}'.format(loader_file), - '-boot_image', 'grub', 'grub2_mbr={0}'.format(mbr_file), - '-boot_image', 'grub', 'grub2_boot_info=on' - ] - else: - loader_file = self.boot_path + '/loader/isolinux.bin' - mbr_file_c = Path.which( - 'isohdpfx.bin', Defaults.get_syslinux_search_paths() - ) - if not mbr_file_c: - raise KiwiFileNotFound("isohdpfx.bin not found in the syslinux search paths") - mbr_file = mbr_file_c + mbr_file = os.sep.join( + [ + self.source_dir, self.boot_path, 'loader', + Defaults.get_iso_grub_mbr() + ] + ) + loader_file = os.sep.join( + [ + self.boot_path, 'loader', + Defaults.get_iso_grub_loader() + ] + ) + self.iso_loaders += [ + '-boot_image', 'grub', 'bin_path={0}'.format(loader_file) + ] + if os.path.exists(mbr_file): self.iso_loaders += [ - '-boot_image', 'isolinux', 'bin_path={0}'.format( - loader_file - ), - '-boot_image', 'isolinux', 'system_area={0}'.format( - mbr_file - ), - '-boot_image', 'isolinux', 'partition_table=on', + '-boot_image', 'grub', 'grub2_mbr={0}'.format(mbr_file) ] + else: + log.warning(f'No hybrid MBR file found: {mbr_file}: skipped') + self.iso_loaders += [ + '-boot_image', 'grub', 'grub2_boot_info=on' + ] self.iso_loaders += [ '-boot_image', 'any', 'partition_offset=16', diff --git a/kiwi/runtime_checker.py b/kiwi/runtime_checker.py index b61edbdbed1..f25e60c1755 100644 --- a/kiwi/runtime_checker.py +++ b/kiwi/runtime_checker.py @@ -623,40 +623,6 @@ def check_consistent_kernel_in_boot_and_system_image(self) -> None: ) ) - def check_syslinux_installed_if_isolinux_is_used(self) -> None: - """ - ISO images that are configured to use isolinux - requires the host to provide a set of syslinux - binaries. - """ - message = dedent('''\n - Required syslinux module(s) not found - - The ISO image build for this image setup uses isolinux - and therefore requires the syslinux modules to be - available on the build host. Please make sure your - build host has the syslinux package installed. - ''') - firmware = FirmWare(self.xml_state) - if Defaults.is_x86_arch( - Defaults.get_platform_name() - ) and not firmware.efi_mode(): - image_builds_iso = False - build_type = self.xml_state.get_build_type_name() - if build_type == 'iso': - image_builds_iso = True - elif build_type == 'oem': - install_iso = self.xml_state.build_type.get_installiso() - install_stick = self.xml_state.build_type.get_installstick() - if install_iso or install_stick: - image_builds_iso = True - if image_builds_iso: - syslinux_check_file = Path.which( - 'isohdpfx.bin', Defaults.get_syslinux_search_paths() - ) - if not syslinux_check_file: - raise KiwiRuntimeError(message) - def check_dracut_module_versions_compatible_to_kiwi( self, root_dir: str ) -> None: @@ -770,44 +736,6 @@ def check_dracut_module_for_oem_install_in_package_list(self) -> None: message.format(required_dracut_package) ) - def check_architecture_supports_iso_firmware_setup(self) -> None: - """ - For creating ISO images a different bootloader setup is - performed depending on the configured firmware. If the - firmware is set to bios, isolinux is used and that limits - the architecture to x86 only. In any other case the appliance - configured bootloader is used. This check examines if the - host architecture is supported with the configured firmware - on request of an ISO image. - """ - message = dedent('''\n - Unsupported firmware setup: {0} on {1} architecture - - The selected firmware limits the creation of images to - the x86 platform. For the detected build host architecture - and the request to build a live or install ISO media - the EFI firmware must be used: - - - ''') - arch = Defaults.get_platform_name() - build_type = self.xml_state.get_build_type_name() - firmware = self.xml_state.build_type.get_firmware() or \ - Defaults.get_default_firmware(arch) - if firmware == 'bios' and not Defaults.is_x86_arch(arch): - iso_build_requested = False - if build_type == 'iso': - iso_build_requested = True - elif build_type == 'oem': - install_iso = self.xml_state.build_type.get_installiso() - install_stick = self.xml_state.build_type.get_installstick() - if install_iso or install_stick: - iso_build_requested = True - if iso_build_requested: - raise KiwiRuntimeError( - message.format(firmware, arch) - ) - def check_dracut_module_for_disk_oem_in_package_list(self) -> None: """ OEM images if configured to use dracut as initrd system diff --git a/kiwi/schema/kiwi.rnc b/kiwi/schema/kiwi.rnc index e251614ab2c..775711276fe 100644 --- a/kiwi/schema/kiwi.rnc +++ b/kiwi/schema/kiwi.rnc @@ -118,7 +118,6 @@ k.bootdelete.attribute = attribute bootdelete { xsd:boolean } k.displayname.attribute = ## A friendly display name. Used in the boot menu - ## for isolinux and grub attribute displayname { text } k.arch.attribute = ## A system architecture name, matching the 'uname -m' information @@ -1834,7 +1833,6 @@ div { ## if an extra boot partition is required this attribute ## specify which filesystem should be used for it. The ## type of the bootloader might overwrite this setting - ## e.g for the syslinux loader fat is required attribute bootfilesystem { "btrfs" | "ext2" | "ext3" | "ext4" | "xfs" | "fat32" | "fat16" } @@ -1958,8 +1956,7 @@ div { ] k.type.installboot.attribute = ## Specifies the bootloader default boot entry for the - ## initial boot of a kiwi install image. This value is - ## only evaluated for grub and ext|syslinux + ## initial boot of a kiwi install image. attribute installboot { "failsafe-install" | "harddisk" | "install" } @@ -2734,14 +2731,14 @@ div { ] k.bootloader.name.attribute = ## Specifies the bootloader used for booting the image. - ## At the moment grub2, systemd_boot(EFI only), isolinux, and the + ## At the moment grub2, systemd_boot(EFI only), and the ## combination of zipl plus userspace grub2(grub2_s390x_emu) are supported. ## The special custom entry allows to skip the bootloader ## configuration and installation and leaves this up to the ## user which can be done by using the editbootinstall and ## editbootconfig custom scripts attribute name { - "grub2" | "isolinux" | "grub2_s390x_emu" | "systemd_boot" | "custom" + "grub2" | "grub2_s390x_emu" | "systemd_boot" | "custom" } >> sch:pattern [ id = "loader_name" is-a = "bootloader_image_type" sch:param [ name = "attr" value = "name" ] @@ -2761,12 +2758,10 @@ div { ] k.bootloader.console.attribute = ## Specifies the bootloader console. - ## The value is available for grub and isolinux bootloader - ## types. attribute console { grub_console } >> sch:pattern [ id = "loader_console" is-a = "bootloader_name_type" sch:param [ name = "attr" value = "console" ] - sch:param [ name = "types" value = "grub2 isolinux grub2_s390x_emu" ] + sch:param [ name = "types" value = "grub2 grub2_s390x_emu" ] ] k.bootloader.serial_line.attribute = ## Specifies the bootloader serial line setup. The setup @@ -2785,7 +2780,7 @@ div { attribute timeout { xsd:nonNegativeInteger } >> sch:pattern [ id = "timeout" is-a = "bootloader_name_type" sch:param [ name = "attr" value = "timeout" ] - sch:param [ name = "types" value = "grub2 isolinux grub2_s390x_emu systemd_boot" ] + sch:param [ name = "types" value = "grub2 grub2_s390x_emu systemd_boot" ] ] k.bootloader.timeout_style.attribute = ## Specifies the boot timeout style to control the way in which diff --git a/kiwi/schema/kiwi.rng b/kiwi/schema/kiwi.rng index a9b9567ba90..4d20e5882b8 100644 --- a/kiwi/schema/kiwi.rng +++ b/kiwi/schema/kiwi.rng @@ -250,8 +250,7 @@ along with it too - A friendly display name. Used in the boot menu -for isolinux and grub + A friendly display name. Used in the boot menu @@ -2614,8 +2613,7 @@ This will overwrite kiwi's default layout if an extra boot partition is required this attribute specify which filesystem should be used for it. The -type of the bootloader might overwrite this setting -e.g for the syslinux loader fat is required +type of the bootloader might overwrite this setting btrfs ext2 @@ -2802,8 +2800,7 @@ that image type Specifies the bootloader default boot entry for the -initial boot of a kiwi install image. This value is -only evaluated for grub and ext|syslinux +initial boot of a kiwi install image. failsafe-install harddisk @@ -4098,7 +4095,7 @@ references file names in linux lib directories to keep. Specifies the bootloader used for booting the image. -At the moment grub2, systemd_boot(EFI only), isolinux, and the +At the moment grub2, systemd_boot(EFI only), and the combination of zipl plus userspace grub2(grub2_s390x_emu) are supported. The special custom entry allows to skip the bootloader configuration and installation and leaves this up to the @@ -4106,7 +4103,6 @@ user which can be done by using the editbootinstall and editbootconfig custom scripts grub2 - isolinux grub2_s390x_emu systemd_boot custom @@ -4133,14 +4129,12 @@ setting only affects the oem and iso image types. - Specifies the bootloader console. -The value is available for grub and isolinux bootloader -types. + Specifies the bootloader console. - + @@ -4164,7 +4158,7 @@ to 10sec - + diff --git a/kiwi/tasks/base.py b/kiwi/tasks/base.py index e36eeb62cd8..1d81cebfad2 100644 --- a/kiwi/tasks/base.py +++ b/kiwi/tasks/base.py @@ -87,9 +87,7 @@ def __init__(self, should_perform_task_setup: bool = True) -> None: 'check_dracut_module_for_disk_overlay_in_package_list': [], 'check_dracut_module_for_disk_oem_in_package_list': [], 'check_dracut_module_for_oem_install_in_package_list': [], - 'check_architecture_supports_iso_firmware_setup': [], 'check_appx_naming_conventions_valid': [], - 'check_syslinux_installed_if_isolinux_is_used': [], 'check_image_type_unique': [], 'check_include_references_unresolvable': [], 'check_luksformat_options_valid': [], diff --git a/package/python-kiwi-spec-template b/package/python-kiwi-spec-template index 7002af6c9f0..0ab96c5a176 100644 --- a/package/python-kiwi-spec-template +++ b/package/python-kiwi-spec-template @@ -186,9 +186,6 @@ Provides: kiwi-image:iso Requires: checkmedia %endif Requires: xorriso -%ifarch %{ix86} x86_64 -Requires: syslinux -%endif Requires: kiwi-systemdeps-core = %{version}-%{release} Requires: kiwi-systemdeps-filesystems = %{version}-%{release} Requires: kiwi-systemdeps-bootloaders = %{version}-%{release} diff --git a/test/unit/bootloader/config/base_test.py b/test/unit/bootloader/config/base_test.py index 35f4db4f620..928e471fd85 100644 --- a/test/unit/bootloader/config/base_test.py +++ b/test/unit/bootloader/config/base_test.py @@ -198,16 +198,10 @@ def test_get_boot_cmdline_initrd_system_is_dracut_with_overlay( def test_get_install_image_boot_default(self, mock_installboot): mock_installboot.return_value = None assert self.bootloader.get_install_image_boot_default() == '0' - assert self.bootloader.get_install_image_boot_default('isolinux') == \ - 'Boot_from_Hard_Disk' mock_installboot.return_value = 'failsafe-install' assert self.bootloader.get_install_image_boot_default() == '2' - assert self.bootloader.get_install_image_boot_default('isolinux') == \ - 'Failsafe_--_Install_Bob' mock_installboot.return_value = 'install' assert self.bootloader.get_install_image_boot_default() == '1' - assert self.bootloader.get_install_image_boot_default('isolinux') == \ - 'Install_Bob' @patch('kiwi.xml_parse.type_.get_installboot') @patch('kiwi.xml_parse.type_.get_installprovidefailsafe') @@ -318,13 +312,11 @@ def test_get_menu_entry_install_title(self, mock_displayname): @patch('kiwi.xml_parse.type_.get_vga') def test_get_gfxmode_default(self, mock_get_vga): mock_get_vga.return_value = None - assert self.bootloader.get_gfxmode('isolinux') == '800 600' assert self.bootloader.get_gfxmode('grub2') == 'auto' @patch('kiwi.xml_parse.type_.get_vga') def test_get_gfxmode(self, mock_get_vga): mock_get_vga.return_value = '0x318' - assert self.bootloader.get_gfxmode('isolinux') == '1024 768' assert self.bootloader.get_gfxmode('grub2') == '1024x768' @patch('kiwi.xml_parse.type_.get_vga') diff --git a/test/unit/bootloader/config/init_test.py b/test/unit/bootloader/config/init_test.py index fc6ea27c784..630fabb3232 100644 --- a/test/unit/bootloader/config/init_test.py +++ b/test/unit/bootloader/config/init_test.py @@ -17,11 +17,3 @@ def test_bootloader_config_grub2(self, mock_grub2): xml_state = Mock() BootLoaderConfig.new('grub2', xml_state, 'root_dir') mock_grub2.assert_called_once_with(xml_state, 'root_dir', None, None) - - @patch('kiwi.bootloader.config.isolinux.BootLoaderConfigIsoLinux') - def test_bootloader_config_isolinux(self, mock_isolinux): - xml_state = Mock() - BootLoaderConfig.new('isolinux', xml_state, 'root_dir', 'boot_dir') - mock_isolinux.assert_called_once_with( - xml_state, 'root_dir', 'boot_dir', None - ) diff --git a/test/unit/bootloader/config/isolinux_test.py b/test/unit/bootloader/config/isolinux_test.py deleted file mode 100644 index 570f86876ee..00000000000 --- a/test/unit/bootloader/config/isolinux_test.py +++ /dev/null @@ -1,215 +0,0 @@ -import kiwi -import mock -from mock import ( - patch, call, mock_open -) -from pytest import ( - raises, fixture -) -from kiwi.defaults import Defaults -from kiwi.bootloader.config.isolinux import BootLoaderConfigIsoLinux - -from kiwi.exceptions import KiwiTemplateError - - -class TestBootLoaderConfigIsoLinux: - @fixture(autouse=True) - def inject_fixtures(self, caplog): - self._caplog = caplog - - @patch('os.path.exists') - def setup(self, mock_exists): - Defaults.set_platform_name('x86_64') - mock_exists.return_value = True - self.state = mock.Mock() - self.state.get_build_type_bootloader_console = mock.Mock( - return_value=['', ''] - ) - self.state.build_type.get_mediacheck = mock.Mock( - return_value=None - ) - self.state.build_type.get_volid = mock.Mock( - return_value=None - ) - self.state.build_type.get_flags = mock.Mock( - return_value=None - ) - self.state.build_type.get_hybridpersistent = mock.Mock( - return_value=True - ) - self.state.build_type.get_hybridpersistent_filesystem = mock.Mock( - return_value=None - ) - self.state.get_build_type_bootloader_timeout = mock.Mock( - return_value=None - ) - self.state.build_type.get_install_continue_on_timeout = mock.Mock( - return_value=None - ) - self.state.get_initrd_system = mock.Mock( - return_value='dracut' - ) - self.state.build_type.get_kernelcmdline = mock.Mock( - return_value='splash' - ) - self.state.build_type.get_firmware = mock.Mock( - return_value='efi' - ) - self.state.build_type.get_initrd_system = mock.Mock( - return_value=None - ) - self.state.build_type.build_type.get_installboot = mock.Mock( - return_value=None - ) - self.state.xml_data.get_displayname = mock.Mock( - return_value='Bob' - ) - self.state.xml_data.get_name = mock.Mock( - return_value='LimeJeOS-openSUSE-13.2' - ) - self.state.build_type.get_image = mock.Mock( - return_value='oem' - ) - preferences = mock.Mock() - preferences.get_bootloader_theme = mock.Mock( - return_value=['openSUSE'] - ) - self.state.get_preferences_sections = mock.Mock( - return_value=[preferences] - ) - self.state.is_xen_server = mock.Mock( - return_value=False - ) - self.state.is_xen_guest = mock.Mock( - return_value=False - ) - kiwi.bootloader.config.isolinux.Path = mock.Mock() - kiwi.bootloader.config.base.Path = mock.Mock() - self.isolinux = mock.Mock() - kiwi.bootloader.config.isolinux.BootLoaderTemplateIsoLinux = mock.Mock( - return_value=self.isolinux - ) - self.bootloader = BootLoaderConfigIsoLinux( - self.state, 'root_dir' - ) - - @patch('os.path.exists') - def setup_method(self, cls, mock_exists): - self.setup() - - def test_post_init_ix86_platform(self): - Defaults.set_platform_name('i686') - bootloader = BootLoaderConfigIsoLinux(self.state, 'root_dir') - assert bootloader.arch == 'ix86' - - @patch('os.path.exists') - def test_post_init_dom0(self, mock_exists): - Defaults.set_platform_name('x86_64') - self.state.is_xen_server = mock.Mock( - return_value=True - ) - mock_exists.return_value = True - self.bootloader.post_init(None) - assert self.bootloader.multiboot is True - - @patch('os.path.exists') - def test_write(self, mock_exists): - mock_exists.return_value = True - self.bootloader.config = 'some-data' - self.bootloader.config_message = 'some-message-data' - - m_open = mock_open() - with patch('builtins.open', m_open, create=True): - self.bootloader.write() - - assert m_open.call_args_list == [ - call('root_dir/boot/x86_64/loader/isolinux.cfg', 'w'), - call('root_dir/boot/x86_64/loader/isolinux.msg', 'w') - ] - assert m_open.return_value.write.call_args_list == [ - call('some-data'), - call('some-message-data') - ] - - def test_setup_install_image_config(self): - template_cfg = mock.Mock() - template_msg = mock.Mock() - self.isolinux.get_install_template.return_value = template_cfg - self.isolinux.get_install_message_template.return_value = template_msg - - self.bootloader.setup_install_image_config(mbrid=None) - self.isolinux.get_install_template.assert_called_once_with( - True, False, '', True - ) - self.isolinux.get_install_message_template.assert_called_once_with() - assert template_cfg.substitute.called - assert template_msg.substitute.called - - def test_setup_install_image_config_multiboot(self): - self.bootloader.multiboot = True - - self.bootloader.setup_install_image_config(mbrid=None) - self.isolinux.get_multiboot_install_template.assert_called_once_with( - True, False, '', True - ) - - @patch('os.path.exists') - def test_setup_install_image_config_with_theme(self, mock_exists): - mock_exists.return_value = True - - self.bootloader.setup_install_image_config(mbrid=None) - self.isolinux.get_install_template.assert_called_once_with( - True, True, '', True - ) - - def test_setup_install_image_config_invalid_template(self): - self.isolinux.get_install_message_template.side_effect = Exception - with raises(KiwiTemplateError): - self.bootloader.setup_install_image_config(mbrid=None) - - def test_setup_install_boot_images(self): - assert self.bootloader.setup_install_boot_images(mbrid=None) is None - - def test_setup_live_boot_images(self): - assert self.bootloader.setup_live_boot_images(mbrid=None) is None - - def test_setup_live_image_config_invalid_template(self): - self.isolinux.get_message_template.side_effect = Exception - with raises(KiwiTemplateError): - self.bootloader.setup_live_image_config(mbrid=None) - - def test_setup_live_image_config(self): - template_parameters = { - 'initrd_file': 'initrd', - 'default_boot': 'Bob', - 'title': 'Bob', - 'gfxmode': '800 600', - 'boot_options': 'splash root=live:CDLABEL=CDROM' - ' rd.live.image rd.live.overlay.persistent', - 'boot_timeout': 100, - 'failsafe_boot_options': 'splash ide=nodma apm=off' - ' noresume edd=off nomodeset 3' - ' root=live:CDLABEL=CDROM rd.live.image' - ' rd.live.overlay.persistent', - 'kernel_file': 'linux' - } - template_cfg = mock.Mock() - template_msg = mock.Mock() - self.isolinux.get_template.return_value = template_cfg - self.isolinux.get_message_template.return_value = template_msg - - self.bootloader.setup_live_image_config(mbrid=None) - self.isolinux.get_template.assert_called_once_with( - True, False, '', None - ) - self.isolinux.get_message_template.assert_called_once_with() - template_cfg.substitute.assert_called_once_with(template_parameters) - template_msg.substitute.assert_called_once_with(template_parameters) - - def test_setup_live_image_config_multiboot(self): - self.bootloader.multiboot = True - - self.bootloader.setup_live_image_config(mbrid=None) - self.isolinux.get_multiboot_template.assert_called_once_with( - True, False, '', None - ) diff --git a/test/unit/bootloader/template/isolinux_test.py b/test/unit/bootloader/template/isolinux_test.py deleted file mode 100644 index 32076d0995e..00000000000 --- a/test/unit/bootloader/template/isolinux_test.py +++ /dev/null @@ -1,220 +0,0 @@ -from kiwi.bootloader.template.isolinux import BootLoaderTemplateIsoLinux - - -class TestBootLoaderTemplateIsoLinux: - def setup(self): - self.isolinux = BootLoaderTemplateIsoLinux() - - def setup_method(self, cls): - self.setup() - - def test_get_template(self): - assert self.isolinux.get_template().substitute( - default_boot='LimeJeOS-SLE12-Community', - kernel_file='boot/linux.vmx', - initrd_file='boot/initrd.vmx', - boot_options='cdinst=1 splash', - failsafe_boot_options='cdinst=1 splash', - gfxmode='800x600', - theme='SLE', - boot_timeout='10', - title='LimeJeOS-SLE12-Community', - bootpath='/boot' - ) - - def test_get_template_plain_ui(self): - assert self.isolinux.get_template(with_theme=False).substitute( - default_boot='LimeJeOS-SLE12-Community', - kernel_file='boot/linux.vmx', - initrd_file='boot/initrd.vmx', - boot_options='cdinst=1 splash', - failsafe_boot_options='cdinst=1 splash', - boot_timeout='10', - title='LimeJeOS-SLE12-Community', - bootpath='/boot' - ) - - def test_get_template_serial(self): - assert self.isolinux.get_template(terminal='serial').substitute( - default_boot='LimeJeOS-SLE12-Community', - kernel_file='boot/linux.vmx', - initrd_file='boot/initrd.vmx', - boot_options='cdinst=1 splash', - failsafe_boot_options='cdinst=1 splash', - boot_timeout='10', - title='LimeJeOS-SLE12-Community', - bootpath='/boot' - ) - - def test_get_template_checkiso(self): - assert self.isolinux.get_template(checkiso=True).substitute( - default_boot='LimeJeOS-SLE12-Community', - kernel_file='boot/linux.vmx', - initrd_file='boot/initrd.vmx', - boot_options='cdinst=1 splash', - failsafe_boot_options='cdinst=1 splash', - gfxmode='800x600', - theme='SLE', - boot_timeout='10', - title='LimeJeOS-SLE12-Community', - bootpath='/boot' - ) - - def test_get_multiboot_template(self): - assert self.isolinux.get_multiboot_template().substitute( - default_boot='LimeJeOS-SLE12-Community', - kernel_file='linux.vmx', - initrd_file='initrd.vmx', - boot_options='splash', - failsafe_boot_options='splash', - gfxmode='800x600', - theme='SLE', - boot_timeout='10', - title='LimeJeOS-SLE12-Community', - bootpath='/boot', - hypervisor='xen.gz' - ) - - def test_get_multiboot_template_plain_ui(self): - assert self.isolinux.get_multiboot_template( - with_theme=False - ).substitute( - default_boot='LimeJeOS-SLE12-Community', - kernel_file='linux.vmx', - initrd_file='initrd.vmx', - boot_options='splash', - failsafe_boot_options='splash', - boot_timeout='10', - title='LimeJeOS-SLE12-Community', - bootpath='/boot', - hypervisor='xen.gz' - ) - - def test_get_multiboot_template_serial(self): - assert self.isolinux.get_multiboot_template( - terminal='serial' - ).substitute( - default_boot='LimeJeOS-SLE12-Community', - kernel_file='linux.vmx', - initrd_file='initrd.vmx', - boot_options='splash', - failsafe_boot_options='splash', - boot_timeout='10', - title='LimeJeOS-SLE12-Community', - bootpath='/boot', - hypervisor='xen.gz' - ) - - def test_get_multiboot_template_checkiso(self): - assert self.isolinux.get_multiboot_template(checkiso=True).substitute( - default_boot='LimeJeOS-SLE12-Community', - kernel_file='linux.vmx', - initrd_file='initrd.vmx', - boot_options='splash', - failsafe_boot_options='splash', - gfxmode='800x600', - theme='SLE', - boot_timeout='10', - title='LimeJeOS-SLE12-Community', - bootpath='/boot', - hypervisor='xen.gz' - ) - - def test_get_multiboot_install_template(self): - assert self.isolinux.get_multiboot_install_template().substitute( - default_boot='0', - kernel_file='linux.vmx', - initrd_file='initrd.vmx', - boot_options='splash', - failsafe_boot_options='splash', - gfxmode='800x600', - theme='SLE', - boot_timeout='10', - title='LimeJeOS-SLE12-Community [ VMX ]', - bootpath='/boot', - hypervisor='xen.gz' - ) - - def test_get_install_template(self): - assert self.isolinux.get_install_template().substitute( - default_boot='0', - kernel_file='boot/linux.vmx', - initrd_file='boot/initrd.vmx', - boot_options='cdinst=1 splash', - failsafe_boot_options='cdinst=1 splash', - gfxmode='800x600', - theme='SLE', - boot_timeout='10', - title='LimeJeOS-SLE12-Community [ VMX ]', - bootpath='/boot' - ) - - def test_get_multiboot_install_template_plain_ui(self): - assert self.isolinux.get_multiboot_install_template( - with_theme=False - ).substitute( - default_boot='0', - kernel_file='linux.vmx', - initrd_file='initrd.vmx', - boot_options='splash', - failsafe_boot_options='splash', - boot_timeout='10', - title='LimeJeOS-SLE12-Community [ VMX ]', - bootpath='/boot', - hypervisor='xen.gz' - ) - - def test_get_multiboot_install_template_serial(self): - assert self.isolinux.get_multiboot_install_template( - terminal='serial' - ).substitute( - default_boot='0', - kernel_file='linux.vmx', - initrd_file='initrd.vmx', - boot_options='splash', - failsafe_boot_options='splash', - boot_timeout='10', - title='LimeJeOS-SLE12-Community [ VMX ]', - bootpath='/boot', - hypervisor='xen.gz' - ) - - def test_get_install_template_plan_ui(self): - assert self.isolinux.get_install_template(with_theme=False).substitute( - default_boot='0', - kernel_file='boot/linux.vmx', - initrd_file='boot/initrd.vmx', - boot_options='cdinst=1 splash', - failsafe_boot_options='cdinst=1 splash', - gfxmode='800x600', - theme='SLE', - boot_timeout='10', - title='LimeJeOS-SLE12-Community [ VMX ]', - bootpath='/boot' - ) - - def test_get_install_template_serial(self): - assert self.isolinux.get_install_template( - terminal='serial' - ).substitute( - default_boot='0', - kernel_file='boot/linux.vmx', - initrd_file='boot/initrd.vmx', - boot_options='cdinst=1 splash', - failsafe_boot_options='cdinst=1 splash', - gfxmode='800x600', - theme='SLE', - boot_timeout='10', - title='LimeJeOS-SLE12-Community [ VMX ]', - bootpath='/boot' - ) - - def test_get_message_template(self): - assert self.isolinux.get_message_template().substitute( - title='LimeJeOS-SLE12-Community [ VMX ]' - ) - - def test_get_install_message_template(self): - assert self.isolinux.get_install_message_template().substitute( - title='LimeJeOS-SLE12-Community [ VMX ]' - ) diff --git a/test/unit/builder/install_test.py b/test/unit/builder/install_test.py index 801b64eeb24..018a276bc1b 100644 --- a/test/unit/builder/install_test.py +++ b/test/unit/builder/install_test.py @@ -123,9 +123,8 @@ def test_setup_ix86(self): @patch('kiwi.builder.install.Temporary') @patch('kiwi.builder.install.Command.run') @patch('kiwi.builder.install.Defaults.get_grub_boot_directory_name') - @patch('kiwi.builder.install.Iso') def test_create_install_iso( - self, mock_Iso, mock_grub_dir, mock_command, mock_Temporary, mock_copy, + self, mock_grub_dir, mock_command, mock_Temporary, mock_copy, mock_setup_media_loader_directory, mock_BootLoaderConfig, mock_DeviceProvider, mock_FileSystemSquashFs, mock_FileSystemIsoFs ): @@ -259,21 +258,6 @@ def side_effect(prefix, path): call('IMAGE="result-image.raw"\n') ] - mock_BootLoaderConfig.reset_mock() - tmp_names = [temp_esp_file, temp_squashfs, temp_media_dir] - self.firmware.efi_mode.return_value = None - self.firmware.bios_mode.return_value = True - - with patch('builtins.open', m_open, create=True): - self.install_image.create_install_iso() - - mock_Iso.return_value.setup_isolinux_boot_path.assert_called_once_with() - mock_BootLoaderConfig.assert_called_once_with( - 'isolinux', self.xml_state, root_dir='root_dir', - boot_dir='temp_media_dir' - ) - bootloader_config._create_embedded_fat_efi_image.assert_not_called() - @patch('kiwi.builder.disk.BootLoaderConfig.new') @patch('kiwi.builder.install.IsoToolsBase.setup_media_loader_directory') @patch('kiwi.builder.install.Temporary') diff --git a/test/unit/builder/live_test.py b/test/unit/builder/live_test.py index 43a0b4660c0..bd5e83fd8cb 100644 --- a/test/unit/builder/live_test.py +++ b/test/unit/builder/live_test.py @@ -368,17 +368,6 @@ def side_effect(): 'target_dir' ) - self.firmware.efi_mode.return_value = None - self.firmware.bios_mode.return_value = True - tmpdir_name = [temp_squashfs, temp_media_dir] - kiwi.builder.live.BootLoaderConfig.new.reset_mock() - self.live_image.create() - mock_Iso.return_value.setup_isolinux_boot_path.assert_called_once_with() - kiwi.builder.live.BootLoaderConfig.new.assert_called_once_with( - 'isolinux', self.xml_state, root_dir='root_dir', - boot_dir='temp_media_dir' - ) - @patch('kiwi.builder.disk.BootLoaderConfig.new') @patch('kiwi.builder.live.IsoToolsBase.setup_media_loader_directory') @patch('kiwi.builder.live.Temporary') diff --git a/test/unit/iso_tools/base_test.py b/test/unit/iso_tools/base_test.py index 10aabe98296..f81a2452cc6 100644 --- a/test/unit/iso_tools/base_test.py +++ b/test/unit/iso_tools/base_test.py @@ -61,150 +61,6 @@ def test_setup_media_loader_directory( call( 'root_dir/usr/share/grub2/i386-pc/boot_hybrid.img', 'root_dir/image/loader/' - ), - call( - 'root_dir/usr/share/syslinux/isolinux.bin', - 'root_dir/image/loader/' - ), - call( - 'root_dir/usr/lib/syslinux/bios/isolinux.bin', - 'root_dir/image/loader/' - ), - call( - 'root_dir/usr/lib/syslinux/modules/bios/isolinux.bin', - 'root_dir/image/loader/' - ), - call( - 'root_dir/usr/lib/ISOLINUX/isolinux.bin', - 'root_dir/image/loader/' - ), - call( - 'root_dir/usr/share/syslinux/ldlinux.c32', - 'root_dir/image/loader/' - ), - call( - 'root_dir/usr/lib/syslinux/bios/ldlinux.c32', - 'root_dir/image/loader/' - ), - call( - 'root_dir/usr/lib/syslinux/modules/bios/ldlinux.c32', - 'root_dir/image/loader/' - ), - call( - 'root_dir/usr/lib/ISOLINUX/ldlinux.c32', - 'root_dir/image/loader/' - ), - call( - 'root_dir/usr/share/syslinux/libcom32.c32', - 'root_dir/image/loader/' - ), - call( - 'root_dir/usr/lib/syslinux/bios/libcom32.c32', - 'root_dir/image/loader/' - ), - call( - 'root_dir/usr/lib/syslinux/modules/bios/libcom32.c32', - 'root_dir/image/loader/' - ), - call( - 'root_dir/usr/lib/ISOLINUX/libcom32.c32', - 'root_dir/image/loader/' - ), - call( - 'root_dir/usr/share/syslinux/libutil.c32', - 'root_dir/image/loader/' - ), - call( - 'root_dir/usr/lib/syslinux/bios/libutil.c32', - 'root_dir/image/loader/' - ), - call( - 'root_dir/usr/lib/syslinux/modules/bios/libutil.c32', - 'root_dir/image/loader/' - ), - call( - 'root_dir/usr/lib/ISOLINUX/libutil.c32', - 'root_dir/image/loader/' - ), - call( - 'root_dir/usr/share/syslinux/gfxboot.c32', - 'root_dir/image/loader/' - ), - call( - 'root_dir/usr/lib/syslinux/bios/gfxboot.c32', - 'root_dir/image/loader/' - ), - call( - 'root_dir/usr/lib/syslinux/modules/bios/gfxboot.c32', - 'root_dir/image/loader/' - ), - call( - 'root_dir/usr/lib/ISOLINUX/gfxboot.c32', - 'root_dir/image/loader/' - ), - call( - 'root_dir/usr/share/syslinux/gfxboot.com', - 'root_dir/image/loader/' - ), - call( - 'root_dir/usr/lib/syslinux/bios/gfxboot.com', - 'root_dir/image/loader/' - ), - call( - 'root_dir/usr/lib/syslinux/modules/bios/gfxboot.com', - 'root_dir/image/loader/' - ), - call( - 'root_dir/usr/lib/ISOLINUX/gfxboot.com', - 'root_dir/image/loader/' - ), - call( - 'root_dir/usr/share/syslinux/menu.c32', - 'root_dir/image/loader/' - ), - call( - 'root_dir/usr/lib/syslinux/bios/menu.c32', - 'root_dir/image/loader/' - ), - call( - 'root_dir/usr/lib/syslinux/modules/bios/menu.c32', - 'root_dir/image/loader/' - ), - call( - 'root_dir/usr/lib/ISOLINUX/menu.c32', - 'root_dir/image/loader/' - ), - call( - 'root_dir/usr/share/syslinux/chain.c32', - 'root_dir/image/loader/' - ), - call( - 'root_dir/usr/lib/syslinux/bios/chain.c32', - 'root_dir/image/loader/' - ), - call( - 'root_dir/usr/lib/syslinux/modules/bios/chain.c32', - 'root_dir/image/loader/' - ), - call( - 'root_dir/usr/lib/ISOLINUX/chain.c32', - 'root_dir/image/loader/' - ), - call( - 'root_dir/usr/share/syslinux/mboot.c32', - 'root_dir/image/loader/' - ), - call( - 'root_dir/usr/lib/syslinux/bios/mboot.c32', - 'root_dir/image/loader/' - ), - call( - 'root_dir/usr/lib/syslinux/modules/bios/mboot.c32', - 'root_dir/image/loader/' - ), - call( - 'root_dir/usr/lib/ISOLINUX/mboot.c32', - 'root_dir/image/loader/' ) ] assert mock_command.call_args_list == [ diff --git a/test/unit/iso_tools/iso_test.py b/test/unit/iso_tools/iso_test.py index c2a936485d7..eeda7fcc7e0 100644 --- a/test/unit/iso_tools/iso_test.py +++ b/test/unit/iso_tools/iso_test.py @@ -1,13 +1,8 @@ -from mock import ( - call, patch -) -from pytest import raises +from mock import patch from kiwi.defaults import Defaults from kiwi.iso_tools.iso import Iso -from kiwi.exceptions import KiwiIsoLoaderError - class TestIso: def setup(self): @@ -17,45 +12,6 @@ def setup(self): def setup_method(self, cls): self.setup() - @patch('os.path.exists') - def test_setup_isolinux_boot_path_raises(self, mock_exists): - mock_exists.return_value = False - with raises(KiwiIsoLoaderError): - self.iso.setup_isolinux_boot_path() - - @patch('os.path.exists') - @patch('kiwi.iso_tools.iso.Command.run') - def test_setup_isolinux_boot_path(self, mock_command, mock_exists): - mock_exists.return_value = True - self.iso.setup_isolinux_boot_path() - mock_command.assert_called_once_with( - [ - 'isolinux-config', '--base', 'boot/x86_64/loader', - 'source-dir/boot/x86_64/loader/isolinux.bin' - ] - ) - - @patch('kiwi.iso_tools.iso.Command.run') - @patch('os.path.exists') - def test_setup_isolinux_boot_path_failed_isolinux_config( - self, mock_exists, mock_command - ): - mock_exists.return_value = True - command_raises = [False, True] - - def side_effect(arg): - if command_raises.pop(): - raise Exception - - mock_command.side_effect = side_effect - self.iso.setup_isolinux_boot_path() - assert mock_command.call_args_list[1] == call( - [ - 'cp', '-a', '-l', - 'source-dir/boot/x86_64/loader/', 'source-dir/isolinux/' - ] - ) - @patch('kiwi.iso_tools.iso.Command.run') def test_set_media_tag(self, mock_command): Iso.set_media_tag('foo') diff --git a/test/unit/iso_tools/xorriso_test.py b/test/unit/iso_tools/xorriso_test.py index 741f2a7c008..9c55d448e50 100644 --- a/test/unit/iso_tools/xorriso_test.py +++ b/test/unit/iso_tools/xorriso_test.py @@ -1,13 +1,20 @@ +import logging from mock import patch -from pytest import raises +from pytest import ( + raises, fixture +) from kiwi.defaults import Defaults from kiwi.iso_tools.xorriso import IsoToolsXorrIso -from kiwi.exceptions import KiwiFileNotFound, KiwiIsoToolError +from kiwi.exceptions import KiwiIsoToolError class TestIsoToolsXorrIso: + @fixture(autouse=True) + def inject_fixtures(self, caplog): + self._caplog = caplog + def setup(self): Defaults.set_platform_name('x86_64') self.iso_tool = IsoToolsXorrIso('source-dir') @@ -26,60 +33,22 @@ def test_get_tool_name_raises(self, mock_exists): with raises(KiwiIsoToolError): self.iso_tool.get_tool_name() - @patch('kiwi.iso_tools.xorriso.Path.which') - def test_init_iso_creation_parameters_isolinux_fail_on_isohdpfx_not_found(self, mock_which): - mock_which.return_value = None - with raises(KiwiFileNotFound): + @patch('os.path.exists') + def test_init_iso_creation_parameters_no_hybrid_mbr( + self, mock_os_path_exists + ): + mock_os_path_exists.return_value = False + with self._caplog.at_level(logging.WARNING): self.iso_tool.init_iso_creation_parameters( { 'mbr_id': 'app_id', 'publisher': 'org', 'preparer': 'preparer', - 'volume_id': 'vol_id' + 'volume_id': 'vol_id', + 'efi_mode': 'uefi' } ) - - @patch('kiwi.iso_tools.xorriso.Path.which') - def test_init_iso_creation_parameters_isolinux(self, mock_which): - mock_which.return_value = '/usr/share/syslinux/isohdpfx.bin' - self.iso_tool.init_iso_creation_parameters( - { - 'mbr_id': 'app_id', - 'publisher': 'org', - 'preparer': 'preparer', - 'volume_id': 'vol_id' - } - ) - mock_which.assert_called_once_with( - 'isohdpfx.bin', [ - '/usr/share/syslinux', - '/usr/lib/syslinux/bios', - '/usr/lib/syslinux/modules/bios', - '/usr/lib/ISOLINUX' - ] - ) - assert self.iso_tool.iso_parameters == [ - '-application_id', 'app_id', - '-publisher', 'org', - '-preparer_id', 'preparer', - '-volid', 'vol_id', - '-joliet', 'on', - '-padding', '0' - ] - assert self.iso_tool.iso_loaders == [ - '-boot_image', 'isolinux', - 'bin_path=boot/x86_64/loader/isolinux.bin', - '-boot_image', 'isolinux', - 'system_area=/usr/share/syslinux/isohdpfx.bin', - '-boot_image', 'isolinux', 'partition_table=on', - '-boot_image', 'any', 'partition_offset=16', - '-boot_image', 'any', 'cat_path=boot/x86_64/boot.catalog', - '-boot_image', 'any', 'cat_hidden=on', - '-boot_image', 'any', 'boot_info_table=on', - '-boot_image', 'any', 'platform_id=0x00', - '-boot_image', 'any', 'emul_type=no_emulation', - '-boot_image', 'any', 'load_size=2048' - ] + assert 'No hybrid MBR file found' in self._caplog.text @patch('os.path.exists') def test_init_iso_creation_parameters_efi(self, mock_os_path_exists): @@ -105,7 +74,7 @@ def test_init_iso_creation_parameters_efi(self, mock_os_path_exists): '-boot_image', 'grub', 'bin_path=boot/x86_64/loader/eltorito.img', '-boot_image', 'grub', - 'grub2_mbr=source-dir/boot/x86_64//loader/boot_hybrid.img', + 'grub2_mbr=source-dir/boot/x86_64/loader/boot_hybrid.img', '-boot_image', 'grub', 'grub2_boot_info=on', '-boot_image', 'any', 'partition_offset=16', '-boot_image', 'any', 'cat_path=boot/x86_64/boot.catalog', diff --git a/test/unit/runtime_checker_test.py b/test/unit/runtime_checker_test.py index c592e9e1f21..547c667f364 100644 --- a/test/unit/runtime_checker_test.py +++ b/test/unit/runtime_checker_test.py @@ -410,40 +410,6 @@ def test_check_preferences_data_no_version(self): with raises(KiwiRuntimeError): runtime_checker.check_image_version_provided() - def test_check_architecture_supports_iso_firmware_setup(self): - Defaults.set_platform_name('aarch64') - xml_state = XMLState( - self.description.load(), ['vmxFlavour'], 'iso' - ) - runtime_checker = RuntimeChecker(xml_state) - with raises(KiwiRuntimeError): - runtime_checker.check_architecture_supports_iso_firmware_setup() - xml_state = XMLState( - self.description.load(), ['xenDom0Flavour'], 'oem' - ) - runtime_checker = RuntimeChecker(xml_state) - with raises(KiwiRuntimeError): - runtime_checker.check_architecture_supports_iso_firmware_setup() - - @patch('kiwi.runtime_checker.Path.which') - def test_check_syslinux_installed_if_isolinux_is_used( - self, mock_Path_which - ): - Defaults.set_platform_name('x86_64') - mock_Path_which.return_value = None - xml_state = XMLState( - self.description.load(), ['vmxFlavour'], 'iso' - ) - runtime_checker = RuntimeChecker(xml_state) - with raises(KiwiRuntimeError): - runtime_checker.check_syslinux_installed_if_isolinux_is_used() - xml_state = XMLState( - self.description.load(), ['xenDom0Flavour'], 'oem' - ) - runtime_checker = RuntimeChecker(xml_state) - with raises(KiwiRuntimeError): - runtime_checker.check_syslinux_installed_if_isolinux_is_used() - def test_check_image_type_unique(self): description = XMLDescription( '../data/example_runtime_checker_conflicting_types.xml' diff --git a/test/unit/tasks/system_build_test.py b/test/unit/tasks/system_build_test.py index 35281c01ecd..4720b1c5e9a 100644 --- a/test/unit/tasks/system_build_test.py +++ b/test/unit/tasks/system_build_test.py @@ -159,9 +159,6 @@ def test_process_system_build(self, mock_keys, mock_log): self.runtime_checker.\ check_efi_mode_for_disk_overlay_correctly_setup.\ assert_called_once_with() - self.runtime_checker.\ - check_architecture_supports_iso_firmware_setup.\ - assert_called_once_with() self.system_prepare.setup_repositories.assert_called_once_with( False, ['some_key', 'some_other_key'], None ) diff --git a/test/unit/tasks/system_prepare_test.py b/test/unit/tasks/system_prepare_test.py index af8cba98071..90d410698da 100644 --- a/test/unit/tasks/system_prepare_test.py +++ b/test/unit/tasks/system_prepare_test.py @@ -145,9 +145,6 @@ def test_process_system_prepare(self, mock_keys): self.runtime_checker.\ check_efi_mode_for_disk_overlay_correctly_setup.\ assert_called_once_with() - self.runtime_checker.\ - check_architecture_supports_iso_firmware_setup.\ - assert_called_once_with() self.system_prepare.setup_repositories.assert_called_once_with( True, ['some_key', 'some_other_key'], None ) From 379ccf2a820c4751f9e3c5264c497b2e5e03f7cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20Sch=C3=A4fer?= Date: Fri, 26 Jan 2024 15:19:26 +0100 Subject: [PATCH 3/3] Update documentation drop documentation for isolinux in API and user docs --- doc/source/api/kiwi.bootloader.config.rst | 8 -------- doc/source/api/kiwi.bootloader.template.rst | 8 -------- doc/source/concept_and_workflow/systemdeps.rst | 10 ---------- doc/source/image_description/elements.rst | 9 +++------ 4 files changed, 3 insertions(+), 32 deletions(-) diff --git a/doc/source/api/kiwi.bootloader.config.rst b/doc/source/api/kiwi.bootloader.config.rst index 49704667358..3aa4909f563 100644 --- a/doc/source/api/kiwi.bootloader.config.rst +++ b/doc/source/api/kiwi.bootloader.config.rst @@ -22,14 +22,6 @@ Submodules :undoc-members: :show-inheritance: -`kiwi.bootloader.config.isolinux` Module ----------------------------------------- - -.. automodule:: kiwi.bootloader.config.isolinux - :members: - :undoc-members: - :show-inheritance: - .. _db_kiwi_bootloader_config_contents: Module Contents diff --git a/doc/source/api/kiwi.bootloader.template.rst b/doc/source/api/kiwi.bootloader.template.rst index 067142b787f..f9993b034f9 100644 --- a/doc/source/api/kiwi.bootloader.template.rst +++ b/doc/source/api/kiwi.bootloader.template.rst @@ -14,14 +14,6 @@ Submodules :undoc-members: :show-inheritance: -`kiwi.bootloader.template.isolinux` Module ------------------------------------------- - -.. automodule:: kiwi.bootloader.template.isolinux - :members: - :undoc-members: - :show-inheritance: - .. _db_kiwi_bootloader_template_content: Module Contents diff --git a/doc/source/concept_and_workflow/systemdeps.rst b/doc/source/concept_and_workflow/systemdeps.rst index 98cfc8bb7db..fb9bfa8cb4b 100644 --- a/doc/source/concept_and_workflow/systemdeps.rst +++ b/doc/source/concept_and_workflow/systemdeps.rst @@ -50,16 +50,6 @@ systemdeps packages: through some BIOS or firmware. * Depends on the `-core` kiwi-systemdeps packages. - .. note:: - - The `iso` type is an exception which might not require the - `-bootloaders` systemdeps. In case of the `firmware` attribute - to be set to `bios`, {kiwi} builds bootable ISO images still - based on isolinux which is provided with the `-iso-media` - systemdeps. However, by default, any {kiwi} created ISO image - is BIOS and EFI capable and based on the grub bootloader which - causes a requirement to the `-bootloaders` systemdeps. - `kiwi-systemdeps-filesystems`: * Supports building `fs-type`, `oem`, `pxe`, `kis` and live `iso` image types. diff --git a/doc/source/image_description/elements.rst b/doc/source/image_description/elements.rst index 9ffc25f0b28..7cb40ef3aab 100644 --- a/doc/source/image_description/elements.rst +++ b/doc/source/image_description/elements.rst @@ -975,7 +975,7 @@ the `dm_integrity` feature: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The `bootloader` element is used to select the bootloader. At the moment, -`grub2`, `systemd_boot`, `isolinux` and the combination of zipl +`grub2`, `systemd_boot` and the combination of zipl plus userspace grub2 `grub2_s390x_emu` are supported. The special `custom` entry allows to skip the bootloader configuration and installation and leaves this up to the user, which can be done by using @@ -992,7 +992,7 @@ the `editbootinstall` and `editbootconfig` custom scripts. selected bootloader the image build process will fail with an exception message. -name="grub2|systemd_boot|isolinux|grub2_s390x_emu": +name="grub2|systemd_boot|grub2_s390x_emu": Specifies the bootloader to use for this image. .. note:: systemd_boot ESP size @@ -1019,12 +1019,9 @@ attributes are supported: console="none|console|gfxterm|serial": Specifies the bootloader console. The attribute is available for the - `grub` and `isolinux` bootloader types. The behavior for setting up + `grub` bootloader type. The behavior for setting up the console is different per bootloader: - For `isolinux` the console setting is taken as provided, whereas - only the values `serial` and `console` are taken into account. - For `grub` the console setting is split into the setting for the output and the input console: