[net-firewall/iptables] long overdue sync with tree

This commit is contained in:
2019-07-18 19:03:04 +02:00
parent 782f9c4872
commit 629024c08f
8 changed files with 123 additions and 52 deletions

View File

@@ -1,21 +1,21 @@
# Copyright 1999-2018 Gentoo Foundation
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
EAPI=7
# Force users doing their own patches to install their own tools
AUTOTOOLS_AUTO_DEPEND=no
inherit ltprune multilib systemd toolchain-funcs autotools flag-o-matic git-r3
inherit multilib systemd toolchain-funcs autotools flag-o-matic usr-ldscript git-r3
DESCRIPTION="Linux kernel (2.4+) firewall, NAT and packet mangling tools"
HOMEPAGE="http://www.netfilter.org/projects/iptables/"
HOMEPAGE="https://www.netfilter.org/projects/iptables/"
EGIT_REPO_URI="git://git.netfilter.org/iptables.git"
LICENSE="GPL-2"
# Subslot tracks libxtables as that's the one other packages generally link
# against and iptables changes. Will have to revisit if other sonames change.
SLOT="0/12"
# Subslot reflects PV when libxtables and/or libip*tc was changed
# the last time.
SLOT="0/1.8.3"
KEYWORDS=""
IUSE="conntrack ipv6 netlink nftables pcap static-libs"
@@ -24,13 +24,15 @@ COMMON_DEPEND="
netlink? ( net-libs/libnfnetlink )
nftables? (
>=net-libs/libmnl-1.0:0=
>=net-libs/libnftnl-1.0.5:0=
>=net-libs/libnftnl-1.1.3:0=
)
pcap? ( net-libs/libpcap )
"
DEPEND="${COMMON_DEPEND}
virtual/os-headers
>=sys-kernel/linux-headers-4.4:0
"
BDEPEND="
virtual/pkgconfig
nftables? (
sys-devel/flex
@@ -43,7 +45,7 @@ RDEPEND="${COMMON_DEPEND}
src_prepare() {
# use the saner headers from the kernel
rm -f include/linux/{kernel,types}.h
rm include/linux/{kernel,types}.h || die
eautoreconf
}
@@ -97,19 +99,25 @@ src_install() {
doins include/iptables/internal.h
keepdir /var/lib/iptables
newinitd "${FILESDIR}"/${PN}.init iptables
newconfd "${FILESDIR}"/${PN}-1.4.13.confd iptables
newinitd "${FILESDIR}"/${PN}-r2.init iptables
newconfd "${FILESDIR}"/${PN}-r1.confd iptables
if use ipv6 ; then
keepdir /var/lib/ip6tables
newinitd "${FILESDIR}"/iptables.init ip6tables
newconfd "${FILESDIR}"/ip6tables-1.4.13.confd ip6tables
dosym iptables /etc/init.d/ip6tables
newconfd "${FILESDIR}"/ip6tables-r1.confd ip6tables
fi
if use nftables; then
# Bug 647458
rm "${ED%/}"/etc/ethertypes || die
rm "${ED}"/etc/ethertypes || die
# Bug 660886
rm "${ED}"/sbin/{arptables,ebtables} || die
# Bug 669894
rm "${ED}"/sbin/ebtables-{save,restore} || die
fi
systemd_dounit "${FILESDIR}"/systemd/iptables-{re,}store.service
if use ipv6 ; then
systemd_dounit "${FILESDIR}"/systemd/ip6tables-{re,}store.service
@@ -118,5 +126,5 @@ src_install() {
# Move important libs to /lib #332175
gen_usr_ldscript -a ip{4,6}tc iptc xtables
prune_libtool_files
find "${ED}" -type f -name "*.la" -delete || die
}