Additional patches for boom 1.1

This commit is contained in:
Marian Csontos 2020-05-26 15:43:30 +02:00
parent 1b968767b3
commit b4e6b4f5d5
5 changed files with 77 additions and 1 deletions

View File

@ -0,0 +1,16 @@
boom/cache.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/boom/cache.py b/boom/cache.py
index 1dc5e07..cf7de47 100644
--- a/boom/cache.py
+++ b/boom/cache.py
@@ -238,7 +238,7 @@ def load_cache(verify=True, digests=False):
images = cachedata["images"]
for image_id in images.keys():
if image_id not in ids:
- _log_warn("Found orphan image_id '%s'" % image)
+ _log_warn("Found orphan image_id '%s'" % image_id)
# clean up?
_log_debug("Loaded %d cache paths and %d images" %

View File

@ -0,0 +1,16 @@
boom/bootloader.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/boom/bootloader.py b/boom/bootloader.py
index 3148de2..e0367cb 100644
--- a/boom/bootloader.py
+++ b/boom/bootloader.py
@@ -840,6 +840,8 @@ def load_entries(machine_id=None):
except Exception as e:
_log_info("Could not load BootEntry '%s': %s" %
(entry_path, e))
+ if get_debug_mask():
+ raise e
_log_debug("Loaded %d entries" % len(_entries))

View File

@ -0,0 +1,16 @@
boom/_boom.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/boom/_boom.py b/boom/_boom.py
index 0cb65d1..690386e 100644
--- a/boom/_boom.py
+++ b/boom/_boom.py
@@ -1012,6 +1012,8 @@ def load_profiles_for_class(profile_class, profile_type,
except Exception as e:
_log_warn("Failed to load %s from '%s': %s" %
(profile_class.__name__, pf_path, e))
+ if get_debug_mask():
+ raise e
continue

View File

@ -0,0 +1,16 @@
boom/bootloader.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/boom/bootloader.py b/boom/bootloader.py
index e0367cb..3d8eede 100644
--- a/boom/bootloader.py
+++ b/boom/bootloader.py
@@ -352,7 +352,7 @@ def _grub2_get_env(name):
_log_error("Could not obtain grub2 environment: %s" % e)
return ""
- for line in out.splitlines():
+ for line in out.decode('utf8').splitlines():
(env_name, value) = line.split('=', 1)
if name == env_name:
return value.strip()

View File

@ -3,7 +3,7 @@
Name: boom-boot
Version: 1.1
Release: 2%{?dist}
Release: 3%{?dist}
Summary: %{summary}
License: GPLv2
@ -11,6 +11,10 @@ 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
Patch3: 0003-boom.cache-use-correct-variable-in-load_cache-warnin.patch
Patch4: 0004-boom.bootloader-raise-exceptions-in-load_entries-if-.patch
Patch5: 0005-boom-raise-exceptions-in-load_profiles_for_class-if-.patch
Patch6: 0006-boom.bootloader-decode-bytes-output-of-grub2-editenv.patch
BuildArch: noarch
@ -85,6 +89,10 @@ This package provides integration scripts for grub2 bootloader.
# NOTE: Do not use backup extension - MANIFEST.in is picking them
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%build
%if 0%{?sphinx_docs}
@ -157,6 +165,10 @@ rm doc/conf.py
%changelog
* Tue May 26 2020 Marian Csontos <mcsontos@redhat.com> 1.1-3
- Fix unicode entries handling.
- Add tracebacks when --debug is used.
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 1.1-2
- Rebuilt for Python 3.9