diff options
Diffstat (limited to 'yocto-poky/meta/recipes-extended/iputils')
5 files changed, 181 insertions, 0 deletions
diff --git a/yocto-poky/meta/recipes-extended/iputils/files/debian/targets.diff b/yocto-poky/meta/recipes-extended/iputils/files/debian/targets.diff new file mode 100644 index 000000000..2cb5576c6 --- /dev/null +++ b/yocto-poky/meta/recipes-extended/iputils/files/debian/targets.diff @@ -0,0 +1,15 @@ +Upstream-Status: Inappropriate [disable feature] + +Index: iputils-s20121221/Makefile +=================================================================== +--- iputils-s20121221.orig/Makefile ++++ iputils-s20121221/Makefile +@@ -106,7 +106,7 @@ endif + endif + + # ------------------------------------- +-IPV4_TARGETS=tracepath ping clockdiff rdisc arping tftpd rarpd ++IPV4_TARGETS=tracepath ping clockdiff arping + IPV6_TARGETS=tracepath6 traceroute6 ping6 + TARGETS=$(IPV4_TARGETS) $(IPV6_TARGETS) + diff --git a/yocto-poky/meta/recipes-extended/iputils/files/debian/use_gethostbyname2.diff b/yocto-poky/meta/recipes-extended/iputils/files/debian/use_gethostbyname2.diff new file mode 100644 index 000000000..d3b18868c --- /dev/null +++ b/yocto-poky/meta/recipes-extended/iputils/files/debian/use_gethostbyname2.diff @@ -0,0 +1,31 @@ +Upstream-Status: Pending [from other distro Debian] + +Index: iputils-s20121221/tracepath.c +=================================================================== +--- iputils-s20121221.orig/tracepath.c ++++ iputils-s20121221/tracepath.c +@@ -370,9 +370,9 @@ main(int argc, char **argv) + } + #endif + +- he = gethostbyname(p); ++ he = gethostbyname2(argv[0], AF_INET); + if (he == NULL) { +- herror("gethostbyname"); ++ herror("gethostbyname2"); + exit(1); + } + +Index: iputils-s20121221/ping.c +=================================================================== +--- iputils-s20121221.orig/ping.c ++++ iputils-s20121221/ping.c +@@ -279,7 +279,7 @@ main(int argc, char **argv) + #else + idn = target; + #endif +- hp = gethostbyname(idn); ++ hp = gethostbyname2(idn, AF_INET); + if (!hp) { + fprintf(stderr, "ping: unknown host %s\n", target); + exit(2); diff --git a/yocto-poky/meta/recipes-extended/iputils/files/fix-build-command-line-argument-with-gnutls.patch b/yocto-poky/meta/recipes-extended/iputils/files/fix-build-command-line-argument-with-gnutls.patch new file mode 100644 index 000000000..b9cd82ee8 --- /dev/null +++ b/yocto-poky/meta/recipes-extended/iputils/files/fix-build-command-line-argument-with-gnutls.patch @@ -0,0 +1,37 @@ +Upstream-Status: Backport + +From 568e990d30fc7e9416e0a6f8c74ea5013921eaec Mon Sep 17 00:00:00 2001 +From: Arjan van de Ven <arjanvandeven@gmail.com> +Date: Wed, 16 Jan 2013 03:12:15 +0900 +Subject: [PATCH] ping6: Fix build command line argument with gnutls. + +The ping6 command can use either openssl or gnutls... +and the Makefile has a bunch of setup for defining which of the two to use. + +Unfortunately, the final -D define on the commandline to enable gnutls +inside the ping6.c file didn't actually make it onto the gcc +commandline. +This patch adds the $(DEF_CRYPTO) Makefile variable to fix this gap. + +Signed-off-by: Arjan van de Ven <arjanvandeven@gmail.com> +Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> +--- + Makefile | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/Makefile b/Makefile +index c62d9df..89249f5 100644 +--- a/Makefile ++++ b/Makefile +@@ -149,7 +149,7 @@ LIB_clockdiff = $(LIB_CAP) + DEF_ping_common = $(DEF_CAP) $(DEF_IDN) + DEF_ping = $(DEF_CAP) $(DEF_IDN) $(DEF_WITHOUT_IFADDRS) + LIB_ping = $(LIB_CAP) $(LIB_IDN) +-DEF_ping6 = $(DEF_CAP) $(DEF_IDN) $(DEF_WITHOUT_IFADDRS) $(DEF_ENABLE_PING6_RTHDR) ++DEF_ping6 = $(DEF_CAP) $(DEF_IDN) $(DEF_WITHOUT_IFADDRS) $(DEF_ENABLE_PING6_RTHDR) $(DEF_CRYPTO) + LIB_ping6 = $(LIB_CAP) $(LIB_IDN) $(LIB_RESOLV) $(LIB_CRYPTO) + + ping: ping_common.o +-- +1.7.2.5 + diff --git a/yocto-poky/meta/recipes-extended/iputils/files/nsgmls-path-fix.patch b/yocto-poky/meta/recipes-extended/iputils/files/nsgmls-path-fix.patch new file mode 100644 index 000000000..92bf946f2 --- /dev/null +++ b/yocto-poky/meta/recipes-extended/iputils/files/nsgmls-path-fix.patch @@ -0,0 +1,27 @@ +Fix nsgmls path issue + +Upstream-Status: Pending + +Signed-off-by: Zhai Edwin <edwin.zhai@intel.com> + +Index: iputils-s20101006/doc/Makefile +=================================================================== +--- iputils-s20101006.orig/doc/Makefile 2011-09-13 20:42:27.000000000 +0800 ++++ iputils-s20101006/doc/Makefile 2011-09-13 21:01:52.000000000 +0800 +@@ -27,10 +27,15 @@ + # docbook2man produces utterly ugly output and I did not find + # any way to customize this but hacking backend perl script a little. + # Well, hence... ++# nsgmls seems append path to search directory according to the sysid path. ++# e.g. if input ../index.db, it would search $search_directory/../ rather than ++# $search_directory, which leads searching failure. Fixing nsgmls probably ++# introduce some side effects, so use this ugly hack: running nsgmls in current ++# directory, and running docbook2man in tmp directory. + + $(MANFILES): index.db + @-mkdir tmp.db2man +- @set -e; cd tmp.db2man; nsgmls ../$< | sgmlspl ../docbook2man-spec.pl ; mv $@ .. ++ @set -e; nsgmls $< >tmp.db2man/output; cd tmp.db2man; cat output | sgmlspl ../docbook2man-spec.pl ; mv $@ .. + @-rm -rf tmp.db2man + + clean: diff --git a/yocto-poky/meta/recipes-extended/iputils/iputils_s20121221.bb b/yocto-poky/meta/recipes-extended/iputils/iputils_s20121221.bb new file mode 100644 index 000000000..e87a32a7d --- /dev/null +++ b/yocto-poky/meta/recipes-extended/iputils/iputils_s20121221.bb @@ -0,0 +1,71 @@ +SUMMARY = "Network monitoring tools" +DESCRIPTION = "Utilities for the IP protocol, including traceroute6, \ +tracepath, tracepath6, ping, ping6 and arping." +HOMEPAGE = "http://www.skbuff.net/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 docbook-utils-native sgmlspl-native libcap" + + +SRC_URI = "http://www.skbuff.net/iputils/${BPN}-${PV}.tar.bz2 \ + file://debian/use_gethostbyname2.diff \ + file://debian/targets.diff \ + file://nsgmls-path-fix.patch \ + file://fix-build-command-line-argument-with-gnutls.patch \ + " + +SRC_URI[md5sum] = "6072aef64205720dd1893b375e184171" +SRC_URI[sha256sum] = "450f549fc5b620c23c5929aa6d54b7ddfc7ee1cb1e8efdc5e8bb21d8d0c5319f" + +do_compile () { + oe_runmake 'CC=${CC} -D_GNU_SOURCE' VPATH="${STAGING_LIBDIR}:${STAGING_DIR_HOST}/${base_libdir}" all man +} + +do_install () { + install -m 0755 -d ${D}${base_bindir} ${D}${mandir}/man8 + # SUID root programs + install -m 4555 ping ${D}${base_bindir}/ping + install -m 4555 ping6 ${D}${base_bindir}/ping6 + install -m 4555 traceroute6 ${D}${base_bindir}/ + install -m 4555 clockdiff ${D}${base_bindir}/ + # Other programgs + for i in arping tracepath tracepath6; do + install -m 0755 $i ${D}${base_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/ || true + done +} + +inherit update-alternatives + +ALTERNATIVE_PRIORITY = "100" + +ALTERNATIVE_${PN}-ping = "ping" +ALTERNATIVE_LINK_NAME[ping] = "${base_bindir}/ping" + +ALTERNATIVE_${PN}-ping6 = "ping6" +ALTERNATIVE_LINK_NAME[ping6] = "${base_bindir}/ping6" + +PACKAGES += "${PN}-ping ${PN}-ping6 ${PN}-arping ${PN}-tracepath ${PN}-tracepath6 ${PN}-traceroute6 ${PN}-clockdiff" + +ALLOW_EMPTY_${PN} = "1" +RDEPENDS_${PN} += "${PN}-ping ${PN}-ping6 ${PN}-arping ${PN}-tracepath ${PN}-tracepath6 ${PN}-traceroute6 ${PN}-clockdiff" + +FILES_${PN} = "" +FILES_${PN}-ping = "${base_bindir}/ping.${BPN}" +FILES_${PN}-ping6 = "${base_bindir}/ping6.${BPN}" +FILES_${PN}-arping = "${base_bindir}/arping" +FILES_${PN}-tracepath = "${base_bindir}/tracepath" +FILES_${PN}-tracepath6 = "${base_bindir}/tracepath6" +FILES_${PN}-traceroute6 = "${base_bindir}/traceroute6" +FILES_${PN}-clockdiff = "${base_bindir}/clockdiff" +FILES_${PN}-doc = "${mandir}/man8" |