From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 7268213835A for ; Sat, 9 May 2020 02:55:07 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 68C1FE0819; Sat, 9 May 2020 02:55:06 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 4ED80E0819 for ; Sat, 9 May 2020 02:55:06 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 7FBD434F14E for ; Sat, 9 May 2020 02:55:04 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 058C3230 for ; Sat, 9 May 2020 02:55:02 +0000 (UTC) From: "Patrick McLean" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Patrick McLean" Message-ID: <1588992891.166b01ff87eef4866daeede41629a619e8605d02.chutzpah@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-firewall/arptables/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-firewall/arptables/arptables-0.0.5-r1.ebuild X-VCS-Directories: net-firewall/arptables/ X-VCS-Committer: chutzpah X-VCS-Committer-Name: Patrick McLean X-VCS-Revision: 166b01ff87eef4866daeede41629a619e8605d02 X-VCS-Branch: master Date: Sat, 9 May 2020 02:55:02 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: b57c6dbf-c1b3-45b0-9e21-bf6fa18e4512 X-Archives-Hash: da4a7bc1600822f06ce0ee4cc0b2249d commit: 166b01ff87eef4866daeede41629a619e8605d02 Author: Patrick McLean sony com> AuthorDate: Sat May 9 02:50:50 2020 +0000 Commit: Patrick McLean gentoo org> CommitDate: Sat May 9 02:54:51 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=166b01ff net-firewall/arptables-0.0.5-r1: Revbump, support eselect-arptables Copyright: Sony Interactive Entertainment Inc. Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Patrick McLean gentoo.org> net-firewall/arptables/arptables-0.0.5-r1.ebuild | 55 ++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/net-firewall/arptables/arptables-0.0.5-r1.ebuild b/net-firewall/arptables/arptables-0.0.5-r1.ebuild new file mode 100644 index 00000000000..6dc0f8f781c --- /dev/null +++ b/net-firewall/arptables/arptables-0.0.5-r1.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit toolchain-funcs + +DESCRIPTION="set up, maintain, and inspect the tables of ARP rules in the Linux kernel" +HOMEPAGE="http://ebtables.sourceforge.net/" +SRC_URI="ftp://ftp.netfilter.org/pub/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="" + +BDEPEND=">=app-eselect/eselect-iptables-20200508" +RDEPEND="${BDEPEND}" + +src_compile() { + # -O0 does not work and at least -O2 is required, bug #240752 + emake CC="$(tc-getCC)" COPT_FLAGS="-O2 ${CFLAGS//-O0/-O2}" + sed -e 's:__EXEC_PATH__:/sbin:g' \ + -i arptables-save arptables-restore || die "sed failed" +} + +src_install() { + emake \ + PREFIX="${ED}"/ \ + LIBDIR="${ED}/$(get_libdir)" \ + SYSCONFIGDIR="${ED}"/etc \ + MANDIR="${ED}"/usr/share/man \ + install + + newman arptables-legacy.8 arptables.8 +} + +pkg_postinst() { + if ! eselect arptables show &>/dev/null; then + elog "Current arptables implementation is unset, setting to ebtables-legacy" + eselect arptables set arptables-legacy + fi + + eselect arptables show +} + +pkg_prerm() { + if has_version 'net-firewall/iptables[nftables]'; then + elog "Resetting arptables symlinks to xtables-nft-multi before removal" + eselect arptables set xtables-nft-multi + else + elog "Unsetting arptables symlinks before removal" + eselect arptables unset + fi +}