From a6ad58f962fed653109b190b5bfe16850a91f4d8 Mon Sep 17 00:00:00 2001 From: Zdenek Veleba Date: Sun, 18 Jul 2021 22:48:11 +0200 Subject: [PATCH 1/2] Fix val2bool not working with str objects It seems that in some python versions spec files are not loaded as unicode. --- bin/ddiskit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/ddiskit b/bin/ddiskit index cc323e6..8a67bfa 100644 --- a/bin/ddiskit +++ b/bin/ddiskit @@ -455,7 +455,7 @@ def val2bool(val): return val if isinstance(val, (int, long)): return val != 0 - if isinstance(val, u"".__class__): + if isinstance(val, u"".__class__) or isinstance(val, str): val = val.lower() if val in ("t", "y", "true", "yes", "1"): From 7d59568d74db0bcc95b340b630820bbcdf08e58f Mon Sep 17 00:00:00 2001 From: Zdenek Veleba Date: Fri, 20 Aug 2021 13:51:33 +0200 Subject: [PATCH 2/2] Fix spec template for RHEL-9 On RHEL-9 nothing provides kernel-abi-whitelists, now there is kernel-abi-stablelists instead. --- templates/spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/templates/spec b/templates/spec index f561083..05d7d58 100644 --- a/templates/spec +++ b/templates/spec @@ -21,7 +21,9 @@ %endif %if "%{kmod_dist_build_deps}" == "" -%if (0%{?rhel} > 7) || (0%{?centos} > 7) +%if (0%{?rhel} > 8) || (0%{?centos} > 8) +%define kmod_dist_build_deps redhat-rpm-config kernel-abi-stablelists elfutils-libelf-devel kernel-rpm-macros kmod +%elif (0%{?rhel} > 7) || (0%{?centos} > 7) %define kmod_dist_build_deps redhat-rpm-config kernel-abi-whitelists elfutils-libelf-devel kernel-rpm-macros kmod %else %define kmod_dist_build_deps redhat-rpm-config kernel-abi-whitelists