summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/rpcbind
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/rpcbind')
-rw-r--r--meta/recipes-extended/rpcbind/rpcbind/0001-rpcbind-rpcuser-not-being-set-in-Makefile.am.patch34
-rw-r--r--meta/recipes-extended/rpcbind/rpcbind/0001-uclibc-nss.patch30
-rw-r--r--meta/recipes-extended/rpcbind/rpcbind/0002-uclibc-rpcsvc-defines.patch60
-rw-r--r--meta/recipes-extended/rpcbind/rpcbind/init.d87
-rw-r--r--meta/recipes-extended/rpcbind/rpcbind/rpcbind.conf3
-rw-r--r--meta/recipes-extended/rpcbind/rpcbind/rpcbind.service12
-rw-r--r--meta/recipes-extended/rpcbind/rpcbind/rpcbind.socket8
-rw-r--r--meta/recipes-extended/rpcbind/rpcbind_0.2.1.bb64
8 files changed, 298 insertions, 0 deletions
diff --git a/meta/recipes-extended/rpcbind/rpcbind/0001-rpcbind-rpcuser-not-being-set-in-Makefile.am.patch b/meta/recipes-extended/rpcbind/rpcbind/0001-rpcbind-rpcuser-not-being-set-in-Makefile.am.patch
new file mode 100644
index 0000000000..b556a46347
--- /dev/null
+++ b/meta/recipes-extended/rpcbind/rpcbind/0001-rpcbind-rpcuser-not-being-set-in-Makefile.am.patch
@@ -0,0 +1,34 @@
1From 914507aa6980129fefb4decaabea1a4f60c7182b Mon Sep 17 00:00:00 2001
2From: Steve Dickson <steved@redhat.com>
3Date: Wed, 21 Aug 2013 14:40:22 -0400
4Subject: [PATCH 1/1] rpcbind: rpcuser not being set in Makefile.am
5
6Upstream-Status: backport
7
8Commit 8d7a0708 cause a regression where the rpcuser id was not
9being set, which in turn cause rpcbind to immediately exit.
10This patch removes the extra ',' that was in the AC_ARG_WITH
11statement in the configure.ac file.
12
13Signed-off-by: Steve Dickson <steved@redhat.com>
14Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
15---
16 configure.ac | 2 +-
17 1 file changed, 1 insertion(+), 1 deletion(-)
18
19diff --git a/configure.ac b/configure.ac
20index 2b67720..1cf42d3 100644
21--- a/configure.ac
22+++ b/configure.ac
23@@ -23,7 +23,7 @@ AC_ARG_WITH([statedir],
24 AC_SUBST([statedir], [$with_statedir])
25
26 AC_ARG_WITH([rpcuser],
27- AS_HELP_STRING([--with-rpcuser=ARG], [use ARG for RPC @<:@default=root@:>@]),
28+ AS_HELP_STRING([--with-rpcuser=ARG], [use ARG for RPC @<:@default=root@:>@])
29 ,, [with_rpcuser=root])
30 AC_SUBST([rpcuser], [$with_rpcuser])
31
32--
331.8.3.2
34
diff --git a/meta/recipes-extended/rpcbind/rpcbind/0001-uclibc-nss.patch b/meta/recipes-extended/rpcbind/rpcbind/0001-uclibc-nss.patch
new file mode 100644
index 0000000000..afa55f3b76
--- /dev/null
+++ b/meta/recipes-extended/rpcbind/rpcbind/0001-uclibc-nss.patch
@@ -0,0 +1,30 @@
1Upstream-Status: Pending
2
3From b8f0d7b7318ba344c25785d6f5cf3f8de98012d4 Mon Sep 17 00:00:00 2001
4From: Natanael Copa <ncopa@alpinelinux.org>
5Date: Tue, 2 Feb 2010 09:36:03 +0000
6Subject: [PATCH 1/2] uclibc-nss
7
8---
9 src/rpcbind.c | 4 ++++
10 1 files changed, 4 insertions(+), 0 deletions(-)
11
12diff --git a/src/rpcbind.c b/src/rpcbind.c
13index 525ffba..1fe1a60 100644
14--- a/src/rpcbind.c
15+++ b/src/rpcbind.c
16@@ -67,7 +67,11 @@
17 #include <pwd.h>
18 #include <string.h>
19 #include <errno.h>
20+#if defined(__UCLIBC__)
21+#define __nss_configure_lookup(x,y)
22+#else
23 #include <nss.h>
24+#endif
25 #include "config.h"
26 #include "rpcbind.h"
27
28--
291.6.6.1
30
diff --git a/meta/recipes-extended/rpcbind/rpcbind/0002-uclibc-rpcsvc-defines.patch b/meta/recipes-extended/rpcbind/rpcbind/0002-uclibc-rpcsvc-defines.patch
new file mode 100644
index 0000000000..c54fc96fc0
--- /dev/null
+++ b/meta/recipes-extended/rpcbind/rpcbind/0002-uclibc-rpcsvc-defines.patch
@@ -0,0 +1,60 @@
1Upstream-Status: Pending
2
3From 077add040c2e30d3ac507362f4afe350f47be027 Mon Sep 17 00:00:00 2001
4From: Natanael Copa <ncopa@alpinelinux.org>
5Date: Tue, 2 Feb 2010 09:47:57 +0000
6Subject: [PATCH 2/2] uclibc-rpcsvc-defines
7
8---
9 src/security.c | 28 ++++++++++++++++++++++++++++
10 1 files changed, 28 insertions(+), 0 deletions(-)
11
12diff --git a/src/security.c b/src/security.c
13index 0edeac6..e9fed55 100644
14--- a/src/security.c
15+++ b/src/security.c
16@@ -20,6 +20,32 @@
17 /*
18 * XXX for special case checks in check_callit.
19 */
20+#if defined(__UCLIBC__)
21+
22+#define MOUNTPROC_MNT 1
23+#define MOUNTPROC_UMNT 3
24+
25+#define NFS_PROGRAM 100003
26+#define YPPROG 100004
27+#define MOUNTPROG 100005
28+#define YPBINDPROG 100007
29+#define YPPASSWDPROG 100009
30+#define RQUOTAPROG 100011
31+
32+#define YPPROC_NULL 0
33+#define YPPROC_DOMAIN 1
34+#define YPPROC_DOMAIN_NONACK 2
35+#define YPPROC_MATCH 3
36+#define YPPROC_FIRST 4
37+#define YPPROC_NEXT 5
38+#define YPPROC_XFR 6
39+#define YPPROC_CLEAR 7
40+#define YPPROC_ALL 8
41+
42+#define YPBINDPROC_SETDOM 2
43+
44+#else
45+
46 #include <rpcsvc/mount.h>
47 #include <rpcsvc/rquota.h>
48 #include <rpcsvc/nfs_prot.h>
49@@ -27,6 +53,8 @@
50 #include <rpcsvc/ypclnt.h>
51 #include <rpcsvc/yppasswd.h>
52
53+#endif
54+
55 #include "rpcbind.h"
56
57 #ifdef LIBWRAP
58--
591.6.6.1
60
diff --git a/meta/recipes-extended/rpcbind/rpcbind/init.d b/meta/recipes-extended/rpcbind/rpcbind/init.d
new file mode 100644
index 0000000000..67499aa828
--- /dev/null
+++ b/meta/recipes-extended/rpcbind/rpcbind/init.d
@@ -0,0 +1,87 @@
1#!/bin/sh
2#
3# start/stop rpcbind daemon.
4
5### BEGIN INIT INFO
6# Provides: rpcbind
7# Required-Start: $network
8# Required-Stop: $network
9# Default-Start: S 2 3 4 5
10# Default-Stop: 0 1 6
11# Short-Description: RPC portmapper replacement
12# Description: rpcbind is a server that converts RPC (Remote
13# Procedure Call) program numbers into DARPA
14# protocol port numbers. It must be running in
15# order to make RPC calls. Services that use
16# RPC include NFS and NIS.
17### END INIT INFO
18
19# Source function library.
20. /etc/init.d/functions
21
22test -f /sbin/rpcbind || exit 0
23
24OPTIONS=""
25if [ -f /etc/default/rpcbind ]
26then
27 . /etc/default/rpcbind
28elif [ -f /etc/rpcbind.conf ]
29then
30 . /etc/rpcbind.conf
31fi
32
33start ()
34{
35 echo -n "Starting rpcbind daemon..."
36 if pidof /sbin/rpcbind >/dev/null; then
37 echo "already running."
38 exit 0
39 fi
40 start-stop-daemon --start --quiet --exec /sbin/rpcbind -- "$@"
41 if [ $? -eq 0 ]; then
42 echo "done."
43 else
44 echo "failed."
45 fi
46}
47
48stop ()
49{
50 echo "Stopping rpcbind daemon..."
51 if ! pidof /sbin/rpcbind >/dev/null; then
52 echo "not running."
53 return 0
54 fi
55 start-stop-daemon --stop --quiet --exec /sbin/rpcbind
56 if [ $? -eq 0 ]; then
57 echo "done."
58 else
59 echo "failed."
60 fi
61}
62
63case "$1" in
64 start)
65 start $OPTIONS
66 ;;
67 stop)
68 stop
69 ;;
70 force-reload)
71 stop
72 start $OPTIONS
73 ;;
74 restart)
75 stop
76 start $OPTIONS
77 ;;
78 status)
79 status /sbin/rpcbind
80 ;;
81 *)
82 echo "Usage: /etc/init.d/rpcbind {start|stop|force-reload|restart|status}"
83 exit 1
84 ;;
85esac
86
87exit $?
diff --git a/meta/recipes-extended/rpcbind/rpcbind/rpcbind.conf b/meta/recipes-extended/rpcbind/rpcbind/rpcbind.conf
new file mode 100644
index 0000000000..2a4dfbcfbc
--- /dev/null
+++ b/meta/recipes-extended/rpcbind/rpcbind/rpcbind.conf
@@ -0,0 +1,3 @@
1# Optional arguments passed to rpcbind.
2#
3RPCBIND_OPTS=""
diff --git a/meta/recipes-extended/rpcbind/rpcbind/rpcbind.service b/meta/recipes-extended/rpcbind/rpcbind/rpcbind.service
new file mode 100644
index 0000000000..b3ae2541a0
--- /dev/null
+++ b/meta/recipes-extended/rpcbind/rpcbind/rpcbind.service
@@ -0,0 +1,12 @@
1[Unit]
2Description=RPC Bind Service
3Requires=rpcbind.socket
4
5[Service]
6Type=forking
7EnvironmentFile=-@SYSCONFDIR@/rpcbind.conf
8ExecStart=@SBINDIR@/rpcbind -w $RPCBIND_OPTS
9SuccessExitStatus=2
10
11[Install]
12Also=rpcbind.socket
diff --git a/meta/recipes-extended/rpcbind/rpcbind/rpcbind.socket b/meta/recipes-extended/rpcbind/rpcbind/rpcbind.socket
new file mode 100644
index 0000000000..d63c1d9720
--- /dev/null
+++ b/meta/recipes-extended/rpcbind/rpcbind/rpcbind.socket
@@ -0,0 +1,8 @@
1[Unit]
2Description=RPCbind Server Activation Socket
3
4[Socket]
5ListenStream=/var/run/rpcbind.sock
6
7[Install]
8WantedBy=sockets.target
diff --git a/meta/recipes-extended/rpcbind/rpcbind_0.2.1.bb b/meta/recipes-extended/rpcbind/rpcbind_0.2.1.bb
new file mode 100644
index 0000000000..b7324766f7
--- /dev/null
+++ b/meta/recipes-extended/rpcbind/rpcbind_0.2.1.bb
@@ -0,0 +1,64 @@
1SUMMARY = "Universal Addresses to RPC Program Number Mapper"
2DESCRIPTION = "The rpcbind utility is a server that converts RPC \
3 program numbers into universal addresses."
4SECTION = "console/network"
5HOMEPAGE = "http://sourceforge.net/projects/rpcbind/"
6BUGTRACKER = "http://sourceforge.net/tracker/?group_id=201237&atid=976751"
7DEPENDS = "libtirpc quota"
8
9LICENSE = "BSD"
10LIC_FILES_CHKSUM = "file://COPYING;md5=b46486e4c4a416602693a711bb5bfa39 \
11 file://src/rpcinfo.c;beginline=1;endline=27;md5=f8a8cd2cb25ac5aa16767364fb0e3c24"
12
13SRC_URI = "${SOURCEFORGE_MIRROR}/rpcbind/rpcbind-${PV}.tar.bz2 \
14 file://0001-rpcbind-rpcuser-not-being-set-in-Makefile.am.patch \
15 file://init.d \
16 ${UCLIBCPATCHES} \
17 file://rpcbind.conf \
18 file://rpcbind.socket \
19 file://rpcbind.service \
20 "
21
22UCLIBCPATCHES_libc-uclibc = "file://0001-uclibc-nss.patch \
23 file://0002-uclibc-rpcsvc-defines.patch \
24 "
25UCLIBCPATCHES ?= ""
26
27SRC_URI[md5sum] = "0a5f9c2142af814c55d957aaab3bcc68"
28SRC_URI[sha256sum] = "da169ff877a5a07581fad50a9a808ac6e96f0c277a3df49a7ef005778428496e"
29
30inherit autotools update-rc.d systemd pkgconfig
31
32PACKAGECONFIG ??= "tcp-wrappers"
33PACKAGECONFIG[tcp-wrappers] = "--enable-libwrap,--disable-libwrap,tcp-wrappers"
34
35INITSCRIPT_NAME = "rpcbind"
36INITSCRIPT_PARAMS = "start 12 2 3 4 5 . stop 60 0 1 6 ."
37
38SYSTEMD_SERVICE_${PN} = "rpcbind.service rpcbind.socket"
39
40inherit useradd
41
42USERADD_PACKAGES = "${PN}"
43USERADD_PARAM_${PN} = "--system --no-create-home --home-dir / \
44 --shell /bin/false --user-group rpc"
45
46EXTRA_OECONF += " --enable-warmstarts --with-rpcuser=rpc"
47
48do_install_append () {
49 mv ${D}${bindir} ${D}${sbindir}
50
51 install -d ${D}${sysconfdir}/init.d
52 sed -e 's,/etc/,${sysconfdir}/,g' \
53 -e 's,/sbin/,${sbindir}/,g' \
54 ${WORKDIR}/init.d > ${D}${sysconfdir}/init.d/rpcbind
55 chmod 0755 ${D}${sysconfdir}/init.d/rpcbind
56
57 install -m 0755 ${WORKDIR}/rpcbind.conf ${D}${sysconfdir}
58 install -d ${D}${systemd_unitdir}/system
59 install -m 0644 ${WORKDIR}/rpcbind.socket ${D}${systemd_unitdir}/system
60 install -m 0644 ${WORKDIR}/rpcbind.service ${D}${systemd_unitdir}/system
61 sed -i -e 's,@SBINDIR@,${sbindir},g' \
62 -e 's,@SYSCONFDIR@,${sysconfdir},g' \
63 ${D}${systemd_unitdir}/system/rpcbind.service
64}