From 1a507fd40142cc282dc8b63b1f14a31508bf480c Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 24 Jan 2023 10:35:30 +0000 Subject: [PATCH 01/33] Rebuild OCaml packages for F38 --- supermin.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/supermin.spec b/supermin.spec index d162e84..a71467e 100644 --- a/supermin.spec +++ b/supermin.spec @@ -31,7 +31,7 @@ Summary: Tool for creating supermin appliances Name: supermin Version: 5.3.3 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ ExclusiveArch: %{kernel_arches} @@ -190,6 +190,9 @@ make check || { %changelog +* Tue Jan 24 2023 Richard W.M. Jones - 5.3.3-4 +- Rebuild OCaml packages for F38 + * Sat Jan 21 2023 Richard W.M. Jones - 5.3.3-3 - Deal with new RPM database location - https://fedoraproject.org/wiki/Changes/RelocateRPMToUsr From 8b8563ecd99cb8276ce231272fd3869128a5d0a6 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 19 May 2023 13:04:13 +0100 Subject: [PATCH 02/33] Rebuild against librpm 10 --- supermin.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/supermin.spec b/supermin.spec index a71467e..092d654 100644 --- a/supermin.spec +++ b/supermin.spec @@ -31,7 +31,7 @@ Summary: Tool for creating supermin appliances Name: supermin Version: 5.3.3 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2+ ExclusiveArch: %{kernel_arches} @@ -190,6 +190,9 @@ make check || { %changelog +* Fri May 19 2023 Richard W.M. Jones - 5.3.3-5 +- Rebuild against librpm 10 + * Tue Jan 24 2023 Richard W.M. Jones - 5.3.3-4 - Rebuild OCaml packages for F38 From 27e02e0188bd08b38b28521d6de3e5f83b5c1f90 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 30 May 2023 09:24:07 +0100 Subject: [PATCH 03/33] Add support for dnf5 (RHBZ#2209412) --- ...base-location-in-usr-lib-sysimage-rp.patch | 4 +- 0002-Add-support-for-OCaml-5.0.patch | 98 ++++++++++++++ ...estore-compatibility-with-OCaml-4.07.patch | 125 ++++++++++++++++++ ...Detect-dnf5-and-omit-missing-options.patch | 58 ++++++++ supermin.spec | 18 ++- 5 files changed, 295 insertions(+), 8 deletions(-) create mode 100644 0002-Add-support-for-OCaml-5.0.patch create mode 100644 0003-Restore-compatibility-with-OCaml-4.07.patch create mode 100644 0004-rpm-Detect-dnf5-and-omit-missing-options.patch 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 6115707..46c94df 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] rpm: New RPM database location in /usr/lib/sysimage/rpm +Subject: [PATCH 1/4] 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.39.0 +2.40.1 diff --git a/0002-Add-support-for-OCaml-5.0.patch b/0002-Add-support-for-OCaml-5.0.patch new file mode 100644 index 0000000..fe527a5 --- /dev/null +++ b/0002-Add-support-for-OCaml-5.0.patch @@ -0,0 +1,98 @@ +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 + +--- + src/mode_build.ml | 4 ++-- + src/supermin.ml | 16 ++++++++-------- + src/utils.ml | 4 ++-- + 3 files changed, 12 insertions(+), 12 deletions(-) + +diff --git a/src/mode_build.ml b/src/mode_build.ml +index 7c48295..f81341d 100644 +--- a/src/mode_build.ml ++++ b/src/mode_build.ml +@@ -123,7 +123,7 @@ let rec build debug + (PackageSet.cardinal packages); + if debug >= 2 then ( + List.iter (printf " - %s\n") pretty_packages; +- flush Pervasives.stdout ++ flush Stdlib.stdout + ) + ); + +@@ -207,7 +207,7 @@ let rec build debug + (List.length files); + if debug >= 2 then ( + List.iter (fun { ft_path = path } -> printf " - %s\n" path) files; +- flush Pervasives.stdout ++ flush Stdlib.stdout + ) + ); + +diff --git a/src/supermin.ml b/src/supermin.ml +index 659e857..bef9db6 100644 +--- a/src/supermin.ml ++++ b/src/supermin.ml +@@ -296,27 +296,27 @@ let () = + main () + with + | Unix.Unix_error (code, fname, "") -> (* from a syscall *) +- Printexc.print_backtrace Pervasives.stderr; ++ Printexc.print_backtrace Stdlib.stderr; + error "error: %s: %s" fname (Unix.error_message code) + | Unix.Unix_error (code, fname, param) -> (* from a syscall *) +- Printexc.print_backtrace Pervasives.stderr; ++ Printexc.print_backtrace Stdlib.stderr; + error "error: %s: %s: %s" fname (Unix.error_message code) param + | Failure msg -> (* from failwith/failwithf *) +- Printexc.print_backtrace Pervasives.stderr; ++ Printexc.print_backtrace Stdlib.stderr; + error "failure: %s" msg + | Librpm.Multiple_matches (package, count) -> (* from librpm *) +- Printexc.print_backtrace Pervasives.stderr; ++ Printexc.print_backtrace Stdlib.stderr; + error "RPM error: %d occurrences for %s" count package + | Invalid_argument msg -> (* probably should never happen *) +- Printexc.print_backtrace Pervasives.stderr; ++ Printexc.print_backtrace Stdlib.stderr; + error "internal error: invalid argument: %s" msg + | Assert_failure (file, line, char) -> (* should never happen *) +- Printexc.print_backtrace Pervasives.stderr; ++ Printexc.print_backtrace Stdlib.stderr; + error "internal error: assertion failed at %s, line %d, char %d" + file line char + | Not_found -> (* should never happen *) +- Printexc.print_backtrace Pervasives.stderr; ++ Printexc.print_backtrace Stdlib.stderr; + error "internal error: Not_found exception was thrown" + | exn -> (* something not matched above *) +- Printexc.print_backtrace Pervasives.stderr; ++ Printexc.print_backtrace Stdlib.stderr; + error "exception: %s" (Printexc.to_string exn) +diff --git a/src/utils.ml b/src/utils.ml +index 521d49e..ae99294 100644 +--- a/src/utils.ml ++++ b/src/utils.ml +@@ -40,7 +40,7 @@ let dir_exists name = + try (stat name).st_kind = S_DIR + with Unix_error _ -> false + +-let uniq ?(cmp = Pervasives.compare) xs = ++let uniq ?(cmp = Stdlib.compare) xs = + let rec loop acc = function + | [] -> acc + | [x] -> x :: acc +@@ -51,7 +51,7 @@ let uniq ?(cmp = Pervasives.compare) xs = + in + List.rev (loop [] xs) + +-let sort_uniq ?(cmp = Pervasives.compare) xs = ++let sort_uniq ?(cmp = Stdlib.compare) xs = + let xs = List.sort cmp xs in + let xs = uniq ~cmp xs in + xs +-- +2.40.1 + diff --git a/0003-Restore-compatibility-with-OCaml-4.07.patch b/0003-Restore-compatibility-with-OCaml-4.07.patch new file mode 100644 index 0000000..6096567 --- /dev/null +++ b/0003-Restore-compatibility-with-OCaml-4.07.patch @@ -0,0 +1,125 @@ +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 + +--- + src/mode_build.ml | 6 ++++-- + src/supermin.ml | 18 ++++++++++-------- + src/utils.ml | 6 ++++-- + 3 files changed, 18 insertions(+), 12 deletions(-) + +diff --git a/src/mode_build.ml b/src/mode_build.ml +index f81341d..f0e5e09 100644 +--- a/src/mode_build.ml ++++ b/src/mode_build.ml +@@ -16,6 +16,8 @@ + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + *) + ++let stdlib_stdout = stdout ++ + open Unix + open Unix.LargeFile + open Printf +@@ -123,7 +125,7 @@ let rec build debug + (PackageSet.cardinal packages); + if debug >= 2 then ( + List.iter (printf " - %s\n") pretty_packages; +- flush Stdlib.stdout ++ flush stdlib_stdout + ) + ); + +@@ -207,7 +209,7 @@ let rec build debug + (List.length files); + if debug >= 2 then ( + List.iter (fun { ft_path = path } -> printf " - %s\n" path) files; +- flush Stdlib.stdout ++ flush stdlib_stdout + ) + ); + +diff --git a/src/supermin.ml b/src/supermin.ml +index bef9db6..d49c1e8 100644 +--- a/src/supermin.ml ++++ b/src/supermin.ml +@@ -16,6 +16,8 @@ + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + *) + ++let stdlib_stderr = stderr ++ + open Unix + open Unix.LargeFile + open Printf +@@ -296,27 +298,27 @@ let () = + main () + with + | Unix.Unix_error (code, fname, "") -> (* from a syscall *) +- Printexc.print_backtrace Stdlib.stderr; ++ Printexc.print_backtrace stdlib_stderr; + error "error: %s: %s" fname (Unix.error_message code) + | Unix.Unix_error (code, fname, param) -> (* from a syscall *) +- Printexc.print_backtrace Stdlib.stderr; ++ Printexc.print_backtrace stdlib_stderr; + error "error: %s: %s: %s" fname (Unix.error_message code) param + | Failure msg -> (* from failwith/failwithf *) +- Printexc.print_backtrace Stdlib.stderr; ++ Printexc.print_backtrace stdlib_stderr; + error "failure: %s" msg + | Librpm.Multiple_matches (package, count) -> (* from librpm *) +- Printexc.print_backtrace Stdlib.stderr; ++ Printexc.print_backtrace stdlib_stderr; + error "RPM error: %d occurrences for %s" count package + | Invalid_argument msg -> (* probably should never happen *) +- Printexc.print_backtrace Stdlib.stderr; ++ Printexc.print_backtrace stdlib_stderr; + error "internal error: invalid argument: %s" msg + | Assert_failure (file, line, char) -> (* should never happen *) +- Printexc.print_backtrace Stdlib.stderr; ++ Printexc.print_backtrace stdlib_stderr; + error "internal error: assertion failed at %s, line %d, char %d" + file line char + | Not_found -> (* should never happen *) +- Printexc.print_backtrace Stdlib.stderr; ++ Printexc.print_backtrace stdlib_stderr; + error "internal error: Not_found exception was thrown" + | exn -> (* something not matched above *) +- Printexc.print_backtrace Stdlib.stderr; ++ Printexc.print_backtrace stdlib_stderr; + error "exception: %s" (Printexc.to_string exn) +diff --git a/src/utils.ml b/src/utils.ml +index ae99294..1dc4310 100644 +--- a/src/utils.ml ++++ b/src/utils.ml +@@ -16,6 +16,8 @@ + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + *) + ++let stdlib_compare = compare ++ + open Unix + open Unix.LargeFile + open Printf +@@ -40,7 +42,7 @@ let dir_exists name = + try (stat name).st_kind = S_DIR + with Unix_error _ -> false + +-let uniq ?(cmp = Stdlib.compare) xs = ++let uniq ?(cmp = stdlib_compare) xs = + let rec loop acc = function + | [] -> acc + | [x] -> x :: acc +@@ -51,7 +53,7 @@ let uniq ?(cmp = Stdlib.compare) xs = + in + List.rev (loop [] xs) + +-let sort_uniq ?(cmp = Stdlib.compare) xs = ++let sort_uniq ?(cmp = stdlib_compare) xs = + let xs = List.sort cmp xs in + let xs = uniq ~cmp xs in + xs +-- +2.40.1 + diff --git a/0004-rpm-Detect-dnf5-and-omit-missing-options.patch b/0004-rpm-Detect-dnf5-and-omit-missing-options.patch new file mode 100644 index 0000000..6a570fd --- /dev/null +++ b/0004-rpm-Detect-dnf5-and-omit-missing-options.patch @@ -0,0 +1,58 @@ +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 + +Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2209412 +--- + src/ph_rpm.ml | 23 +++++++++++++++++++++-- + 1 file changed, 21 insertions(+), 2 deletions(-) + +diff --git a/src/ph_rpm.ml b/src/ph_rpm.ml +index 2c199c1..3e803c6 100644 +--- a/src/ph_rpm.ml ++++ b/src/ph_rpm.ml +@@ -482,19 +482,38 @@ and download_all_packages_with_dnf pkgs dir tdir = + (* Old dnf didn't create the destdir directory, newer versions do. *) + mkdir tdir 0o700; + ++ (* dnf5 lacks various options so we have to detect it: ++ * https://github.com/rpm-software-management/dnf5/issues/580 ++ * https://github.com/rpm-software-management/dnf5/issues/581 ++ *) ++ let is_dnf5 = is_dnf5 () in ++ let debug_quiet_option = ++ if !settings.debug < 1 then " -q" ++ else if not is_dnf5 then " -v" ++ else "" in ++ + let rpms = pkgs_as_NA_rpms pkgs in + + let cmd = +- sprintf "%s download%s%s --destdir=%s --disableexcludes=all %s" ++ sprintf "%s download%s%s%s --destdir=%s %s" + Config.dnf +- (if !settings.debug >= 1 then " -v" else " -q") ++ debug_quiet_option + (match !settings.packager_config with + | None -> "" + | Some filename -> sprintf " -c %s" (quote filename)) ++ (if not is_dnf5 then " --disableexcludes=all" else "") + (quote tdir) + (quoted_list rpms) in + run_command cmd + ++and is_dnf5 () = ++ let cmd = sprintf "%s --version" Config.dnf in ++ let lines = run_command_get_lines cmd in ++ match lines with ++ | [] -> error "rpm: no output from '%s' command" cmd ++ | line :: _ when find line "version 5" >= 0 -> true ++ | _ -> false ++ + and pkgs_as_NA_rpms pkgs = + let rpms = List.map rpm_of_pkg (PackageSet.elements pkgs) in + List.map ( +-- +2.40.1 + diff --git a/supermin.spec b/supermin.spec index 092d654..643d6d8 100644 --- a/supermin.spec +++ b/supermin.spec @@ -31,7 +31,7 @@ Summary: Tool for creating supermin appliances Name: supermin Version: 5.3.3 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv2+ ExclusiveArch: %{kernel_arches} @@ -47,7 +47,12 @@ Source1: http://download.libguestfs.org/supermin/%{source_directory}/%{nam Source2: libguestfs.keyring # https://fedoraproject.org/wiki/Changes/RelocateRPMToUsr -Patch1: 0001-rpm-New-RPM-database-location-in-usr-lib-sysimage-rp.patch +Patch: 0001-rpm-New-RPM-database-location-in-usr-lib-sysimage-rp.patch +# OCaml 5 compatibility: +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 BuildRequires: gcc BuildRequires: make @@ -56,8 +61,7 @@ BuildRequires: /usr/bin/pod2man BuildRequires: /usr/bin/pod2html BuildRequires: rpm BuildRequires: rpm-devel -BuildRequires: dnf -BuildRequires: dnf-plugins-core +BuildRequires: dnf5 BuildRequires: /usr/sbin/mke2fs BuildRequires: e2fsprogs-devel BuildRequires: findutils @@ -124,8 +128,7 @@ Requires: %{name} = %{version}-%{release} Requires: rpm-build # Dependencies needed for supermin --prepare -Requires: dnf -Requires: dnf-plugins-core +Requires: dnf5 Requires: findutils @@ -190,6 +193,9 @@ make check || { %changelog +* Tue May 30 2023 Richard W.M. Jones - 5.3.3-6 +- Add support for dnf5 (RHBZ#2209412) + * Fri May 19 2023 Richard W.M. Jones - 5.3.3-5 - Rebuild against librpm 10 From 23e3141c9d9963b4b0f7f1e9f3dc5b6b89ab2706 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 30 May 2023 10:38:29 +0100 Subject: [PATCH 04/33] Temporarily set DNF=dnf5 --- supermin.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/supermin.spec b/supermin.spec index 643d6d8..6400ae3 100644 --- a/supermin.spec +++ b/supermin.spec @@ -150,7 +150,11 @@ supermin appliances. %build autoreconf -fi -%configure --disable-network-tests +# Setting DNF is temporarily required for Rawhide. We should be able +# to remove this later. See: +# https://bugzilla.redhat.com/show_bug.cgi?id=2209412 +# https://fedoraproject.org/wiki/Changes/ReplaceDnfWithDnf5 +%configure DNF=%{_bindir}/dnf5 --disable-network-tests %if %{with dietlibc} make -C init CC="diet gcc" From 5283ce36d894237ec0903ff41c1a4bf16cd97e1d Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 31 May 2023 13:02:07 +0100 Subject: [PATCH 05/33] Further fix for dnf5 (RHBZ#2211386) --- ...base-location-in-usr-lib-sysimage-rp.patch | 4 +-- 0002-Add-support-for-OCaml-5.0.patch | 4 +-- ...estore-compatibility-with-OCaml-4.07.patch | 4 +-- ...Detect-dnf5-and-omit-missing-options.patch | 4 +-- 0005-rpm-Use-dnf-config-instead-of-c.patch | 28 +++++++++++++++++++ supermin.spec | 7 ++++- 6 files changed, 42 insertions(+), 9 deletions(-) create mode 100644 0005-rpm-Use-dnf-config-instead-of-c.patch 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) From a020f9a10e43367b11ff6561e56edf71fdff92fb Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 5 Jun 2023 16:02:00 +0100 Subject: [PATCH 06/33] Migrated to SPDX license --- supermin.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/supermin.spec b/supermin.spec index 3400731..de651ef 100644 --- a/supermin.spec +++ b/supermin.spec @@ -31,8 +31,8 @@ Summary: Tool for creating supermin appliances Name: supermin Version: 5.3.3 -Release: 7%{?dist} -License: GPLv2+ +Release: 8%{?dist} +License: GPL-2.0-or-later ExclusiveArch: %{kernel_arches} %if 0%{?rhel} @@ -199,6 +199,9 @@ make check || { %changelog +* Mon Jun 05 2023 Richard W.M. Jones - 5.3.3-8 +- Migrated to SPDX license + * Wed May 31 2023 Richard W.M. Jones - 5.3.3-7 - Further fix for dnf5 (RHBZ#2211386) From 1ae35926e566771a1231c38d4c5f688d725665dd Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 12 Jun 2023 13:10:51 +0100 Subject: [PATCH 07/33] Fix --if-newer --- ...base-location-in-usr-lib-sysimage-rp.patch | 2 +- 0002-Add-support-for-OCaml-5.0.patch | 2 +- ...estore-compatibility-with-OCaml-4.07.patch | 2 +- ...Detect-dnf5-and-omit-missing-options.patch | 2 +- 0005-rpm-Use-dnf-config-instead-of-c.patch | 2 +- ...ugging-of-the-supermin-if-newer-calc.patch | 56 +++++++++++++++++++ 0007-src-Fix-if-newer-copy-kernel.patch | 39 +++++++++++++ supermin.spec | 8 ++- 8 files changed, 107 insertions(+), 6 deletions(-) create mode 100644 0006-src-Improved-debugging-of-the-supermin-if-newer-calc.patch create mode 100644 0007-src-Fix-if-newer-copy-kernel.patch 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 585fa81..1c5e464 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/5] rpm: New RPM database location in /usr/lib/sysimage/rpm +Subject: [PATCH 1/7] 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. diff --git a/0002-Add-support-for-OCaml-5.0.patch b/0002-Add-support-for-OCaml-5.0.patch index 6372301..01fc281 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/5] Add support for OCaml 5.0 +Subject: [PATCH 2/7] Add support for OCaml 5.0 --- src/mode_build.ml | 4 ++-- diff --git a/0003-Restore-compatibility-with-OCaml-4.07.patch b/0003-Restore-compatibility-with-OCaml-4.07.patch index 6fd79e4..ae5fa78 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/5] Restore compatibility with OCaml < 4.07 +Subject: [PATCH 3/7] Restore compatibility with OCaml < 4.07 --- src/mode_build.ml | 6 ++++-- diff --git a/0004-rpm-Detect-dnf5-and-omit-missing-options.patch b/0004-rpm-Detect-dnf5-and-omit-missing-options.patch index 9d9d7f1..81fe831 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/5] rpm: Detect dnf5 and omit missing options +Subject: [PATCH 4/7] rpm: Detect dnf5 and omit missing options Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2209412 --- diff --git a/0005-rpm-Use-dnf-config-instead-of-c.patch b/0005-rpm-Use-dnf-config-instead-of-c.patch index a9badb1..614dd68 100644 --- a/0005-rpm-Use-dnf-config-instead-of-c.patch +++ b/0005-rpm-Use-dnf-config-instead-of-c.patch @@ -1,7 +1,7 @@ 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 +Subject: [PATCH 5/7] rpm: Use dnf --config instead of -c dnf5 does not support -c. dnf4 supports either. diff --git a/0006-src-Improved-debugging-of-the-supermin-if-newer-calc.patch b/0006-src-Improved-debugging-of-the-supermin-if-newer-calc.patch new file mode 100644 index 0000000..6fa0426 --- /dev/null +++ b/0006-src-Improved-debugging-of-the-supermin-if-newer-calc.patch @@ -0,0 +1,56 @@ +From 8dd37da1b5979842b0db44b44655eeaf621f7ac9 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Mon, 12 Jun 2023 12:51:56 +0100 +Subject: [PATCH 6/7] src: Improved debugging of the supermin if-newer + calculation + +Also I expanded the code to make it easier to read. There is no +change to the calculation intended. +--- + src/supermin.ml | 29 ++++++++++++++++++++++++++--- + 1 file changed, 26 insertions(+), 3 deletions(-) + +diff --git a/src/supermin.ml b/src/supermin.ml +index d49c1e8..c30c73c 100644 +--- a/src/supermin.ml ++++ b/src/supermin.ml +@@ -241,10 +241,33 @@ appliance automatically. + try + let outputs = Mode_build.get_outputs args inputs in + let outputs = List.map ((//) outputdir) outputs in +- let odates = List.map (fun d -> (lstat d).st_mtime) (outputdir :: outputs) in +- let idates = List.map (fun d -> (lstat d).st_mtime) inputs in ++ let outputs = outputdir :: outputs in ++ let odates = List.map (fun f -> (lstat f).st_mtime) outputs in ++ if debug >= 2 then ( ++ List.iter ( ++ fun f -> ++ printf "supermin: if-newer: output %s => %.2f\n" ++ f (lstat f).st_mtime ++ ) outputs; ++ ); ++ let idates = List.map (fun f -> (lstat f).st_mtime) inputs in ++ if debug >= 2 then ( ++ List.iter ( ++ fun f -> ++ printf "supermin: if-newer: input %s => %.2f\n" ++ f (lstat f).st_mtime ++ ) inputs; ++ ); + let pdate = (get_package_handler ()).ph_get_package_database_mtime () in +- if List.for_all (fun idate -> List.for_all (fun odate -> idate < odate) odates) (pdate :: idates) then ( ++ if debug >= 2 then ( ++ printf "supermin: if-newer: package database date: %.2f\n" pdate; ++ ); ++ let older = ++ List.for_all ( ++ fun idate -> ++ List.for_all (fun odate -> idate < odate) odates ++ ) (pdate :: idates) in ++ if older then ( + if debug >= 1 then + printf "supermin: if-newer: output does not need rebuilding\n%!"; + exit 0 +-- +2.37.3 + diff --git a/0007-src-Fix-if-newer-copy-kernel.patch b/0007-src-Fix-if-newer-copy-kernel.patch new file mode 100644 index 0000000..19117db --- /dev/null +++ b/0007-src-Fix-if-newer-copy-kernel.patch @@ -0,0 +1,39 @@ +From 8c38641042e274a713a18daf7fc85584ca0fc9bb Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Mon, 12 Jun 2023 13:02:37 +0100 +Subject: [PATCH 7/7] src: Fix --if-newer --copy-kernel + +We previously copied the kernel into the appliance using 'cp -p' which +preserves the datestamps of the installed kernel. This can confuse +the --if-newer calculation, if for example the package database is +newer than the date on the installed kernel (which quite often is the +case). This makes it think that the appliance is always older than +the package database, thus forcing a rebuild. + +We can fix this using 'cp' instead of 'cp -p'. We don't need the +permissions and datestamps on the copied kernel to be preserved anyway +(in fact, it could cause problems if the permissions are restrictive). + +Fixes: commit 30de2cb603cdde33524a66d5466f6a9b986ce8a6 +--- + src/format_ext2_kernel.ml | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/format_ext2_kernel.ml b/src/format_ext2_kernel.ml +index c592703..6d2e699 100644 +--- a/src/format_ext2_kernel.ml ++++ b/src/format_ext2_kernel.ml +@@ -311,6 +311,9 @@ and copy_or_symlink_file copy_kernel src dest = + if not copy_kernel then + symlink src dest + else ( +- let cmd = sprintf "cp -p %s %s" (quote src) (quote dest) in ++ (* NB: Do not use -p here, we want the kernel to appear newer ++ * so that --if-newer works. ++ *) ++ let cmd = sprintf "cp %s %s" (quote src) (quote dest) in + run_command cmd + ) +-- +2.37.3 + diff --git a/supermin.spec b/supermin.spec index de651ef..5cab75b 100644 --- a/supermin.spec +++ b/supermin.spec @@ -31,7 +31,7 @@ Summary: Tool for creating supermin appliances Name: supermin Version: 5.3.3 -Release: 8%{?dist} +Release: 9%{?dist} License: GPL-2.0-or-later ExclusiveArch: %{kernel_arches} @@ -55,6 +55,9 @@ Patch: 0003-Restore-compatibility-with-OCaml-4.07.patch 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 +# Fix --if-newer +Patch: 0006-src-Improved-debugging-of-the-supermin-if-newer-calc.patch +Patch: 0007-src-Fix-if-newer-copy-kernel.patch BuildRequires: gcc BuildRequires: make @@ -199,6 +202,9 @@ make check || { %changelog +* Mon Jun 12 2023 Richard W.M. Jones - 5.3.3-9 +- Fix --if-newer + * Mon Jun 05 2023 Richard W.M. Jones - 5.3.3-8 - Migrated to SPDX license From 0190d0f55f7d818bd41b3e9c0e68f4cc2839d6ab Mon Sep 17 00:00:00 2001 From: Jerry James Date: Mon, 10 Jul 2023 15:49:18 -0600 Subject: [PATCH 08/33] OCaml 5.0.0 rebuild --- supermin.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/supermin.spec b/supermin.spec index 5cab75b..0488ebd 100644 --- a/supermin.spec +++ b/supermin.spec @@ -1,5 +1,3 @@ -%undefine _package_note_flags - # On platforms and architectures that support it, the default is # ‘--with dietlibc’. # @@ -31,7 +29,7 @@ Summary: Tool for creating supermin appliances Name: supermin Version: 5.3.3 -Release: 9%{?dist} +Release: 10%{?dist} License: GPL-2.0-or-later ExclusiveArch: %{kernel_arches} @@ -202,6 +200,9 @@ make check || { %changelog +* Mon Jul 10 2023 Jerry James - 5.3.3-10 +- OCaml 5.0.0 rebuild + * Mon Jun 12 2023 Richard W.M. Jones - 5.3.3-9 - Fix --if-newer From 4e7d4fef4cc6e68ce916346362160914c0b5a473 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 11 Jul 2023 11:36:26 +0100 Subject: [PATCH 09/33] ExcludeArch i686 (https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/SPML7CUBSZNI36NLXGVHEG7DNHU3EWOJ/) --- supermin.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/supermin.spec b/supermin.spec index 0488ebd..bbd77b0 100644 --- a/supermin.spec +++ b/supermin.spec @@ -1,3 +1,6 @@ +# OCaml packages not built on i686 since OCaml 5 / Fedora 39. +ExcludeArch: %{ix86} + # On platforms and architectures that support it, the default is # ‘--with dietlibc’. # From e1702f8c284a8dfa55f78b097efa2ec6cf8be196 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 11 Jul 2023 23:20:40 +0100 Subject: [PATCH 10/33] OCaml 5.0 rebuild for Fedora 39 --- supermin.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/supermin.spec b/supermin.spec index bbd77b0..fc0c1ae 100644 --- a/supermin.spec +++ b/supermin.spec @@ -32,7 +32,7 @@ ExcludeArch: %{ix86} Summary: Tool for creating supermin appliances Name: supermin Version: 5.3.3 -Release: 10%{?dist} +Release: 11%{?dist} License: GPL-2.0-or-later ExclusiveArch: %{kernel_arches} @@ -203,6 +203,9 @@ make check || { %changelog +* Tue Jul 11 2023 Richard W.M. Jones - 5.3.3-11 +- OCaml 5.0 rebuild for Fedora 39 + * Mon Jul 10 2023 Jerry James - 5.3.3-10 - OCaml 5.0.0 rebuild From 61395e3f5a0fdbbea28ec03c6befcf482cb96792 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 12 Jul 2023 11:34:00 +0100 Subject: [PATCH 11/33] Disable stripping on bytecode platforms as that breaks the binary. --- supermin.spec | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/supermin.spec b/supermin.spec index fc0c1ae..a3d03f4 100644 --- a/supermin.spec +++ b/supermin.spec @@ -1,6 +1,14 @@ # OCaml packages not built on i686 since OCaml 5 / Fedora 39. ExcludeArch: %{ix86} +# Stripping breaks bytecode binaries. We also have to disable LTO +# because of https://bugzilla.redhat.com/1915570 +%ifnarch %{ocaml_native_compiler} +%global __strip /bin/true +%global _lto_cflags %nil +%global debug_package %{nil} +%endif + # On platforms and architectures that support it, the default is # ‘--with dietlibc’. # @@ -32,7 +40,7 @@ ExcludeArch: %{ix86} Summary: Tool for creating supermin appliances Name: supermin Version: 5.3.3 -Release: 11%{?dist} +Release: 12%{?dist} License: GPL-2.0-or-later ExclusiveArch: %{kernel_arches} @@ -203,8 +211,9 @@ make check || { %changelog -* Tue Jul 11 2023 Richard W.M. Jones - 5.3.3-11 +* Tue Jul 11 2023 Richard W.M. Jones - 5.3.3-12 - OCaml 5.0 rebuild for Fedora 39 +- Disable stripping on bytecode platforms as that breaks the binary. * Mon Jul 10 2023 Jerry James - 5.3.3-10 - OCaml 5.0.0 rebuild From 1addc80aac332f202ee707ffadcbc9c6d5b102dc Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 12 Jul 2023 22:42:41 +0100 Subject: [PATCH 12/33] Reenable stripping --- ...base-location-in-usr-lib-sysimage-rp.patch | 2 +- 0002-Add-support-for-OCaml-5.0.patch | 2 +- ...estore-compatibility-with-OCaml-4.07.patch | 2 +- ...Detect-dnf5-and-omit-missing-options.patch | 2 +- 0005-rpm-Use-dnf-config-instead-of-c.patch | 2 +- ...ugging-of-the-supermin-if-newer-calc.patch | 2 +- 0007-src-Fix-if-newer-copy-kernel.patch | 2 +- ...m-Reenable-disable_excludes-for-dnf5.patch | 29 ++++++++++++++++ ...utput-complete-exe-instead-of-custom.patch | 33 +++++++++++++++++++ supermin.spec | 17 ++++------ 10 files changed, 75 insertions(+), 18 deletions(-) create mode 100644 0008-rpm-Reenable-disable_excludes-for-dnf5.patch create mode 100644 0009-ocamlc-Use-output-complete-exe-instead-of-custom.patch 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 1c5e464..13951d2 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/7] rpm: New RPM database location in /usr/lib/sysimage/rpm +Subject: [PATCH 1/9] 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. diff --git a/0002-Add-support-for-OCaml-5.0.patch b/0002-Add-support-for-OCaml-5.0.patch index 01fc281..22d5916 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/7] Add support for OCaml 5.0 +Subject: [PATCH 2/9] Add support for OCaml 5.0 --- src/mode_build.ml | 4 ++-- diff --git a/0003-Restore-compatibility-with-OCaml-4.07.patch b/0003-Restore-compatibility-with-OCaml-4.07.patch index ae5fa78..7a8dcec 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/7] Restore compatibility with OCaml < 4.07 +Subject: [PATCH 3/9] Restore compatibility with OCaml < 4.07 --- src/mode_build.ml | 6 ++++-- diff --git a/0004-rpm-Detect-dnf5-and-omit-missing-options.patch b/0004-rpm-Detect-dnf5-and-omit-missing-options.patch index 81fe831..780769c 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/7] rpm: Detect dnf5 and omit missing options +Subject: [PATCH 4/9] rpm: Detect dnf5 and omit missing options Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2209412 --- diff --git a/0005-rpm-Use-dnf-config-instead-of-c.patch b/0005-rpm-Use-dnf-config-instead-of-c.patch index 614dd68..1c7892e 100644 --- a/0005-rpm-Use-dnf-config-instead-of-c.patch +++ b/0005-rpm-Use-dnf-config-instead-of-c.patch @@ -1,7 +1,7 @@ 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/7] rpm: Use dnf --config instead of -c +Subject: [PATCH 5/9] rpm: Use dnf --config instead of -c dnf5 does not support -c. dnf4 supports either. diff --git a/0006-src-Improved-debugging-of-the-supermin-if-newer-calc.patch b/0006-src-Improved-debugging-of-the-supermin-if-newer-calc.patch index 6fa0426..11a4c81 100644 --- a/0006-src-Improved-debugging-of-the-supermin-if-newer-calc.patch +++ b/0006-src-Improved-debugging-of-the-supermin-if-newer-calc.patch @@ -1,7 +1,7 @@ From 8dd37da1b5979842b0db44b44655eeaf621f7ac9 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 12 Jun 2023 12:51:56 +0100 -Subject: [PATCH 6/7] src: Improved debugging of the supermin if-newer +Subject: [PATCH 6/9] src: Improved debugging of the supermin if-newer calculation Also I expanded the code to make it easier to read. There is no diff --git a/0007-src-Fix-if-newer-copy-kernel.patch b/0007-src-Fix-if-newer-copy-kernel.patch index 19117db..287ccfb 100644 --- a/0007-src-Fix-if-newer-copy-kernel.patch +++ b/0007-src-Fix-if-newer-copy-kernel.patch @@ -1,7 +1,7 @@ From 8c38641042e274a713a18daf7fc85584ca0fc9bb Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 12 Jun 2023 13:02:37 +0100 -Subject: [PATCH 7/7] src: Fix --if-newer --copy-kernel +Subject: [PATCH 7/9] src: Fix --if-newer --copy-kernel We previously copied the kernel into the appliance using 'cp -p' which preserves the datestamps of the installed kernel. This can confuse diff --git a/0008-rpm-Reenable-disable_excludes-for-dnf5.patch b/0008-rpm-Reenable-disable_excludes-for-dnf5.patch new file mode 100644 index 0000000..eedf2d8 --- /dev/null +++ b/0008-rpm-Reenable-disable_excludes-for-dnf5.patch @@ -0,0 +1,29 @@ +From 2f3eae350aa89b8067201a8bb24ff830d0fd919c Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Thu, 22 Jun 2023 08:35:51 +0100 +Subject: [PATCH 8/9] rpm: Reenable disable_excludes for dnf5 + +Updates: commit 92d5d7e8c27088fa3fb8e5e6e9c5b8d3209053d6 +Thanks: Jan Kolarik +Link: https://github.com/rpm-software-management/dnf5/issues/581#issuecomment-1600682713 +--- + src/ph_rpm.ml | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/ph_rpm.ml b/src/ph_rpm.ml +index e94f35f..783d1bb 100644 +--- a/src/ph_rpm.ml ++++ b/src/ph_rpm.ml +@@ -501,7 +501,8 @@ and download_all_packages_with_dnf pkgs dir tdir = + (match !settings.packager_config with + | None -> "" + | Some filename -> sprintf " --config=%s" (quote filename)) +- (if not is_dnf5 then " --disableexcludes=all" else "") ++ (if not is_dnf5 then " --disableexcludes=all" ++ else " --setopt=disable_excludes=*") + (quote tdir) + (quoted_list rpms) in + run_command cmd +-- +2.37.3 + diff --git a/0009-ocamlc-Use-output-complete-exe-instead-of-custom.patch b/0009-ocamlc-Use-output-complete-exe-instead-of-custom.patch new file mode 100644 index 0000000..514b5b5 --- /dev/null +++ b/0009-ocamlc-Use-output-complete-exe-instead-of-custom.patch @@ -0,0 +1,33 @@ +From dc80dbbef60d5d81a7d4321683a8c7305dc04972 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Wed, 12 Jul 2023 22:37:58 +0100 +Subject: [PATCH 9/9] ocamlc: Use -output-complete-exe instead of -custom + +This prevents bytecode executables from being broken by strip and +similar tools. Note this is incompatible with OCaml < 4.10 (so breaks +RHEL 8). However this only affects bytecode builds which we prefer +not to use in RHEL. I left the old option in the Makefile so that it +could be uncommented by someone using older OCaml + bytecode. We need +this for OCaml 5.0 since that drops native backends (temporarily) for +riscv64, s390x and ppc64le. +--- + src/Makefile.am | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/Makefile.am b/src/Makefile.am +index 5b07e5d..5a1c671 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -132,7 +132,8 @@ OCAMLFLAGS = -g -warn-error +C+D+E+F+L+M+P+S+U+V+X+Y+Z-3 + if !HAVE_OCAMLOPT + OBJECTS = $(BOBJECTS) + BEST = c +-OCAMLFLAGS += -custom ++#OCAMLFLAGS += -custom # for OCaml < 4.10 ++OCAMLFLAGS += -output-complete-exe + else + OBJECTS = $(XOBJECTS) + BEST = opt +-- +2.37.3 + diff --git a/supermin.spec b/supermin.spec index a3d03f4..cab5b85 100644 --- a/supermin.spec +++ b/supermin.spec @@ -1,14 +1,6 @@ # OCaml packages not built on i686 since OCaml 5 / Fedora 39. ExcludeArch: %{ix86} -# Stripping breaks bytecode binaries. We also have to disable LTO -# because of https://bugzilla.redhat.com/1915570 -%ifnarch %{ocaml_native_compiler} -%global __strip /bin/true -%global _lto_cflags %nil -%global debug_package %{nil} -%endif - # On platforms and architectures that support it, the default is # ‘--with dietlibc’. # @@ -40,7 +32,7 @@ ExcludeArch: %{ix86} Summary: Tool for creating supermin appliances Name: supermin Version: 5.3.3 -Release: 12%{?dist} +Release: 13%{?dist} License: GPL-2.0-or-later ExclusiveArch: %{kernel_arches} @@ -67,6 +59,10 @@ Patch: 0005-rpm-Use-dnf-config-instead-of-c.patch # Fix --if-newer Patch: 0006-src-Improved-debugging-of-the-supermin-if-newer-calc.patch Patch: 0007-src-Fix-if-newer-copy-kernel.patch +# Reenable disable_excludes for dnf5 +Patch: 0008-rpm-Reenable-disable_excludes-for-dnf5.patch +# Fix bytecode builds so they resist stripping +Patch: 0009-ocamlc-Use-output-complete-exe-instead-of-custom.patch BuildRequires: gcc BuildRequires: make @@ -211,9 +207,8 @@ make check || { %changelog -* Tue Jul 11 2023 Richard W.M. Jones - 5.3.3-12 +* Wed Jul 12 2023 Richard W.M. Jones - 5.3.3-13 - OCaml 5.0 rebuild for Fedora 39 -- Disable stripping on bytecode platforms as that breaks the binary. * Mon Jul 10 2023 Jerry James - 5.3.3-10 - OCaml 5.0.0 rebuild From 47169f1699caa8cab4ee9132c9b29b3cd35cd386 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 12 Jul 2023 22:53:51 +0100 Subject: [PATCH 13/33] Reenable stripping (further fix) --- ...base-location-in-usr-lib-sysimage-rp.patch | 2 +- 0002-Add-support-for-OCaml-5.0.patch | 2 +- ...estore-compatibility-with-OCaml-4.07.patch | 2 +- ...Detect-dnf5-and-omit-missing-options.patch | 2 +- 0005-rpm-Use-dnf-config-instead-of-c.patch | 2 +- ...ugging-of-the-supermin-if-newer-calc.patch | 2 +- 0007-src-Fix-if-newer-copy-kernel.patch | 2 +- ...m-Reenable-disable_excludes-for-dnf5.patch | 2 +- ...utput-complete-exe-instead-of-custom.patch | 2 +- ...ly-output-complete-exe-to-final-link.patch | 42 +++++++++++++++++++ supermin.spec | 1 + 11 files changed, 52 insertions(+), 9 deletions(-) create mode 100644 0010-ocamlc-Only-supply-output-complete-exe-to-final-link.patch 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 13951d2..2ae9ef2 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/9] rpm: New RPM database location in /usr/lib/sysimage/rpm +Subject: [PATCH 01/10] 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. diff --git a/0002-Add-support-for-OCaml-5.0.patch b/0002-Add-support-for-OCaml-5.0.patch index 22d5916..68a06aa 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/9] Add support for OCaml 5.0 +Subject: [PATCH 02/10] Add support for OCaml 5.0 --- src/mode_build.ml | 4 ++-- diff --git a/0003-Restore-compatibility-with-OCaml-4.07.patch b/0003-Restore-compatibility-with-OCaml-4.07.patch index 7a8dcec..746e72c 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/9] Restore compatibility with OCaml < 4.07 +Subject: [PATCH 03/10] Restore compatibility with OCaml < 4.07 --- src/mode_build.ml | 6 ++++-- diff --git a/0004-rpm-Detect-dnf5-and-omit-missing-options.patch b/0004-rpm-Detect-dnf5-and-omit-missing-options.patch index 780769c..3efc582 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/9] rpm: Detect dnf5 and omit missing options +Subject: [PATCH 04/10] rpm: Detect dnf5 and omit missing options Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2209412 --- diff --git a/0005-rpm-Use-dnf-config-instead-of-c.patch b/0005-rpm-Use-dnf-config-instead-of-c.patch index 1c7892e..d9b2b79 100644 --- a/0005-rpm-Use-dnf-config-instead-of-c.patch +++ b/0005-rpm-Use-dnf-config-instead-of-c.patch @@ -1,7 +1,7 @@ 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/9] rpm: Use dnf --config instead of -c +Subject: [PATCH 05/10] rpm: Use dnf --config instead of -c dnf5 does not support -c. dnf4 supports either. diff --git a/0006-src-Improved-debugging-of-the-supermin-if-newer-calc.patch b/0006-src-Improved-debugging-of-the-supermin-if-newer-calc.patch index 11a4c81..2b0be0e 100644 --- a/0006-src-Improved-debugging-of-the-supermin-if-newer-calc.patch +++ b/0006-src-Improved-debugging-of-the-supermin-if-newer-calc.patch @@ -1,7 +1,7 @@ From 8dd37da1b5979842b0db44b44655eeaf621f7ac9 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 12 Jun 2023 12:51:56 +0100 -Subject: [PATCH 6/9] src: Improved debugging of the supermin if-newer +Subject: [PATCH 06/10] src: Improved debugging of the supermin if-newer calculation Also I expanded the code to make it easier to read. There is no diff --git a/0007-src-Fix-if-newer-copy-kernel.patch b/0007-src-Fix-if-newer-copy-kernel.patch index 287ccfb..fa11fe5 100644 --- a/0007-src-Fix-if-newer-copy-kernel.patch +++ b/0007-src-Fix-if-newer-copy-kernel.patch @@ -1,7 +1,7 @@ From 8c38641042e274a713a18daf7fc85584ca0fc9bb Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 12 Jun 2023 13:02:37 +0100 -Subject: [PATCH 7/9] src: Fix --if-newer --copy-kernel +Subject: [PATCH 07/10] src: Fix --if-newer --copy-kernel We previously copied the kernel into the appliance using 'cp -p' which preserves the datestamps of the installed kernel. This can confuse diff --git a/0008-rpm-Reenable-disable_excludes-for-dnf5.patch b/0008-rpm-Reenable-disable_excludes-for-dnf5.patch index eedf2d8..a59c9c7 100644 --- a/0008-rpm-Reenable-disable_excludes-for-dnf5.patch +++ b/0008-rpm-Reenable-disable_excludes-for-dnf5.patch @@ -1,7 +1,7 @@ From 2f3eae350aa89b8067201a8bb24ff830d0fd919c Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 22 Jun 2023 08:35:51 +0100 -Subject: [PATCH 8/9] rpm: Reenable disable_excludes for dnf5 +Subject: [PATCH 08/10] rpm: Reenable disable_excludes for dnf5 Updates: commit 92d5d7e8c27088fa3fb8e5e6e9c5b8d3209053d6 Thanks: Jan Kolarik diff --git a/0009-ocamlc-Use-output-complete-exe-instead-of-custom.patch b/0009-ocamlc-Use-output-complete-exe-instead-of-custom.patch index 514b5b5..dec8e75 100644 --- a/0009-ocamlc-Use-output-complete-exe-instead-of-custom.patch +++ b/0009-ocamlc-Use-output-complete-exe-instead-of-custom.patch @@ -1,7 +1,7 @@ From dc80dbbef60d5d81a7d4321683a8c7305dc04972 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 12 Jul 2023 22:37:58 +0100 -Subject: [PATCH 9/9] ocamlc: Use -output-complete-exe instead of -custom +Subject: [PATCH 09/10] ocamlc: Use -output-complete-exe instead of -custom This prevents bytecode executables from being broken by strip and similar tools. Note this is incompatible with OCaml < 4.10 (so breaks diff --git a/0010-ocamlc-Only-supply-output-complete-exe-to-final-link.patch b/0010-ocamlc-Only-supply-output-complete-exe-to-final-link.patch new file mode 100644 index 0000000..693527d --- /dev/null +++ b/0010-ocamlc-Only-supply-output-complete-exe-to-final-link.patch @@ -0,0 +1,42 @@ +From 59a8ffc40db94a38879d9c923520e0bd70ffa271 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Wed, 12 Jul 2023 22:51:43 +0100 +Subject: [PATCH 10/10] ocamlc: Only supply -output-complete-exe to final link + +Add a separate variable to store link flags, and use that to supply +-output-complete-exe. Apparently ocamlc ignores -custom in the wrong +place. + +Fixes: dc80dbbef60d5d81a7d4321683a8c7305dc04972 +--- + src/Makefile.am | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/src/Makefile.am b/src/Makefile.am +index 5a1c671..1268aa5 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -132,8 +132,8 @@ OCAMLFLAGS = -g -warn-error +C+D+E+F+L+M+P+S+U+V+X+Y+Z-3 + if !HAVE_OCAMLOPT + OBJECTS = $(BOBJECTS) + BEST = c +-#OCAMLFLAGS += -custom # for OCaml < 4.10 +-OCAMLFLAGS += -output-complete-exe ++#OCAMLLINKFLAGS = -custom # for OCaml < 4.10 ++OCAMLLINKFLAGS = -output-complete-exe + else + OBJECTS = $(XOBJECTS) + BEST = opt +@@ -143,7 +143,8 @@ supermin_DEPENDENCIES = $(OBJECTS) + + supermin_LINK = \ + ./supermin-link.sh \ +- $(OCAMLFIND) $(BEST) $(OCAMLFLAGS) $(OCAMLPACKAGES) \ ++ $(OCAMLFIND) $(BEST) $(OCAMLLINKFLAGS) $(OCAMLFLAGS) \ ++ $(OCAMLPACKAGES) \ + $(OBJECTS) -o $@ + + .mli.cmi: +-- +2.37.3 + diff --git a/supermin.spec b/supermin.spec index cab5b85..83bccaa 100644 --- a/supermin.spec +++ b/supermin.spec @@ -63,6 +63,7 @@ Patch: 0007-src-Fix-if-newer-copy-kernel.patch Patch: 0008-rpm-Reenable-disable_excludes-for-dnf5.patch # Fix bytecode builds so they resist stripping Patch: 0009-ocamlc-Use-output-complete-exe-instead-of-custom.patch +Patch: 0010-ocamlc-Only-supply-output-complete-exe-to-final-link.patch BuildRequires: gcc BuildRequires: make From 191d0e7909985ed373e885c98bd60f95dac1b3ff Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 22 Jul 2023 02:51:21 +0000 Subject: [PATCH 14/33] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- supermin.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/supermin.spec b/supermin.spec index 83bccaa..b1c3e0b 100644 --- a/supermin.spec +++ b/supermin.spec @@ -32,7 +32,7 @@ ExcludeArch: %{ix86} Summary: Tool for creating supermin appliances Name: supermin Version: 5.3.3 -Release: 13%{?dist} +Release: 14%{?dist} License: GPL-2.0-or-later ExclusiveArch: %{kernel_arches} @@ -208,6 +208,9 @@ make check || { %changelog +* Sat Jul 22 2023 Fedora Release Engineering - 5.3.3-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Wed Jul 12 2023 Richard W.M. Jones - 5.3.3-13 - OCaml 5.0 rebuild for Fedora 39 From b394af62b0292e4243354236eb984218be48499f Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Wed, 2 Aug 2023 16:48:18 -0400 Subject: [PATCH 15/33] Defer dnf5 until Fedora 41 https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/EYE2JY537OM7GFW46EK7YIBLHJ52USAZ/ --- supermin.spec | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/supermin.spec b/supermin.spec index b1c3e0b..2c99fc1 100644 --- a/supermin.spec +++ b/supermin.spec @@ -23,6 +23,12 @@ ExcludeArch: %{ix86} %endif %endif +%if 0%{?fedora} > 40 || 0%{?rhel} > 10 +%bcond_without dnf5 +%else +%bcond_with dnf5 +%endif + # Whether we should verify tarball signature with GPGv2. %global verify_tarball_signature 1 @@ -32,7 +38,7 @@ ExcludeArch: %{ix86} Summary: Tool for creating supermin appliances Name: supermin Version: 5.3.3 -Release: 14%{?dist} +Release: 15%{?dist} License: GPL-2.0-or-later ExclusiveArch: %{kernel_arches} @@ -72,7 +78,12 @@ BuildRequires: /usr/bin/pod2man BuildRequires: /usr/bin/pod2html BuildRequires: rpm BuildRequires: rpm-devel +%if %{with dnf5} BuildRequires: dnf5 +%else +BuildRequires: dnf +BuildRequires: dnf-plugins-core +%endif BuildRequires: /usr/sbin/mke2fs BuildRequires: e2fsprogs-devel BuildRequires: findutils @@ -139,7 +150,12 @@ Requires: %{name} = %{version}-%{release} Requires: rpm-build # Dependencies needed for supermin --prepare +%if %{with dnf5} Requires: dnf5 +%else +Requires: dnf +Requires: dnf-plugins-core +%endif Requires: findutils @@ -165,7 +181,7 @@ autoreconf -fi # to remove this later. See: # https://bugzilla.redhat.com/show_bug.cgi?id=2209412 # https://fedoraproject.org/wiki/Changes/ReplaceDnfWithDnf5 -%configure DNF=%{_bindir}/dnf5 --disable-network-tests +%configure %{?with_dnf5:DNF=%{_bindir}/dnf5} --disable-network-tests %if %{with dietlibc} make -C init CC="diet gcc" @@ -208,6 +224,9 @@ make check || { %changelog +* Wed Aug 02 2023 Yaakov Selkowitz - 5.3.3-15 +- Defer dnf5 until Fedora 41 + * Sat Jul 22 2023 Fedora Release Engineering - 5.3.3-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From 6f9f7bfc2ee8622d921e5ab3228cc4e4ed2d4dd3 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 5 Oct 2023 14:59:46 +0100 Subject: [PATCH 16/33] OCaml 5.1 rebuild for Fedora 40 --- supermin.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/supermin.spec b/supermin.spec index 2c99fc1..24548fd 100644 --- a/supermin.spec +++ b/supermin.spec @@ -38,7 +38,7 @@ ExcludeArch: %{ix86} Summary: Tool for creating supermin appliances Name: supermin Version: 5.3.3 -Release: 15%{?dist} +Release: 16%{?dist} License: GPL-2.0-or-later ExclusiveArch: %{kernel_arches} @@ -224,6 +224,9 @@ make check || { %changelog +* Thu Oct 05 2023 Richard W.M. Jones - 5.3.3-16 +- OCaml 5.1 rebuild for Fedora 40 + * Wed Aug 02 2023 Yaakov Selkowitz - 5.3.3-15 - Defer dnf5 until Fedora 41 From 2417d4becfeec7070b53645bbcb5d0f57f4444f5 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 10 Nov 2023 11:03:54 +0000 Subject: [PATCH 17/33] Fix RISC-V gzip compressed kernels --- ...base-location-in-usr-lib-sysimage-rp.patch | 4 +- 0002-Add-support-for-OCaml-5.0.patch | 4 +- ...estore-compatibility-with-OCaml-4.07.patch | 4 +- ...Detect-dnf5-and-omit-missing-options.patch | 4 +- 0005-rpm-Use-dnf-config-instead-of-c.patch | 4 +- ...ugging-of-the-supermin-if-newer-calc.patch | 4 +- 0007-src-Fix-if-newer-copy-kernel.patch | 4 +- ...m-Reenable-disable_excludes-for-dnf5.patch | 4 +- ...kernel.ml-Fix-kernel-filtering-for-a.patch | 26 +++++++ ...utput-complete-exe-instead-of-custom.patch | 4 +- ...ly-output-complete-exe-to-final-link.patch | 4 +- ...kernel.ml-Rename-function-file-kerne.patch | 36 ++++++++++ 0013-src-Uncompress-kernel-on-RISC-V.patch | 72 +++++++++++++++++++ supermin.spec | 14 +++- 14 files changed, 165 insertions(+), 23 deletions(-) create mode 100644 0009-src-format_ext2_kernel.ml-Fix-kernel-filtering-for-a.patch rename 0009-ocamlc-Use-output-complete-exe-instead-of-custom.patch => 0010-ocamlc-Use-output-complete-exe-instead-of-custom.patch (93%) rename 0010-ocamlc-Only-supply-output-complete-exe-to-final-link.patch => 0011-ocamlc-Only-supply-output-complete-exe-to-final-link.patch (94%) create mode 100644 0012-src-format_ext2_kernel.ml-Rename-function-file-kerne.patch create mode 100644 0013-src-Uncompress-kernel-on-RISC-V.patch 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 2ae9ef2..ffd86f0 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 01/10] rpm: New RPM database location in /usr/lib/sysimage/rpm +Subject: [PATCH 01/13] 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.37.3 +2.42.0 diff --git a/0002-Add-support-for-OCaml-5.0.patch b/0002-Add-support-for-OCaml-5.0.patch index 68a06aa..03325a1 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 02/10] Add support for OCaml 5.0 +Subject: [PATCH 02/13] 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.37.3 +2.42.0 diff --git a/0003-Restore-compatibility-with-OCaml-4.07.patch b/0003-Restore-compatibility-with-OCaml-4.07.patch index 746e72c..ad99e23 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 03/10] Restore compatibility with OCaml < 4.07 +Subject: [PATCH 03/13] 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.37.3 +2.42.0 diff --git a/0004-rpm-Detect-dnf5-and-omit-missing-options.patch b/0004-rpm-Detect-dnf5-and-omit-missing-options.patch index 3efc582..9c28148 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 04/10] rpm: Detect dnf5 and omit missing options +Subject: [PATCH 04/13] 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.37.3 +2.42.0 diff --git a/0005-rpm-Use-dnf-config-instead-of-c.patch b/0005-rpm-Use-dnf-config-instead-of-c.patch index d9b2b79..667cccf 100644 --- a/0005-rpm-Use-dnf-config-instead-of-c.patch +++ b/0005-rpm-Use-dnf-config-instead-of-c.patch @@ -1,7 +1,7 @@ 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 05/10] rpm: Use dnf --config instead of -c +Subject: [PATCH 05/13] rpm: Use dnf --config instead of -c dnf5 does not support -c. dnf4 supports either. @@ -24,5 +24,5 @@ index 3e803c6..e94f35f 100644 (quote tdir) (quoted_list rpms) in -- -2.37.3 +2.42.0 diff --git a/0006-src-Improved-debugging-of-the-supermin-if-newer-calc.patch b/0006-src-Improved-debugging-of-the-supermin-if-newer-calc.patch index 2b0be0e..6ab70b6 100644 --- a/0006-src-Improved-debugging-of-the-supermin-if-newer-calc.patch +++ b/0006-src-Improved-debugging-of-the-supermin-if-newer-calc.patch @@ -1,7 +1,7 @@ From 8dd37da1b5979842b0db44b44655eeaf621f7ac9 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 12 Jun 2023 12:51:56 +0100 -Subject: [PATCH 06/10] src: Improved debugging of the supermin if-newer +Subject: [PATCH 06/13] src: Improved debugging of the supermin if-newer calculation Also I expanded the code to make it easier to read. There is no @@ -52,5 +52,5 @@ index d49c1e8..c30c73c 100644 printf "supermin: if-newer: output does not need rebuilding\n%!"; exit 0 -- -2.37.3 +2.42.0 diff --git a/0007-src-Fix-if-newer-copy-kernel.patch b/0007-src-Fix-if-newer-copy-kernel.patch index fa11fe5..1758fc3 100644 --- a/0007-src-Fix-if-newer-copy-kernel.patch +++ b/0007-src-Fix-if-newer-copy-kernel.patch @@ -1,7 +1,7 @@ From 8c38641042e274a713a18daf7fc85584ca0fc9bb Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 12 Jun 2023 13:02:37 +0100 -Subject: [PATCH 07/10] src: Fix --if-newer --copy-kernel +Subject: [PATCH 07/13] src: Fix --if-newer --copy-kernel We previously copied the kernel into the appliance using 'cp -p' which preserves the datestamps of the installed kernel. This can confuse @@ -35,5 +35,5 @@ index c592703..6d2e699 100644 run_command cmd ) -- -2.37.3 +2.42.0 diff --git a/0008-rpm-Reenable-disable_excludes-for-dnf5.patch b/0008-rpm-Reenable-disable_excludes-for-dnf5.patch index a59c9c7..d8fb554 100644 --- a/0008-rpm-Reenable-disable_excludes-for-dnf5.patch +++ b/0008-rpm-Reenable-disable_excludes-for-dnf5.patch @@ -1,7 +1,7 @@ From 2f3eae350aa89b8067201a8bb24ff830d0fd919c Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 22 Jun 2023 08:35:51 +0100 -Subject: [PATCH 08/10] rpm: Reenable disable_excludes for dnf5 +Subject: [PATCH 08/13] rpm: Reenable disable_excludes for dnf5 Updates: commit 92d5d7e8c27088fa3fb8e5e6e9c5b8d3209053d6 Thanks: Jan Kolarik @@ -25,5 +25,5 @@ index e94f35f..783d1bb 100644 (quoted_list rpms) in run_command cmd -- -2.37.3 +2.42.0 diff --git a/0009-src-format_ext2_kernel.ml-Fix-kernel-filtering-for-a.patch b/0009-src-format_ext2_kernel.ml-Fix-kernel-filtering-for-a.patch new file mode 100644 index 0000000..70f22bc --- /dev/null +++ b/0009-src-format_ext2_kernel.ml-Fix-kernel-filtering-for-a.patch @@ -0,0 +1,26 @@ +From 4b3922feb65150f3423d0877038c5ba6e16d910c Mon Sep 17 00:00:00 2001 +From: Simon Fischer <1522981+Fischer-Simon@users.noreply.github.com> +Date: Wed, 12 Jul 2023 17:10:53 +0200 +Subject: [PATCH 09/13] src/format_ext2_kernel.ml: Fix kernel filtering for + aarch64 architecture + +Add appropriate globs for arm based kernels. The file names end in -arm64 but the architecture is named aarch64. +--- + src/format_ext2_kernel.ml | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/format_ext2_kernel.ml b/src/format_ext2_kernel.ml +index 6d2e699..4589552 100644 +--- a/src/format_ext2_kernel.ml ++++ b/src/format_ext2_kernel.ml +@@ -187,6 +187,7 @@ and patt_of_cpu host_cpu = + | "amd64" | "x86_64" -> ["amd64"; "x86_64"] + | "parisc" | "parisc64" -> ["hppa"; "hppa64"] + | "ppc64el" -> ["powerpc64le"] ++ | "aarch64" -> ["aarch64"; "arm64"] + | _ when host_cpu.[0] = 'i' && host_cpu.[2] = '8' && host_cpu.[3] = '6' -> ["?86"] + | _ when String.length host_cpu >= 5 && String.sub host_cpu 0 5 = "armv7" -> ["armmp"] + | _ -> [host_cpu] +-- +2.42.0 + diff --git a/0009-ocamlc-Use-output-complete-exe-instead-of-custom.patch b/0010-ocamlc-Use-output-complete-exe-instead-of-custom.patch similarity index 93% rename from 0009-ocamlc-Use-output-complete-exe-instead-of-custom.patch rename to 0010-ocamlc-Use-output-complete-exe-instead-of-custom.patch index dec8e75..6c34134 100644 --- a/0009-ocamlc-Use-output-complete-exe-instead-of-custom.patch +++ b/0010-ocamlc-Use-output-complete-exe-instead-of-custom.patch @@ -1,7 +1,7 @@ From dc80dbbef60d5d81a7d4321683a8c7305dc04972 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 12 Jul 2023 22:37:58 +0100 -Subject: [PATCH 09/10] ocamlc: Use -output-complete-exe instead of -custom +Subject: [PATCH 10/13] ocamlc: Use -output-complete-exe instead of -custom This prevents bytecode executables from being broken by strip and similar tools. Note this is incompatible with OCaml < 4.10 (so breaks @@ -29,5 +29,5 @@ index 5b07e5d..5a1c671 100644 OBJECTS = $(XOBJECTS) BEST = opt -- -2.37.3 +2.42.0 diff --git a/0010-ocamlc-Only-supply-output-complete-exe-to-final-link.patch b/0011-ocamlc-Only-supply-output-complete-exe-to-final-link.patch similarity index 94% rename from 0010-ocamlc-Only-supply-output-complete-exe-to-final-link.patch rename to 0011-ocamlc-Only-supply-output-complete-exe-to-final-link.patch index 693527d..e4f9621 100644 --- a/0010-ocamlc-Only-supply-output-complete-exe-to-final-link.patch +++ b/0011-ocamlc-Only-supply-output-complete-exe-to-final-link.patch @@ -1,7 +1,7 @@ From 59a8ffc40db94a38879d9c923520e0bd70ffa271 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 12 Jul 2023 22:51:43 +0100 -Subject: [PATCH 10/10] ocamlc: Only supply -output-complete-exe to final link +Subject: [PATCH 11/13] ocamlc: Only supply -output-complete-exe to final link Add a separate variable to store link flags, and use that to supply -output-complete-exe. Apparently ocamlc ignores -custom in the wrong @@ -38,5 +38,5 @@ index 5a1c671..1268aa5 100644 .mli.cmi: -- -2.37.3 +2.42.0 diff --git a/0012-src-format_ext2_kernel.ml-Rename-function-file-kerne.patch b/0012-src-format_ext2_kernel.ml-Rename-function-file-kerne.patch new file mode 100644 index 0000000..63b7e5d --- /dev/null +++ b/0012-src-format_ext2_kernel.ml-Rename-function-file-kerne.patch @@ -0,0 +1,36 @@ +From 9a0d078dc35fde7a715666bce6c765ed5fe5e916 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Fri, 10 Nov 2023 08:55:25 +0000 +Subject: [PATCH 12/13] src/format_ext2_kernel.ml: Rename function file -> + kernel + +No change, just rename the function. +--- + src/format_ext2_kernel.ml | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/format_ext2_kernel.ml b/src/format_ext2_kernel.ml +index 4589552..36514c6 100644 +--- a/src/format_ext2_kernel.ml ++++ b/src/format_ext2_kernel.ml +@@ -54,7 +54,7 @@ let rec build_kernel debug host_cpu copy_kernel kernel = + printf "supermin: kernel: modpath %s\n%!" modpath; + ); + +- copy_or_symlink_file copy_kernel kernel_file kernel; ++ copy_or_symlink_kernel copy_kernel kernel_file kernel; + + (kernel_version, modpath) + +@@ -308,7 +308,7 @@ and read_string chan offset len = + really_input chan buf 0 len; + Bytes.to_string buf + +-and copy_or_symlink_file copy_kernel src dest = ++and copy_or_symlink_kernel copy_kernel src dest = + if not copy_kernel then + symlink src dest + else ( +-- +2.42.0 + diff --git a/0013-src-Uncompress-kernel-on-RISC-V.patch b/0013-src-Uncompress-kernel-on-RISC-V.patch new file mode 100644 index 0000000..32abb93 --- /dev/null +++ b/0013-src-Uncompress-kernel-on-RISC-V.patch @@ -0,0 +1,72 @@ +From 5230e2c3cd07e82bd6431e871e239f7056bf25ad Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Fri, 10 Nov 2023 10:20:49 +0000 +Subject: [PATCH 13/13] src: Uncompress kernel on RISC-V + +--- + src/format_ext2_kernel.ml | 35 ++++++++++++++++++++++++++++++++++- + 1 file changed, 34 insertions(+), 1 deletion(-) + +diff --git a/src/format_ext2_kernel.ml b/src/format_ext2_kernel.ml +index 36514c6..09a3f21 100644 +--- a/src/format_ext2_kernel.ml ++++ b/src/format_ext2_kernel.ml +@@ -25,6 +25,20 @@ open Ext2fs + open Fnmatch + open Glob + ++(* Similar but not the same as get_file_type in mode_build. There ++ * is a case for deriving a common base utility. XXX ++ *) ++type compression_type = GZip | Uncompressed ++let get_compression_type file = ++ let chan = open_in file in ++ let buf = Bytes.create 512 in ++ let len = input chan buf 0 (Bytes.length buf) in ++ close_in chan; ++ let buf = Bytes.to_string buf in ++ if len >= 3 && buf.[0] = '\x1f' && buf.[1] = '\x8b' && buf.[2] = '\x08' ++ then GZip ++ else Uncompressed (* or other unknown compression type *) ++ + let rec build_kernel debug host_cpu copy_kernel kernel = + (* Locate the kernel. + * SUPERMIN_* environment variables override everything. If those +@@ -54,7 +68,19 @@ let rec build_kernel debug host_cpu copy_kernel kernel = + printf "supermin: kernel: modpath %s\n%!" modpath; + ); + +- copy_or_symlink_kernel copy_kernel kernel_file kernel; ++ (* RISC-V relies on the bootloader or firmware to uncompress the ++ * kernel and doesn't have a concept of self-extracting kernels. ++ * On Arm which is similar, qemu -kernel will automatically uncompress ++ * the kernel, but qemu-system-riscv won't do that and the code is a ++ * big mess so I don't fancy fixing it. So we have to detect that ++ * case here and uncompress the kernel. ++ *) ++ let kernel_compression_type = get_compression_type kernel_file in ++ if string_prefix "riscv" host_cpu && kernel_compression_type <> Uncompressed ++ then ++ copy_and_uncompress_kernel kernel_compression_type kernel_file kernel ++ else ++ copy_or_symlink_kernel copy_kernel kernel_file kernel; + + (kernel_version, modpath) + +@@ -308,6 +334,13 @@ and read_string chan offset len = + really_input chan buf 0 len; + Bytes.to_string buf + ++and copy_and_uncompress_kernel compression_type src dest = ++ let cmd = ++ match compression_type with ++ | GZip -> sprintf "zcat %s > %s" (quote src) (quote dest) ++ | Uncompressed -> sprintf "cp %s %s" (quote src) (quote dest) in ++ run_command cmd ++ + and copy_or_symlink_kernel copy_kernel src dest = + if not copy_kernel then + symlink src dest +-- +2.42.0 + diff --git a/supermin.spec b/supermin.spec index 24548fd..d432237 100644 --- a/supermin.spec +++ b/supermin.spec @@ -38,7 +38,7 @@ ExcludeArch: %{ix86} Summary: Tool for creating supermin appliances Name: supermin Version: 5.3.3 -Release: 16%{?dist} +Release: 17%{?dist} License: GPL-2.0-or-later ExclusiveArch: %{kernel_arches} @@ -67,9 +67,14 @@ Patch: 0006-src-Improved-debugging-of-the-supermin-if-newer-calc.patch Patch: 0007-src-Fix-if-newer-copy-kernel.patch # Reenable disable_excludes for dnf5 Patch: 0008-rpm-Reenable-disable_excludes-for-dnf5.patch +# Fix kernel filtering on aarch64 +Patch: 0009-src-format_ext2_kernel.ml-Fix-kernel-filtering-for-a.patch # Fix bytecode builds so they resist stripping -Patch: 0009-ocamlc-Use-output-complete-exe-instead-of-custom.patch -Patch: 0010-ocamlc-Only-supply-output-complete-exe-to-final-link.patch +Patch: 0010-ocamlc-Use-output-complete-exe-instead-of-custom.patch +Patch: 0011-ocamlc-Only-supply-output-complete-exe-to-final-link.patch +# Fix RISC-V gzip compressed kernels +Patch: 0012-src-format_ext2_kernel.ml-Rename-function-file-kerne.patch +Patch: 0013-src-Uncompress-kernel-on-RISC-V.patch BuildRequires: gcc BuildRequires: make @@ -224,6 +229,9 @@ make check || { %changelog +* Fri Nov 10 2023 Richard W.M. Jones - 5.3.3-17 +- Fix RISC-V gzip compressed kernels + * Thu Oct 05 2023 Richard W.M. Jones - 5.3.3-16 - OCaml 5.1 rebuild for Fedora 40 From a3f30e63dc36a5c7255644133c2686213d96cafa Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 12 Dec 2023 14:02:50 +0000 Subject: [PATCH 18/33] OCaml 5.1.1 rebuild for Fedora 40 --- supermin.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/supermin.spec b/supermin.spec index d432237..2b9729d 100644 --- a/supermin.spec +++ b/supermin.spec @@ -38,7 +38,7 @@ ExcludeArch: %{ix86} Summary: Tool for creating supermin appliances Name: supermin Version: 5.3.3 -Release: 17%{?dist} +Release: 18%{?dist} License: GPL-2.0-or-later ExclusiveArch: %{kernel_arches} @@ -229,6 +229,9 @@ make check || { %changelog +* Tue Dec 12 2023 Richard W.M. Jones - 5.3.3-18 +- OCaml 5.1.1 rebuild for Fedora 40 + * Fri Nov 10 2023 Richard W.M. Jones - 5.3.3-17 - Fix RISC-V gzip compressed kernels From e50448eed693b86ac2627c160771c8cc7dc65675 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 18 Dec 2023 13:45:35 +0000 Subject: [PATCH 19/33] OCaml 5.1.1 + s390x code gen fix for Fedora 40 --- supermin.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/supermin.spec b/supermin.spec index 2b9729d..086cf8d 100644 --- a/supermin.spec +++ b/supermin.spec @@ -38,7 +38,7 @@ ExcludeArch: %{ix86} Summary: Tool for creating supermin appliances Name: supermin Version: 5.3.3 -Release: 18%{?dist} +Release: 19%{?dist} License: GPL-2.0-or-later ExclusiveArch: %{kernel_arches} @@ -229,6 +229,9 @@ make check || { %changelog +* Mon Dec 18 2023 Richard W.M. Jones - 5.3.3-19 +- OCaml 5.1.1 + s390x code gen fix for Fedora 40 + * Tue Dec 12 2023 Richard W.M. Jones - 5.3.3-18 - OCaml 5.1.1 rebuild for Fedora 40 From 61460d5d8f023181268a0757f8d657570dff5507 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 11 Jan 2024 12:25:53 +0000 Subject: [PATCH 20/33] New upstream version 5.3.4 Remove patches which are now all upstream. --- ...base-location-in-usr-lib-sysimage-rp.patch | 50 ------- 0002-Add-support-for-OCaml-5.0.patch | 98 -------------- ...estore-compatibility-with-OCaml-4.07.patch | 125 ------------------ ...Detect-dnf5-and-omit-missing-options.patch | 58 -------- 0005-rpm-Use-dnf-config-instead-of-c.patch | 28 ---- ...ugging-of-the-supermin-if-newer-calc.patch | 56 -------- 0007-src-Fix-if-newer-copy-kernel.patch | 39 ------ ...m-Reenable-disable_excludes-for-dnf5.patch | 29 ---- ...kernel.ml-Fix-kernel-filtering-for-a.patch | 26 ---- ...utput-complete-exe-instead-of-custom.patch | 33 ----- ...ly-output-complete-exe-to-final-link.patch | 42 ------ ...kernel.ml-Rename-function-file-kerne.patch | 36 ----- 0013-src-Uncompress-kernel-on-RISC-V.patch | 72 ---------- sources | 4 +- supermin.spec | 31 +---- 15 files changed, 8 insertions(+), 719 deletions(-) delete mode 100644 0001-rpm-New-RPM-database-location-in-usr-lib-sysimage-rp.patch delete mode 100644 0002-Add-support-for-OCaml-5.0.patch delete mode 100644 0003-Restore-compatibility-with-OCaml-4.07.patch delete mode 100644 0004-rpm-Detect-dnf5-and-omit-missing-options.patch delete mode 100644 0005-rpm-Use-dnf-config-instead-of-c.patch delete mode 100644 0006-src-Improved-debugging-of-the-supermin-if-newer-calc.patch delete mode 100644 0007-src-Fix-if-newer-copy-kernel.patch delete mode 100644 0008-rpm-Reenable-disable_excludes-for-dnf5.patch delete mode 100644 0009-src-format_ext2_kernel.ml-Fix-kernel-filtering-for-a.patch delete mode 100644 0010-ocamlc-Use-output-complete-exe-instead-of-custom.patch delete mode 100644 0011-ocamlc-Only-supply-output-complete-exe-to-final-link.patch delete mode 100644 0012-src-format_ext2_kernel.ml-Rename-function-file-kerne.patch delete mode 100644 0013-src-Uncompress-kernel-on-RISC-V.patch 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 deleted file mode 100644 index ffd86f0..0000000 --- a/0001-rpm-New-RPM-database-location-in-usr-lib-sysimage-rp.patch +++ /dev/null @@ -1,50 +0,0 @@ -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 01/13] 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. - -http://lists.rpm.org/pipermail/rpm-maint/2017-October/006723.html -https://fedoraproject.org/wiki/Changes/RelocateRPMToUsr -https://src.fedoraproject.org/rpms/rpm/pull-request/21 ---- - src/ph_rpm.ml | 20 +++++++++++++++----- - 1 file changed, 15 insertions(+), 5 deletions(-) - -diff --git a/src/ph_rpm.ml b/src/ph_rpm.ml -index 85557fe..2c199c1 100644 ---- a/src/ph_rpm.ml -+++ b/src/ph_rpm.ml -@@ -236,12 +236,22 @@ let rpm_package_name pkg = - let rpm = rpm_of_pkg pkg in - rpm.name - -+let rpmdb_locations = [ -+ "/usr/lib/sysimage/rpm/rpmdb.sqlite"; -+ "/var/lib/rpm/rpmdb.sqlite"; -+ "/var/lib/rpm/Packages" -+] -+ -+let find_rpmdb () = -+ let rec loop = function -+ | [] -> error "rpm: cannot locate RPM database; if this is a normal RPM-based Linux distro then this is probably a supermin bug" -+ | db :: rest -> -+ if Sys.file_exists db then db else loop rest -+ in -+ loop rpmdb_locations -+ - let rpm_get_package_database_mtime () = -- (try -- lstat "/var/lib/rpm/rpmdb.sqlite" -- with Unix_error (ENOENT, _, _) -> -- lstat "/var/lib/rpm/Packages" -- ).st_mtime -+ (lstat (find_rpmdb ())).st_mtime - - (* Return the best provider of a particular RPM requirement. - * --- -2.42.0 - diff --git a/0002-Add-support-for-OCaml-5.0.patch b/0002-Add-support-for-OCaml-5.0.patch deleted file mode 100644 index 03325a1..0000000 --- a/0002-Add-support-for-OCaml-5.0.patch +++ /dev/null @@ -1,98 +0,0 @@ -From f8774efbe02d3651cde449333cf108e79adba48c Mon Sep 17 00:00:00 2001 -From: Kate -Date: Wed, 16 Nov 2022 19:30:01 +0000 -Subject: [PATCH 02/13] Add support for OCaml 5.0 - ---- - src/mode_build.ml | 4 ++-- - src/supermin.ml | 16 ++++++++-------- - src/utils.ml | 4 ++-- - 3 files changed, 12 insertions(+), 12 deletions(-) - -diff --git a/src/mode_build.ml b/src/mode_build.ml -index 7c48295..f81341d 100644 ---- a/src/mode_build.ml -+++ b/src/mode_build.ml -@@ -123,7 +123,7 @@ let rec build debug - (PackageSet.cardinal packages); - if debug >= 2 then ( - List.iter (printf " - %s\n") pretty_packages; -- flush Pervasives.stdout -+ flush Stdlib.stdout - ) - ); - -@@ -207,7 +207,7 @@ let rec build debug - (List.length files); - if debug >= 2 then ( - List.iter (fun { ft_path = path } -> printf " - %s\n" path) files; -- flush Pervasives.stdout -+ flush Stdlib.stdout - ) - ); - -diff --git a/src/supermin.ml b/src/supermin.ml -index 659e857..bef9db6 100644 ---- a/src/supermin.ml -+++ b/src/supermin.ml -@@ -296,27 +296,27 @@ let () = - main () - with - | Unix.Unix_error (code, fname, "") -> (* from a syscall *) -- Printexc.print_backtrace Pervasives.stderr; -+ Printexc.print_backtrace Stdlib.stderr; - error "error: %s: %s" fname (Unix.error_message code) - | Unix.Unix_error (code, fname, param) -> (* from a syscall *) -- Printexc.print_backtrace Pervasives.stderr; -+ Printexc.print_backtrace Stdlib.stderr; - error "error: %s: %s: %s" fname (Unix.error_message code) param - | Failure msg -> (* from failwith/failwithf *) -- Printexc.print_backtrace Pervasives.stderr; -+ Printexc.print_backtrace Stdlib.stderr; - error "failure: %s" msg - | Librpm.Multiple_matches (package, count) -> (* from librpm *) -- Printexc.print_backtrace Pervasives.stderr; -+ Printexc.print_backtrace Stdlib.stderr; - error "RPM error: %d occurrences for %s" count package - | Invalid_argument msg -> (* probably should never happen *) -- Printexc.print_backtrace Pervasives.stderr; -+ Printexc.print_backtrace Stdlib.stderr; - error "internal error: invalid argument: %s" msg - | Assert_failure (file, line, char) -> (* should never happen *) -- Printexc.print_backtrace Pervasives.stderr; -+ Printexc.print_backtrace Stdlib.stderr; - error "internal error: assertion failed at %s, line %d, char %d" - file line char - | Not_found -> (* should never happen *) -- Printexc.print_backtrace Pervasives.stderr; -+ Printexc.print_backtrace Stdlib.stderr; - error "internal error: Not_found exception was thrown" - | exn -> (* something not matched above *) -- Printexc.print_backtrace Pervasives.stderr; -+ Printexc.print_backtrace Stdlib.stderr; - error "exception: %s" (Printexc.to_string exn) -diff --git a/src/utils.ml b/src/utils.ml -index 521d49e..ae99294 100644 ---- a/src/utils.ml -+++ b/src/utils.ml -@@ -40,7 +40,7 @@ let dir_exists name = - try (stat name).st_kind = S_DIR - with Unix_error _ -> false - --let uniq ?(cmp = Pervasives.compare) xs = -+let uniq ?(cmp = Stdlib.compare) xs = - let rec loop acc = function - | [] -> acc - | [x] -> x :: acc -@@ -51,7 +51,7 @@ let uniq ?(cmp = Pervasives.compare) xs = - in - List.rev (loop [] xs) - --let sort_uniq ?(cmp = Pervasives.compare) xs = -+let sort_uniq ?(cmp = Stdlib.compare) xs = - let xs = List.sort cmp xs in - let xs = uniq ~cmp xs in - xs --- -2.42.0 - diff --git a/0003-Restore-compatibility-with-OCaml-4.07.patch b/0003-Restore-compatibility-with-OCaml-4.07.patch deleted file mode 100644 index ad99e23..0000000 --- a/0003-Restore-compatibility-with-OCaml-4.07.patch +++ /dev/null @@ -1,125 +0,0 @@ -From 3efe663421d94376694f292ca1fcf2732a82149f Mon Sep 17 00:00:00 2001 -From: Kate -Date: Wed, 16 Nov 2022 19:59:36 +0000 -Subject: [PATCH 03/13] Restore compatibility with OCaml < 4.07 - ---- - src/mode_build.ml | 6 ++++-- - src/supermin.ml | 18 ++++++++++-------- - src/utils.ml | 6 ++++-- - 3 files changed, 18 insertions(+), 12 deletions(-) - -diff --git a/src/mode_build.ml b/src/mode_build.ml -index f81341d..f0e5e09 100644 ---- a/src/mode_build.ml -+++ b/src/mode_build.ml -@@ -16,6 +16,8 @@ - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - *) - -+let stdlib_stdout = stdout -+ - open Unix - open Unix.LargeFile - open Printf -@@ -123,7 +125,7 @@ let rec build debug - (PackageSet.cardinal packages); - if debug >= 2 then ( - List.iter (printf " - %s\n") pretty_packages; -- flush Stdlib.stdout -+ flush stdlib_stdout - ) - ); - -@@ -207,7 +209,7 @@ let rec build debug - (List.length files); - if debug >= 2 then ( - List.iter (fun { ft_path = path } -> printf " - %s\n" path) files; -- flush Stdlib.stdout -+ flush stdlib_stdout - ) - ); - -diff --git a/src/supermin.ml b/src/supermin.ml -index bef9db6..d49c1e8 100644 ---- a/src/supermin.ml -+++ b/src/supermin.ml -@@ -16,6 +16,8 @@ - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - *) - -+let stdlib_stderr = stderr -+ - open Unix - open Unix.LargeFile - open Printf -@@ -296,27 +298,27 @@ let () = - main () - with - | Unix.Unix_error (code, fname, "") -> (* from a syscall *) -- Printexc.print_backtrace Stdlib.stderr; -+ Printexc.print_backtrace stdlib_stderr; - error "error: %s: %s" fname (Unix.error_message code) - | Unix.Unix_error (code, fname, param) -> (* from a syscall *) -- Printexc.print_backtrace Stdlib.stderr; -+ Printexc.print_backtrace stdlib_stderr; - error "error: %s: %s: %s" fname (Unix.error_message code) param - | Failure msg -> (* from failwith/failwithf *) -- Printexc.print_backtrace Stdlib.stderr; -+ Printexc.print_backtrace stdlib_stderr; - error "failure: %s" msg - | Librpm.Multiple_matches (package, count) -> (* from librpm *) -- Printexc.print_backtrace Stdlib.stderr; -+ Printexc.print_backtrace stdlib_stderr; - error "RPM error: %d occurrences for %s" count package - | Invalid_argument msg -> (* probably should never happen *) -- Printexc.print_backtrace Stdlib.stderr; -+ Printexc.print_backtrace stdlib_stderr; - error "internal error: invalid argument: %s" msg - | Assert_failure (file, line, char) -> (* should never happen *) -- Printexc.print_backtrace Stdlib.stderr; -+ Printexc.print_backtrace stdlib_stderr; - error "internal error: assertion failed at %s, line %d, char %d" - file line char - | Not_found -> (* should never happen *) -- Printexc.print_backtrace Stdlib.stderr; -+ Printexc.print_backtrace stdlib_stderr; - error "internal error: Not_found exception was thrown" - | exn -> (* something not matched above *) -- Printexc.print_backtrace Stdlib.stderr; -+ Printexc.print_backtrace stdlib_stderr; - error "exception: %s" (Printexc.to_string exn) -diff --git a/src/utils.ml b/src/utils.ml -index ae99294..1dc4310 100644 ---- a/src/utils.ml -+++ b/src/utils.ml -@@ -16,6 +16,8 @@ - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - *) - -+let stdlib_compare = compare -+ - open Unix - open Unix.LargeFile - open Printf -@@ -40,7 +42,7 @@ let dir_exists name = - try (stat name).st_kind = S_DIR - with Unix_error _ -> false - --let uniq ?(cmp = Stdlib.compare) xs = -+let uniq ?(cmp = stdlib_compare) xs = - let rec loop acc = function - | [] -> acc - | [x] -> x :: acc -@@ -51,7 +53,7 @@ let uniq ?(cmp = Stdlib.compare) xs = - in - List.rev (loop [] xs) - --let sort_uniq ?(cmp = Stdlib.compare) xs = -+let sort_uniq ?(cmp = stdlib_compare) xs = - let xs = List.sort cmp xs in - let xs = uniq ~cmp xs in - xs --- -2.42.0 - diff --git a/0004-rpm-Detect-dnf5-and-omit-missing-options.patch b/0004-rpm-Detect-dnf5-and-omit-missing-options.patch deleted file mode 100644 index 9c28148..0000000 --- a/0004-rpm-Detect-dnf5-and-omit-missing-options.patch +++ /dev/null @@ -1,58 +0,0 @@ -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 04/13] rpm: Detect dnf5 and omit missing options - -Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2209412 ---- - src/ph_rpm.ml | 23 +++++++++++++++++++++-- - 1 file changed, 21 insertions(+), 2 deletions(-) - -diff --git a/src/ph_rpm.ml b/src/ph_rpm.ml -index 2c199c1..3e803c6 100644 ---- a/src/ph_rpm.ml -+++ b/src/ph_rpm.ml -@@ -482,19 +482,38 @@ and download_all_packages_with_dnf pkgs dir tdir = - (* Old dnf didn't create the destdir directory, newer versions do. *) - mkdir tdir 0o700; - -+ (* dnf5 lacks various options so we have to detect it: -+ * https://github.com/rpm-software-management/dnf5/issues/580 -+ * https://github.com/rpm-software-management/dnf5/issues/581 -+ *) -+ let is_dnf5 = is_dnf5 () in -+ let debug_quiet_option = -+ if !settings.debug < 1 then " -q" -+ else if not is_dnf5 then " -v" -+ else "" in -+ - let rpms = pkgs_as_NA_rpms pkgs in - - let cmd = -- sprintf "%s download%s%s --destdir=%s --disableexcludes=all %s" -+ sprintf "%s download%s%s%s --destdir=%s %s" - Config.dnf -- (if !settings.debug >= 1 then " -v" else " -q") -+ debug_quiet_option - (match !settings.packager_config with - | None -> "" - | Some filename -> sprintf " -c %s" (quote filename)) -+ (if not is_dnf5 then " --disableexcludes=all" else "") - (quote tdir) - (quoted_list rpms) in - run_command cmd - -+and is_dnf5 () = -+ let cmd = sprintf "%s --version" Config.dnf in -+ let lines = run_command_get_lines cmd in -+ match lines with -+ | [] -> error "rpm: no output from '%s' command" cmd -+ | line :: _ when find line "version 5" >= 0 -> true -+ | _ -> false -+ - and pkgs_as_NA_rpms pkgs = - let rpms = List.map rpm_of_pkg (PackageSet.elements pkgs) in - List.map ( --- -2.42.0 - diff --git a/0005-rpm-Use-dnf-config-instead-of-c.patch b/0005-rpm-Use-dnf-config-instead-of-c.patch deleted file mode 100644 index 667cccf..0000000 --- a/0005-rpm-Use-dnf-config-instead-of-c.patch +++ /dev/null @@ -1,28 +0,0 @@ -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 05/13] 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.42.0 - diff --git a/0006-src-Improved-debugging-of-the-supermin-if-newer-calc.patch b/0006-src-Improved-debugging-of-the-supermin-if-newer-calc.patch deleted file mode 100644 index 6ab70b6..0000000 --- a/0006-src-Improved-debugging-of-the-supermin-if-newer-calc.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 8dd37da1b5979842b0db44b44655eeaf621f7ac9 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Mon, 12 Jun 2023 12:51:56 +0100 -Subject: [PATCH 06/13] src: Improved debugging of the supermin if-newer - calculation - -Also I expanded the code to make it easier to read. There is no -change to the calculation intended. ---- - src/supermin.ml | 29 ++++++++++++++++++++++++++--- - 1 file changed, 26 insertions(+), 3 deletions(-) - -diff --git a/src/supermin.ml b/src/supermin.ml -index d49c1e8..c30c73c 100644 ---- a/src/supermin.ml -+++ b/src/supermin.ml -@@ -241,10 +241,33 @@ appliance automatically. - try - let outputs = Mode_build.get_outputs args inputs in - let outputs = List.map ((//) outputdir) outputs in -- let odates = List.map (fun d -> (lstat d).st_mtime) (outputdir :: outputs) in -- let idates = List.map (fun d -> (lstat d).st_mtime) inputs in -+ let outputs = outputdir :: outputs in -+ let odates = List.map (fun f -> (lstat f).st_mtime) outputs in -+ if debug >= 2 then ( -+ List.iter ( -+ fun f -> -+ printf "supermin: if-newer: output %s => %.2f\n" -+ f (lstat f).st_mtime -+ ) outputs; -+ ); -+ let idates = List.map (fun f -> (lstat f).st_mtime) inputs in -+ if debug >= 2 then ( -+ List.iter ( -+ fun f -> -+ printf "supermin: if-newer: input %s => %.2f\n" -+ f (lstat f).st_mtime -+ ) inputs; -+ ); - let pdate = (get_package_handler ()).ph_get_package_database_mtime () in -- if List.for_all (fun idate -> List.for_all (fun odate -> idate < odate) odates) (pdate :: idates) then ( -+ if debug >= 2 then ( -+ printf "supermin: if-newer: package database date: %.2f\n" pdate; -+ ); -+ let older = -+ List.for_all ( -+ fun idate -> -+ List.for_all (fun odate -> idate < odate) odates -+ ) (pdate :: idates) in -+ if older then ( - if debug >= 1 then - printf "supermin: if-newer: output does not need rebuilding\n%!"; - exit 0 --- -2.42.0 - diff --git a/0007-src-Fix-if-newer-copy-kernel.patch b/0007-src-Fix-if-newer-copy-kernel.patch deleted file mode 100644 index 1758fc3..0000000 --- a/0007-src-Fix-if-newer-copy-kernel.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 8c38641042e274a713a18daf7fc85584ca0fc9bb Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Mon, 12 Jun 2023 13:02:37 +0100 -Subject: [PATCH 07/13] src: Fix --if-newer --copy-kernel - -We previously copied the kernel into the appliance using 'cp -p' which -preserves the datestamps of the installed kernel. This can confuse -the --if-newer calculation, if for example the package database is -newer than the date on the installed kernel (which quite often is the -case). This makes it think that the appliance is always older than -the package database, thus forcing a rebuild. - -We can fix this using 'cp' instead of 'cp -p'. We don't need the -permissions and datestamps on the copied kernel to be preserved anyway -(in fact, it could cause problems if the permissions are restrictive). - -Fixes: commit 30de2cb603cdde33524a66d5466f6a9b986ce8a6 ---- - src/format_ext2_kernel.ml | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/src/format_ext2_kernel.ml b/src/format_ext2_kernel.ml -index c592703..6d2e699 100644 ---- a/src/format_ext2_kernel.ml -+++ b/src/format_ext2_kernel.ml -@@ -311,6 +311,9 @@ and copy_or_symlink_file copy_kernel src dest = - if not copy_kernel then - symlink src dest - else ( -- let cmd = sprintf "cp -p %s %s" (quote src) (quote dest) in -+ (* NB: Do not use -p here, we want the kernel to appear newer -+ * so that --if-newer works. -+ *) -+ let cmd = sprintf "cp %s %s" (quote src) (quote dest) in - run_command cmd - ) --- -2.42.0 - diff --git a/0008-rpm-Reenable-disable_excludes-for-dnf5.patch b/0008-rpm-Reenable-disable_excludes-for-dnf5.patch deleted file mode 100644 index d8fb554..0000000 --- a/0008-rpm-Reenable-disable_excludes-for-dnf5.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 2f3eae350aa89b8067201a8bb24ff830d0fd919c Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Thu, 22 Jun 2023 08:35:51 +0100 -Subject: [PATCH 08/13] rpm: Reenable disable_excludes for dnf5 - -Updates: commit 92d5d7e8c27088fa3fb8e5e6e9c5b8d3209053d6 -Thanks: Jan Kolarik -Link: https://github.com/rpm-software-management/dnf5/issues/581#issuecomment-1600682713 ---- - src/ph_rpm.ml | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/ph_rpm.ml b/src/ph_rpm.ml -index e94f35f..783d1bb 100644 ---- a/src/ph_rpm.ml -+++ b/src/ph_rpm.ml -@@ -501,7 +501,8 @@ and download_all_packages_with_dnf pkgs dir tdir = - (match !settings.packager_config with - | None -> "" - | Some filename -> sprintf " --config=%s" (quote filename)) -- (if not is_dnf5 then " --disableexcludes=all" else "") -+ (if not is_dnf5 then " --disableexcludes=all" -+ else " --setopt=disable_excludes=*") - (quote tdir) - (quoted_list rpms) in - run_command cmd --- -2.42.0 - diff --git a/0009-src-format_ext2_kernel.ml-Fix-kernel-filtering-for-a.patch b/0009-src-format_ext2_kernel.ml-Fix-kernel-filtering-for-a.patch deleted file mode 100644 index 70f22bc..0000000 --- a/0009-src-format_ext2_kernel.ml-Fix-kernel-filtering-for-a.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 4b3922feb65150f3423d0877038c5ba6e16d910c Mon Sep 17 00:00:00 2001 -From: Simon Fischer <1522981+Fischer-Simon@users.noreply.github.com> -Date: Wed, 12 Jul 2023 17:10:53 +0200 -Subject: [PATCH 09/13] src/format_ext2_kernel.ml: Fix kernel filtering for - aarch64 architecture - -Add appropriate globs for arm based kernels. The file names end in -arm64 but the architecture is named aarch64. ---- - src/format_ext2_kernel.ml | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/format_ext2_kernel.ml b/src/format_ext2_kernel.ml -index 6d2e699..4589552 100644 ---- a/src/format_ext2_kernel.ml -+++ b/src/format_ext2_kernel.ml -@@ -187,6 +187,7 @@ and patt_of_cpu host_cpu = - | "amd64" | "x86_64" -> ["amd64"; "x86_64"] - | "parisc" | "parisc64" -> ["hppa"; "hppa64"] - | "ppc64el" -> ["powerpc64le"] -+ | "aarch64" -> ["aarch64"; "arm64"] - | _ when host_cpu.[0] = 'i' && host_cpu.[2] = '8' && host_cpu.[3] = '6' -> ["?86"] - | _ when String.length host_cpu >= 5 && String.sub host_cpu 0 5 = "armv7" -> ["armmp"] - | _ -> [host_cpu] --- -2.42.0 - diff --git a/0010-ocamlc-Use-output-complete-exe-instead-of-custom.patch b/0010-ocamlc-Use-output-complete-exe-instead-of-custom.patch deleted file mode 100644 index 6c34134..0000000 --- a/0010-ocamlc-Use-output-complete-exe-instead-of-custom.patch +++ /dev/null @@ -1,33 +0,0 @@ -From dc80dbbef60d5d81a7d4321683a8c7305dc04972 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Wed, 12 Jul 2023 22:37:58 +0100 -Subject: [PATCH 10/13] ocamlc: Use -output-complete-exe instead of -custom - -This prevents bytecode executables from being broken by strip and -similar tools. Note this is incompatible with OCaml < 4.10 (so breaks -RHEL 8). However this only affects bytecode builds which we prefer -not to use in RHEL. I left the old option in the Makefile so that it -could be uncommented by someone using older OCaml + bytecode. We need -this for OCaml 5.0 since that drops native backends (temporarily) for -riscv64, s390x and ppc64le. ---- - src/Makefile.am | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/Makefile.am b/src/Makefile.am -index 5b07e5d..5a1c671 100644 ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -132,7 +132,8 @@ OCAMLFLAGS = -g -warn-error +C+D+E+F+L+M+P+S+U+V+X+Y+Z-3 - if !HAVE_OCAMLOPT - OBJECTS = $(BOBJECTS) - BEST = c --OCAMLFLAGS += -custom -+#OCAMLFLAGS += -custom # for OCaml < 4.10 -+OCAMLFLAGS += -output-complete-exe - else - OBJECTS = $(XOBJECTS) - BEST = opt --- -2.42.0 - diff --git a/0011-ocamlc-Only-supply-output-complete-exe-to-final-link.patch b/0011-ocamlc-Only-supply-output-complete-exe-to-final-link.patch deleted file mode 100644 index e4f9621..0000000 --- a/0011-ocamlc-Only-supply-output-complete-exe-to-final-link.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 59a8ffc40db94a38879d9c923520e0bd70ffa271 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Wed, 12 Jul 2023 22:51:43 +0100 -Subject: [PATCH 11/13] ocamlc: Only supply -output-complete-exe to final link - -Add a separate variable to store link flags, and use that to supply --output-complete-exe. Apparently ocamlc ignores -custom in the wrong -place. - -Fixes: dc80dbbef60d5d81a7d4321683a8c7305dc04972 ---- - src/Makefile.am | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -diff --git a/src/Makefile.am b/src/Makefile.am -index 5a1c671..1268aa5 100644 ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -132,8 +132,8 @@ OCAMLFLAGS = -g -warn-error +C+D+E+F+L+M+P+S+U+V+X+Y+Z-3 - if !HAVE_OCAMLOPT - OBJECTS = $(BOBJECTS) - BEST = c --#OCAMLFLAGS += -custom # for OCaml < 4.10 --OCAMLFLAGS += -output-complete-exe -+#OCAMLLINKFLAGS = -custom # for OCaml < 4.10 -+OCAMLLINKFLAGS = -output-complete-exe - else - OBJECTS = $(XOBJECTS) - BEST = opt -@@ -143,7 +143,8 @@ supermin_DEPENDENCIES = $(OBJECTS) - - supermin_LINK = \ - ./supermin-link.sh \ -- $(OCAMLFIND) $(BEST) $(OCAMLFLAGS) $(OCAMLPACKAGES) \ -+ $(OCAMLFIND) $(BEST) $(OCAMLLINKFLAGS) $(OCAMLFLAGS) \ -+ $(OCAMLPACKAGES) \ - $(OBJECTS) -o $@ - - .mli.cmi: --- -2.42.0 - diff --git a/0012-src-format_ext2_kernel.ml-Rename-function-file-kerne.patch b/0012-src-format_ext2_kernel.ml-Rename-function-file-kerne.patch deleted file mode 100644 index 63b7e5d..0000000 --- a/0012-src-format_ext2_kernel.ml-Rename-function-file-kerne.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 9a0d078dc35fde7a715666bce6c765ed5fe5e916 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Fri, 10 Nov 2023 08:55:25 +0000 -Subject: [PATCH 12/13] src/format_ext2_kernel.ml: Rename function file -> - kernel - -No change, just rename the function. ---- - src/format_ext2_kernel.ml | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/format_ext2_kernel.ml b/src/format_ext2_kernel.ml -index 4589552..36514c6 100644 ---- a/src/format_ext2_kernel.ml -+++ b/src/format_ext2_kernel.ml -@@ -54,7 +54,7 @@ let rec build_kernel debug host_cpu copy_kernel kernel = - printf "supermin: kernel: modpath %s\n%!" modpath; - ); - -- copy_or_symlink_file copy_kernel kernel_file kernel; -+ copy_or_symlink_kernel copy_kernel kernel_file kernel; - - (kernel_version, modpath) - -@@ -308,7 +308,7 @@ and read_string chan offset len = - really_input chan buf 0 len; - Bytes.to_string buf - --and copy_or_symlink_file copy_kernel src dest = -+and copy_or_symlink_kernel copy_kernel src dest = - if not copy_kernel then - symlink src dest - else ( --- -2.42.0 - diff --git a/0013-src-Uncompress-kernel-on-RISC-V.patch b/0013-src-Uncompress-kernel-on-RISC-V.patch deleted file mode 100644 index 32abb93..0000000 --- a/0013-src-Uncompress-kernel-on-RISC-V.patch +++ /dev/null @@ -1,72 +0,0 @@ -From 5230e2c3cd07e82bd6431e871e239f7056bf25ad Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Fri, 10 Nov 2023 10:20:49 +0000 -Subject: [PATCH 13/13] src: Uncompress kernel on RISC-V - ---- - src/format_ext2_kernel.ml | 35 ++++++++++++++++++++++++++++++++++- - 1 file changed, 34 insertions(+), 1 deletion(-) - -diff --git a/src/format_ext2_kernel.ml b/src/format_ext2_kernel.ml -index 36514c6..09a3f21 100644 ---- a/src/format_ext2_kernel.ml -+++ b/src/format_ext2_kernel.ml -@@ -25,6 +25,20 @@ open Ext2fs - open Fnmatch - open Glob - -+(* Similar but not the same as get_file_type in mode_build. There -+ * is a case for deriving a common base utility. XXX -+ *) -+type compression_type = GZip | Uncompressed -+let get_compression_type file = -+ let chan = open_in file in -+ let buf = Bytes.create 512 in -+ let len = input chan buf 0 (Bytes.length buf) in -+ close_in chan; -+ let buf = Bytes.to_string buf in -+ if len >= 3 && buf.[0] = '\x1f' && buf.[1] = '\x8b' && buf.[2] = '\x08' -+ then GZip -+ else Uncompressed (* or other unknown compression type *) -+ - let rec build_kernel debug host_cpu copy_kernel kernel = - (* Locate the kernel. - * SUPERMIN_* environment variables override everything. If those -@@ -54,7 +68,19 @@ let rec build_kernel debug host_cpu copy_kernel kernel = - printf "supermin: kernel: modpath %s\n%!" modpath; - ); - -- copy_or_symlink_kernel copy_kernel kernel_file kernel; -+ (* RISC-V relies on the bootloader or firmware to uncompress the -+ * kernel and doesn't have a concept of self-extracting kernels. -+ * On Arm which is similar, qemu -kernel will automatically uncompress -+ * the kernel, but qemu-system-riscv won't do that and the code is a -+ * big mess so I don't fancy fixing it. So we have to detect that -+ * case here and uncompress the kernel. -+ *) -+ let kernel_compression_type = get_compression_type kernel_file in -+ if string_prefix "riscv" host_cpu && kernel_compression_type <> Uncompressed -+ then -+ copy_and_uncompress_kernel kernel_compression_type kernel_file kernel -+ else -+ copy_or_symlink_kernel copy_kernel kernel_file kernel; - - (kernel_version, modpath) - -@@ -308,6 +334,13 @@ and read_string chan offset len = - really_input chan buf 0 len; - Bytes.to_string buf - -+and copy_and_uncompress_kernel compression_type src dest = -+ let cmd = -+ match compression_type with -+ | GZip -> sprintf "zcat %s > %s" (quote src) (quote dest) -+ | Uncompressed -> sprintf "cp %s %s" (quote src) (quote dest) in -+ run_command cmd -+ - and copy_or_symlink_kernel copy_kernel src dest = - if not copy_kernel then - symlink src dest --- -2.42.0 - diff --git a/sources b/sources index 98c633b..2def3d0 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (supermin-5.3.3.tar.gz) = 39eb687a4e6fbd13d356612f950352848626fe68a14054a62ac7fa1bb3b42be716189b1505bf137331974ea02d75e2e8079f412a133af165cba7767699925f38 -SHA512 (supermin-5.3.3.tar.gz.sig) = e5109e718b06992bde73be913be49cd00358ec835566beb1f207109f54f73dbc6600275e929eb88fea42bda13643ec3ee9bb80032f8a05c37537f28bafb49fad +SHA512 (supermin-5.3.4.tar.gz) = 383d783f57af3a870f1debd3c87929b1d73a12d404c3268640963967a53582419923076410d47e79de0eb2a111fe66a998258e636de41caa3ff7f296b5458797 +SHA512 (supermin-5.3.4.tar.gz.sig) = 1cae330cc4cee6c48e238738a4fd26b31f21f5ffb054b0496d6eebc5e45d0599c2a9586f3e0a9fe25475ab184394bf5d4155a5c5f82b83a380da0994568c8937 diff --git a/supermin.spec b/supermin.spec index 086cf8d..02add2b 100644 --- a/supermin.spec +++ b/supermin.spec @@ -37,8 +37,8 @@ ExcludeArch: %{ix86} Summary: Tool for creating supermin appliances Name: supermin -Version: 5.3.3 -Release: 19%{?dist} +Version: 5.3.4 +Release: 1%{?dist} License: GPL-2.0-or-later ExclusiveArch: %{kernel_arches} @@ -53,29 +53,6 @@ Source1: http://download.libguestfs.org/supermin/%{source_directory}/%{nam # Keyring used to verify tarball signature. Source2: libguestfs.keyring -# https://fedoraproject.org/wiki/Changes/RelocateRPMToUsr -Patch: 0001-rpm-New-RPM-database-location-in-usr-lib-sysimage-rp.patch -# OCaml 5 compatibility: -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 -# Fix --if-newer -Patch: 0006-src-Improved-debugging-of-the-supermin-if-newer-calc.patch -Patch: 0007-src-Fix-if-newer-copy-kernel.patch -# Reenable disable_excludes for dnf5 -Patch: 0008-rpm-Reenable-disable_excludes-for-dnf5.patch -# Fix kernel filtering on aarch64 -Patch: 0009-src-format_ext2_kernel.ml-Fix-kernel-filtering-for-a.patch -# Fix bytecode builds so they resist stripping -Patch: 0010-ocamlc-Use-output-complete-exe-instead-of-custom.patch -Patch: 0011-ocamlc-Only-supply-output-complete-exe-to-final-link.patch -# Fix RISC-V gzip compressed kernels -Patch: 0012-src-format_ext2_kernel.ml-Rename-function-file-kerne.patch -Patch: 0013-src-Uncompress-kernel-on-RISC-V.patch - BuildRequires: gcc BuildRequires: make BuildRequires: autoconf, automake @@ -229,6 +206,10 @@ make check || { %changelog +* Thu Jan 11 2023 Richard W.M. Jones - 5.3.4-1 +- New upstream version 5.3.4 +- Remove patches which are now all upstream. + * Mon Dec 18 2023 Richard W.M. Jones - 5.3.3-19 - OCaml 5.1.1 + s390x code gen fix for Fedora 40 From 0c6d8abf1180b99d3a68959dfeae2338ccc46111 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 11 Jan 2024 12:51:13 +0000 Subject: [PATCH 21/33] Fix date in changelog --- supermin.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/supermin.spec b/supermin.spec index 02add2b..a68c7ec 100644 --- a/supermin.spec +++ b/supermin.spec @@ -206,7 +206,7 @@ make check || { %changelog -* Thu Jan 11 2023 Richard W.M. Jones - 5.3.4-1 +* Thu Jan 11 2024 Richard W.M. Jones - 5.3.4-1 - New upstream version 5.3.4 - Remove patches which are now all upstream. From 836dd0b2295cdd9c3a2744cd9e163ed2c195c466 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 27 Jan 2024 04:46:06 +0000 Subject: [PATCH 22/33] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- supermin.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/supermin.spec b/supermin.spec index a68c7ec..1ba7048 100644 --- a/supermin.spec +++ b/supermin.spec @@ -38,7 +38,7 @@ ExcludeArch: %{ix86} Summary: Tool for creating supermin appliances Name: supermin Version: 5.3.4 -Release: 1%{?dist} +Release: 2%{?dist} License: GPL-2.0-or-later ExclusiveArch: %{kernel_arches} @@ -206,6 +206,9 @@ make check || { %changelog +* Sat Jan 27 2024 Fedora Release Engineering - 5.3.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Thu Jan 11 2024 Richard W.M. Jones - 5.3.4-1 - New upstream version 5.3.4 - Remove patches which are now all upstream. From 0ca25557e7296c248e7c406442aef923d309f876 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 29 May 2024 18:11:21 +0100 Subject: [PATCH 23/33] OCaml 5.2.0 for Fedora 41 --- supermin.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/supermin.spec b/supermin.spec index 1ba7048..f30495e 100644 --- a/supermin.spec +++ b/supermin.spec @@ -38,7 +38,7 @@ ExcludeArch: %{ix86} Summary: Tool for creating supermin appliances Name: supermin Version: 5.3.4 -Release: 2%{?dist} +Release: 3%{?dist} License: GPL-2.0-or-later ExclusiveArch: %{kernel_arches} @@ -206,6 +206,9 @@ make check || { %changelog +* Wed May 29 2024 Richard W.M. Jones - 5.3.4-3 +- OCaml 5.2.0 for Fedora 41 + * Sat Jan 27 2024 Fedora Release Engineering - 5.3.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 479078fe0c659ce7b36e864eb143baf8275e297e Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 19 Jun 2024 13:38:14 +0100 Subject: [PATCH 24/33] OCaml 5.2.0 ppc64le fix --- supermin.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/supermin.spec b/supermin.spec index f30495e..b1cfa6e 100644 --- a/supermin.spec +++ b/supermin.spec @@ -38,7 +38,7 @@ ExcludeArch: %{ix86} Summary: Tool for creating supermin appliances Name: supermin Version: 5.3.4 -Release: 3%{?dist} +Release: 4%{?dist} License: GPL-2.0-or-later ExclusiveArch: %{kernel_arches} @@ -206,6 +206,9 @@ make check || { %changelog +* Wed Jun 19 2024 Richard W.M. Jones - 5.3.4-4 +- OCaml 5.2.0 ppc64le fix + * Wed May 29 2024 Richard W.M. Jones - 5.3.4-3 - OCaml 5.2.0 for Fedora 41 From 50e0475ea7fe924fd536f6bc6adf6c9d77bc05bd Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 20 Jul 2024 06:44:22 +0000 Subject: [PATCH 25/33] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- supermin.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/supermin.spec b/supermin.spec index b1cfa6e..9a69b19 100644 --- a/supermin.spec +++ b/supermin.spec @@ -38,7 +38,7 @@ ExcludeArch: %{ix86} Summary: Tool for creating supermin appliances Name: supermin Version: 5.3.4 -Release: 4%{?dist} +Release: 5%{?dist} License: GPL-2.0-or-later ExclusiveArch: %{kernel_arches} @@ -206,6 +206,9 @@ make check || { %changelog +* Sat Jul 20 2024 Fedora Release Engineering - 5.3.4-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Wed Jun 19 2024 Richard W.M. Jones - 5.3.4-4 - OCaml 5.2.0 ppc64le fix From 4a1323f319c0322e63d610af7c054410a201b880 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 31 Aug 2024 10:39:53 +0100 Subject: [PATCH 26/33] New upstream version 5.3.5 --- sources | 4 ++-- supermin.spec | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sources b/sources index 2def3d0..cc31e54 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (supermin-5.3.4.tar.gz) = 383d783f57af3a870f1debd3c87929b1d73a12d404c3268640963967a53582419923076410d47e79de0eb2a111fe66a998258e636de41caa3ff7f296b5458797 -SHA512 (supermin-5.3.4.tar.gz.sig) = 1cae330cc4cee6c48e238738a4fd26b31f21f5ffb054b0496d6eebc5e45d0599c2a9586f3e0a9fe25475ab184394bf5d4155a5c5f82b83a380da0994568c8937 +SHA512 (supermin-5.3.5.tar.gz) = e410bafe06805880f0f701e78d743a6e22e9d25e57bd70a020d583dba6d710ba9917d7afc37be714d9bde410c7ff35f4198300b3af0858d761b0b3e07af58dc0 +SHA512 (supermin-5.3.5.tar.gz.sig) = 88f446c3855367dd8917a6eb44d926f8a09dac9913d9098757951ccb3300f9e3544689a45d661382ae24221f8558bbfc188976f4db288829c28379b87949ed7e diff --git a/supermin.spec b/supermin.spec index 9a69b19..30f7a51 100644 --- a/supermin.spec +++ b/supermin.spec @@ -37,8 +37,8 @@ ExcludeArch: %{ix86} Summary: Tool for creating supermin appliances Name: supermin -Version: 5.3.4 -Release: 5%{?dist} +Version: 5.3.5 +Release: 1%{?dist} License: GPL-2.0-or-later ExclusiveArch: %{kernel_arches} @@ -206,6 +206,9 @@ make check || { %changelog +* Sat Aug 31 2024 Richard W.M. Jones - 5.3.5-1 +- New upstream version 5.3.5 + * Sat Jul 20 2024 Fedora Release Engineering - 5.3.4-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From 42c5e1c3607b6deb8c5a69cbaaa1b1b8c813680c Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 21 Oct 2024 14:34:22 +0100 Subject: [PATCH 27/33] Use stable owner, group and mtime in base.tar.gz (RHBZ#2320025) --- ...le-owner-group-and-mtime-in-base.tar.patch | 33 +++++++++++++++++++ supermin.spec | 10 +++++- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 0001-prepare-Use-stable-owner-group-and-mtime-in-base.tar.patch diff --git a/0001-prepare-Use-stable-owner-group-and-mtime-in-base.tar.patch b/0001-prepare-Use-stable-owner-group-and-mtime-in-base.tar.patch new file mode 100644 index 0000000..6e70551 --- /dev/null +++ b/0001-prepare-Use-stable-owner-group-and-mtime-in-base.tar.patch @@ -0,0 +1,33 @@ +From 7a80a6eec799841b828ba7f617709562d8061435 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Mon, 21 Oct 2024 11:55:53 +0100 +Subject: [PATCH] prepare: Use stable owner, group and mtime in base.tar.gz + +Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2320025 +Signed-off-by: Richard W.M. Jones +--- + src/mode_prepare.ml | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/src/mode_prepare.ml b/src/mode_prepare.ml +index 70f9dd4..6af47b1 100644 +--- a/src/mode_prepare.ml ++++ b/src/mode_prepare.ml +@@ -166,9 +166,12 @@ let prepare debug (copy_kernel, format, host_cpu, + let base = outputdir // "base.tar.gz" in + if debug >= 1 then printf "supermin: writing %s\n%!" base; + let cmd = +- sprintf "tar%s -C %s -zcf %s -T %s" ++ let mtime = ++ try sprintf "--mtime=@%s" (quote (Sys.getenv "SOURCE_DATE_EPOCH")) ++ with Not_found -> "" in ++ sprintf "tar%s -C %s -z --owner=0 --group=0 %s -cf %s -T %s" + (if debug >=1 then " -v" else "") +- (quote dir) (quote base) (quote files_from) in ++ (quote dir) mtime (quote base) (quote files_from) in + run_command cmd; + ) + else ( +-- +2.46.0 + diff --git a/supermin.spec b/supermin.spec index 30f7a51..21e015d 100644 --- a/supermin.spec +++ b/supermin.spec @@ -38,7 +38,7 @@ ExcludeArch: %{ix86} Summary: Tool for creating supermin appliances Name: supermin Version: 5.3.5 -Release: 1%{?dist} +Release: 2%{?dist} License: GPL-2.0-or-later ExclusiveArch: %{kernel_arches} @@ -53,6 +53,11 @@ Source1: http://download.libguestfs.org/supermin/%{source_directory}/%{nam # Keyring used to verify tarball signature. Source2: libguestfs.keyring +# Use stable owner, group and mtime in base.tar.gz +# Upstream in > 5.3.5 +# https://bugzilla.redhat.com/show_bug.cgi?id=2320025 +Patch1: 0001-prepare-Use-stable-owner-group-and-mtime-in-base.tar.patch + BuildRequires: gcc BuildRequires: make BuildRequires: autoconf, automake @@ -206,6 +211,9 @@ make check || { %changelog +* Mon Oct 21 2024 Richard W.M. Jones - 5.3.5-2 +- Use stable owner, group and mtime in base.tar.gz (RHBZ#2320025) + * Sat Aug 31 2024 Richard W.M. Jones - 5.3.5-1 - New upstream version 5.3.5 From 38ee6830fa36b39dc3c804bc505dc110eff81027 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Thu, 9 Jan 2025 13:28:26 -0700 Subject: [PATCH 28/33] OCaml 5.3.0 rebuild for Fedora 42 --- supermin.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/supermin.spec b/supermin.spec index 21e015d..6a26a39 100644 --- a/supermin.spec +++ b/supermin.spec @@ -38,7 +38,7 @@ ExcludeArch: %{ix86} Summary: Tool for creating supermin appliances Name: supermin Version: 5.3.5 -Release: 2%{?dist} +Release: 3%{?dist} License: GPL-2.0-or-later ExclusiveArch: %{kernel_arches} @@ -211,6 +211,9 @@ make check || { %changelog +* Thu Jan 9 2025 Jerry James - 5.3.5-3 +- OCaml 5.3.0 rebuild for Fedora 42 + * Mon Oct 21 2024 Richard W.M. Jones - 5.3.5-2 - Use stable owner, group and mtime in base.tar.gz (RHBZ#2320025) From 1c53902718d952ab457c965e712f4aaef902761a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 19 Jan 2025 11:59:02 +0000 Subject: [PATCH 29/33] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- supermin.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/supermin.spec b/supermin.spec index 6a26a39..0b7c4ed 100644 --- a/supermin.spec +++ b/supermin.spec @@ -38,7 +38,7 @@ ExcludeArch: %{ix86} Summary: Tool for creating supermin appliances Name: supermin Version: 5.3.5 -Release: 3%{?dist} +Release: 4%{?dist} License: GPL-2.0-or-later ExclusiveArch: %{kernel_arches} @@ -211,6 +211,9 @@ make check || { %changelog +* Sun Jan 19 2025 Fedora Release Engineering - 5.3.5-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Thu Jan 9 2025 Jerry James - 5.3.5-3 - OCaml 5.3.0 rebuild for Fedora 42 From dfd1c6610dd3fc514e36ec5d7e29e68ef9da0732 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Fri, 11 Jul 2025 14:39:10 -0600 Subject: [PATCH 30/33] Rebuild to fix OCaml dependencies --- supermin.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/supermin.spec b/supermin.spec index 0b7c4ed..737900b 100644 --- a/supermin.spec +++ b/supermin.spec @@ -38,7 +38,7 @@ ExcludeArch: %{ix86} Summary: Tool for creating supermin appliances Name: supermin Version: 5.3.5 -Release: 4%{?dist} +Release: 5%{?dist} License: GPL-2.0-or-later ExclusiveArch: %{kernel_arches} @@ -211,6 +211,9 @@ make check || { %changelog +* Fri Jul 11 2025 Jerry James - 5.3.5-5 +- Rebuild to fix OCaml dependencies + * Sun Jan 19 2025 Fedora Release Engineering - 5.3.5-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From dbb5a2fe0e36ccacdf586f2c846094f20d7d5a88 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 18:54:20 +0000 Subject: [PATCH 31/33] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- supermin.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/supermin.spec b/supermin.spec index 737900b..c82cad2 100644 --- a/supermin.spec +++ b/supermin.spec @@ -38,7 +38,7 @@ ExcludeArch: %{ix86} Summary: Tool for creating supermin appliances Name: supermin Version: 5.3.5 -Release: 5%{?dist} +Release: 6%{?dist} License: GPL-2.0-or-later ExclusiveArch: %{kernel_arches} @@ -211,6 +211,9 @@ make check || { %changelog +* Fri Jul 25 2025 Fedora Release Engineering - 5.3.5-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Fri Jul 11 2025 Jerry James - 5.3.5-5 - Rebuild to fix OCaml dependencies From 1ce3d77b47fc8501087121de70cab4733d7d1b38 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 13 Oct 2025 18:50:43 +0100 Subject: [PATCH 32/33] OCaml 5.4.0 rebuild --- supermin.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/supermin.spec b/supermin.spec index c82cad2..a1fe3bb 100644 --- a/supermin.spec +++ b/supermin.spec @@ -38,7 +38,7 @@ ExcludeArch: %{ix86} Summary: Tool for creating supermin appliances Name: supermin Version: 5.3.5 -Release: 6%{?dist} +Release: 7%{?dist} License: GPL-2.0-or-later ExclusiveArch: %{kernel_arches} @@ -211,6 +211,9 @@ make check || { %changelog +* Mon Oct 13 2025 Richard W.M. Jones - 5.3.5-7 +- OCaml 5.4.0 rebuild + * Fri Jul 25 2025 Fedora Release Engineering - 5.3.5-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From 809fd5e0a1e395c5ed5e12d7c8eb6ac845587b7b Mon Sep 17 00:00:00 2001 From: Jerry James Date: Tue, 13 Jan 2026 20:49:14 -0700 Subject: [PATCH 33/33] Fix a changelog entry --- supermin.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/supermin.spec b/supermin.spec index a1fe3bb..ee09a0f 100644 --- a/supermin.spec +++ b/supermin.spec @@ -217,7 +217,7 @@ make check || { * Fri Jul 25 2025 Fedora Release Engineering - 5.3.5-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild -* Fri Jul 11 2025 Jerry James - 5.3.5-5 +* Fri Jul 11 2025 Jerry James - 5.3.5-5 - Rebuild to fix OCaml dependencies * Sun Jan 19 2025 Fedora Release Engineering - 5.3.5-4