diff options
Diffstat (limited to 'poky/meta/recipes-extended/iputils')
-rw-r--r-- | poky/meta/recipes-extended/iputils/files/0001-Fix-build-on-MUSL.patch | 95 | ||||
-rw-r--r-- | poky/meta/recipes-extended/iputils/iputils_s20161105.bb | 62 |
2 files changed, 157 insertions, 0 deletions
diff --git a/poky/meta/recipes-extended/iputils/files/0001-Fix-build-on-MUSL.patch b/poky/meta/recipes-extended/iputils/files/0001-Fix-build-on-MUSL.patch new file mode 100644 index 000000000..ce8cfebbb --- /dev/null +++ b/poky/meta/recipes-extended/iputils/files/0001-Fix-build-on-MUSL.patch @@ -0,0 +1,95 @@ +From c6c5966d9fae27bc2f0a34ab59b999555111bd2d Mon Sep 17 00:00:00 2001 +From: Aric Belsito <lluixhi@gmail.com> +Date: Sun, 29 Oct 2017 23:17:03 +0100 +Subject: [PATCH] Fix build on MUSL + +Add missing AI_IDN and NI_IDN declarations. + +Bug: https://bugs.gentoo.org/503914 + +Upstream-Status: Pending +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + arping.c | 7 +++++++ + ping.h | 11 +++++++++++ + tracepath.c | 8 ++++++++ + traceroute6.c | 4 ++++ + 4 files changed, 30 insertions(+) + +diff --git a/arping.c b/arping.c +index 1a3f40b..531d29d 100644 +--- a/arping.c ++++ b/arping.c +@@ -45,6 +45,13 @@ struct sysfs_devattr_values; + #ifdef USE_IDN + #include <idna.h> + #include <locale.h> ++ ++#ifndef AI_IDN ++#define AI_IDN 0x0040 ++#endif ++#ifndef AI_CANONIDN ++#define AI_CANONIDN 0x0080 ++#endif + #endif + + #include "SNAPSHOT.h" +diff --git a/ping.h b/ping.h +index 749f3ff..227315f 100644 +--- a/ping.h ++++ b/ping.h +@@ -38,6 +38,17 @@ + #include <locale.h> + #include <idna.h> + #include <stringprep.h> ++ ++#ifndef AI_IDN ++#define AI_IDN 0x0040 ++#endif ++#ifndef AI_CANONIDN ++#define AI_CANONIDN 0x0080 ++#endif ++#ifndef NI_IDN ++#define NI_IDN 32 ++#endif ++ + #define getaddrinfo_flags (AI_CANONNAME | AI_IDN | AI_CANONIDN) + #define getnameinfo_flags NI_IDN + #else +diff --git a/tracepath.c b/tracepath.c +index 74a829d..dcec5b9 100644 +--- a/tracepath.c ++++ b/tracepath.c +@@ -30,6 +30,14 @@ + #ifdef USE_IDN + #include <idna.h> + #include <locale.h> ++ ++#ifndef AI_IDN ++#define AI_IDN 0x0040 ++#endif ++#ifndef NI_IDN ++#define NI_IDN 32 ++#endif ++ + #define getnameinfo_flags NI_IDN + #else + #define getnameinfo_flags 0 +diff --git a/traceroute6.c b/traceroute6.c +index 48fc5c5..8d1eebf 100644 +--- a/traceroute6.c ++++ b/traceroute6.c +@@ -251,6 +251,10 @@ + #include <idna.h> + #include <locale.h> + ++#ifndef NI_IDN ++#define NI_IDN 32 ++#endif ++ + #define getnameinfo_flags NI_IDN + #else + #define getnameinfo_flags 0 +-- +2.15.1 + diff --git a/poky/meta/recipes-extended/iputils/iputils_s20161105.bb b/poky/meta/recipes-extended/iputils/iputils_s20161105.bb new file mode 100644 index 000000000..0125739b0 --- /dev/null +++ b/poky/meta/recipes-extended/iputils/iputils_s20161105.bb @@ -0,0 +1,62 @@ +SUMMARY = "Network monitoring tools" +DESCRIPTION = "Utilities for the IP protocol, including traceroute6, \ +tracepath, tracepath6, ping, ping6 and arping." +HOMEPAGE = "https://github.com/iputils/iputils" +SECTION = "console/network" + +LICENSE = "BSD & GPLv2+" + +LIC_FILES_CHKSUM = "file://ping.c;beginline=1;endline=35;md5=f9ceb201733e9a6cf8f00766dd278d82 \ + file://tracepath.c;beginline=1;endline=10;md5=0ecea2bf60bff2f3d840096d87647f3d \ + file://arping.c;beginline=1;endline=11;md5=fe84301b5c2655c950f8b92a057fafa6 \ + file://tftpd.c;beginline=1;endline=32;md5=28834bf8a91a5b8a92755dbee709ef96 " + +DEPENDS = "gnutls libcap libgcrypt" + +SRC_URI = "git://github.com/iputils/iputils \ + file://0001-Fix-build-on-MUSL.patch \ + " +S = "${WORKDIR}/git" +SRCREV = "bffc0e957b98d626ab4cea218c89251201425442" + +UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>s\d+)" + +EXTRA_OEMAKE = "-e MAKEFLAGS=" + +PACKAGECONFIG ?= "" +PACKAGECONFIG[libidn] = "USE_IDN=yes,USE_IDN=no,libidn" + +do_compile () { + oe_runmake 'CC=${CC} -D_GNU_SOURCE' VPATH="${STAGING_LIBDIR}:${STAGING_DIR_HOST}/${base_libdir}" ${PACKAGECONFIG_CONFARGS} all +} + +do_install () { + install -m 0755 -d ${D}${base_bindir} + # SUID root programs + install -m 4555 ping ${D}${base_bindir}/ping + install -m 4555 traceroute6 ${D}${base_bindir}/ + install -m 4555 clockdiff ${D}${base_bindir}/ + # Other programgs + for i in arping tracepath; do + install -m 0755 $i ${D}${base_bindir}/ + done +} + +inherit update-alternatives + +ALTERNATIVE_PRIORITY = "100" + +ALTERNATIVE_${PN}-ping = "ping" +ALTERNATIVE_LINK_NAME[ping] = "${base_bindir}/ping" + +PACKAGES += "${PN}-ping ${PN}-arping ${PN}-tracepath ${PN}-traceroute6 ${PN}-clockdiff" + +ALLOW_EMPTY_${PN} = "1" +RDEPENDS_${PN} += "${PN}-ping ${PN}-arping ${PN}-tracepath ${PN}-traceroute6 ${PN}-clockdiff" + +FILES_${PN} = "" +FILES_${PN}-ping = "${base_bindir}/ping.${BPN}" +FILES_${PN}-arping = "${base_bindir}/arping" +FILES_${PN}-tracepath = "${base_bindir}/tracepath" +FILES_${PN}-traceroute6 = "${base_bindir}/traceroute6" +FILES_${PN}-clockdiff = "${base_bindir}/clockdiff" |