import boom-boot-1.3-2.el8

This commit is contained in:
CentOS Sources 2021-11-09 05:07:12 -05:00 committed by Stepan Oksanichenko
parent 8e3e525652
commit 83e50ef4c6
4 changed files with 97 additions and 2 deletions

View File

@ -0,0 +1,16 @@
boom/report.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/boom/report.py b/boom/report.py
index 8e55aa3..f7ff4a1 100644
--- a/boom/report.py
+++ b/boom/report.py
@@ -121,7 +121,7 @@ class BoomReportOpts(object):
class BoomReportObjType(object):
"""BoomReportObjType()
- Class representing a type of objecct to be reported on.
+ Class representing a type of object to be reported on.
Instances of ``BoomReportObjType`` must specify an identifier,
a description, and a data function that will return the correct
type of object from a compound object containing data objects

View File

@ -0,0 +1,16 @@
boom/command.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/boom/command.py b/boom/command.py
index be638df..c9c2f6b 100644
--- a/boom/command.py
+++ b/boom/command.py
@@ -657,7 +657,7 @@ def create_entry(title, version, machine_id, root_device, lvm_root_lv=None,
:returns: a ``BootEntry`` object corresponding to the new entry.
:rtype: ``BootEntry``
:raises: ``ValueError`` if either required values are missing or
- a duplicate entry exists, or``OsError`` if an error
+ a duplicate entry exists, or ``OsError`` if an error
occurs while writing the entry file.
"""
if not title and not profile.title:

View File

@ -0,0 +1,54 @@
boom/command.py | 5 +++--
tests/command_tests.py | 16 ++++++++++++++++
2 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/boom/command.py b/boom/command.py
index c9c2f6b..feb5b65 100644
--- a/boom/command.py
+++ b/boom/command.py
@@ -1883,7 +1883,8 @@ def _optional_key_to_arg(optional_key):
_key_map = {
BOOM_ENTRY_GRUB_USERS: "--grub-users",
BOOM_ENTRY_GRUB_ARG: "--grub-arg",
- BOOM_ENTRY_GRUB_CLASS: "--grub-class"
+ BOOM_ENTRY_GRUB_CLASS: "--grub-class",
+ BOOM_ENTRY_GRUB_ID: "--grub-id"
}
return _key_map[optional_key] if optional_key in _key_map else None
@@ -1914,7 +1915,7 @@ def _set_optional_key_defaults(profile, cmd_args):
if bls_key not in profile.optional_keys:
if getattr(cmd_args, bls_key) is not None:
print("Profile with os_id='%s' does not support %s" %
- (profile.disp_os_id, _optional_key_to_arg(bls_key)))
+ (profile.disp_os_id, _optional_key_to_arg(opt_key)))
return 1
else:
if getattr(cmd_args, bls_key) is None:
diff --git a/tests/command_tests.py b/tests/command_tests.py
index 00cda3b..d7a766a 100644
--- a/tests/command_tests.py
+++ b/tests/command_tests.py
@@ -244,6 +244,22 @@ class CommandHelperTests(unittest.TestCase):
(add_opts, del_opts) = _merge_add_del_opts(bp, to_add, to_del)
self.assertEqual(["log_buf_len=16M", "debug"], add_opts)
+ def test__optional_key_to_arg_valid(self):
+ _optional_key_to_arg = boom.command._optional_key_to_arg
+ valid_keys_and_args = {
+ "BOOM_ENTRY_GRUB_USERS": "--grub-users",
+ "BOOM_ENTRY_GRUB_ARG": "--grub-arg",
+ "BOOM_ENTRY_GRUB_CLASS": "--grub-class",
+ "BOOM_ENTRY_GRUB_ID": "--grub-id"
+ }
+ for opt_key in valid_keys_and_args.keys():
+ self.assertEqual(_optional_key_to_arg(opt_key),
+ valid_keys_and_args[opt_key])
+
+ def test__optional_key_to_arg_invalid(self):
+ _optional_key_to_arg = boom.command._optional_key_to_arg
+ self.assertEqual(_optional_key_to_arg("INVALID_KEY"), None)
+
# Default test OsProfile identifiers
test_os_id = "9cb53ddda889d6285fd9ab985a4c47025884999f"

View File

@ -3,7 +3,7 @@
Name: boom-boot
Version: 1.3
Release: 1%{?dist}
Release: 2%{?dist}
Summary: %{summary}
License: GPLv2
@ -12,7 +12,10 @@ Source0: https://github.com/snapshotmanager/boom/archive/%{version}/boom-%{versi
Patch0: Disable-GRUB2-plugin-on-RHEL-8.patch
Patch1: 0001-etc-Remove-executable-permission-from-etc-default-bo.patch
Patch2: 0002-man-Fix-line-starting-with.patch
Patch3: 0003-report-fix-docstring-typo-objecct.patch
Patch4: 0004-command-fix-docstring-typo-or-OsError.patch
# BZ 1929838:
Patch5: 0005-command-fix-optional-BLS-key-to-command-line-argumen.patch
BuildArch: noarch
@ -92,6 +95,9 @@ This package provides integration scripts for grub2 bootloader.
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%build
%if 0%{?sphinx_docs}
@ -166,6 +172,9 @@ rm doc/conf.py
%changelog
* Tue Jun 15 2021 Marian Csontos <mcsontos@redhat.com> 1.3-2
- Fix --grub-id option handling.
* Sat Jan 30 2021 Marian Csontos <mcsontos@redhat.com> 1.3-1
- Check for duplicates consistently in the clone and edit commands.
- Apply correct command line precedence to --add-opts and --del-opts.