Compare commits

..

No commits in common. "c8s" and "c8" have entirely different histories.
c8s ... c8

18 changed files with 24 additions and 918 deletions

1
.boom-boot.metadata Normal file
View File

@ -0,0 +1 @@
4c95e888f7aecd9dd809c6f0d44ce650a5ae07da SOURCES/boom-1.3.tar.gz

1
.gitignore vendored
View File

@ -1,2 +1 @@
SOURCES/boom-1.3.tar.gz SOURCES/boom-1.3.tar.gz
/boom-1.3.tar.gz

View File

@ -1,106 +0,0 @@
From 2721baa62e414dcbe1fdd3ab2a7f1cf5f2ac4dc4 Mon Sep 17 00:00:00 2001
From: "Bryn M. Reeves" <bmr@redhat.com>
Date: Thu, 19 May 2022 16:25:19 +0100
Subject: [PATCH 06/11] boom.bootloader: simplify bootloader integration checks
Since Red Hat distributions (since RHEL8/Fedora 30) now default to using
BLS for boot loader configuration the boom grub integration scripts
(that are run during grub2-mkconfig execution), and the elaborate checks for
various details of the integration are unnecessary and lead to
misleading output when boom is used on these distributions:
# boom create --title "STRATIS SNAP TEST2" --root-device /dev/stratis/p1/fs1-snap
WARNING - Boom configuration file missing from '/boot/../etc/default/boom'
WARNING - Boom configuration not found in grub.cfg
WARNING - Run 'grub2-mkconfig > /boot/grub2/grub.cfg' to enable
Created entry with boot_id 0b0a8d0:
title STRATIS SNAP TEST2
machine-id 568bd2491ba243d48fcff8f2a2d7f928
version 5.11.12-300.fc34.x86_64
linux /vmlinuz-5.11.12-300.fc34.x86_64
initrd /initramfs-5.11.12-300.fc34.x86_64.img
options root=/dev/stratis/p1/fs1-snap ro stratis.rootfs.pool_uuid=7e12536d-ddd5-4042-9d84-fff9846f4603
grub_users $grub_users
grub_arg --unrestricted
grub_class kernel
The WARNING messages are not only misleading but potentially harmful
since running grub2-mkconfig may have additional side-effects depending
on the system configuration (and may not enable blscfg if for some
reason it is not present in the configuration files in /boot).
An additional benefit of this simplification is that it now correctly
reports the BLS status for systems using EFI.
Related: #2
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
---
boom/bootloader.py | 36 +-----------------------------------
1 file changed, 1 insertion(+), 35 deletions(-)
diff --git a/boom/bootloader.py b/boom/bootloader.py
index b01b7cd..3802ca8 100644
--- a/boom/bootloader.py
+++ b/boom/bootloader.py
@@ -224,10 +224,6 @@ def boom_entries_path():
#: Private constants for Grub2 integration checks
#: Paths outside /boot are referenced relative to /boot.
__grub_cfg = "grub2/grub.cfg"
-__etc_grub_d = "../etc/grub.d"
-__boom_grub_d = "42_boom"
-__etc_default = "../etc/default"
-__boom_defaults = "boom"
def check_bootloader():
@@ -242,33 +238,6 @@ def check_bootloader():
_log_warn("No Grub2 configuration file found")
return False
- boom_grub_d = path_join(boot_path, __etc_grub_d, __boom_grub_d)
- if not path_exists(boom_grub_d):
- _log_warn("Boom grub2 script missing from '%s'" % __etc_grub_d)
- return False
-
- defaults_file = path_join(boot_path, __etc_default, __boom_defaults)
- if not path_exists(defaults_file):
- _log_warn("Boom configuration file missing from '%s'" % defaults_file)
- return False
-
- def is_yes(val):
- return val == "y" or val == "yes"
-
- submenu_enabled = False
- with open(defaults_file, "r") as dfile:
- for line in dfile:
- (name, value) = parse_name_value(line)
- if name == "BOOM_ENABLE_GRUB" and not is_yes(value):
- _log_warn("Boom grub2 integration is disabled in '%s'" %
- defaults_file)
- if name == "BOOM_USE_SUBMENU" and is_yes(value):
- _log_info("Boom grub2 submenu support enabled")
- submenu_enabled = True
- if name == "BOOM_SUBMENU_NAME" and submenu_enabled:
- _log_info("Boom grub2 submenu name is '%s'" % value)
-
- found_boom_grub = False
found_bls = False
blscfg = "blscfg"
with open(grub_cfg) as gfile:
@@ -276,11 +245,8 @@ def check_bootloader():
if blscfg in line:
_log_info("Found BLS import statement in '%s'" % grub_cfg)
found_bls = True
- if "BEGIN" in line and __boom_grub_d in line:
- _log_info("Found Boom Grub2 integration in '%s'" % grub_cfg)
- found_boom_grub = True
- return found_boom_grub or found_bls
+ return found_bls
class BoomRootDeviceError(BoomError):
--
2.45.2

View File

