summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kanavin <alexander.kanavin@linux.intel.com>2018-02-01 20:02:08 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-02-06 11:06:30 +0000
commit58ce11215d2928f517c5f96fc85cd0aa6ed9b862 (patch)
tree4f96f7d501ab0fa4888e6b2b352c8c7cb262558d
parent5f45587b4d9eb763b10da44b3b36971ab809a1cc (diff)
downloadpoky-58ce11215d2928f517c5f96fc85cd0aa6ed9b862.tar.gz
iputils: update to 20161105
We've been using obsolete upstream URI for quite a while; meanwhile a lot of development has happened Drop all the patches: they are either changing the code that has been refactored, or are backports. Add a new musl fix patch from gentoo. ping6 and tracepath6 variants have been folded into standard versions. (From OE-Core rev: 5997981fa2c22609a88b8cbb595dbf7758b2f7c2) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-extended/iputils/files/0001-Fix-build-on-MUSL.patch93
-rw-r--r--meta/recipes-extended/iputils/files/0001-Fix-header-inclusion-for-musl.patch92
-rw-r--r--meta/recipes-extended/iputils/files/0001-Intialize-struct-elements-by-name.patch52
-rw-r--r--meta/recipes-extended/iputils/files/arping-fix-arping-hang-if-SIGALRM-is-blocked.patch44
-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/nsgmls-path-fix.patch27
-rw-r--r--meta/recipes-extended/iputils/iputils_s20161105.bb (renamed from meta/recipes-extended/iputils/iputils_s20151218.bb)33
8 files changed, 103 insertions, 284 deletions
diff --git a/meta/recipes-extended/iputils/files/0001-Fix-build-on-MUSL.patch b/meta/recipes-extended/iputils/files/0001-Fix-build-on-MUSL.patch
new file mode 100644
index 0000000000..c86dafc038
--- /dev/null
+++ b/meta/recipes-extended/iputils/files/0001-Fix-build-on-MUSL.patch
@@ -0,0 +1,93 @@
1From c6c5966d9fae27bc2f0a34ab59b999555111bd2d Mon Sep 17 00:00:00 2001
2From: Aric Belsito <lluixhi@gmail.com>
3Date: Sun, 29 Oct 2017 23:17:03 +0100
4Subject: [PATCH] Fix build on MUSL
5
6Add missing AI_IDN and NI_IDN declarations.
7
8Bug: https://bugs.gentoo.org/503914
9Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
10---
11 arping.c | 7 +++++++
12 ping.h | 11 +++++++++++
13 tracepath.c | 8 ++++++++
14 traceroute6.c | 4 ++++
15 4 files changed, 30 insertions(+)
16
17diff --git a/arping.c b/arping.c
18index 1a3f40b..531d29d 100644
19--- a/arping.c
20+++ b/arping.c
21@@ -45,6 +45,13 @@ struct sysfs_devattr_values;
22 #ifdef USE_IDN
23 #include <idna.h>
24 #include <locale.h>
25+
26+#ifndef AI_IDN
27+#define AI_IDN 0x0040
28+#endif
29+#ifndef AI_CANONIDN
30+#define AI_CANONIDN 0x0080
31+#endif
32 #endif
33
34 #include "SNAPSHOT.h"
35diff --git a/ping.h b/ping.h
36index 749f3ff..227315f 100644
37--- a/ping.h
38+++ b/ping.h
39@@ -38,6 +38,17 @@
40 #include <locale.h>
41 #include <idna.h>
42 #include <stringprep.h>
43+
44+#ifndef AI_IDN
45+#define AI_IDN 0x0040
46+#endif
47+#ifndef AI_CANONIDN
48+#define AI_CANONIDN 0x0080
49+#endif
50+#ifndef NI_IDN
51+#define NI_IDN 32
52+#endif
53+
54 #define getaddrinfo_flags (AI_CANONNAME | AI_IDN | AI_CANONIDN)
55 #define getnameinfo_flags NI_IDN
56 #else
57diff --git a/tracepath.c b/tracepath.c
58index 74a829d..dcec5b9 100644
59--- a/tracepath.c
60+++ b/tracepath.c
61@@ -30,6 +30,14 @@
62 #ifdef USE_IDN
63 #include <idna.h>
64 #include <locale.h>
65+
66+#ifndef AI_IDN
67+#define AI_IDN 0x0040
68+#endif
69+#ifndef NI_IDN
70+#define NI_IDN 32
71+#endif
72+
73 #define getnameinfo_flags NI_IDN
74 #else
75 #define getnameinfo_flags 0
76diff --git a/traceroute6.c b/traceroute6.c
77index 48fc5c5..8d1eebf 100644
78--- a/traceroute6.c
79+++ b/traceroute6.c
80@@ -251,6 +251,10 @@
81 #include <idna.h>
82 #include <locale.h>
83
84+#ifndef NI_IDN
85+#define NI_IDN 32
86+#endif
87+
88 #define getnameinfo_flags NI_IDN
89 #else
90 #define getnameinfo_flags 0
91--
922.15.1
93
diff --git a/meta/recipes-extended/iputils/files/0001-Fix-header-inclusion-for-musl.patch b/meta/recipes-extended/iputils/files/0001-Fix-header-inclusion-for-musl.patch
deleted file mode 100644
index 20ef07e44a..0000000000
--- a/meta/recipes-extended/iputils/files/0001-Fix-header-inclusion-for-musl.patch
+++ /dev/null
@@ -1,92 +0,0 @@
1From be0bb81d72fea4d20da74f4f2236aa145684f332 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 6 Jan 2016 14:14:22 -0800
4Subject: [PATCH] Fix header inclusion for musl
5
6Fix errors e.g.
7
8In file included from tracepath.c:17:0:
9/usr/include/linux/errqueue.h:33:18:
10error: array type has incomplete element type 'struct timespec'
11 struct timespec ts[3];
12 ^
13tracepath.c: In function 'main':
14tracepath.c:329:16: error: 'INT_MAX' undeclared (first use in this
15function)
16 overhead, INT_MAX);
17 ^
18tracepath.c:329:16: note: each undeclared identifier is reported only
19once for each function it appears in
20Makefile:131: recipe for target 'tracepath.o' failed
21make: *** [tracepath.o] Error 1
22
23ping_common.c: In function 'main_loop':
24ping_common.c:756:15: error: 'HZ' undeclared (first use in this
25function)
26 if (1000 % HZ == 0 ? next <= 1000 / HZ : (next < INT_MAX / HZ &&
27next * HZ <= 1000)) {
28
29protocols/timed.h is not needed and is absent in musl
30
31Signed-off-by: Khem Raj <raj.khem@gmail.com>
32---
33Upstream-Status: Pending
34
35 clockdiff.c | 1 -
36 ping_common.c | 1 +
37 tracepath.c | 2 ++
38 tracepath6.c | 1 +
39 4 files changed, 4 insertions(+), 1 deletion(-)
40
41diff --git a/clockdiff.c b/clockdiff.c
42index 7c1ea1b..1d6341e 100644
43--- a/clockdiff.c
44+++ b/clockdiff.c
45@@ -14,7 +14,6 @@
46 #include <netinet/ip.h>
47 #include <netinet/ip_icmp.h>
48 #define TSPTYPES
49-#include <protocols/timed.h>
50 #include <fcntl.h>
51 #include <netdb.h>
52 #include <arpa/inet.h>
53diff --git a/ping_common.c b/ping_common.c
54index 7f82851..3ce699d 100644
55--- a/ping_common.c
56+++ b/ping_common.c
57@@ -2,6 +2,7 @@
58 #include <ctype.h>
59 #include <sched.h>
60 #include <math.h>
61+#include <asm-generic/param.h>
62
63 int options;
64
65diff --git a/tracepath.c b/tracepath.c
66index 89e6d16..c9d6ddd 100644
67--- a/tracepath.c
68+++ b/tracepath.c
69@@ -12,6 +12,8 @@
70 #include <stdio.h>
71 #include <stdlib.h>
72 #include <unistd.h>
73+#include <limits.h>
74+#include <time.h>
75 #include <sys/socket.h>
76 #include <linux/types.h>
77 #include <linux/errqueue.h>
78diff --git a/tracepath6.c b/tracepath6.c
79index 126fadf..9d5745c 100644
80--- a/tracepath6.c
81+++ b/tracepath6.c
82@@ -12,6 +12,7 @@
83 #include <stdio.h>
84 #include <stdlib.h>
85 #include <unistd.h>
86+#include <limits.h>
87 #include <sys/socket.h>
88 #include <netinet/in.h>
89 #include <netinet/icmp6.h>
90--
912.6.4
92
diff --git a/meta/recipes-extended/iputils/files/0001-Intialize-struct-elements-by-name.patch b/meta/recipes-extended/iputils/files/0001-Intialize-struct-elements-by-name.patch
deleted file mode 100644
index 6da01dc616..0000000000
--- a/meta/recipes-extended/iputils/files/0001-Intialize-struct-elements-by-name.patch
+++ /dev/null
@@ -1,52 +0,0 @@
1From 000629f74908a2a95f6104444c77ad93cf40d62d Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 13 Jan 2016 08:50:50 +0000
4Subject: [PATCH] Intialize struct elements by name
5
6makes it portable across glibc and musl
7
8Fixes errors
9
10| ping.c: In function 'send_probe':
11| ping.c:735:19: warning: initialization makes integer from pointer
12without a cast [-Wint-conversion]
13| &iov, 1, &cmsg, 0, 0 };
14| ^
15| ping.c:735:19: note: (near initialization for 'm.__pad1')
16| ping.c:735:19: error: initializer element is not computable at load
17time
18| ping.c:735:19: note: (near initialization for 'm.__pad1')
19| make: *** [ping.o] Error 1
20
21Signed-off-by: Khem Raj <raj.khem@gmail.com>
22---
23Upstream-Status: Pending
24
25 ping.c | 11 +++++++++--
26 1 file changed, 9 insertions(+), 2 deletions(-)
27
28diff --git a/ping.c b/ping.c
29index 4989760..e67f381 100644
30--- a/ping.c
31+++ b/ping.c
32@@ -731,8 +731,15 @@ int send_probe()
33
34 do {
35 static struct iovec iov = {outpack, 0};
36- static struct msghdr m = { &whereto, sizeof(whereto),
37- &iov, 1, &cmsg, 0, 0 };
38+ static struct msghdr m = {
39+ .msg_name = &whereto,
40+ .msg_namelen = sizeof(whereto),
41+ .msg_iov = &iov,
42+ .msg_iovlen = 1,
43+ .msg_control = &cmsg,
44+ .msg_controllen = 0,
45+ .msg_flags= 0,
46+ };
47 m.msg_controllen = cmsg_len;
48 iov.iov_len = cc;
49
50--
512.7.0
52
diff --git a/meta/recipes-extended/iputils/files/arping-fix-arping-hang-if-SIGALRM-is-blocked.patch b/meta/recipes-extended/iputils/files/arping-fix-arping-hang-if-SIGALRM-is-blocked.patch
deleted file mode 100644
index 7b56276b39..0000000000
--- a/meta/recipes-extended/iputils/files/arping-fix-arping-hang-if-SIGALRM-is-blocked.patch
+++ /dev/null
@@ -1,44 +0,0 @@
1arping: fix arping hang if SIGALRM is blocked
2
3Unblock SIGALRM so that the previously called alarm() can prevent
4recvfrom() from blocking forever in case the inherited procmask is
5blocking SIGALRM and no packet is received.
6
7Upstream-Status: Backport
8
9Reported-by: Rui Prior <rprior@dcc.fc.up.pt>
10RH-Bugzilla: #1085971
11Signed-off-by: Jan Synacek <jsynacek@redhat.com>
12Signed-off-by: Zhenbo Gao <zhenbo.gao@windriver.com>
13
14diff --git a/arping.c.orig b/arping.c
15index 35408c1..2098159 100644
16--- a/arping.c.orig
17+++ b/arping.c
18@@ -1215,16 +1215,22 @@ main(int argc, char **argv)
19 socklen_t alen = sizeof(from);
20 int cc;
21
22+ sigemptyset(&sset);
23+ sigaddset(&sset, SIGALRM);
24+ sigaddset(&sset, SIGINT);
25+ /* Unblock SIGALRM so that the previously called alarm()
26+ * can prevent recvfrom from blocking forever in case the
27+ * inherited procmask is blocking SIGALRM and no packet
28+ * is received. */
29+ sigprocmask(SIG_UNBLOCK, &sset, &osset);
30+
31 if ((cc = recvfrom(s, packet, sizeof(packet), 0,
32 (struct sockaddr *)&from, &alen)) < 0) {
33 perror("arping: recvfrom");
34 continue;
35 }
36
37- sigemptyset(&sset);
38- sigaddset(&sset, SIGALRM);
39- sigaddset(&sset, SIGINT);
40- sigprocmask(SIG_BLOCK, &sset, &osset);
41+ sigprocmask(SIG_BLOCK, &sset, NULL);
42 recv_pack(packet, cc, (struct sockaddr_ll *)&from);
43 sigprocmask(SIG_SETMASK, &osset, NULL);
44 }
diff --git a/meta/recipes-extended/iputils/files/debian/targets.diff b/meta/recipes-extended/iputils/files/debian/targets.diff
deleted file mode 100644
index 2cb5576c62..0000000000
--- a/meta/recipes-extended/iputils/files/debian/targets.diff
+++ /dev/null
@@ -1,15 +0,0 @@
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
deleted file mode 100644
index d3b18868c0..0000000000
--- a/meta/recipes-extended/iputils/files/debian/use_gethostbyname2.diff
+++ /dev/null
@@ -1,31 +0,0 @@
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/nsgmls-path-fix.patch b/meta/recipes-extended/iputils/files/nsgmls-path-fix.patch
deleted file mode 100644
index 92bf946f2a..0000000000
--- a/meta/recipes-extended/iputils/files/nsgmls-path-fix.patch
+++ /dev/null
@@ -1,27 +0,0 @@
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_s20151218.bb b/meta/recipes-extended/iputils/iputils_s20161105.bb
index 46de6fc444..ad7dbc4d4a 100644
--- a/meta/recipes-extended/iputils/iputils_s20151218.bb
+++ b/meta/recipes-extended/iputils/iputils_s20161105.bb
@@ -1,7 +1,7 @@
1SUMMARY = "Network monitoring tools" 1SUMMARY = "Network monitoring tools"
2DESCRIPTION = "Utilities for the IP protocol, including traceroute6, \ 2DESCRIPTION = "Utilities for the IP protocol, including traceroute6, \
3tracepath, tracepath6, ping, ping6 and arping." 3tracepath, tracepath6, ping, ping6 and arping."
4HOMEPAGE = "http://www.skbuff.net/iputils" 4HOMEPAGE = "https://github.com/iputils/iputils"
5SECTION = "console/network" 5SECTION = "console/network"
6 6
7LICENSE = "BSD & GPLv2+" 7LICENSE = "BSD & GPLv2+"
@@ -13,20 +13,13 @@ LIC_FILES_CHKSUM = "file://ping.c;beginline=1;endline=35;md5=f9ceb201733e9a6cf8f
13 13
14DEPENDS = "gnutls libcap libgcrypt" 14DEPENDS = "gnutls libcap libgcrypt"
15 15
16SRC_URI = "git://github.com/iputils/iputils \
17 file://0001-Fix-build-on-MUSL.patch \
18 "
19S = "${WORKDIR}/git"
20SRCREV = "bffc0e957b98d626ab4cea218c89251201425442"
16 21
17SRC_URI = "http://www.skbuff.net/iputils/${BPN}-${PV}.tar.bz2 \ 22UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>s\d+)"
18 file://debian/use_gethostbyname2.diff \
19 file://debian/targets.diff \
20 file://nsgmls-path-fix.patch \
21 file://0001-Fix-header-inclusion-for-musl.patch \
22 file://0001-Intialize-struct-elements-by-name.patch \
23 file://arping-fix-arping-hang-if-SIGALRM-is-blocked.patch \
24 "
25
26SRC_URI[md5sum] = "8aaa7395f27dff9f57ae016d4bc753ce"
27SRC_URI[sha256sum] = "549f58d71951e52b46595829134d4e330642f522f50026917fadc349a54825a1"
28
29UPSTREAM_CHECK_REGEX = "iputils-(?P<pver>s\d+).tar"
30 23
31EXTRA_OEMAKE = "-e MAKEFLAGS=" 24EXTRA_OEMAKE = "-e MAKEFLAGS="
32 25
@@ -38,11 +31,10 @@ do_install () {
38 install -m 0755 -d ${D}${base_bindir} 31 install -m 0755 -d ${D}${base_bindir}
39 # SUID root programs 32 # SUID root programs
40 install -m 4555 ping ${D}${base_bindir}/ping 33 install -m 4555 ping ${D}${base_bindir}/ping
41 install -m 4555 ping6 ${D}${base_bindir}/ping6
42 install -m 4555 traceroute6 ${D}${base_bindir}/ 34 install -m 4555 traceroute6 ${D}${base_bindir}/
43 install -m 4555 clockdiff ${D}${base_bindir}/ 35 install -m 4555 clockdiff ${D}${base_bindir}/
44 # Other programgs 36 # Other programgs
45 for i in arping tracepath tracepath6; do 37 for i in arping tracepath; do
46 install -m 0755 $i ${D}${base_bindir}/ 38 install -m 0755 $i ${D}${base_bindir}/
47 done 39 done
48} 40}
@@ -54,19 +46,14 @@ ALTERNATIVE_PRIORITY = "100"
54ALTERNATIVE_${PN}-ping = "ping" 46ALTERNATIVE_${PN}-ping = "ping"
55ALTERNATIVE_LINK_NAME[ping] = "${base_bindir}/ping" 47ALTERNATIVE_LINK_NAME[ping] = "${base_bindir}/ping"
56 48
57ALTERNATIVE_${PN}-ping6 = "ping6" 49PACKAGES += "${PN}-ping ${PN}-arping ${PN}-tracepath ${PN}-traceroute6 ${PN}-clockdiff"
58ALTERNATIVE_LINK_NAME[ping6] = "${base_bindir}/ping6"
59
60PACKAGES += "${PN}-ping ${PN}-ping6 ${PN}-arping ${PN}-tracepath ${PN}-tracepath6 ${PN}-traceroute6 ${PN}-clockdiff"
61 50
62ALLOW_EMPTY_${PN} = "1" 51ALLOW_EMPTY_${PN} = "1"
63RDEPENDS_${PN} += "${PN}-ping ${PN}-ping6 ${PN}-arping ${PN}-tracepath ${PN}-tracepath6 ${PN}-traceroute6 ${PN}-clockdiff" 52RDEPENDS_${PN} += "${PN}-ping ${PN}-arping ${PN}-tracepath ${PN}-traceroute6 ${PN}-clockdiff"
64 53
65FILES_${PN} = "" 54FILES_${PN} = ""
66FILES_${PN}-ping = "${base_bindir}/ping.${BPN}" 55FILES_${PN}-ping = "${base_bindir}/ping.${BPN}"
67FILES_${PN}-ping6 = "${base_bindir}/ping6.${BPN}"
68FILES_${PN}-arping = "${base_bindir}/arping" 56FILES_${PN}-arping = "${base_bindir}/arping"
69FILES_${PN}-tracepath = "${base_bindir}/tracepath" 57FILES_${PN}-tracepath = "${base_bindir}/tracepath"
70FILES_${PN}-tracepath6 = "${base_bindir}/tracepath6"
71FILES_${PN}-traceroute6 = "${base_bindir}/traceroute6" 58FILES_${PN}-traceroute6 = "${base_bindir}/traceroute6"
72FILES_${PN}-clockdiff = "${base_bindir}/clockdiff" 59FILES_${PN}-clockdiff = "${base_bindir}/clockdiff"