1 |
commit: eaf5a9d096bc19ea688b4cfb7612cab7fa5658ab |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Feb 26 04:05:47 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Feb 26 04:07:07 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eaf5a9d0 |
7 |
|
8 |
net-firewall/firewalld: add 1.1.0 |
9 |
|
10 |
- Add updated firewalld.service for systemd (drops Conflicts line w/ now-gone |
11 |
iptables-and-friends unit files) |
12 |
- Fix needed kernel config options |
13 |
- Add optfeature for gnome-extra/nm-applet |
14 |
|
15 |
Closes: https://bugs.gentoo.org/831259 |
16 |
Closes: https://bugs.gentoo.org/833506 |
17 |
Closes: https://bugs.gentoo.org/833569 |
18 |
Thanks-to: <genBTC <AT> gmx.com> |
19 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
20 |
|
21 |
net-firewall/firewalld/Manifest | 1 + |
22 |
net-firewall/firewalld/files/firewalld.service | 22 +++ |
23 |
net-firewall/firewalld/firewalld-1.1.0.ebuild | 213 +++++++++++++++++++++++++ |
24 |
3 files changed, 236 insertions(+) |
25 |
|
26 |
diff --git a/net-firewall/firewalld/Manifest b/net-firewall/firewalld/Manifest |
27 |
index b33424011e4d..eb1690b0d69a 100644 |
28 |
--- a/net-firewall/firewalld/Manifest |
29 |
+++ b/net-firewall/firewalld/Manifest |
30 |
@@ -1,2 +1,3 @@ |
31 |
DIST firewalld-1.0.2.tar.gz 1307963 BLAKE2B 11a7710981ba39f4bcb8431558e5b558a60d77fb1aa3fe4c5febc37f2eab754a6608e4820b6318c963bb6290a9b26ae9e162d9e46277c34dfdacac46ba938b21 SHA512 fbb60a6f52e5be26051303769b6521a6c775d450ab6704f2d63fe38dc6194976ad36f1d924380d09012f41ab6dab1f6f78c5a859fbfe00c52cdff40d82e62283 |
32 |
DIST firewalld-1.0.3.tar.gz 1310433 BLAKE2B c414a347ca1008e010bf8393e45ffff38b5845fde7cc53b810276e46d67c6302cfe93a59665ad6ebc533b3ae04908f9089546b109888f60f0c798f3cac62a30d SHA512 0ba423e8c294d143f31bbdac13553e58cd0a3429812b555829c34f411478c26cffcc40095218539155e9ed7fe7e360fb8dd85a572a8ad9d5650b0cc206fe42a1 |
33 |
+DIST firewalld-1.1.0.tar.gz 1324519 BLAKE2B d9f97c88a1ed44b325bb95616770c0aff6e0088bccd08d062b3be686964d3d36003c1e13809a8802af2062ff7544b2a1fd870c1e933952a9b77af989ec0f9b54 SHA512 4cb8b0d6387de72827d06c19019e5608e36f647a70aef04879f9225795571638758abd5ff6333bd9db816b6de40d7e8df04c402556c2402e85ad34633d337091 |
34 |
|
35 |
diff --git a/net-firewall/firewalld/files/firewalld.service b/net-firewall/firewalld/files/firewalld.service |
36 |
new file mode 100644 |
37 |
index 000000000000..708326f58fed |
38 |
--- /dev/null |
39 |
+++ b/net-firewall/firewalld/files/firewalld.service |
40 |
@@ -0,0 +1,22 @@ |
41 |
+[Unit] |
42 |
+Description=firewalld - dynamic firewall daemon |
43 |
+Before=network-pre.target |
44 |
+Wants=network-pre.target |
45 |
+After=dbus.service |
46 |
+After=polkit.service |
47 |
+Documentation=man:firewalld(1) |
48 |
+ |
49 |
+[Service] |
50 |
+EnvironmentFile=-/etc/sysconfig/firewalld |
51 |
+ExecStart=/usr/sbin/firewalld --nofork --nopid $FIREWALLD_ARGS |
52 |
+ExecReload=/bin/kill -HUP $MAINPID |
53 |
+# supress to log debug and error output also to /var/log/messages |
54 |
+StandardOutput=null |
55 |
+StandardError=null |
56 |
+Type=dbus |
57 |
+BusName=org.fedoraproject.FirewallD1 |
58 |
+KillMode=mixed |
59 |
+ |
60 |
+[Install] |
61 |
+WantedBy=multi-user.target |
62 |
+Alias=dbus-org.fedoraproject.FirewallD1.service |
63 |
|
64 |
diff --git a/net-firewall/firewalld/firewalld-1.1.0.ebuild b/net-firewall/firewalld/firewalld-1.1.0.ebuild |
65 |
new file mode 100644 |
66 |
index 000000000000..467c6bd41651 |
67 |
--- /dev/null |
68 |
+++ b/net-firewall/firewalld/firewalld-1.1.0.ebuild |
69 |
@@ -0,0 +1,213 @@ |
70 |
+# Copyright 1999-2022 Gentoo Authors |
71 |
+# Distributed under the terms of the GNU General Public License v2 |
72 |
+ |
73 |
+EAPI=7 |
74 |
+ |
75 |
+PYTHON_COMPAT=( python3_{8,9,10} ) |
76 |
+inherit autotools bash-completion-r1 gnome2-utils linux-info optfeature plocale python-single-r1 systemd xdg-utils |
77 |
+ |
78 |
+DESCRIPTION="A firewall daemon with D-Bus interface providing a dynamic firewall" |
79 |
+HOMEPAGE="https://firewalld.org/" |
80 |
+SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
81 |
+ |
82 |
+LICENSE="GPL-2+" |
83 |
+SLOT="0" |
84 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86" |
85 |
+IUSE="gui +nftables +iptables" |
86 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
87 |
+ |
88 |
+RDEPEND="${PYTHON_DEPS} |
89 |
+ iptables? ( |
90 |
+ net-firewall/iptables[ipv6(+)] |
91 |
+ net-firewall/ebtables |
92 |
+ net-firewall/ipset |
93 |
+ nftables? ( net-firewall/nftables[xtables(+)] ) |
94 |
+ ) |
95 |
+ || ( >=sys-apps/openrc-0.11.5 sys-apps/systemd ) |
96 |
+ $(python_gen_cond_dep ' |
97 |
+ dev-python/dbus-python[${PYTHON_USEDEP}] |
98 |
+ dev-python/pygobject:3[${PYTHON_USEDEP}] |
99 |
+ gui? ( |
100 |
+ x11-libs/gtk+:3 |
101 |
+ dev-python/PyQt5[gui,widgets,${PYTHON_USEDEP}] |
102 |
+ ) |
103 |
+ nftables? ( >=net-firewall/nftables-0.9.4[python,json] ) |
104 |
+ ')" |
105 |
+DEPEND="${RDEPEND} |
106 |
+ dev-libs/glib:2" |
107 |
+BDEPEND=">=dev-util/intltool-0.35 |
108 |
+ sys-devel/gettext" |
109 |
+ |
110 |
+RESTRICT="test" # bug 650760 |
111 |
+ |
112 |
+# Testsuite's Makefile.am calls missing(!) |
113 |
+# ... but this seems to be consistent with the autoconf docs? |
114 |
+# Needs more investigation: https://www.gnu.org/software/autoconf/manual/autoconf-2.67/html_node/autom4te-Invocation.html |
115 |
+QA_AM_MAINTAINER_MODE=".*--run autom4te --language=autotest.*" |
116 |
+ |
117 |
+PLOCALES="ar as ast bg bn_IN ca cs da de el en_GB en_US es et eu fa fi fr gl gu hi hu ia id it ja ka kn ko lt ml mr nl or pa pl pt pt_BR ru si sk sq sr sr@latin sv ta te tr uk zh_CN zh_TW" |
118 |
+ |
119 |
+pkg_setup() { |
120 |
+ # See bug #830132 for the huge list |
121 |
+ # We can probably narrow it down a bit but it's rather fragile |
122 |
+ local CONFIG_CHECK="~NF_CONNTRACK ~NETFILTER_XT_MATCH_CONNTRACK |
123 |
+ ~NETFILTER |
124 |
+ ~NETFILTER_ADVANCED |
125 |
+ ~NETFILTER_INGRESS |
126 |
+ ~NF_NAT_MASQUERADE |
127 |
+ ~NF_NAT_REDIRECT |
128 |
+ ~NF_TABLES_INET |
129 |
+ ~NF_TABLES_IPV4 |
130 |
+ ~NF_TABLES_IPV6 |
131 |
+ ~NF_CONNTRACK |
132 |
+ ~NF_CONNTRACK_BROADCAST |
133 |
+ ~NF_CONNTRACK_NETBIOS_NS |
134 |
+ ~NF_CONNTRACK_TFTP |
135 |
+ ~NF_CT_NETLINK |
136 |
+ ~NF_CT_NETLINK_HELPER |
137 |
+ ~NF_DEFRAG_IPV4 |
138 |
+ ~NF_DEFRAG_IPV6 |
139 |
+ ~NF_NAT |
140 |
+ ~NF_NAT_TFTP |
141 |
+ ~NF_REJECT_IPV4 |
142 |
+ ~NF_REJECT_IPV6 |
143 |
+ ~NF_SOCKET_IPV4 |
144 |
+ ~NF_SOCKET_IPV6 |
145 |
+ ~NF_TABLES |
146 |
+ ~NF_TPROXY_IPV4 |
147 |
+ ~NF_TPROXY_IPV6 |
148 |
+ ~IP_NF_FILTER |
149 |
+ ~IP_NF_IPTABLES |
150 |
+ ~IP_NF_MANGLE |
151 |
+ ~IP_NF_NAT |
152 |
+ ~IP_NF_RAW |
153 |
+ ~IP_NF_SECURITY |
154 |
+ ~IP_NF_TARGET_MASQUERADE |
155 |
+ ~IP_NF_TARGET_REJECT |
156 |
+ ~IP6_NF_FILTER |
157 |
+ ~IP6_NF_IPTABLES |
158 |
+ ~IP6_NF_MANGLE |
159 |
+ ~IP6_NF_NAT |
160 |
+ ~IP6_NF_RAW |
161 |
+ ~IP6_NF_SECURITY |
162 |
+ ~IP6_NF_TARGET_MASQUERADE |
163 |
+ ~IP6_NF_TARGET_REJECT |
164 |
+ ~IP_SET |
165 |
+ ~NETFILTER_CONNCOUNT |
166 |
+ ~NETFILTER_NETLINK |
167 |
+ ~NETFILTER_NETLINK_OSF |
168 |
+ ~NETFILTER_NETLINK_QUEUE |
169 |
+ ~NETFILTER_SYNPROXY |
170 |
+ ~NETFILTER_XTABLES |
171 |
+ ~NETFILTER_XT_CONNMARK |
172 |
+ ~NETFILTER_XT_MATCH_CONNTRACK |
173 |
+ ~NETFILTER_XT_MATCH_MULTIPORT |
174 |
+ ~NETFILTER_XT_MATCH_STATE |
175 |
+ ~NETFILTER_XT_NAT |
176 |
+ ~NETFILTER_XT_TARGET_MASQUERADE |
177 |
+ ~NFT_COMPAT |
178 |
+ ~NFT_COUNTER |
179 |
+ ~NFT_CT |
180 |
+ ~NFT_FIB |
181 |
+ ~NFT_FIB_INET |
182 |
+ ~NFT_FIB_IPV4 |
183 |
+ ~NFT_FIB_IPV6 |
184 |
+ ~NFT_HASH |
185 |
+ ~NFT_LIMIT |
186 |
+ ~NFT_LOG |
187 |
+ ~NFT_MASQ |
188 |
+ ~NFT_NAT |
189 |
+ ~NFT_OBJREF |
190 |
+ ~NFT_QUEUE |
191 |
+ ~NFT_QUOTA |
192 |
+ ~NFT_REDIR |
193 |
+ ~NFT_REJECT |
194 |
+ ~NFT_REJECT_INET |
195 |
+ ~NFT_REJECT_IPV4 |
196 |
+ ~NFT_REJECT_IPV6 |
197 |
+ ~NFT_SOCKET |
198 |
+ ~NFT_SYNPROXY |
199 |
+ ~NFT_TPROXY |
200 |
+ ~NFT_TUNNEL |
201 |
+ ~NFT_XFRM" |
202 |
+ |
203 |
+ # kernel >= 4.19 has unified a NF_CONNTRACK module, bug #692944 |
204 |
+ if kernel_is -lt 4 19; then |
205 |
+ CONFIG_CHECK+=" ~NF_CONNTRACK_IPV4 ~NF_CONNTRACK_IPV6" |
206 |
+ fi |
207 |
+ |
208 |
+ # bug #831259 |
209 |
+ if kernel_is -le 5 4 ; then |
210 |
+ CONFIG_CHECK+=" ~NF_TABLES_SET" |
211 |
+ fi |
212 |
+ |
213 |
+ linux-info_pkg_setup |
214 |
+} |
215 |
+ |
216 |
+src_prepare() { |
217 |
+ default |
218 |
+ |
219 |
+ eautoreconf |
220 |
+ |
221 |
+ plocale_find_changes "po" "" ".po" |
222 |
+ plocale_get_locales | sed -e 's/ /\n/g' > po/LINGUAS |
223 |
+} |
224 |
+ |
225 |
+src_configure() { |
226 |
+ python_setup |
227 |
+ |
228 |
+ local econf_args=( |
229 |
+ --enable-systemd |
230 |
+ $(use_with iptables iptables "${EPREFIX}/sbin/iptables") |
231 |
+ $(use_with iptables iptables_restore "${EPREFIX}/sbin/iptables-restore") |
232 |
+ $(use_with iptables ip6tables "${EPREFIX}/sbin/ip6tables") |
233 |
+ $(use_with iptables ip6tables_restore "${EPREFIX}/sbin/ip6tables-restore") |
234 |
+ $(use_with iptables ebtables "${EPREFIX}/sbin/ebtables") |
235 |
+ $(use_with iptables ebtables_restore "${EPREFIX}/sbin/ebtables-restore") |
236 |
+ $(use_with iptables ipset "${EPREFIX}/usr/sbin/ipset") |
237 |
+ --with-systemd-unitdir="$(systemd_get_systemunitdir)" |
238 |
+ --with-bashcompletiondir="$(get_bashcompdir)" |
239 |
+ ) |
240 |
+ |
241 |
+ econf "${econf_args[@]}" |
242 |
+} |
243 |
+ |
244 |
+src_install() { |
245 |
+ default |
246 |
+ python_optimize |
247 |
+ |
248 |
+ # Get rid of junk |
249 |
+ rm -rf "${D}/etc/sysconfig/" || die |
250 |
+ |
251 |
+ # For non-gui installs we need to remove GUI bits |
252 |
+ if ! use gui; then |
253 |
+ rm -rf "${D}/etc/xdg/autostart" || die |
254 |
+ rm -f "${D}/usr/bin/firewall-applet" || die |
255 |
+ rm -f "${D}/usr/bin/firewall-config" || die |
256 |
+ rm -rf "${D}/usr/share/applications" || die |
257 |
+ rm -rf "${D}/usr/share/icons" || die |
258 |
+ fi |
259 |
+ |
260 |
+ newinitd "${FILESDIR}"/firewalld.init firewalld |
261 |
+ |
262 |
+ # Our version drops the/an obsolete 'conflicts' line with old iptables services |
263 |
+ # bug #833506 |
264 |
+ systemd_dounit "${FILESDIR}"/firewalld.service |
265 |
+} |
266 |
+ |
267 |
+pkg_preinst() { |
268 |
+ gnome2_schemas_savelist |
269 |
+} |
270 |
+ |
271 |
+pkg_postinst() { |
272 |
+ xdg_icon_cache_update |
273 |
+ gnome2_schemas_update |
274 |
+ |
275 |
+ # bug #833569 |
276 |
+ optfeature "Change zones with NetworkManager" gnome-extra/nm-applet |
277 |
+} |
278 |
+ |
279 |
+pkg_postrm() { |
280 |
+ xdg_icon_cache_update |
281 |
+ gnome2_schemas_update |
282 |
+} |