Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-firewall/nftables/
Date: Sat, 03 Feb 2018 22:58:20
Message-Id: 1517698686.0d92ad400e3dc1753df979c8a54001da91aecfe3.whissi@gentoo
1 commit: 0d92ad400e3dc1753df979c8a54001da91aecfe3
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Sat Feb 3 22:58:06 2018 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Sat Feb 3 22:58:06 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0d92ad40
7
8 net-firewall/nftables: Bump to v0.8.2
9
10 Package-Manager: Portage-2.3.21, Repoman-2.3.6
11
12 net-firewall/nftables/Manifest | 1 +
13 net-firewall/nftables/nftables-0.8.2.ebuild | 84 +++++++++++++++++++++++++++++
14 2 files changed, 85 insertions(+)
15
16 diff --git a/net-firewall/nftables/Manifest b/net-firewall/nftables/Manifest
17 index d0f5ddd5bf4..08868d16b55 100644
18 --- a/net-firewall/nftables/Manifest
19 +++ b/net-firewall/nftables/Manifest
20 @@ -1,2 +1,3 @@
21 DIST nftables-0.8.1.tar.gz 329098 BLAKE2B d6e5803e146ed5883761d620ef1549e883a2947b495a9b1ff2a40c70794ab5125596e0802fb60bff6d1a21e666c94338b92a22ef3c4c1b66e0b4521cd3dfb78d SHA512 5cae3a411f24adc17786b45d4ed8256eb44fd90f044f7f5d7ddebb1875d0317197e13128d9b22115cd7fcdfa21dba3c539de325ecedce707f8766c93e03efc75
22 +DIST nftables-0.8.2.tar.gz 332736 BLAKE2B 9730735a7112a80e257ee2dc4f7f957b6d62964d5bbf85bbed8d375e07ef86021f21f027e889b913bc5862ccda57942a4411fda7e642c949d1fbf37e640e5b5a SHA512 cc97937014c65bb2489759ac2f603d354be8d3b60f6e0f0f8c2598dc59a66d8701f426c9f91bc4b17d0f574832835ffc38de054a554bda02e09c617fd2a8129b
23 DIST nftables-0.8.tar.gz 327629 BLAKE2B a484c22ac010f68fc7458c12cabd0c35e474a0bf81fa4edbefba12d75b424898d38adb11a7fbb4542efbbb2d14be823701b3d9ced7b9fd669338366733fa169b SHA512 90ffebc338c121334ca42822793b6fdeff48390e755c690308919de47064b53f9af735a2c2914e5255f1bddec90484599337d4cdd67f7a01a3956deefcef9fcb
24
25 diff --git a/net-firewall/nftables/nftables-0.8.2.ebuild b/net-firewall/nftables/nftables-0.8.2.ebuild
26 new file mode 100644
27 index 00000000000..a38042ed9a6
28 --- /dev/null
29 +++ b/net-firewall/nftables/nftables-0.8.2.ebuild
30 @@ -0,0 +1,84 @@
31 +# Copyright 1999-2018 Gentoo Foundation
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=6
35 +
36 +inherit autotools linux-info systemd
37 +
38 +DESCRIPTION="Linux kernel (3.13+) firewall, NAT and packet mangling tools"
39 +HOMEPAGE="https://netfilter.org/projects/nftables/"
40 +SRC_URI="https://git.netfilter.org/nftables/snapshot/v${PV}.tar.gz -> ${P}.tar.gz"
41 +
42 +LICENSE="GPL-2"
43 +SLOT="0"
44 +KEYWORDS="~amd64 ~arm ~ia64 ~x86"
45 +IUSE="debug doc +gmp +readline"
46 +
47 +RDEPEND=">=net-libs/libmnl-1.0.3:0=
48 + gmp? ( dev-libs/gmp:0= )
49 + readline? ( sys-libs/readline:0= )
50 + >=net-libs/libnftnl-1.0.9:0="
51 +
52 +DEPEND="${RDEPEND}
53 + >=app-text/docbook2X-0.8.8-r4
54 + doc? ( >=app-text/dblatex-0.3.7 )
55 + sys-devel/bison
56 + sys-devel/flex
57 + virtual/pkgconfig"
58 +
59 +S="${WORKDIR}/v${PV}"
60 +
61 +pkg_setup() {
62 + if kernel_is ge 3 13; then
63 + CONFIG_CHECK="~NF_TABLES"
64 + linux-info_pkg_setup
65 + else
66 + eerror "This package requires kernel version 3.13 or newer to work properly."
67 + fi
68 +}
69 +
70 +src_prepare() {
71 + default
72 + eautoreconf
73 +}
74 +
75 +src_configure() {
76 + local myeconfargs=(
77 + --sbindir="${EPREFIX}"/sbin
78 + $(use_enable doc pdf-doc)
79 + $(use_enable debug)
80 + $(use_with readline cli)
81 + $(use_with !gmp mini_gmp)
82 + )
83 + econf "${myeconfargs[@]}"
84 +}
85 +
86 +src_install() {
87 + default
88 +
89 + dodir /usr/libexec/${PN}
90 + exeinto /usr/libexec/${PN}
91 + doexe "${FILESDIR}"/libexec/${PN}.sh
92 +
93 + newconfd "${FILESDIR}"/${PN}.confd ${PN}
94 + newinitd "${FILESDIR}"/${PN}.init ${PN}
95 + keepdir /var/lib/nftables
96 +
97 + systemd_dounit "${FILESDIR}"/systemd/${PN}-restore.service
98 + systemd_enable_service basic.target ${PN}-restore.service
99 +}
100 +
101 +pkg_postinst() {
102 + local save_file
103 + save_file="${EROOT%/}/var/lib/nftables/rules-save"
104 +
105 + # In order for the nftables-restore systemd service to start
106 + # the save_file must exist.
107 + if [[ ! -f ${save_file} ]]; then
108 + touch ${save_file}
109 + fi
110 +
111 + elog "If you are creating firewall rules before the next system restart "
112 + elog "the nftables-restore service must be manually started in order to "
113 + elog "save those rules on shutdown."
114 +}