summaryrefslogtreecommitdiff
path: root/net-firewall/nftables
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-09-06 10:28:05 +0100
committerV3n3RiX <venerix@redcorelinux.org>2019-09-06 10:28:05 +0100
commitf1af93971b7490792d8541bc790e0d8c6d787059 (patch)
treea38046712bbc3a3844d77452d16c84e716caa3d4 /net-firewall/nftables
parentfc637fb28da700da71ec2064d65ca5a7a31b9c6c (diff)
gentoo resync : 06.08.2019
Diffstat (limited to 'net-firewall/nftables')
-rw-r--r--net-firewall/nftables/Manifest2
-rw-r--r--net-firewall/nftables/nftables-0.9.2.ebuild138
2 files changed, 140 insertions, 0 deletions
diff --git a/net-firewall/nftables/Manifest b/net-firewall/nftables/Manifest
index f80131a2fde7..f58bed582810 100644
--- a/net-firewall/nftables/Manifest
+++ b/net-firewall/nftables/Manifest
@@ -9,6 +9,8 @@ AUX nftables.init 3069 BLAKE2B 68c6b2b81995bd909c00cc3527f891f04d0dd30532cd821c8
AUX systemd/nftables-restore.service 394 BLAKE2B 1c1f358eb2eff789e68c051098c971f11a8df6621c3c919e30a1ec1213f6db822c390609c01827fe9fc75c540effa3e3a7b6f93bd24e16ea19841bbfaab796ed SHA512 18da6a770bb3e94fd6b2c9e6f033450aaff9fe886c8846f780d08a21e2fc884ac078652743b50b3d4ea8c9500f92d272bdd27e2881e438c2b223d40816c100a0
DIST nftables-0.9.0.tar.gz 417981 BLAKE2B 4dfba4d71928f1694ffeb4871353fc373d88e23c5ba716e726e1e6aba0efb2703233528f7a408bfefe47bfe54aa3612cccab9742c2a2208ec8c7a4bcda0e1823 SHA512 78e383bad5440c9414202cf0e4b6749fc5c01071d2fa547208e61cea6e7e179933990e7e538a60696eb0a7cf510d2c4b273a91d50287bb51507d244cd2875aed
DIST nftables-0.9.1.tar.bz2 764066 BLAKE2B 26b194d6b3b970c05348c32a3ab21e8c25fcdb0d09d3d6b467198ba23a5bb44e7b6450d3efb86c39a488df4a837885c4a1ab96c197d5449f7de49b7b18ff5f90 SHA512 e14b75197ba3fea2a46c090450bf8b45b39fdc20db67bab1d6919c90128dee8ea8bbe9508e070f86b22ec70bcad8ab584fb89630a2240f09683137471c77d242
+DIST nftables-0.9.2.tar.bz2 779850 BLAKE2B 40bf9ed956a126048f27b343afc7aa4f6e34f35dc91127402cb127903f8150d212c80491fef2b54c18a63ca065608521062b3f6a2dd78969bdbf4d7d8a5a751d SHA512 2d83b104af0d70f99a16c2e40afdb9bf89bd984323810e2895976c5e2e346bf09dd88850a391f295e335279adfdd39d34c13610cf8e6b801499dc0df2a5cecf6
EBUILD nftables-0.9.0-r4.ebuild 2497 BLAKE2B 17916257a8fd7934348d4ceddcbead2c50a24954bff6b50e9f13ec5da2351935c3310be2c6749bfb94141523ca2157e6fe84d89bb7b56914f4f3a0553b7e58b8 SHA512 bf2036978cc0412b677c9117512db14c7344747e19f3fe1b2ef6a7d2b750cf64b33c41bdfaae55f8cfdda19c7f376faadd16a626816672a05b70b11d77231ffc
EBUILD nftables-0.9.1.ebuild 3439 BLAKE2B cc4cc8af10d494b52a1b1c1cb826983fbe04bf62d7c11aa25bb7c8b11189feeb6e69b2437276574ff0dd9f41d680fcf3e5b19f4d62e17324a3129eeb4c521594 SHA512 dc05bd17223ad8106259170681b2ca55af02842ea1f1eb9f809b93f829c0930a9cfdd06df8922faf6c5d8e54b2d59ebc5516da1ba7eaa8b264e04aa6466fc4ad
+EBUILD nftables-0.9.2.ebuild 3342 BLAKE2B 05e99227df28fcd6b9d7f70e1295b2ca0997e84d15eeabb0cefb2dbcc9c91eae6637f98e08aa7fef98bb541ba620c53c881e729a735e6aff26a1465499b6ebe9 SHA512 c191d5a43ef0bde4f0ac85c9b702d2999744c25ede558103e648b4aa5c8b9c140b1839a0a655e203868dc80e2319948161ebb942bc2c6db4c0bae9dfac7a5a1c
MISC metadata.xml 918 BLAKE2B 16404ad621319f8a8e93e39d8586aaadb0f6fc6989ee928605a8e5e00f581c5f84b11b9718958667a2f76722950a893e5d6097ff2f242961998ac7b092901489 SHA512 27413ba6b81e930b13ae55292d1c308b54b173cf120430d5462313cd8052834bd01e272978b3ba1d4b9f1be99215a90446b2e93bd0a502d328182706be40f02d
diff --git a/net-firewall/nftables/nftables-0.9.2.ebuild b/net-firewall/nftables/nftables-0.9.2.ebuild
new file mode 100644
index 000000000000..112b5f0b9afb
--- /dev/null
+++ b/net-firewall/nftables/nftables-0.9.2.ebuild
@@ -0,0 +1,138 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{5,6,7} )
+
+inherit autotools linux-info python-r1 systemd
+
+DESCRIPTION="Linux kernel (3.13+) firewall, NAT and packet mangling tools"
+HOMEPAGE="https://netfilter.org/projects/nftables/"
+#SRC_URI="https://git.netfilter.org/nftables/snapshot/v${PV}.tar.gz -> ${P}.tar.gz"
+SRC_URI="https://netfilter.org/projects/nftables/files/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~sparc ~x86"
+IUSE="debug +doc +gmp json +modern_kernel python +readline static-libs xtables"
+
+RDEPEND="
+ >=net-libs/libmnl-1.0.3:0=
+ gmp? ( dev-libs/gmp:0= )
+ json? ( dev-libs/jansson )
+ python? ( ${PYTHON_DEPS} )
+ readline? ( sys-libs/readline:0= )
+ >=net-libs/libnftnl-1.1.4:0=
+ xtables? ( >=net-firewall/iptables-1.6.1 )
+"
+
+DEPEND="${RDEPEND}"
+
+BDEPEND="
+ doc? ( app-text/asciidoc )
+ >=app-text/docbook2X-0.8.8-r4
+ sys-devel/bison
+ sys-devel/flex
+ virtual/pkgconfig
+"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+#S="${WORKDIR}/v${PV}"
+
+python_make() {
+ emake \
+ -C py \
+ abs_builddir="${S}" \
+ DESTDIR="${D}" \
+ PYTHON_BIN="${PYTHON}" \
+ ${@}
+}
+
+pkg_setup() {
+ if kernel_is ge 3 13; then
+ if use modern_kernel && kernel_is lt 3 18; then
+ eerror "The modern_kernel USE flag requires kernel version 3.18 or newer to work properly."
+ fi
+ CONFIG_CHECK="~NF_TABLES"
+ linux-info_pkg_setup
+ else
+ eerror "This package requires kernel version 3.13 or newer to work properly."
+ fi
+}
+
+src_prepare() {
+ default
+
+ # fix installation path for doc stuff
+ sed '/^pkgsysconfdir/s@${sysconfdir}.*$@${docdir}@' \
+ -i files/nftables/Makefile.am || die
+ sed '/^pkgsysconfdir/s@${sysconfdir}.*$@${docdir}/osf@' \
+ -i files/osf/Makefile.am || die
+
+ eautoreconf
+}
+
+src_configure() {
+ local myeconfargs=(
+ # We handle python separately
+ --disable-python
+ --sbindir="${EPREFIX}"/sbin
+ $(use_enable debug)
+ $(use_enable doc man-doc)
+ $(use_with !gmp mini_gmp)
+ $(use_with json)
+ $(use_with readline cli)
+ $(use_enable static-libs static)
+ $(use_with xtables)
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+ default
+
+ if use python ; then
+ python_foreach_impl python_make
+ fi
+}
+
+src_install() {
+ default
+
+ local mksuffix="$(usex modern_kernel '-mk' '')"
+
+ exeinto /usr/libexec/${PN}
+ newexe "${FILESDIR}"/libexec/${PN}${mksuffix}.sh ${PN}.sh
+ newconfd "${FILESDIR}"/${PN}${mksuffix}.confd ${PN}
+ newinitd "${FILESDIR}"/${PN}${mksuffix}.init ${PN}
+ keepdir /var/lib/nftables
+
+ systemd_dounit "${FILESDIR}"/systemd/${PN}-restore.service
+
+ if use python ; then
+ python_foreach_impl python_make install
+ fi
+
+ find "${ED}" -type f -name "*.la" -delete || die
+}
+
+pkg_postinst() {
+ local save_file
+ save_file="${EROOT}/var/lib/nftables/rules-save"
+
+ # In order for the nftables-restore systemd service to start
+ # the save_file must exist.
+ if [[ ! -f ${save_file} ]]; then
+ touch ${save_file}
+ fi
+
+ elog "If you wish to enable the firewall rules on boot (on systemd) you"
+ elog "will need to enable the nftables-restore service."
+ elog " 'systemd_enable_service basic.target ${PN}-restore.service'"
+ elog
+ elog "If you are creating firewall rules before the next system restart "
+ elog "the nftables-restore service must be manually started in order to "
+ elog "save those rules on shutdown."
+}