diff --git a/ceph.spec.in b/ceph.spec.in index 79cd572a69d3a..e36fd0fbbb734 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -1,6 +1,11 @@ %bcond_with ocf %bcond_without cephfs_java +# LTTng-UST enabled on Fedora, RHEL 6+, and SLES 12 +%if 0%{?fedora} || 0%{?rhel} >= 6 || 0%{?suse_version} == 1315 +%bcond_without lttng +%endif + %if (0%{?el5} || (0%{?rhel_version} >= 500 && 0%{?rhel_version} <= 600)) %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} @@ -8,11 +13,6 @@ %{!?_udevrulesdir: %global _udevrulesdir /lib/udev/rules.d} -# LTTng-UST enabled on Fedora, RHEL 6, and SLES 12 -%if 0%{?fedora} || 0%{?rhel} == 6 || 0%{?suse_version} == 1315 -%global _with_lttng 1 -%endif - Name: ceph Version: @VERSION@ Release: @RPM_RELEASE@%{?dist} @@ -121,7 +121,7 @@ Requires: redhat-lsb-core BuildRequires: redhat-lsb-core %endif # lttng and babeltrace for rbd-replay-prep -%if 0%{?_with_lttng} +%if %{with lttng} %if 0%{?fedora} || 0%{?rhel} BuildRequires: lttng-ust-devel BuildRequires: libbabeltrace-devel @@ -486,6 +486,10 @@ export RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed -e 's/i386/i486/'` %endif --with-librocksdb-static=check \ $MY_CONF_OPT \ +%if %{without lttng} + --without-lttng \ + --without-babeltrace \ +%endif %{?_with_ocf} \ CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" @@ -632,7 +636,7 @@ fi %{_libdir}/rados-classes/libcls_version.so* %dir %{_libdir}/ceph/erasure-code %{_libdir}/ceph/erasure-code/libec_*.so* -%if 0%{?_with_lttng} +%if %{with lttng} %{_libdir}/libos_tp.so* %{_libdir}/libosd_tp.so* %endif @@ -685,7 +689,7 @@ fi %{_bindir}/rbd %{_bindir}/rbd-replay %{_bindir}/rbd-replay-many -%if 0%{?_with_lttng} +%if %{with lttng} %{_bindir}/rbd-replay-prep %endif %{_bindir}/ceph-post-file @@ -791,7 +795,7 @@ fi %files -n librados2 %defattr(-,root,root,-) %{_libdir}/librados.so.* -%if 0%{?_with_lttng} +%if %{with lttng} %{_libdir}/librados_tp.so.* %endif @@ -814,7 +818,7 @@ fi %{_includedir}/rados/rados_types.hpp %{_includedir}/rados/memory.h %{_libdir}/librados.so -%if 0%{?_with_lttng} +%if %{with lttng} %{_libdir}/librados_tp.so %endif @@ -846,7 +850,7 @@ fi %files -n librbd1 %defattr(-,root,root,-) %{_libdir}/librbd.so.* -%if 0%{?_with_lttng} +%if %{with lttng} %{_libdir}/librbd_tp.so.* %endif @@ -866,7 +870,7 @@ ln -sf %{_libdir}/librbd.so.1 /usr/lib64/qemu/librbd.so.1 %{_includedir}/rbd/librbd.hpp %{_includedir}/rbd/features.h %{_libdir}/librbd.so -%if 0%{?_with_lttng} +%if %{with lttng} %{_libdir}/librbd_tp.so %endif