diff options
Diffstat (limited to 'net-nds/rpcbind/files')
-rw-r--r-- | net-nds/rpcbind/files/rpcbind-0.2.0-no-nss.patch | 34 | ||||
-rw-r--r-- | net-nds/rpcbind/files/rpcbind-0.2.0-pkgconfig.patch | 65 | ||||
-rwxr-xr-x | net-nds/rpcbind/files/rpcbind.confd | 4 | ||||
-rwxr-xr-x | net-nds/rpcbind/files/rpcbind.initd | 22 | ||||
-rw-r--r-- | net-nds/rpcbind/files/rpcbind.service | 13 |
5 files changed, 138 insertions, 0 deletions
diff --git a/net-nds/rpcbind/files/rpcbind-0.2.0-no-nss.patch b/net-nds/rpcbind/files/rpcbind-0.2.0-no-nss.patch new file mode 100644 index 000000000000..4e73b88de706 --- /dev/null +++ b/net-nds/rpcbind/files/rpcbind-0.2.0-no-nss.patch @@ -0,0 +1,34 @@ +From 112d0028cd2f4e0a3fafc83a4b2f1cb38bdbd6d4 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger <vapier@gentoo.org> +Date: Mon, 18 Feb 2013 17:00:13 -0500 +Subject: [PATCH] fix building one systems w/out nss.h + +The nss.h header is glibc-specific, so use the existing HAVE_NSS_H define +to avoid including/using it when it is not available. + +URL: http://bugs.gentoo.org/458024 +Reported-by: Mark Reiche <porphyr@gmx.de> +Signed-off-by: Mike Frysinger <vapier@gentoo.org> +--- + src/rpcbind.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/rpcbind.c b/src/rpcbind.c +index 9a0504d..83dbe93 100644 +--- a/src/rpcbind.c ++++ b/src/rpcbind.c +@@ -67,7 +67,11 @@ + #include <pwd.h> + #include <string.h> + #include <errno.h> ++#ifdef HAVE_NSS_H + #include <nss.h> ++#else ++static inline void __nss_configure_lookup(const char *db, const char *s) {} ++#endif + #include "config.h" + #include "rpcbind.h" + +-- +1.8.1.2 + diff --git a/net-nds/rpcbind/files/rpcbind-0.2.0-pkgconfig.patch b/net-nds/rpcbind/files/rpcbind-0.2.0-pkgconfig.patch new file mode 100644 index 000000000000..e0339af92b7e --- /dev/null +++ b/net-nds/rpcbind/files/rpcbind-0.2.0-pkgconfig.patch @@ -0,0 +1,65 @@ +From afd71b8fc0df036a884b3af14ddb875674a49a85 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Diego=20Elio=20Petten=F2?= <flameeyes@gmail.com> +Date: Mon, 29 Nov 2010 16:28:38 -0500 +Subject: [PATCH] Use pkg-config to find libtirpc +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This allows to properly cross-compile rpcbind, as /usr/include/tirpc is +no longer a valid path in that case. + +Signed-off-by: Diego Elio Pettenò <flameeyes@gmail.com> +Signed-off-by: Steve Dickson <steved@redhat.com> +--- + configure.in | 4 +++- + src/Makefile.am | 13 +++++++------ + 2 files changed, 10 insertions(+), 7 deletions(-) + +diff --git a/configure.in b/configure.in +index de1c730..7d43fd4 100644 +--- a/configure.in ++++ b/configure.in +@@ -51,7 +51,9 @@ AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h \ + unistd.h nss.h]) + + AC_CHECK_LIB([pthread], [pthread_create]) +-AC_CHECK_LIB([tirpc], [clnt_create]) ++ ++PKG_CHECK_MODULES([TIRPC], [libtirpc]) ++ + AC_ARG_ENABLE(libwrap,[ --enable-libwrap Enables host name checking], + [case "${enableval}" in + yes) libwarp=true +diff --git a/src/Makefile.am b/src/Makefile.am +index cc0a85b..a2f3e34 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -1,4 +1,4 @@ +-INCLUDES = -I$(srcdir)/tirpc -DPORTMAP -DINET6 -DVERSION="\"$(VERSION)\"" \ ++INCLUDES = $(TIRPC_CFLAGS) -DPORTMAP -DINET6 -DVERSION="\"$(VERSION)\"" \ + -D_GNU_SOURCE -Wall -pipe + if DEBUG + INCLUDES += -DRPCBIND_DEBUG -DSVC_RUN_DEBUG -DDEBUG_RMTCALL +@@ -23,12 +23,13 @@ rpcbind_SOURCES = check_bound.c rpcbind.c \ + rpcbind.h + + rpcinfo_SOURCES = rpcinfo.c +-rpcinfo_LDFLAGS = -lpthread -ltirpc +-rpcinfo_LDADD = $(LIB_TIRPC) ++rpcinfo_LDFLAGS = -lpthread ++rpcinfo_LDADD = $(TIRPC_LIBS) + + +-rpcbind_LDFLAGS = -lpthread -ltirpc +-rpcbind_LDADD = $(LIB_TIRPC) +-AM_CPPFLAGS = -I/usr/include/tirpc -DCHECK_LOCAL -DPORTMAP \ ++rpcbind_LDFLAGS = -lpthread ++rpcbind_CFLAGS = $(TIRPC_CFLAGS) ++rpcbind_LDADD = $(TIRPC_LIBS) ++AM_CPPFLAGS = -DCHECK_LOCAL -DPORTMAP \ + -DFACILITY=LOG_MAIL -DSEVERITY=LOG_INFO + +-- +1.7.6 + diff --git a/net-nds/rpcbind/files/rpcbind.confd b/net-nds/rpcbind/files/rpcbind.confd new file mode 100755 index 000000000000..ddc09172d10d --- /dev/null +++ b/net-nds/rpcbind/files/rpcbind.confd @@ -0,0 +1,4 @@ +# /etc/conf.d/rpcbind + +# Options for `rpcbind`. +#RPCBIND_OPTS="-l" diff --git a/net-nds/rpcbind/files/rpcbind.initd b/net-nds/rpcbind/files/rpcbind.initd new file mode 100755 index 000000000000..b00bc197276c --- /dev/null +++ b/net-nds/rpcbind/files/rpcbind.initd @@ -0,0 +1,22 @@ +#!/sbin/runscript +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +depend() { + use net + before inetd xinetd + provide portmap +} + +start() { + ebegin "Starting rpcbind" + start-stop-daemon --start --quiet --exec /sbin/rpcbind -- ${RPCBIND_OPTS} + eend $? +} + +stop() { + ebegin "Stopping rpcbind" + start-stop-daemon --stop --quiet --exec /sbin/rpcbind + eend $? +} diff --git a/net-nds/rpcbind/files/rpcbind.service b/net-nds/rpcbind/files/rpcbind.service new file mode 100644 index 000000000000..305ea9b10b71 --- /dev/null +++ b/net-nds/rpcbind/files/rpcbind.service @@ -0,0 +1,13 @@ +[Unit] +Description=RPC Bind +After=network.target +Wants=rpcbind.target +Before=rpcbind.target + +[Service] +Type=forking +ExecStart=/sbin/rpcbind +Restart=always + +[Install] +WantedBy=multi-user.target |