summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick McLean <chutzpah@gentoo.org>2019-12-10 14:17:06 -0800
committerPatrick McLean <chutzpah@gentoo.org>2019-12-10 14:18:12 -0800
commitc9fbfa0047ff1fd1a1f40a6621bd5e8beada3432 (patch)
treee34c64b8ca4a0bc7771979e280116a8c0e0fc56b /net-firewall
parentapp-emulation/aranym: New package (diff)
downloadgentoo-c9fbfa0047ff1fd1a1f40a6621bd5e8beada3432.tar.gz
gentoo-c9fbfa0047ff1fd1a1f40a6621bd5e8beada3432.tar.bz2
gentoo-c9fbfa0047ff1fd1a1f40a6621bd5e8beada3432.zip
net-firewall/ebtables-2.0.11: Version bump
Package-Manager: Portage-2.3.81, Repoman-2.3.20 Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
Diffstat (limited to 'net-firewall')
-rw-r--r--net-firewall/ebtables/Manifest1
-rw-r--r--net-firewall/ebtables/ebtables-2.0.11.ebuild92
-rw-r--r--net-firewall/ebtables/files/ebtables-2.0.11-ebt-save.patch26
-rw-r--r--net-firewall/ebtables/files/ebtables-2.0.11-makefile.patch13
-rw-r--r--net-firewall/ebtables/files/ebtables-2.0.11-remove-stray-atsign.patch32
5 files changed, 164 insertions, 0 deletions
diff --git a/net-firewall/ebtables/Manifest b/net-firewall/ebtables/Manifest
index 73219a00e795..e88c251f7366 100644
--- a/net-firewall/ebtables/Manifest
+++ b/net-firewall/ebtables/Manifest
@@ -1 +1,2 @@
+DIST ebtables-2.0.11.tar.gz 428411 BLAKE2B 62af4c38ad21498e43f41ef96c8abb5704e8d8a48f1327c587b664f36fdfa9849a9a37e59958db56d38019465d8bf1775914f7387fde99a441615913702cf504 SHA512 43a04c6174c8028c501591ef260526297e0f018016f226e2a3bcf80766fddf53d4605c347554d6da7c4ab5e2131584a18da20916ffddcbf2d26ac93b00c5777f
DIST ebtables-v2.0.10-4.tar.gz 103764 BLAKE2B 01995c701c6dbc7495bdf1f0fce61dce51a379dd1a304d2a5174e0190c040ee958833c65be9fd9d6a7601a2f81461ce1f2e9db989081b4fe7dabc5bfcecd57d6 SHA512 a6832453812eaede3fcbb5b4cab5902ea1ea752a80a259eed276a01b61e2afaa6cf07d3d023d86a883f9a02505aecc44a1c6e0d27b3a61f341002e4c051cd60a
diff --git a/net-firewall/ebtables/ebtables-2.0.11.ebuild b/net-firewall/ebtables/ebtables-2.0.11.ebuild
new file mode 100644
index 000000000000..fc30080735cc
--- /dev/null
+++ b/net-firewall/ebtables/ebtables-2.0.11.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit toolchain-funcs autotools
+
+MY_PV="$(ver_rs 3 '-' )"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="Controls Ethernet frame filtering on a Linux bridge, MAC NAT and brouting"
+HOMEPAGE="http://ebtables.sourceforge.net/"
+SRC_URI="ftp://ftp.netfilter.org/pub/${PN}/${MY_P}.tar.gz"
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86"
+IUSE="+perl static"
+
+# The ebtables-save script is written in perl.
+RDEPEND="perl? ( dev-lang/perl )
+ net-misc/ethertypes"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-2.0.11-makefile.patch"
+
+ # Enhance ebtables-save to take table names as parameters bug #189315
+ "${FILESDIR}/${PN}-2.0.11-ebt-save.patch"
+
+ # from upstream git
+ "${FILESDIR}/ebtables-2.0.11-remove-stray-atsign.patch"
+)
+
+pkg_setup() {
+ if use static; then
+ ewarn "You've chosen static build which is useful for embedded devices."
+ ewarn "It has no init script. Make sure that's really what you want."
+ fi
+}
+
+src_prepare() {
+ default
+
+ # don't install perl scripts if USE=perl is disabled
+ if ! use perl; then
+ sed -e '/sbin_SCRIPTS/ d' -i Makefile.am || die
+ fi
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --bindir="/bin" \
+ --sbindir="/sbin" \
+ --libdir=/$(get_libdir)/${PN} \
+ --sysconfdir="/usr/share/doc/${PF}" \
+ $(use_enable static)
+}
+
+src_compile() {
+ emake $(usex static 'static ebtables-legacy.8' '')
+}
+
+src_install() {
+ local -a DOCS=( ChangeLog THANKS )
+
+ if ! use static; then
+ emake DESTDIR="${D}" install
+ keepdir /var/lib/ebtables/
+ newinitd "${FILESDIR}"/ebtables.initd-r1 ebtables
+ newconfd "${FILESDIR}"/ebtables.confd-r1 ebtables
+
+ # symlink -legacy binaries to original names
+ local ext
+ for ext in '' -{save,restore}; do
+ local prog="${PN}-legacy${ext}"
+ [[ -f ${ED}/sbin/${prog} ]] && dosym ${prog} /sbin/${PN}${ext}
+ done
+
+ find "${D}" -name '*.la' -type f -delete || die
+ else
+ into /
+ newsbin static ebtables
+ insinto /etc
+ doins ethertypes
+ fi
+
+ newman ebtables-legacy.8 ebtables.8
+ einstalldocs
+}
diff --git a/net-firewall/ebtables/files/ebtables-2.0.11-ebt-save.patch b/net-firewall/ebtables/files/ebtables-2.0.11-ebt-save.patch
new file mode 100644
index 000000000000..7cfe128babf4
--- /dev/null
+++ b/net-firewall/ebtables/files/ebtables-2.0.11-ebt-save.patch
@@ -0,0 +1,26 @@
+diff --git a/ebtables-save.in b/ebtables-save.in
+index 17924a2..c7a64c3 100644
+--- a/ebtables-save.in
++++ b/ebtables-save.in
+@@ -12,6 +12,7 @@ my $ebtables = "@sbindir@/ebtables";
+ my $cnt = "";
+ my $version = "1.0";
+ my $table_name;
++my @table_names;
+
+ # ========================================================
+ # Process filter table
+@@ -49,6 +50,13 @@ sub process_table {
+ }
+ # ========================================================
+
++if ($#ARGV + 1 == 0) {
++ @table_names =split("\n", `grep -E '^ebtable_' /proc/modules | cut -f1 -d' ' | sed s/ebtable_//`);
++}
++else {
++ @table_names = @ARGV;
++}
++# ========================================================
+ unless (-x $ebtables) { exit -1 };
+ print "# Generated by ebtables-save v$version (legacy) on " . `date`;
+ if (defined($ENV{'EBTABLES_SAVE_COUNTER'}) && $ENV{'EBTABLES_SAVE_COUNTER'} eq "yes") {
diff --git a/net-firewall/ebtables/files/ebtables-2.0.11-makefile.patch b/net-firewall/ebtables/files/ebtables-2.0.11-makefile.patch
new file mode 100644
index 000000000000..dc9be9e7d6c4
--- /dev/null
+++ b/net-firewall/ebtables/files/ebtables-2.0.11-makefile.patch
@@ -0,0 +1,13 @@
+diff --git a/Makefile.am b/Makefile.am
+index 6181003..de01139 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -50,7 +50,7 @@ ebtables_legacy_LDADD = libebtc.la
+ ebtablesd_LDADD = libebtc.la
+ ebtables_legacy_restore_SOURCES = ebtables-restore.c
+ ebtables_legacy_restore_LDADD = libebtc.la
+-static_SOURCES = ebtables.c
++static_SOURCES = ebtables.c ebtables-standalone.c
+ static_LDFLAGS = -static
+ static_LDADD = libebtc.la
+ examples_ulog_test_ulog_SOURCES = examples/ulog/test_ulog.c getethertype.c
diff --git a/net-firewall/ebtables/files/ebtables-2.0.11-remove-stray-atsign.patch b/net-firewall/ebtables/files/ebtables-2.0.11-remove-stray-atsign.patch
new file mode 100644
index 000000000000..88f1d7296529
--- /dev/null
+++ b/net-firewall/ebtables/files/ebtables-2.0.11-remove-stray-atsign.patch
@@ -0,0 +1,32 @@
+From 7d00e58157bc61168a057cde91a6e5b54dca573b Mon Sep 17 00:00:00 2001
+From: Jan Engelhardt <jengelh@inai.de>
+Date: Mon, 2 Dec 2019 20:52:04 +0100
+Subject: build: remove stray @ sign in manpage
+
+Because the sed command was not matching the trailing @, it
+was left in the manpage, leading to
+
+NAME
+ ebtables-legacy (2.0.11@) - Ethernet bridge frame table administration (legacy)
+
+Signed-off-by: Jan Engelhardt <jengelh@inai.de>
+Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
+---
+ Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index b879941..6181003 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -64,6 +64,6 @@ ebtables-legacy-save: ebtables-save.in ${top_builddir}/config.status
+ ${AM_V_GEN}sed -e 's![@]sbindir@!${sbindir}!g' <$< >$@
+
+ ebtables-legacy.8: ebtables-legacy.8.in ${top_builddir}/config.status
+- ${AM_V_GEN}sed -e 's![@]PACKAGE_VERSION!${PACKAGE_VERSION}!g' \
++ ${AM_V_GEN}sed -e 's![@]PACKAGE_VERSION@!${PACKAGE_VERSION}!g' \
+ -e 's![@]PACKAGE_DATE@!${PROGDATE}!g' \
+ -e 's![@]LOCKFILE@!${LOCKFILE}!g' <$< >$@
+--
+cgit v1.2.1
+