diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-10-11 12:12:04 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-10-11 12:12:04 +0100 |
commit | 656415c9ea59def40c02f7dff6e0650186b509f3 (patch) | |
tree | 0fabd97ffdc789e947a3bf164c55c1bf183457de /net-firewall/iptables | |
parent | 8d839e24e6b6e9a28d945d1dc094e65e2b0ccc2d (diff) |
gentoo auto-resync : 11:10:2023 - 12:12:04
Diffstat (limited to 'net-firewall/iptables')
-rw-r--r-- | net-firewall/iptables/Manifest | 2 | ||||
-rw-r--r-- | net-firewall/iptables/iptables-1.8.10.ebuild | 179 |
2 files changed, 181 insertions, 0 deletions
diff --git a/net-firewall/iptables/Manifest b/net-firewall/iptables/Manifest index 40cfedbb11bf..49da283cbe55 100644 --- a/net-firewall/iptables/Manifest +++ b/net-firewall/iptables/Manifest @@ -13,8 +13,10 @@ AUX systemd/ip6tables-restore.service 404 BLAKE2B 35cdf804e787aa5cc382cc638de523 AUX systemd/ip6tables-store.service 243 BLAKE2B 30a0d955998a2a664c6a95b8e559898a1a48c681b77b6e3e1b2fa6f2ada7204f23df0f0894218599e95c2ccea71024e86cda7c82b6ff5a55d016d04d71cb1487 SHA512 7cee224f91d4c8348606ba176d0d689749a59229958cfdf4e75451d77271363e7cff71dbb7e30dbc4a5a837363a72d70d6960d2dfb218f3ad16456ae109cba10 AUX systemd/iptables-restore.service 400 BLAKE2B cd7f700cf717a2efb6504770308f7dcb90a1968f64cca98ea5e7437cf3cf2a2e8f575e3743ac19eec8738c665f4243f537a101c00d5d1cc94648688d4e240a59 SHA512 8c005e321ad041068f243e4baa6588b24b0ffd69991f2129dfab0a34d0ebaf702ff2be8b7328126c84abdc3bbd300e1c387a690c5f6a002b50b2e9148feeb8ef AUX systemd/iptables-store.service 240 BLAKE2B 7ddb4425e63cd41f421767fab25a7b055087fddde5927291b3fce6e0e978f0cb3b734bcacf02f78257eec99274056b69058436a847dcb366f5fb70032e410355 SHA512 a720e92b5571a2c3427101105e95e555f3b72541a53c5daa43e361c99ca28830e9e8dd27dbd7cfed40fbbe289ed180f9be7e0f3b6b0cd19bba022a531815fd5e +DIST iptables-1.8.10.tar.xz 641168 BLAKE2B 417b33fcfc7edeba169caef26ed0322798f6b82500840509f6c10b97b4ef3f11932c0393fc8dcc5946264442bf8ee959a594b6fbd5dc92012cfad30edf130520 SHA512 71e6ed2260859157d61981a4fe5039dc9e8d7da885a626a4b5dae8164c509a9d9f874286b9468bb6a462d6e259d4d32d5967777ecefdd8a293011ae80c00f153 DIST iptables-1.8.8.tar.bz2 746985 BLAKE2B 0da021cc7313b86af331768904956dab3eee3de245a7b03965129f3d7f13097fc03fbb1390167dcd971eff216eabad9e59b261a9c0f54bfc48a77453aa40d164 SHA512 f21df23279a77531a23f3fcb1b8f0f8ec0c726bda236dd0e33af74b06753baff6ce3f26fb9fcceb6fada560656ba901e68fc6452eb840ac1b206bc4654950f59 DIST iptables-1.8.9.tar.xz 637848 BLAKE2B 37ba80be0ee7049c4d3ee5689b273b4d2cc6e6fb9ebb297e86976b5750f987f2ae4536013fe1749ae79b6989c241eaece3202019fafd47d842c7a4fe3e5093b1 SHA512 e367bf286135e39b7401e852de25c1ed06d44befdffd92ed1566eb2ae9704b48ac9196cb971f43c6c83c6ad4d910443d32064bcdf618cfcef6bcab113e31ff70 +EBUILD iptables-1.8.10.ebuild 4516 BLAKE2B 839025ad2d639851840a5f395770ad49c155f55f16b9ce20210343898ec6ba267037d30e403e073f3455b0b7fc22e783d89849c399a7c982e6a8cd0677d229a8 SHA512 65e440235467a0f3946335447877e87b97f23b8b439aa3c5e4d7356c86f029594daffdfd0598b860ed6a33924cd059c6b6da50f39846a127cdaf5bbfb74853af EBUILD iptables-1.8.8-r5.ebuild 4733 BLAKE2B 46f0e77386ae051047868354c5ce774e4d88113aed56e70338c98150de672b959d2200d5da59051f1272cbad28a03153bc5503705c1b58bbb9c7fb041947fd6e SHA512 d0379b878c8c7d52b6967a9a8634ee5e48fceee70910733d1ec46f793fdf5adceb8946924619052b63c77a4715a5225a2a95f61402c29c4110aa0af4a5e88a33 EBUILD iptables-1.8.9-r1.ebuild 4622 BLAKE2B 383ea5670b8dba7f24a856410791b71a2effa8a1e036f65257e69f3f94277ddc1702e9bf3339f5688a5fdc870bf73ff10752e3023fc3645b23dc706cd5d802d4 SHA512 0f2bbdd082eba3db6d441a624a325004fc1513531cc309ce79afae1c79817b4ce786b41e1028fae280937a6aae167ccdc66f509360eff67bf6bec38b1d1368c2 EBUILD iptables-1.8.9.ebuild 4550 BLAKE2B 8523b469f8026540cd89671cbea77b1225706138f691432fc587ad5879836321737635808fd6a1cd09c39f6099c997971a55c1fa13400c6f855e96605c9c9e9c SHA512 104e707f59fa1b071ec720d44c4971ec3a69f87f2e077c44f2248b39045d6f241e18e7cdb0f2c521fef1dda250a09aa028a8815dd194ea13ce3fe70062545b69 diff --git a/net-firewall/iptables/iptables-1.8.10.ebuild b/net-firewall/iptables/iptables-1.8.10.ebuild new file mode 100644 index 000000000000..15f853569b01 --- /dev/null +++ b/net-firewall/iptables/iptables-1.8.10.ebuild @@ -0,0 +1,179 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit systemd toolchain-funcs autotools flag-o-matic usr-ldscript + +DESCRIPTION="Linux kernel (2.4+) firewall, NAT and packet mangling tools" +HOMEPAGE="https://www.netfilter.org/projects/iptables/" +SRC_URI="https://www.netfilter.org/projects/iptables/files/${P}.tar.xz" + +LICENSE="GPL-2" +# Subslot reflects PV when libxtables and/or libip*tc was changed +# the last time. +SLOT="0/1.8.3" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE="conntrack netlink nftables pcap static-libs" + +COMMON_DEPEND=" + conntrack? ( >=net-libs/libnetfilter_conntrack-1.0.6 ) + netlink? ( net-libs/libnfnetlink ) + nftables? ( + >=net-libs/libmnl-1.0:= + >=net-libs/libnftnl-1.2.6:= + ) + pcap? ( net-libs/libpcap ) +" +DEPEND=" + ${COMMON_DEPEND} + virtual/os-headers + >=sys-kernel/linux-headers-4.4:0 +" +BDEPEND=" + virtual/pkgconfig + nftables? ( + sys-devel/flex + app-alternatives/yacc + ) +" +RDEPEND=" + ${COMMON_DEPEND} + nftables? ( net-misc/ethertypes ) + !<net-firewall/ebtables-2.0.11-r1 + !<net-firewall/arptables-0.0.5-r1 +" +IDEPEND=">=app-eselect/eselect-iptables-20220320" + +PATCHES=( + "${FILESDIR}"/${PN}-1.8.4-no-symlinks.patch +) + +src_prepare() { + # Use the saner headers from the kernel + rm include/linux/{kernel,types}.h || die + + default + eautoreconf +} + +src_configure() { + # Some libs use $(AR) rather than libtool to build, bug #444282 + tc-export AR + + # Hack around struct mismatches between userland & kernel for some ABIs + # bug #472388 + use amd64 && [[ ${ABI} == "x32" ]] && append-flags -fpack-struct + + sed -i \ + -e "/nfnetlink=[01]/s:=[01]:=$(usex netlink 1 0):" \ + -e "/nfconntrack=[01]/s:=[01]:=$(usex conntrack 1 0):" \ + configure || die + + local myeconfargs=( + --sbindir="${EPREFIX}/sbin" + --libexecdir="${EPREFIX}/$(get_libdir)" + --enable-devel + --enable-ipv6 + --enable-shared + $(use_enable nftables) + $(use_enable pcap bpf-compiler) + $(use_enable pcap nfsynproxy) + $(use_enable static-libs static) + ) + + econf "${myeconfargs[@]}" +} + +src_compile() { + emake V=1 +} + +src_install() { + default + + # Managed by eselect-iptables + # https://bugs.gentoo.org/881295 + rm "${ED}/usr/bin/iptables-xml" || die + + dodoc iptables/iptables.xslt + + # All the iptables binaries are in /sbin, so might as well + # put these small files in with them + into / + dosbin iptables/iptables-apply + dosym iptables-apply /sbin/ip6tables-apply + doman iptables/iptables-apply.8 + + insinto /usr/include + doins include/ip{,6}tables.h + insinto /usr/include/iptables + doins include/iptables/internal.h + + keepdir /var/lib/ip{,6}tables + newinitd "${FILESDIR}"/${PN}-r3.init iptables + newconfd "${FILESDIR}"/${PN}-r1.confd iptables + dosym iptables /etc/init.d/ip6tables + newconfd "${FILESDIR}"/ip6tables-r1.confd ip6tables + + if use nftables; then + # Bug #647458 + rm "${ED}"/etc/ethertypes || die + + # Bugs #660886 and #669894 + rm "${ED}"/sbin/{arptables,ebtables}{,-{save,restore}} || die + fi + + systemd_dounit "${FILESDIR}"/systemd/ip{,6}tables-{re,}store.service + + # Move important libs to /lib, bug #332175 + gen_usr_ldscript -a ip{4,6}tc xtables + + find "${ED}" -type f -name "*.la" -delete || die +} + +pkg_postinst() { + local default_iptables="xtables-legacy-multi" + if ! eselect iptables show &>/dev/null; then + elog "Current iptables implementation is unset, setting to ${default_iptables}" + eselect iptables set "${default_iptables}" + fi + + if use nftables; then + local tables + for tables in {arp,eb}tables; do + if ! eselect ${tables} show &>/dev/null; then + elog "Current ${tables} implementation is unset, setting to ${default_iptables}" + eselect ${tables} set xtables-nft-multi + fi + done + fi + + eselect iptables show +} + +pkg_prerm() { + if [[ -z ${REPLACED_BY_VERSION} ]]; then + elog "Unsetting iptables symlinks before removal" + eselect iptables unset + fi + + if ! has_version 'net-firewall/ebtables'; then + elog "Unsetting ebtables symlinks before removal" + eselect ebtables unset + elif [[ -z ${REPLACED_BY_VERSION} ]]; then + elog "Resetting ebtables symlinks to ebtables-legacy" + eselect ebtables set ebtables-legacy + fi + + if ! has_version 'net-firewall/arptables'; then + elog "Unsetting arptables symlinks before removal" + eselect arptables unset + elif [[ -z ${REPLACED_BY_VERSION} ]]; then + elog "Resetting arptables symlinks to arptables-legacy" + eselect arptables set arptables-legacy + fi + + # The eselect module failing should not be fatal + return 0 +} |