summaryrefslogtreecommitdiff
path: root/recipes/iputils
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2009-04-23 08:34:55 +0200
committerKoen Kooi <koen@openembedded.org>2009-04-23 08:34:55 +0200
commite06cd7c84bf8bce335d7a195c504dd78423e3fb5 (patch)
tree11d2778c8e6536c8f19d7eb7c44ee8f0796bbfa7 /recipes/iputils
parent35d0a5ed204189c19e81fad5d473ae9d62476139 (diff)
iputils: add 20071127
Diffstat (limited to 'recipes/iputils')
-rw-r--r--recipes/iputils/files/debian/add-icmp-return-codes.diff41
-rw-r--r--recipes/iputils/files/debian/cleanup-docbook-formatting.diff20
-rw-r--r--recipes/iputils/files/debian/fix-arping-timeouts.diff24
-rw-r--r--recipes/iputils/files/debian/fix-cmsghdr-offset-bug.diff19
-rw-r--r--recipes/iputils/files/debian/fix-dead-host-ping-stats.diff17
-rw-r--r--recipes/iputils/files/debian/fix-tracepath-docs.diff23
-rw-r--r--recipes/iputils/files/debian/targets.diff27
-rw-r--r--recipes/iputils/files/debian/use_gethostbyname2.diff29
-rw-r--r--recipes/iputils/files/iputils_20071127-1.diff.gzbin0 -> 8924 bytes
-rw-r--r--recipes/iputils/iputils_20071127.bb79
10 files changed, 279 insertions, 0 deletions
diff --git a/recipes/iputils/files/debian/add-icmp-return-codes.diff b/recipes/iputils/files/debian/add-icmp-return-codes.diff
new file mode 100644
index 0000000000..29bd7d1df3
--- /dev/null
+++ b/recipes/iputils/files/debian/add-icmp-return-codes.diff
@@ -0,0 +1,41 @@
+Index: iputils/ping.c
+===================================================================
+--- iputils.orig/ping.c 2007-12-09 20:32:35.000000000 -0500
++++ iputils/ping.c 2007-12-09 20:32:59.000000000 -0500
+@@ -865,9 +865,36 @@
+ case ICMP_SR_FAILED:
+ printf("Source Route Failed\n");
+ break;
++ case ICMP_NET_UNKNOWN:
++ printf("Destination Net Unknown\n");
++ break;
++ case ICMP_HOST_UNKNOWN:
++ printf("Destination Host Unknown\n");
++ break;
++ case ICMP_HOST_ISOLATED:
++ printf("Source Host Isolated\n");
++ break;
++ case ICMP_NET_ANO:
++ printf("Destination Net Prohibited\n");
++ break;
++ case ICMP_HOST_ANO:
++ printf("Destination Host Prohibited\n");
++ break;
++ case ICMP_NET_UNR_TOS:
++ printf("Destination Net Unreachable for Type of Service\n");
++ break;
++ case ICMP_HOST_UNR_TOS:
++ printf("Destination Host Unreachable for Type of Service\n");
++ break;
+ case ICMP_PKT_FILTERED:
+ printf("Packet filtered\n");
+ break;
++ case ICMP_PREC_VIOLATION:
++ printf("Precedence Violation\n");
++ break;
++ case ICMP_PREC_CUTOFF:
++ printf("Precedence Cutoff\n");
++ break;
+ default:
+ printf("Dest Unreachable, Bad Code: %d\n", code);
+ break;
diff --git a/recipes/iputils/files/debian/cleanup-docbook-formatting.diff b/recipes/iputils/files/debian/cleanup-docbook-formatting.diff
new file mode 100644
index 0000000000..65b43cbbf0
--- /dev/null
+++ b/recipes/iputils/files/debian/cleanup-docbook-formatting.diff
@@ -0,0 +1,20 @@
+--- iputils-upstream/doc/docbook2man-spec.pl 2007-10-28 12:24:10.000000000 -0400
++++ iputils/doc/docbook2man-spec.pl 2007-10-28 12:19:17.000000000 -0400
+@@ -428,7 +428,7 @@
+ output ' ';
+
+ if($_[0]->attribute('CHOICE')->value =~ /opt/i) {
+- output '[ ';
++ output '[';
+ }
+ bold_on();
+ }
+@@ -441,7 +441,7 @@
+ font_off();
+ }
+ if($_[0]->attribute('CHOICE')->value =~ /opt/i) {
+- output '] ';
++ output ']';
+ }
+ }
+
diff --git a/recipes/iputils/files/debian/fix-arping-timeouts.diff b/recipes/iputils/files/debian/fix-arping-timeouts.diff
new file mode 100644
index 0000000000..b3d2505987
--- /dev/null
+++ b/recipes/iputils/files/debian/fix-arping-timeouts.diff
@@ -0,0 +1,24 @@
+--- iputils-upstream/arping.c 2007-10-28 12:24:10.000000000 -0400
++++ iputils/arping.c 2007-10-28 12:19:17.000000000 -0400
+@@ -168,12 +168,17 @@
+ if (start.tv_sec==0)
+ start = tv;
+
+- if (count-- == 0 || (timeout && MS_TDIFF(tv,start) > timeout*1000 + 500))
+- finish();
++ if (timeout && MS_TDIFF(tv,start) > timeout*1000 + 500)
++ finish();
+
+- if (last.tv_sec==0 || MS_TDIFF(tv,last) > 500) {
++ if ((!timeout) && (count == 0))
++ finish();
++
++ if ( count!=0 && (last.tv_sec==0 || MS_TDIFF(tv,last) > 500 ) ) {
+ send_pack(s, src, dst, &me, &he);
+- if (count == 0 && unsolicited)
++ if (count >= 0)
++ count--;
++ if (count==0 && unsolicited)
+ finish();
+ }
+ alarm(1);
diff --git a/recipes/iputils/files/debian/fix-cmsghdr-offset-bug.diff b/recipes/iputils/files/debian/fix-cmsghdr-offset-bug.diff
new file mode 100644
index 0000000000..7ae92df468
--- /dev/null
+++ b/recipes/iputils/files/debian/fix-cmsghdr-offset-bug.diff
@@ -0,0 +1,19 @@
+--- iputils-upstream/ping6.c 2007-10-28 12:24:10.000000000 -0400
++++ iputils/ping6.c 2007-10-28 12:19:18.000000000 -0400
+@@ -414,7 +414,7 @@
+ fprintf(stderr, "ping: unknown iface %s\n", device);
+ exit(2);
+ }
+- cmsg = (struct cmsghdr*)cmsgbuf;
++ cmsg = (struct cmsghdr*)(cmsgbuf+cmsglen);
+ cmsglen += CMSG_SPACE(sizeof(*ipi));
+ cmsg->cmsg_len = CMSG_LEN(sizeof(*ipi));
+ cmsg->cmsg_level = SOL_IPV6;
+@@ -486,7 +486,6 @@
+ /*
+ * select icmp echo reply as icmp type to receive
+ */
+-
+ ICMP6_FILTER_SETBLOCKALL(&filter);
+
+ if (!working_recverr) {
diff --git a/recipes/iputils/files/debian/fix-dead-host-ping-stats.diff b/recipes/iputils/files/debian/fix-dead-host-ping-stats.diff
new file mode 100644
index 0000000000..3b0fb83655
--- /dev/null
+++ b/recipes/iputils/files/debian/fix-dead-host-ping-stats.diff
@@ -0,0 +1,17 @@
+--- iputils-s20070202/ping_common.c 2007-02-02 07:55:46.000000000 -0500
++++ iputils/ping_common.c 2007-10-28 12:19:17.000000000 -0400
+@@ -818,7 +820,8 @@
+ }
+ if (pipesize > 1)
+ printf(", pipe %d", pipesize);
+- if (ntransmitted > 1 && (!interval || (options&(F_FLOOD|F_ADAPTIVE)))) {
++ if (ntransmitted > 1 && nreceived &&
++ (!interval || (options&(F_FLOOD|F_ADAPTIVE)))) {
+ int ipg = (1000000*(long long)tv.tv_sec+tv.tv_usec)/(ntransmitted-1);
+ printf(", ipg/ewma %d.%03d/%d.%03d ms",
+ ipg/1000, ipg%1000, rtt/8000, (rtt/8)%1000);
+@@ -852,4 +855,3 @@
+ }
+ fprintf(stderr, "\n");
+ }
+-
diff --git a/recipes/iputils/files/debian/fix-tracepath-docs.diff b/recipes/iputils/files/debian/fix-tracepath-docs.diff
new file mode 100644
index 0000000000..5f001078df
--- /dev/null
+++ b/recipes/iputils/files/debian/fix-tracepath-docs.diff
@@ -0,0 +1,23 @@
+Index: iputils/doc/Makefile
+===================================================================
+--- iputils.orig/doc/Makefile 2007-10-28 17:27:31.000000000 -0400
++++ iputils/doc/Makefile 2007-12-09 21:01:24.000000000 -0500
+@@ -6,7 +6,7 @@
+
+ html: $(HTMLFILES) iputils.html
+
+-man: $(MANFILES)
++man: $(MANFILES) fix_sgml2man
+
+ # docbook scripts are incredibly dirty in the sense that they leak
+ # lots of some strange temporary junk directories and files.
+@@ -33,6 +33,9 @@
+ @set -e; cd tmp.db2man; nsgmls ../$< | sgmlspl ../docbook2man-spec.pl ; mv $@ ..
+ @-rm -rf tmp.db2man
+
++fix_sgml2man:
++ @sed -i -e 's!\\fB\\fIdestination\\fB\\fR \[\\fB/\\fIport\\fB\\fR\]!\\fB\\fIdestination\\fB\\fR[\\fB/\\fIport\\fB\\fR]!g' tracepath.8
++
+ clean:
+ @rm -rf $(MANFILES) $(HTMLFILES) iputils.html tmp.db2html tmp.db2man
+
diff --git a/recipes/iputils/files/debian/targets.diff b/recipes/iputils/files/debian/targets.diff
new file mode 100644
index 0000000000..87fe27d6fd
--- /dev/null
+++ b/recipes/iputils/files/debian/targets.diff
@@ -0,0 +1,27 @@
+--- iputils-upstream/Makefile 2007-10-28 12:24:10.000000000 -0400
++++ iputils/Makefile 2007-10-28 12:19:18.000000000 -0400
+@@ -16,7 +16,7 @@
+ CCOPT=-D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -g
+ CFLAGS=$(CCOPT) $(GLIBCFIX) $(DEFINES)
+
+-IPV4_TARGETS=tracepath ping clockdiff rdisc arping tftpd rarpd
++IPV4_TARGETS=tracepath ping arping
+ IPV6_TARGETS=tracepath6 traceroute6 ping6
+ TARGETS=$(IPV4_TARGETS) $(IPV6_TARGETS)
+
+@@ -25,7 +25,6 @@
+
+ all: $(TARGETS)
+
+-
+ tftpd: tftpd.o tftpsubs.o
+ ping: ping.o ping_common.o
+ ping6: ping6.o ping_common.o
+@@ -37,7 +36,6 @@
+ rdisc_srv.o: rdisc.c
+ $(CC) $(CFLAGS) -DRDISC_SERVER -o rdisc_srv.o rdisc.c
+
+-
+ check-kernel:
+ ifeq ($(KERNEL_INCLUDE),)
+ @echo "Please, set correct KERNEL_INCLUDE"; false
diff --git a/recipes/iputils/files/debian/use_gethostbyname2.diff b/recipes/iputils/files/debian/use_gethostbyname2.diff
new file mode 100644
index 0000000000..5a1ea3b583
--- /dev/null
+++ b/recipes/iputils/files/debian/use_gethostbyname2.diff
@@ -0,0 +1,29 @@
+Index: iputils/tracepath.c
+===================================================================
+--- iputils.orig/tracepath.c 2007-12-09 20:32:32.000000000 -0500
++++ iputils/tracepath.c 2007-12-09 20:33:20.000000000 -0500
+@@ -318,9 +318,9 @@
+ base_port = atoi(p+1);
+ } else
+ base_port = 44444;
+- he = gethostbyname(argv[0]);
++ he = gethostbyname2(argv[0], AF_INET);
+ if (he == NULL) {
+- herror("gethostbyname");
++ herror("gethostbyname2");
+ exit(1);
+ }
+ memcpy(&target.sin_addr, he->h_addr, 4);
+Index: iputils/ping.c
+===================================================================
+--- iputils.orig/ping.c 2007-12-09 20:32:59.000000000 -0500
++++ iputils/ping.c 2007-12-09 20:33:20.000000000 -0500
+@@ -249,7 +249,7 @@
+ if (argc == 1)
+ options |= F_NUMERIC;
+ } else {
+- hp = gethostbyname(target);
++ hp = gethostbyname2(target, AF_INET);
+ if (!hp) {
+ fprintf(stderr, "ping: unknown host %s\n", target);
+ exit(2);
diff --git a/recipes/iputils/files/iputils_20071127-1.diff.gz b/recipes/iputils/files/iputils_20071127-1.diff.gz
new file mode 100644
index 0000000000..9784641490
--- /dev/null
+++ b/recipes/iputils/files/iputils_20071127-1.diff.gz
Binary files differ
diff --git a/recipes/iputils/iputils_20071127.bb b/recipes/iputils/iputils_20071127.bb
new file mode 100644
index 0000000000..9235a65c52
--- /dev/null
+++ b/recipes/iputils/iputils_20071127.bb
@@ -0,0 +1,79 @@
+SECTION = "console/network"
+DESCRIPTION = "Utilities for the IP protocol, including traceroute6, \
+tracepath, tracepath6, ping, ping6 and arping."
+SECTION = "console/network"
+LICENSE ="BSD"
+
+#Need more testing
+DEFAULT_PREFERENCE = "-1"
+
+SRC_URI = "http://ftp.de.debian.org/debian/pool/main/i/iputils/iputils_${PV}.orig.tar.gz \
+ file://debian/fix-dead-host-ping-stats.diff;patch=1 \
+ file://debian/add-icmp-return-codes.diff;patch=1 \
+ file://debian/use_gethostbyname2.diff;patch=1 \
+ file://debian/fix-cmsghdr-offset-bug.diff;patch=1 \
+ file://debian/cleanup-docbook-formatting.diff;patch=1 \
+ file://debian/targets.diff;patch=1 \
+ file://debian/fix-tracepath-docs.diff;patch=1 \
+ file://debian/fix-arping-timeouts.diff;patch=1 \
+"
+
+S = "${WORKDIR}/iputils_20071127.orig"
+
+PACKAGES += "${PN}-ping ${PN}-ping6 ${PN}-arping ${PN}-tracepath ${PN}-tracepath6 ${PN}-traceroute6"
+
+ALLOW_EMPTY_${PN} = "1"
+RDEPENDS_{PN} += "${PN}-ping ${PN}-ping6 ${PN}-arping ${PN}-tracepath ${PN}-tracepath6 ${PN}-traceroute6"
+
+FILES_${PN} = ""
+FILES_${PN}-ping = "${base_bindir}/ping.${PN}"
+FILES_${PN}-ping6 = "${base_bindir}/ping6.${PN}"
+FILES_${PN}-arping = "${bindir}/arping"
+FILES_${PN}-tracepath = "${bindir}/tracepath"
+FILES_${PN}-tracepath6 = "${bindir}/tracepath6"
+FILES_${PN}-traceroute6 = "${bindir}/traceroute6"
+FILES_${PN}-doc = "${mandir}/man8"
+
+do_compile () {
+ oe_runmake 'CC=${CC}' \
+ KERNEL_INCLUDE="${STAGING_INCDIR}" \
+ LIBC_INCLUDE="${STAGING_INCDIR}"
+}
+
+do_install () {
+ install -m 0755 -d ${D}${base_bindir} ${D}${bindir} ${D}${mandir}/man8
+ # SUID root programs
+ install -m 4555 ping ${D}${base_bindir}/ping.${PN}
+ install -m 4555 ping6 ${D}${base_bindir}/ping6.${PN}
+ install -m 4555 traceroute6 ${D}${bindir}/
+ # Other programgs
+ for i in arping tracepath tracepath6; do
+ install -m 0755 $i ${D}${bindir}/
+ done
+ # Manual pages for things we build packages for
+ for i in tracepath.8 traceroute6.8 ping.8 arping.8; do
+ install -m 0644 doc/$i ${D}${mandir}/man8/
+ done
+}
+
+# Busybox also provides ping and ping6, so use update-alternatives
+# Also fixup SUID bit for applications that need it
+pkg_postinst_${PN}-ping () {
+ chmod 4555 ${base_bindir}/ping.${PN}
+ update-alternatives --install ${base_bindir}/ping ping ping.${PN} 100
+}
+pkg_prerm_${PN}-ping () {
+ update-alternatives --remove ping ping.${PN}
+}
+
+pkg_postinst_${PN}-ping6 () {
+ chmod 4555 ${base_bindir}/ping6.${PN}
+ update-alternatives --install ${base_bindir}/ping6 ping6 ping6.${PN} 100
+}
+pkg_prerm_${PN}-ping6 () {
+ update-alternatives --remove ping6 ping6.${PN}
+}
+
+pkg_postinst_${PN}-traceroute6 () {
+ chmod 4555 ${bindir}/traceroute6
+}