summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/rpcbind
diff options
context:
space:
mode:
authorAdrian Dudau <adrian.dudau@enea.com>2013-12-12 13:38:32 +0100
committerAdrian Dudau <adrian.dudau@enea.com>2013-12-12 13:50:20 +0100
commite2e6f6fe07049f33cb6348780fa975162752e421 (patch)
treeb1813295411235d1297a0ed642b1346b24fdfb12 /meta/recipes-extended/rpcbind
downloadpoky-e2e6f6fe07049f33cb6348780fa975162752e421.tar.gz
initial commit of Enea Linux 3.1
Migrated from the internal git server on the dora-enea branch Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
Diffstat (limited to 'meta/recipes-extended/rpcbind')
-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/fix_host_path.patch16
-rw-r--r--meta/recipes-extended/rpcbind/rpcbind/init.d85
-rw-r--r--meta/recipes-extended/rpcbind/rpcbind/obsolete_automake_macros.patch14
-rw-r--r--meta/recipes-extended/rpcbind/rpcbind/rpcbind.conf3
-rw-r--r--meta/recipes-extended/rpcbind/rpcbind/rpcbind.service14
-rw-r--r--meta/recipes-extended/rpcbind/rpcbind_0.2.0.bb60
8 files changed, 282 insertions, 0 deletions
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/fix_host_path.patch b/meta/recipes-extended/rpcbind/rpcbind/fix_host_path.patch
new file mode 100644
index 0000000000..590b34440c
--- /dev/null
+++ b/meta/recipes-extended/rpcbind/rpcbind/fix_host_path.patch
@@ -0,0 +1,16 @@
1This fixes the hardcoded HOST path
2
3Signed-off-by: Saul Wold <saul.wold@intel.com>
4
5Upstream-Status: Inappropriate [configuration]
6
7--- rpcbind-0.2.0/src/Makefile.am 2010-09-02 11:47:16.725763886 -0700
8+++ rpcbind-0.2.0_fixed/src/Makefile.am 2010-09-02 11:47:36.077763138 -0700
9@@ -29,6 +29,6 @@
10
11 rpcbind_LDFLAGS = -lpthread -ltirpc
12 rpcbind_LDADD = $(LIB_TIRPC)
13-AM_CPPFLAGS = -I/usr/include/tirpc -DCHECK_LOCAL -DPORTMAP \
14+AM_CPPFLAGS = -I=/usr/include/tirpc -DCHECK_LOCAL -DPORTMAP \
15 -DFACILITY=LOG_MAIL -DSEVERITY=LOG_INFO
16
diff --git a/meta/recipes-extended/rpcbind/rpcbind/init.d b/meta/recipes-extended/rpcbind/rpcbind/init.d
new file mode 100644
index 0000000000..5c756bb523
--- /dev/null
+++ b/meta/recipes-extended/rpcbind/rpcbind/init.d
@@ -0,0 +1,85 @@
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
19test -f /sbin/rpcbind || exit 0
20
21OPTIONS=""
22if [ -f /etc/default/rpcbind ]
23then
24 . /etc/default/rpcbind
25elif [ -f /etc/rpcbind.conf ]
26then
27 . /etc/rpcbind.conf
28fi
29
30start ()
31{
32 echo -n "Starting rpcbind daemon..."
33 if pidof /sbin/rpcbind >/dev/null; then
34 echo "already running."
35 exit 0
36 fi
37 start-stop-daemon --start --quiet --exec /sbin/rpcbind -- "$@"
38 if [ $? -eq 0 ]; then
39 echo "done."
40 else
41 echo "failed."
42 fi
43}
44
45stop ()
46{
47 echo "Stopping rpcbind daemon..."
48 if ! pidof /sbin/rpcbind >/dev/null; then
49 echo "not running."
50 exit 0
51 fi
52 start-stop-daemon --stop --quiet --exec /sbin/rpcbind
53 if [ $? -eq 0 ]; then
54 echo "done."
55 else
56 echo "failed."
57 fi
58}
59
60case "$1" in
61 start)
62 start $OPTIONS
63 ;;
64 stop)
65 stop
66 ;;
67 force-reload)
68 stop
69 start $OPTIONS
70 ;;
71 restart)
72 stop
73 start $OPTIONS
74 ;;
75 status)
76 pidof /sbin/rpcbind >/dev/null
77 exit $?
78 ;;
79 *)
80 echo "Usage: /etc/init.d/rpcbind {start|stop|force-reload|restart|status}"
81 exit 1
82 ;;
83esac
84
85exit 0
diff --git a/meta/recipes-extended/rpcbind/rpcbind/obsolete_automake_macros.patch b/meta/recipes-extended/rpcbind/rpcbind/obsolete_automake_macros.patch
new file mode 100644
index 0000000000..a12c4ddf27
--- /dev/null
+++ b/meta/recipes-extended/rpcbind/rpcbind/obsolete_automake_macros.patch
@@ -0,0 +1,14 @@
1Upstream-Status: Submitted [https://sourceforge.net/tracker/?func=detail&aid=3603149&group_id=201237&atid=976751]
2
3Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
4diff -Nurd rpcbind-0.2.0/configure.in rpcbind-0.2.0/configure.in
5--- rpcbind-0.2.0/configure.in 2009-05-29 16:38:22.000000000 +0300
6+++ rpcbind-0.2.0/configure.in 2013-02-03 04:04:06.577480682 +0200
7@@ -4,7 +4,7 @@
8 # AM_MAINTAINER_MODE
9 AC_CONFIG_SRCDIR([src/rpcbind.c])
10 AC_PROG_CC
11- AM_CONFIG_HEADER(config.h)
12+ AC_CONFIG_HEADERS(config.h)
13 AC_HEADER_DIRENT
14 AC_PREFIX_DEFAULT(/usr)
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..4de28d4ae1
--- /dev/null
+++ b/meta/recipes-extended/rpcbind/rpcbind/rpcbind.service
@@ -0,0 +1,14 @@
1[Unit]
2Description=RPC Bind
3After=network.target
4Wants=rpcbind.target
5Before=rpcbind.target
6
7[Service]
8Type=forking
9EnvironmentFile=-@SYSCONFDIR@/rpcbind.conf
10ExecStart=@SBINDIR@/rpcbind -w $RPCBIND_OPTS
11Restart=always
12
13[Install]
14WantedBy=multi-user.target
diff --git a/meta/recipes-extended/rpcbind/rpcbind_0.2.0.bb b/meta/recipes-extended/rpcbind/rpcbind_0.2.0.bb
new file mode 100644
index 0000000000..a75e4e1bf6
--- /dev/null
+++ b/meta/recipes-extended/rpcbind/rpcbind_0.2.0.bb
@@ -0,0 +1,60 @@
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://init.d \
15 file://fix_host_path.patch \
16 file://obsolete_automake_macros.patch \
17 ${UCLIBCPATCHES} \
18 file://rpcbind.conf \
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] = "1a77ddb1aaea8099ab19c351eeb26316"
28SRC_URI[sha256sum] = "c92f263e0353887f16379d7708ef1fb4c7eedcf20448bc1e4838f59497a00de3"
29
30PR = "r4"
31
32inherit autotools update-rc.d systemd
33
34PACKAGECONFIG ??= "tcp-wrappers"
35PACKAGECONFIG[tcp-wrappers] = "--enable-libwrap,--disable-libwrap,tcp-wrappers"
36
37INITSCRIPT_NAME = "rpcbind"
38INITSCRIPT_PARAMS = "start 43 S . start 32 0 6 . stop 81 1 ."
39
40SYSTEMD_SERVICE_${PN} = "rpcbind.service"
41SYSTEMD_AUTO_ENABLE = "disable"
42
43EXTRA_OECONF += " --enable-warmstarts "
44
45do_install_append () {
46 mv ${D}${bindir} ${D}${sbindir}
47
48 install -d ${D}${sysconfdir}/init.d
49 sed -e 's,/etc/,${sysconfdir}/,g' \
50 -e 's,/sbin/,${sbindir}/,g' \
51 ${WORKDIR}/init.d > ${D}${sysconfdir}/init.d/rpcbind
52 chmod 0755 ${D}${sysconfdir}/init.d/rpcbind
53
54 install -m 0755 ${WORKDIR}/rpcbind.conf ${D}${sysconfdir}
55 install -d ${D}${systemd_unitdir}/system
56 install -m 0644 ${WORKDIR}/rpcbind.service ${D}${systemd_unitdir}/system
57 sed -i -e 's,@SBINDIR@,${sbindir},g' \
58 -e 's,@SYSCONFDIR@,${sysconfdir},g' \
59 ${D}${systemd_unitdir}/system/rpcbind.service
60}