commit: e282ab19abdaa03f1405a11e363d281ea5a070aa Author: Patrick McLean <chutzpah <AT> gentoo <DOT> org> AuthorDate: Thu Sep 7 23:37:44 2017 +0000 Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org> CommitDate: Thu Sep 7 23:37:44 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e282ab19
sys-cluster/ceph: Fix 10.2.9-r3 to respect CFLAGS Also don't call lsb_release if it is not installed. Filter debugging CFLAGS with gcc-7.2.0 as it causes the compiler to crash. Package-Manager: Portage-2.3.8, Repoman-2.3.3 sys-cluster/ceph/ceph-10.2.9-r3.ebuild | 10 +++- sys-cluster/ceph/files/ceph-10.2.9-cflags.patch | 15 +++++ .../files/ceph-10.2.9-dont-run-lsb_release.patch | 65 ++++++++++++++++++++++ 3 files changed, 88 insertions(+), 2 deletions(-) diff --git a/sys-cluster/ceph/ceph-10.2.9-r3.ebuild b/sys-cluster/ceph/ceph-10.2.9-r3.ebuild index edd9ac4bbd6..73d8983868d 100644 --- a/sys-cluster/ceph/ceph-10.2.9-r3.ebuild +++ b/sys-cluster/ceph/ceph-10.2.9-r3.ebuild @@ -5,7 +5,7 @@ EAPI=6 PYTHON_COMPAT=( python{2_7,3_{4,5,6}} ) inherit check-reqs autotools eutils python-r1 udev user \ - readme.gentoo-r1 systemd versionator flag-o-matic + readme.gentoo-r1 systemd versionator flag-o-matic toolchain-funcs if [[ ${PV} == *9999* ]]; then inherit git-r3 @@ -114,6 +114,8 @@ PATCHES=( "${FILESDIR}/${PN}-10.2.5-Make-RBD-Python-bindings-compatible-with-Python-3.patch" "${FILESDIR}/${PN}-10.2.5-Make-CephFS-bindings-and-tests-compatible-with-Python-3.patch" "${FILESDIR}/${PN}-10.2.7-fix-compilation-with-zstd.patch" + "${FILESDIR}/${PN}-10.2.9-cflags.patch" + "${FILESDIR}/${PN}-10.2.9-dont-run-lsb_release.patch" # pull in some bugfixes from upstream "${FILESDIR}/${PN}-10.2.9-libradosstriper_fix_format_injection_vulnerability.patch" "${FILESDIR}/${PN}-10.2.9-rbd-nbd_relax_size_check_for_newer_kernel_versions.patch" @@ -122,7 +124,6 @@ PATCHES=( "${FILESDIR}/${PN}-10.2.9-osd-scrub_to_specifies_clone_ver_but_transaction_include.patch" "${FILESDIR}/${PN}-10.2.9-rbd-do_not_attempt_to_load_key_if_auth_is_disabled.patch" "${FILESDIR}/${PN}-10.2.9-unlock_sdata_op_ordering_lock_with_sdata_lock.patch" - ) check-reqs_export_vars() { @@ -197,6 +198,11 @@ src_prepare() { #rm -rf "${UNBUNDLE_LIBS[@]}" append-flags -fPIC + + if tc-is-gcc && [[ $(gcc-fullversion) == "7.2.0" ]] && is-flag "-g*"; then + ewarn "Filtering out -g* flags since gcc-7.2 tends to ICE with them and ceph" + filter-flags "-g*" + fi eautoreconf } diff --git a/sys-cluster/ceph/files/ceph-10.2.9-cflags.patch b/sys-cluster/ceph/files/ceph-10.2.9-cflags.patch new file mode 100644 index 00000000000..31221ae2f99 --- /dev/null +++ b/sys-cluster/ceph/files/ceph-10.2.9-cflags.patch @@ -0,0 +1,15 @@ +diff --git a/src/Makefile-env.am b/src/Makefile-env.am +index 4771bad02d..f92e20479b 100644 +--- a/src/Makefile-env.am ++++ b/src/Makefile-env.am +@@ -53,10 +53,6 @@ endif + ## automake environment + + HARDENING_CFLAGS = \ +- -O2 \ +- -g \ +- -pipe \ +- -Wall \ + -Wp,-U_FORTIFY_SOURCE \ + -Wp,-D_FORTIFY_SOURCE=2 \ + -fexceptions \ 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 new file mode 100644 index 00000000000..a6b5515cee2 --- /dev/null +++ b/sys-cluster/ceph/files/ceph-10.2.9-dont-run-lsb_release.patch @@ -0,0 +1,65 @@ +diff --git a/src/ceph-detect-init/Makefile.am b/src/ceph-detect-init/Makefile.am +index 3926ac4bec..90e2eae50c 100644 +--- a/src/ceph-detect-init/Makefile.am ++++ b/src/ceph-detect-init/Makefile.am +@@ -67,7 +67,7 @@ ceph-detect-init-clean: + ceph-detect-init-install-data: + cd $(srcdir)/ceph-detect-init ; \ + if test "$(DESTDIR)" ; then \ +- if lsb_release -si | grep --quiet 'Ubuntu\|Debian\|Devuan' ; then \ ++ if command -v lsb_release >/dev/null && lsb_release -si | grep --quiet 'Ubuntu\|Debian\|Devuan' ; then \ + options=--install-layout=deb ; \ + else \ + options=--prefix=/usr ; \ +diff --git a/src/ceph-disk/Makefile.am b/src/ceph-disk/Makefile.am +index a8532878c8..d908b1649a 100644 +--- a/src/ceph-disk/Makefile.am ++++ b/src/ceph-disk/Makefile.am +@@ -43,7 +43,7 @@ ceph-disk-clean: + ceph-disk-install-data: + cd $(srcdir)/ceph-disk ; \ + if test "$(DESTDIR)" ; then \ +- if lsb_release -si | grep --quiet 'Ubuntu\|Debian\|Devuan' ; then \ ++ if command -v lsb_release >/dev/null && lsb_release -si | grep --quiet 'Ubuntu\|Debian\|Devuan' ; then \ + options=--install-layout=deb ; \ + else \ + options=--prefix=/usr ; \ +diff --git a/src/pybind/cephfs/Makefile.am b/src/pybind/cephfs/Makefile.am +index 698522daa4..c49c190986 100644 +--- a/src/pybind/cephfs/Makefile.am ++++ b/src/pybind/cephfs/Makefile.am +@@ -15,7 +15,7 @@ cephfs-pybind-clean: ${srcdir}/ceph_ver.h + + cephfs-pybind-install-exec: ${srcdir}/ceph_ver.h + if test "$(DESTDIR)" ; then \ +- if lsb_release -si | grep --quiet 'Ubuntu\|Debian\|Devuan' ; then \ ++ if command -v lsb_release >/dev/null && lsb_release -si | grep --quiet 'Ubuntu\|Debian\|Devuan' ; then \ + options=--install-layout=deb ; \ + else \ + options=--prefix=/usr ; \ +diff --git a/src/pybind/rados/Makefile.am b/src/pybind/rados/Makefile.am +index a4145bf0f4..960395fee8 100644 +--- a/src/pybind/rados/Makefile.am ++++ b/src/pybind/rados/Makefile.am +@@ -15,7 +15,7 @@ rados-pybind-clean: ${srcdir}/ceph_ver.h + + rados-pybind-install-exec: ${srcdir}/ceph_ver.h + if test "$(DESTDIR)" ; then \ +- if lsb_release -si | grep --quiet 'Ubuntu\|Debian\|Devuan' ; then \ ++ if command -v lsb_release >/dev/null && lsb_release -si | grep --quiet 'Ubuntu\|Debian\|Devuan' ; then \ + options=--install-layout=deb ; \ + else \ + options=--prefix=/usr ; \ +diff --git a/src/pybind/rbd/Makefile.am b/src/pybind/rbd/Makefile.am +index 7dd49333fa..fbb940d07d 100644 +--- a/src/pybind/rbd/Makefile.am ++++ b/src/pybind/rbd/Makefile.am +@@ -15,7 +15,7 @@ rbd-pybind-clean: ${srcdir}/ceph_ver.h + + rbd-pybind-install-exec: ${srcdir}/ceph_ver.h + if test "$(DESTDIR)" ; then \ +- if lsb_release -si | grep --quiet 'Ubuntu\|Debian\|Devuan' ; then \ ++ if command -v lsb_release >/dev/null && lsb_release -si | grep --quiet 'Ubuntu\|Debian\|Devuan' ; then \ + options=--install-layout=deb ; \ + else \ + options=--prefix=/usr ; \