1 |
commit: fbac6ebf7eef99b772840229a5042b1f7c921f85 |
2 |
Author: Ferenc Erki <erkiferenc <AT> gmail <DOT> com> |
3 |
AuthorDate: Thu Sep 17 08:41:41 2020 +0000 |
4 |
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Oct 2 08:57:53 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fbac6ebf |
7 |
|
8 |
net-firewall/arno-iptables-firewall: bump version to 2.1.1 |
9 |
|
10 |
- upstream removed some configuration options in favor of better |
11 |
autodetection, so we have to search and replace a few default |
12 |
locations in different files than before, but the overall |
13 |
settings/logic didn't change |
14 |
- install built-in job manager used by some plugins |
15 |
- install logrotate file |
16 |
- additional built-in plugin helpers |
17 |
|
18 |
Signed-off-by: Ferenc Erki <erkiferenc <AT> gmail.com> |
19 |
Closes: https://github.com/gentoo/gentoo/pull/17574 |
20 |
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org> |
21 |
|
22 |
net-firewall/arno-iptables-firewall/Manifest | 1 + |
23 |
.../arno-iptables-firewall-2.1.1.ebuild | 105 +++++++++++++++++++++ |
24 |
2 files changed, 106 insertions(+) |
25 |
|
26 |
diff --git a/net-firewall/arno-iptables-firewall/Manifest b/net-firewall/arno-iptables-firewall/Manifest |
27 |
index 07714f35f42..70301165c01 100644 |
28 |
--- a/net-firewall/arno-iptables-firewall/Manifest |
29 |
+++ b/net-firewall/arno-iptables-firewall/Manifest |
30 |
@@ -1,2 +1,3 @@ |
31 |
DIST arno-iptables-firewall-2.0.3.tar.gz 139445 BLAKE2B 57dade49a4aaacb1354129efeb5ca013060d51baa8c23dea1fc326e52a693c7137047883ea7bbca6cc3221f70a83f7283123a345e22ceac4bb99d3b43410b65d SHA512 c88a560d4c0a2644dd1ec35e0a6e2b1883e52dc6c71075207c3b98a59964a4be3787620e9414ad5e926bddb9dbc7c2674fd8687828526c35f0fb4a53a05aa929 |
32 |
DIST arno-iptables-firewall-2.1.0.tar.gz 140015 BLAKE2B 46ff89db6928bd4f86a5b26a06fa1ab2a88ecc5043f6f92543151c3ca6b74d9704c4b7046e1c5e1371e0b5de552e414cbe0524305947b026ec7953f9d779055d SHA512 b59644e78f281dacdd32045254be15dbd31ecb5f2b26d88a3c9bab60aaf19ea879d87127040db5f72292668e22026d982c17d3ad34c83da16720cdbccebdd07f |
33 |
+DIST arno-iptables-firewall-2.1.1.tar.gz 141076 BLAKE2B d3f78767a3ac447841aa01becfd73434cfddc9f56142d5c6ac86072527c17a30449434b8cddba74bb45f8234268ba589ab2ea932db462317a2dfb714f31f2450 SHA512 55494c8a214c0b2dacfef23170ea596bf9ecdfc73d1a6b2bd703183278569f68103eb63580d1b18cae97a9460b95373f0091bbf5decf275c80803a1331555d79 |
34 |
|
35 |
diff --git a/net-firewall/arno-iptables-firewall/arno-iptables-firewall-2.1.1.ebuild b/net-firewall/arno-iptables-firewall/arno-iptables-firewall-2.1.1.ebuild |
36 |
new file mode 100644 |
37 |
index 00000000000..0b622d4894c |
38 |
--- /dev/null |
39 |
+++ b/net-firewall/arno-iptables-firewall/arno-iptables-firewall-2.1.1.ebuild |
40 |
@@ -0,0 +1,105 @@ |
41 |
+# Copyright 1999-2020 Gentoo Authors |
42 |
+# Distributed under the terms of the GNU General Public License v2 |
43 |
+ |
44 |
+EAPI=7 |
45 |
+inherit readme.gentoo-r1 systemd |
46 |
+ |
47 |
+DESCRIPTION="Arno's iptables firewall script" |
48 |
+HOMEPAGE="https://rocky.eld.leidenuniv.nl" |
49 |
+ |
50 |
+MY_PV=$(ver_rs 3 -) |
51 |
+MY_PV=${MY_PV/rc/RC} |
52 |
+SRC_URI="https://github.com/${PN}/aif/archive/${MY_PV}.tar.gz -> ${P}.tar.gz" |
53 |
+ |
54 |
+LICENSE="GPL-2" |
55 |
+SLOT="0" |
56 |
+KEYWORDS="~amd64 ~x86" |
57 |
+IUSE="+plugins rsyslog" |
58 |
+ |
59 |
+DEPEND="" |
60 |
+RDEPEND="net-firewall/ipset |
61 |
+ net-firewall/iptables |
62 |
+ sys-apps/coreutils |
63 |
+ sys-apps/iproute2 |
64 |
+ plugins? ( net-dns/bind-tools )" |
65 |
+ |
66 |
+S="${WORKDIR}/aif-${MY_PV}" |
67 |
+ |
68 |
+DISABLE_AUTOFORMATTING="yes" |
69 |
+DOC_CONTENTS="You will need to configure /etc/${PN}/firewall.conf |
70 |
+before using this package. To start the script, run: |
71 |
+ |
72 |
+/etc/init.d/${PN} start (for OpenRC) |
73 |
+systemctl start ${PN} (for systemd) |
74 |
+ |
75 |
+If you want to start this script at boot, run: |
76 |
+ |
77 |
+rc-update add ${PN} default (for OpenRC) |
78 |
+systemctl enable ${PN} (for systemd)" |
79 |
+ |
80 |
+src_prepare() { |
81 |
+ sed -i -e 's:/usr/local/share/:/usr/libexec/:' \ |
82 |
+ bin/"${PN}" share/"${PN}"/environment || die "Sed failed!" |
83 |
+ sed -i -e 's:/usr/local/sbin/:/usr/sbin/:' \ |
84 |
+ lib/systemd/system/"${PN}.service" || die "Sed failed!" |
85 |
+ eapply_user |
86 |
+} |
87 |
+ |
88 |
+src_install() { |
89 |
+ insinto /etc/"${PN}" |
90 |
+ doins etc/"${PN}"/firewall.conf |
91 |
+ doins etc/"${PN}"/custom-rules |
92 |
+ |
93 |
+ doinitd "${FILESDIR}/${PN}" |
94 |
+ systemd_dounit lib/systemd/system/"${PN}.service" |
95 |
+ |
96 |
+ dobin bin/arno-fwfilter |
97 |
+ dosbin bin/"${PN}" |
98 |
+ |
99 |
+ insinto /usr/libexec/"${PN}" |
100 |
+ doins share/"${PN}"/aif-job-execute |
101 |
+ doins share/"${PN}"/aif-job-processor |
102 |
+ doins share/"${PN}"/environment |
103 |
+ |
104 |
+ insinto /etc/logrotate.d |
105 |
+ doins etc/logrotate.d/"${PN}" |
106 |
+ |
107 |
+ dodoc CHANGELOG README |
108 |
+ readme.gentoo_create_doc |
109 |
+ |
110 |
+ if use plugins |
111 |
+ then |
112 |
+ insinto /etc/"${PN}"/plugins |
113 |
+ doins etc/"${PN}"/plugins/* |
114 |
+ |
115 |
+ insinto /usr/libexec/"${PN}"/plugins |
116 |
+ doins share/"${PN}"/plugins/*.plugin |
117 |
+ |
118 |
+ exeinto /usr/libexec/"${PN}"/plugins |
119 |
+ doexe share/"${PN}"/plugins/adaptive-ban-helper |
120 |
+ doexe share/"${PN}"/plugins/dyndns-host-open-helper |
121 |
+ doexe share/"${PN}"/plugins/parasitic-net-helper |
122 |
+ doexe share/"${PN}"/plugins/traffic-accounting-helper |
123 |
+ doexe share/"${PN}"/plugins/traffic-accounting-log-rotate |
124 |
+ doexe share/"${PN}"/plugins/traffic-accounting-show |
125 |
+ |
126 |
+ docinto plugins |
127 |
+ dodoc share/"${PN}"/plugins/*.CHANGELOG |
128 |
+ fi |
129 |
+ |
130 |
+ if use rsyslog |
131 |
+ then |
132 |
+ insinto /etc/rsyslog.d |
133 |
+ newins etc/rsyslog.d/"${PN}".conf 60-"${PN}".conf |
134 |
+ fi |
135 |
+ |
136 |
+ doman share/man/man1/arno-fwfilter.1 \ |
137 |
+ share/man/man8/"${PN}".8 |
138 |
+} |
139 |
+ |
140 |
+pkg_postinst() { |
141 |
+ ewarn "When you stop this script, all firewall rules are flushed!" |
142 |
+ ewarn "Make sure to not use multiple firewall scripts simultaneously" |
143 |
+ ewarn "unless you know what you are doing!" |
144 |
+ readme.gentoo_print_elog |
145 |
+} |