rpcbind: add rpcbind package, remove portmap
authorAndy Walsh <andy.walsh44+github@gmail.com>
Sun, 12 Aug 2018 18:53:04 +0000 (20:53 +0200)
committertripolar <tripolar@users.noreply.github.com>
Sun, 12 Aug 2018 22:58:48 +0000 (00:58 +0200)
Signed-off-by: Andy Walsh <andy.walsh44+github@gmail.com>
net/portmap/Makefile [deleted file]
net/portmap/files/portmap.init [deleted file]
net/portmap/patches/101-no_pie.patch [deleted file]
net/rpcbind/Makefile [new file with mode: 0644]
net/rpcbind/files/rpcbind.init [new file with mode: 0644]

diff --git a/net/portmap/Makefile b/net/portmap/Makefile
deleted file mode 100644 (file)
index 0615551..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-#
-# Copyright (C) 2006-2011 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=portmap
-PKG_VERSION:=6.0
-PKG_RELEASE:=4
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
-PKG_SOURCE_URL:=http://neil.brown.name/portmap/
-PKG_HASH:=02c820d39f3e6e729d1bea3287a2d8a6c684f1006fb9612f97dcad4a281d41de
-
-PKG_LICENSE:=BSD-4c
-PKG_LICENSE_FILES:=portmap.man
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)_$(PKG_VERSION)
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/portmap
-  SECTION:=net
-  CATEGORY:=Network
-  DEPENDS:=+libwrap $(LIBRPC_DEPENDS)
-  TITLE:=The RPC Portmapper
-  URL:=http://neil.brown.name/portmap/
-  MAINTAINER:=Peter Wagner <tripolar@gmx.at>
-  USERID:=rpc=65533:rpc=65533
-endef
-
-define Package/portmap/description
- Portmap is a server that converts RPC (Remote Procedure Call) program
- numbers into DARPA protocol port numbers.
-endef
-
-MAKE_FLAGS += \
-       CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -DHOSTS_ACCESS -DFACILITY=LOG_DAEMON -DIGNORE_SIGCHLD" \
-       RPCUSER="rpc" \
-       LDLIBS="$(TARGET_LDFLAGS) -lwrap $(LIBRPC)" \
-       all
-
-define Package/portmap/install
-       $(INSTALL_DIR) $(1)/usr/sbin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/portmap $(1)/usr/sbin/
-       $(INSTALL_DIR) $(1)/etc/init.d
-       $(INSTALL_BIN) ./files/portmap.init $(1)/etc/init.d/portmap
-endef
-
-$(eval $(call BuildPackage,portmap))
diff --git a/net/portmap/files/portmap.init b/net/portmap/files/portmap.init
deleted file mode 100644 (file)
index 621c313..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/sh /etc/rc.common
-# Copyright (C) 2006-2011 OpenWrt.org
-
-START=19
-STOP=19
-
-USE_PROCD=1
-
-start_service() {
-       procd_open_instance
-       procd_set_param command /usr/sbin/portmap -f
-       procd_close_instance
-}
diff --git a/net/portmap/patches/101-no_pie.patch b/net/portmap/patches/101-no_pie.patch
deleted file mode 100644 (file)
index 6cbdece..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ur portmap_6.0.org/Makefile portmap_6.0/Makefile
---- portmap_6.0.org/Makefile   2008-04-19 22:44:35.000000000 +0200
-+++ portmap_6.0/Makefile       2008-04-19 00:02:01.000000000 +0200
-@@ -127,7 +127,7 @@
- CPPFLAGS += $(HOSTS_ACCESS)
- portmap: CFLAGS   += -fpie
- portmap: LDLIBS   += $(WRAP_LIB)
--portmap: LDFLAGS  += -pie
-+#portmap: LDFLAGS  += -pie
- portmap: portmap.o pmap_check.o from_local.o
- from_local: CPPFLAGS += -DTEST
diff --git a/net/rpcbind/Makefile b/net/rpcbind/Makefile
new file mode 100644 (file)
index 0000000..179926d
--- /dev/null
@@ -0,0 +1,73 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=rpcbind
+PKG_VERSION:=0.2.4
+PKG_RELEASE:=1
+
+PKG_SOURCE_URL:=@SF/rpcbind
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_HASH:=074a9a530dc7c11e0d905aa59bcb0847c009313f02e98d3d798aa9568f414c66
+
+PKG_MAINTAINER:=Andy Walsh <andy.walsh44+github@gmail.com>
+PKG_LICENSE:=BSD-3-Clause
+
+PKG_FIXUP:=autoreconf
+PKG_REMOVE_FILES:=autogen.sh aclocal.m4
+PKG_INSTALL:=1
+
+PKG_CONFIG_DEPENDS:= \
+       CONFIG_RPCBIND_LIBWRAP \
+       CONFIG_RPCBIND_WARMSTARTS
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/rpcbind
+  SECTION:=net
+  CATEGORY:=Network
+  DEPENDS:=+libtirpc +RPCBIND_LIBWRAP:libwrap
+  TITLE:=Universal addresses to RPC mapper 
+  URL:=http://libtirpc.sourceforge.net/
+  USERID:=rpc=65533:rpc=65533
+endef
+
+define Package/rpcbind/description
+  The rpcbind utility is a server that converts RPC program numbers into universal addresses.
+  It must be running on the host to be able to make RPC calls on a server on that machine.
+  
+  Rpcbind replaces portmap for NFS v2/v3. It has more features, like ipv6 support.
+  Note: Nfs4 only configurations can run without it.
+endef
+
+define Package/rpcbind/config 
+if PACKAGE_rpcbind
+       config RPCBIND_LIBWRAP
+               bool "Enable libwrap (TCP wrappers) support."
+               default y
+
+       config RPCBIND_WARMSTARTS
+               bool "Enable warmstarts support"
+               default y
+               help
+                 The warmstart feature saves RPC registrations on termination. 
+endif
+endef
+
+CONFIGURE_ARGS += \
+       --with-rpcuser=rpc \
+       --without-systemdsystemunitdir
+
+ifeq ($(CONFIG_RPCBIND_LIBWRAP),y)
+       CONFIGURE_ARGS += --enable-libwrap
+endif
+ifeq ($(CONFIG_RPCBIND_WARMSTARTS),y)
+       CONFIGURE_ARGS += --enable-warmstarts
+endif
+       
+define Package/rpcbind/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/{rpcbind,rpcinfo} $(1)/usr/bin/
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) ./files/rpcbind.init $(1)/etc/init.d/rpcbind
+endef
+
+$(eval $(call BuildPackage,rpcbind))
diff --git a/net/rpcbind/files/rpcbind.init b/net/rpcbind/files/rpcbind.init
new file mode 100644 (file)
index 0000000..f3efaed
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/sh /etc/rc.common
+
+START=19
+STOP=19
+
+USE_PROCD=1
+
+start_service() { 
+       procd_open_instance
+       procd_set_param command /usr/bin/rpcbind -f -w
+       procd_set_param respawn
+       procd_close_instance
+}