summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2015-12-29 16:46:13 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2016-01-12 14:47:49 +0100
commita474cfd1414bd01daf235c3cec71056713315d8a (patch)
treebf9298333a3309ee8b7c40ba8f4a0becbe4505fb
parent34e1b360dcb94f7fe71a6e41a87ea0dff9106115 (diff)
downloadptxdist-a474cfd1414bd01daf235c3cec71056713315d8a.tar.gz
ptxdist-a474cfd1414bd01daf235c3cec71056713315d8a.tar.xz
rpcbind: new package
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--patches/rpcbind-0.2.3/0001-handle_reply-Don-t-use-the-xp_auth-pointer-directly.patch36
-rw-r--r--patches/rpcbind-0.2.3/series4
-rw-r--r--projectroot/lib/systemd/system/rpcbind.service16
-rw-r--r--projectroot/lib/systemd/system/rpcbind.socket8
-rw-r--r--rules/rpcbind.in19
-rw-r--r--rules/rpcbind.make73
6 files changed, 156 insertions, 0 deletions
diff --git a/patches/rpcbind-0.2.3/0001-handle_reply-Don-t-use-the-xp_auth-pointer-directly.patch b/patches/rpcbind-0.2.3/0001-handle_reply-Don-t-use-the-xp_auth-pointer-directly.patch
new file mode 100644
index 000000000..5d749e458
--- /dev/null
+++ b/patches/rpcbind-0.2.3/0001-handle_reply-Don-t-use-the-xp_auth-pointer-directly.patch
@@ -0,0 +1,36 @@
+From: Steve Dickson <steved@redhat.com>
+Date: Mon, 2 Nov 2015 17:05:18 -0500
+Subject: [PATCH] handle_reply: Don't use the xp_auth pointer directly
+
+In the latest libtirpc version to access the xp_auth
+one must use the SVC_XP_AUTH macro. To be backwards
+compatible a couple ifdefs were added to use the
+macro when it exists.
+
+Signed-off-by: Steve Dickson <steved@redhat.com>
+---
+ src/rpcb_svc_com.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/src/rpcb_svc_com.c b/src/rpcb_svc_com.c
+index ff9ce6bfde02..18b850fcdeed 100644
+--- a/src/rpcb_svc_com.c
++++ b/src/rpcb_svc_com.c
+@@ -1274,10 +1274,17 @@ handle_reply(int fd, SVCXPRT *xprt)
+ a.rmt_localvers = fi->versnum;
+
+ xprt_set_caller(xprt, fi);
++#if defined(SVC_XP_AUTH)
++ SVC_XP_AUTH(xprt) = svc_auth_none;
++#else
+ xprt->xp_auth = &svc_auth_none;
++#endif
+ svc_sendreply(xprt, (xdrproc_t) xdr_rmtcall_result, (char *) &a);
++#if !defined(SVC_XP_AUTH)
+ SVCAUTH_DESTROY(xprt->xp_auth);
+ xprt->xp_auth = NULL;
++#endif
++
+ done:
+ if (buffer)
+ free(buffer);
diff --git a/patches/rpcbind-0.2.3/series b/patches/rpcbind-0.2.3/series
new file mode 100644
index 000000000..063d49ee0
--- /dev/null
+++ b/patches/rpcbind-0.2.3/series
@@ -0,0 +1,4 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-handle_reply-Don-t-use-the-xp_auth-pointer-directly.patch
+# 2eb188b0341e0330d889412a5ca5c905 - git-ptx-patches magic
diff --git a/projectroot/lib/systemd/system/rpcbind.service b/projectroot/lib/systemd/system/rpcbind.service
new file mode 100644
index 000000000..6ee492f2a
--- /dev/null
+++ b/projectroot/lib/systemd/system/rpcbind.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=RPC bind portmap service
+After=systemd-tmpfiles-setup.service
+Wants=remote-fs-pre.target
+Before=remote-fs-pre.target
+Requires=rpcbind.socket
+DefaultDependencies=no
+
+[Service]
+ExecStart=/usr/bin/rpcbind -f
+Type=notify
+KillMode=process
+Restart=on-failure
+
+[Install]
+Also=rpcbind.socket
diff --git a/projectroot/lib/systemd/system/rpcbind.socket b/projectroot/lib/systemd/system/rpcbind.socket
new file mode 100644
index 000000000..d43cc75df
--- /dev/null
+++ b/projectroot/lib/systemd/system/rpcbind.socket
@@ -0,0 +1,8 @@
+[Unit]
+Description=RPCbind Server Activation Socket
+
+[Socket]
+ListenStream=/run/rpcbind.sock
+
+[Install]
+WantedBy=sockets.target
diff --git a/rules/rpcbind.in b/rules/rpcbind.in
new file mode 100644
index 000000000..d63885681
--- /dev/null
+++ b/rules/rpcbind.in
@@ -0,0 +1,19 @@
+## SECTION=networking
+
+config RPCBIND
+ tristate
+ select LIBTIRPC
+ select SYSTEMD if RPCBIND_SYSTEMD_UNIT
+ prompt "rpcbind "
+ help
+ converts RPC program numbers into universal addresses
+
+if RPCBIND
+
+config RPCBIND_SYSTEMD_UNIT
+ bool
+ default y
+ depends on INITMETHOD_SYSTEMD
+ prompt "install systemd unit files"
+
+endif
diff --git a/rules/rpcbind.make b/rules/rpcbind.make
new file mode 100644
index 000000000..e6e29a913
--- /dev/null
+++ b/rules/rpcbind.make
@@ -0,0 +1,73 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2015 by Michael Olbrich <m.olbrich@pengutronix.de>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_RPCBIND) += rpcbind
+
+#
+# Paths and names
+#
+RPCBIND_VERSION := 0.2.3
+RPCBIND_MD5 := c8875246b2688a1adfbd6ad43480278d
+RPCBIND := rpcbind-$(RPCBIND_VERSION)
+RPCBIND_SUFFIX := tar.bz2
+RPCBIND_URL := $(call ptx/mirror, SF, rpcbind/$(RPCBIND).$(RPCBIND_SUFFIX))
+RPCBIND_SOURCE := $(SRCDIR)/$(RPCBIND).$(RPCBIND_SUFFIX)
+RPCBIND_DIR := $(BUILDDIR)/$(RPCBIND)
+RPCBIND_LICENSE := BSD-3-Clause
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+#
+# autoconf
+#
+RPCBIND_CONF_TOOL := autoconf
+RPCBIND_CONF_OPT := \
+ $(CROSS_AUTOCONF_USR) \
+ --disable-libwrap \
+ --disable-debug \
+ --disable-warmstarts \
+ --with-rpcuser=rpcuser \
+ --with-nss-modules=files \
+ --$(call ptx/wwo, PTXCONF_RPCBIND_SYSTEMD_UNIT)-systemdsystemunitdir$(call ptx/ifdef,PTXCONF_RPCBIND_SYSTEMD_UNIT,=/lib/systemd/system)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/rpcbind.targetinstall:
+ @$(call targetinfo)
+
+ @$(call install_init, rpcbind)
+ @$(call install_fixup, rpcbind,PRIORITY,optional)
+ @$(call install_fixup, rpcbind,SECTION,base)
+ @$(call install_fixup, rpcbind,AUTHOR,"Michael Olbrich <m.olbrich@pengutronix.de>")
+ @$(call install_fixup, rpcbind,DESCRIPTION,missing)
+
+ @$(call install_copy, rpcbind, 0, 0, 0755, -, /usr/bin/rpcbind)
+
+ifdef PTXCONF_RPCBIND_SYSTEMD_UNIT
+ @$(call install_alternative, rpcbind, 0, 0, 0644, \
+ /lib/systemd/system/rpcbind.service)
+ @$(call install_alternative, rpcbind, 0, 0, 0644, \
+ /lib/systemd/system/rpcbind.socket)
+ @$(call install_link, rpcbind, ../rpcbind.socket, \
+ /lib/systemd/system/sockets.target.wants/rpcbind.socket)
+endif
+
+ @$(call install_finish, rpcbind)
+
+ @$(call touch)
+
+# vim: syntax=make