From 7631b22a5960363518ad13da8661c76a1ffec253 Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Wed, 24 Jan 2018 11:41:39 +0100 Subject: build: use libtirpc by default, even if ipv6 is not the default An error sneaked in with Change-Id I86f847dfd. The check for requiring libtirpc-devel should be done regardless of the ipv6-default. Even if IPv6 is not the default, libtirpc-devel should be used unless it is explicitly requested by a --without option. libtirpc can not be used on EL6 and EL7 yet. The EL7 version does not provide xdr_sizeof(), in addition to that, EL6 does not have xdr_uint32_t() and xdr_uint64_t(). BUG: 1536186 Change-Id: I4a8292de2eddad16137df5998334133fc1e11261 Fixes: 0c57232ae07f48bd6483bfe88a182f832377ef52 Signed-off-by: Niels de Vos --- glusterfs.spec.in | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'glusterfs.spec.in') diff --git a/glusterfs.spec.in b/glusterfs.spec.in index f82f30945d0..12594d93750 100644 --- a/glusterfs.spec.in +++ b/glusterfs.spec.in @@ -63,6 +63,13 @@ # rpmbuild -ta @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz --without libtirpc %{?_without_libtirpc:%global _without_libtirpc --without-libtirpc} +# Do not use libtirpc on EL6, it does not have xdr_uint64_t() and xdr_uint32_t +# Do not use libtirpc on EL7, it does not have xdr_sizeof() +%if ( 0%{?rhel} && 0%{?rhel} <= 7 ) +%global _without_libtirpc --without-libtirpc +%endif + + # ocf # if you wish to compile an rpm without the OCF resource agents... # rpmbuild -ta @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz --without ocf @@ -237,7 +244,7 @@ BuildRequires: python2-devel %if ( 0%{?fedora} && 0%{?fedora} < 26 ) || ( 0%{?rhel} ) BuildRequires: python-ctypes %endif -%if ( 0%{?_with_ipv6default:1} ) && ( 0%{!?_without_libtirpc:1} ) +%if ( 0%{?_with_ipv6default:1} ) || ( 0%{!?_without_libtirpc:1} ) BuildRequires: libtirpc-devel %endif %if ( 0%{?fedora} && 0%{?fedora} > 27 ) -- cgit