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