From cbe7217e249aaaaccd3e2596241cd22ecc019a99 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Nov 05 2019 21:27:57 +0000 Subject: import boom-boot-1.0-0.2.20190610git246b116.el8 --- diff --git a/.boom-boot.metadata b/.boom-boot.metadata index aa7a36e..dd5913f 100644 --- a/.boom-boot.metadata +++ b/.boom-boot.metadata @@ -1 +1 @@ -dd96613e238f342641b5be8977ee8598662e8ab9 SOURCES/boom-0.9.tar.gz +03a68ddf109a1c53f45cf62e7f72e48893b60658 SOURCES/boom-246b116.tar.gz diff --git a/.gitignore b/.gitignore index 972a8fd..4271ba1 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/boom-0.9.tar.gz +SOURCES/boom-246b116.tar.gz diff --git a/SOURCES/Reduce-log-level-of-Could-not-load-BootEntry.patch b/SOURCES/Reduce-log-level-of-Could-not-load-BootEntry.patch deleted file mode 100644 index 8d5d33d..0000000 --- a/SOURCES/Reduce-log-level-of-Could-not-load-BootEntry.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 13ed30d16790d0ee205c8acc5bead3133845a9ac Mon Sep 17 00:00:00 2001 -From: "Bryn M. Reeves" -Date: Tue, 8 Jan 2019 16:48:19 +0000 -Subject: [PATCH] boom: reduce log level of "Could not load BootEntry" messages - -On systems where other BLS implementations are in use, and where -those entries use non-standard BLS keys, boom will emit a warning -message for each foreign entry found. This is noisy and of little -use to end users: reduce the log message to "info" level, making -these errors silent without increased verbosity. - -Signed-off-by: Bryn M. Reeves -(cherry picked from commit 40ddddf5c1fa14cd7d39731fd545fe02aab328d0) ---- - boom/bootloader.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/boom/bootloader.py b/boom/bootloader.py -index cf50b4e..bc86cb8 100644 ---- a/boom/bootloader.py -+++ b/boom/bootloader.py -@@ -504,7 +504,7 @@ def load_entries(machine_id=None): - try: - _add_entry(BootEntry(entry_file=entry_path)) - except Exception as e: -- _log_warn("Could not load BootEntry '%s': %s" % -+ _log_info("Could not load BootEntry '%s': %s" % - (entry_path, e)) - - _log_info("Loaded %d entries" % len(_entries)) --- -1.8.3.1 - diff --git a/SOURCES/bootloader-raise-LookupError-on-unknown-BLS-keys.patch b/SOURCES/bootloader-raise-LookupError-on-unknown-BLS-keys.patch deleted file mode 100644 index b832cca..0000000 --- a/SOURCES/bootloader-raise-LookupError-on-unknown-BLS-keys.patch +++ /dev/null @@ -1,70 +0,0 @@ -From eda695b6cda61a5f1901479b6a0b22d8ba1ed96b Mon Sep 17 00:00:00 2001 -From: "Bryn M. Reeves" -Date: Wed, 9 Jan 2019 15:20:27 +0000 -Subject: [PATCH] bootloader: raise LookupError on unknown BLS keys - -When loading a BootEntry from file, if an unknown BLS key is read -a generic KeyError is raised when attempting to access a key in -the MAP_KEY (bls-to-boom key name map) dictionary. This leads to -a fairly cryptic error message: - - # boom list -V --debug all - INFO - Could not load BootEntry '/boot/loader/entries/611f38fd887d41dea7eb3403b2730a76-4.15.17-200.fc26.x86_64.conf': 'id' - -With --debug=all the cause is a little more obvious: - - # boom list --debug all - Traceback (most recent call last): - File "bin/boom", line 7, in - main(sys.argv) - File "/home/breeves/src/git/boom/boom/command.py", line 1951, in main - status = command[1](cmd_args, select, opts, identifier) - File "/home/breeves/src/git/boom/boom/command.py", line 1287, in _list_cmd - opts=opts, sort_keys=cmd_args.sort) - File "/home/breeves/src/git/boom/boom/command.py", line 631, in print_entries - bes = find_entries(selection=selection) - File "/home/breeves/src/git/boom/boom/bootloader.py", line 769, in find_entries - load_entries() - File "/home/breeves/src/git/boom/boom/bootloader.py", line 659, in load_entries - _add_entry(BootEntry(entry_file=entry_path)) - File "/home/breeves/src/git/boom/boom/bootloader.py", line 1310, in __init__ - return self.__from_file(entry_file, boot_params) - File "/home/breeves/src/git/boom/boom/bootloader.py", line 1229, in __from_file - key = MAP_KEY[_transform_key(bls_key)] - KeyError: 'id' - -Instead, raise the exception explicitly if the key is not present, -and set the exception string to a meaningful error: - - INFO - Could not load BootEntry '/boot/loader/entries/611f38fd887d41dea7eb3403b2730a76-4.15.17-200.fc26.x86_64.conf': Unknown BLS key 'id' - -The more specific KeyError is not used here since it is specific -to dictionary lookup failures. - -Signed-off-by: Bryn M. Reeves -(cherry picked from commit 72a67d8beba4c4f36d1c0682a6628b2a823041a4) - -Conflicts: - boom/bootloader.py ---- - boom/bootloader.py | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/boom/bootloader.py b/boom/bootloader.py -index bc86cb8..dd2a53a 100644 ---- a/boom/bootloader.py -+++ b/boom/bootloader.py -@@ -1067,6 +1067,10 @@ class BootEntry(object): - comment += line if line else "" - else: - bls_key, value = _parse_name_value(line, separator=None) -+ # Convert BLS key name to Boom notation -+ key = _transform_key(bls_key) -+ if key not in MAP_KEY: -+ raise LookupError("Unknown BLS key '%s'" % bls_key) - key = MAP_KEY[_transform_key(bls_key)] - entry_data[key] = value - if comment: --- -1.8.3.1 - diff --git a/SPECS/boom-boot.spec b/SPECS/boom-boot.spec index ad3bb06..6c8e58a 100644 --- a/SPECS/boom-boot.spec +++ b/SPECS/boom-boot.spec @@ -1,17 +1,18 @@ %global summary A set of libraries and tools for managing boot loader entries %global sphinx_docs 1 +%global commit 246b116e58c1efd194707f71fe6e96243320d8bf +%global shortcommit %(c=%{commit}; echo ${c:0:7}) + Name: boom-boot -Version: 0.9 -Release: 7%{?dist} +Version: 1.0 +Release: 0.2.20190610git%{shortcommit}%{?dist} Summary: %{summary} License: GPLv2 URL: https://github.com/bmr-cymru/boom -Source0: https://github.com/bmr-cymru/boom/archive/%{version}/boom-%{version}.tar.gz +Source0: https://github.com/bmr-cymru/boom/archive/%{commit}/boom-%{shortcommit}.tar.gz Patch0: Disable-GRUB2-plugin-on-RHEL-8.patch -Patch1: Reduce-log-level-of-Could-not-load-BootEntry.patch -Patch2: bootloader-raise-LookupError-on-unknown-BLS-keys.patch BuildArch: noarch @@ -21,15 +22,18 @@ BuildRequires: python3-devel BuildRequires: python3-sphinx %endif -Requires: python3-boom -Requires: %{name}-conf +Requires: python3-boom = %{version}-%{release} +Requires: %{name}-conf = %{version}-%{release} %package -n python3-boom Summary: %{summary} -%{?python_provide:%python_provide python3-boom} +# Unsupported on RHEL-8 :-( +#%%{?python_provide:%%python_provide python%{__python_pkgversion}-boom} +# Do we need this??? IMO not +#Provides: python3-boom = %%{version}-%%{release} Requires: %{__python3} Recommends: (lvm2 or brtfs-progs) -Recommends: %{name}-conf +Recommends: %{name}-conf = %{version}-%{release} # There used to be a boom package in fedora, and there is boom packaged in # copr. How to tell which one is installed? We need python3-boom and no boom @@ -41,7 +45,7 @@ Summary: %{summary} %package grub2 Summary: %{summary} -Supplements: (grub2 and boom-boot) +Supplements: (grub2 and boom-boot = %{version}-%{release}) %description Boom is a boot manager for Linux systems using boot loaders that support @@ -82,11 +86,9 @@ include this support in both Red Hat Enterprise Linux 7 and Fedora). This package provides integration scripts for grub2 bootloader. %prep -%setup -q -n boom-%{version} +%setup -n boom-%{commit} # NOTE: Do not use backup extension - MANIFEST.in is picking them %patch0 -p1 -%patch1 -p1 -%patch2 -p1 %build %if 0%{?sphinx_docs} @@ -110,6 +112,7 @@ 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 +install -d -m 700 ${RPM_BUILD_ROOT}/boot/boom/hosts install -d -m 700 ${RPM_BUILD_ROOT}/boot/loader/entries install -m 644 examples/boom.conf ${RPM_BUILD_ROOT}/boot/boom @@ -145,6 +148,7 @@ rm doc/conf.py %dir /boot/boom %config(noreplace) /boot/boom/boom.conf %dir /boot/boom/profiles +%dir /boot/boom/hosts %dir /boot/loader/entries %files grub2 @@ -155,6 +159,12 @@ rm doc/conf.py %changelog +* Mon Jun 10 2019 Marian Csontos 1.0-0.2.20190610git246b116 +- Fix packaging issues. + +* Mon May 06 2019 Marian Csontos 1.0-0.1.20190329git6ff3e08 +- Test upstream packaging. + * Mon Jan 14 2019 Marian Csontos 0.9-7 - Reduce log level of "Could not load BootEntry" messages. - Raise more appropriate LookupError on unknown BLS keys.