From eb8dc40360f0cfef56fb6947cc817a547d6d9bc6 Mon Sep 17 00:00:00 2001 From: Dave Cobbley Date: Tue, 14 Aug 2018 10:05:37 -0700 Subject: [Subtree] Removing import-layers directory As part of the move to subtrees, need to bring all the import layers content to the top level. Change-Id: I4a163d10898cbc6e11c27f776f60e1a470049d8f Signed-off-by: Dave Cobbley Signed-off-by: Brad Bishop --- ...001-Add-missing-include-path-to-I-options.patch | 46 ++++++++++++ .../0002-Fix-build-issues-found-with-musl.patch | 71 ++++++++++++++++++ .../recipes-netkit/netkit-rwho/netkit-rwho/rwhod | 71 ++++++++++++++++++ .../netkit-rwho/netkit-rwho/rwhod.default | 2 + .../recipes-netkit/netkit-rwho/netkit-rwho_0.17.bb | 85 ++++++++++++++++++++++ 5 files changed, 275 insertions(+) create mode 100644 meta-openembedded/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/0001-Add-missing-include-path-to-I-options.patch create mode 100644 meta-openembedded/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/0002-Fix-build-issues-found-with-musl.patch create mode 100755 meta-openembedded/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/rwhod create mode 100644 meta-openembedded/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho/rwhod.default create mode 100644 meta-openembedded/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho_0.17.bb (limited to 'meta-openembedded/meta-networking/recipes-netkit/netkit-rwho') 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 0000000000..b1325b3173 --- /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 +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 +| ^~~~~~~~~~~~~~~~~~~ + +Signed-off-by: Khem Raj +--- +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 0000000000..717b4d73f4 --- /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 +Date: Wed, 30 Aug 2017 18:13:17 -0700 +Subject: [PATCH 2/2] Fix build issues found with musl + +Signed-off-by: Khem Raj +--- +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 + #include + #include ++#include + + 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 + #include + #include ++#include + #include + + #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 + #include + #include ++#include + + #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 0000000000..f6419032e8 --- /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 0000000000..62d3a942d0 --- /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" diff --git a/meta-openembedded/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho_0.17.bb b/meta-openembedded/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho_0.17.bb new file mode 100644 index 0000000000..5685f03d62 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-netkit/netkit-rwho/netkit-rwho_0.17.bb @@ -0,0 +1,85 @@ +DESCRIPTION = "netkit-rwho includes, ruptime rwho and rwhod (Daemon to maintain data for rwho/ruptime)" +HOMEPAGE = "ftp://ftp.uk.linux.org/pub/linux/Networking/netkit" +SECTION = "net" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://rwho/rwho.c;beginline=2;endline=3;md5=5a85f13c0142d72fc378e00f15da5b9e" + +SRC_URI = "${DEBIAN_MIRROR}/main/n/netkit-rwho/netkit-rwho_${PV}.orig.tar.gz;name=archive \ + ${DEBIAN_MIRROR}/main/n/netkit-rwho/netkit-rwho_${PV}-13.debian.tar.gz;name=patch13 \ + file://rwhod \ + file://rwhod.default \ + file://0001-Add-missing-include-path-to-I-options.patch \ + file://0002-Fix-build-issues-found-with-musl.patch \ + " +SRC_URI[archive.md5sum] = "0f71620d45d472f89134ba0d74242e75" +SRC_URI[archive.sha256sum] = "0409e2ce4bfdb2dacb2c193d0fedfc49bb975cb057c5c6b0ffcca603a1188da7" +SRC_URI[patch13.md5sum] = "82ed5a3c6b0bbf00b36508b9787963b9" +SRC_URI[patch13.sha256sum] = "53aefa27d98b565bf756db57120c03bd224a238e45699d92076420272a6eba8e" + +inherit autotools-brokensep useradd update-rc.d update-alternatives + +CFLAGS += " -D_GNU_SOURCE" + +debian_do_patch() { + cd ${S} + while read line; do patch -p1 < ${WORKDIR}/debian/patches/$line; done < ${WORKDIR}/debian/patches/series +} + +python do_patch() { + bb.build.exec_func('debian_do_patch', d) + bb.build.exec_func('patch_do_patch', d) +} + +do_configure () { + ./configure --prefix=${prefix} + echo "LDFLAGS=${LDFLAGS}" >> MCONFIG +} + +do_install () { + # rwho & ruptime + install -d ${D}${bindir} + install -d ${D}${mandir}/man1 + #rwhod + install -d ${D}${sbindir} + install -d ${D}${mandir}/man8 + install -d ${D}${sysconfdir}/init.d + install -d ${D}${sysconfdir}/default + sed -i 's/install -s/install/' rwho/Makefile + sed -i 's/install -s/install/' ruptime/Makefile + sed -i 's/install -s/install/' rwhod/Makefile + oe_runmake 'INSTALLROOT=${D}' 'BINMODE=0755' \ + 'DAEMONMODE=0755' 'MANMODE=0644' \ + 'BINDIR=${bindir}' 'SBINDIR=${sbindir}' \ + 'MANDIR=${mandir}' install + + install -m 0644 ${WORKDIR}/rwhod.default ${D}${sysconfdir}/default/rwhod + install -m 755 ${WORKDIR}/rwhod ${D}${sysconfdir}/init.d + + mkdir -p -m 755 ${D}${localstatedir}/spool/rwho + chown -R rwhod ${D}${localstatedir}/spool/rwho +} + +pkg_postinst_${PN}-server() { + ${sysconfdir}/init.d/rwhod start +} + +pkg_postrm_${PN}-server() { + ${sysconfdir}/init.d/rwhod stop +} + +INITSCRIPT_NAME = "rwhod" +INITSCRIPT_PARAM = "defaults 85 15" + +USERADD_PACKAGES = "${PN}-server" +GROUPADD_PARAM_${PN}-server = "--system rwhod" +USERADD_PARAM_${PN}-server = "--system -g rwhod --home-dir ${localstatedir}/spool/rwho \ + --no-create-home --shell /bin/false rwhod" + +INSANE_SKIP_${PN} = "already-stripped" + +PACKAGES = "${PN}-client ${PN}-server ${PN}-doc ${BPN}-dbg" +FILES_${PN}-client = "${bindir}/*" +FILES_${PN}-server = "${sbindir}/* ${localstatedir} ${sysconfdir}/default/* ${sysconfdir}/init.d/*" +FILES_${PN}-doc = "${mandir}" +FILES_${PN}-dbg = "${prefix}/src/debug \ + ${bindir}/.debug ${sbindir}/.debug" -- cgit v1.2.3