Skip to content

Commit

Permalink
ceph.spec.in: disable lttng and babeltrace explicitly
Browse files Browse the repository at this point in the history
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 <kchai@redhat.com>
  • Loading branch information
tchaikov committed Mar 12, 2016
1 parent 750701b commit f1a4490
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions ceph.spec.in
Expand Up @@ -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())")}
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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} \
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand All @@ -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
Expand Down Expand Up @@ -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

Expand All @@ -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

Expand Down

0 comments on commit f1a4490

Please sign in to comment.