]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
Replace portmap with rpcbind
authorJonatan Schlag <jonatan.schlag@ipfire.org>
Sat, 7 May 2016 14:16:35 +0000 (16:16 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 17 May 2016 13:08:47 +0000 (14:08 +0100)
Portmap is not maintained anymore that's why it is replaced by rpcbind.
Rpcbind provides also rpcinfo which is quite useful for debugging.

Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
14 files changed:
config/rootfiles/common/armv5tel/initscripts
config/rootfiles/common/i586/initscripts
config/rootfiles/common/x86_64/initscripts
config/rootfiles/packages/portmap [deleted file]
config/rootfiles/packages/rpcbind [new file with mode: 0644]
lfs/nfs
lfs/rpcbind [moved from lfs/portmap with 82% similarity]
make.sh
src/initscripts/init.d/portmap [deleted file]
src/initscripts/init.d/rpcbind [new file with mode: 0644]
src/paks/rpcbind/install.sh [moved from src/paks/portmap/install.sh with 85% similarity]
src/paks/rpcbind/uninstall.sh [moved from src/paks/portmap/uninstall.sh with 98% similarity]
src/paks/rpcbind/update.sh [moved from src/paks/portmap/update.sh with 100% similarity]
src/patches/rpcbind/rpcbind-0.2.3-tirpc_fix-1.patch [new file with mode: 0644]

index b827b1c19dbbd5e9e814097800ae05181596aba9..bc253c0456ed4555f7d172e8edd5fa997349ebe9 100644 (file)
@@ -103,13 +103,13 @@ etc/rc.d/init.d/ntp
 #etc/rc.d/init.d/nut
 #etc/rc.d/init.d/openvmtools
 etc/rc.d/init.d/partresize
-#etc/rc.d/init.d/portmap
 #etc/rc.d/init.d/postfix
 #etc/rc.d/init.d/pound
 etc/rc.d/init.d/random
 etc/rc.d/init.d/rc
 etc/rc.d/init.d/reboot
 etc/rc.d/init.d/rngd
+#etc/rc.d/init.d/rpcbind
 #etc/rc.d/init.d/rtpproxy
 #etc/rc.d/init.d/samba
 #etc/rc.d/init.d/sane
index 0976fe52e66c15b8150dae6fac19daa40c8a785c..f1024a238d977bf5e500dac0237079c51ae3bfe9 100644 (file)
@@ -104,13 +104,13 @@ etc/rc.d/init.d/ntp
 #etc/rc.d/init.d/nut
 #etc/rc.d/init.d/openvmtools
 etc/rc.d/init.d/partresize
-#etc/rc.d/init.d/portmap
 #etc/rc.d/init.d/postfix
 #etc/rc.d/init.d/pound
 etc/rc.d/init.d/random
 etc/rc.d/init.d/rc
 etc/rc.d/init.d/reboot
 etc/rc.d/init.d/rngd
+#etc/rc.d/init.d/rpcbind
 #etc/rc.d/init.d/rtpproxy
 #etc/rc.d/init.d/samba
 #etc/rc.d/init.d/sane
index 0976fe52e66c15b8150dae6fac19daa40c8a785c..f1024a238d977bf5e500dac0237079c51ae3bfe9 100644 (file)
@@ -104,13 +104,13 @@ etc/rc.d/init.d/ntp
 #etc/rc.d/init.d/nut
 #etc/rc.d/init.d/openvmtools
 etc/rc.d/init.d/partresize
-#etc/rc.d/init.d/portmap
 #etc/rc.d/init.d/postfix
 #etc/rc.d/init.d/pound
 etc/rc.d/init.d/random
 etc/rc.d/init.d/rc
 etc/rc.d/init.d/reboot
 etc/rc.d/init.d/rngd
+#etc/rc.d/init.d/rpcbind
 #etc/rc.d/init.d/rtpproxy
 #etc/rc.d/init.d/samba
 #etc/rc.d/init.d/sane
diff --git a/config/rootfiles/packages/portmap b/config/rootfiles/packages/portmap
deleted file mode 100644 (file)
index 4b60d64..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-etc/rc.d/init.d/portmap
-sbin/portmap
-#sbin/pmap_dump
-#sbin/pmap_set
-#usr/share/man/man8/pmap_dump.8
-#usr/share/man/man8/pmap_set.8
-#usr/share/man/man8/portmap.8
diff --git a/config/rootfiles/packages/rpcbind b/config/rootfiles/packages/rpcbind
new file mode 100644 (file)
index 0000000..5270207
--- /dev/null
@@ -0,0 +1,5 @@
+etc/rc.d/init.d/rpcbind
+sbin/rpcbind
+sbin/rpcinfo
+#usr/share/man/man8/rpcbind.8
+#usr/share/man/man8/rpcinfo.8
diff --git a/lfs/nfs b/lfs/nfs
index b6cef7b9bd293ca4420e677fae1143c85570552a..ee9b3a059374a012f42af1b16656020d594d4dd0 100644 (file)
--- a/lfs/nfs
+++ b/lfs/nfs
@@ -34,7 +34,7 @@ TARGET     = $(DIR_INFO)/$(THISAPP)
 PROG       = nfs
 PAK_VER    = 7
 
-DEPS       = "portmap"
+DEPS       = "rpcbind"
 
 LIBNFSIDMAP = 0.25
 
similarity index 82%
rename from lfs/portmap
rename to lfs/rpcbind
index c9035471eff307715a583c1261ff6e1b155373f3..d9e28854eca9010ed9f1f5b3175c22af034229b9 100644 (file)
@@ -1,7 +1,7 @@
 ###############################################################################
 #                                                                             #
 # IPFire.org - A linux based firewall                                         #
-# Copyright (C) 2007  Michael Tremer & Christian Schmidt                      #
+# Copyright (C) 2016  IPFire Team  <info@ipfire.org>                          #
 #                                                                             #
 # This program is free software: you can redistribute it and/or modify        #
 # it under the terms of the GNU General Public License as published by        #
 
 include Config
 
-VER        = 6.0
+VER        = 0.2.3
 
-THISAPP    = portmap_$(VER)
-DL_FILE    = $(THISAPP).tgz
+THISAPP    = rpcbind-$(VER)
+DL_FILE    = $(THISAPP).tar.bz2
 DL_FROM    = $(URL_IPFIRE)
 DIR_APP    = $(DIR_SRC)/$(THISAPP)
 TARGET     = $(DIR_INFO)/$(THISAPP)
-PROG       = portmap
-PAK_VER    = 2
+PROG       = rpcbind
+PAK_VER    = 1
 
-DEPS       = ""
+DEPS       = "libtirpc"
 
 ###############################################################################
 # Top-level Rules
@@ -44,7 +44,7 @@ objects = $(DL_FILE)
 
 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
 
-$(DL_FILE)_MD5 = ac108ab68bf0f34477f8317791aaf1ff
+$(DL_FILE)_MD5 = c8875246b2688a1adfbd6ad43480278d
 
 install : $(TARGET)
 
@@ -54,7 +54,7 @@ download :$(patsubst %,$(DIR_DL)/%,$(objects))
 
 md5 : $(subst %,%_MD5,$(objects))
 
-dist: 
+dist:
        @$(PAK)
 
 ###############################################################################
@@ -76,9 +76,10 @@ $(subst %,%_MD5,$(objects)) :
 
 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        @$(PREBUILD)
-       @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar xvfz $(DIR_DL)/$(DL_FILE)
-#      cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/portmap-5beta-compilation_fixes-3.patch
-#      cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/portmap-5beta-glibc_errno_fix-1.patch
+       @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
+       cd $(DIR_APP) && sed -i "/servname/s:rpcbind:sunrpc:" src/rpcbind.c
+       cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/rpcbind/rpcbind-0.2.3-tirpc_fix-1.patch
+       cd $(DIR_APP) && ./configure --prefix=/usr --bindir=/sbin --with-rpcuser=root --without-systemdsystemunitdir --disable-ipv6
        cd $(DIR_APP) && make $(MAKETUNING) $(EXTRA_MAKE)
        cd $(DIR_APP) && make install
        @rm -rf $(DIR_APP)
diff --git a/make.sh b/make.sh
index 6219f290a7564bb9af9b6e1c4441be092204e937..3293fd87bc9b4adf5b1ab26c6334f302e12eaecb 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -679,7 +679,7 @@ buildipfire() {
   ipfiremake libevent
   ipfiremake libevent2
   ipfiremake libtirpc
-  ipfiremake portmap
+  ipfiremake rpcbind
   ipfiremake nfs
   ipfiremake gnu-netcat
   ipfiremake ncat
diff --git a/src/initscripts/init.d/portmap b/src/initscripts/init.d/portmap
deleted file mode 100644 (file)
index 00516a2..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/sh
-# Begin $rc_base/init.d/portmap
-
-#$LastChangedBy: bdubbs $
-#$Date: 2005-08-01 14:29:19 -0500 (Mon, 01 Aug 2005) $
-
-. /etc/sysconfig/rc
-. $rc_functions
-
-case "$1" in
-       start)
-               boot_mesg "Starting RPC Portmap"
-               loadproc /sbin/portmap
-               ;;
-
-       stop)
-               boot_mesg "Stopping Portmap"
-               killproc /sbin/portmap
-               ;;
-
-       restart)
-               $0 stop
-               sleep 1
-               $0 start
-               ;;
-
-       status)
-               statusproc /sbin/portmap
-               ;;
-
-       *)
-               echo "Usage: $0 {start|stop|restart|status}"
-               exit 1
-               ;;
-
-esac
-
-# End $rc_base/init.d/portmap
diff --git a/src/initscripts/init.d/rpcbind b/src/initscripts/init.d/rpcbind
new file mode 100644 (file)
index 0000000..7216acd
--- /dev/null
@@ -0,0 +1,46 @@
+#!/bin/sh
+########################################################################
+# Begin $rc_base/init.d/rpcbind
+#
+# Description : rpcbind init script
+#
+# Authors     : Jonatan Schlag jonatan.schlag@ipfire.org
+#
+# Version     : 01.00
+#
+# Notes       :
+#
+########################################################################
+
+. /etc/sysconfig/rc
+. $rc_functions
+
+case "$1" in
+       start)
+               boot_mesg "Starting rpcbind"
+               loadproc /sbin/rpcbind
+               ;;
+
+       stop)
+               boot_mesg "Stopping rpcbind"
+               killproc /sbin/rpcbind
+               ;;
+
+       restart)
+               $0 stop
+               sleep 1
+               $0 start
+               ;;
+
+       status)
+               statusproc /sbin/rpcbind
+               ;;
+
+       *)
+               echo "Usage: $0 {start|stop|restart|status}"
+               exit 1
+               ;;
+
+esac
+
+# End $rc_base/init.d/rpcbind
similarity index 85%
rename from src/paks/portmap/install.sh
rename to src/paks/rpcbind/install.sh
index 6c391d67120174e01c316b1cd66f18059bb21d2d..e523183d888cd69cb72244bf2c3b874a3af93bb7 100644 (file)
 ############################################################################
 #
 . /opt/pakfire/lib/functions.sh
