diff options
Diffstat (limited to 'meta/packages/portmap')
-rw-r--r-- | meta/packages/portmap/files/make.patch | 83 | ||||
-rw-r--r-- | meta/packages/portmap/files/no-libwrap.patch | 26 | ||||
-rwxr-xr-x | meta/packages/portmap/files/portmap.init | 50 | ||||
-rw-r--r-- | meta/packages/portmap/portmap_5-9.bb | 33 |
4 files changed, 192 insertions, 0 deletions
diff --git a/meta/packages/portmap/files/make.patch b/meta/packages/portmap/files/make.patch new file mode 100644 index 0000000000..2b83130437 --- /dev/null +++ b/meta/packages/portmap/files/make.patch | |||
@@ -0,0 +1,83 @@ | |||
1 | |||
2 | # | ||
3 | # Patch managed by http://www.holgerschurig.de/patcher.html | ||
4 | # | ||
5 | |||
6 | --- portmap_5beta/Makefile~make.patch | ||
7 | +++ portmap_5beta/Makefile | ||
8 | @@ -105,6 +105,13 @@ | ||
9 | # | ||
10 | #CONST = -Dconst= | ||
11 | |||
12 | +DESTDIR = | ||
13 | +prefix = /usr | ||
14 | +sbindir = /sbin | ||
15 | +datadir = $(prefix)/share | ||
16 | +mandir = $(datadir)/man | ||
17 | +docdir = $(datadir)/doc/portmap | ||
18 | + | ||
19 | ### End of configurable stuff. | ||
20 | ############################## | ||
21 | |||
22 | @@ -122,35 +129,38 @@ | ||
23 | COPT = $(CONST) $(HOSTS_ACCESS) $(CHECK_PORT) \ | ||
24 | $(SYS) -DFACILITY=$(FACILITY) $(ULONG) $(ZOMBIES) $(SA_LEN) \ | ||
25 | $(LOOPBACK) $(SETPGRP) | ||
26 | -CFLAGS = -Wall $(COPT) -O2 $(NSARCHS) | ||
27 | +CFLAGS = -Wall -O2 $(NSARCHS) | ||
28 | OBJECTS = portmap.o pmap_check.o from_local.o $(AUX) | ||
29 | |||
30 | all: portmap pmap_dump pmap_set | ||
31 | |||
32 | portmap: $(OBJECTS) # $(WRAP_DIR)/libwrap.a | ||
33 | - $(CC) $(CFLAGS) -o $@ $(OBJECTS) $(WRAP_LIB) $(LIBS) | ||
34 | + $(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(WRAP_LIB) $(LIBS) | ||
35 | |||
36 | -pmap_dump: pmap_dump.c | ||
37 | - $(CC) $(CFLAGS) -o $@ $? $(LIBS) | ||
38 | +pmap_dump: pmap_dump.o | ||
39 | + $(CC) $(LDFLAGS) -o $@ $? $(LIBS) | ||
40 | |||
41 | -pmap_set: pmap_set.c | ||
42 | - $(CC) $(CFLAGS) -o $@ $? $(LIBS) | ||
43 | +pmap_set: pmap_set.o | ||
44 | + $(CC) $(LDFLAGS) -o $@ $? $(LIBS) | ||
45 | |||
46 | from_local: from_local.c | ||
47 | - cc $(CFLAGS) -DTEST -o $@ from_local.c | ||
48 | + $(CC) $(COPT) -DTEST $(CFLAGS) $(LDFLAGS) -o $@ from_local.c | ||
49 | |||
50 | get_myaddress: get_myaddress.c | ||
51 | - cc $(CFLAGS) -DTEST -o $@ get_myaddress.c $(LIBS) | ||
52 | + $(CC) $(COPT) -DTEST $(CFLAGS) $(LDFLAGS) -o $@ get_myaddress.c $(LIBS) | ||
53 | |||
54 | install: all | ||
55 | - install -o root -g root -m 0755 -s portmap ${BASEDIR}/sbin | ||
56 | - install -o root -g root -m 0755 -s pmap_dump ${BASEDIR}/sbin | ||
57 | - install -o root -g root -m 0755 -s pmap_set ${BASEDIR}/sbin | ||
58 | - install -o root -g root -m 0644 portmap.8 ${BASEDIR}/usr/share/man/man8 | ||
59 | - install -o root -g root -m 0644 pmap_dump.8 ${BASEDIR}/usr/share/man/man8 | ||
60 | - install -o root -g root -m 0644 pmap_set.8 ${BASEDIR}/usr/share/man/man8 | ||
61 | - cat BLURB >${BASEDIR}/usr/share/doc/portmap/portmapper.txt | ||
62 | - gzip -9f ${BASEDIR}/usr/share/doc/portmap/portmapper.txt | ||
63 | + install -d $(DESTDIR)/$(sbindir) \ | ||
64 | + $(DESTDIR)/$(docdir) \ | ||
65 | + $(DESTDIR)/$(mandir)/man8 | ||
66 | + install -m 0755 portmap $(DESTDIR)/$(sbindir) | ||
67 | + install -m 0755 pmap_dump $(DESTDIR)/$(sbindir) | ||
68 | + install -m 0755 pmap_set $(DESTDIR)/$(sbindir) | ||
69 | + install -m 0644 portmap.8 $(DESTDIR)/$(mandir)/man8 | ||
70 | + install -m 0644 pmap_dump.8 $(DESTDIR)/$(mandir)/man8 | ||
71 | + install -m 0644 pmap_set.8 $(DESTDIR)/$(mandir)/man8 | ||
72 | + cat BLURB >$(DESTDIR)/$(docdir)/portmapper.txt | ||
73 | + gzip -9f $(DESTDIR)/$(docdir)/portmapper.txt | ||
74 | |||
75 | |||
76 | lint: | ||
77 | @@ -176,3 +186,6 @@ | ||
78 | portmap.o: portmap.c | ||
79 | portmap.o: pmap_check.h Makefile | ||
80 | strerror.o: strerror.c | ||
81 | + | ||
82 | +%.o: %.c | ||
83 | + $(CC) $(COPT) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $*.c -o $*.o | ||
diff --git a/meta/packages/portmap/files/no-libwrap.patch b/meta/packages/portmap/files/no-libwrap.patch new file mode 100644 index 0000000000..751200bf12 --- /dev/null +++ b/meta/packages/portmap/files/no-libwrap.patch | |||
@@ -0,0 +1,26 @@ | |||
1 | --- Makefile~ 2004-06-03 11:19:23.000000000 +0100 | ||
2 | +++ Makefile 2004-06-03 11:24:53.000000000 +0100 | ||
3 | @@ -15,9 +15,9 @@ | ||
4 | # no access control tables. The local system, since it runs the portmap | ||
5 | # daemon, is always treated as an authorized host. | ||
6 | |||
7 | -HOSTS_ACCESS= -DHOSTS_ACCESS | ||
8 | +#HOSTS_ACCESS= -DHOSTS_ACCESS | ||
9 | #WRAP_LIB = $(WRAP_DIR)/libwrap.a | ||
10 | -WRAP_LIB = -lwrap | ||
11 | +#WRAP_LIB = -lwrap | ||
12 | |||
13 | # Comment out if your RPC library does not allocate privileged ports for | ||
14 | # requests from processes with root privilege, or the new portmap will | ||
15 | --- pmap_check.c~ 2004-06-03 11:24:20.000000000 +0100 | ||
16 | +++ pmap_check.c 2004-06-03 11:24:33.000000000 +0100 | ||
17 | @@ -48,7 +48,9 @@ | ||
18 | #endif | ||
19 | #include <sys/types.h> | ||
20 | #include <unistd.h> | ||
21 | +#ifdef HOSTS_ACCESS | ||
22 | #include <tcpd.h> | ||
23 | +#endif | ||
24 | |||
25 | extern char *inet_ntoa(); | ||
26 | |||
diff --git a/meta/packages/portmap/files/portmap.init b/meta/packages/portmap/files/portmap.init new file mode 100755 index 0000000000..6dac207350 --- /dev/null +++ b/meta/packages/portmap/files/portmap.init | |||
@@ -0,0 +1,50 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | # start/stop portmap daemon. | ||
4 | |||
5 | test -f /sbin/portmap || exit 0 | ||
6 | |||
7 | case "$1" in | ||
8 | start) | ||
9 | echo -n "Starting portmap daemon:" | ||
10 | echo -n " portmap" | ||
11 | start-stop-daemon --start --quiet --exec /sbin/portmap | ||
12 | echo "." | ||
13 | |||
14 | if [ -f /var/run/portmap.upgrade-state ]; then | ||
15 | echo -n "Restoring old RPC service information..." | ||
16 | sleep 1 # needs a short pause or pmap_set won't work. :( | ||
17 | pmap_set </var/run/portmap.upgrade-state | ||
18 | rm -f /var/run/portmap.upgrade-state | ||
19 | echo "done." | ||
20 | fi | ||
21 | |||
22 | ;; | ||
23 | stop) | ||
24 | echo -n "Stopping portmap daemon:" | ||
25 | echo -n " portmap" ; start-stop-daemon --stop --quiet --exec /sbin/portmap | ||
26 | echo "." | ||
27 | ;; | ||
28 | reload) | ||
29 | ;; | ||
30 | force-reload) | ||
31 | $0 restart | ||
32 | ;; | ||
33 | restart) | ||
34 | pmap_dump >/var/run/portmap.state | ||
35 | $0 stop | ||
36 | $0 start | ||
37 | if [ ! -f /var/run/portmap.upgrade-state ]; then | ||
38 | sleep 1 | ||
39 | pmap_set </var/run/portmap.state | ||
40 | fi | ||
41 | rm -f /var/run/portmap.state | ||
42 | ;; | ||
43 | *) | ||
44 | echo "Usage: /etc/init.d/portmap {start|stop|reload|restart}" | ||
45 | exit 1 | ||
46 | ;; | ||
47 | esac | ||
48 | |||
49 | exit 0 | ||
50 | |||
diff --git a/meta/packages/portmap/portmap_5-9.bb b/meta/packages/portmap/portmap_5-9.bb new file mode 100644 index 0000000000..76d66e9ad9 --- /dev/null +++ b/meta/packages/portmap/portmap_5-9.bb | |||
@@ -0,0 +1,33 @@ | |||
1 | DESCRIPTION = "RPC program number mapper." | ||
2 | SECTION = "console/network" | ||
3 | LICENSE = "GPL" | ||
4 | PR = "r5" | ||
5 | |||
6 | SRC_URI = "http://www.uk.debian.org/debian/pool/main/p/portmap/portmap_5.orig.tar.gz \ | ||
7 | http://www.uk.debian.org/debian/pool/main/p/portmap/portmap_${PV}.diff.gz;patch=1 \ | ||
8 | file://no-libwrap.patch;patch=1;pnum=0 \ | ||
9 | file://portmap.init \ | ||
10 | file://make.patch;patch=1" | ||
11 | S = "${WORKDIR}/portmap_5beta" | ||
12 | |||
13 | PACKAGES =+ "portmap-utils" | ||
14 | FILES_portmap-utils = "/sbin/pmap_set /sbin/pmap_dump" | ||
15 | FILES_${PN}-doc += "${docdir}" | ||
16 | |||
17 | INITSCRIPT_NAME = "portmap" | ||
18 | INITSCRIPT_PARAMS = "start 43 S . start 32 0 6 . stop 81 1 ." | ||
19 | |||
20 | inherit update-rc.d | ||
21 | |||
22 | sbindir = "/sbin" | ||
23 | |||
24 | do_compile() { | ||
25 | oe_runmake | ||
26 | } | ||
27 | |||
28 | do_install() { | ||
29 | install -d ${D}${sysconfdir}/init.d | ||
30 | install -m 0755 ${WORKDIR}/portmap.init ${D}${sysconfdir}/init.d/portmap | ||
31 | oe_runmake 'docdir=${docdir}/portmap' \ | ||
32 | 'DESTDIR=${D}' install | ||
33 | } | ||