Update boom-boot to upstream version 1.4
This commit is contained in:
parent
31cf8ae65e
commit
804b00fca8
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,3 +4,4 @@
|
||||
/boom-1.1.tar.gz
|
||||
/boom-1.2.tar.gz
|
||||
/boom-1.3.tar.gz
|
||||
/boom-1.4.tar.gz
|
||||
|
@ -1,22 +0,0 @@
|
||||
etc/default/boom | 0
|
||||
tests/bootloader_configs/boom_off/etc/default/boom | 0
|
||||
tests/bootloader_configs/boom_on/etc/default/boom | 0
|
||||
tests/bootloader_configs/no_grub_d/etc/default/boom | 0
|
||||
4 files changed, 0 insertions(+), 0 deletions(-)
|
||||
mode change 100755 => 100644 etc/default/boom
|
||||
mode change 100755 => 100644 tests/bootloader_configs/boom_off/etc/default/boom
|
||||
mode change 100755 => 100644 tests/bootloader_configs/boom_on/etc/default/boom
|
||||
mode change 100755 => 100644 tests/bootloader_configs/no_grub_d/etc/default/boom
|
||||
|
||||
diff --git a/etc/default/boom b/etc/default/boom
|
||||
old mode 100755
|
||||
new mode 100644
|
||||
diff --git a/tests/bootloader_configs/boom_off/etc/default/boom b/tests/bootloader_configs/boom_off/etc/default/boom
|
||||
old mode 100755
|
||||
new mode 100644
|
||||
diff --git a/tests/bootloader_configs/boom_on/etc/default/boom b/tests/bootloader_configs/boom_on/etc/default/boom
|
||||
old mode 100755
|
||||
new mode 100644
|
||||
diff --git a/tests/bootloader_configs/no_grub_d/etc/default/boom b/tests/bootloader_configs/no_grub_d/etc/default/boom
|
||||
old mode 100755
|
||||
new mode 100644
|
@ -1,3 +1,13 @@
|
||||
From 841e7d3d0dc7ad194e0b82d8cd0930cef1a95301 Mon Sep 17 00:00:00 2001
|
||||
From: Marian Csontos <mcsontos@redhat.com>
|
||||
Date: Fri, 29 Nov 2019 10:23:44 +0100
|
||||
Subject: [PATCH 1/5] man: Fix line starting with '
|
||||
|
||||
Lines starting with ' result in macro not defined warnings:
|
||||
|
||||
1117: warning: macro `boom' not defined
|
||||
1118: warning: macro `+'' not defined
|
||||
---
|
||||
man/man8/boom.8 | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
@ -16,3 +26,6 @@ index 7b862e7..9eee048 100644
|
||||
field list. Otherwise the given list of fields replaces the default set
|
||||
of report fields.
|
||||
|
||||
--
|
||||
2.34.3
|
||||
|
@ -0,0 +1,43 @@
|
||||
From a3e33031fb4051eb9d76f950b536b513c58be861 Mon Sep 17 00:00:00 2001
|
||||
From: "Bryn M. Reeves" <bmr@redhat.com>
|
||||
Date: Tue, 14 Jun 2022 07:47:04 -0400
|
||||
Subject: [PATCH 2/5] boom.bootloader: initialise _last_path before parsing
|
||||
BootEntry
|
||||
|
||||
The path from which a boot entry was read can be useful context for
|
||||
logging messages, particularly when a boot entry has been corrupted or
|
||||
manually edited (so that the boot_id no longer matches the expected
|
||||
value).
|
||||
|
||||
Move the initialisation of this member before parsing the boot entry, so
|
||||
that the value is available for log messages.
|
||||
|
||||
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
||||
(cherry picked from commit fafa77556e442fe4f016c23eb9739f1015fa9eb8)
|
||||
---
|
||||
boom/bootloader.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/boom/bootloader.py b/boom/bootloader.py
|
||||
index aa9131f..185195d 100644
|
||||
--- a/boom/bootloader.py
|
||||
+++ b/boom/bootloader.py
|
||||
@@ -1484,6 +1484,7 @@ class BootEntry(object):
|
||||
|
||||
entry_basename = basename(entry_file)
|
||||
_log_debug("Loading BootEntry from '%s'" % entry_basename)
|
||||
+ self._last_path = entry_file
|
||||
|
||||
with open(entry_file, "r") as ef:
|
||||
for line in ef:
|
||||
@@ -1536,7 +1537,6 @@ class BootEntry(object):
|
||||
entry_basename)
|
||||
self.read_only = True
|
||||
|
||||
- self._last_path = entry_file
|
||||
self._unwritten = False
|
||||
|
||||
def __init__(self, title=None, machine_id=None, osprofile=None,
|
||||
--
|
||||
2.34.3
|
||||
|
@ -0,0 +1,47 @@
|
||||
From faf43a2b923dd2e558da1e48978541389844f464 Mon Sep 17 00:00:00 2001
|
||||
From: "Bryn M. Reeves" <bmr@redhat.com>
|
||||
Date: Tue, 14 Jun 2022 07:50:11 -0400
|
||||
Subject: [PATCH 3/5] boom.bootloader: improve warning for entries with no
|
||||
root_device
|
||||
|
||||
A boot entry with no root_device= is invalid. Log the path to the file
|
||||
rather than the boot_id since this may have changed if the entry is
|
||||
corrupt/modified, and is not included in the file name for system
|
||||
provided boot entries.
|
||||
|
||||
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
||||
(cherry picked from commit b70d2ad6a4b8f7ef7816426bcb18b6f247a52dca)
|
||||
---
|
||||
boom/bootloader.py | 3 +--
|
||||
tests/bootloader_tests.py | 1 +
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/boom/bootloader.py b/boom/bootloader.py
|
||||
index 185195d..bbf7fd5 100644
|
||||
--- a/boom/bootloader.py
|
||||
+++ b/boom/bootloader.py
|
||||
@@ -720,8 +720,7 @@ class BootParams(object):
|
||||
# The root_device key is handled specially since it is required
|
||||
# for a valid BootEntry.
|
||||
if name == 'root_device' and not value:
|
||||
- _log_warn("Entry with boot_id=%s has no root_device"
|
||||
- % be.boot_id)
|
||||
+ _log_warn("No root_device for entry at %s" % be._last_path)
|
||||
setattr(bp, name, "")
|
||||
|
||||
def is_add(opt):
|
||||
diff --git a/tests/bootloader_tests.py b/tests/bootloader_tests.py
|
||||
index 129000d..ace82bd 100644
|
||||
--- a/tests/bootloader_tests.py
|
||||
+++ b/tests/bootloader_tests.py
|
||||
@@ -158,6 +158,7 @@ class MockBootEntry(object):
|
||||
expand_options = "root=/dev/mapper/rhel-root ro rhgb quiet"
|
||||
_osp = None
|
||||
_entry_data = {}
|
||||
+ _last_path = "/some/path/to/somewhere"
|
||||
|
||||
|
||||
class BootEntryBasicTests(unittest.TestCase):
|
||||
--
|
||||
2.34.3
|
||||
|
@ -0,0 +1,46 @@
|
||||
From 31f95734f0d6f90f256754377207f5373ff9015c Mon Sep 17 00:00:00 2001
|
||||
From: "Bryn M. Reeves" <bmr@redhat.com>
|
||||
Date: Tue, 14 Jun 2022 07:54:29 -0400
|
||||
Subject: [PATCH 4/5] boom.bootloader: do not allow deletion of read-only boot
|
||||
entries
|
||||
|
||||
Currently when attempting to delete an entry that has been marked
|
||||
read-only boom generates a misleading error message:
|
||||
|
||||
# boom delete 7fce1e5
|
||||
Entry does not exist: /boot/loader/entries/619c4d9f1efa4cf7bd76f149f12138a0-7fce1e5-5.14.0-108.el9.x86_64.conf
|
||||
|
||||
Boom should not attempt to delete entries that are marked read-only;
|
||||
these are either system provided entries, or entries that have been
|
||||
modified outside of boom's control. Reject attempts to delete these
|
||||
with an error that indicates the reason they cannot be removed:
|
||||
|
||||
# boom delete f6f8df5
|
||||
Cannot delete read-only boot entry: /boot/loader/entries/68f613d8774e41e792fad28212cfedae-4.18.0-348.el8.x86_64.conf
|
||||
|
||||
Resolves: #10
|
||||
|
||||
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
||||
(cherry picked from commit 42f66737e1d7dec432cd7fc330f87304a585c308)
|
||||
---
|
||||
boom/bootloader.py | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/boom/bootloader.py b/boom/bootloader.py
|
||||
index bbf7fd5..a81ea84 100644
|
||||
--- a/boom/bootloader.py
|
||||
+++ b/boom/bootloader.py
|
||||
@@ -2445,6 +2445,10 @@ class BootEntry(object):
|
||||
:raises: ``OsError`` if an error occurs removing the file or
|
||||
``ValueError`` if the entry does not exist.
|
||||
"""
|
||||
+ if self.read_only:
|
||||
+ raise ValueError("Cannot delete read-only boot "
|
||||
+ "entry: %s" % self._last_path)
|
||||
+
|
||||
if not path_exists(self._entry_path):
|
||||
raise ValueError("Entry does not exist: %s" % self._entry_path)
|
||||
try:
|
||||
--
|
||||
2.34.3
|
||||
|
@ -0,0 +1,35 @@
|
||||
From cd0c4e28b0b2de9000edd5b4b56612d610337552 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 5/5] 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>
|
||||
(cherry picked from commit 0cb2d8da9de6fa01ebc5193e7ab6710a9c7b7125)
|
||||
---
|
||||
boom/command.py | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/boom/command.py b/boom/command.py
|
||||
index 0ef66ee..07c0616 100644
|
||||
--- a/boom/command.py
|
||||
+++ b/boom/command.py
|
||||
@@ -1094,9 +1094,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.34.3
|
||||
|
@ -2,21 +2,26 @@
|
||||
%global sphinx_docs 1
|
||||
|
||||
Name: boom-boot
|
||||
Version: 1.3
|
||||
Release: 5%{?dist}
|
||||
Version: 1.4
|
||||
Release: 1%{?dist}
|
||||
Summary: %{summary}
|
||||
|
||||
License: GPLv2
|
||||
URL: https://github.com/snapshotmanager/boom
|
||||
Source0: https://github.com/snapshotmanager/boom/archive/%{version}/boom-%{version}.tar.gz
|
||||
Patch1: 0001-etc-Remove-executable-permission-from-etc-default-bo.patch
|
||||
Patch2: 0002-man-Fix-line-starting-with.patch
|
||||
Patch1: 0001-man-Fix-line-starting-with.patch
|
||||
Patch2: 0002-boom.bootloader-initialise-_last_path-before-parsing.patch
|
||||
Patch3: 0003-boom.bootloader-improve-warning-for-entries-with-no-.patch
|
||||
Patch4: 0004-boom.bootloader-do-not-allow-deletion-of-read-only-b.patch
|
||||
Patch5: 0005-boom.command-add-new-os-release-values-to-Red-Hat-op.patch
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: make
|
||||
BuildRequires: python3-setuptools
|
||||
BuildRequires: python3-devel
|
||||
%if 0%{?sphinx_docs}
|
||||
BuildRequires: python3-dbus
|
||||
BuildRequires: python3-sphinx
|
||||
%endif
|
||||
BuildRequires: make
|
||||
@ -24,6 +29,10 @@ BuildRequires: make
|
||||
Requires: python3-boom = %{version}-%{release}
|
||||
Requires: %{name}-conf = %{version}-%{release}
|
||||
|
||||
Obsoletes: boom-boot-grub2 <= 1.3
|
||||
# boom-grub2 was not an official name of subpackage in fedora, but was used upstream:
|
||||
Obsoletes: boom-grub2 <= 1.3
|
||||
|
||||
%package -n python3-boom
|
||||
Summary: %{summary}
|
||||
%{?python_provide:%python_provide python3-boom}
|
||||
@ -39,10 +48,6 @@ Conflicts: boom
|
||||
%package conf
|
||||
Summary: %{summary}
|
||||
|
||||
%package grub2
|
||||
Summary: %{summary}
|
||||
Supplements: (grub2 and boom-boot = %{version}-%{release})
|
||||
|
||||
%description
|
||||
Boom is a boot manager for Linux systems using boot loaders that support
|
||||
the BootLoader Specification for boot entry configuration.
|
||||
@ -71,21 +76,14 @@ include this support in both Red Hat Enterprise Linux 7 and Fedora).
|
||||
|
||||
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
|
||||
%setup -n boom-%{version}
|
||||
# NOTE: Do not use backup extension - MANIFEST.in is picking them
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
|
||||
%build
|
||||
%if 0%{?sphinx_docs}
|
||||
@ -100,12 +98,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
|
||||
@ -113,7 +105,7 @@ install -d -m 700 ${RPM_BUILD_ROOT}/boot/boom/hosts
|
||||
install -d -m 700 ${RPM_BUILD_ROOT}/boot/loader/entries
|
||||
install -d -m 700 ${RPM_BUILD_ROOT}/boot/boom/cache
|
||||
install -m 644 examples/boom.conf ${RPM_BUILD_ROOT}/boot/boom
|
||||
install -m 644 examples/profiles/*.profile ${RPM_BUILD_ROOT}/boot/boom/profiles
|
||||
#install -m 644 examples/profiles/*.profile ${RPM_BUILD_ROOT}/boot/boom/profiles
|
||||
|
||||
mkdir -p ${RPM_BUILD_ROOT}/%{_mandir}/man8
|
||||
mkdir -p ${RPM_BUILD_ROOT}/%{_mandir}/man5
|
||||
@ -147,19 +139,15 @@ rm doc/conf.py
|
||||
%dir /boot/boom
|
||||
%config(noreplace) /boot/boom/boom.conf
|
||||
%dir /boot/boom/profiles
|
||||
%config(noreplace) /boot/boom/profiles/*
|
||||
%dir /boot/boom/hosts
|
||||
%dir /boot/boom/cache
|
||||
%dir /boot/loader/entries
|
||||
|
||||
%files grub2
|
||||
%license COPYING
|
||||
%doc README.md
|
||||
%{_sysconfdir}/grub.d/42_boom
|
||||
%config(noreplace) %{_sysconfdir}/default/boom
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Jul 13 2022 Marian Csontos <mcsontos@redhat.com> 1.4-1
|
||||
- Update to release 1.4.
|
||||
|
||||
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 1.3-5
|
||||
- Rebuilt for Python 3.11
|
||||
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (boom-1.3.tar.gz) = b11ba8c81b2d70104181065620948f51b0999dbccff42b7af71e31a0c1ab3e3730dab739be7f08024f0df1eafabc4e33b747518e816b314a54d30769c5622b0a
|
||||
SHA512 (boom-1.4.tar.gz) = f2f4ee658a8f1b670b0dd15c56a7f7c9eef047e2ca9aeaa7c54c619e68428c8225c3c115d2d12f0b055091752e8ee5c8be266ddb49ae4a036c6aa7cf32e03861
|
||||
|
Loading…
Reference in New Issue
Block a user