1 |
commit: 7d761f89de9ca533a4ef703b99439de2f7761d81 |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Apr 2 07:46:45 2020 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Apr 2 07:47:50 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7d761f89 |
7 |
|
8 |
net-firewall/nftables: Removed old |
9 |
|
10 |
Package-Manager: Portage-2.3.96, Repoman-2.3.22 |
11 |
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org> |
12 |
|
13 |
net-firewall/nftables/Manifest | 3 - |
14 |
.../nftables-0.9.1-avoid_dive_into_py_subdir.patch | 49 ------- |
15 |
.../files/nftables-0.9.1-python_build.patch | 45 ------- |
16 |
net-firewall/nftables/nftables-0.9.0-r5.ebuild | 103 -------------- |
17 |
net-firewall/nftables/nftables-0.9.0-r6.ebuild | 103 -------------- |
18 |
net-firewall/nftables/nftables-0.9.1-r2.ebuild | 149 --------------------- |
19 |
net-firewall/nftables/nftables-0.9.2-r2.ebuild | 144 -------------------- |
20 |
7 files changed, 596 deletions(-) |
21 |
|
22 |
diff --git a/net-firewall/nftables/Manifest b/net-firewall/nftables/Manifest |
23 |
index 38d6eefb1dd..8efe409eb2f 100644 |
24 |
--- a/net-firewall/nftables/Manifest |
25 |
+++ b/net-firewall/nftables/Manifest |
26 |
@@ -1,5 +1,2 @@ |
27 |
-DIST nftables-0.9.0.tar.gz 417981 BLAKE2B 4dfba4d71928f1694ffeb4871353fc373d88e23c5ba716e726e1e6aba0efb2703233528f7a408bfefe47bfe54aa3612cccab9742c2a2208ec8c7a4bcda0e1823 SHA512 78e383bad5440c9414202cf0e4b6749fc5c01071d2fa547208e61cea6e7e179933990e7e538a60696eb0a7cf510d2c4b273a91d50287bb51507d244cd2875aed |
28 |
-DIST nftables-0.9.1.tar.bz2 764066 BLAKE2B 26b194d6b3b970c05348c32a3ab21e8c25fcdb0d09d3d6b467198ba23a5bb44e7b6450d3efb86c39a488df4a837885c4a1ab96c197d5449f7de49b7b18ff5f90 SHA512 e14b75197ba3fea2a46c090450bf8b45b39fdc20db67bab1d6919c90128dee8ea8bbe9508e070f86b22ec70bcad8ab584fb89630a2240f09683137471c77d242 |
29 |
-DIST nftables-0.9.2.tar.bz2 779850 BLAKE2B 40bf9ed956a126048f27b343afc7aa4f6e34f35dc91127402cb127903f8150d212c80491fef2b54c18a63ca065608521062b3f6a2dd78969bdbf4d7d8a5a751d SHA512 2d83b104af0d70f99a16c2e40afdb9bf89bd984323810e2895976c5e2e346bf09dd88850a391f295e335279adfdd39d34c13610cf8e6b801499dc0df2a5cecf6 |
30 |
DIST nftables-0.9.3.tar.bz2 786759 BLAKE2B 578276d861fdb2b843223aca1276bbc1dda9627d0058259a966e324e30ee64d8c102d1e2cceb82d29143caa9dcd1a4492df168f1c87b136fc7b3a1a7dc8568a8 SHA512 d264f6fc75c95510e29fe7d5b82ae418d502f40437b098ba6117ffb1374d9989d70a7296e2e58c5fb25142145a987bb9c160902637899f892589809f9541db43 |
31 |
DIST nftables-0.9.4.tar.bz2 792788 BLAKE2B 3f2d8ff3bcfe3ab815ee369c4937adef5e5730edee8ea59b32031732802e608bcb47ddd3e55303ad6c295158aff51b2f2c069d98600db83d732ff78836c7abb5 SHA512 cef5b5f26f3a2893a3eb1323f1f0ecfd6e2865e0eb040e9b7da5824e5be2274b888e661abe96e828add9e951f47303e30cb7c9238d267a031c0f99b5f3b6e2c0 |
32 |
|
33 |
diff --git a/net-firewall/nftables/files/nftables-0.9.1-avoid_dive_into_py_subdir.patch b/net-firewall/nftables/files/nftables-0.9.1-avoid_dive_into_py_subdir.patch |
34 |
deleted file mode 100644 |
35 |
index 8ff4b85d88a..00000000000 |
36 |
--- a/net-firewall/nftables/files/nftables-0.9.1-avoid_dive_into_py_subdir.patch |
37 |
+++ /dev/null |
38 |
@@ -1,49 +0,0 @@ |
39 |
-From c5ca85848c2fe28366d286a5b000f99d927516d3 Mon Sep 17 00:00:00 2001 |
40 |
-From: Jan Engelhardt <jengelh@××××.de> |
41 |
-Date: Tue, 25 Jun 2019 08:58:34 +0200 |
42 |
-Subject: build: avoid recursion into py/ if not selected |
43 |
- |
44 |
-Signed-off-by: Jan Engelhardt <jengelh@××××.de> |
45 |
-Signed-off-by: Pablo Neira Ayuso <pablo@×××××××××.org> |
46 |
---- |
47 |
- Makefile.am | 6 ++++-- |
48 |
- py/Makefile.am | 3 --- |
49 |
- 2 files changed, 4 insertions(+), 5 deletions(-) |
50 |
- |
51 |
-diff --git a/Makefile.am b/Makefile.am |
52 |
-index e567d32d..4a17424d 100644 |
53 |
---- a/Makefile.am |
54 |
-+++ b/Makefile.am |
55 |
-@@ -3,8 +3,10 @@ ACLOCAL_AMFLAGS = -I m4 |
56 |
- SUBDIRS = src \ |
57 |
- include \ |
58 |
- files \ |
59 |
-- doc \ |
60 |
-- py |
61 |
-+ doc |
62 |
-+if HAVE_PYTHON |
63 |
-+SUBDIRS += py |
64 |
-+endif |
65 |
- |
66 |
- EXTRA_DIST = tests \ |
67 |
- files |
68 |
-diff --git a/py/Makefile.am b/py/Makefile.am |
69 |
-index 9fce7c9e..5f4e1f6f 100644 |
70 |
---- a/py/Makefile.am |
71 |
-+++ b/py/Makefile.am |
72 |
-@@ -1,7 +1,5 @@ |
73 |
- EXTRA_DIST = setup.py __init__.py nftables.py schema.json |
74 |
- |
75 |
--if HAVE_PYTHON |
76 |
-- |
77 |
- all-local: |
78 |
- cd $(srcdir) && \ |
79 |
- $(PYTHON_BIN) setup.py build --build-base $(abs_builddir) |
80 |
-@@ -28,4 +26,3 @@ clean-local: |
81 |
- |
82 |
- distclean-local: |
83 |
- rm -f version |
84 |
--endif |
85 |
--- |
86 |
-cgit v1.2.1 |
87 |
- |
88 |
|
89 |
diff --git a/net-firewall/nftables/files/nftables-0.9.1-python_build.patch b/net-firewall/nftables/files/nftables-0.9.1-python_build.patch |
90 |
deleted file mode 100644 |
91 |
index 81f65524ce7..00000000000 |
92 |
--- a/net-firewall/nftables/files/nftables-0.9.1-python_build.patch |
93 |
+++ /dev/null |
94 |
@@ -1,45 +0,0 @@ |
95 |
-From 1f7e4deb527db32c55646e6e5baedb2ff2aa205e Mon Sep 17 00:00:00 2001 |
96 |
-From: Jan Engelhardt <jengelh@××××.de> |
97 |
-Date: Tue, 25 Jun 2019 08:58:33 +0200 |
98 |
-Subject: build: unbreak non-functionality of --disable-python |
99 |
- |
100 |
-Signed-off-by: Jan Engelhardt <jengelh@××××.de> |
101 |
-Signed-off-by: Pablo Neira Ayuso <pablo@×××××××××.org> |
102 |
---- |
103 |
- configure.ac | 11 +++++++---- |
104 |
- 1 file changed, 7 insertions(+), 4 deletions(-) |
105 |
- |
106 |
-diff --git a/configure.ac b/configure.ac |
107 |
-index 75cf9199..b71268e8 100644 |
108 |
---- a/configure.ac |
109 |
-+++ b/configure.ac |
110 |
-@@ -103,11 +103,14 @@ AC_ARG_WITH([python_bin], |
111 |
- ) |
112 |
- |
113 |
- AS_IF([test "x$PYTHON_BIN" = "x"], [ |
114 |
-- AS_IF([test "x$enable_python" = "xyes"], [AC_MSG_ERROR([Python asked but not found])]) |
115 |
-- AS_IF([test "x$enable_python" = "xcheck"], [AC_MSG_WARN([Python not found, continuing anyway])]) |
116 |
-+ AS_IF([test "x$enable_python" = "xyes"], [AC_MSG_ERROR([Python asked but not found])], |
117 |
-+ [test "x$enable_python" = "xcheck"], [ |
118 |
-+ AC_MSG_WARN([Python not found, continuing anyway]) |
119 |
-+ enable_python=no |
120 |
- ]) |
121 |
-+]) |
122 |
- |
123 |
--AM_CONDITIONAL([HAVE_PYTHON], [test "x$PYTHON_BIN" != "x"]) |
124 |
-+AM_CONDITIONAL([HAVE_PYTHON], [test "$enable_python" != "no"]) |
125 |
- |
126 |
- AC_CONFIG_FILES([ \ |
127 |
- Makefile \ |
128 |
-@@ -138,7 +141,7 @@ nft configuration: |
129 |
- libxtables support: ${with_xtables} |
130 |
- json output support: ${with_json}" |
131 |
- |
132 |
--AS_IF([test "x$PYTHON_BIN" != "x"], [ |
133 |
-+AS_IF([test "$enable_python" != "no"], [ |
134 |
- echo " enable Python: yes (with $PYTHON_BIN)" |
135 |
- ], [ |
136 |
- echo " enable Python: no" |
137 |
--- |
138 |
-cgit v1.2.1 |
139 |
- |
140 |
|
141 |
diff --git a/net-firewall/nftables/nftables-0.9.0-r5.ebuild b/net-firewall/nftables/nftables-0.9.0-r5.ebuild |
142 |
deleted file mode 100644 |
143 |
index dc29d33b649..00000000000 |
144 |
--- a/net-firewall/nftables/nftables-0.9.0-r5.ebuild |
145 |
+++ /dev/null |
146 |
@@ -1,103 +0,0 @@ |
147 |
-# Copyright 1999-2019 Gentoo Authors |
148 |
-# Distributed under the terms of the GNU General Public License v2 |
149 |
- |
150 |
-EAPI=6 |
151 |
- |
152 |
-inherit autotools linux-info systemd |
153 |
- |
154 |
-DESCRIPTION="Linux kernel (3.13+) firewall, NAT and packet mangling tools" |
155 |
-HOMEPAGE="https://netfilter.org/projects/nftables/" |
156 |
-SRC_URI="https://git.netfilter.org/nftables/snapshot/v${PV}.tar.gz -> ${P}.tar.gz" |
157 |
- |
158 |
-LICENSE="GPL-2" |
159 |
-SLOT="0" |
160 |
-KEYWORDS="amd64 arm ~arm64 ia64 x86" |
161 |
-IUSE="debug doc +gmp json +modern-kernel +readline" |
162 |
- |
163 |
-RDEPEND=">=net-libs/libmnl-1.0.3:0= |
164 |
- gmp? ( dev-libs/gmp:0= ) |
165 |
- json? ( dev-libs/jansson ) |
166 |
- readline? ( sys-libs/readline:0= ) |
167 |
- >=net-libs/libnftnl-1.1.1:0=" |
168 |
- |
169 |
-DEPEND="${RDEPEND} |
170 |
- >=app-text/docbook2X-0.8.8-r4 |
171 |
- doc? ( >=app-text/dblatex-0.3.7 ) |
172 |
- sys-devel/bison |
173 |
- sys-devel/flex |
174 |
- virtual/pkgconfig" |
175 |
- |
176 |
-S="${WORKDIR}/v${PV}" |
177 |
- |
178 |
-pkg_setup() { |
179 |
- if kernel_is ge 3 13; then |
180 |
- if use modern-kernel && kernel_is lt 3 18; then |
181 |
- eerror "The modern-kernel USE flag requires kernel version 3.18 or newer to work properly." |
182 |
- fi |
183 |
- CONFIG_CHECK="~NF_TABLES" |
184 |
- linux-info_pkg_setup |
185 |
- else |
186 |
- eerror "This package requires kernel version 3.13 or newer to work properly." |
187 |
- fi |
188 |
-} |
189 |
- |
190 |
-src_prepare() { |
191 |
- default |
192 |
- eautoreconf |
193 |
-} |
194 |
- |
195 |
-src_configure() { |
196 |
- local myeconfargs=( |
197 |
- --sbindir="${EPREFIX}"/sbin |
198 |
- $(use_enable debug) |
199 |
- $(use_enable doc pdf-doc) |
200 |
- $(use_with !gmp mini_gmp) |
201 |
- $(use_with json) |
202 |
- $(use_with readline cli) |
203 |
- ) |
204 |
- econf "${myeconfargs[@]}" |
205 |
-} |
206 |
- |
207 |
-src_install() { |
208 |
- default |
209 |
- |
210 |
- local mksuffix="" |
211 |
- use modern-kernel && mksuffix="-mk" |
212 |
- |
213 |
- exeinto /usr/libexec/${PN} |
214 |
- newexe "${FILESDIR}"/libexec/${PN}${mksuffix}.sh ${PN}.sh |
215 |
- newconfd "${FILESDIR}"/${PN}${mksuffix}.confd ${PN} |
216 |
- newinitd "${FILESDIR}"/${PN}${mksuffix}.init ${PN} |
217 |
- keepdir /var/lib/nftables |
218 |
- |
219 |
- systemd_dounit "${FILESDIR}"/systemd/${PN}-restore.service |
220 |
- |
221 |
- docinto /usr/share/doc/${PF}/skels |
222 |
- dodoc "${D}"/etc/nftables/* |
223 |
- rm -R "${D}"/etc/nftables |
224 |
-} |
225 |
- |
226 |
-pkg_postinst() { |
227 |
- local save_file |
228 |
- save_file="${EROOT%/}/var/lib/nftables/rules-save" |
229 |
- |
230 |
- # In order for the nftables-restore systemd service to start |
231 |
- # the save_file must exist. |
232 |
- if [[ ! -f "${save_file}" ]]; then |
233 |
- ( umask 177; touch "${save_file}" ) |
234 |
- elif [[ $(( "$( stat --printf '%05a' "${save_file}" )" & 07177 )) -ne 0 ]]; then |
235 |
- ewarn "Your system has dangerous permissions for ${save_file}" |
236 |
- ewarn "It is probably affected by bug #691326." |
237 |
- ewarn "You may need to fix the permissions of the file. To do so," |
238 |
- ewarn "you can run the command in the line below as root." |
239 |
- ewarn " 'chmod 600 \"${save_file}\"'" |
240 |
- fi |
241 |
- |
242 |
- elog "If you wish to enable the firewall rules on boot (on systemd) you" |
243 |
- elog "will need to enable the nftables-restore service." |
244 |
- elog " 'systemd_enable_service basic.target ${PN}-restore.service'" |
245 |
- elog |
246 |
- elog "If you are creating firewall rules before the next system restart " |
247 |
- elog "the nftables-restore service must be manually started in order to " |
248 |
- elog "save those rules on shutdown." |
249 |
-} |
250 |
|
251 |
diff --git a/net-firewall/nftables/nftables-0.9.0-r6.ebuild b/net-firewall/nftables/nftables-0.9.0-r6.ebuild |
252 |
deleted file mode 100644 |
253 |
index 90884e99c1c..00000000000 |
254 |
--- a/net-firewall/nftables/nftables-0.9.0-r6.ebuild |
255 |
+++ /dev/null |
256 |
@@ -1,103 +0,0 @@ |
257 |
-# Copyright 1999-2019 Gentoo Authors |
258 |
-# Distributed under the terms of the GNU General Public License v2 |
259 |
- |
260 |
-EAPI=6 |
261 |
- |
262 |
-inherit autotools linux-info systemd |
263 |
- |
264 |
-DESCRIPTION="Linux kernel (3.13+) firewall, NAT and packet mangling tools" |
265 |
-HOMEPAGE="https://netfilter.org/projects/nftables/" |
266 |
-SRC_URI="https://git.netfilter.org/nftables/snapshot/v${PV}.tar.gz -> ${P}.tar.gz" |
267 |
- |
268 |
-LICENSE="GPL-2" |
269 |
-SLOT="0" |
270 |
-KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~x86" |
271 |
-IUSE="debug doc +gmp json +modern-kernel +readline" |
272 |
- |
273 |
-RDEPEND=">=net-libs/libmnl-1.0.3:0= |
274 |
- gmp? ( dev-libs/gmp:0= ) |
275 |
- json? ( dev-libs/jansson ) |
276 |
- readline? ( sys-libs/readline:0= ) |
277 |
- >=net-libs/libnftnl-1.1.1:0=" |
278 |
- |
279 |
-DEPEND="${RDEPEND} |
280 |
- >=app-text/docbook2X-0.8.8-r4 |
281 |
- doc? ( >=app-text/dblatex-0.3.7 ) |
282 |
- sys-devel/bison |
283 |
- sys-devel/flex |
284 |
- virtual/pkgconfig" |
285 |
- |
286 |
-S="${WORKDIR}/v${PV}" |
287 |
- |
288 |
-pkg_setup() { |
289 |
- if kernel_is ge 3 13; then |
290 |
- if use modern-kernel && kernel_is lt 3 18; then |
291 |
- eerror "The modern-kernel USE flag requires kernel version 3.18 or newer to work properly." |
292 |
- fi |
293 |
- CONFIG_CHECK="~NF_TABLES" |
294 |
- linux-info_pkg_setup |
295 |
- else |
296 |
- eerror "This package requires kernel version 3.13 or newer to work properly." |
297 |
- fi |
298 |
-} |
299 |
- |
300 |
-src_prepare() { |
301 |
- default |
302 |
- eautoreconf |
303 |
-} |
304 |
- |
305 |
-src_configure() { |
306 |
- local myeconfargs=( |
307 |
- --sbindir="${EPREFIX}"/sbin |
308 |
- $(use_enable debug) |
309 |
- $(use_enable doc pdf-doc) |
310 |
- $(use_with !gmp mini_gmp) |
311 |
- $(use_with json) |
312 |
- $(use_with readline cli) |
313 |
- ) |
314 |
- econf "${myeconfargs[@]}" |
315 |
-} |
316 |
- |
317 |
-src_install() { |
318 |
- default |
319 |
- |
320 |
- local mksuffix="" |
321 |
- use modern-kernel && mksuffix="-mk" |
322 |
- |
323 |
- exeinto /usr/libexec/${PN} |
324 |
- newexe "${FILESDIR}"/libexec/${PN}${mksuffix}.sh ${PN}.sh |
325 |
- newconfd "${FILESDIR}"/${PN}${mksuffix}.confd ${PN} |
326 |
- newinitd "${FILESDIR}"/${PN}${mksuffix}.init ${PN} |
327 |
- keepdir /var/lib/nftables |
328 |
- |
329 |
- systemd_dounit "${FILESDIR}"/systemd/${PN}-restore.service |
330 |
- |
331 |
- docinto skels |
332 |
- dodoc "${D}"/etc/nftables/* |
333 |
- rm -R "${D}"/etc/nftables |
334 |
-} |
335 |
- |
336 |
-pkg_postinst() { |
337 |
- local save_file |
338 |
- save_file="${EROOT%/}/var/lib/nftables/rules-save" |
339 |
- |
340 |
- # In order for the nftables-restore systemd service to start |
341 |
- # the save_file must exist. |
342 |
- if [[ ! -f "${save_file}" ]]; then |
343 |
- ( umask 177; touch "${save_file}" ) |
344 |
- elif [[ $(( "$( stat --printf '%05a' "${save_file}" )" & 07177 )) -ne 0 ]]; then |
345 |
- ewarn "Your system has dangerous permissions for ${save_file}" |
346 |
- ewarn "It is probably affected by bug #691326." |
347 |
- ewarn "You may need to fix the permissions of the file. To do so," |
348 |
- ewarn "you can run the command in the line below as root." |
349 |
- ewarn " 'chmod 600 \"${save_file}\"'" |
350 |
- fi |
351 |
- |
352 |
- elog "If you wish to enable the firewall rules on boot (on systemd) you" |
353 |
- elog "will need to enable the nftables-restore service." |
354 |
- elog " 'systemd_enable_service basic.target ${PN}-restore.service'" |
355 |
- elog |
356 |
- elog "If you are creating firewall rules before the next system restart " |
357 |
- elog "the nftables-restore service must be manually started in order to " |
358 |
- elog "save those rules on shutdown." |
359 |
-} |
360 |
|
361 |
diff --git a/net-firewall/nftables/nftables-0.9.1-r2.ebuild b/net-firewall/nftables/nftables-0.9.1-r2.ebuild |
362 |
deleted file mode 100644 |
363 |
index adebe58c63c..00000000000 |
364 |
--- a/net-firewall/nftables/nftables-0.9.1-r2.ebuild |
365 |
+++ /dev/null |
366 |
@@ -1,149 +0,0 @@ |
367 |
-# Copyright 1999-2020 Gentoo Authors |
368 |
-# Distributed under the terms of the GNU General Public License v2 |
369 |
- |
370 |
-EAPI=7 |
371 |
- |
372 |
-PYTHON_COMPAT=( python3_{6,7} ) |
373 |
- |
374 |
-inherit autotools linux-info python-r1 systemd |
375 |
- |
376 |
-DESCRIPTION="Linux kernel (3.13+) firewall, NAT and packet mangling tools" |
377 |
-HOMEPAGE="https://netfilter.org/projects/nftables/" |
378 |
-#SRC_URI="https://git.netfilter.org/nftables/snapshot/v${PV}.tar.gz -> ${P}.tar.gz" |
379 |
-SRC_URI="https://netfilter.org/projects/nftables/files/${P}.tar.bz2" |
380 |
- |
381 |
-LICENSE="GPL-2" |
382 |
-SLOT="0" |
383 |
-KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~x86" |
384 |
-IUSE="debug +doc +gmp json +modern-kernel python +readline static-libs xtables" |
385 |
- |
386 |
-RDEPEND=" |
387 |
- >=net-libs/libmnl-1.0.3:0= |
388 |
- gmp? ( dev-libs/gmp:0= ) |
389 |
- json? ( dev-libs/jansson ) |
390 |
- python? ( ${PYTHON_DEPS} ) |
391 |
- readline? ( sys-libs/readline:0= ) |
392 |
- >=net-libs/libnftnl-1.1.3:0= |
393 |
- xtables? ( >=net-firewall/iptables-1.6.1 ) |
394 |
-" |
395 |
- |
396 |
-DEPEND="${RDEPEND}" |
397 |
- |
398 |
-BDEPEND=" |
399 |
- doc? ( app-text/asciidoc ) |
400 |
- >=app-text/docbook2X-0.8.8-r4 |
401 |
- sys-devel/bison |
402 |
- sys-devel/flex |
403 |
- virtual/pkgconfig |
404 |
-" |
405 |
- |
406 |
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" |
407 |
- |
408 |
-#S="${WORKDIR}/v${PV}" |
409 |
- |
410 |
-PATCHES=( |
411 |
- "${FILESDIR}"/${P}-python_build.patch |
412 |
- "${FILESDIR}"/${P}-avoid_dive_into_py_subdir.patch |
413 |
-) |
414 |
- |
415 |
-python_make() { |
416 |
- emake \ |
417 |
- -C py \ |
418 |
- abs_builddir="${S}" \ |
419 |
- DESTDIR="${D}" \ |
420 |
- PYTHON_BIN="${PYTHON}" \ |
421 |
- ${@} |
422 |
-} |
423 |
- |
424 |
-pkg_setup() { |
425 |
- if kernel_is ge 3 13; then |
426 |
- if use modern-kernel && kernel_is lt 3 18; then |
427 |
- eerror "The modern-kernel USE flag requires kernel version 3.18 or newer to work properly." |
428 |
- fi |
429 |
- CONFIG_CHECK="~NF_TABLES" |
430 |
- linux-info_pkg_setup |
431 |
- else |
432 |
- eerror "This package requires kernel version 3.13 or newer to work properly." |
433 |
- fi |
434 |
-} |
435 |
- |
436 |
-src_prepare() { |
437 |
- default |
438 |
- |
439 |
- # fix installation path for doc stuff |
440 |
- sed '/^pkgsysconfdir/s@${sysconfdir}.*$@${docdir}/skels@' \ |
441 |
- -i files/nftables/Makefile.am || die |
442 |
- sed '/^pkgsysconfdir/s@${sysconfdir}.*$@${docdir}/skels/osf@' \ |
443 |
- -i files/osf/Makefile.am || die |
444 |
- |
445 |
- eautoreconf |
446 |
-} |
447 |
- |
448 |
-src_configure() { |
449 |
- local myeconfargs=( |
450 |
- # We handle python separately |
451 |
- --disable-python |
452 |
- --sbindir="${EPREFIX}"/sbin |
453 |
- $(use_enable debug) |
454 |
- $(use_enable doc man-doc) |
455 |
- $(use_with !gmp mini_gmp) |
456 |
- $(use_with json) |
457 |
- $(use_with readline cli) |
458 |
- $(use_enable static-libs static) |
459 |
- $(use_with xtables) |
460 |
- ) |
461 |
- econf "${myeconfargs[@]}" |
462 |
-} |
463 |
- |
464 |
-src_compile() { |
465 |
- default |
466 |
- |
467 |
- if use python ; then |
468 |
- python_foreach_impl python_make |
469 |
- fi |
470 |
-} |
471 |
- |
472 |
-src_install() { |
473 |
- default |
474 |
- |
475 |
- local mksuffix="$(usex modern-kernel '-mk' '')" |
476 |
- |
477 |
- exeinto /usr/libexec/${PN} |
478 |
- newexe "${FILESDIR}"/libexec/${PN}${mksuffix}.sh ${PN}.sh |
479 |
- newconfd "${FILESDIR}"/${PN}${mksuffix}.confd ${PN} |
480 |
- newinitd "${FILESDIR}"/${PN}${mksuffix}.init ${PN} |
481 |
- keepdir /var/lib/nftables |
482 |
- |
483 |
- systemd_dounit "${FILESDIR}"/systemd/${PN}-restore.service |
484 |
- |
485 |
- if use python ; then |
486 |
- python_foreach_impl python_make install |
487 |
- fi |
488 |
- |
489 |
- find "${ED}" -type f -name "*.la" -delete || die |
490 |
-} |
491 |
- |
492 |
-pkg_postinst() { |
493 |
- local save_file |
494 |
- save_file="${EROOT}/var/lib/nftables/rules-save" |
495 |
- |
496 |
- # In order for the nftables-restore systemd service to start |
497 |
- # the save_file must exist. |
498 |
- if [[ ! -f "${save_file}" ]]; then |
499 |
- ( umask 177; touch "${save_file}" ) |
500 |
- elif [[ $(( "$( stat --printf '%05a' "${save_file}" )" & 07177 )) -ne 0 ]]; then |
501 |
- ewarn "Your system has dangerous permissions for ${save_file}" |
502 |
- ewarn "It is probably affected by bug #691326." |
503 |
- ewarn "You may need to fix the permissions of the file. To do so," |
504 |
- ewarn "you can run the command in the line below as root." |
505 |
- ewarn " 'chmod 600 \"${save_file}\"'" |
506 |
- fi |
507 |
- |
508 |
- elog "If you wish to enable the firewall rules on boot (on systemd) you" |
509 |
- elog "will need to enable the nftables-restore service." |
510 |
- elog " 'systemd_enable_service basic.target ${PN}-restore.service'" |
511 |
- elog |
512 |
- elog "If you are creating firewall rules before the next system restart " |
513 |
- elog "the nftables-restore service must be manually started in order to " |
514 |
- elog "save those rules on shutdown." |
515 |
-} |
516 |
|
517 |
diff --git a/net-firewall/nftables/nftables-0.9.2-r2.ebuild b/net-firewall/nftables/nftables-0.9.2-r2.ebuild |
518 |
deleted file mode 100644 |
519 |
index 99f33eaaa6c..00000000000 |
520 |
--- a/net-firewall/nftables/nftables-0.9.2-r2.ebuild |
521 |
+++ /dev/null |
522 |
@@ -1,144 +0,0 @@ |
523 |
-# Copyright 1999-2020 Gentoo Authors |
524 |
-# Distributed under the terms of the GNU General Public License v2 |
525 |
- |
526 |
-EAPI=7 |
527 |
- |
528 |
-PYTHON_COMPAT=( python3_{6,7} ) |
529 |
- |
530 |
-inherit autotools linux-info python-r1 systemd |
531 |
- |
532 |
-DESCRIPTION="Linux kernel (3.13+) firewall, NAT and packet mangling tools" |
533 |
-HOMEPAGE="https://netfilter.org/projects/nftables/" |
534 |
-#SRC_URI="https://git.netfilter.org/nftables/snapshot/v${PV}.tar.gz -> ${P}.tar.gz" |
535 |
-SRC_URI="https://netfilter.org/projects/nftables/files/${P}.tar.bz2" |
536 |
- |
537 |
-LICENSE="GPL-2" |
538 |
-SLOT="0" |
539 |
-KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~sparc ~x86" |
540 |
-IUSE="debug +doc +gmp json +modern-kernel python +readline static-libs xtables" |
541 |
- |
542 |
-RDEPEND=" |
543 |
- >=net-libs/libmnl-1.0.3:0= |
544 |
- gmp? ( dev-libs/gmp:0= ) |
545 |
- json? ( dev-libs/jansson ) |
546 |
- python? ( ${PYTHON_DEPS} ) |
547 |
- readline? ( sys-libs/readline:0= ) |
548 |
- >=net-libs/libnftnl-1.1.4:0= |
549 |
- xtables? ( >=net-firewall/iptables-1.6.1 ) |
550 |
-" |
551 |
- |
552 |
-DEPEND="${RDEPEND}" |
553 |
- |
554 |
-BDEPEND=" |
555 |
- doc? ( app-text/asciidoc ) |
556 |
- >=app-text/docbook2X-0.8.8-r4 |
557 |
- sys-devel/bison |
558 |
- sys-devel/flex |
559 |
- virtual/pkgconfig |
560 |
-" |
561 |
- |
562 |
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" |
563 |
- |
564 |
-#S="${WORKDIR}/v${PV}" |
565 |
- |
566 |
-python_make() { |
567 |
- emake \ |
568 |
- -C py \ |
569 |
- abs_builddir="${S}" \ |
570 |
- DESTDIR="${D}" \ |
571 |
- PYTHON_BIN="${PYTHON}" \ |
572 |
- ${@} |
573 |
-} |
574 |
- |
575 |
-pkg_setup() { |
576 |
- if kernel_is ge 3 13; then |
577 |
- if use modern-kernel && kernel_is lt 3 18; then |
578 |
- eerror "The modern-kernel USE flag requires kernel version 3.18 or newer to work properly." |
579 |
- fi |
580 |
- CONFIG_CHECK="~NF_TABLES" |
581 |
- linux-info_pkg_setup |
582 |
- else |
583 |
- eerror "This package requires kernel version 3.13 or newer to work properly." |
584 |
- fi |
585 |
-} |
586 |
- |
587 |
-src_prepare() { |
588 |
- default |
589 |
- |
590 |
- # fix installation path for doc stuff |
591 |
- sed '/^pkgsysconfdir/s@${sysconfdir}.*$@${docdir}/skels@' \ |
592 |
- -i files/nftables/Makefile.am || die |
593 |
- sed '/^pkgsysconfdir/s@${sysconfdir}.*$@${docdir}/skels/osf@' \ |
594 |
- -i files/osf/Makefile.am || die |
595 |
- |
596 |
- eautoreconf |
597 |
-} |
598 |
- |
599 |
-src_configure() { |
600 |
- local myeconfargs=( |
601 |
- # We handle python separately |
602 |
- --disable-python |
603 |
- --sbindir="${EPREFIX}"/sbin |
604 |
- $(use_enable debug) |
605 |
- $(use_enable doc man-doc) |
606 |
- $(use_with !gmp mini_gmp) |
607 |
- $(use_with json) |
608 |
- $(use_with readline cli) |
609 |
- $(use_enable static-libs static) |
610 |
- $(use_with xtables) |
611 |
- ) |
612 |
- econf "${myeconfargs[@]}" |
613 |
-} |
614 |
- |
615 |
-src_compile() { |
616 |
- default |
617 |
- |
618 |
- if use python ; then |
619 |
- python_foreach_impl python_make |
620 |
- fi |
621 |
-} |
622 |
- |
623 |
-src_install() { |
624 |
- default |
625 |
- |
626 |
- local mksuffix="$(usex modern-kernel '-mk' '')" |
627 |
- |
628 |
- exeinto /usr/libexec/${PN} |
629 |
- newexe "${FILESDIR}"/libexec/${PN}${mksuffix}.sh ${PN}.sh |
630 |
- newconfd "${FILESDIR}"/${PN}${mksuffix}.confd ${PN} |
631 |
- newinitd "${FILESDIR}"/${PN}${mksuffix}.init ${PN} |
632 |
- keepdir /var/lib/nftables |
633 |
- |
634 |
- systemd_dounit "${FILESDIR}"/systemd/${PN}-restore.service |
635 |
- |
636 |
- if use python ; then |
637 |
- python_foreach_impl python_make install |
638 |
- fi |
639 |
- |
640 |
- find "${ED}" -type f -name "*.la" -delete || die |
641 |
-} |
642 |
- |
643 |
-pkg_postinst() { |
644 |
- local save_file |
645 |
- save_file="${EROOT}/var/lib/nftables/rules-save" |
646 |
- |
647 |
- # In order for the nftables-restore systemd service to start |
648 |
- # the save_file must exist. |
649 |
- if [[ ! -f "${save_file}" ]]; then |
650 |
- ( umask 177; touch "${save_file}" ) |
651 |
- elif [[ $(( "$( stat --printf '%05a' "${save_file}" )" & 07177 )) -ne 0 ]]; then |
652 |
- ewarn "Your system has dangerous permissions for ${save_file}" |
653 |
- ewarn "It is probably affected by bug #691326." |
654 |
- ewarn "You may need to fix the permissions of the file. To do so," |
655 |
- ewarn "you can run the command in the line below as root." |
656 |
- ewarn " 'chmod 600 \"${save_file}\"'" |
657 |
- fi |
658 |
- |
659 |
- elog "If you wish to enable the firewall rules on boot (on systemd) you" |
660 |
- elog "will need to enable the nftables-restore service." |
661 |
- elog " 'systemd_enable_service basic.target ${PN}-restore.service'" |
662 |
- elog |
663 |
- elog "If you are creating firewall rules before the next system restart " |
664 |
- elog "the nftables-restore service must be manually started in order to " |
665 |
- elog "save those rules on shutdown." |
666 |
-} |