From efe60d86108e42974c0c7d300b95a45d8adeb462 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Nov 09 2021 10:07:12 +0000 Subject: import boom-boot-1.3-2.el8 --- diff --git a/SOURCES/0003-report-fix-docstring-typo-objecct.patch b/SOURCES/0003-report-fix-docstring-typo-objecct.patch new file mode 100644 index 0000000..4610b09 --- /dev/null +++ b/SOURCES/0003-report-fix-docstring-typo-objecct.patch @@ -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 diff --git a/SOURCES/0004-command-fix-docstring-typo-or-OsError.patch b/SOURCES/0004-command-fix-docstring-typo-or-OsError.patch new file mode 100644 index 0000000..db01831 --- /dev/null +++ b/SOURCES/0004-command-fix-docstring-typo-or-OsError.patch @@ -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: diff --git a/SOURCES/0005-command-fix-optional-BLS-key-to-command-line-argumen.patch b/SOURCES/0005-command-fix-optional-BLS-key-to-command-line-argumen.patch new file mode 100644 index 0000000..ef83d6a --- /dev/null +++ b/SOURCES/0005-command-fix-optional-BLS-key-to-command-line-argumen.patch @@ -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" diff --git a/SPECS/boom-boot.spec b/SPECS/boom-boot.spec index 25a2c39..8a5c6a4 100644 --- a/SPECS/boom-boot.spec +++ b/SPECS/boom-boot.spec @@ -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 1.3-2 +- Fix --grub-id option handling. + * Sat Jan 30 2021 Marian Csontos 1.3-1 - Check for duplicates consistently in the clone and edit commands. - Apply correct command line precedence to --add-opts and --del-opts.