summaryrefslogtreecommitdiffstats
path: root/meta-openembedded/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openembedded/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho')
-rw-r--r--meta-openembedded/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/0001-Add-missing-include-path-to-I-options.patch46
-rw-r--r--meta-openembedded/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/0002-Fix-build-issues-found-with-musl.patch71
-rwxr-xr-xmeta-openembedded/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/rwhod71
-rw-r--r--meta-openembedded/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/rwhod.default2
4 files changed, 190 insertions, 0 deletions
diff --git a/meta-openembedded/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/0001-Add-missing-include-path-to-I-options.patch b/meta-openembedded/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/0001-Add-missing-include-path-to-I-options.patch
new file mode 100644
index 000000000..b1325b317
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/0001-Add-missing-include-path-to-I-options.patch
@@ -0,0 +1,46 @@
+From 55ab6f1389261edff5f4c942bc3b0d8e695856d7 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 30 Aug 2017 18:11:33 -0700
+Subject: [PATCH 1/2] Add missing include path to -I options
+
+Fixes errors like
+| rwho.c:52:10: fatal error: 'protocols/rwhod.h' file not found
+| #include <protocols/rwhod.h>
+| ^~~~~~~~~~~~~~~~~~~
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ rwho/Makefile | 1 +
+ rwhod/Makefile | 2 ++
+ 2 files changed, 3 insertions(+)
+
+diff --git a/rwho/Makefile b/rwho/Makefile
+index 6f86388..67b28d4 100644
+--- a/rwho/Makefile
++++ b/rwho/Makefile
+@@ -6,6 +6,7 @@ include ../MRULES
+ rwho: rwho.o
+ $(CC) $(LDFLAGS) $^ $(LIBS) -o $@
+
++CFLAGS += -I../include
+ rwho.o: ../version.h
+
+ install: rwho
+diff --git a/rwhod/Makefile b/rwhod/Makefile
+index 772b641..9034218 100644
+--- a/rwhod/Makefile
++++ b/rwhod/Makefile
+@@ -7,6 +7,8 @@ ifneq ($(USE_GLIBC),1)
+ CFLAGS += -D_GNU_SOURCE
+ endif
+
++CFLAGS += -I../include
++
+ OBJS = rwhod.o
+
+ rwhod: $(OBJS)
+--
+2.14.1
+
diff --git a/meta-openembedded/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/0002-Fix-build-issues-found-with-musl.patch b/meta-openembedded/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/0002-Fix-build-issues-found-with-musl.patch
new file mode 100644
index 000000000..717b4d73f
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/0002-Fix-build-issues-found-with-musl.patch
@@ -0,0 +1,71 @@
+From 2108213242638fa355f662382f55495d91301858 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 30 Aug 2017 18:13:17 -0700
+Subject: [PATCH 2/2] Fix build issues found with musl
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ ruptime/ruptime.c | 1 +
+ rwho/rwho.c | 1 +
+ rwhod/rwhod.c | 5 +++--
+ 3 files changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/ruptime/ruptime.c b/ruptime/ruptime.c
+index 1d4f7b6..f1f043c 100644
+--- a/ruptime/ruptime.c
++++ b/ruptime/ruptime.c
+@@ -53,6 +53,7 @@ char ruptime_rcsid[] =
+ #include <string.h>
+ #include <errno.h>
+ #include <time.h>
++#include <fcntl.h>
+
+ struct hs {
+ char hs_hostname[MAXHOSTNAMELEN];
+diff --git a/rwho/rwho.c b/rwho/rwho.c
+index 63919ac..71aec9e 100644
+--- a/rwho/rwho.c
++++ b/rwho/rwho.c
+@@ -49,6 +49,7 @@ char rcsid[] = "$Id: rwho.c,v 1.7 1999/08/01 20:44:18 dholland Exp $";
+ #include <assert.h>
+ #include <stdio.h>
+ #include <time.h>
++#include <fcntl.h>
+ #include <protocols/rwhod.h>
+
+ #include "../version.h"
+diff --git a/rwhod/rwhod.c b/rwhod/rwhod.c
+index 54498d0..40cabcf 100644
+--- a/rwhod/rwhod.c
++++ b/rwhod/rwhod.c
+@@ -76,6 +76,7 @@ char rcsid[] =
+ #include <grp.h>
+ #include <time.h>
+ #include <stdint.h>
++#include <fcntl.h>
+
+ #include "../version.h"
+
+@@ -102,7 +103,7 @@ struct nlist nl[] = {
+ static void broadcaster(void);
+ static int configure(int s);
+ static int verify(const char *name);
+-#if __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 2)
++#if defined(__GLIBC__) && (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 2))
+ static int getloadavg(double ptr[3], int n);
+ #endif
+
+@@ -549,7 +550,7 @@ sendpacket(struct whod *wd)
+ }
+ }
+
+-#if __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 2)
++#if defined(__GLIBC__) && (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 2))
+ /*
+ * Taken from:
+ *
+--
+2.14.1
+
diff --git a/meta-openembedded/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/rwhod b/meta-openembedded/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/rwhod
new file mode 100755
index 000000000..f6419032e
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/rwhod
@@ -0,0 +1,71 @@
+#!/bin/sh
+
+### BEGIN INIT INFO
+# Provides: rwhod
+# Required-Start: $network $remote_fs $syslog
+# Required-Stop: $network $remote_fs $syslog
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Server for rwho and ruptime services
+### END INIT INFO
+
+PATH=/sbin:/bin:/usr/bin:/usr/sbin
+
+DAEMON=/usr/sbin/rwhod
+PIDFILE=/var/run/rwhod.pid
+CONF_FILE="/etc/default/rwhod"
+DESC="Who daemon "
+# default options. Change them in /etc/default/rwhod
+RWHOD_OPTIONS="-b"
+
+# rwhod init.d script for ntpdc from ntp.isc.org
+test -f $DAEMON || exit 0
+
+# Source function library.
+. /etc/init.d/functions
+
+[ -r $CONF_FILE ] && . $CONF_FILE
+
+startdaemon(){
+ echo -n "Starting $DESC" " rwhod "
+ start-stop-daemon --start --quiet --oknodo --pidfile $PIDFILE --exec $DAEMON -- $RWHOD_OPTIONS
+ echo "done"
+}
+stopdaemon(){
+ echo -n "Stopping $DESC" " rwhod "
+ start-stop-daemon --stop --quiet --oknodo --exec $DAEMON
+ echo "done"
+}
+
+case "$1" in
+ start)
+ startdaemon
+ ;;
+ stop)
+ stopdaemon
+ ;;
+ force-reload)
+ stopdaemon
+ startdaemon
+ ;;
+ restart)
+ stopdaemon
+ sleep 1
+ startdaemon
+ ;;
+ reload)
+ stopdaemon
+ sleep 1
+ startdaemon
+ ;;
+ status)
+ status /usr/sbin/rwhod;
+ exit $?
+ ;;
+ *)
+ echo "Usage: rwhod { start | stop | status | restart | reload }" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/meta-openembedded/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/rwhod.default b/meta-openembedded/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/rwhod.default
new file mode 100644
index 000000000..62d3a942d
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/rwhod.default
@@ -0,0 +1,2 @@
+#Options for the rwhod daemon.
+RWHOD_OPTIONS="-b"
OpenPOWER on IntegriCloud