+# remove portmap
+/etc/init.d/portmap stop
+rm -rf /etc/rc.d/rc*.d/*portmap /sbin/portmap /etc/rc.d/init.d/portmap
+# install rpcbind
 extract_files
 start_service --background ${NAME}
-ln -sf  ../init.d/portmap /etc/rc.d/rc0.d/K49portmap
-ln -sf  ../init.d/portmap /etc/rc.d/rc3.d/S22portmap
-ln -sf  ../init.d/portmap /etc/rc.d/rc6.d/K49portmap
+ln -sf  ../init.d/rpcbind /etc/rc.d/rc0.d/K49rpcbind
+ln -sf  ../init.d/rpcbind /etc/rc.d/rc3.d/S22rpcbind
+ln -sf  ../init.d/rpcbind /etc/rc.d/rc6.d/K49rpcbind
similarity index 98%
rename from src/paks/portmap/uninstall.sh
rename to src/paks/rpcbind/uninstall.sh
index 12ecada882620bad8146f16a52d978fd4ee300d4..e705c8c5794149fa0cb25e07f350d7d770e15f43 100644 (file)
@@ -24,4 +24,4 @@
 . /opt/pakfire/lib/functions.sh
 stop_service ${NAME}
 remove_files
-rm -rf /etc/rc.d/rc*.d/*portmap
+rm -rf /etc/rc.d/rc*.d/*rpcbind
diff --git a/src/patches/rpcbind/rpcbind-0.2.3-tirpc_fix-1.patch b/src/patches/rpcbind/rpcbind-0.2.3-tirpc_fix-1.patch
new file mode 100644 (file)
index 0000000..bdf73a3
--- /dev/null
@@ -0,0 +1,48 @@
+Submitted By:            Bruce Dubbs <bdubbs_at_linuxfromscratch_dot_org>
+Date:                    2015-11-29
+Initial Package Version: 0.2.3
+Upstream Status:         Already in upstream git repository
+Origin:                  Upstream
+Description:             This patch fixes rpcbind to be able to build with 
+                         recent tirpc versions.
+
+From 9194122389f2a56b1cd1f935e64307e2e963c2da Mon Sep 17 00:00:00 2001
+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 4ae93f1..22d6c84 100644
+--- a/src/rpcb_svc_com.c
++++ b/src/rpcb_svc_com.c
+@@ -1295,10 +1295,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);
+-- 
+1.8.2.1
+