@ -1,545 +0,0 @@
From b64d59cd1c9b798cfe4f7fd2e8e022dbc75082e3 Mon Sep 17 00:00:00 2001
From: "Bryn M. Reeves" <bmr@redhat.com>
Date: Thu, 19 May 2022 16:46:19 +0100
Subject: [PATCH 07/11] boom: drop Grub2 integration scripts and defaults file
Remove the 42_boom grub2-mkconfig hook script and the boom grub2
integration configuration in /etc/default/boom and fix the corresponding
test cases accordingly.
Closes: #2
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
---
boom.spec | 6 ----
etc/default/boom | 3 --
etc/grub.d/42_boom | 35 -------------------
.../boom_off/etc/default/boom | 3 --
.../boom_off/etc/grub.d/42_boom | 35 -------------------
.../boom_on/boot/grub2/grub.cfg | 10 ------
.../boom_on/etc/default/boom | 3 --
.../boom_on/etc/grub.d/42_boom | 35 -------------------
.../{boom_on => default}/boot/boom/boom.conf | 0
...cc4acde98e84f671e3b-localhost-testing.host | 0
...2b1d5e2a9ede501b2815fac9c69-localhost.host | 0
...f0ba735fe63c50ba1d98-localhost-ALABEL.host | 0
...31bf37c27caf168695409e2f0b4-localhost.host | 0
...bd37511ed08919f7561c5ae6663ab027f-qux.host | 0
...b9083be599e61d26bdff2c2c97-debian8.profile | 0
...24192b15d91dc9612343a3-ubuntu16.04.profile | 0
...d97a0082fcd0270da994b2bff7a-newos1.profile | 0
...05bc2850ba01f4838739a1b-nooptions1.profile | 0
...b20c6a46c7fc31b04be465e973-rhel7.2.profile | 0
...869ba1756cce40c7d8c4c24db9-blanks1.profile | 0
...25676933747d9c893374db-ubuntu17.04.profile | 0
...92284ef45163428dd58023854d-debian7.profile | 0
...b2903585f171e4290ff0602b5-fedora24.profile | 0
...7d39e0abf8c265ffb144d6ca-comments1.profile | 0
...148659c5baaa499259bbc-opensuse42.1.profile | 0
...2e6092bde6b789d9a3c21b-ubuntu14.04.profile | 0
...68be04e51bb25687a361e535c-fedora25.profile | 0
...3d71ca678fea89ef1989695b3-nobtrfs1.profile | 0
...3c8c95cb7d93f75693d2b25f764d-rhel6.profile | 0
...85fd9ab985a4c47025884999f-fedora24.profile | 0
.../boot/boom/profiles/README | 0
...6cb7c8762cb198a8ba49e-opensuse42.3.profile | 0
...416bb914418b051e2d8d72d13b32-rhel5.profile | 0
...9c01ce2081e9158eafa1920fa632-rhel8.profile | 0
...47122f05658a2721f53c3aae4a039-foo1.profile | 0
...c5259477cbff7a15b000dd222671-rhel7.profile | 0
...3384a99fbd402e2ea5bcba5a49-fedora1.profile | 0
...b1da75f0e893d5a30db8e308b58-nolvm1.profile | 0
...9f1160c0b0291407e5990b9e0-fedora26.profile | 0
...310fec02d25925688e4840a7869a-rhel4.profile | 0
.../{boom_off => default}/boot/grub2/grub.cfg | 0
.../no_boom/boot/grub2/grub.cfg | 10 ------
.../no_boom/etc/grub.d/42_boom | 35 -------------------
.../no_grub_d/boot/grub2/grub.cfg | 10 ------
.../no_grub_d/etc/default/boom | 3 --
tests/bootloader_tests.py | 26 +-------------
46 files changed, 1 insertion(+), 213 deletions(-)
delete mode 100644 etc/default/boom
delete mode 100755 etc/grub.d/42_boom
delete mode 100644 tests/bootloader_configs/boom_off/etc/default/boom
delete mode 100755 tests/bootloader_configs/boom_off/etc/grub.d/42_boom
delete mode 100644 tests/bootloader_configs/boom_on/boot/grub2/grub.cfg
delete mode 100644 tests/bootloader_configs/boom_on/etc/default/boom
delete mode 100755 tests/bootloader_configs/boom_on/etc/grub.d/42_boom
rename tests/bootloader_configs/{boom_on => default}/boot/boom/boom.conf (100%)
rename tests/bootloader_configs/{boom_on => default}/boot/boom/hosts/1a979bb835db0ce920557cc4acde98e84f671e3b-localhost-testing.host (100%)
rename tests/bootloader_configs/{boom_on => default}/boot/boom/hosts/2b4048d37f3c42b1d5e2a9ede501b2815fac9c69-localhost.host (100%)
rename tests/bootloader_configs/{boom_on => default}/boot/boom/hosts/373ccd1b66af9058ce49f0ba735fe63c50ba1d98-localhost-ALABEL.host (100%)
rename tests/bootloader_configs/{boom_on => default}/boot/boom/hosts/badbadbad-5ebcb1fa34dd831bf37c27caf168695409e2f0b4-localhost.host (100%)
rename tests/bootloader_configs/{boom_on => default}/boot/boom/hosts/cb7b3ebbd37511ed08919f7561c5ae6663ab027f-qux.host (100%)
rename tests/bootloader_configs/{boom_on => default}/boot/boom/profiles/01f4a140de8c7cb9083be599e61d26bdff2c2c97-debian8.profile (100%)
rename tests/bootloader_configs/{boom_on => default}/boot/boom/profiles/21e37c8002f33c177524192b15d91dc9612343a3-ubuntu16.04.profile (100%)
rename tests/bootloader_configs/{boom_on => default}/boot/boom/profiles/28851f93a99cad97a0082fcd0270da994b2bff7a-newos1.profile (100%)
rename tests/bootloader_configs/{boom_on => default}/boot/boom/profiles/3ee2c8b6e7b5043d305bc2850ba01f4838739a1b-nooptions1.profile (100%)
rename tests/bootloader_configs/{boom_on => default}/boot/boom/profiles/3fc389bba581e5b20c6a46c7fc31b04be465e973-rhel7.2.profile (100%)
rename tests/bootloader_configs/{boom_on => default}/boot/boom/profiles/3fda8a315ae33e869ba1756cce40c7d8c4c24db9-blanks1.profile (100%)
rename tests/bootloader_configs/{boom_on => default}/boot/boom/profiles/418203ef8b710a2dc125676933747d9c893374db-ubuntu17.04.profile (100%)
rename tests/bootloader_configs/{boom_on => default}/boot/boom/profiles/6bae4a4aea177592284ef45163428dd58023854d-debian7.profile (100%)
rename tests/bootloader_configs/{boom_on => default}/boot/boom/profiles/6bf746bb7231693b2903585f171e4290ff0602b5-fedora24.profile (100%)
rename tests/bootloader_configs/{boom_on => default}/boot/boom/profiles/6cc6727da76d21db7d39e0abf8c265ffb144d6ca-comments1.profile (100%)
rename tests/bootloader_configs/{boom_on => default}/boot/boom/profiles/7dbe237be02bc028a95148659c5baaa499259bbc-opensuse42.1.profile (100%)
rename tests/bootloader_configs/{boom_on => default}/boot/boom/profiles/81a78ae30161f02d8b2e6092bde6b789d9a3c21b-ubuntu14.04.profile (100%)
rename tests/bootloader_configs/{boom_on => default}/boot/boom/profiles/9736c347ccb724368be04e51bb25687a361e535c-fedora25.profile (100%)
rename tests/bootloader_configs/{boom_on => default}/boot/boom/profiles/987f0daf2d004093d71ca678fea89ef1989695b3-nobtrfs1.profile (100%)
rename tests/bootloader_configs/{boom_on => default}/boot/boom/profiles/98c3edb94b7b3c8c95cb7d93f75693d2b25f764d-rhel6.profile (100%)
rename tests/bootloader_configs/{boom_on => default}/boot/boom/profiles/9cb53ddda889d6285fd9ab985a4c47025884999f-fedora24.profile (100%)
rename tests/bootloader_configs/{boom_on => default}/boot/boom/profiles/README (100%)
rename tests/bootloader_configs/{boom_on => default}/boot/boom/profiles/af602322b29a22d002e6cb7c8762cb198a8ba49e-opensuse42.3.profile (100%)
rename tests/bootloader_configs/{boom_on => default}/boot/boom/profiles/b730331f540c416bb914418b051e2d8d72d13b32-rhel5.profile (100%)
rename tests/bootloader_configs/{boom_on => default}/boot/boom/profiles/b99ea5fd28c19c01ce2081e9158eafa1920fa632-rhel8.profile (100%)
rename tests/bootloader_configs/{boom_on => default}/boot/boom/profiles/bab31a35db247122f05658a2721f53c3aae4a039-foo1.profile (100%)
rename tests/bootloader_configs/{boom_on => default}/boot/boom/profiles/c0b921ea84dbc5259477cbff7a15b000dd222671-rhel7.profile (100%)
rename tests/bootloader_configs/{boom_on => default}/boot/boom/profiles/c48d3c2d3fe9c53384a99fbd402e2ea5bcba5a49-fedora1.profile (100%)
rename tests/bootloader_configs/{boom_on => default}/boot/boom/profiles/d3e1bd82b33d0b1da75f0e893d5a30db8e308b58-nolvm1.profile (100%)
rename tests/bootloader_configs/{boom_on => default}/boot/boom/profiles/d4439b7d2f928c39f1160c0b0291407e5990b9e0-fedora26.profile (100%)
rename tests/bootloader_configs/{boom_on => default}/boot/boom/profiles/efd6d41ee868310fec02d25925688e4840a7869a-rhel4.profile (100%)
rename tests/bootloader_configs/{boom_off => default}/boot/grub2/grub.cfg (100%)
delete mode 100644 tests/bootloader_configs/no_boom/boot/grub2/grub.cfg
delete mode 100755 tests/bootloader_configs/no_boom/etc/grub.d/42_boom
delete mode 100644 tests/bootloader_configs/no_grub_d/boot/grub2/grub.cfg
delete mode 100644 tests/bootloader_configs/no_grub_d/etc/default/boom
diff --git a/boom.spec b/boom.spec
index 8b297e9..7e88e65 100644
--- a/boom.spec
+++ b/boom.spec
@@ -96,12 +96,6 @@ rm -r doc/_build
%install
%py3_install
-# Install Grub2 integration scripts
-mkdir -p ${RPM_BUILD_ROOT}/etc/grub.d
-mkdir -p ${RPM_BUILD_ROOT}/etc/default
-install -m 755 etc/grub.d/42_boom ${RPM_BUILD_ROOT}/etc/grub.d
-install -m 644 etc/default/boom ${RPM_BUILD_ROOT}/etc/default
-
# Make configuration directories
# mode 0700 - in line with /boot/grub2 directory:
install -d -m 700 ${RPM_BUILD_ROOT}/boot/boom/profiles
diff --git a/etc/default/boom b/etc/default/boom
deleted file mode 100644
index 451cb37..0000000
--- a/etc/default/boom
+++ /dev/null
@@ -1,3 +0,0 @@
-BOOM_USE_SUBMENU="no"
-BOOM_SUBMENU_NAME="Snapshots"
-BOOM_ENABLE_GRUB="no"
diff --git a/etc/grub.d/42_boom b/etc/grub.d/42_boom
deleted file mode 100755
index 85611dd..0000000
--- a/etc/grub.d/42_boom
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/sh
-BOOM_CONFIG="/etc/default/boom"
-. $BOOM_CONFIG
-
-BOOM_USE_SUBMENU="${BOOM_USE_SUBMENU:-yes}"
-BOOM_SUBMENU_NAME="${BOOM_SUBMENU_NAME:-Snapshots}"
-BOOM_ENABLE_GRUB="${BOOM_ENABLE_GRUB:-no}"
-
-# Indentation for body of submenu commands
-SUBMENU_PREFIX=" "
-
-INSMOD_CMD="insmod blscfg"
-IMPORT_CMD="bls_import"
-
-# Test whether boom grub menu entries are enabled
-if [ "$BOOM_ENABLE_GRUB" = "no" -o "$BOOM_ENABLE_GRUB" = "n" ]; then
- exit
-fi
-
-# Do not generate grub configuration unless boom entries have
-# been configured.
-if [ -z "$(boom list --noheadings)" ]; then
- exit
-fi
-
-# Optional submenu support
-if [ "$BOOM_USE_SUBMENU" = "yes" -o "$BOOM_SUBMENU_NAME" = "y" ]; then
- echo "submenu \"$BOOM_SUBMENU_NAME\" {"
- echo "${SUBMENU_PREFIX}${INSMOD_CMD}"
- echo "${SUBMENU_PREFIX}${IMPORT_CMD}"
- echo "}"
-else
- echo ${INSMOD_CMD}
- echo ${IMPORT_CMD}
-fi
diff --git a/tests/bootloader_configs/boom_off/etc/default/boom b/tests/bootloader_configs/boom_off/etc/default/boom
deleted file mode 100644
index dfb766c..0000000
--- a/tests/bootloader_configs/boom_off/etc/default/boom
+++ /dev/null
@@ -1,3 +0,0 @@
-BOOM_USE_SUBMENU="yes"
-BOOM_SUBMENU_NAME="Snapshots"
-BOOM_ENABLE_GRUB="no"
diff --git a/tests/bootloader_configs/boom_off/etc/grub.d/42_boom b/tests/bootloader_configs/boom_off/etc/grub.d/42_boom
deleted file mode 100755
index 85611dd..0000000
--- a/tests/bootloader_configs/boom_off/etc/grub.d/42_boom
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/sh
-BOOM_CONFIG="/etc/default/boom"
-. $BOOM_CONFIG
-
-BOOM_USE_SUBMENU="${BOOM_USE_SUBMENU:-yes}"
-BOOM_SUBMENU_NAME="${BOOM_SUBMENU_NAME:-Snapshots}"
-BOOM_ENABLE_GRUB="${BOOM_ENABLE_GRUB:-no}"
-
-# Indentation for body of submenu commands
-SUBMENU_PREFIX=" "
-
-INSMOD_CMD="insmod blscfg"
-IMPORT_CMD="bls_import"
-
-# Test whether boom grub menu entries are enabled
-if [ "$BOOM_ENABLE_GRUB" = "no" -o "$BOOM_ENABLE_GRUB" = "n" ]; then
- exit
-fi
-
-# Do not generate grub configuration unless boom entries have
-# been configured.
-if [ -z "$(boom list --noheadings)" ]; then
- exit
-fi
-
-# Optional submenu support
-if [ "$BOOM_USE_SUBMENU" = "yes" -o "$BOOM_SUBMENU_NAME" = "y" ]; then
- echo "submenu \"$BOOM_SUBMENU_NAME\" {"
- echo "${SUBMENU_PREFIX}${INSMOD_CMD}"
- echo "${SUBMENU_PREFIX}${IMPORT_CMD}"
- echo "}"
-else
- echo ${INSMOD_CMD}
- echo ${IMPORT_CMD}
-fi
diff --git a/tests/bootloader_configs/boom_on/boot/grub2/grub.cfg b/tests/bootloader_configs/boom_on/boot/grub2/grub.cfg
deleted file mode 100644
index 4e94cc8..0000000
--- a/tests/bootloader_configs/boom_on/boot/grub2/grub.cfg
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# Fake grub.cfg for check_bootloader() tests.
-#
-
-### BEGIN /etc/grub.d/42_boom ###
-submenu "Snapshots" {
- insmod blscfg
- bls_import
-}
-### END /etc/grub.d/42_boom ###
diff --git a/tests/bootloader_configs/boom_on/etc/default/boom b/tests/bootloader_configs/boom_on/etc/default/boom
deleted file mode 100644
index cd5f772..0000000
--- a/tests/bootloader_configs/boom_on/etc/default/boom
+++ /dev/null
@@ -1,3 +0,0 @@
-BOOM_USE_SUBMENU="yes"
-BOOM_SUBMENU_NAME="Snapshots"
-BOOM_ENABLE_GRUB="yes"
diff --git a/tests/bootloader_configs/boom_on/etc/grub.d/42_boom b/tests/bootloader_configs/boom_on/etc/grub.d/42_boom
deleted file mode 100755
index 85611dd..0000000
--- a/tests/bootloader_configs/boom_on/etc/grub.d/42_boom
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/sh
-BOOM_CONFIG="/etc/default/boom"
-. $BOOM_CONFIG
-
-BOOM_USE_SUBMENU="${BOOM_USE_SUBMENU:-yes}"
-BOOM_SUBMENU_NAME="${BOOM_SUBMENU_NAME:-Snapshots}"
-BOOM_ENABLE_GRUB="${BOOM_ENABLE_GRUB:-no}"
-
-# Indentation for body of submenu commands
-SUBMENU_PREFIX=" "
-
-INSMOD_CMD="insmod blscfg"
-IMPORT_CMD="bls_import"
-
-# Test whether boom grub menu entries are enabled
-if [ "$BOOM_ENABLE_GRUB" = "no" -o "$BOOM_ENABLE_GRUB" = "n" ]; then
- exit
-fi
-
-# Do not generate grub configuration unless boom entries have
-# been configured.
-if [ -z "$(boom list --noheadings)" ]; then
- exit
-fi
-
-# Optional submenu support
-if [ "$BOOM_USE_SUBMENU" = "yes" -o "$BOOM_SUBMENU_NAME" = "y" ]; then
- echo "submenu \"$BOOM_SUBMENU_NAME\" {"
- echo "${SUBMENU_PREFIX}${INSMOD_CMD}"
- echo "${SUBMENU_PREFIX}${IMPORT_CMD}"
- echo "}"
-else
- echo ${INSMOD_CMD}
- echo ${IMPORT_CMD}
-fi
diff --git a/tests/bootloader_configs/boom_on/boot/boom/boom.conf b/tests/bootloader_configs/default/boot/boom/boom.conf
similarity index 100%
rename from tests/bootloader_configs/boom_on/boot/boom/boom.conf
rename to tests/bootloader_configs/default/boot/boom/boom.conf
diff --git a/tests/bootloader_configs/boom_on/boot/boom/hosts/1a979bb835db0ce920557cc4acde98e84f671e3b-localhost-testing.host b/tests/bootloader_configs/default/boot/boom/hosts/1a979bb835db0ce920557cc4acde98e84f671e3b-localhost-testing.host
similarity index 100%
rename from tests/bootloader_configs/boom_on/boot/boom/hosts/1a979bb835db0ce920557cc4acde98e84f671e3b-localhost-testing.host
rename to tests/bootloader_configs/default/boot/boom/hosts/1a979bb835db0ce920557cc4acde98e84f671e3b-localhost-testing.host
diff --git a/tests/bootloader_configs/boom_on/boot/boom/hosts/2b4048d37f3c42b1d5e2a9ede501b2815fac9c69-localhost.host b/tests/bootloader_configs/default/boot/boom/hosts/2b4048d37f3c42b1d5e2a9ede501b2815fac9c69-localhost.host
similarity index 100%
rename from tests/bootloader_configs/boom_on/boot/boom/hosts/2b4048d37f3c42b1d5e2a9ede501b2815fac9c69-localhost.host
rename to tests/bootloader_configs/default/boot/boom/hosts/2b4048d37f3c42b1d5e2a9ede501b2815fac9c69-localhost.host
diff --git a/tests/bootloader_configs/boom_on/boot/boom/hosts/373ccd1b66af9058ce49f0ba735fe63c50ba1d98-localhost-ALABEL.host b/tests/bootloader_configs/default/boot/boom/hosts/373ccd1b66af9058ce49f0ba735fe63c50ba1d98-localhost-ALABEL.host
similarity index 100%
rename from tests/bootloader_configs/boom_on/boot/boom/hosts/373ccd1b66af9058ce49f0ba735fe63c50ba1d98-localhost-ALABEL.host
rename to tests/bootloader_configs/default/boot/boom/hosts/373ccd1b66af9058ce49f0ba735fe63c50ba1d98-localhost-ALABEL.host
diff --git a/tests/bootloader_configs/boom_on/boot/boom/hosts/badbadbad-5ebcb1fa34dd831bf37c27caf168695409e2f0b4-localhost.host b/tests/bootloader_configs/default/boot/boom/hosts/badbadbad-5ebcb1fa34dd831bf37c27caf168695409e2f0b4-localhost.host
similarity index 100%
rename from tests/bootloader_configs/boom_on/boot/boom/hosts/badbadbad-5ebcb1fa34dd831bf37c27caf168695409e2f0b4-localhost.host
rename to tests/bootloader_configs/default/boot/boom/hosts/badbadbad-5ebcb1fa34dd831bf37c27caf168695409e2f0b4-localhost.host
diff --git a/tests/bootloader_configs/boom_on/boot/boom/hosts/cb7b3ebbd37511ed08919f7561c5ae6663ab027f-qux.host b/tests/bootloader_configs/default/boot/boom/hosts/cb7b3ebbd37511ed08919f7561c5ae6663ab027f-qux.host
similarity index 100%
rename from tests/bootloader_configs/boom_on/boot/boom/hosts/cb7b3ebbd37511ed08919f7561c5ae6663ab027f-qux.host
rename to tests/bootloader_configs/default/boot/boom/hosts/cb7b3ebbd37511ed08919f7561c5ae6663ab027f-qux.host
diff --git a/tests/bootloader_configs/boom_on/boot/boom/profiles/01f4a140de8c7cb9083be599e61d26bdff2c2c97-debian8.profile b/tests/bootloader_configs/default/boot/boom/profiles/01f4a140de8c7cb9083be599e61d26bdff2c2c97-debian8.profile
similarity index 100%
rename from tests/bootloader_configs/boom_on/boot/boom/profiles/01f4a140de8c7cb9083be599e61d26bdff2c2c97-debian8.profile
rename to tests/bootloader_configs/default/boot/boom/profiles/01f4a140de8c7cb9083be599e61d26bdff2c2c97-debian8.profile
diff --git a/tests/bootloader_configs/boom_on/boot/boom/profiles/21e37c8002f33c177524192b15d91dc9612343a3-ubuntu16.04.profile b/tests/bootloader_configs/default/boot/boom/profiles/21e37c8002f33c177524192b15d91dc9612343a3-ubuntu16.04.profile
similarity index 100%
rename from tests/bootloader_configs/boom_on/boot/boom/profiles/21e37c8002f33c177524192b15d91dc9612343a3-ubuntu16.04.profile
rename to tests/bootloader_configs/default/boot/boom/profiles/21e37c8002f33c177524192b15d91dc9612343a3-ubuntu16.04.profile
diff --git a/tests/bootloader_configs/boom_on/boot/boom/profiles/28851f93a99cad97a0082fcd0270da994b2bff7a-newos1.profile b/tests/bootloader_configs/default/boot/boom/profiles/28851f93a99cad97a0082fcd0270da994b2bff7a-newos1.profile
similarity index 100%
rename from tests/bootloader_configs/boom_on/boot/boom/profiles/28851f93a99cad97a0082fcd0270da994b2bff7a-newos1.profile
rename to tests/bootloader_configs/default/boot/boom/profiles/28851f93a99cad97a0082fcd0270da994b2bff7a-newos1.profile
diff --git a/tests/bootloader_configs/boom_on/boot/boom/profiles/3ee2c8b6e7b5043d305bc2850ba01f4838739a1b-nooptions1.profile b/tests/bootloader_configs/default/boot/boom/profiles/3ee2c8b6e7b5043d305bc2850ba01f4838739a1b-nooptions1.profile
similarity index 100%
rename from tests/bootloader_configs/boom_on/boot/boom/profiles/3ee2c8b6e7b5043d305bc2850ba01f4838739a1b-nooptions1.profile
rename to tests/bootloader_configs/default/boot/boom/profiles/3ee2c8b6e7b5043d305bc2850ba01f4838739a1b-nooptions1.profile
diff --git a/tests/bootloader_configs/boom_on/boot/boom/profiles/3fc389bba581e5b20c6a46c7fc31b04be465e973-rhel7.2.profile b/tests/bootloader_configs/default/boot/boom/profiles/3fc389bba581e5b20c6a46c7fc31b04be465e973-rhel7.2.profile
similarity index 100%
rename from tests/bootloader_configs/boom_on/boot/boom/profiles/3fc389bba581e5b20c6a46c7fc31b04be465e973-rhel7.2.profile
rename to tests/bootloader_configs/default/boot/boom/profiles/3fc389bba581e5b20c6a46c7fc31b04be465e973-rhel7.2.profile
diff --git a/tests/bootloader_configs/boom_on/boot/boom/profiles/3fda8a315ae33e869ba1756cce40c7d8c4c24db9-blanks1.profile b/tests/bootloader_configs/default/boot/boom/profiles/3fda8a315ae33e869ba1756cce40c7d8c4c24db9-blanks1.profile
similarity index 100%
rename from tests/bootloader_configs/boom_on/boot/boom/profiles/3fda8a315ae33e869ba1756cce40c7d8c4c24db9-blanks1.profile
rename to tests/bootloader_configs/default/boot/boom/profiles/3fda8a315ae33e869ba1756cce40c7d8c4c24db9-blanks1.profile
diff --git a/tests/bootloader_configs/boom_on/boot/boom/profiles/418203ef8b710a2dc125676933747d9c893374db-ubuntu17.04.profile b/tests/bootloader_configs/default/boot/boom/profiles/418203ef8b710a2dc125676933747d9c893374db-ubuntu17.04.profile
similarity index 100%
rename from tests/bootloader_configs/boom_on/boot/boom/profiles/418203ef8b710a2dc125676933747d9c893374db-ubuntu17.04.profile
rename to tests/bootloader_configs/default/boot/boom/profiles/418203ef8b710a2dc125676933747d9c893374db-ubuntu17.04.profile
diff --git a/tests/bootloader_configs/boom_on/boot/boom/profiles/6bae4a4aea177592284ef45163428dd58023854d-debian7.profile b/tests/bootloader_configs/default/boot/boom/profiles/6bae4a4aea177592284ef45163428dd58023854d-debian7.profile
similarity index 100%
rename from tests/bootloader_configs/boom_on/boot/boom/profiles/6bae4a4aea177592284ef45163428dd58023854d-debian7.profile
rename to tests/bootloader_configs/default/boot/boom/profiles/6bae4a4aea177592284ef45163428dd58023854d-debian7.profile
diff --git a/tests/bootloader_configs/boom_on/boot/boom/profiles/6bf746bb7231693b2903585f171e4290ff0602b5-fedora24.profile b/tests/bootloader_configs/default/boot/boom/profiles/6bf746bb7231693b2903585f171e4290ff0602b5-fedora24.profile
similarity index 100%
rename from tests/bootloader_configs/boom_on/boot/boom/profiles/6bf746bb7231693b2903585f171e4290ff0602b5-fedora24.profile
rename to tests/bootloader_configs/default/boot/boom/profiles/6bf746bb7231693b2903585f171e4290ff0602b5-fedora24.profile
diff --git a/tests/bootloader_configs/boom_on/boot/boom/profiles/6cc6727da76d21db7d39e0abf8c265ffb144d6ca-comments1.profile b/tests/bootloader_configs/default/boot/boom/profiles/6cc6727da76d21db7d39e0abf8c265ffb144d6ca-comments1.profile
similarity index 100%
rename from tests/bootloader_configs/boom_on/boot/boom/profiles/6cc6727da76d21db7d39e0abf8c265ffb144d6ca-comments1.profile
rename to tests/bootloader_configs/default/boot/boom/profiles/6cc6727da76d21db7d39e0abf8c265ffb144d6ca-comments1.profile
diff --git a/tests/bootloader_configs/boom_on/boot/boom/profiles/7dbe237be02bc028a95148659c5baaa499259bbc-opensuse42.1.profile b/tests/bootloader_configs/default/boot/boom/profiles/7dbe237be02bc028a95148659c5baaa499259bbc-opensuse42.1.profile
similarity index 100%
rename from tests/bootloader_configs/boom_on/boot/boom/profiles/7dbe237be02bc028a95148659c5baaa499259bbc-opensuse42.1.profile
rename to tests/bootloader_configs/default/boot/boom/profiles/7dbe237be02bc028a95148659c5baaa499259bbc-opensuse42.1.profile
diff --git a/tests/bootloader_configs/boom_on/boot/boom/profiles/81a78ae30161f02d8b2e6092bde6b789d9a3c21b-ubuntu14.04.profile b/tests/bootloader_configs/default/boot/boom/profiles/81a78ae30161f02d8b2e6092bde6b789d9a3c21b-ubuntu14.04.profile
similarity index 100%
rename from tests/bootloader_configs/boom_on/boot/boom/profiles/81a78ae30161f02d8b2e6092bde6b789d9a3c21b-ubuntu14.04.profile
rename to tests/bootloader_configs/default/boot/boom/profiles/81a78ae30161f02d8b2e6092bde6b789d9a3c21b-ubuntu14.04.profile
diff --git a/tests/bootloader_configs/boom_on/boot/boom/profiles/9736c347ccb724368be04e51bb25687a361e535c-fedora25.profile b/tests/bootloader_configs/default/boot/boom/profiles/9736c347ccb724368be04e51bb25687a361e535c-fedora25.profile
similarity index 100%
rename from tests/bootloader_configs/boom_on/boot/boom/profiles/9736c347ccb724368be04e51bb25687a361e535c-fedora25.profile
rename to tests/bootloader_configs/default/boot/boom/profiles/9736c347ccb724368be04e51bb25687a361e535c-fedora25.profile
diff --git a/tests/bootloader_configs/boom_on/boot/boom/profiles/987f0daf2d004093d71ca678fea89ef1989695b3-nobtrfs1.profile b/tests/bootloader_configs/default/boot/boom/profiles/987f0daf2d004093d71ca678fea89ef1989695b3-nobtrfs1.profile
similarity index 100%
rename from tests/bootloader_configs/boom_on/boot/boom/profiles/987f0daf2d004093d71ca678fea89ef1989695b3-nobtrfs1.profile
rename to tests/bootloader_configs/default/boot/boom/profiles/987f0daf2d004093d71ca678fea89ef1989695b3-nobtrfs1.profile
diff --git a/tests/bootloader_configs/boom_on/boot/boom/profiles/98c3edb94b7b3c8c95cb7d93f75693d2b25f764d-rhel6.profile b/tests/bootloader_configs/default/boot/boom/profiles/98c3edb94b7b3c8c95cb7d93f75693d2b25f764d-rhel6.profile
similarity index 100%
rename from tests/bootloader_configs/boom_on/boot/boom/profiles/98c3edb94b7b3c8c95cb7d93f75693d2b25f764d-rhel6.profile
rename to tests/bootloader_configs/default/boot/boom/profiles/98c3edb94b7b3c8c95cb7d93f75693d2b25f764d-rhel6.profile
diff --git a/tests/bootloader_configs/boom_on/boot/boom/profiles/9cb53ddda889d6285fd9ab985a4c47025884999f-fedora24.profile b/tests/bootloader_configs/default/boot/boom/profiles/9cb53ddda889d6285fd9ab985a4c47025884999f-fedora24.profile
similarity index 100%
rename from tests/bootloader_configs/boom_on/boot/boom/profiles/9cb53ddda889d6285fd9ab985a4c47025884999f-fedora24.profile
rename to tests/bootloader_configs/default/boot/boom/profiles/9cb53ddda889d6285fd9ab985a4c47025884999f-fedora24.profile
diff --git a/tests/bootloader_configs/boom_on/boot/boom/profiles/README b/tests/bootloader_configs/default/boot/boom/profiles/README
similarity index 100%
rename from tests/bootloader_configs/boom_on/boot/boom/profiles/README
rename to tests/bootloader_configs/default/boot/boom/profiles/README
diff --git a/tests/bootloader_configs/boom_on/boot/boom/profiles/af602322b29a22d002e6cb7c8762cb198a8ba49e-opensuse42.3.profile b/tests/bootloader_configs/default/boot/boom/profiles/af602322b29a22d002e6cb7c8762cb198a8ba49e-opensuse42.3.profile
similarity index 100%
rename from tests/bootloader_configs/boom_on/boot/boom/profiles/af602322b29a22d002e6cb7c8762cb198a8ba49e-opensuse42.3.profile
rename to tests/bootloader_configs/default/boot/boom/profiles/af602322b29a22d002e6cb7c8762cb198a8ba49e-opensuse42.3.profile
diff --git a/tests/bootloader_configs/boom_on/boot/boom/profiles/b730331f540c416bb914418b051e2d8d72d13b32-rhel5.profile b/tests/bootloader_configs/default/boot/boom/profiles/b730331f540c416bb914418b051e2d8d72d13b32-rhel5.profile
similarity index 100%
rename from tests/bootloader_configs/boom_on/boot/boom/profiles/b730331f540c416bb914418b051e2d8d72d13b32-rhel5.profile
rename to tests/bootloader_configs/default/boot/boom/profiles/b730331f540c416bb914418b051e2d8d72d13b32-rhel5.profile
diff --git a/tests/bootloader_configs/boom_on/boot/boom/profiles/b99ea5fd28c19c01ce2081e9158eafa1920fa632-rhel8.profile b/tests/bootloader_configs/default/boot/boom/profiles/b99ea5fd28c19c01ce2081e9158eafa1920fa632-rhel8.profile
similarity index 100%
rename from tests/bootloader_configs/boom_on/boot/boom/profiles/b99ea5fd28c19c01ce2081e9158eafa1920fa632-rhel8.profile
rename to tests/bootloader_configs/default/boot/boom/profiles/b99ea5fd28c19c01ce2081e9158eafa1920fa632-rhel8.profile
diff --git a/tests/bootloader_configs/boom_on/boot/boom/profiles/bab31a35db247122f05658a2721f53c3aae4a039-foo1.profile b/tests/bootloader_configs/default/boot/boom/profiles/bab31a35db247122f05658a2721f53c3aae4a039-foo1.profile
similarity index 100%
rename from tests/bootloader_configs/boom_on/boot/boom/profiles/bab31a35db247122f05658a2721f53c3aae4a039-foo1.profile
rename to tests/bootloader_configs/default/boot/boom/profiles/bab31a35db247122f05658a2721f53c3aae4a039-foo1.profile
diff --git a/tests/bootloader_configs/boom_on/boot/boom/profiles/c0b921ea84dbc5259477cbff7a15b000dd222671-rhel7.profile b/tests/bootloader_configs/default/boot/boom/profiles/c0b921ea84dbc5259477cbff7a15b000dd222671-rhel7.profile
similarity index 100%
rename from tests/bootloader_configs/boom_on/boot/boom/profiles/c0b921ea84dbc5259477cbff7a15b000dd222671-rhel7.profile
rename to tests/bootloader_configs/default/boot/boom/profiles/c0b921ea84dbc5259477cbff7a15b000dd222671-rhel7.profile
diff --git a/tests/bootloader_configs/boom_on/boot/boom/profiles/c48d3c2d3fe9c53384a99fbd402e2ea5bcba5a49-fedora1.profile b/tests/bootloader_configs/default/boot/boom/profiles/c48d3c2d3fe9c53384a99fbd402e2ea5bcba5a49-fedora1.profile
similarity index 100%
rename from tests/bootloader_configs/boom_on/boot/boom/profiles/c48d3c2d3fe9c53384a99fbd402e2ea5bcba5a49-fedora1.profile
rename to tests/bootloader_configs/default/boot/boom/profiles/c48d3c2d3fe9c53384a99fbd402e2ea5bcba5a49-fedora1.profile
diff --git a/tests/bootloader_configs/boom_on/boot/boom/profiles/d3e1bd82b33d0b1da75f0e893d5a30db8e308b58-nolvm1.profile b/tests/bootloader_configs/default/boot/boom/profiles/d3e1bd82b33d0b1da75f0e893d5a30db8e308b58-nolvm1.profile
similarity index 100%
rename from tests/bootloader_configs/boom_on/boot/boom/profiles/d3e1bd82b33d0b1da75f0e893d5a30db8e308b58-nolvm1.profile
rename to tests/bootloader_configs/default/boot/boom/profiles/d3e1bd82b33d0b1da75f0e893d5a30db8e308b58-nolvm1.profile
diff --git a/tests/bootloader_configs/boom_on/boot/boom/profiles/d4439b7d2f928c39f1160c0b0291407e5990b9e0-fedora26.profile b/tests/bootloader_configs/default/boot/boom/profiles/d4439b7d2f928c39f1160c0b0291407e5990b9e0-fedora26.profile
similarity index 100%
rename from tests/bootloader_configs/boom_on/boot/boom/profiles/d4439b7d2f928c39f1160c0b0291407e5990b9e0-fedora26.profile
rename to tests/bootloader_configs/default/boot/boom/profiles/d4439b7d2f928c39f1160c0b0291407e5990b9e0-fedora26.profile
diff --git a/tests/bootloader_configs/boom_on/boot/boom/profiles/efd6d41ee868310fec02d25925688e4840a7869a-rhel4.profile b/tests/bootloader_configs/default/boot/boom/profiles/efd6d41ee868310fec02d25925688e4840a7869a-rhel4.profile
similarity index 100%
rename from tests/bootloader_configs/boom_on/boot/boom/profiles/efd6d41ee868310fec02d25925688e4840a7869a-rhel4.profile
rename to tests/bootloader_configs/default/boot/boom/profiles/efd6d41ee868310fec02d25925688e4840a7869a-rhel4.profile
diff --git a/tests/bootloader_configs/boom_off/boot/grub2/grub.cfg b/tests/bootloader_configs/default/boot/grub2/grub.cfg
similarity index 100%
rename from tests/bootloader_configs/boom_off/boot/grub2/grub.cfg
rename to tests/bootloader_configs/default/boot/grub2/grub.cfg
diff --git a/tests/bootloader_configs/no_boom/boot/grub2/grub.cfg b/tests/bootloader_configs/no_boom/boot/grub2/grub.cfg
deleted file mode 100644
index 4e94cc8..0000000
--- a/tests/bootloader_configs/no_boom/boot/grub2/grub.cfg
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# Fake grub.cfg for check_bootloader() tests.
-#
-
-### BEGIN /etc/grub.d/42_boom ###
-submenu "Snapshots" {
- insmod blscfg
- bls_import
-}
-### END /etc/grub.d/42_boom ###
diff --git a/tests/bootloader_configs/no_boom/etc/grub.d/42_boom b/tests/bootloader_configs/no_boom/etc/grub.d/42_boom
deleted file mode 100755
index 85611dd..0000000
--- a/tests/bootloader_configs/no_boom/etc/grub.d/42_boom
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/sh
-BOOM_CONFIG="/etc/default/boom"
-. $BOOM_CONFIG
-
-BOOM_USE_SUBMENU="${BOOM_USE_SUBMENU:-yes}"
-BOOM_SUBMENU_NAME="${BOOM_SUBMENU_NAME:-Snapshots}"
-BOOM_ENABLE_GRUB="${BOOM_ENABLE_GRUB:-no}"
-
-# Indentation for body of submenu commands
-SUBMENU_PREFIX=" "
-
-INSMOD_CMD="insmod blscfg"
-IMPORT_CMD="bls_import"
-
-# Test whether boom grub menu entries are enabled
-if [ "$BOOM_ENABLE_GRUB" = "no" -o "$BOOM_ENABLE_GRUB" = "n" ]; then
- exit
-fi
-
-# Do not generate grub configuration unless boom entries have
-# been configured.
-if [ -z "$(boom list --noheadings)" ]; then
- exit
-fi
-
-# Optional submenu support
-if [ "$BOOM_USE_SUBMENU" = "yes" -o "$BOOM_SUBMENU_NAME" = "y" ]; then
- echo "submenu \"$BOOM_SUBMENU_NAME\" {"
- echo "${SUBMENU_PREFIX}${INSMOD_CMD}"
- echo "${SUBMENU_PREFIX}${IMPORT_CMD}"
- echo "}"
-else
- echo ${INSMOD_CMD}
- echo ${IMPORT_CMD}
-fi
diff --git a/tests/bootloader_configs/no_grub_d/boot/grub2/grub.cfg b/tests/bootloader_configs/no_grub_d/boot/grub2/grub.cfg
deleted file mode 100644
index 4e94cc8..0000000
--- a/tests/bootloader_configs/no_grub_d/boot/grub2/grub.cfg
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# Fake grub.cfg for check_bootloader() tests.
-#
-
-### BEGIN /etc/grub.d/42_boom ###
-submenu "Snapshots" {
- insmod blscfg
- bls_import
-}
-### END /etc/grub.d/42_boom ###
diff --git a/tests/bootloader_configs/no_grub_d/etc/default/boom b/tests/bootloader_configs/no_grub_d/etc/default/boom
deleted file mode 100644
index cd5f772..0000000
--- a/tests/bootloader_configs/no_grub_d/etc/default/boom
+++ /dev/null
@@ -1,3 +0,0 @@
-BOOM_USE_SUBMENU="yes"
-BOOM_SUBMENU_NAME="Snapshots"
-BOOM_ENABLE_GRUB="yes"
diff --git a/tests/bootloader_tests.py b/tests/bootloader_tests.py
index 7126766..f6462e3 100644
--- a/tests/bootloader_tests.py
+++ b/tests/bootloader_tests.py
@@ -1171,34 +1171,10 @@ class BootLoaderTestsWithData(unittest.TestCase):
class BootLoaderTestsBoomOn(BootLoaderTestsWithData):
# Boot config with boom disabled
- bootloader_config = "boom_on"
+ bootloader_config = "default"
def test_check_bootloader(self):
self.bootloader_config_check(True)
-class BootLoaderTestsBoomOff(BootLoaderTestsWithData):
- # Boot config with boom disabled
- bootloader_config = "boom_off"
-
- def test_check_bootloader(self):
- self.bootloader_config_check(True)
-
-
-class BootLoaderTestsNoBoom(BootLoaderTestsWithData):
- # Boot config with no boom configuration
- bootloader_config = "no_boom"
-
- def test_check_bootloader(self):
- self.bootloader_config_check(False)
-
-
-class BootLoaderTestsNoGrubD(BootLoaderTestsWithData):
- # Boot config with no boom configuration
- bootloader_config = "no_grub_d"
-
- def test_check_bootloader(self):
- self.bootloader_config_check(False)
-
-
# vim: set et ts=4 sw=4 :
--
2.45.2

