Reenable stripping
This commit is contained in:
parent
61395e3f5a
commit
1addc80aac
@ -1,7 +1,7 @@
|
||||
From 86fd6f3e86ab99d54a22b475aecccfc19bdff07e Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
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.
|
||||
|
@ -1,7 +1,7 @@
|
||||
From f8774efbe02d3651cde449333cf108e79adba48c Mon Sep 17 00:00:00 2001
|
||||
From: Kate <kit.ty.kate@disroot.org>
|
||||
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 ++--
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 3efe663421d94376694f292ca1fcf2732a82149f Mon Sep 17 00:00:00 2001
|
||||
From: Kate <kit.ty.kate@disroot.org>
|
||||
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 ++++--
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 92d5d7e8c27088fa3fb8e5e6e9c5b8d3209053d6 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
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
|
||||
---
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 057ea99a3211057d2cb2c9971afe56e0a85e0f78 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
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.
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 8dd37da1b5979842b0db44b44655eeaf621f7ac9 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
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
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 8c38641042e274a713a18daf7fc85584ca0fc9bb Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
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
|
||||
|
29
0008-rpm-Reenable-disable_excludes-for-dnf5.patch
Normal file
29
0008-rpm-Reenable-disable_excludes-for-dnf5.patch
Normal file
@ -0,0 +1,29 @@
|
||||
From 2f3eae350aa89b8067201a8bb24ff830d0fd919c Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
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
|
||||
|
33
0009-ocamlc-Use-output-complete-exe-instead-of-custom.patch
Normal file
33
0009-ocamlc-Use-output-complete-exe-instead-of-custom.patch
Normal file
@ -0,0 +1,33 @@
|
||||
From dc80dbbef60d5d81a7d4321683a8c7305dc04972 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
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
|
||||
|
@ -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 <rjones@redhat.com> - 5.3.3-12
|
||||
* Wed Jul 12 2023 Richard W.M. Jones <rjones@redhat.com> - 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 <loganjerry@gmail.com> - 5.3.3-10
|
||||
- OCaml 5.0.0 rebuild
|
||||
|
Loading…
Reference in New Issue
Block a user