From: Kefu Chai Date: Tue, 1 Mar 2016 05:51:09 +0000 (+0800) Subject: ceph.spec.in: disable lttng and babeltrace explicitly X-Git-Tag: v10.1.1~63^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f1a44907a2f83cb8080cd8ab5980a30306a33fbd;p=ceph.git ceph.spec.in: disable lttng and babeltrace explicitly before this change, we do not pacakge tracepoint probe shared libraries on rhel7. but "configure" script enables them if lttng is detected. and rpm complains at seeing installed but not pacakged files. as EPEL-7 now includes lttng-ust-devel and libbabeltrace-devel, we'd better BuildRequire them, and build with them unless disabled otherwise. so in this change * make "lttng" an rpm build option enabled by default * BuildRequire lttng-ust-devel and libbabeltrace-devel if the "lttng" "lttng" option is enabled * --without-lttng --without-babeltrace if the "lttng" option is disabled Fixes: #14844 Signed-off-by: Kefu Chai --- diff --git a/ceph.spec.in b/ceph.spec.in index 3a36ab2259e5..972a3f2401d7 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -27,6 +27,10 @@ %bcond_with selinux %endif +# 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())")} @@ -62,11 +66,6 @@ restorecon -R /var/log/radosgw > /dev/null 2>&1; %{!?tmpfiles_create: %global tmpfiles_create systemd-tmpfiles --create} %endif -# 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 - # unify libexec for all targets %global _libexecdir %{_exec_prefix}/lib @@ -187,7 +186,7 @@ BuildRequires: boost-random BuildRequires: python-argparse %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 @@ -706,6 +705,10 @@ export RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed -e 's/i386/i486/'` %endif --with-librocksdb-static=check \ --with-radosgw \ +%if %{without lttng} + --without-lttng \ + --without-babeltrace \ +%endif $CEPH_EXTRA_CONFIGURE_ARGS \ %{?_with_ocf} \ %{?_with_tcmalloc} \ @@ -860,7 +863,7 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/ceph/erasure-code/libec_*.so* %dir %{_libdir}/ceph/compressor %{_libdir}/ceph/compressor/libceph_*.so* -%if 0%{?_with_lttng} +%if %{with lttng} %{_libdir}/libos_tp.so* %{_libdir}/libosd_tp.so* %endif @@ -976,7 +979,7 @@ rm -rf $RPM_BUILD_ROOT %{_bindir}/rbd-replay %{_bindir}/rbd-replay-many %{_bindir}/rbdmap -%if 0%{?_with_lttng} +%if %{with lttng} %{_bindir}/rbd-replay-prep %endif %{_bindir}/ceph-post-file @@ -1202,7 +1205,7 @@ fi %files -n librados2 %defattr(-,root,root,-) %{_libdir}/librados.so.* -%if 0%{?_with_lttng} +%if %{with lttng} %{_libdir}/librados_tp.so.* %endif @@ -1226,7 +1229,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 %{_bindir}/librados-config @@ -1261,7 +1264,7 @@ fi %files -n librbd1 %defattr(-,root,root,-) %{_libdir}/librbd.so.* -%if 0%{?_with_lttng} +%if %{with lttng} %{_libdir}/librbd_tp.so.* %endif @@ -1281,7 +1284,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