diff options
author | Seemant Kulleen <seemant@gentoo.org> | 2004-03-29 07:34:04 +0000 |
---|---|---|
committer | Seemant Kulleen <seemant@gentoo.org> | 2004-03-29 07:34:04 +0000 |
commit | 7c48899e5570cdff1f53822ec9c79d25cc7c35b0 (patch) | |
tree | ea50fd3c96cc17c08bb915d4c3aabfabd6872d2b /sys-apps/net-tools | |
parent | openvpn fixes bug #45969 (diff) | |
download | historical-7c48899e5570cdff1f53822ec9c79d25cc7c35b0.tar.gz historical-7c48899e5570cdff1f53822ec9c79d25cc7c35b0.tar.bz2 historical-7c48899e5570cdff1f53822ec9c79d25cc7c35b0.zip |
fix for nameif segfaulting on larger mtabs, thanks to: Tony Vroon <tony@vroon.org> in bug #37769
Diffstat (limited to 'sys-apps/net-tools')
-rw-r--r-- | sys-apps/net-tools/ChangeLog | 9 | ||||
-rw-r--r-- | sys-apps/net-tools/Manifest | 7 | ||||
-rw-r--r-- | sys-apps/net-tools/files/digest-net-tools-1.60-r6 | 2 | ||||
-rw-r--r-- | sys-apps/net-tools/files/digest-net-tools-1.60-r8 | 2 | ||||
-rw-r--r-- | sys-apps/net-tools/files/net-tools-1.60-cleanup-list-handling.patch | 113 | ||||
-rw-r--r-- | sys-apps/net-tools/net-tools-1.60-r8.ebuild (renamed from sys-apps/net-tools/net-tools-1.60-r6.ebuild) | 58 |
6 files changed, 167 insertions, 24 deletions
diff --git a/sys-apps/net-tools/ChangeLog b/sys-apps/net-tools/ChangeLog index 185fedf3952f..8049b6305cea 100644 --- a/sys-apps/net-tools/ChangeLog +++ b/sys-apps/net-tools/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sys-apps/net-tools # Copyright 2002-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/net-tools/ChangeLog,v 1.26 2004/03/05 18:15:13 iggy Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/net-tools/ChangeLog,v 1.27 2004/03/29 07:34:04 seemant Exp $ + +*net-tools-1.60-r8 (28 Mar 2004) + + 28 Mar 2004; Seemant Kulleen <seemant@gentoo.org> net-tools-1.60-r6.ebuild, + net-tools-1.60-r8.ebuild, files/net-tools-1.60-cleanup-list-handling.patch: + fix for nameif segfaulting on larger mtabs, thanks to: Tony Vroon + <tony@vroon.org> in bug #37769 02 Mar 2004; Brian Jackson <iggy@gentoo.org> net-tools-1.60-r7.ebuild: adding initial s390 support diff --git a/sys-apps/net-tools/Manifest b/sys-apps/net-tools/Manifest index 99b9cb3a56dd..a3ff3f9a00cb 100644 --- a/sys-apps/net-tools/Manifest +++ b/sys-apps/net-tools/Manifest @@ -1,8 +1,9 @@ MD5 5bbca71b140fc9fab957a2c58ac1ab96 net-tools-1.60-r7.ebuild 2824 -MD5 43b24687335cd93a3d2161f52595b8bd net-tools-1.60-r6.ebuild 2274 -MD5 72e14dd1edcd806d07790e5eeb3c52ff ChangeLog 4729 +MD5 0b20cc253869d45a96e880a626579cab net-tools-1.60-r8.ebuild 2900 +MD5 64b85b69ffe8eae7914921e2bc1da823 ChangeLog 5024 MD5 9a09f8d531c582e78977dbfd96edc1f2 metadata.xml 164 +MD5 d37e7bf0b0fb617029c34b29d602927a files/net-tools-1.60-cleanup-list-handling.patch 3465 MD5 3d8683073f95e3da2c596bb09c1cbb89 files/1.60-man.patch 737 -MD5 a959c1cde872578cac11854c55ab9d55 files/digest-net-tools-1.60-r6 145 MD5 b1288e643ec595e07f37d7fd0d755ba5 files/digest-net-tools-1.60-r7 148 +MD5 b1288e643ec595e07f37d7fd0d755ba5 files/digest-net-tools-1.60-r8 148 MD5 51de6eabe2d6d6dc860f72c41cee636b files/net-tools-1.60-2.6-compilefix.patch 784 diff --git a/sys-apps/net-tools/files/digest-net-tools-1.60-r6 b/sys-apps/net-tools/files/digest-net-tools-1.60-r6 deleted file mode 100644 index c5eb47ae6299..000000000000 --- a/sys-apps/net-tools/files/digest-net-tools-1.60-r6 +++ /dev/null @@ -1,2 +0,0 @@ -MD5 888774accab40217dde927e21979c165 net-tools-1.60.tar.bz2 198520 -MD5 d5cc6a93c7d3ad2eb02bc637a1de9cf3 net-tools-1.60-gentoo-extra.tar.bz2 5785 diff --git a/sys-apps/net-tools/files/digest-net-tools-1.60-r8 b/sys-apps/net-tools/files/digest-net-tools-1.60-r8 new file mode 100644 index 000000000000..0a4ac9ee6c4e --- /dev/null +++ b/sys-apps/net-tools/files/digest-net-tools-1.60-r8 @@ -0,0 +1,2 @@ +MD5 888774accab40217dde927e21979c165 net-tools-1.60.tar.bz2 198520 +MD5 d733ef8b0bad3dbd0cf98e14b45fe1a6 net-tools-1.60-gentoo-extra-1.tar.bz2 10370 diff --git a/sys-apps/net-tools/files/net-tools-1.60-cleanup-list-handling.patch b/sys-apps/net-tools/files/net-tools-1.60-cleanup-list-handling.patch new file mode 100644 index 000000000000..93bc59461ee4 --- /dev/null +++ b/sys-apps/net-tools/files/net-tools-1.60-cleanup-list-handling.patch @@ -0,0 +1,113 @@ +Received: (at 178209) by bugs.debian.org; 6 Mar 2003 23:41:35 +0000 +From ecki@lina.inka.de Thu Mar 06 17:41:35 2003 +Return-path: <ecki@lina.inka.de> +Received: from quechua.inka.de (mail.inka.de) [193.197.184.2] (mail) + by master.debian.org with esmtp (Exim 3.12 1 (Debian)) + id 18r4zW-0005lZ-00; Thu, 06 Mar 2003 17:41:34 -0600 +Received: from calista.inka.de (p508b2614.dip.t-dialin.net [80.139.38.20]) + by mail.inka.de with asmtp + id 18r4zU-0003YP-00; Fri, 07 Mar 2003 00:41:32 +0100 +Received: from ecki by calista.inka.de with local (Exim 3.35 #1 (Debian)) + id 18r4zS-0007tr-00; Fri, 07 Mar 2003 00:41:30 +0100 +Date: Fri, 7 Mar 2003 00:41:30 +0100 +To: Matt Domsch <Matt_Domsch@dell.com> +Cc: 178209@bugs.debian.org +Subject: Re: nameif segfault in net-tools-1.60 +Message-ID: <20030306234130.GB29359@lina.inka.de> +References: <1046982565.1712.30.camel@localhost.localdomain> <20030306230708.GA29359@lina.inka.de> <1046992495.4526.19.camel@localhost.localdomain> +Mime-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +Content-Disposition: inline +In-Reply-To: <1046992495.4526.19.camel@localhost.localdomain> +User-Agent: Mutt/1.4i +From: Bernd Eckenfels <ecki@lina.inka.de> +Delivered-To: 178209@bugs.debian.org +X-Spam-Status: No, hits=-4.2 required=4.0 + tests=IN_REP_TO,PATCH_UNIFIED_DIFF,QUOTED_EMAIL_TEXT,REFERENCES, + SIGNATURE_SHORT_DENSE,SPAM_PHRASE_00_01,USER_AGENT, + USER_AGENT_MUTT + version=2.44 +X-Spam-Level: + +On Thu, Mar 06, 2003 at 05:14:55PM -0600, Matt Domsch wrote: +> 85748, filed against the Phoebe public beta so you can see it. + +I think the following will do it: + +Index: nameif.c +=================================================================== +RCS file: /cvs/net-tools/nameif.c,v +retrieving revision 1.1 +retrieving revision 1.3 +diff -u -r1.1 -r1.3 +--- nameif.c 18 Oct 2000 17:26:29 -0000 1.1 ++++ nameif.c 6 Mar 2003 23:26:52 -0000 1.3 +@@ -3,7 +3,7 @@ + * Writen 2000 by Andi Kleen. + * Subject to the Gnu Public License, version 2. + * TODO: make it support token ring etc. +- * $Id: net-tools-1.60-cleanup-list-handling.patch,v 1.1 2004/03/29 07:34:04 seemant Exp $ ++ * $Id: net-tools-1.60-cleanup-list-handling.patch,v 1.1 2004/03/29 07:34:04 seemant Exp $ + */ + #ifndef _GNU_SOURCE + #define _GNU_SOURCE +@@ -117,7 +117,8 @@ + } + + struct change { +- struct change *next,**pprev; ++ struct change *next; ++ int found; + char ifname[IFNAMSIZ+1]; + unsigned char mac[6]; + }; +@@ -139,10 +140,7 @@ + ch->ifname, pos); + if (parsemac(p,ch->mac) < 0) + complain(_("cannot parse MAC `%s' at %s"), p, pos); +- if (clist) +- clist->pprev = &ch->next; + ch->next = clist; +- ch->pprev = &clist; + clist = ch; + return 0; + } +@@ -200,7 +198,7 @@ + + void usage(void) + { +- fprintf(stderr, _("usage: nameif [-c configurationfile] [-s] {ifname macaddress}")); ++ fprintf(stderr, _("usage: nameif [-c configurationfile] [-s] {ifname macaddress}\n")); + exit(1); + } + +@@ -277,21 +275,21 @@ + ch = lookupmac(mac); + if (!ch) + continue; +- +- *ch->pprev = ch->next; ++ ++ ch->found = 1; + if (strcmp(p, ch->ifname)) { + if (setname(p, ch->ifname) < 0) + complain(_("cannot change name of %s to %s: %s"), + p, ch->ifname, strerror(errno)); + } +- free(ch); + } + fclose(ifh); + + while (clist) { + struct change *ch = clist; + clist = clist->next; +- warning(_("interface '%s' not found"), ch->ifname); ++ if (!ch->found) ++ warning(_("interface '%s' not found"), ch->ifname); + free(ch); + } + + + + + diff --git a/sys-apps/net-tools/net-tools-1.60-r6.ebuild b/sys-apps/net-tools/net-tools-1.60-r8.ebuild index b8336cec8ed4..982a930ec391 100644 --- a/sys-apps/net-tools/net-tools-1.60-r6.ebuild +++ b/sys-apps/net-tools/net-tools-1.60-r8.ebuild @@ -1,51 +1,73 @@ -# Copyright 1999-2003 Gentoo Technologies, Inc. +# Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/net-tools/net-tools-1.60-r6.ebuild,v 1.4 2004/02/23 00:47:32 agriffis Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/net-tools/net-tools-1.60-r8.ebuild,v 1.1 2004/03/29 07:34:04 seemant Exp $ inherit eutils -DESCRIPTION="standard Linux network tools" +DESCRIPTION="Standard Linux networking tools" SRC_URI="http://www.tazenda.demon.co.uk/phil/net-tools/${P}.tar.bz2 - mirror://gentoo/${P}-gentoo-extra.tar.bz2" + mirror://gentoo/${P}-gentoo-extra-1.tar.bz2" HOMEPAGE="http://sites.inka.de/lina/linux/NetTools/" SLOT="0" LICENSE="GPL-2" -KEYWORDS="x86 amd64 ppc sparc alpha hppa mips" -IUSE="nls build" +KEYWORDS="~x86 ~ppc ~sparc ~alpha ~hppa ~mips ~amd64 ~ia64 ~ppc64 ~s390" +IUSE="nls build static" -DEPEND="nls? ( sys-devel/gettext )" +DEPEND="nls? ( sys-devel/gettext ) + >=sys-apps/sed-4" src_unpack() { + + if [ "`use static`" ] ; then + CFLAGS="${CFLAGS} -static" + LDFLAGS="${LDFLAGS} -static" + fi + PATCHDIR=${WORKDIR}/${P}-gentoo unpack ${A} cd ${S} + # Compile fix for 2.6 kernels + epatch ${FILESDIR}/net-tools-1.60-2.6-compilefix.patch + + epatch ${FILESDIR}/net-tools-1.60-cleanup-list-handling.patch + # some redhat patches + epatch ${PATCHDIR}/net-tools-1.54-ipvs.patch epatch ${PATCHDIR}/net-tools-1.57-bug22040.patch epatch ${PATCHDIR}/net-tools-1.60-manydevs.patch epatch ${PATCHDIR}/net-tools-1.60-miiioctl.patch + epatch ${PATCHDIR}/net-tools-1.60-virtualname.patch + epatch ${PATCHDIR}/net-tools-1.60-cycle.patch + + # GCC-3.3 Compile Fix + epatch ${PATCHDIR}/${P}-multiline-string.patch + + # manpage fix #29677 + epatch ${FILESDIR}/${PV}-man.patch cp ${PATCHDIR}/net-tools-1.60-config.h config.h cp ${PATCHDIR}/net-tools-1.60-config.make config.make - cp Makefile Makefile.orig - sed -e "s:-O2 -Wall -g:${CFLAGS}:" Makefile.orig > Makefile + sed -i \ + -e "s:-O2 -Wall -g:${CFLAGS}:" \ + -e "/^LOPTS =/ s/\$/${CFLAGS}/" Makefile || + die "sed Makefile failed" - cd man - cp Makefile Makefile.orig - sed -e "s:/usr/man:/usr/share/man:" Makefile.orig > Makefile + sed -i -e "s:/usr/man:/usr/share/man:" man/Makefile || \ + die "sed man/Makefile failed" cp -f ${PATCHDIR}/ether-wake.c ${S} - cd ${S} + cp -f ${PATCHDIR}/ether-wake.8 ${S}/man/en_US if [ -z "`use nls`" ] ; then - mv config.h config.h.orig - sed 's:\(#define I18N\) 1:\1 0:' config.h.orig > config.h + sed -i -e 's:\(#define I18N\) 1:\1 0:' config.h || \ + die "sed config.h failed" - mv config.make config.make.orig - sed 's:I18N=1:I18N=0:' config.make.orig > config.make + sed -i -e 's:I18N=1:I18N=0:' config.make || + die "sed config.make failed" fi touch config.{h,make} # sync timestamps @@ -60,9 +82,9 @@ src_compile() { if [ "`use nls`" ] ; then cd po make || die - cd ${S} fi + cd ${S} gcc ${CFLAGS} -o ether-wake ether-wake.c || die } |