From 60f9d69e016b11c468c98ea75ba0a60c44afbbc4 Mon Sep 17 00:00:00 2001 From: Patrick Williams Date: Wed, 17 Aug 2016 14:31:25 -0500 Subject: yocto-poky: Move to import-layers subdir We are going to import additional layers, so create a subdir to hold all of the layers that we import with git-subtree. Change-Id: I6f732153a22be8ca663035c518837e3cc5ec0799 Signed-off-by: Patrick Williams --- .../meta/recipes-connectivity/portmap/portmap.inc | 17 ++++++ .../portmap/portmap/destdir-no-strip.patch | 46 +++++++++++++++ .../portmap/portmap/portmap.init | 67 ++++++++++++++++++++++ .../portmap/portmap/portmap.service | 10 ++++ .../portmap/portmap/tcpd-config.patch | 30 ++++++++++ .../recipes-connectivity/portmap/portmap_6.0.bb | 35 +++++++++++ 6 files changed, 205 insertions(+) create mode 100644 import-layers/yocto-poky/meta/recipes-connectivity/portmap/portmap.inc create mode 100644 import-layers/yocto-poky/meta/recipes-connectivity/portmap/portmap/destdir-no-strip.patch create mode 100755 import-layers/yocto-poky/meta/recipes-connectivity/portmap/portmap/portmap.init create mode 100644 import-layers/yocto-poky/meta/recipes-connectivity/portmap/portmap/portmap.service create mode 100644 import-layers/yocto-poky/meta/recipes-connectivity/portmap/portmap/tcpd-config.patch create mode 100644 import-layers/yocto-poky/meta/recipes-connectivity/portmap/portmap_6.0.bb (limited to 'import-layers/yocto-poky/meta/recipes-connectivity/portmap') diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/portmap/portmap.inc b/import-layers/yocto-poky/meta/recipes-connectivity/portmap/portmap.inc new file mode 100644 index 000000000..338af33a3 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-connectivity/portmap/portmap.inc @@ -0,0 +1,17 @@ +SUMMARY = "RPC program number mapper" +HOMEPAGE = "http://neil.brown.name/portmap/" +SECTION = "console/network" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://portmap.c;beginline=2;endline=31;md5=51ff67e66ec84b2009b017b1f94afbf4 \ + file://from_local.c;beginline=9;endline=35;md5=1bec938a2268b8b423c58801ace3adc1" + +INITSCRIPT_NAME = "portmap" +INITSCRIPT_PARAMS = "start 10 2 3 4 5 . stop 32 0 1 6 ." + +inherit update-rc.d systemd + +SYSTEMD_SERVICE_${PN} = "portmap.service" + +PACKAGES =+ "portmap-utils" +FILES_portmap-utils = "${base_sbindir}/pmap_set ${base_sbindir}/pmap_dump" +FILES_${PN}-doc += "${docdir}" diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/portmap/portmap/destdir-no-strip.patch b/import-layers/yocto-poky/meta/recipes-connectivity/portmap/portmap/destdir-no-strip.patch new file mode 100644 index 000000000..2fbf784b7 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-connectivity/portmap/portmap/destdir-no-strip.patch @@ -0,0 +1,46 @@ +Upstream-Status: Backport + +From: Mike Frysinger +Date: Sun, 13 May 2007 21:15:12 +0000 (-0400) +Subject: respect DESTDIR and dont use -s with install +X-Git-Url: http://neil.brown.name/git?p=portmap;a=commitdiff_plain;h=603c59b978c04df2354f68d4a2dc676a758ff46d + +respect DESTDIR and dont use -s with install + +$(DESTDIR) is the standard for installing into other trees, not $(BASEDIR) ... +so I've converted the Makefile to use that. I've also left in $(BASEDIR) as a +default to support old installs; not sure if you'd just cut it. + +Stripping should be left to the person to handle, not automatically done by +the install step. Also, `install -s` always calls `strip` which is +wrong/undesired in cross-compiling scenarios. + +Signed-off-by: Mike Frysinger +Signed-off-by: Neil Brown +--- + +diff --git a/Makefile b/Makefile +index 9e9a4b4..5343428 100644 +--- a/Makefile ++++ b/Makefile +@@ -135,13 +135,14 @@ from_local: CPPFLAGS += -DTEST + portmap.man : portmap.8 + sed $(MAN_SED) < portmap.8 > portmap.man + ++DESTDIR = $(BASEDIR) + install: all +- install -o root -g root -m 0755 -s portmap ${BASEDIR}/sbin +- install -o root -g root -m 0755 -s pmap_dump ${BASEDIR}/sbin +- install -o root -g root -m 0755 -s pmap_set ${BASEDIR}/sbin +- install -o root -g root -m 0644 portmap.man ${BASEDIR}/usr/share/man/man8/portmap.8 +- install -o root -g root -m 0644 pmap_dump.8 ${BASEDIR}/usr/share/man/man8 +- install -o root -g root -m 0644 pmap_set.8 ${BASEDIR}/usr/share/man/man8 ++ install -o root -g root -m 0755 portmap $(DESTDIR)/sbin ++ install -o root -g root -m 0755 pmap_dump $(DESTDIR)/sbin ++ install -o root -g root -m 0755 pmap_set $(DESTDIR)/sbin ++ install -o root -g root -m 0644 portmap.man $(DESTDIR)/usr/share/man/man8/portmap.8 ++ install -o root -g root -m 0644 pmap_dump.8 $(DESTDIR)/usr/share/man/man8 ++ install -o root -g root -m 0644 pmap_set.8 $(DESTDIR)/usr/share/man/man8 + + clean: + rm -f *.o portmap pmap_dump pmap_set from_local \ diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/portmap/portmap/portmap.init b/import-layers/yocto-poky/meta/recipes-connectivity/portmap/portmap/portmap.init new file mode 100755 index 000000000..621aa171a --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-connectivity/portmap/portmap/portmap.init @@ -0,0 +1,67 @@ +#!/bin/sh +# +### BEGIN INIT INFO +# Provides: portmap +# Required-Start: $network +# Required-Stop: $network +# Default-Start: S 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: The RPC portmapper +# Description: Portmap is a server that converts RPC (Remote +# Procedure Call) program numbers into DARPA +# protocol port numbers. It must be running in +# order to make RPC calls. Services that use +# RPC include NFS and NIS. +### END INIT INFO + +test -f /sbin/portmap || exit 0 + +case "$1" in + start) + echo "Starting portmap daemon..." + start-stop-daemon --start --quiet --exec /sbin/portmap + + if [ -f /var/run/portmap.upgrade-state ]; then + echo "Restoring old RPC service information..." + sleep 1 # needs a short pause or pmap_set won't work. :( + pmap_set /var/run/portmap.state + $0 stop + $0 start + if [ $do_state -eq 1 ]; then + if [ ! -f /var/run/portmap.upgrade-state ]; then + sleep 1 + pmap_set +Date: Sun, 13 May 2007 21:17:32 +0000 (-0400) +Subject: fix building with tcpd support disabled +X-Git-Url: http://neil.brown.name/git?p=portmap;a=commitdiff_plain;h=7847207aed1b44faf077eed14a9ac9c68244eba5 + +fix building with tcpd support disabled + +Make sure pmap_check.c only includes tcpd.h when HOSTS_ACCESS is defined. + +Signed-off-by: Timothy Redaelli +Signed-off-by: Mike Frysinger +Signed-off-by: Neil Brown +--- + +diff --git a/pmap_check.c b/pmap_check.c +index 84f2c12..443a822 100644 +--- a/pmap_check.c ++++ b/pmap_check.c +@@ -44,7 +44,9 @@ + #include + #include + #endif ++#ifdef HOSTS_ACCESS + #include ++#endif + #include + #include + diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/portmap/portmap_6.0.bb b/import-layers/yocto-poky/meta/recipes-connectivity/portmap/portmap_6.0.bb new file mode 100644 index 000000000..999b4a937 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-connectivity/portmap/portmap_6.0.bb @@ -0,0 +1,35 @@ +require portmap.inc + +DEPENDS_append_libc-musl = " libtirpc " + +PR = "r9" + +SRC_URI = "http://www.sourcefiles.org/Networking/Tools/Miscellanenous/portmap-6.0.tgz \ + file://destdir-no-strip.patch \ + file://tcpd-config.patch \ + file://portmap.init \ + file://portmap.service" + +SRC_URI[md5sum] = "ac108ab68bf0f34477f8317791aaf1ff" +SRC_URI[sha256sum] = "02c820d39f3e6e729d1bea3287a2d8a6c684f1006fb9612f97dcad4a281d41de" + +S = "${WORKDIR}/${BPN}_${PV}/" + +PACKAGECONFIG ??= "tcp-wrappers" +PACKAGECONFIG[tcp-wrappers] = ",,tcp-wrappers" + +CPPFLAGS += "-DFACILITY=LOG_DAEMON -DENABLE_DNS -DHOSTS_ACCESS" +CFLAGS += "-Wall -Wstrict-prototypes -fPIC" +EXTRA_OEMAKE += "'NO_TCP_WRAPPER=${@bb.utils.contains('PACKAGECONFIG', 'tcp-wrappers', '', '1', d)}'" +CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc " +LDFLAGS_append_libc-musl = " -ltirpc " + +do_install() { + install -d ${D}${mandir}/man8/ ${D}${base_sbindir} ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/portmap.init ${D}${sysconfdir}/init.d/portmap + oe_runmake install DESTDIR=${D} + + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/portmap.service ${D}${systemd_unitdir}/system + sed -i -e 's,@BASE_SBINDIR@,${base_sbindir},g' ${D}${systemd_unitdir}/system/portmap.service +} -- cgit v1.2.1