diff options
author | Adrian Dudau <adrian.dudau@enea.com> | 2014-06-26 14:36:22 +0200 |
---|---|---|
committer | Adrian Dudau <adrian.dudau@enea.com> | 2014-06-26 15:32:53 +0200 |
commit | f4cf9fe05bb3f32fabea4e54dd92d368967a80da (patch) | |
tree | 487180fa9866985ea7b28e625651765d86f515c3 /meta/recipes-connectivity/portmap | |
download | poky-f4cf9fe05bb3f32fabea4e54dd92d368967a80da.tar.gz |
initial commit for Enea Linux 4.0
Migrated from the internal git server on the daisy-enea branch
Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
Diffstat (limited to 'meta/recipes-connectivity/portmap')
5 files changed, 200 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 0000000000..2fbf784b73 --- /dev/null +++ b/meta/recipes-connectivity/portmap/portmap-6.0/destdir-no-strip.patch | |||
@@ -0,0 +1,46 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | From: Mike Frysinger <vapier@gentoo.org> | ||
4 | Date: Sun, 13 May 2007 21:15:12 +0000 (-0400) | ||
5 | Subject: respect DESTDIR and dont use -s with install | ||
6 | X-Git-Url: http://neil.brown.name/git?p=portmap;a=commitdiff_plain;h=603c59b978c04df2354f68d4a2dc676a758ff46d | ||
7 | |||
8 | respect DESTDIR and dont use -s with install | ||
9 | |||
10 | $(DESTDIR) is the standard for installing into other trees, not $(BASEDIR) ... | ||
11 | so I've converted the Makefile to use that. I've also left in $(BASEDIR) as a | ||
12 | default to support old installs; not sure if you'd just cut it. | ||
13 | |||
14 | Stripping should be left to the person to handle, not automatically done by | ||
15 | the install step. Also, `install -s` always calls `strip` which is | ||
16 | wrong/undesired in cross-compiling scenarios. | ||
17 | |||
18 | Signed-off-by: Mike Frysinger <vapier@gentoo.org> | ||
19 | Signed-off-by: Neil Brown <neilb@suse.de> | ||
20 | --- | ||
21 | |||
22 | diff --git a/Makefile b/Makefile | ||
23 | index 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 0000000000..2f25058095 --- /dev/null +++ b/meta/recipes-connectivity/portmap/portmap-6.0/tcpd-config.patch | |||
@@ -0,0 +1,30 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | From: Mike Frysinger <vapier@gentoo.org> | ||
4 | Date: Sun, 13 May 2007 21:17:32 +0000 (-0400) | ||
5 | Subject: fix building with tcpd support disabled | ||
6 | X-Git-Url: http://neil.brown.name/git?p=portmap;a=commitdiff_plain;h=7847207aed1b44faf077eed14a9ac9c68244eba5 | ||
7 | |||
8 | fix building with tcpd support disabled | ||
9 | |||
10 | Make sure pmap_check.c only includes tcpd.h when HOSTS_ACCESS is defined. | ||
11 | |||
12 | Signed-off-by: Timothy Redaelli <drizzt@gentoo.org> | ||
13 | Signed-off-by: Mike Frysinger <vapier@gentoo.org> | ||
14 | Signed-off-by: Neil Brown <neilb@suse.de> | ||
15 | --- | ||
16 | |||
17 | diff --git a/pmap_check.c b/pmap_check.c | ||
18 | index 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 0000000000..7588341c8e --- /dev/null +++ b/meta/recipes-connectivity/portmap/portmap.inc | |||
@@ -0,0 +1,31 @@ | |||
1 | SUMMARY = "RPC program number mapper" | ||
2 | HOMEPAGE = "http://neil.brown.name/portmap/" | ||
3 | SECTION = "console/network" | ||
4 | LICENSE = "BSD" | ||
5 | LIC_FILES_CHKSUM = "file://portmap.c;beginline=2;endline=31;md5=51ff67e66ec84b2009b017b1f94afbf4 \ | ||
6 | file://from_local.c;beginline=9;endline=35;md5=1bec938a2268b8b423c58801ace3adc1" | ||
7 | DEPENDS = "virtual/fakeroot-native" | ||
8 | |||
9 | SRC_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 | S = "${WORKDIR}/portmap_5beta" | ||
14 | |||
15 | INITSCRIPT_NAME = "portmap" | ||
16 | INITSCRIPT_PARAMS = "start 43 S . start 32 0 6 . stop 81 1 ." | ||
17 | |||
18 | inherit update-rc.d | ||
19 | |||
20 | sbindir = "/sbin" | ||
21 | |||
22 | fakeroot do_install() { | ||
23 | install -d ${D}${sysconfdir}/init.d | ||
24 | install -d ${D}${base_sbindir} | ||
25 | install -m 0755 ${WORKDIR}/portmap.init ${D}${sysconfdir}/init.d/portmap | ||
26 | oe_runmake 'docdir=${docdir}/portmap' 'DESTDIR=${D}' install | ||
27 | } | ||
28 | |||
29 | PACKAGES =+ "portmap-utils" | ||
30 | FILES_portmap-utils = "/sbin/pmap_set /sbin/pmap_dump" | ||
31 | FILES_${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 0000000000..621aa171ae --- /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 | |||
17 | test -f /sbin/portmap || exit 0 | ||
18 | |||
19 | case "$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 | ;; | ||
64 | esac | ||
65 | |||
66 | exit 0 | ||
67 | |||
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 0000000000..68dd79625d --- /dev/null +++ b/meta/recipes-connectivity/portmap/portmap_6.0.bb | |||
@@ -0,0 +1,26 @@ | |||
1 | require portmap.inc | ||
2 | |||
3 | PR = "r9" | ||
4 | |||
5 | SRC_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 | |||
10 | SRC_URI[md5sum] = "ac108ab68bf0f34477f8317791aaf1ff" | ||
11 | SRC_URI[sha256sum] = "02c820d39f3e6e729d1bea3287a2d8a6c684f1006fb9612f97dcad4a281d41de" | ||
12 | |||
13 | S = "${WORKDIR}/${BPN}_${PV}/" | ||
14 | |||
15 | PACKAGECONFIG ??= "tcp-wrappers" | ||
16 | PACKAGECONFIG[tcp-wrappers] = ",,tcp-wrappers" | ||
17 | |||
18 | CPPFLAGS += "-DFACILITY=LOG_DAEMON -DENABLE_DNS -DHOSTS_ACCESS" | ||
19 | CFLAGS += "-Wall -Wstrict-prototypes -fPIC" | ||
20 | EXTRA_OEMAKE += "'NO_TCP_WRAPPER=${@base_contains('PACKAGECONFIG', 'tcp-wrappers', '', '1', d)}'" | ||
21 | |||
22 | fakeroot do_install() { | ||
23 | install -d ${D}${mandir}/man8/ ${D}${base_sbindir} ${D}${sysconfdir}/init.d | ||
24 | install -m 0755 ${WORKDIR}/portmap.init ${D}${sysconfdir}/init.d/portmap | ||
25 | oe_runmake install DESTDIR=${D} | ||
26 | } | ||