1 |
commit: f9741ffa8b1eaf283306886240a31e887012ad7a |
2 |
Author: Marek Szuba <marecki <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun May 29 22:16:46 2022 +0000 |
4 |
Commit: Marek Szuba <marecki <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun May 29 22:16:46 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f9741ffa |
7 |
|
8 |
app-containers/apptainer: trim upstream CFLAGS |
9 |
|
10 |
-DFORTIFY_SOURCE=2 is a Gentoo default and it being explicitly mentioned |
11 |
makes things more difficult for those who would rather use level 3. |
12 |
Nuking -Werror should require no explanation. |
13 |
|
14 |
Closes: https://bugs.gentoo.org/847895 |
15 |
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org> |
16 |
|
17 |
app-containers/apptainer/apptainer-1.0.2.ebuild | 4 ++++ |
18 |
.../apptainer-1.0.2-trim_upstream_cflags.patch | 24 ++++++++++++++++++++++ |
19 |
2 files changed, 28 insertions(+) |
20 |
|
21 |
diff --git a/app-containers/apptainer/apptainer-1.0.2.ebuild b/app-containers/apptainer/apptainer-1.0.2.ebuild |
22 |
index 9f711a070ada..56b48324770c 100644 |
23 |
--- a/app-containers/apptainer/apptainer-1.0.2.ebuild |
24 |
+++ b/app-containers/apptainer/apptainer-1.0.2.ebuild |
25 |
@@ -30,6 +30,10 @@ BDEPEND="virtual/pkgconfig" |
26 |
|
27 |
CONFIG_CHECK="~SQUASHFS" |
28 |
|
29 |
+PATCHES=( |
30 |
+ "${FILESDIR}"/${PN}-1.0.2-trim_upstream_cflags.patch |
31 |
+) |
32 |
+ |
33 |
DOCS=( README.md CONTRIBUTORS.md CONTRIBUTING.md ) |
34 |
|
35 |
src_configure() { |
36 |
|
37 |
diff --git a/app-containers/apptainer/files/apptainer-1.0.2-trim_upstream_cflags.patch b/app-containers/apptainer/files/apptainer-1.0.2-trim_upstream_cflags.patch |
38 |
new file mode 100644 |
39 |
index 000000000000..b1329b5d9d3e |
40 |
--- /dev/null |
41 |
+++ b/app-containers/apptainer/files/apptainer-1.0.2-trim_upstream_cflags.patch |
42 |
@@ -0,0 +1,24 @@ |
43 |
+--- a/mconfig |
44 |
++++ b/mconfig |
45 |
+@@ -42,14 +42,14 @@ |
46 |
+ |
47 |
+ # user_cflags - user-defined CFLAGS without all the cflags_opts |
48 |
+ user_cflags="$CFLAGS" |
49 |
+-cflags_opts="-Wall -Werror -Wfatal-errors -Wno-unknown-warning-option \ |
50 |
++cflags_opts="-Wall -Wfatal-errors -Wno-unknown-warning-option \ |
51 |
+ -Wstrict-prototypes -Wpointer-arith -Wbad-function-cast \ |
52 |
+ -Woverlength-strings -Wframe-larger-than=2047 \ |
53 |
+ -Wno-sign-compare -Wclobbered -Wempty-body -Wmissing-parameter-type \ |
54 |
+ -Wtype-limits -Wunused-parameter -Wunused-but-set-parameter \ |
55 |
+ -Wno-discarded-qualifiers -Wno-incompatible-pointer-types \ |
56 |
+ -pipe -fmessage-length=0 -fPIC" |
57 |
+-cflags="$CFLAGS -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -fstack-protector --param ssp-buffer-size=4" |
58 |
++cflags="$CFLAGS -Wformat -Wformat-security -fstack-protector --param ssp-buffer-size=4" |
59 |
+ ldflags=$LDFLAGS |
60 |
+ |
61 |
+ package_name=apptainer |
62 |
+--- a/mlocal/frags/go_runtime_opts.mk |
63 |
++++ b/mlocal/frags/go_runtime_opts.mk |
64 |
+@@ -1 +1 @@ |
65 |
+-CGO_CFLAGS += -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -fstack-protector --param ssp-buffer-size=4 |
66 |
++CGO_CFLAGS += -O2 -Wformat -Wformat-security -fstack-protector --param ssp-buffer-size=4 |