diff options
author | Ross Burton <ross.burton@intel.com> | 2018-07-23 13:36:57 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-07-26 13:16:40 +0100 |
commit | b30285ca8fd049170bb13c3e80af4e8b2700427e (patch) | |
tree | 21389c2fc20f6c28a0d3e978032b5203c0664234 /meta/recipes-extended/iputils | |
parent | ce56cf535329439646ae3148323ffab059a3d706 (diff) | |
download | poky-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')
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 @@ | |||
1 | From c6c5966d9fae27bc2f0a34ab59b999555111bd2d Mon Sep 17 00:00:00 2001 | ||
2 | From: Aric Belsito <lluixhi@gmail.com> | ||
3 | Date: Sun, 29 Oct 2017 23:17:03 +0100 | ||
4 | Subject: [PATCH] Fix build on MUSL | ||
5 | |||
6 | Add missing AI_IDN and NI_IDN declarations. | ||
7 | |||
8 | Bug: https://bugs.gentoo.org/503914 | ||
9 | |||
10 | Upstream-Status: Pending | ||
11 | Signed-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 | |||
19 | diff --git a/arping.c b/arping.c | ||
20 | index 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" | ||
37 | diff --git a/ping.h b/ping.h | ||
38 | index 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 | ||
59 | diff --git a/tracepath.c b/tracepath.c | ||
60 | index 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 | ||
78 | diff --git a/traceroute6.c b/traceroute6.c | ||
79 | index 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 | -- | ||
94 | 2.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 @@ | |||
1 | From 714e2b458c151c5bdfe93647445cd00dd8e36fff Mon Sep 17 00:00:00 2001 | ||
2 | From: Petr Vorel <petr.vorel@gmail.com> | ||
3 | Date: Sat, 21 Jul 2018 17:46:14 +0200 | ||
4 | Subject: [PATCH] ping: Fix AI_CANONIDN usage on some systems | ||
5 | |||
6 | Upstream-Status: Backport | ||
7 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
8 | |||
9 | Commit 99f67db used AI_CANONIDN in a way, which broke compilation on | ||
10 | systems where AI_CANONIDN is not defined in netdb.h (e.g. glibc < 2.3.4, | ||
11 | alternative libcs that don't support IDN: e.g. current musl 1.1.19 and | ||
12 | uClibc-ng 1.0.30) when not using the system libidn2. | ||
13 | |||
14 | Fixes: 99f67db ping: Fix ping name encoded using ACE on C locale | ||
15 | |||
16 | Reported-by: Nicholas Fish | ||
17 | Signed-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 | |||
24 | diff --git a/ping.c b/ping.c | ||
25 | index 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') | ||
39 | diff --git a/ping.h b/ping.h | ||
40 | index 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 @@ | |||
1 | From 5c8c3b04d73304679340f893636e87691992053b Mon Sep 17 00:00:00 2001 | ||
2 | From: Ross Burton <ross@burtonini.com> | ||
3 | Date: Mon, 23 Jul 2018 14:21:03 +0100 | ||
4 | Subject: [PATCH] Add install | ||
5 | |||
6 | Add a simple install rule so that we always install the binaries that were built. | ||
7 | |||
8 | Upstream-Status: Inappropriate | ||
9 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
10 | |||
11 | --- | ||
12 | Makefile | 4 ++++ | ||
13 | 1 file changed, 4 insertions(+) | ||
14 | |||
15 | diff --git a/Makefile b/Makefile | ||
16 | index 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 @@ | |||
1 | SUMMARY = "Network monitoring tools" | ||
2 | DESCRIPTION = "Utilities for the IP protocol, including traceroute6, \ | ||
3 | tracepath, tracepath6, ping, ping6 and arping." | ||
4 | HOMEPAGE = "https://github.com/iputils/iputils" | ||
5 | SECTION = "console/network" | ||
6 | |||
7 | LICENSE = "BSD & GPLv2+" | ||
8 | |||
9 | LIC_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 | |||
14 | DEPENDS = "gnutls libcap libgcrypt" | ||
15 | |||
16 | SRC_URI = "git://github.com/iputils/iputils \ | ||
17 | file://0001-Fix-build-on-MUSL.patch \ | ||
18 | " | ||
19 | S = "${WORKDIR}/git" | ||
20 | SRCREV = "bffc0e957b98d626ab4cea218c89251201425442" | ||
21 | |||
22 | UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>s\d+)" | ||
23 | |||
24 | EXTRA_OEMAKE = "-e MAKEFLAGS=" | ||
25 | |||
26 | PACKAGECONFIG ?= "" | ||
27 | PACKAGECONFIG[libidn] = "USE_IDN=yes,USE_IDN=no,libidn" | ||
28 | |||
29 | do_compile () { | ||
30 | oe_runmake 'CC=${CC} -D_GNU_SOURCE' VPATH="${STAGING_LIBDIR}:${STAGING_DIR_HOST}/${base_libdir}" ${PACKAGECONFIG_CONFARGS} all | ||
31 | } | ||
32 | |||
33 | do_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 | |||
45 | inherit update-alternatives | ||
46 | |||
47 | ALTERNATIVE_PRIORITY = "100" | ||
48 | |||
49 | ALTERNATIVE_${PN}-ping = "ping" | ||
50 | ALTERNATIVE_LINK_NAME[ping] = "${base_bindir}/ping" | ||
51 | |||
52 | PACKAGES += "${PN}-ping ${PN}-arping ${PN}-tracepath ${PN}-traceroute6 ${PN}-clockdiff" | ||
53 | |||
54 | ALLOW_EMPTY_${PN} = "1" | ||
55 | RDEPENDS_${PN} += "${PN}-ping ${PN}-arping ${PN}-tracepath ${PN}-traceroute6 ${PN}-clockdiff" | ||
56 | |||
57 | FILES_${PN} = "" | ||
58 | FILES_${PN}-ping = "${base_bindir}/ping.${BPN}" | ||
59 | FILES_${PN}-arping = "${base_bindir}/arping" | ||
60 | FILES_${PN}-tracepath = "${base_bindir}/tracepath" | ||
61 | FILES_${PN}-traceroute6 = "${base_bindir}/traceroute6" | ||
62 | FILES_${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 @@ | |||
1 | SUMMARY = "Network monitoring tools" | ||
2 | DESCRIPTION = "Utilities for the IP protocol, including traceroute6, \ | ||
3 | tracepath, tracepath6, ping, ping6 and arping." | ||
4 | HOMEPAGE = "https://github.com/iputils/iputils" | ||
5 | SECTION = "console/network" | ||
6 | |||
7 | LICENSE = "BSD & GPLv2+" | ||
8 | |||
9 | LIC_FILES_CHKSUM = "file://LICENSE;md5=b792e38abdc59f766a3153908f23e766 \ | ||
10 | file://LICENSE.BSD3;md5=0f00d99239d922ffd13cabef83b33444 \ | ||
11 | file://LICENSE.GPL2;md5=b234ee4d69f5fce4486a80fdaf4a4263" | ||
12 | |||
13 | DEPENDS = "gnutls libcap libgcrypt" | ||
14 | |||
15 | SRC_URI = "git://github.com/iputils/iputils \ | ||
16 | file://ai_canonidn.patch \ | ||
17 | file://install.patch" | ||
18 | SRCREV = "f6aac8dbe3f8c45c53424854a3312bdd8cdd58d3" | ||
19 | |||
20 | S = "${WORKDIR}/git" | ||
21 | |||
22 | UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>s\d+)" | ||
23 | |||
24 | EXTRA_OEMAKE = "-e MAKEFLAGS=" | ||
25 | |||
26 | PACKAGECONFIG ??= "" | ||
27 | PACKAGECONFIG[libidn] = "USE_IDN=yes,USE_IDN=no,libidn2" | ||
28 | |||
29 | do_compile () { | ||
30 | oe_runmake 'CC=${CC} -D_GNU_SOURCE' VPATH="${STAGING_LIBDIR}:${STAGING_DIR_HOST}/${base_libdir}" ${PACKAGECONFIG_CONFARGS} all | ||
31 | } | ||
32 | |||
33 | do_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 | |||
40 | inherit update-alternatives | ||
41 | |||
42 | ALTERNATIVE_PRIORITY = "100" | ||
43 | |||
44 | ALTERNATIVE_${PN}-ping = "ping" | ||
45 | ALTERNATIVE_LINK_NAME[ping] = "${base_bindir}/ping" | ||
46 | |||
47 | SPLITPKGS = "${PN}-ping ${PN}-arping ${PN}-tracepath ${PN}-traceroute6 ${PN}-clockdiff ${PN}-tftpd ${PN}-rarpd ${PN}-rdisc" | ||
48 | PACKAGES += "${SPLITPKGS}" | ||
49 | |||
50 | ALLOW_EMPTY_${PN} = "1" | ||
51 | RDEPENDS_${PN} += "${SPLITPKGS}" | ||
52 | |||
53 | FILES_${PN} = "" | ||
54 | FILES_${PN}-ping = "${base_bindir}/ping.${BPN}" | ||
55 | FILES_${PN}-arping = "${base_bindir}/arping" | ||
56 | FILES_${PN}-tracepath = "${base_bindir}/tracepath" | ||
57 | FILES_${PN}-traceroute6 = "${base_bindir}/traceroute6" | ||
58 | FILES_${PN}-clockdiff = "${base_bindir}/clockdiff" | ||
59 | FILES_${PN}-tftpd = "${base_bindir}/tftpd" | ||
60 | FILES_${PN}-rarpd = "${base_bindir}/rarpd" | ||
61 | FILES_${PN}-rdisc = "${base_bindir}/rdisc" | ||