summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Le Cuirot <chewi@gentoo.org>2017-11-19 13:24:36 +0000
committerJames Le Cuirot <chewi@gentoo.org>2017-11-21 20:43:35 +0000
commit7e3732f96f34540928841e6fe3be3a0978767d31 (patch)
treee370f3f487b054158de8949229409a5887fd1a12
parentlayout.conf: Update the comment for manifest-hashes (diff)
downloadgentoo-7e3732f96f34540928841e6fe3be3a0978767d31.tar.gz
gentoo-7e3732f96f34540928841e6fe3be3a0978767d31.tar.bz2
gentoo-7e3732f96f34540928841e6fe3be3a0978767d31.zip
sys-cluster/glusterfs: Fix building against glibc 2.26 due to no RPC
Bug: https://bugs.gentoo.org/381391 Package-Manager: Portage-2.3.14, Repoman-2.3.6
-rw-r--r--sys-cluster/glusterfs/files/glusterfs-3.12.3-libtirpc.patch45
-rw-r--r--sys-cluster/glusterfs/glusterfs-3.12.2.ebuild7
-rw-r--r--sys-cluster/glusterfs/metadata.xml1
3 files changed, 52 insertions, 1 deletions
diff --git a/sys-cluster/glusterfs/files/glusterfs-3.12.3-libtirpc.patch b/sys-cluster/glusterfs/files/glusterfs-3.12.3-libtirpc.patch
new file mode 100644
index 000000000000..fdc1f1f95972
--- /dev/null
+++ b/sys-cluster/glusterfs/files/glusterfs-3.12.3-libtirpc.patch
@@ -0,0 +1,45 @@
+From 6394d8d8e90d5400b49005bf3005523b2e306b2c Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <chewi@gentoo.org>
+Date: Mon, 20 Nov 2017 20:44:45 +0000
+Subject: [PATCH] build: Allow libtirpc to be explicitly requested
+
+Some distributions like Gentoo no longer include the RPC stuff in
+their glibc packages.
+
+Signed-off-by: James Le Cuirot <chewi@gentoo.org>
+---
+ configure.ac | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index ce689225c..90d2f98c8 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -291,6 +291,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_ENABLE([privport_tracking],
+ AC_HELP_STRING([--disable-privport_tracking],
+ [Disable internal tracking of privileged ports.]))
+@@ -1050,6 +1054,13 @@ AC_SUBST(GF_DISTRIBUTION)
+ GF_HOST_OS=""
+ GF_LDFLAGS="-rdynamic"
+
++if test "x$with_libtirpc" = "xyes" ; then
++ PKG_CHECK_MODULES([TIRPC], [libtirpc],
++ [GF_CFLAGS="$GF_CFLAGS $TIRPC_CFLAGS"; GF_LDFLAGS="$GF_LDFLAGS $TIRPC_LIBS";],
++ [AC_MSG_ERROR([libtirpc requested but library not found])]
++ )
++fi
++
+ dnl check for gcc -Werror=format-security
+ saved_CFLAGS=$CFLAGS
+ CFLAGS="-Wformat -Werror=format-security"
+--
+2.15.0
+
diff --git a/sys-cluster/glusterfs/glusterfs-3.12.2.ebuild b/sys-cluster/glusterfs/glusterfs-3.12.2.ebuild
index f5220e9f1813..dc1e9dfbba10 100644
--- a/sys-cluster/glusterfs/glusterfs-3.12.2.ebuild
+++ b/sys-cluster/glusterfs/glusterfs-3.12.2.ebuild
@@ -14,7 +14,7 @@ SRC_URI="https://download.gluster.org/pub/gluster/${PN}/$(get_version_component_
LICENSE="|| ( GPL-2 LGPL-3+ )"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
-IUSE="bd-xlator crypt-xlator debug emacs +fuse +georeplication glupy infiniband qemu-block rsyslog static-libs +syslog systemtap test +tiering vim-syntax +xml"
+IUSE="bd-xlator crypt-xlator debug emacs +fuse +georeplication glupy infiniband +libtirpc qemu-block rsyslog static-libs +syslog systemtap test +tiering vim-syntax +xml"
REQUIRED_USE="georeplication? ( ${PYTHON_REQUIRED_USE} )
glupy? ( ${PYTHON_REQUIRED_USE} )"
@@ -28,6 +28,8 @@ RDEPEND="bd-xlator? ( sys-fs/lvm2 )
fuse? ( >=sys-fs/fuse-2.7.0:0 )
georeplication? ( ${PYTHON_DEPS} )
infiniband? ( sys-fabric/libibverbs:* sys-fabric/librdmacm:* )
+ libtirpc? ( net-libs/libtirpc:= )
+ !libtirpc? ( elibc_glibc? ( sys-libs/glibc[rpc(-)] ) )
qemu-block? ( dev-libs/glib:2 )
systemtap? ( dev-util/systemtap )
tiering? ( dev-db/sqlite:3 )
@@ -37,6 +39,7 @@ RDEPEND="bd-xlator? ( sys-fs/lvm2 )
dev-libs/openssl:=[-bindist]
dev-libs/userspace-rcu:=
|| ( sys-libs/glibc sys-libs/argp-standalone )
+ net-libs/rpcsvc-proto
sys-apps/util-linux"
DEPEND="${RDEPEND}
virtual/acl
@@ -57,6 +60,7 @@ SITEFILE="50${PN}-mode-gentoo.el"
PATCHES=(
"${FILESDIR}/${PN}-3.12.2-poisoned-sysmacros.patch"
"${FILESDIR}/${PN}-3.12.2-silent_rules.patch"
+ "${FILESDIR}/${PN}-3.12.3-libtirpc.patch"
)
DOCS=( AUTHORS ChangeLog NEWS README.md THANKS )
@@ -108,6 +112,7 @@ src_configure() {
$(use_enable test cmocka) \
$(use_enable tiering) \
$(use_enable xml xml-output) \
+ $(use_with libtirpc) \
--with-tmpfilesdir="${EPREFIX}"/etc/tmpfiles.d \
--docdir="${EPREFIX}"/usr/share/doc/${PF} \
--localstatedir="${EPREFIX}"/var
diff --git a/sys-cluster/glusterfs/metadata.xml b/sys-cluster/glusterfs/metadata.xml
index dbe49ffe8481..805ab9d18719 100644
--- a/sys-cluster/glusterfs/metadata.xml
+++ b/sys-cluster/glusterfs/metadata.xml
@@ -16,6 +16,7 @@
<flag name="georeplication">Enable support for georeplication (requires <pkg>dev-lang/python</pkg>)</flag>
<flag name="infiniband">Add support for Infiniband ibverbs transport.
Libraries can be found in science overlay</flag>
+ <flag name="libtirpc">Build against <pkg>net-libs/libtirpc</pkg> for RPC support</flag>
<flag name="rsyslog">Install configuration snippet for <pkg>app-admin/rsyslog</pkg></flag>
<flag name="qemu-block">Transparently create files as QCow2/QED images in the backend, including the possibility to snapshot.</flag>
<flag name="systemtap">Enable support for <pkg>dev-util/systemtap</pkg></flag>