rpcbind: Added package rpcbind
Added net-nds/rpcbind as a dependency to nfs-utils
and support rpc
BUG=b/162946348
TEST=equery-lakitu w rpcbind
RELEASE_NOTE=Add package rpcbind to support rpc
Change-Id: I221c801ee51f9ff7fbd0e202a9b12dd5563f0d23
diff --git a/metadata/md5-cache/net-nds/rpcbind-1.2.5 b/metadata/md5-cache/net-nds/rpcbind-1.2.5
new file mode 100644
index 0000000..ecbee0c
--- /dev/null
+++ b/metadata/md5-cache/net-nds/rpcbind-1.2.5
@@ -0,0 +1,14 @@
+DEFINED_PHASES=configure install prepare
+DEPEND=>=net-libs/libtirpc-0.2.3:= systemd? ( sys-apps/systemd:= ) tcpd? ( sys-apps/tcp-wrappers ) virtual/pkgconfig virtual/pkgconfig
+DESCRIPTION=portmap replacement which supports RPC over various protocols
+EAPI=6
+HOMEPAGE=https://sourceforge.net/projects/rpcbind/
+IUSE=debug remotecalls selinux systemd tcpd warmstarts
+KEYWORDS=*
+LICENSE=BSD
+RDEPEND=>=net-libs/libtirpc-0.2.3:= systemd? ( sys-apps/systemd:= ) tcpd? ( sys-apps/tcp-wrappers ) selinux? ( sec-policy/selinux-rpcbind )
+REQUIRED_USE=systemd? ( warmstarts )
+SLOT=0
+SRC_URI=mirror://sourceforge/rpcbind/rpcbind-1.2.5.tar.bz2
+_eclasses_=multilib 2477ebe553d3e4d2c606191fe6c33602 systemd 71fd8d2065d102753fb9e4d20eaf3e9f toolchain-funcs 605c126bed8d87e4378d5ff1645330cb
+_md5_=9502f806dd134d737842c71f12797b07
diff --git a/net-nds/rpcbind/Manifest b/net-nds/rpcbind/Manifest
new file mode 100644
index 0000000..1e114d6
--- /dev/null
+++ b/net-nds/rpcbind/Manifest
@@ -0,0 +1 @@
+DIST rpcbind-1.2.5.tar.bz2 123502 BLAKE2B de0d10406aeffd75195c1fa1d0179b2c7c0ba54c3f3ac58ce9d7e9448d1dbe91a296ad69c45dee115e0a739aa9cfec53b750d3a5ca405e16605a92bbb2006859 SHA512 e884c4757950ccead0f9a07f50625a63e6f18f9bfae9fcfffa3e5fa4b7a66c3a99d9fa303061848fe8211509d5456f24ff26e4579af6e161a35522268f3ef3e4
diff --git a/net-nds/rpcbind/files/rpcbind.confd b/net-nds/rpcbind/files/rpcbind.confd
new file mode 100644
index 0000000..ddc0917
--- /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 100644
index 0000000..1832977
--- /dev/null
+++ b/net-nds/rpcbind/files/rpcbind.initd
@@ -0,0 +1,21 @@
+#!/sbin/openrc-run
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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/metadata.xml b/net-nds/rpcbind/metadata.xml
new file mode 100644
index 0000000..8b85a22
--- /dev/null
+++ b/net-nds/rpcbind/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="remotecalls">Enable remote calls</flag>
+ <flag name="warmstarts">Enables rpcbind to cache configuration for warm restarts</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">rpcbind</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-nds/rpcbind/rpcbind-1.2.5.ebuild b/net-nds/rpcbind/rpcbind-1.2.5.ebuild
new file mode 100644
index 0000000..52e7405
--- /dev/null
+++ b/net-nds/rpcbind/rpcbind-1.2.5.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit systemd
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://linux-nfs.org/~steved/rpcbind.git"
+ inherit autotools git-r3
+else
+ SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+ KEYWORDS="*"
+fi
+
+DESCRIPTION="portmap replacement which supports RPC over various protocols"
+HOMEPAGE="https://sourceforge.net/projects/rpcbind/"
+
+LICENSE="BSD"
+SLOT="0"
+IUSE="debug remotecalls selinux systemd tcpd warmstarts"
+REQUIRED_USE="systemd? ( warmstarts )"
+
+CDEPEND=">=net-libs/libtirpc-0.2.3:=
+ systemd? ( sys-apps/systemd:= )
+ tcpd? ( sys-apps/tcp-wrappers )"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-rpcbind )"
+
+src_prepare() {
+ default
+ [[ ${PV} == "9999" ]] && eautoreconf
+}
+
+src_configure() {
+ local myeconfargs=(
+ --bindir="${EPREFIX}"/sbin
+ --sbindir="${EPREFIX}"/sbin
+ --with-statedir="${EPREFIX}"/run/${PN}
+ --with-systemdsystemunitdir=$(usex systemd "$(systemd_get_systemunitdir)" "no")
+ $(use_enable debug)
+ $(use_enable remotecalls rmtcalls)
+ $(use_enable warmstarts)
+ $(use_enable tcpd libwrap)
+ )
+
+ # Avoid using rpcsvc headers
+ # https://bugs.gentoo.org/705224
+ export ac_cv_header_rpcsvc_mount_h=no
+
+ econf "${myeconfargs[@]}"
+}
+
+src_install() {
+ default
+
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+}