-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set grub-bls default to false for SUSE on SLES15
For the time being, SLES15 distributions cannot handle KIWI's default to use BLS with GRUB2. Until they catch up, revert this for them only.
- Loading branch information
Showing
3 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
diff --git a/kiwi/bootloader/config/grub2.py b/kiwi/bootloader/config/grub2.py | ||
index 461b168c0..120088d6b 100644 | ||
--- a/kiwi/bootloader/config/grub2.py | ||
+++ b/kiwi/bootloader/config/grub2.py | ||
@@ -764,15 +764,6 @@ class BootLoaderConfigGrub2(BootLoaderConfigBase): | ||
if self.custom_args.get('crypto_disk'): | ||
grub_default_entries['GRUB_ENABLE_CRYPTODISK'] = 'y' | ||
|
||
- enable_blscfg_implemented = Command.run( | ||
- [ | ||
- 'grep', '-q', 'GRUB_ENABLE_BLSCFG', | ||
- self._get_grub2_mkconfig_tool() | ||
- ], raise_on_error=False | ||
- ) | ||
- if enable_blscfg_implemented.returncode == 0: | ||
- grub_default_entries['GRUB_ENABLE_BLSCFG'] = 'true' | ||
- | ||
if grub_default_entries: | ||
log.info('Writing grub2 defaults file') | ||
grub_default_location = ''.join([self.root_dir, '/etc/default/']) | ||
diff --git a/test/unit/bootloader/config/grub2_test.py b/test/unit/bootloader/config/grub2_test.py | ||
index 19e0f4d98..daf8e5868 100644 | ||
--- a/test/unit/bootloader/config/grub2_test.py | ||
+++ b/test/unit/bootloader/config/grub2_test.py | ||
@@ -579,7 +579,6 @@ class TestBootLoaderConfigGrub2: | ||
), | ||
call('GRUB_CMDLINE_LINUX_DEFAULT', '"some-cmdline"'), | ||
call('GRUB_DISTRIBUTOR', '"Bob"'), | ||
- call('GRUB_ENABLE_BLSCFG', 'true'), | ||
call('GRUB_ENABLE_CRYPTODISK', 'y'), | ||
call('GRUB_GFXMODE', '800x600'), | ||
call( | ||
@@ -625,7 +624,6 @@ class TestBootLoaderConfigGrub2: | ||
call('GRUB_CMDLINE_LINUX', '"root=LABEL=some-label"'), | ||
call('GRUB_DISABLE_LINUX_UUID', 'true'), | ||
call('GRUB_DISTRIBUTOR', '"Bob"'), | ||
- call('GRUB_ENABLE_BLSCFG', 'true'), | ||
call('GRUB_ENABLE_CRYPTODISK', 'y'), | ||
call('GRUB_ENABLE_LINUX_LABEL', 'true'), | ||
call('GRUB_GFXMODE', '800x600'), | ||
@@ -670,7 +668,6 @@ class TestBootLoaderConfigGrub2: | ||
call('GRUB_DISABLE_LINUX_PARTUUID', 'false'), | ||
call('GRUB_DISABLE_LINUX_UUID', 'true'), | ||
call('GRUB_DISTRIBUTOR', '"Bob"'), | ||
- call('GRUB_ENABLE_BLSCFG', 'true'), | ||
call('GRUB_ENABLE_CRYPTODISK', 'y'), | ||
call('GRUB_GFXMODE', '800x600'), | ||
call( | ||
@@ -714,7 +711,6 @@ class TestBootLoaderConfigGrub2: | ||
call('GRUB_CMDLINE_LINUX_DEFAULT', '"abcd console=tty0"'), | ||
call('GRUB_DISABLE_LINUX_UUID', 'true'), | ||
call('GRUB_DISTRIBUTOR', '"Bob"'), | ||
- call('GRUB_ENABLE_BLSCFG', 'true'), | ||
call('GRUB_ENABLE_CRYPTODISK', 'y'), | ||
call('GRUB_ENABLE_LINUX_LABEL', 'true'), | ||
call('GRUB_GFXMODE', '800x600'), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,6 +56,9 @@ Packager: Marcus Schaefer <[email protected]> | |
Group: %{pygroup} | ||
Source: %{name}.tar.gz | ||
Source1: %{name}-rpmlintrc | ||
# SUSE-specific patches (1001+) | ||
## PATCH-FIX-OPENSUSE kiwi-revert-bls-default-for-suse.patch -- temporary until opensuse has bls | ||
Patch1001: kiwi-revert-bls-default-for-suse.patch | ||
BuildRoot: %{_tmppath}/%{name}-%{version}-build | ||
BuildRequires: gcc | ||
BuildRequires: python%{python3_pkgversion}-%{develsuffix} >= 3.6 | ||
|
@@ -574,6 +577,11 @@ Provides manual pages to describe the kiwi commands | |
%prep | ||
%setup -q -n kiwi-%{version} | ||
|
||
%if 0%{?suse_version} | ||
# Temporarily revert grub-bls default to false for SUSE distributions | ||
%patch -P 1001 -p1 | ||
%endif | ||
|
||
# Drop shebang for kiwi/xml_parse.py, as we don't intend to use it | ||
# as an independent script | ||
sed -e "s|#!/usr/bin/env python||" -i kiwi/xml_parse.py | ||
|