From 3a9e8490b755eebb5ceca19aadd4cc89df7832e4 Mon Sep 17 00:00:00 2001 From: "Kaleb S. KEITHLEY" Date: Thu, 18 Jan 2018 12:45:53 -0500 Subject: [PATCH] glibc in Fedora 28 has removed rpc headers and rpcgen, use libtirpc Signed-off-by: Kaleb S. KEITHLEY --- 0001-libtirpc.patch | 30 ++++++++++++++++++++++++++++++ glusterfs.spec | 22 ++++++++++++++++++---- 2 files changed, 48 insertions(+), 4 deletions(-) create mode 100644 0001-libtirpc.patch diff --git a/0001-libtirpc.patch b/0001-libtirpc.patch new file mode 100644 index 0000000..a88e781 --- /dev/null +++ b/0001-libtirpc.patch @@ -0,0 +1,30 @@ +diff --git a/configure.ac b/configure.ac +index 14fc0b826..0b48807f1 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -293,6 +293,10 @@ else + CFLAGS="${CFLAGS} -g -rdynamic" + fi + ++AC_ARG_WITH([libtirpc], ++ AS_HELP_STRING([--with-libtirpc], [Use libtirpc as RPC implementation (instead of sunrpc)]), ++ [], [with_libtirpc=no]) ++ + AC_ARG_WITH([ipv6-default], AC_HELP_STRING([--with-ipv6-default], [Set IPv6 as default.])) + if test "x$with_ipv6_default" = "xyes"; then + IPV6_DEFAULT=yes +@@ -1066,6 +1070,14 @@ AC_SUBST(GF_DISTRIBUTION) + GF_HOST_OS="" + GF_LDFLAGS="-rdynamic" + ++dnl include tirpc for IPv6 builds ++if test "x$with_libtirpc" = "xyes" || test "x$IPV6_DEFAULT" = "xyes" ; then ++ PKG_CHECK_MODULES([TIRPC], [libtirpc], ++ [GF_CFLAGS="$GF_CFLAGS $TIRPC_CFLAGS"; GF_LDFLAGS="$GF_LDFLAGS $TIRPC_LIBS";], ++ [AC_MSG_ERROR([libtirpc requested or needed for IPv6 default but library not found])] ++ ) ++fi ++ + dnl include tirpc for IPv6 builds + if test "x$IPV6_DEFAULT" = "xyes"; then + AC_CHECK_LIB([tirpc], [xdr_string], , AC_MSG_ERROR([libtirpc is required to build glusterfs with IPv6 default])) diff --git a/glusterfs.spec b/glusterfs.spec index 66a9304..400befd 100644 --- a/glusterfs.spec +++ b/glusterfs.spec @@ -88,6 +88,10 @@ %global _without_tiering --disable-tiering %endif +%if ( 0%{?fedora} && 0%{?fedora} > 27 ) +%global _with_libtirpc --with-libtirpc +%endif + ##----------------------------------------------------------------------------- ## All %%global definitions should be placed here and keep them sorted ## @@ -180,7 +184,7 @@ Summary: Distributed File System %if ( 0%{_for_fedora_koji_builds} ) Name: glusterfs Version: 3.13.1 -Release: %{?prereltag:0.}2%{?prereltag:.%{prereltag}}%{?dist} +Release: %{?prereltag:0.}3%{?prereltag:.%{prereltag}}%{?dist} %else Name: @PACKAGE_NAME@ Version: @PACKAGE_VERSION@ @@ -198,6 +202,7 @@ Source8: glusterfsd.init %else Source0: @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz %endif +Patch0: 0001-libtirpc.patch BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) @@ -222,9 +227,12 @@ BuildRequires: python2-devel %if ( 0%{?rhel} && 0%{?rhel} <= 7 ) BuildRequires: python-ctypes %endif -%if ( 0%{?_with_ipv6default:1} ) +%if ( 0%{?fedora} && 0%{?fedora} > 27 ) || ( 0%{?_with_ipv6default:1} ) BuildRequires: libtirpc-devel %endif +%if ( 0%{?fedora} && 0%{?fedora} > 27 ) +BuildRequires: rpcgen +%endif BuildRequires: userspace-rcu-devel >= 0.7 %if ( 0%{?rhel} && 0%{?rhel} < 7 ) BuildRequires: automake @@ -654,6 +662,7 @@ This package provides the glusterfs server daemon. %prep %setup -q -n %{name}-%{version}%{?prereltag} +%patch0 -p1 %build %if ( 0%{?rhel} && 0%{?rhel} < 6 ) @@ -661,6 +670,7 @@ CFLAGS=-DUSE_INSECURE_OPENSSL export CFLAGS %endif +sed -i -e 's/--quiet//' configure.ac ./autogen.sh && %configure \ %{?_with_cmocka} \ %{?_with_debug} \ @@ -677,7 +687,8 @@ export CFLAGS %{?_without_rdma} \ %{?_without_syslog} \ %{?_without_tiering} \ - %{?_with_ipv6default} + %{?_with_ipv6default} \ + %{?_with_libtirpc} # fix hardening and remove rpath in shlibs %if ( 0%{?fedora} ) || ( 0%{?rhel} && 0%{?rhel} > 6 ) @@ -686,7 +697,7 @@ sed -i 's| \\\$compiler_flags |&\\\$LDFLAGS |' libtool sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|' libtool sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|' libtool -make %{?_smp_mflags} +make %{?_smp_mflags} V=1 %check make check @@ -1378,6 +1389,9 @@ exit 0 %endif %changelog +* Thu Jan 18 2018 Kaleb S. KEITHLEY - 3.13.1-3 +- glibc in Fedora 28 has removed rpc headers and rpcgen, use libtirpc + * Mon Dec 25 2017 Niels de Vos - 3.13.1-2 - Fedora 28 has renamed pyxattr