summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBastian Krause <bst@pengutronix.de>2021-06-11 14:55:38 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2021-06-16 15:19:47 +0200
commit7deaf0575afa4de6455505ead34cc115c733e96d (patch)
tree1c75d2ab4c4ae58a20633dcd1aa1a4f05bf52914
parentff7d50a595870b1eea44c708df964fab6a17cc25 (diff)
downloadptxdist-7deaf0575afa4de6455505ead34cc115c733e96d.tar.gz
ptxdist-7deaf0575afa4de6455505ead34cc115c733e96d.tar.xz
rpcbind: version bump 0.2.3 -> 1.2.6
systemd service/socket files are now part of rpcbind. Remote call functionality is now configurable and disabled. Most people won't use that. It also stops rpcbind from opening up random UDP ports. See [1]. [1] https://git.linux-nfs.org/?p=steved/rpcbind.git;a=commitdiff;h=2e9c289246c647e25649914bdb0d9400c66f486e Signed-off-by: Bastian Krause <bst@pengutronix.de> Message-Id: <20210611125538.12935-1-bst@pengutronix.de> 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--patches/rpcbind-1.2.6/0001-autotools-systemd-call-rpcbind-with-w-only-on-enable.patch46
l---------patches/rpcbind-1.2.6/autogen.sh1
-rw-r--r--patches/rpcbind-1.2.6/series4
-rw-r--r--projectroot/usr/lib/systemd/system/rpcbind.service16
-rw-r--r--projectroot/usr/lib/systemd/system/rpcbind.socket8
-rw-r--r--rules/rpcbind.in4
-rw-r--r--rules/rpcbind.make13
9 files changed, 64 insertions, 68 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
deleted file mode 100644
index 5d749e458..000000000
--- a/patches/rpcbind-0.2.3/0001-handle_reply-Don-t-use-the-xp_auth-pointer-directly.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-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
deleted file mode 100644
index 063d49ee0..000000000
--- a/patches/rpcbind-0.2.3/series
+++ /dev/null
@@ -1,4 +0,0 @@
-# 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/patches/rpcbind-1.2.6/0001-autotools-systemd-call-rpcbind-with-w-only-on-enable.patch b/patches/rpcbind-1.2.6/0001-autotools-systemd-call-rpcbind-with-w-only-on-enable.patch
new file mode 100644
index 000000000..c7f06b143
--- /dev/null
+++ b/patches/rpcbind-1.2.6/0001-autotools-systemd-call-rpcbind-with-w-only-on-enable.patch
@@ -0,0 +1,46 @@
+From: Bastian Krause <bst@pengutronix.de>
+Date: Fri, 11 Jun 2021 14:21:03 +0200
+Subject: [PATCH] autotools/systemd: call rpcbind with -w only on enabled warm
+ starts
+
+If rpcbind is configured with --disable-warmstarts it responds on -w
+with its usage string. This is not helpful in a systemd service, so pass
+-w conditionally.
+
+Forwarded: https://lore.kernel.org/linux-nfs/20210611122803.24747-1-bst@pengutronix.de/
+Signed-off-by: Bastian Krause <bst@pengutronix.de>
+---
+ configure.ac | 6 ++++++
+ systemd/rpcbind.service.in | 2 +-
+ 2 files changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index c0ef8967f5eb..c2069a2b3b0e 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -20,6 +20,12 @@ AM_CONDITIONAL(LIBSETDEBUG, test x$lib_setdebug = xyes)
+ AC_ARG_ENABLE([warmstarts],
+ AS_HELP_STRING([--enable-warmstarts], [Enables Warm Starts @<:@default=no@:>@]))
+ AM_CONDITIONAL(WARMSTART, test x$enable_warmstarts = xyes)
++AS_IF([test x$enable_warmstarts = xyes], [
++ warmstarts_opt=-w
++], [
++ warmstarts_opt=
++])
++AC_SUBST([warmstarts_opt], [$warmstarts_opt])
+
+ AC_ARG_ENABLE([rmtcalls],
+ AS_HELP_STRING([--enable-rmtcalls], [Enables Remote Calls @<:@default=no@:>@]))
+diff --git a/systemd/rpcbind.service.in b/systemd/rpcbind.service.in
+index 7b1c74bf4261..c892ca86b0d2 100644
+--- a/systemd/rpcbind.service.in
++++ b/systemd/rpcbind.service.in
+@@ -12,7 +12,7 @@ Wants=rpcbind.target
+ [Service]
+ Type=notify
+ # distro can provide a drop-in adding EnvironmentFile=-/??? if needed.
+-ExecStart=@_sbindir@/rpcbind $RPCBIND_OPTIONS -w -f
++ExecStart=@_sbindir@/rpcbind $RPCBIND_OPTIONS @warmstarts_opt@ -f
+
+ [Install]
+ WantedBy=multi-user.target
diff --git a/patches/rpcbind-1.2.6/autogen.sh b/patches/rpcbind-1.2.6/autogen.sh
new file mode 120000
index 000000000..9f8a4cb7d
--- /dev/null
+++ b/patches/rpcbind-1.2.6/autogen.sh
@@ -0,0 +1 @@
+../autogen.sh \ No newline at end of file
diff --git a/patches/rpcbind-1.2.6/series b/patches/rpcbind-1.2.6/series
new file mode 100644
index 000000000..d713a495b
--- /dev/null
+++ b/patches/rpcbind-1.2.6/series
@@ -0,0 +1,4 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-autotools-systemd-call-rpcbind-with-w-only-on-enable.patch
+# eb70a5bb3da9e0dc47fd34fbab92e14d - git-ptx-patches magic
diff --git a/projectroot/usr/lib/systemd/system/rpcbind.service b/projectroot/usr/lib/systemd/system/rpcbind.service
deleted file mode 100644
index 6ee492f2a..000000000
--- a/projectroot/usr/lib/systemd/system/rpcbind.service
+++ /dev/null
@@ -1,16 +0,0 @@
-[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/usr/lib/systemd/system/rpcbind.socket b/projectroot/usr/lib/systemd/system/rpcbind.socket
deleted file mode 100644
index d43cc75df..000000000
--- a/projectroot/usr/lib/systemd/system/rpcbind.socket
+++ /dev/null
@@ -1,8 +0,0 @@
-[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
index b5479588c..c1fc5dcc0 100644
--- a/rules/rpcbind.in
+++ b/rules/rpcbind.in
@@ -10,6 +10,10 @@ menuconfig RPCBIND
if RPCBIND
+config RPCBIND_RPCINFO
+ bool
+ prompt "install rpcinfo"
+
config RPCBIND_SYSTEMD_UNIT
bool
default y
diff --git a/rules/rpcbind.make b/rules/rpcbind.make
index 72e6adeb5..a6997cc97 100644
--- a/rules/rpcbind.make
+++ b/rules/rpcbind.make
@@ -14,8 +14,8 @@ PACKAGES-$(PTXCONF_RPCBIND) += rpcbind
#
# Paths and names
#
-RPCBIND_VERSION := 0.2.3
-RPCBIND_MD5 := c8875246b2688a1adfbd6ad43480278d
+RPCBIND_VERSION := 1.2.6
+RPCBIND_MD5 := 2d84ebbb7d6fb1fc3566d2d4b37f214b
RPCBIND := rpcbind-$(RPCBIND_VERSION)
RPCBIND_SUFFIX := tar.bz2
RPCBIND_URL := $(call ptx/mirror, SF, rpcbind/$(RPCBIND).$(RPCBIND_SUFFIX))
@@ -36,9 +36,10 @@ RPCBIND_CONF_OPT := \
--disable-libwrap \
--disable-debug \
--disable-warmstarts \
+ --disable-rmtcalls \
--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)
+ --$(call ptx/wwo, PTXCONF_RPCBIND_SYSTEMD_UNIT)-systemdsystemunitdir$(call ptx/ifdef,PTXCONF_RPCBIND_SYSTEMD_UNIT,=/usr/lib/systemd/system)
# ----------------------------------------------------------------------------
# Target-Install
@@ -53,7 +54,11 @@ $(STATEDIR)/rpcbind.targetinstall:
@$(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)
+ @$(call install_copy, rpcbind, 0, 0, 0755, -, /usr/sbin/rpcbind)
+
+ifdef PTXCONF_RPCBIND_RPCINFO
+ @$(call install_copy, rpcbind, 0, 0, 0755, -, /usr/bin/rpcinfo)
+endif
ifdef PTXCONF_RPCBIND_SYSTEMD_UNIT
@$(call install_alternative, rpcbind, 0, 0, 0644, \