summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/iputils
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/iputils')
-rw-r--r--meta/recipes-extended/iputils/files/debian/targets.diff15
-rw-r--r--meta/recipes-extended/iputils/files/debian/use_gethostbyname2.diff31
-rw-r--r--meta/recipes-extended/iputils/files/fix-build-command-line-argument-with-gnutls.patch37
-rw-r--r--meta/recipes-extended/iputils/files/nsgmls-path-fix.patch27
-rw-r--r--meta/recipes-extended/iputils/iputils_s20121221.bb69
5 files changed, 179 insertions, 0 deletions
diff --git a/meta/recipes-extended/iputils/files/debian/targets.diff b/meta/recipes-extended/iputils/files/debian/targets.diff
new file mode 100644
index 0000000000..2cb5576c62
--- /dev/null
+++ b/meta/recipes-extended/iputils/files/debian/targets.diff
@@ -0,0 +1,15 @@
1Upstream-Status: Inappropriate [disable feature]
2
3Index: iputils-s20121221/Makefile
4===================================================================
5--- iputils-s20121221.orig/Makefile
6+++ iputils-s20121221/Makefile
7@@ -106,7 +106,7 @@ endif
8 endif
9
10 # -------------------------------------
11-IPV4_TARGETS=tracepath ping clockdiff rdisc arping tftpd rarpd
12+IPV4_TARGETS=tracepath ping clockdiff arping
13 IPV6_TARGETS=tracepath6 traceroute6 ping6
14 TARGETS=$(IPV4_TARGETS) $(IPV6_TARGETS)
15
diff --git a/meta/recipes-extended/iputils/files/debian/use_gethostbyname2.diff b/meta/recipes-extended/iputils/files/debian/use_gethostbyname2.diff
new file mode 100644
index 0000000000..d3b18868c0
--- /dev/null
+++ b/meta/recipes-extended/iputils/files/debian/use_gethostbyname2.diff
@@ -0,0 +1,31 @@
1Upstream-Status: Pending [from other distro Debian]
2
3Index: iputils-s20121221/tracepath.c
4===================================================================
5--- iputils-s20121221.orig/tracepath.c
6+++ iputils-s20121221/tracepath.c
7@@ -370,9 +370,9 @@ main(int argc, char **argv)
8 }
9 #endif
10
11- he = gethostbyname(p);
12+ he = gethostbyname2(argv[0], AF_INET);
13 if (he == NULL) {
14- herror("gethostbyname");
15+ herror("gethostbyname2");
16 exit(1);
17 }
18
19Index: iputils-s20121221/ping.c
20===================================================================
21--- iputils-s20121221.orig/ping.c
22+++ iputils-s20121221/ping.c
23@@ -279,7 +279,7 @@ main(int argc, char **argv)
24 #else
25 idn = target;
26 #endif
27- hp = gethostbyname(idn);
28+ hp = gethostbyname2(idn, AF_INET);
29 if (!hp) {
30 fprintf(stderr, "ping: unknown host %s\n", target);
31 exit(2);
diff --git a/meta/recipes-extended/iputils/files/fix-build-command-line-argument-with-gnutls.patch b/meta/recipes-extended/iputils/files/fix-build-command-line-argument-with-gnutls.patch
new file mode 100644
index 0000000000..b9cd82ee88
--- /dev/null
+++ b/meta/recipes-extended/iputils/files/fix-build-command-line-argument-with-gnutls.patch
@@ -0,0 +1,37 @@
1Upstream-Status: Backport
2
3From 568e990d30fc7e9416e0a6f8c74ea5013921eaec Mon Sep 17 00:00:00 2001
4From: Arjan van de Ven <arjanvandeven@gmail.com>
5Date: Wed, 16 Jan 2013 03:12:15 +0900
6Subject: [PATCH] ping6: Fix build command line argument with gnutls.
7
8The ping6 command can use either openssl or gnutls...
9and the Makefile has a bunch of setup for defining which of the two to use.
10
11Unfortunately, the final -D define on the commandline to enable gnutls
12inside the ping6.c file didn't actually make it onto the gcc
13commandline.
14This patch adds the $(DEF_CRYPTO) Makefile variable to fix this gap.
15
16Signed-off-by: Arjan van de Ven <arjanvandeven@gmail.com>
17Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
18---
19 Makefile | 2 +-
20 1 files changed, 1 insertions(+), 1 deletions(-)
21
22diff --git a/Makefile b/Makefile
23index c62d9df..89249f5 100644
24--- a/Makefile
25+++ b/Makefile
26@@ -149,7 +149,7 @@ LIB_clockdiff = $(LIB_CAP)
27 DEF_ping_common = $(DEF_CAP) $(DEF_IDN)
28 DEF_ping = $(DEF_CAP) $(DEF_IDN) $(DEF_WITHOUT_IFADDRS)
29 LIB_ping = $(LIB_CAP) $(LIB_IDN)
30-DEF_ping6 = $(DEF_CAP) $(DEF_IDN) $(DEF_WITHOUT_IFADDRS) $(DEF_ENABLE_PING6_RTHDR)
31+DEF_ping6 = $(DEF_CAP) $(DEF_IDN) $(DEF_WITHOUT_IFADDRS) $(DEF_ENABLE_PING6_RTHDR) $(DEF_CRYPTO)
32 LIB_ping6 = $(LIB_CAP) $(LIB_IDN) $(LIB_RESOLV) $(LIB_CRYPTO)
33
34 ping: ping_common.o
35--
361.7.2.5
37
diff --git a/meta/recipes-extended/iputils/files/nsgmls-path-fix.patch b/meta/recipes-extended/iputils/files/nsgmls-path-fix.patch
new file mode 100644
index 0000000000..92bf946f2a
--- /dev/null
+++ b/meta/recipes-extended/iputils/files/nsgmls-path-fix.patch
@@ -0,0 +1,27 @@
1Fix nsgmls path issue
2
3Upstream-Status: Pending
4
5Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
6
7Index: iputils-s20101006/doc/Makefile
8===================================================================
9--- iputils-s20101006.orig/doc/Makefile 2011-09-13 20:42:27.000000000 +0800
10+++ iputils-s20101006/doc/Makefile 2011-09-13 21:01:52.000000000 +0800
11@@ -27,10 +27,15 @@
12 # docbook2man produces utterly ugly output and I did not find
13 # any way to customize this but hacking backend perl script a little.
14 # Well, hence...
15+# nsgmls seems append path to search directory according to the sysid path.
16+# e.g. if input ../index.db, it would search $search_directory/../ rather than
17+# $search_directory, which leads searching failure. Fixing nsgmls probably
18+# introduce some side effects, so use this ugly hack: running nsgmls in current
19+# directory, and running docbook2man in tmp directory.
20
21 $(MANFILES): index.db
22 @-mkdir tmp.db2man
23- @set -e; cd tmp.db2man; nsgmls ../$< | sgmlspl ../docbook2man-spec.pl ; mv $@ ..
24+ @set -e; nsgmls $< >tmp.db2man/output; cd tmp.db2man; cat output | sgmlspl ../docbook2man-spec.pl ; mv $@ ..
25 @-rm -rf tmp.db2man
26
27 clean:
diff --git a/meta/recipes-extended/iputils/iputils_s20121221.bb b/meta/recipes-extended/iputils/iputils_s20121221.bb
new file mode 100644
index 0000000000..46f8903222
--- /dev/null
+++ b/meta/recipes-extended/iputils/iputils_s20121221.bb
@@ -0,0 +1,69 @@
1SUMMARY = "Network monitoring tools"
2DESCRIPTION = "Utilities for the IP protocol, including traceroute6, \
3tracepath, tracepath6, ping, ping6 and arping."
4HOMEPAGE = "http://www.skbuff.net/iputils"
5SECTION = "console/network"
6
7LICENSE = "BSD & GPLv2+"
8
9LIC_FILES_CHKSUM = "file://ping.c;beginline=1;endline=35;md5=f9ceb201733e9a6cf8f00766dd278d82 \
10 file://tracepath.c;beginline=1;endline=10;md5=0ecea2bf60bff2f3d840096d87647f3d \
11 file://arping.c;beginline=1;endline=11;md5=fe84301b5c2655c950f8b92a057fafa6 \
12 file://tftpd.c;beginline=1;endline=32;md5=28834bf8a91a5b8a92755dbee709ef96 "
13
14DEPENDS = "gnutls docbook-utils-native sgmlspl-native libcap"
15
16
17SRC_URI = "http://www.skbuff.net/iputils/${BPN}-${PV}.tar.bz2 \
18 file://debian/use_gethostbyname2.diff \
19 file://debian/targets.diff \
20 file://nsgmls-path-fix.patch \
21 file://fix-build-command-line-argument-with-gnutls.patch \
22 "
23
24SRC_URI[md5sum] = "6072aef64205720dd1893b375e184171"
25SRC_URI[sha256sum] = "450f549fc5b620c23c5929aa6d54b7ddfc7ee1cb1e8efdc5e8bb21d8d0c5319f"
26
27do_compile () {
28 oe_runmake 'CC=${CC} -D_GNU_SOURCE' VPATH="${STAGING_LIBDIR}:${STAGING_DIR_HOST}/${base_libdir}" all man
29}
30
31do_install () {
32 install -m 0755 -d ${D}${base_bindir} ${D}${mandir}/man8
33 # SUID root programs
34 install -m 4555 ping ${D}${base_bindir}/ping
35 install -m 4555 ping6 ${D}${base_bindir}/ping6
36 install -m 4555 traceroute6 ${D}${base_bindir}/
37 # Other programgs
38 for i in arping tracepath tracepath6; do
39 install -m 0755 $i ${D}${base_bindir}/
40 done
41 # Manual pages for things we build packages for
42 for i in tracepath.8 traceroute6.8 ping.8 arping.8; do
43 install -m 0644 doc/$i ${D}${mandir}/man8/ || true
44 done
45}
46
47inherit update-alternatives
48
49ALTERNATIVE_PRIORITY = "100"
50
51ALTERNATIVE_${PN}-ping = "ping"
52ALTERNATIVE_LINK_NAME[ping] = "${base_bindir}/ping"
53
54ALTERNATIVE_${PN}-ping6 = "ping6"
55ALTERNATIVE_LINK_NAME[ping6] = "${base_bindir}/ping6"
56
57PACKAGES += "${PN}-ping ${PN}-ping6 ${PN}-arping ${PN}-tracepath ${PN}-tracepath6 ${PN}-traceroute6"
58
59ALLOW_EMPTY_${PN} = "1"
60RDEPENDS_${PN} += "${PN}-ping ${PN}-ping6 ${PN}-arping ${PN}-tracepath ${PN}-tracepath6 ${PN}-traceroute6"
61
62FILES_${PN} = ""
63FILES_${PN}-ping = "${base_bindir}/ping.${BPN}"
64FILES_${PN}-ping6 = "${base_bindir}/ping6.${BPN}"
65FILES_${PN}-arping = "${base_bindir}/arping"
66FILES_${PN}-tracepath = "${base_bindir}/tracepath"
67FILES_${PN}-tracepath6 = "${base_bindir}/tracepath6"
68FILES_${PN}-traceroute6 = "${base_bindir}/traceroute6"
69FILES_${PN}-doc = "${mandir}/man8"