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
"${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"
"${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() {
#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
}
--- /dev/null
+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 ; \