diff options
author | Peter Volkov <pva@gentoo.org> | 2010-10-09 13:10:15 +0000 |
---|---|---|
committer | Peter Volkov <pva@gentoo.org> | 2010-10-09 13:10:15 +0000 |
commit | 3dda4e8447550f305622911c41c0c18631dc3f0a (patch) | |
tree | dc951dd77c067819c4f0d77be2f1a7676d1c57d2 /net-firewall/arptables | |
parent | Drop ree18/ruby19 to create a stable candidate. (diff) | |
download | gentoo-2-3dda4e8447550f305622911c41c0c18631dc3f0a.tar.gz gentoo-2-3dda4e8447550f305622911c41c0c18631dc3f0a.tar.bz2 gentoo-2-3dda4e8447550f305622911c41c0c18631dc3f0a.zip |
Fixed arptables-save, bug #339377, thank Alexey Vlasov for report. Borrowed some additional patches from debian.
(Portage version: 2.1.9.14/cvs/Linux x86_64)
Diffstat (limited to 'net-firewall/arptables')
5 files changed, 102 insertions, 1 deletions
diff --git a/net-firewall/arptables/ChangeLog b/net-firewall/arptables/ChangeLog index e3bb042796ca..fc9d1ab97921 100644 --- a/net-firewall/arptables/ChangeLog +++ b/net-firewall/arptables/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for net-firewall/arptables # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-firewall/arptables/ChangeLog,v 1.16 2010/09/15 13:51:39 pva Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-firewall/arptables/ChangeLog,v 1.17 2010/10/09 13:10:07 pva Exp $ + +*arptables-0.0.3.4-r2 (09 Oct 2010) + + 09 Oct 2010; Peter Volkov <pva@gentoo.org> +arptables-0.0.3.4-r2.ebuild, + +files/arptables-0.0.3.4-arptables_save.patch, + +files/arptables-0.0.3.4-manpage.patch, + +files/arptables-0.0.3.4-type.patch: + Fixed arptables-save, bug #339377, thank Alexey Vlasov for report. + Borrowed some additional patches from debian. *arptables-0.0.3.4-r1 (15 Sep 2010) diff --git a/net-firewall/arptables/arptables-0.0.3.4-r2.ebuild b/net-firewall/arptables/arptables-0.0.3.4-r2.ebuild new file mode 100644 index 000000000000..31c4ee6978b2 --- /dev/null +++ b/net-firewall/arptables/arptables-0.0.3.4-r2.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-firewall/arptables/arptables-0.0.3.4-r2.ebuild,v 1.1 2010/10/09 13:10:15 pva Exp $ + +EAPI="2" +inherit versionator eutils + +MY_P=${PN}-v$(replace_version_separator 3 - ) + +DESCRIPTION="set up, maintain, and inspect the tables of ARP rules in the Linux kernel" +HOMEPAGE="http://ebtables.sourceforge.net/" +SRC_URI="mirror://sourceforge/ebtables/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="" + +S=${WORKDIR}/${MY_P} + +src_prepare() { + epatch "${FILESDIR}/${P}-ldflags.patch" + epatch "${FILESDIR}/${P}-arptables_save.patch" + epatch "${FILESDIR}/${P}-manpage.patch" + epatch "${FILESDIR}/${P}-type.patch" +} + +src_compile() { + # -O0 does not work and at least -O2 is required, bug #240752 + emake CC="$(tc-getCC)" COPT_FLAGS="-O2 ${CFLAGS//-O0/-O2}" || die "make failed" + sed -ie 's:__EXEC_PATH__:/sbin:g' arptables-save arptables-restore \ + || die "sed failed" +} + +src_install() { + into / + dosbin arptables arptables-restore arptables-save || die + doman arptables.8 || die +} diff --git a/net-firewall/arptables/files/arptables-0.0.3.4-arptables_save.patch b/net-firewall/arptables/files/arptables-0.0.3.4-arptables_save.patch new file mode 100644 index 000000000000..a1b60b24ea10 --- /dev/null +++ b/net-firewall/arptables/files/arptables-0.0.3.4-arptables_save.patch @@ -0,0 +1,24 @@ +# Don't resolve host names and don't convert '*' interface names to any. +# Remove '*' interface names. + +diff -urNad arptables-0.0.3.3~/arptables-save arptables-0.0.3.3/arptables-save +--- arptables-0.0.3.3~/arptables-save 2009-08-19 14:17:17.000000000 +0200 ++++ arptables-0.0.3.3/arptables-save 2009-08-19 14:19:58.000000000 +0200 +@@ -35,6 +35,8 @@ + # Due to arptables "issues" with displaying device names + # we need to use -v and then do some processing + $line =~ s/\s,\s.*//; ++ $line =~ s/-i\s\*//; ++ $line =~ s/-o\s\*//; + $rules = $rules . "-A $chain $line\n"; + } + +@@ -47,7 +49,7 @@ + # ======================================================== + + unless (-x "$tool") { print "ERROR: Tool $tool isn't executable"; exit -1; }; +-$table =`$tool -t filter -L -v`; ++$table =`$tool -t filter -L -v -n`; + unless ($? == 0) { print $table; exit -1 }; + &process_table($table); + diff --git a/net-firewall/arptables/files/arptables-0.0.3.4-manpage.patch b/net-firewall/arptables/files/arptables-0.0.3.4-manpage.patch new file mode 100644 index 000000000000..76295b6d9b5c --- /dev/null +++ b/net-firewall/arptables/files/arptables-0.0.3.4-manpage.patch @@ -0,0 +1,12 @@ +diff -urNad arptables-0.0.3.3~/arptables.8 arptables-0.0.3.3/arptables.8 +--- arptables-0.0.3.3~/arptables.8 2007-08-19 15:04:51.000000000 +0200 ++++ arptables-0.0.3.3/arptables.8 2008-05-08 18:56:35.000000000 +0200 +@@ -22,7 +22,7 @@ + .\" + .\" + .SH NAME +-arptables (v.0.0.3-3) \- ARP table administration ++arptables \- ARP table administration + .SH SYNOPSIS + .BR "arptables " [ "-t table" ] " -" [ AD ] " chain rule-specification " [ options ] + .br diff --git a/net-firewall/arptables/files/arptables-0.0.3.4-type.patch b/net-firewall/arptables/files/arptables-0.0.3.4-type.patch new file mode 100644 index 000000000000..851bf0ee247f --- /dev/null +++ b/net-firewall/arptables/files/arptables-0.0.3.4-type.patch @@ -0,0 +1,17 @@ +# Patch from Jeroen van Wolffelaar <jeroen@wolffelaar.nl> to make +# arptables --proto-type also accept hexadecimal inputs (ethernet protocol +# numbers are often specfied in hex, not decimal), using standard strtol() +# behaviour (hex iff starts with 0x). + +diff -urNad arptables-0.0.3.3~/arptables.c arptables-0.0.3.3/arptables.c +--- arptables-0.0.3.3~/arptables.c 2007-08-19 15:04:51.000000000 +0200 ++++ arptables-0.0.3.3/arptables.c 2008-05-08 19:16:43.000000000 +0200 +@@ -2039,7 +2039,7 @@ + check_inverse(optarg, &invert, &optind, argc); + set_option(&options, OPT_P_TYPE, &fw.arp.invflags, + invert); +- if (get16_and_mask(argv[optind - 1], &fw.arp.arpro, &fw.arp.arpro_mask, 10)) { ++ if (get16_and_mask(argv[optind - 1], &fw.arp.arpro, &fw.arp.arpro_mask, 0)) { + if (strcasecmp(argv[optind-1], "ipv4")) + exit_error(PARAMETER_PROBLEM, "Problem with specified protocol type"); + fw.arp.arpro = htons(0x800); |