From 5283ce36d894237ec0903ff41c1a4bf16cd97e1d Mon Sep 17 00:00:00 2001 From: Richard W.M. Jones Date: May 31 2023 12:02:07 +0000 Subject: Further fix for dnf5 (RHBZ#2211386) --- diff --git a/0001-rpm-New-RPM-database-location-in-usr-lib-sysimage-rp.patch b/0001-rpm-New-RPM-database-location-in-usr-lib-sysimage-rp.patch index 46c94df..585fa81 100644 --- a/0001-rpm-New-RPM-database-location-in-usr-lib-sysimage-rp.patch +++ b/0001-rpm-New-RPM-database-location-in-usr-lib-sysimage-rp.patch @@ -1,7 +1,7 @@ From 86fd6f3e86ab99d54a22b475aecccfc19bdff07e Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 21 Jan 2023 09:38:55 +0000 -Subject: [PATCH 1/4] rpm: New RPM database location in /usr/lib/sysimage/rpm +Subject: [PATCH 1/5] rpm: New RPM database location in /usr/lib/sysimage/rpm A few years ago the RPM database was moved from /var to /usr. This is now feeding through to Linux distros. @@ -46,5 +46,5 @@ index 85557fe..2c199c1 100644 (* Return the best provider of a particular RPM requirement. * -- -2.40.1 +2.37.3 diff --git a/0002-Add-support-for-OCaml-5.0.patch b/0002-Add-support-for-OCaml-5.0.patch index fe527a5..6372301 100644 --- a/0002-Add-support-for-OCaml-5.0.patch +++ b/0002-Add-support-for-OCaml-5.0.patch @@ -1,7 +1,7 @@ From f8774efbe02d3651cde449333cf108e79adba48c Mon Sep 17 00:00:00 2001 From: Kate Date: Wed, 16 Nov 2022 19:30:01 +0000 -Subject: [PATCH 2/4] Add support for OCaml 5.0 +Subject: [PATCH 2/5] Add support for OCaml 5.0 --- src/mode_build.ml | 4 ++-- @@ -94,5 +94,5 @@ index 521d49e..ae99294 100644 let xs = uniq ~cmp xs in xs -- -2.40.1 +2.37.3 diff --git a/0003-Restore-compatibility-with-OCaml-4.07.patch b/0003-Restore-compatibility-with-OCaml-4.07.patch index 6096567..6fd79e4 100644 --- a/0003-Restore-compatibility-with-OCaml-4.07.patch +++ b/0003-Restore-compatibility-with-OCaml-4.07.patch @@ -1,7 +1,7 @@ From 3efe663421d94376694f292ca1fcf2732a82149f Mon Sep 17 00:00:00 2001 From: Kate Date: Wed, 16 Nov 2022 19:59:36 +0000 -Subject: [PATCH 3/4] Restore compatibility with OCaml < 4.07 +Subject: [PATCH 3/5] Restore compatibility with OCaml < 4.07 --- src/mode_build.ml | 6 ++++-- @@ -121,5 +121,5 @@ index ae99294..1dc4310 100644 let xs = uniq ~cmp xs in xs -- -2.40.1 +2.37.3 diff --git a/0004-rpm-Detect-dnf5-and-omit-missing-options.patch b/0004-rpm-Detect-dnf5-and-omit-missing-options.patch index 6a570fd..9d9d7f1 100644 --- a/0004-rpm-Detect-dnf5-and-omit-missing-options.patch +++ b/0004-rpm-Detect-dnf5-and-omit-missing-options.patch @@ -1,7 +1,7 @@ From 92d5d7e8c27088fa3fb8e5e6e9c5b8d3209053d6 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 30 May 2023 09:12:14 +0100 -Subject: [PATCH 4/4] rpm: Detect dnf5 and omit missing options +Subject: [PATCH 4/5] rpm: Detect dnf5 and omit missing options Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2209412 --- @@ -54,5 +54,5 @@ index 2c199c1..3e803c6 100644 let rpms = List.map rpm_of_pkg (PackageSet.elements pkgs) in List.map ( -- -2.40.1 +2.37.3 diff --git a/0005-rpm-Use-dnf-config-instead-of-c.patch b/0005-rpm-Use-dnf-config-instead-of-c.patch new file mode 100644 index 0000000..a9badb1 --- /dev/null +++ b/0005-rpm-Use-dnf-config-instead-of-c.patch @@ -0,0 +1,28 @@ +From 057ea99a3211057d2cb2c9971afe56e0a85e0f78 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Wed, 31 May 2023 12:52:13 +0100 +Subject: [PATCH 5/5] rpm: Use dnf --config instead of -c + +dnf5 does not support -c. dnf4 supports either. + +Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2211386 +--- + src/ph_rpm.ml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/ph_rpm.ml b/src/ph_rpm.ml +index 3e803c6..e94f35f 100644 +--- a/src/ph_rpm.ml ++++ b/src/ph_rpm.ml +@@ -500,7 +500,7 @@ and download_all_packages_with_dnf pkgs dir tdir = + debug_quiet_option + (match !settings.packager_config with + | None -> "" +- | Some filename -> sprintf " -c %s" (quote filename)) ++ | Some filename -> sprintf " --config=%s" (quote filename)) + (if not is_dnf5 then " --disableexcludes=all" else "") + (quote tdir) + (quoted_list rpms) in +-- +2.37.3 + diff --git a/supermin.spec b/supermin.spec index 6400ae3..3400731 100644 --- a/supermin.spec +++ b/supermin.spec @@ -31,7 +31,7 @@ Summary: Tool for creating supermin appliances Name: supermin Version: 5.3.3 -Release: 6%{?dist} +Release: 7%{?dist} License: GPLv2+ ExclusiveArch: %{kernel_arches} @@ -53,6 +53,8 @@ Patch: 0002-Add-support-for-OCaml-5.0.patch Patch: 0003-Restore-compatibility-with-OCaml-4.07.patch # dnf5 (https://bugzilla.redhat.com/show_bug.cgi?id=2209412): Patch: 0004-rpm-Detect-dnf5-and-omit-missing-options.patch +# dnf5 (https://bugzilla.redhat.com/show_bug.cgi?id=2211386) +Patch: 0005-rpm-Use-dnf-config-instead-of-c.patch BuildRequires: gcc BuildRequires: make @@ -197,6 +199,9 @@ make check || { %changelog +* Wed May 31 2023 Richard W.M. Jones - 5.3.3-7 +- Further fix for dnf5 (RHBZ#2211386) + * Tue May 30 2023 Richard W.M. Jones - 5.3.3-6 - Add support for dnf5 (RHBZ#2209412)