From e9bee135468a852743658a5b48c480cc0527c1dc Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Fri, 2 Sep 2011 16:15:01 -0400 Subject: [PATCH] rpcbind: import current stable from upstream Gentoo The upstream version contains all of our fixes, so import the upstream version so we can drop the cros one. BUG=None TEST=emerged it for x86-alex and arm-generic boards Change-Id: I903782f27932a2cd6bae503e89e4ac77d1e0fd6a Reviewed-on: http://gerrit.chromium.org/gerrit/7194 Reviewed-by: David James Reviewed-by: Simon Glass Tested-by: Mike Frysinger --- .../files/rpcbind-0.2.0-pkgconfig.patch | 65 +++++++++++++++++++ .../net-nds/rpcbind/files/rpcbind.confd | 4 ++ .../net-nds/rpcbind/files/rpcbind.initd | 22 +++++++ .../net-nds/rpcbind/rpcbind-0.2.0.ebuild | 48 ++++++++++++++ 4 files changed, 139 insertions(+) create mode 100644 sdk_container/src/third_party/portage-stable/net-nds/rpcbind/files/rpcbind-0.2.0-pkgconfig.patch create mode 100755 sdk_container/src/third_party/portage-stable/net-nds/rpcbind/files/rpcbind.confd create mode 100755 sdk_container/src/third_party/portage-stable/net-nds/rpcbind/files/rpcbind.initd create mode 100644 sdk_container/src/third_party/portage-stable/net-nds/rpcbind/rpcbind-0.2.0.ebuild diff --git a/sdk_container/src/third_party/portage-stable/net-nds/rpcbind/files/rpcbind-0.2.0-pkgconfig.patch b/sdk_container/src/third_party/portage-stable/net-nds/rpcbind/files/rpcbind-0.2.0-pkgconfig.patch new file mode 100644 index 0000000000..e0339af92b --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-nds/rpcbind/files/rpcbind-0.2.0-pkgconfig.patch @@ -0,0 +1,65 @@ +From afd71b8fc0df036a884b3af14ddb875674a49a85 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Diego=20Elio=20Petten=F2?= +Date: Mon, 29 Nov 2010 16:28:38 -0500 +Subject: [PATCH] Use pkg-config to find libtirpc +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This allows to properly cross-compile rpcbind, as /usr/include/tirpc is +no longer a valid path in that case. + +Signed-off-by: Diego Elio Pettenò +Signed-off-by: Steve Dickson +--- + configure.in | 4 +++- + src/Makefile.am | 13 +++++++------ + 2 files changed, 10 insertions(+), 7 deletions(-) + +diff --git a/configure.in b/configure.in +index de1c730..7d43fd4 100644 +--- a/configure.in ++++ b/configure.in +@@ -51,7 +51,9 @@ AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h \ + unistd.h nss.h]) + + AC_CHECK_LIB([pthread], [pthread_create]) +-AC_CHECK_LIB([tirpc], [clnt_create]) ++ ++PKG_CHECK_MODULES([TIRPC], [libtirpc]) ++ + AC_ARG_ENABLE(libwrap,[ --enable-libwrap Enables host name checking], + [case "${enableval}" in + yes) libwarp=true +diff --git a/src/Makefile.am b/src/Makefile.am +index cc0a85b..a2f3e34 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -1,4 +1,4 @@ +-INCLUDES = -I$(srcdir)/tirpc -DPORTMAP -DINET6 -DVERSION="\"$(VERSION)\"" \ ++INCLUDES = $(TIRPC_CFLAGS) -DPORTMAP -DINET6 -DVERSION="\"$(VERSION)\"" \ + -D_GNU_SOURCE -Wall -pipe + if DEBUG + INCLUDES += -DRPCBIND_DEBUG -DSVC_RUN_DEBUG -DDEBUG_RMTCALL +@@ -23,12 +23,13 @@ rpcbind_SOURCES = check_bound.c rpcbind.c \ + rpcbind.h + + rpcinfo_SOURCES = rpcinfo.c +-rpcinfo_LDFLAGS = -lpthread -ltirpc +-rpcinfo_LDADD = $(LIB_TIRPC) ++rpcinfo_LDFLAGS = -lpthread ++rpcinfo_LDADD = $(TIRPC_LIBS) + + +-rpcbind_LDFLAGS = -lpthread -ltirpc +-rpcbind_LDADD = $(LIB_TIRPC) +-AM_CPPFLAGS = -I/usr/include/tirpc -DCHECK_LOCAL -DPORTMAP \ ++rpcbind_LDFLAGS = -lpthread ++rpcbind_CFLAGS = $(TIRPC_CFLAGS) ++rpcbind_LDADD = $(TIRPC_LIBS) ++AM_CPPFLAGS = -DCHECK_LOCAL -DPORTMAP \ + -DFACILITY=LOG_MAIL -DSEVERITY=LOG_INFO + +-- +1.7.6 + diff --git a/sdk_container/src/third_party/portage-stable/net-nds/rpcbind/files/rpcbind.confd b/sdk_container/src/third_party/portage-stable/net-nds/rpcbind/files/rpcbind.confd new file mode 100755 index 0000000000..ddc09172d1 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-nds/rpcbind/files/rpcbind.confd @@ -0,0 +1,4 @@ +# /etc/conf.d/rpcbind + +# Options for `rpcbind`. +#RPCBIND_OPTS="-l" diff --git a/sdk_container/src/third_party/portage-stable/net-nds/rpcbind/files/rpcbind.initd b/sdk_container/src/third_party/portage-stable/net-nds/rpcbind/files/rpcbind.initd new file mode 100755 index 0000000000..995ca71d01 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-nds/rpcbind/files/rpcbind.initd @@ -0,0 +1,22 @@ +#!/sbin/runscript +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-nds/rpcbind/files/rpcbind.initd,v 1.1 2007/12/29 09:13:55 vapier Exp $ + +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/sdk_container/src/third_party/portage-stable/net-nds/rpcbind/rpcbind-0.2.0.ebuild b/sdk_container/src/third_party/portage-stable/net-nds/rpcbind/rpcbind-0.2.0.ebuild new file mode 100644 index 0000000000..46190e1008 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-nds/rpcbind/rpcbind-0.2.0.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-nds/rpcbind/rpcbind-0.2.0.ebuild,v 1.11 2011/09/02 20:10:55 vapier Exp $ + +EAPI="2" + +inherit autotools +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="git://git.infradead.org/~steved/rpcbind.git" + inherit autotools git + SRC_URI="" + #KEYWORDS="" +else + SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2" + KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86" +fi + +DESCRIPTION="portmap replacement which supports RPC over various protocols" +HOMEPAGE="http://sourceforge.net/projects/rpcbind/" + +LICENSE="BSD" +SLOT="0" +IUSE="" + +RDEPEND="net-libs/libtirpc" +DEPEND="${RDEPEND} + dev-util/pkgconfig" + +src_prepare() { + if [[ ${PV} == "9999" ]] ; then + eautoreconf + else + epatch "${FILESDIR}"/${P}-pkgconfig.patch + eautoreconf + fi +} + +src_configure() { + econf --bindir=/sbin +} + +src_install() { + emake DESTDIR="${D}" install || die + doman man/rpc{bind,info}.8 + dodoc AUTHORS ChangeLog NEWS README + newinitd "${FILESDIR}"/rpcbind.initd rpcbind || die + newconfd "${FILESDIR}"/rpcbind.confd rpcbind || die +}