1 |
commit: e282ab19abdaa03f1405a11e363d281ea5a070aa |
2 |
Author: Patrick McLean <chutzpah <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Sep 7 23:37:44 2017 +0000 |
4 |
Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Sep 7 23:37:44 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e282ab19 |
7 |
|
8 |
sys-cluster/ceph: Fix 10.2.9-r3 to respect CFLAGS |
9 |
|
10 |
Also don't call lsb_release if it is not installed. Filter debugging |
11 |
CFLAGS with gcc-7.2.0 as it causes the compiler to crash. |
12 |
|
13 |
Package-Manager: Portage-2.3.8, Repoman-2.3.3 |
14 |
|
15 |
sys-cluster/ceph/ceph-10.2.9-r3.ebuild | 10 +++- |
16 |
sys-cluster/ceph/files/ceph-10.2.9-cflags.patch | 15 +++++ |
17 |
.../files/ceph-10.2.9-dont-run-lsb_release.patch | 65 ++++++++++++++++++++++ |
18 |
3 files changed, 88 insertions(+), 2 deletions(-) |
19 |
|
20 |
diff --git a/sys-cluster/ceph/ceph-10.2.9-r3.ebuild b/sys-cluster/ceph/ceph-10.2.9-r3.ebuild |
21 |
index edd9ac4bbd6..73d8983868d 100644 |
22 |
--- a/sys-cluster/ceph/ceph-10.2.9-r3.ebuild |
23 |
+++ b/sys-cluster/ceph/ceph-10.2.9-r3.ebuild |
24 |
@@ -5,7 +5,7 @@ EAPI=6 |
25 |
PYTHON_COMPAT=( python{2_7,3_{4,5,6}} ) |
26 |
|
27 |
inherit check-reqs autotools eutils python-r1 udev user \ |
28 |
- readme.gentoo-r1 systemd versionator flag-o-matic |
29 |
+ readme.gentoo-r1 systemd versionator flag-o-matic toolchain-funcs |
30 |
|
31 |
if [[ ${PV} == *9999* ]]; then |
32 |
inherit git-r3 |
33 |
@@ -114,6 +114,8 @@ PATCHES=( |
34 |
"${FILESDIR}/${PN}-10.2.5-Make-RBD-Python-bindings-compatible-with-Python-3.patch" |
35 |
"${FILESDIR}/${PN}-10.2.5-Make-CephFS-bindings-and-tests-compatible-with-Python-3.patch" |
36 |
"${FILESDIR}/${PN}-10.2.7-fix-compilation-with-zstd.patch" |
37 |
+ "${FILESDIR}/${PN}-10.2.9-cflags.patch" |
38 |
+ "${FILESDIR}/${PN}-10.2.9-dont-run-lsb_release.patch" |
39 |
# pull in some bugfixes from upstream |
40 |
"${FILESDIR}/${PN}-10.2.9-libradosstriper_fix_format_injection_vulnerability.patch" |
41 |
"${FILESDIR}/${PN}-10.2.9-rbd-nbd_relax_size_check_for_newer_kernel_versions.patch" |
42 |
@@ -122,7 +124,6 @@ PATCHES=( |
43 |
"${FILESDIR}/${PN}-10.2.9-osd-scrub_to_specifies_clone_ver_but_transaction_include.patch" |
44 |
"${FILESDIR}/${PN}-10.2.9-rbd-do_not_attempt_to_load_key_if_auth_is_disabled.patch" |
45 |
"${FILESDIR}/${PN}-10.2.9-unlock_sdata_op_ordering_lock_with_sdata_lock.patch" |
46 |
- |
47 |
) |
48 |
|
49 |
check-reqs_export_vars() { |
50 |
@@ -197,6 +198,11 @@ src_prepare() { |
51 |
#rm -rf "${UNBUNDLE_LIBS[@]}" |
52 |
|
53 |
append-flags -fPIC |
54 |
+ |
55 |
+ if tc-is-gcc && [[ $(gcc-fullversion) == "7.2.0" ]] && is-flag "-g*"; then |
56 |
+ ewarn "Filtering out -g* flags since gcc-7.2 tends to ICE with them and ceph" |
57 |
+ filter-flags "-g*" |
58 |
+ fi |
59 |
eautoreconf |
60 |
} |
61 |
|
62 |
|
63 |
diff --git a/sys-cluster/ceph/files/ceph-10.2.9-cflags.patch b/sys-cluster/ceph/files/ceph-10.2.9-cflags.patch |
64 |
new file mode 100644 |
65 |
index 00000000000..31221ae2f99 |
66 |
--- /dev/null |
67 |
+++ b/sys-cluster/ceph/files/ceph-10.2.9-cflags.patch |
68 |
@@ -0,0 +1,15 @@ |
69 |
+diff --git a/src/Makefile-env.am b/src/Makefile-env.am |
70 |
+index 4771bad02d..f92e20479b 100644 |
71 |
+--- a/src/Makefile-env.am |
72 |
++++ b/src/Makefile-env.am |
73 |
+@@ -53,10 +53,6 @@ endif |
74 |
+ ## automake environment |
75 |
+ |
76 |
+ HARDENING_CFLAGS = \ |
77 |
+- -O2 \ |
78 |
+- -g \ |
79 |
+- -pipe \ |
80 |
+- -Wall \ |
81 |
+ -Wp,-U_FORTIFY_SOURCE \ |
82 |
+ -Wp,-D_FORTIFY_SOURCE=2 \ |
83 |
+ -fexceptions \ |
84 |
|
85 |
diff --git a/sys-cluster/ceph/files/ceph-10.2.9-dont-run-lsb_release.patch b/sys-cluster/ceph/files/ceph-10.2.9-dont-run-lsb_release.patch |
86 |
new file mode 100644 |
87 |
index 00000000000..a6b5515cee2 |
88 |
--- /dev/null |
89 |
+++ b/sys-cluster/ceph/files/ceph-10.2.9-dont-run-lsb_release.patch |
90 |
@@ -0,0 +1,65 @@ |
91 |
+diff --git a/src/ceph-detect-init/Makefile.am b/src/ceph-detect-init/Makefile.am |
92 |
+index 3926ac4bec..90e2eae50c 100644 |
93 |
+--- a/src/ceph-detect-init/Makefile.am |
94 |
++++ b/src/ceph-detect-init/Makefile.am |
95 |
+@@ -67,7 +67,7 @@ ceph-detect-init-clean: |
96 |
+ ceph-detect-init-install-data: |
97 |
+ cd $(srcdir)/ceph-detect-init ; \ |
98 |
+ if test "$(DESTDIR)" ; then \ |
99 |
+- if lsb_release -si | grep --quiet 'Ubuntu\|Debian\|Devuan' ; then \ |
100 |
++ if command -v lsb_release >/dev/null && lsb_release -si | grep --quiet 'Ubuntu\|Debian\|Devuan' ; then \ |
101 |
+ options=--install-layout=deb ; \ |
102 |
+ else \ |
103 |
+ options=--prefix=/usr ; \ |
104 |
+diff --git a/src/ceph-disk/Makefile.am b/src/ceph-disk/Makefile.am |
105 |
+index a8532878c8..d908b1649a 100644 |
106 |
+--- a/src/ceph-disk/Makefile.am |
107 |
++++ b/src/ceph-disk/Makefile.am |
108 |
+@@ -43,7 +43,7 @@ ceph-disk-clean: |
109 |
+ ceph-disk-install-data: |
110 |
+ cd $(srcdir)/ceph-disk ; \ |
111 |
+ if test "$(DESTDIR)" ; then \ |
112 |
+- if lsb_release -si | grep --quiet 'Ubuntu\|Debian\|Devuan' ; then \ |
113 |
++ if command -v lsb_release >/dev/null && lsb_release -si | grep --quiet 'Ubuntu\|Debian\|Devuan' ; then \ |
114 |
+ options=--install-layout=deb ; \ |
115 |
+ else \ |
116 |
+ options=--prefix=/usr ; \ |
117 |
+diff --git a/src/pybind/cephfs/Makefile.am b/src/pybind/cephfs/Makefile.am |
118 |
+index 698522daa4..c49c190986 100644 |
119 |
+--- a/src/pybind/cephfs/Makefile.am |
120 |
++++ b/src/pybind/cephfs/Makefile.am |
121 |
+@@ -15,7 +15,7 @@ cephfs-pybind-clean: ${srcdir}/ceph_ver.h |
122 |
+ |
123 |
+ cephfs-pybind-install-exec: ${srcdir}/ceph_ver.h |
124 |
+ if test "$(DESTDIR)" ; then \ |
125 |
+- if lsb_release -si | grep --quiet 'Ubuntu\|Debian\|Devuan' ; then \ |
126 |
++ if command -v lsb_release >/dev/null && lsb_release -si | grep --quiet 'Ubuntu\|Debian\|Devuan' ; then \ |
127 |
+ options=--install-layout=deb ; \ |
128 |
+ else \ |
129 |
+ options=--prefix=/usr ; \ |
130 |
+diff --git a/src/pybind/rados/Makefile.am b/src/pybind/rados/Makefile.am |
131 |
+index a4145bf0f4..960395fee8 100644 |
132 |
+--- a/src/pybind/rados/Makefile.am |
133 |
++++ b/src/pybind/rados/Makefile.am |
134 |
+@@ -15,7 +15,7 @@ rados-pybind-clean: ${srcdir}/ceph_ver.h |
135 |
+ |
136 |
+ rados-pybind-install-exec: ${srcdir}/ceph_ver.h |
137 |
+ if test "$(DESTDIR)" ; then \ |
138 |
+- if lsb_release -si | grep --quiet 'Ubuntu\|Debian\|Devuan' ; then \ |
139 |
++ if command -v lsb_release >/dev/null && lsb_release -si | grep --quiet 'Ubuntu\|Debian\|Devuan' ; then \ |
140 |
+ options=--install-layout=deb ; \ |
141 |
+ else \ |
142 |
+ options=--prefix=/usr ; \ |
143 |
+diff --git a/src/pybind/rbd/Makefile.am b/src/pybind/rbd/Makefile.am |
144 |
+index 7dd49333fa..fbb940d07d 100644 |
145 |
+--- a/src/pybind/rbd/Makefile.am |
146 |
++++ b/src/pybind/rbd/Makefile.am |
147 |
+@@ -15,7 +15,7 @@ rbd-pybind-clean: ${srcdir}/ceph_ver.h |
148 |
+ |
149 |
+ rbd-pybind-install-exec: ${srcdir}/ceph_ver.h |
150 |
+ if test "$(DESTDIR)" ; then \ |
151 |
+- if lsb_release -si | grep --quiet 'Ubuntu\|Debian\|Devuan' ; then \ |
152 |
++ if command -v lsb_release >/dev/null && lsb_release -si | grep --quiet 'Ubuntu\|Debian\|Devuan' ; then \ |
153 |
+ options=--install-layout=deb ; \ |
154 |
+ else \ |
155 |
+ options=--prefix=/usr ; \ |