summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/portmap
diff options
context:
space:
mode:
authorTudor Florea <tudor.florea@enea.com>2015-10-09 20:59:03 (GMT)
committerTudor Florea <tudor.florea@enea.com>2015-10-09 20:59:03 (GMT)
commit972dcfcdbfe75dcfeb777150c136576cf1a71e99 (patch)
tree97a61cd7e293d7ae9d56ef7ed0f81253365bb026 /meta/recipes-connectivity/portmap
downloadpoky-972dcfcdbfe75dcfeb777150c136576cf1a71e99.tar.gz
initial commit for Enea Linux 5.0 arm
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta/recipes-connectivity/portmap')
-rw-r--r--meta/recipes-connectivity/portmap/portmap-6.0/destdir-no-strip.patch46
-rw-r--r--meta/recipes-connectivity/portmap/portmap-6.0/tcpd-config.patch30
-rw-r--r--meta/recipes-connectivity/portmap/portmap.inc34
-rwxr-xr-xmeta/recipes-connectivity/portmap/portmap/portmap.init67
-rw-r--r--meta/recipes-connectivity/portmap/portmap/portmap.service10
-rw-r--r--meta/recipes-connectivity/portmap/portmap_6.0.bb31
6 files changed, 218 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/portmap/portmap-6.0/destdir-no-strip.patch b/meta/recipes-connectivity/portmap/portmap-6.0/destdir-no-strip.patch
new file mode 100644
index 0000000..2fbf784
--- /dev/null
+++ b/meta/recipes-connectivity/portmap/portmap-6.0/destdir-no-strip.patch
@@ -0,0 +1,46 @@
1Upstream-Status: Backport
2
3From: Mike Frysinger <vapier@gentoo.org>
4Date: Sun, 13 May 2007 21:15:12 +0000 (-0400)
5Subject: respect DESTDIR and dont use -s with install
6X-Git-Url: http://neil.brown.name/git?p=portmap;a=commitdiff_plain;h=603c59b978c04df2354f68d4a2dc676a758ff46d
7
8respect DESTDIR and dont use -s with install
9
10$(DESTDIR) is the standard for installing into other trees, not $(BASEDIR) ...
11so I've converted the Makefile to use that. I've also left in $(BASEDIR) as a
12default to support old installs; not sure if you'd just cut it.
13
14Stripping should be left to the person to handle, not automatically done by
15the install step. Also, `install -s` always calls `strip` which is
16wrong/undesired in cross-compiling scenarios.
17
18Signed-off-by: Mike Frysinger <vapier@gentoo.org>
19Signed-off-by: Neil Brown <neilb@suse.de>
20---
21
22diff --git a/Makefile b/Makefile
23index 9e9a4b4..5343428 100644
24--- a/Makefile
25+++ b/Makefile
26@@ -135,13 +135,14 @@ from_local: CPPFLAGS += -DTEST
27 portmap.man : portmap.8
28 sed $(MAN_SED) < portmap.8 > portmap.man
29
30+DESTDIR = $(BASEDIR)
31 install: all
32- install -o root -g root -m 0755 -s portmap ${BASEDIR}/sbin
33- install -o root -g root -m 0755 -s pmap_dump ${BASEDIR}/sbin
34- install -o root -g root -m 0755 -s pmap_set ${BASEDIR}/sbin
35- install -o root -g root -m 0644 portmap.man ${BASEDIR}/usr/share/man/man8/portmap.8
36- install -o root -g root -m 0644 pmap_dump.8 ${BASEDIR}/usr/share/man/man8
37- install -o root -g root -m 0644 pmap_set.8 ${BASEDIR}/usr/share/man/man8
38+ install -o root -g root -m 0755 portmap $(DESTDIR)/sbin
39+ install -o root -g root -m 0755 pmap_dump $(DESTDIR)/sbin
40+ install -o root -g root -m 0755 pmap_set $(DESTDIR)/sbin
41+ install -o root -g root -m 0644 portmap.man $(DESTDIR)/usr/share/man/man8/portmap.8
42+ install -o root -g root -m 0644 pmap_dump.8 $(DESTDIR)/usr/share/man/man8
43+ install -o root -g root -m 0644 pmap_set.8 $(DESTDIR)/usr/share/man/man8
44
45 clean:
46 rm -f *.o portmap pmap_dump pmap_set from_local \
diff --git a/meta/recipes-connectivity/portmap/portmap-6.0/tcpd-config.patch b/meta/recipes-connectivity/portmap/portmap-6.0/tcpd-config.patch
new file mode 100644
index 0000000..2f25058
--- /dev/null
+++ b/meta/recipes-connectivity/portmap/portmap-6.0/tcpd-config.patch
@@ -0,0 +1,30 @@
1Upstream-Status: Backport
2
3From: Mike Frysinger <vapier@gentoo.org>
4Date: Sun, 13 May 2007 21:17:32 +0000 (-0400)
5Subject: fix building with tcpd support disabled
6X-Git-Url: http://neil.brown.name/git?p=portmap;a=commitdiff_plain;h=7847207aed1b44faf077eed14a9ac9c68244eba5
7
8fix building with tcpd support disabled
9
10Make sure pmap_check.c only includes tcpd.h when HOSTS_ACCESS is defined.
11
12Signed-off-by: Timothy Redaelli <drizzt@gentoo.org>
13Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14Signed-off-by: Neil Brown <neilb@suse.de>
15---
16
17diff --git a/pmap_check.c b/pmap_check.c
18index 84f2c12..443a822 100644
19--- a/pmap_check.c
20+++ b/pmap_check.c
21@@ -44,7 +44,9 @@
22 #include <netinet/in.h>
23 #include <rpc/rpcent.h>
24 #endif
25+#ifdef HOSTS_ACCESS
26 #include <tcpd.h>
27+#endif
28 #include <arpa/inet.h>
29 #include <grp.h>
30
diff --git a/meta/recipes-connectivity/portmap/portmap.inc b/meta/recipes-connectivity/portmap/portmap.inc
new file mode 100644
index 0000000..f5f7fde
--- /dev/null
+++ b/meta/recipes-connectivity/portmap/portmap.inc
@@ -0,0 +1,34 @@
1SUMMARY = "RPC program number mapper"
2HOMEPAGE = "http://neil.brown.name/portmap/"
3SECTION = "console/network"
4LICENSE = "BSD"
5LIC_FILES_CHKSUM = "file://portmap.c;beginline=2;endline=31;md5=51ff67e66ec84b2009b017b1f94afbf4 \
6 file://from_local.c;beginline=9;endline=35;md5=1bec938a2268b8b423c58801ace3adc1"
7DEPENDS = "virtual/fakeroot-native"
8
9SRC_URI = "${DEBIAN_MIRROR}/main/p/portmap/portmap_5.orig.tar.gz \
10 ${DEBIAN_MIRROR}/main/p/portmap/portmap_${PV}.diff.gz \
11 file://portmap.init \
12 file://make.patch;apply=yes"
13
14S = "${WORKDIR}/portmap_5beta"
15
16INITSCRIPT_NAME = "portmap"
17INITSCRIPT_PARAMS = "start 10 2 3 4 5 . stop 32 0 1 6 ."
18
19inherit update-rc.d systemd
20
21SYSTEMD_SERVICE_${PN} = "portmap.service"
22
23sbindir = "/sbin"
24
25fakeroot do_install() {
26 install -d ${D}${sysconfdir}/init.d
27 install -d ${D}${base_sbindir}
28 install -m 0755 ${WORKDIR}/portmap.init ${D}${sysconfdir}/init.d/portmap
29 oe_runmake 'docdir=${docdir}/portmap' 'DESTDIR=${D}' install
30}
31
32PACKAGES =+ "portmap-utils"
33FILES_portmap-utils = "/sbin/pmap_set /sbin/pmap_dump"
34FILES_${PN}-doc += "${docdir}"
diff --git a/meta/recipes-connectivity/portmap/portmap/portmap.init b/meta/recipes-connectivity/portmap/portmap/portmap.init
new file mode 100755
index 0000000..621aa17
--- /dev/null
+++ b/meta/recipes-connectivity/portmap/portmap/portmap.init
@@ -0,0 +1,67 @@
1#!/bin/sh
2#
3### BEGIN INIT INFO
4# Provides: portmap
5# Required-Start: $network
6# Required-Stop: $network
7# Default-Start: S 2 3 4 5
8# Default-Stop: 0 1 6
9# Short-Description: The RPC portmapper
10# Description: Portmap is a server that converts RPC (Remote
11# Procedure Call) program numbers into DARPA
12# protocol port numbers. It must be running in
13# order to make RPC calls. Services that use
14# RPC include NFS and NIS.
15### END INIT INFO
16
17test -f /sbin/portmap || exit 0
18
19case "$1" in
20 start)
21 echo "Starting portmap daemon..."
22 start-stop-daemon --start --quiet --exec /sbin/portmap
23
24 if [ -f /var/run/portmap.upgrade-state ]; then
25 echo "Restoring old RPC service information..."
26 sleep 1 # needs a short pause or pmap_set won't work. :(
27 pmap_set </var/run/portmap.upgrade-state
28 rm -f /var/run/portmap.upgrade-state
29 echo "done."
30 fi
31
32 ;;
33 stop)
34 echo "Stopping portmap daemon..."
35 start-stop-daemon --stop --quiet --exec /sbin/portmap
36 ;;
37 reload)
38 ;;
39 force-reload)
40 $0 restart
41 ;;
42 restart)
43 # pmap_dump and pmap_set may be in a different package and not installed...
44 if [ -f /sbin/pmap_dump -a -f /sbin/pmap_set ]; then
45 do_state=1
46 else
47 do_state=0
48 fi
49 [ $do_state -eq 1 ] && pmap_dump >/var/run/portmap.state
50 $0 stop
51 $0 start
52 if [ $do_state -eq 1 ]; then
53 if [ ! -f /var/run/portmap.upgrade-state ]; then
54 sleep 1
55 pmap_set </var/run/portmap.state
56 fi
57 rm -f /var/run/portmap.state
58 fi
59 ;;
60 *)
61 echo "Usage: /etc/init.d/portmap {start|stop|reload|restart}"
62 exit 1
63 ;;
64esac
65
66exit 0
67
diff --git a/meta/recipes-connectivity/portmap/portmap/portmap.service b/meta/recipes-connectivity/portmap/portmap/portmap.service
new file mode 100644
index 0000000..7ef9d7b
--- /dev/null
+++ b/meta/recipes-connectivity/portmap/portmap/portmap.service
@@ -0,0 +1,10 @@
1[Unit]
2Description=The RPC portmapper
3After=network.target
4
5[Service]
6Type=forking
7ExecStart=@BASE_SBINDIR@/portmap
8
9[Install]
10WantedBy=multi-user.target
diff --git a/meta/recipes-connectivity/portmap/portmap_6.0.bb b/meta/recipes-connectivity/portmap/portmap_6.0.bb
new file mode 100644
index 0000000..8b65a03
--- /dev/null
+++ b/meta/recipes-connectivity/portmap/portmap_6.0.bb
@@ -0,0 +1,31 @@
1require portmap.inc
2
3PR = "r9"
4
5SRC_URI = "http://www.sourcefiles.org/Networking/Tools/Miscellanenous/portmap-6.0.tgz \
6 file://destdir-no-strip.patch \
7 file://tcpd-config.patch \
8 file://portmap.init \
9 file://portmap.service"
10
11SRC_URI[md5sum] = "ac108ab68bf0f34477f8317791aaf1ff"
12SRC_URI[sha256sum] = "02c820d39f3e6e729d1bea3287a2d8a6c684f1006fb9612f97dcad4a281d41de"
13
14S = "${WORKDIR}/${BPN}_${PV}/"
15
16PACKAGECONFIG ??= "tcp-wrappers"
17PACKAGECONFIG[tcp-wrappers] = ",,tcp-wrappers"
18
19CPPFLAGS += "-DFACILITY=LOG_DAEMON -DENABLE_DNS -DHOSTS_ACCESS"
20CFLAGS += "-Wall -Wstrict-prototypes -fPIC"
21EXTRA_OEMAKE += "'NO_TCP_WRAPPER=${@bb.utils.contains('PACKAGECONFIG', 'tcp-wrappers', '', '1', d)}'"
22
23fakeroot do_install() {
24 install -d ${D}${mandir}/man8/ ${D}${base_sbindir} ${D}${sysconfdir}/init.d
25 install -m 0755 ${WORKDIR}/portmap.init ${D}${sysconfdir}/init.d/portmap
26 oe_runmake install DESTDIR=${D}
27
28 install -d ${D}${systemd_unitdir}/system
29 install -m 0644 ${WORKDIR}/portmap.service ${D}${systemd_unitdir}/system
30 sed -i -e 's,@BASE_SBINDIR@,${base_sbindir},g' ${D}${systemd_unitdir}/system/portmap.service
31}