View File

@ -1,34 +0,0 @@
From e58bc7b29ac58629b0a93b1e38a4fa2efd0017b6 Mon Sep 17 00:00:00 2001
From: "Bryn M. Reeves" <bmr@redhat.com>
Date: Tue, 14 Jun 2022 09:31:33 -0400
Subject: [PATCH 08/11] boom.command: add new os-release values to Red Hat
optional keys list
Add "Red Hat Enterprise Linux" (NAME for el8 onwards), and "Fedora
Linux" (NAME for fc35 onwards) to the table of names to automatically
enable grub optional keys for.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
---
boom/command.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/boom/command.py b/boom/command.py
index feb5b65..6aca918 100644
--- a/boom/command.py
+++ b/boom/command.py
@@ -1116,9 +1116,11 @@ def _default_optional_keys(osp):
"""
all_optional_keys = "grub_users grub_arg grub_class id"
_default_optional_keys = [
+ "Red Hat Enterprise Linux",
"Red Hat Enterprise Linux Server",
"Red Hat Enterprise Linux Workstation",
"CentOS Linux",
+ "Fedora Linux",
"Fedora"
]
if osp.os_name in _default_optional_keys:
--
2.45.2

View File

@ -1,69 +0,0 @@
From 115259492699a101bc6f9497bb438194cbe4d042 Mon Sep 17 00:00:00 2001
From: "Bryn M. Reeves" <bmr@redhat.com>
Date: Fri, 16 Jul 2021 18:11:07 +0100
Subject: [PATCH 09/11] boom: remove BOOM_ENTRY_OPTIONS hack from
BootEntry.__from_data()
Commit 92c2bce3 moved logic for accounting for add/del opts from
the BootParams.from_entry() method into BootEntry.__from_data().
Although this is the more correct location to make these changes
the rewriting of the stored BOOM_ENTRY_OPTIONS value is actually
redundant: the entire value will be cleared by the pop-if-set
logic applied to all template-generated keys in the final stage
of loading a BootEntry from an entry_data array.
Additionally the logic conflicts with the handling of host profile
options modifications causing entries with an attached HostProfile
to unexpectedly change boot_id.
Remove the special handling of BOOM_ENTRY_OPTIONS and simplify the
BootEntry.__from_data() method.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
---
boom/bootloader.py | 19 +------------------
1 file changed, 1 insertion(+), 18 deletions(-)
diff --git a/boom/bootloader.py b/boom/bootloader.py
index 3802ca8..feb669a 100644
--- a/boom/bootloader.py
+++ b/boom/bootloader.py
@@ -1360,34 +1360,17 @@ class BootEntry(object):
self.machine_id = self.machine_id or ""
self.architecture = self.architecture or ""
- boot_id = self.boot_id
if boot_params:
self.bp = boot_params
# boot_params is always authoritative
self._entry_data[BOOM_ENTRY_VERSION] = self.bp.version
else:
_log_debug_entry("Initialising BootParams() from "
- "BootEntry(boot_id='%s')" % boot_id)
+ "BootEntry(boot_id='%s')" % self.boot_id)
# Attempt to recover BootParams from entry data
self._bp = BootParams.from_entry(self)
self._bp_generation = self._bp.generation
- if BOOM_ENTRY_OPTIONS in self._entry_data:
- orig_options = self._entry_data[BOOM_ENTRY_OPTIONS]
- option_words = self.options.split()
-
- # Remove add_opts options from BootEntry stored options
- opts = [opt for opt in option_words if opt not in self.bp.add_opts]
- self._entry_data[BOOM_ENTRY_OPTIONS] = " ".join(opts)
-
- # Test whether the re-generated options match the stored values.
- if boot_id != self.__generate_boot_id():
- self._entry_data[BOOM_ENTRY_OPTIONS] = orig_options
- self.read_only = True
- _log_warn("Options for BootEntry(boot_id=%s) do not match "
- "OsProfile: marking read-only" %
- boot_id[:min_boot_id_width()])
-
if self.machine_id:
# Wrap OsProfile in HostProfile if available
self.__match_host_profile()
--
2.45.2

View File

@ -1,44 +0,0 @@
From 8bda9077c79c8dc61ba35a769cec7287ab7ca0ef Mon Sep 17 00:00:00 2001
From: "Bryn M. Reeves" <bmr@redhat.com>
Date: Wed, 8 May 2024 18:43:52 +0100
Subject: [PATCH 11/11] Revert "boom.cache: ignore foreign boot entries when
reference counting"
This reverts commit f9704eea7b973863ea5a2bf6ad13cd37abce64f6.
The reason for ignoring foreign boot entries when determining reference
counts no longer exists (a spurious warning when creating entries with
--backup).
This commit causes problems if a boom-managed boot entry is modified
outside of boom's control (e.g. by kdumctl/grubby appending a modified
crashkernel argument): since boom sees the entry as foreign the images
used by it end up with a reference count of zero and are automatically
removed.
Revert the above commit to prevent this behaviour.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
---
boom/cache.py | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/boom/cache.py b/boom/cache.py
index f4a5391..d84a244 100644
--- a/boom/cache.py
+++ b/boom/cache.py
@@ -572,10 +572,7 @@ class CacheEntry(object):
"""Return the current number of boot entries that reference
this cache entry.
"""
- entries = find_entries(Selection(path=self.path))
- # Ignore foreign boot entries
- entries = [entry for entry in entries if not entry.read_only]
- return len(entries)
+ return len(find_entries(Selection(path=self.path)))
#: The list of cached images for this CacheEntry sorted by increasing age
images = []
--
2.45.2

View File

@ -1,38 +0,0 @@
From df56b037a0d4af7f9a9ee15d86f61e82679948f9 Mon Sep 17 00:00:00 2001
From: "Bryn M. Reeves" <bmr@redhat.com>
Date: Tue, 14 May 2024 10:46:07 -0400
Subject: [PATCH] boom.bootloader: repair boom entries with mismatched boot_id
When loading a boom boot entry from a file name that does not match the
boot_id re-write the entry so that it can be manipulated by future
invocations of the boom command.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
---
boom/bootloader.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/boom/bootloader.py b/boom/bootloader.py
index feb669a..095a522 100644
--- a/boom/bootloader.py
+++ b/boom/bootloader.py
@@ -1494,7 +1494,7 @@ class BootEntry(object):
if self.disp_boot_id != match.group(2):
_log_info("Entry file name does not match boot_id: %s" %
entry_basename)
- self.read_only = True
+ self.update_entry(force=True)
self._last_path = entry_file
self._unwritten = False
@@ -2380,6 +2380,7 @@ class BootEntry(object):
# Cache old entry path
to_unlink = self._last_path
self.write_entry(force=force, expand=expand)
+ _log_info("Rewrote entry %s as %s", self.disp_boot_id, self._entry_path)
if self._entry_path != to_unlink:
try:
unlink(to_unlink)
--
2.45.2

View File

@ -3,7 +3,7 @@
Name: boom-boot Name: boom-boot
Version: 1.3 Version: 1.3
Release: 3%{?dist} Release: 2%{?dist}
Summary: %{summary} Summary: %{summary}
License: GPLv2 License: GPLv2
@ -16,12 +16,6 @@ Patch3: 0003-report-fix-docstring-typo-objecct.patch
Patch4: 0004-command-fix-docstring-typo-or-OsError.patch Patch4: 0004-command-fix-docstring-typo-or-OsError.patch
# BZ 1929838: # BZ 1929838:
Patch5: 0005-command-fix-optional-BLS-key-to-command-line-argumen.patch Patch5: 0005-command-fix-optional-BLS-key-to-command-line-argumen.patch
Patch6: 0006-boom.bootloader-simplify-bootloader-integration-chec.patch
Patch7: 0007-boom-drop-Grub2-integration-scripts-and-defaults-fil.patch
Patch8: 0008-boom.command-add-new-os-release-values-to-Red-Hat-op.patch
Patch9: 0009-boom-remove-BOOM_ENTRY_OPTIONS-hack-from-BootEntry._.patch
Patch10: 0010-Revert-boom.cache-ignore-foreign-boot-entries-when-r.patch
Patch11: 0011-boom.bootloader-repair-boom-entries-with-mismatched-.patch
BuildArch: noarch BuildArch: noarch
@ -34,7 +28,6 @@ BuildRequires: make
Requires: python3-boom = %{version}-%{release} Requires: python3-boom = %{version}-%{release}
Requires: %{name}-conf = %{version}-%{release} Requires: %{name}-conf = %{version}-%{release}
Obsoletes: boom-boot-grub2 <= 1.3
%package -n python3-boom %package -n python3-boom
Summary: %{summary} Summary: %{summary}
@ -54,6 +47,10 @@ Conflicts: boom
%package conf %package conf
Summary: %{summary} Summary: %{summary}
%package grub2
Summary: %{summary}
Supplements: (grub2 and boom-boot = %{version}-%{release})
%description %description
Boom is a boot manager for Linux systems using boot loaders that support Boom is a boot manager for Linux systems using boot loaders that support
the BootLoader Specification for boot entry configuration. the BootLoader Specification for boot entry configuration.
@ -82,6 +79,16 @@ include this support in both Red Hat Enterprise Linux 7 and Fedora).
This package provides configuration files for boom. This package provides configuration files for boom.
%description grub2
Boom is a boot manager for Linux systems using boot loaders that support
the BootLoader Specification for boot entry configuration.
Boom requires a BLS compatible boot loader to function: either the
systemd-boot project, or Grub2 with the BLS patch (Red Hat Grub2 builds
include this support in both Red Hat Enterprise Linux 7 and Fedora).
This package provides integration scripts for grub2 bootloader.
%prep %prep
%setup -n boom-%{version} %setup -n boom-%{version}
# NOTE: Do not use backup extension - MANIFEST.in is picking them # NOTE: Do not use backup extension - MANIFEST.in is picking them
@ -91,12 +98,6 @@ This package provides configuration files for boom.
%patch3 -p1 %patch3 -p1
%patch4 -p1 %patch4 -p1
%patch5 -p1 %patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%build %build
%if 0%{?sphinx_docs} %if 0%{?sphinx_docs}
@ -114,6 +115,8 @@ rm -r doc/_build
# Install Grub2 integration scripts # Install Grub2 integration scripts
mkdir -p ${RPM_BUILD_ROOT}/etc/grub.d mkdir -p ${RPM_BUILD_ROOT}/etc/grub.d
mkdir -p ${RPM_BUILD_ROOT}/etc/default mkdir -p ${RPM_BUILD_ROOT}/etc/default
install -m 755 etc/grub.d/42_boom ${RPM_BUILD_ROOT}/etc/grub.d
install -m 644 etc/default/boom ${RPM_BUILD_ROOT}/etc/default
# Make configuration directories # Make configuration directories
# mode 0700 - in line with /boot/grub2 directory: # mode 0700 - in line with /boot/grub2 directory:
@ -161,17 +164,14 @@ rm doc/conf.py
%dir /boot/boom/cache %dir /boot/boom/cache
%dir /boot/loader/entries %dir /boot/loader/entries
%files grub2
%license COPYING
%doc README.md
%{_sysconfdir}/grub.d/42_boom
%config(noreplace) %{_sysconfdir}/default/boom
%changelog %changelog
* Mon Aug 05 2024 Bryn M. Reeves <bmr@redhat.com> 1.3-3
- boom.bootloader: repair boom entries with mismatched boot_id
- Revert "boom.cache: ignore foreign boot entries when reference counting"
- dist: Drop boom-grub2 package from boom.spec
- boom: remove BOOM_ENTRY_OPTIONS hack from BootEntry.__from_data()
- boom.command: add new os-release values to Red Hat optional keys list
- boom: drop Grub2 integration scripts and defaults file
- boom.bootloader: simplify bootloader integration checks
* Tue Jun 15 2021 Marian Csontos <mcsontos@redhat.com> 1.3-2 * Tue Jun 15 2021 Marian Csontos <mcsontos@redhat.com> 1.3-2
- Fix --grub-id option handling. - Fix --grub-id option handling.

View File

@ -1,6 +0,0 @@
--- !Policy
product_versions:
- rhel-8
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}

View File

@ -1 +0,0 @@
SHA512 (boom-1.3.tar.gz) = b11ba8c81b2d70104181065620948f51b0999dbccff42b7af71e31a0c1ab3e3730dab739be7f08024f0df1eafabc4e33b747518e816b314a54d30769c5622b0a

View File

@ -1,51 +0,0 @@
---
- hosts: localhost
roles:
- role: standard-test-source
tags:
- classic
- role: standard-test-basic
tags:
- classic
tests:
- testsuite_pre:
dir: .
# boom test suite requires LV to exist on the system. We create one in case one is not there...
run: |
set -xv;
rm -rf testsuite &>/dev/null;
if [[ ! -b /dev/boomvg/root ]]; then dd if=/dev/zero of=/dev/shm/boompv bs=1M count=128 && PV=$(losetup --show -f /dev/shm/boompv) && vgcreate boomvg $PV && lvcreate -n root -L32M boomvg; fi
- testsuite:
# to run the testsuite against installed python modules, we should run
# outside of source directory. Let's copy tests into new directory...
dir: .
run: |
set -xv;
mkdir testsuite && cd testsuite && cp -R ../source/tests . && python3 -m unittest -v tests/[a-z]*.py
- cli:
dir: .
run: |
(
set -xve;
boom profile list;
boom profile create --name test --short-name test --os-version rhel8 --os-version-id rhel8 --uname-pattern el8;
boom profile list;
boom entry list;
PROFILE=$(boom profile list --name test --no-headings -o osid);
boom entry create --root-lv boomvg/root --title test --profile $PROFILE;
boom entry list;
boom entry delete --title test;
boom profile delete --name test;
)
- testsuite_post:
dir: .
run: |
set -xv;
vgremove -ff boomvg; losetup -D; rm -f /dev/shm/boompv
required_packages:
- boom-boot
- lvm2