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 2B6D61382C5 for ; Tue, 9 Feb 2021 15:59:31 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3C7FAE092C; Tue, 9 Feb 2021 15:59:30 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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 13AE5E0920 for ; Tue, 9 Feb 2021 15:59:30 +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 09C50340D81 for ; Tue, 9 Feb 2021 15:59:29 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 51F2B48B for ; Tue, 9 Feb 2021 15:59:27 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1612886283.48b6b55aefb25bfe50d9f09e04f2ae52c492ecba.vapier@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-firewall/ebtables/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-firewall/ebtables/ebtables-2.0.11-r3.ebuild X-VCS-Directories: net-firewall/ebtables/ X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: 48b6b55aefb25bfe50d9f09e04f2ae52c492ecba X-VCS-Branch: master Date: Tue, 9 Feb 2021 15:59:27 +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: cc7dc4fa-0e44-4074-92d9-506de406b4fd X-Archives-Hash: d390269dbf7b1402e1caa39be6724f3d commit: 48b6b55aefb25bfe50d9f09e04f2ae52c492ecba Author: Mike Frysinger chromium org> AuthorDate: Tue Feb 9 15:37:30 2021 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Tue Feb 9 15:58:03 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=48b6b55a net-firewall/ebtables: fix path to /etc/ethertypes #765679 The --sysconfdir setting controls where ebtables looks for ethertypes, so don't use /usr/share/doc/ which is not guaranteed to exist, and is not where the ethertypes package installs its config. Switch back to the standard /etc path instead. This path logic was prob a mistake as part of the upgrade from the old 2.0.10.4 ebuild that had a similar named setting (SYSCONFIGDIR) but a different meaning which we wanted to install into /usr/share/doc/. Fixes: https://bugs.gentoo.org/765679 Signed-off-by: Mike Frysinger gentoo.org> net-firewall/ebtables/ebtables-2.0.11-r3.ebuild | 107 ++++++++++++++++++++++++ 1 file changed, 107 insertions(+) diff --git a/net-firewall/ebtables/ebtables-2.0.11-r3.ebuild b/net-firewall/ebtables/ebtables-2.0.11-r3.ebuild new file mode 100644 index 00000000000..798135864de --- /dev/null +++ b/net-firewall/ebtables/ebtables-2.0.11-r3.ebuild @@ -0,0 +1,107 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +inherit 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="https://ebtables.netfilter.org/" +SRC_URI="http://ftp.netfilter.org/pub/${PN}/${MY_P}.tar.gz" +S="${WORKDIR}/${MY_P}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" +IUSE="+perl static" + +BDEPEND=">=app-eselect/eselect-iptables-20200508" +# The ebtables-save script is written in perl. +RDEPEND="${BDEPEND} + 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 -i -e '/^sbin_SCRIPTS/ d' Makefile.am || die + fi + + # The bundled autotools are borked, so force a rebuild. + eautoreconf +} + +src_configure() { + econf \ + --bindir="/bin" \ + --sbindir="/sbin" \ + --libdir="/$(get_libdir)/${PN}" \ + $(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 + + find "${D}" -name '*.la' -type f -delete || die + + # The ethertypes package installs this for us. + rm "${ED}"/etc/ethertypes || die + else + into / + newsbin static ebtables + fi + + newman ebtables-legacy.8 ebtables.8 + einstalldocs +} + +pkg_postinst() { + if ! eselect ebtables show &>/dev/null; then + elog "Current ebtables implementation is unset, setting to ebtables-legacy" + eselect ebtables set ebtables-legacy + fi + + eselect ebtables show +} + +pkg_prerm() { + if [[ -z ${REPLACED_BY_VERSION} ]] && has_version 'net-firewall/iptables[nftables]'; then + elog "Resetting ebtables symlinks to xtables-nft-multi before removal" + eselect ebtables set xtables-nft-multi + else + elog "Unsetting ebtables symlinks before removal" + eselect ebtables unset + fi +}