summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/iputils
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2018-07-23 13:36:57 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-07-26 13:16:40 +0100
commitb30285ca8fd049170bb13c3e80af4e8b2700427e (patch)
tree21389c2fc20f6c28a0d3e978032b5203c0664234 /meta/recipes-extended/iputils
parentce56cf535329439646ae3148323ffab059a3d706 (diff)
downloadpoky-b30285ca8fd049170bb13c3e80af4e8b2700427e.tar.gz
iputils: upgrade to s20190629
License-Update: change license checksums to check the License files themselves (BSD3 and GPL2), and the tool-to-license file (LICENSE). Changes to LICENSE will now be detected. Backport a patch to fix the build with musl. Drop upstreamed patch. Update libidn build-dependency to libidn2. Patch in an install target and use that to install binaries, to avoid upstream adding binaries that we don't ship. Also ship all binaries that are installed. (From OE-Core rev: d227122d929330ff71a550689aaedc5d8299d859) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/iputils')
-rw-r--r--meta/recipes-extended/iputils/files/0001-Fix-build-on-MUSL.patch95
-rw-r--r--meta/recipes-extended/iputils/iputils/ai_canonidn.patch58
-rw-r--r--meta/recipes-extended/iputils/iputils/install.patch26
-rw-r--r--meta/recipes-extended/iputils/iputils_s20161105.bb62
-rw-r--r--meta/recipes-extended/iputils/iputils_s20180629.bb61
5 files changed, 145 insertions, 157 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
deleted file mode 100644
index ce8cfebbb0..0000000000
--- a/meta/recipes-extended/iputils/files/0001-Fix-build-on-MUSL.patch
+++ /dev/null
@@ -1,95 +0,0 @@
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
9
10Upstream-Status: Pending
11Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
12---
13 arping.c | 7 +++++++
14 ping.h | 11 +++++++++++
15 tracepath.c | 8 ++++++++
16 traceroute6.c | 4 ++++
17 4 files changed, 30 insertions(+)
18
19diff --git a/arping.c b/arping.c
20index 1a3f40b..531d29d 100644
21--- a/arping.c
22+++ b/arping.c
23@@ -45,6 +45,13 @@ struct sysfs_devattr_values;
24 #ifdef USE_IDN
25 #include <idna.h>
26 #include <locale.h>
27+
28+#ifndef AI_IDN
29+#define AI_IDN 0x0040
30+#endif
31+#ifndef AI_CANONIDN
32+#define AI_CANONIDN 0x0080
33+#endif
34 #endif
35
36 #include "SNAPSHOT.h"
37diff --git a/ping.h b/ping.h
38index 749f3ff..227315f 100644
39--- a/ping.h
40+++ b/ping.h
41@@ -38,6 +38,17 @@
42 #include <locale.h>
43 #include <idna.h>
44 #include <stringprep.h>
45+
46+#ifndef AI_IDN
47+#define AI_IDN 0x0040
48+#endif
49+#ifndef AI_CANONIDN
50+#define AI_CANONIDN 0x0080
51+#endif
52+#ifndef NI_IDN
53+#define NI_IDN 32
54+#endif
55+
56 #define getaddrinfo_flags (AI_CANONNAME | AI_IDN | AI_CANONIDN)
57 #define getnameinfo_flags NI_IDN
58 #else
59diff --git a/tracepath.c b/tracepath.c
60index 74a829d..dcec5b9 100644
61--- a/tracepath.c
62+++ b/tracepath.c
63@@ -30,6 +30,14 @@
64 #ifdef USE_IDN
65 #include <idna.h>
66 #include <locale.h>
67+
68+#ifndef AI_IDN
69+#define AI_IDN 0x0040
70+#endif
71+#ifndef NI_IDN
72+#define NI_IDN 32
73+#endif
74+
75 #define getnameinfo_flags NI_IDN
76 #else
77 #define getnameinfo_flags 0
78diff --git a/traceroute6.c b/traceroute6.c
79index 48fc5c5..8d1eebf 100644
80--- a/traceroute6.c
81+++ b/traceroute6.c
82@@ -251,6 +251,10 @@
83 #include <idna.h>
84 #include <locale.h>
85
86+#ifndef NI_IDN
87+#define NI_IDN 32
88+#endif
89+
90 #define getnameinfo_flags NI_IDN
91 #else
92 #define getnameinfo_flags 0
93--
942.15.1
95
diff --git a/meta/recipes-extended/iputils/iputils/ai_canonidn.patch b/meta/recipes-extended/iputils/iputils/ai_canonidn.patch
new file mode 100644
index 0000000000..cd91267b78
--- /dev/null
+++ b/meta/recipes-extended/iputils/iputils/ai_canonidn.patch
@@ -0,0 +1,58 @@
1From 714e2b458c151c5bdfe93647445cd00dd8e36fff Mon Sep 17 00:00:00 2001
2From: Petr Vorel <petr.vorel@gmail.com>
3Date: Sat, 21 Jul 2018 17:46:14 +0200
4Subject: [PATCH] ping: Fix AI_CANONIDN usage on some systems
5
6Upstream-Status: Backport
7Signed-off-by: Ross Burton <ross.burton@intel.com>
8
9Commit 99f67db used AI_CANONIDN in a way, which broke compilation on
10systems where AI_CANONIDN is not defined in netdb.h (e.g. glibc < 2.3.4,
11alternative libcs that don't support IDN: e.g. current musl 1.1.19 and
12uClibc-ng 1.0.30) when not using the system libidn2.
13
14Fixes: 99f67db ping: Fix ping name encoded using ACE on C locale
15
16Reported-by: Nicholas Fish
17Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
18
19---
20 ping.c | 2 +-
21 ping.h | 2 +-
22 2 files changed, 2 insertions(+), 2 deletions(-)
23
24diff --git a/ping.c b/ping.c
25index 733477f..b241815 100644
26--- a/ping.c
27+++ b/ping.c
28@@ -207,9 +207,9 @@ main(int argc, char **argv)
29
30 #ifdef USE_IDN
31 setlocale(LC_ALL, "");
32-#endif
33 if (!strcmp(setlocale(LC_ALL, NULL), "C"))
34 hints.ai_flags &= ~ AI_CANONIDN;
35+#endif
36
37 /* Support being called using `ping4` or `ping6` symlinks */
38 if (argv[0][strlen(argv[0])-1] == '4')
39diff --git a/ping.h b/ping.h
40index 3e09685..8a0c4ef 100644
41--- a/ping.h
42+++ b/ping.h
43@@ -28,7 +28,6 @@
44 #include <netinet/icmp6.h>
45 #include <linux/filter.h>
46 #include <resolv.h>
47-#include <locale.h>
48
49 #ifdef CAPABILITIES
50 #include <sys/prctl.h>
51@@ -36,6 +35,7 @@
52 #endif
53
54 #ifdef USE_IDN
55+#include <locale.h>
56 #include <idn2.h>
57 #define getaddrinfo_flags (AI_CANONNAME | AI_IDN | AI_CANONIDN)
58 #define getnameinfo_flags NI_IDN
diff --git a/meta/recipes-extended/iputils/iputils/install.patch b/meta/recipes-extended/iputils/iputils/install.patch
new file mode 100644
index 0000000000..abfefd7a58
--- /dev/null
+++ b/meta/recipes-extended/iputils/iputils/install.patch
@@ -0,0 +1,26 @@
1From 5c8c3b04d73304679340f893636e87691992053b Mon Sep 17 00:00:00 2001
2From: Ross Burton <ross@burtonini.com>
3Date: Mon, 23 Jul 2018 14:21:03 +0100
4Subject: [PATCH] Add install
5
6Add a simple install rule so that we always install the binaries that were built.
7
8Upstream-Status: Inappropriate
9Signed-off-by: Ross Burton <ross.burton@intel.com>
10
11---
12 Makefile | 4 ++++
13 1 file changed, 4 insertions(+)
14
15diff --git a/Makefile b/Makefile
16index 17fc5c9..e0c2784 100644
17--- a/Makefile
18+++ b/Makefile
19@@ -231,3 +231,7 @@ rpm:
20 @$(RPMBUILD) -ta --define 'current yes' $(RPMTMP)/iputils.tar.bz2
21 @rm -f $(RPMTMP)/iputils.tar.bz2
22
23+install:
24+ for t in $(TARGETS); do \
25+ install -D $$t $(DESTDIR)$(bindir)/$$t; \
26+ done
diff --git a/meta/recipes-extended/iputils/iputils_s20161105.bb b/meta/recipes-extended/iputils/iputils_s20161105.bb
deleted file mode 100644
index 0125739b03..0000000000
--- a/meta/recipes-extended/iputils/iputils_s20161105.bb
+++ /dev/null
@@ -1,62 +0,0 @@
1SUMMARY = "Network monitoring tools"
2DESCRIPTION = "Utilities for the IP protocol, including traceroute6, \
3tracepath, tracepath6, ping, ping6 and arping."
4HOMEPAGE = "https://github.com/iputils/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 libcap libgcrypt"
15
16SRC_URI = "git://github.com/iputils/iputils \
17 file://0001-Fix-build-on-MUSL.patch \
18 "
19S = "${WORKDIR}/git"
20SRCREV = "bffc0e957b98d626ab4cea218c89251201425442"
21
22UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>s\d+)"
23
24EXTRA_OEMAKE = "-e MAKEFLAGS="
25
26PACKAGECONFIG ?= ""
27PACKAGECONFIG[libidn] = "USE_IDN=yes,USE_IDN=no,libidn"
28
29do_compile () {
30 oe_runmake 'CC=${CC} -D_GNU_SOURCE' VPATH="${STAGING_LIBDIR}:${STAGING_DIR_HOST}/${base_libdir}" ${PACKAGECONFIG_CONFARGS} all
31}
32
33do_install () {
34 install -m 0755 -d ${D}${base_bindir}
35 # SUID root programs
36 install -m 4555 ping ${D}${base_bindir}/ping
37 install -m 4555 traceroute6 ${D}${base_bindir}/
38 install -m 4555 clockdiff ${D}${base_bindir}/
39 # Other programgs
40 for i in arping tracepath; do
41 install -m 0755 $i ${D}${base_bindir}/
42 done
43}
44
45inherit update-alternatives
46
47ALTERNATIVE_PRIORITY = "100"
48
49ALTERNATIVE_${PN}-ping = "ping"
50ALTERNATIVE_LINK_NAME[ping] = "${base_bindir}/ping"
51
52PACKAGES += "${PN}-ping ${PN}-arping ${PN}-tracepath ${PN}-traceroute6 ${PN}-clockdiff"
53
54ALLOW_EMPTY_${PN} = "1"
55RDEPENDS_${PN} += "${PN}-ping ${PN}-arping ${PN}-tracepath ${PN}-traceroute6 ${PN}-clockdiff"
56
57FILES_${PN} = ""
58FILES_${PN}-ping = "${base_bindir}/ping.${BPN}"
59FILES_${PN}-arping = "${base_bindir}/arping"
60FILES_${PN}-tracepath = "${base_bindir}/tracepath"
61FILES_${PN}-traceroute6 = "${base_bindir}/traceroute6"
62FILES_${PN}-clockdiff = "${base_bindir}/clockdiff"
diff --git a/meta/recipes-extended/iputils/iputils_s20180629.bb b/meta/recipes-extended/iputils/iputils_s20180629.bb
new file mode 100644
index 0000000000..eff44be1bd
--- /dev/null
+++ b/meta/recipes-extended/iputils/iputils_s20180629.bb
@@ -0,0 +1,61 @@
1SUMMARY = "Network monitoring tools"
2DESCRIPTION = "Utilities for the IP protocol, including traceroute6, \
3tracepath, tracepath6, ping, ping6 and arping."
4HOMEPAGE = "https://github.com/iputils/iputils"
5SECTION = "console/network"
6
7LICENSE = "BSD & GPLv2+"
8
9LIC_FILES_CHKSUM = "file://LICENSE;md5=b792e38abdc59f766a3153908f23e766 \
10 file://LICENSE.BSD3;md5=0f00d99239d922ffd13cabef83b33444 \
11 file://LICENSE.GPL2;md5=b234ee4d69f5fce4486a80fdaf4a4263"
12
13DEPENDS = "gnutls libcap libgcrypt"
14
15SRC_URI = "git://github.com/iputils/iputils \
16 file://ai_canonidn.patch \
17 file://install.patch"
18SRCREV = "f6aac8dbe3f8c45c53424854a3312bdd8cdd58d3"
19
20S = "${WORKDIR}/git"
21
22UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>s\d+)"
23
24EXTRA_OEMAKE = "-e MAKEFLAGS="
25
26PACKAGECONFIG ??= ""
27PACKAGECONFIG[libidn] = "USE_IDN=yes,USE_IDN=no,libidn2"
28
29do_compile () {
30 oe_runmake 'CC=${CC} -D_GNU_SOURCE' VPATH="${STAGING_LIBDIR}:${STAGING_DIR_HOST}/${base_libdir}" ${PACKAGECONFIG_CONFARGS} all
31}
32
33do_install() {
34 oe_runmake DESTDIR=${D} bindir=${base_bindir} install
35 for b in ping traceroute6 clockdiff; do
36 chmod u+s ${D}${base_bindir}/$b
37 done
38}
39
40inherit update-alternatives
41
42ALTERNATIVE_PRIORITY = "100"
43
44ALTERNATIVE_${PN}-ping = "ping"
45ALTERNATIVE_LINK_NAME[ping] = "${base_bindir}/ping"
46
47SPLITPKGS = "${PN}-ping ${PN}-arping ${PN}-tracepath ${PN}-traceroute6 ${PN}-clockdiff ${PN}-tftpd ${PN}-rarpd ${PN}-rdisc"
48PACKAGES += "${SPLITPKGS}"
49
50ALLOW_EMPTY_${PN} = "1"
51RDEPENDS_${PN} += "${SPLITPKGS}"
52
53FILES_${PN} = ""
54FILES_${PN}-ping = "${base_bindir}/ping.${BPN}"
55FILES_${PN}-arping = "${base_bindir}/arping"
56FILES_${PN}-tracepath = "${base_bindir}/tracepath"
57FILES_${PN}-traceroute6 = "${base_bindir}/traceroute6"
58FILES_${PN}-clockdiff = "${base_bindir}/clockdiff"
59FILES_${PN}-tftpd = "${base_bindir}/tftpd"
60FILES_${PN}-rarpd = "${base_bindir}/rarpd"
61FILES_${PN}-rdisc = "${base_bindir}/rdisc"