1 |
commit: ae62e133c84c646842cca143727a32805c59d921 |
2 |
Author: Patrick McLean <chutzpah <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Jun 27 20:37:10 2020 +0000 |
4 |
Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jun 27 20:37:31 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ae62e133 |
7 |
|
8 |
net-firewall/nftables-0.9.6: Add py39, instructions for openrc |
9 |
|
10 |
Package-Manager: Portage-2.3.103, Repoman-2.3.23 |
11 |
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org> |
12 |
|
13 |
net-firewall/nftables/nftables-0.9.6.ebuild | 39 ++++++++++++++++++----------- |
14 |
1 file changed, 25 insertions(+), 14 deletions(-) |
15 |
|
16 |
diff --git a/net-firewall/nftables/nftables-0.9.6.ebuild b/net-firewall/nftables/nftables-0.9.6.ebuild |
17 |
index aad88b61923..44e1fc441fb 100644 |
18 |
--- a/net-firewall/nftables/nftables-0.9.6.ebuild |
19 |
+++ b/net-firewall/nftables/nftables-0.9.6.ebuild |
20 |
@@ -3,13 +3,12 @@ |
21 |
|
22 |
EAPI=7 |
23 |
|
24 |
-PYTHON_COMPAT=( python3_{6,7,8} ) |
25 |
+PYTHON_COMPAT=( python3_{6,7,8,9} ) |
26 |
|
27 |
inherit autotools linux-info python-r1 systemd |
28 |
|
29 |
DESCRIPTION="Linux kernel (3.13+) firewall, NAT and packet mangling tools" |
30 |
HOMEPAGE="https://netfilter.org/projects/nftables/" |
31 |
-#SRC_URI="https://git.netfilter.org/nftables/snapshot/v${PV}.tar.gz -> ${P}.tar.gz" |
32 |
SRC_URI="https://netfilter.org/projects/nftables/files/${P}.tar.bz2" |
33 |
|
34 |
LICENSE="GPL-2" |
35 |
@@ -37,9 +36,9 @@ BDEPEND=" |
36 |
virtual/pkgconfig |
37 |
" |
38 |
|
39 |
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" |
40 |
- |
41 |
-#S="${WORKDIR}/v${PV}" |
42 |
+REQUIRED_USE=" |
43 |
+ python? ( ${PYTHON_REQUIRED_USE} ) |
44 |
+" |
45 |
|
46 |
python_make() { |
47 |
emake \ |
48 |
@@ -47,7 +46,7 @@ python_make() { |
49 |
abs_builddir="${S}" \ |
50 |
DESTDIR="${D}" \ |
51 |
PYTHON_BIN="${PYTHON}" \ |
52 |
- ${@} |
53 |
+ "${@}" |
54 |
} |
55 |
|
56 |
pkg_setup() { |
57 |
@@ -93,7 +92,7 @@ src_configure() { |
58 |
src_compile() { |
59 |
default |
60 |
|
61 |
- if use python ; then |
62 |
+ if use python; then |
63 |
python_foreach_impl python_make |
64 |
fi |
65 |
} |
66 |
@@ -141,11 +140,23 @@ pkg_postinst() { |
67 |
ewarn " 'chmod 600 \"${save_file}\"'" |
68 |
fi |
69 |
|
70 |
- elog "If you wish to enable the firewall rules on boot (on systemd) you" |
71 |
- elog "will need to enable the nftables-restore service." |
72 |
- elog " 'systemctl enable ${PN}-restore.service'" |
73 |
- elog |
74 |
- elog "If you are creating firewall rules before the next system restart " |
75 |
- elog "the nftables-restore service must be manually started in order to " |
76 |
- elog "save those rules on shutdown." |
77 |
+ if has_version 'sys-apps/systemd'; then |
78 |
+ elog "If you wish to enable the firewall rules on boot (on systemd) you" |
79 |
+ elog "will need to enable the nftables-restore service." |
80 |
+ elog " 'systemctl enable ${PN}-restore.service'" |
81 |
+ elog |
82 |
+ elog "If you are creating firewall rules before the next system restart" |
83 |
+ elog "the nftables-restore service must be manually started in order to" |
84 |
+ elog "save those rules on shutdown." |
85 |
+ fi |
86 |
+ if has_version 'sys-apps/openrc'; then |
87 |
+ elog "If you wish to enable the firewall rules on boot (on openrc) you" |
88 |
+ elog "will need to enable the nftables service." |
89 |
+ elog " 'rc-update add ${PN} default'" |
90 |
+ elog |
91 |
+ elog "If you are creating or updating the firewall rules and wish to save" |
92 |
+ elog "them to be loaded on the next restart, use the \"save\" functionality" |
93 |
+ elog "in the init script." |
94 |
+ elog " 'rc-service ${PN} save'" |
95 |
+ fi |
96 |
} |