Skip to content

Commit

Permalink
Merge pull request #8440: hammer: rpm package building fails if the b…
Browse files Browse the repository at this point in the history
…uild machine has lttng and babeltrace development packages installed locally

Reviewed-by: Loic Dachary <ldachary@redhat.com>
  • Loading branch information
Loic Dachary committed Apr 5, 2016
2 parents 7cfc739 + 77a4ed0 commit 47884ea
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions ceph.spec.in
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
%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))")}
%endif

%{!?_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}
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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"

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

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

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

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

Expand Down

0 comments on commit 47884ea

Please sign in to comment.