summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2008-01-26 07:09:32 +0000
committerMike Frysinger <vapier@gentoo.org>2008-01-26 07:09:32 +0000
commit118624c221b76b64386b7faac27f89d908030d5e (patch)
treec0519a567499efdee98eaecf33b6e9170e027b91 /net-misc
parentamd64 stable wrt #207255 (diff)
downloadgentoo-2-118624c221b76b64386b7faac27f89d908030d5e.tar.gz
gentoo-2-118624c221b76b64386b7faac27f89d908030d5e.tar.bz2
gentoo-2-118624c221b76b64386b7faac27f89d908030d5e.zip
Version bump #207289.
(Portage version: 2.1.4)
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/iputils/ChangeLog11
-rw-r--r--net-misc/iputils/files/digest-iputils-200711273
-rw-r--r--net-misc/iputils/files/iputils-20071127-gcc34.patch134
-rw-r--r--net-misc/iputils/files/iputils-20071127-kernel-ifaddr.patch55
-rw-r--r--net-misc/iputils/iputils-20071127.ebuild77
5 files changed, 278 insertions, 2 deletions
diff --git a/net-misc/iputils/ChangeLog b/net-misc/iputils/ChangeLog
index 360dc82316cb..a13a98d7f8e2 100644
--- a/net-misc/iputils/ChangeLog
+++ b/net-misc/iputils/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for net-misc/iputils
-# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/iputils/ChangeLog,v 1.62 2007/10/28 21:24:54 vapier Exp $
+# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/iputils/ChangeLog,v 1.63 2008/01/26 07:09:31 vapier Exp $
+
+*iputils-20071127 (26 Jan 2008)
+
+ 26 Jan 2008; Mike Frysinger <vapier@gentoo.org>
+ +files/iputils-20071127-gcc34.patch,
+ +files/iputils-20071127-kernel-ifaddr.patch, +iputils-20071127.ebuild:
+ Version bump #207289.
28 Oct 2007; Mike Frysinger <vapier@gentoo.org> iputils-20070202.ebuild:
Block net-misc/rarpd #197110 by kouyu.
diff --git a/net-misc/iputils/files/digest-iputils-20071127 b/net-misc/iputils/files/digest-iputils-20071127
new file mode 100644
index 000000000000..40921fa79b25
--- /dev/null
+++ b/net-misc/iputils/files/digest-iputils-20071127
@@ -0,0 +1,3 @@
+MD5 12245e9927d60ff5cf4a99d265bcb7d3 iputils-s20071127.tar.bz2 88796
+RMD160 2ca3d0ca25c7e0a197176a7438d803171d4e74e6 iputils-s20071127.tar.bz2 88796
+SHA256 dbbd87554d66e438245487ac31aa4a542a1c6c1ec8273cfacbbfeda09eb44a93 iputils-s20071127.tar.bz2 88796
diff --git a/net-misc/iputils/files/iputils-20071127-gcc34.patch b/net-misc/iputils/files/iputils-20071127-gcc34.patch
new file mode 100644
index 000000000000..36ea5424cf1d
--- /dev/null
+++ b/net-misc/iputils/files/iputils-20071127-gcc34.patch
@@ -0,0 +1,134 @@
+iputils has a lot of ugly goto's that break when using
+large gcc inline-limits.
+
+Fixes by Robert Moss and Dave Stahl
+http://bugs.gentoo.org/49241
+http://bugs.gentoo.org/80969
+
+--- iputils/tracepath.c
++++ iputils/tracepath.c
+@@ -76,7 +76,7 @@
+ int progress = -1;
+ int broken_router;
+
+-restart:
++ while (1) {
+ memset(&rcvbuf, -1, sizeof(rcvbuf));
+ iov.iov_base = &rcvbuf;
+ iov.iov_len = sizeof(rcvbuf);
+@@ -93,7 +93,7 @@
+ if (res < 0) {
+ if (errno == EAGAIN)
+ return progress;
+- goto restart;
++ continue;
+ }
+
+ progress = mtu;
+@@ -216,7 +216,7 @@
+ perror("NET ERROR");
+ return 0;
+ }
+- goto restart;
++ }
+ }
+
+ int probe_ttl(int fd, int ttl)
+@@ -227,7 +227,6 @@
+
+ memset(sndbuf,0,mtu);
+
+-restart:
+ for (i=0; i<10; i++) {
+ int res;
+
+@@ -243,7 +242,8 @@
+ if (res==0)
+ return 0;
+ if (res > 0)
+- goto restart;
++ i = 0;
++ continue;
+ }
+ hisptr = (hisptr + 1)&63;
+
+--- iputils/tracepath6.c
++++ iputils/tracepath6.c
+@@ -66,7 +66,7 @@
+ int progress = -1;
+ int broken_router;
+
+-restart:
++ while (1) {
+ memset(&rcvbuf, -1, sizeof(rcvbuf));
+ iov.iov_base = &rcvbuf;
+ iov.iov_len = sizeof(rcvbuf);
+@@ -83,7 +83,7 @@
+ if (res < 0) {
+ if (errno == EAGAIN)
+ return progress;
+- goto restart;
++ continue;
+ }
+
+ progress = 2;
+@@ -222,34 +222,29 @@
+ perror("NET ERROR");
+ return 0;
+ }
+- goto restart;
++ }
+ }
+
+ int probe_ttl(int fd, int ttl)
+ {
+- int i;
++ int i=0, res;
+ char sndbuf[mtu];
+ struct probehdr *hdr = (struct probehdr*)sndbuf;
+
+-restart:
+-
+- for (i=0; i<10; i++) {
+- int res;
+-
+- hdr->ttl = ttl;
+- gettimeofday(&hdr->tv, NULL);
+- if (send(fd, sndbuf, mtu-overhead, 0) > 0)
+- break;
+- res = recverr(fd, ttl);
+- if (res==0)
+- return 0;
+- if (res > 0)
+- goto restart;
+- }
+-
+- if (i<10) {
+- int res;
+-
++ while (i<10) {
++ for (i=0; i<10; i++) {
++ hdr->ttl = ttl;
++ gettimeofday(&hdr->tv, NULL);
++ if (send(fd, sndbuf, mtu-overhead, 0) > 0)
++ break;
++ res = recverr(fd, ttl);
++ if (res==0)
++ return 0;
++ if (res > 0) {
++ i = 0;
++ continue;
++ }
++ }
+ data_wait(fd);
+ if (recv(fd, sndbuf, sizeof(sndbuf), MSG_DONTWAIT) > 0) {
+ printf("%2d?: reply received 8)\n", ttl);
+@@ -257,7 +252,7 @@
+ }
+ res = recverr(fd, ttl);
+ if (res == 1)
+- goto restart;
++ continue;
+ return res;
+ }
+
diff --git a/net-misc/iputils/files/iputils-20071127-kernel-ifaddr.patch b/net-misc/iputils/files/iputils-20071127-kernel-ifaddr.patch
new file mode 100644
index 000000000000..af5587fa6f24
--- /dev/null
+++ b/net-misc/iputils/files/iputils-20071127-kernel-ifaddr.patch
@@ -0,0 +1,55 @@
+--- rarpd.c
++++ rarpd.c
+@@ -55,10 +55,10 @@ struct iflink
+ unsigned char lladdr[16];
+ char name[IFNAMSIZ];
+- struct ifaddr *ifa_list;
++ struct kern_ifaddr *ifa_list;
+ } *ifl_list;
+
+-struct ifaddr
++struct kern_ifaddr
+ {
+- struct ifaddr *next;
++ struct kern_ifaddr *next;
+ __u32 prefix;
+ __u32 mask;
+@@ -92,5 +92,5 @@ void load_if(void)
+ struct ifreq *ifrp, *ifend;
+ struct iflink *ifl;
+- struct ifaddr *ifa;
++ struct kern_ifaddr *ifa;
+ struct ifconf ifc;
+ struct ifreq ibuf[256];
+@@ -183,5 +183,5 @@ void load_if(void)
+ if (mask == 0 || prefix == 0)
+ continue;
+- ifa = (struct ifaddr*)malloc(sizeof(*ifa));
++ ifa = (struct kern_ifaddr*)malloc(sizeof(*ifa));
+ memset(ifa, 0, sizeof(*ifa));
+ ifa->local = addr;
+@@ -239,8 +239,8 @@ int bootable(__u32 addr)
+ }
+
+-struct ifaddr *select_ipaddr(int ifindex, __u32 *sel_addr, __u32 **alist)
++struct kern_ifaddr *select_ipaddr(int ifindex, __u32 *sel_addr, __u32 **alist)
+ {
+ struct iflink *ifl;
+- struct ifaddr *ifa;
++ struct kern_ifaddr *ifa;
+ int retry = 0;
+ int i;
+@@ -298,5 +298,5 @@ struct rarp_map *rarp_lookup(int ifindex
+ if (r == NULL) {
+ if (hatype == ARPHRD_ETHER && halen == 6) {
+- struct ifaddr *ifa;
++ struct kern_ifaddr *ifa;
+ struct hostent *hp;
+ char ename[256];
+@@ -371,5 +371,5 @@ int put_myipaddr(unsigned char **ptr_p,
+ __u32 laddr = 0;
+ struct iflink *ifl;
+- struct ifaddr *ifa;
++ struct kern_ifaddr *ifa;
+
+ for (ifl=ifl_list; ifl; ifl = ifl->next)
diff --git a/net-misc/iputils/iputils-20071127.ebuild b/net-misc/iputils/iputils-20071127.ebuild
new file mode 100644
index 000000000000..9fbd4aef834c
--- /dev/null
+++ b/net-misc/iputils/iputils-20071127.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/iputils/iputils-20071127.ebuild,v 1.1 2008/01/26 07:09:31 vapier Exp $
+
+inherit flag-o-matic eutils toolchain-funcs
+
+DESCRIPTION="Network monitoring tools including ping and ping6"
+HOMEPAGE="http://www.skbuff.net/iputils/"
+SRC_URI="http://www.skbuff.net/iputils/iputils-s${PV}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="static ipv6 doc"
+
+DEPEND="virtual/os-headers
+ doc? (
+ app-text/openjade
+ dev-perl/SGMLSpm
+ app-text/docbook-sgml-dtd
+ app-text/docbook-sgml-utils
+ )"
+RDEPEND="!net-misc/rarpd"
+
+S=${WORKDIR}/${PN}-s${PV}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-gcc34.patch
+ epatch "${FILESDIR}"/021109-uclibc-no-ether_ntohost.patch
+ epatch "${FILESDIR}"/${PN}-20070202-makefile.patch
+ epatch "${FILESDIR}"/${P}-kernel-ifaddr.patch
+ epatch "${FILESDIR}"/${PN}-20060512-linux-headers.patch
+ epatch "${FILESDIR}"/${PN}-20070202-no-open-max.patch #195861
+
+ use static && append-ldflags -static
+ use ipv6 || sed -i -e 's:IPV6_TARGETS=:#IPV6_TARGETS=:' Makefile
+}
+
+src_compile() {
+ tc-export CC
+ emake || die "make main failed"
+
+ # We include the extra check for docbook2html
+ # because when we emerge from a stage1/stage2,
+ # it may not exist #23156
+ if use doc && type -p docbook2html ; then
+ emake -j1 html man || die
+ fi
+}
+
+src_install() {
+ into /
+ dobin ping || die "ping"
+ use ipv6 && dobin ping6
+ dosbin arping || die "arping"
+ into /usr
+ dosbin tracepath || die "tracepath"
+ use ipv6 && dosbin trace{path,route}6
+ dosbin clockdiff rarpd rdisc ipg tftpd || die "misc sbin"
+
+ fperms 4711 /bin/ping
+ use ipv6 && fperms 4711 /bin/ping6 /usr/sbin/traceroute6
+
+ dodoc INSTALL RELNOTES
+
+ if use doc ; then
+ rm -f doc/setkey.8
+ use ipv6 \
+ && dosym ping.8 /usr/share/man/man8/ping6.8 \
+ || rm -f doc/*6.8
+ doman doc/*.8
+
+ dohtml doc/*.html
+ fi
+}