1 |
commit: 7e1c6b5f7a77e4935739f255953cd90876065ab0 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Jul 2 20:23:59 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jul 2 20:30:47 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7e1c6b5f |
7 |
|
8 |
net-firewall/firewalld: add 1.2.0 |
9 |
|
10 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
11 |
|
12 |
net-firewall/firewalld/Manifest | 1 + |
13 |
net-firewall/firewalld/firewalld-1.2.0.ebuild | 212 ++++++++++++++++++++++++++ |
14 |
2 files changed, 213 insertions(+) |
15 |
|
16 |
diff --git a/net-firewall/firewalld/Manifest b/net-firewall/firewalld/Manifest |
17 |
index 43d03f05036d..0a9506eac4f6 100644 |
18 |
--- a/net-firewall/firewalld/Manifest |
19 |
+++ b/net-firewall/firewalld/Manifest |
20 |
@@ -1,2 +1,3 @@ |
21 |
DIST firewalld-1.1.1.tar.gz 1325362 BLAKE2B 0167d9bc1c76da420dfe8aa5e6bfdd743116fbe6959d5920b972fac09c72608c90b9d6b2bb4bd7bb01250cbab2bdbb30a017becf5d050f490f4f289661e4366a SHA512 ecf75c30be63d2285d0b915b26d20e679c2f45f121c37b8cecc236da02d21039c692d1fec72e6c29d2a7b6de570daad573c230deacaef7491a2fd39c35332479 |
22 |
DIST firewalld-1.1.2.tar.gz 2099245 BLAKE2B ea1e73cf96908ca4981deb86d4c0fad75f36ef321a37bba6d789b3de90b1cbb818f1eda713f41567c2125265b2e19707d411e1b51ab35c6f1af8b6040528f150 SHA512 a82a57d77c2fb5e9758218516912057bfbfb5549b341bcaaa8d40f3c39b8af67a01ca146a3aa09495ca38b315fa09a5d3d32597c40de10ca2da370b81d5598b0 |
23 |
+DIST firewalld-1.2.0.tar.gz 2120379 BLAKE2B 8c09e9a5e08e9f4dc2b3bfeda35d9078bd464956a30d7fdb5700329755fc307f0664f6a20ff5e941026785f28940b1eeebe747e2b2b3eed150725e014d05f870 SHA512 739ef7e4b85f2f00656434f6b37fb8116b9a93595390667d212820bc30a3e3cfaf5a60be7b18ec1f72be720d35a76224f3ce28856a9ff72557b8a8ae8e83f0a8 |
24 |
|
25 |
diff --git a/net-firewall/firewalld/firewalld-1.2.0.ebuild b/net-firewall/firewalld/firewalld-1.2.0.ebuild |
26 |
new file mode 100644 |
27 |
index 000000000000..a1e5b3069d0d |
28 |
--- /dev/null |
29 |
+++ b/net-firewall/firewalld/firewalld-1.2.0.ebuild |
30 |
@@ -0,0 +1,212 @@ |
31 |
+# Copyright 1999-2022 Gentoo Authors |
32 |
+# Distributed under the terms of the GNU General Public License v2 |
33 |
+ |
34 |
+EAPI=8 |
35 |
+ |
36 |
+PYTHON_COMPAT=( python3_{8..10} ) |
37 |
+inherit bash-completion-r1 gnome2-utils linux-info optfeature plocale python-single-r1 systemd xdg-utils |
38 |
+ |
39 |
+DESCRIPTION="A firewall daemon with D-Bus interface providing a dynamic firewall" |
40 |
+HOMEPAGE="https://firewalld.org/" |
41 |
+SRC_URI="https://github.com/firewalld/firewalld/releases/download/v${PV}/${P}.tar.gz" |
42 |
+ |
43 |
+LICENSE="GPL-2+" |
44 |
+SLOT="0" |
45 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86" |
46 |
+IUSE="gui +nftables +iptables test" |
47 |
+# Tests previously restricted for bug #650760 |
48 |
+RESTRICT="!test? ( test ) test? ( userpriv )" |
49 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
50 |
+ |
51 |
+RDEPEND="${PYTHON_DEPS} |
52 |
+ iptables? ( |
53 |
+ net-firewall/iptables[ipv6(+)] |
54 |
+ net-firewall/ebtables |
55 |
+ net-firewall/ipset |
56 |
+ nftables? ( net-firewall/nftables[xtables(+)] ) |
57 |
+ ) |
58 |
+ || ( >=sys-apps/openrc-0.11.5 sys-apps/systemd ) |
59 |
+ $(python_gen_cond_dep ' |
60 |
+ dev-python/dbus-python[${PYTHON_USEDEP}] |
61 |
+ dev-python/pygobject:3[${PYTHON_USEDEP}] |
62 |
+ gui? ( |
63 |
+ x11-libs/gtk+:3 |
64 |
+ dev-python/PyQt5[gui,widgets,${PYTHON_USEDEP}] |
65 |
+ ) |
66 |
+ nftables? ( >=net-firewall/nftables-0.9.4[python,json] ) |
67 |
+ ')" |
68 |
+DEPEND="${RDEPEND} |
69 |
+ dev-libs/glib:2" |
70 |
+BDEPEND="app-text/docbook-xml-dtd |
71 |
+ >=dev-util/intltool-0.35 |
72 |
+ sys-devel/gettext" |
73 |
+ |
74 |
+# Testsuite's Makefile.am calls missing(!) |
75 |
+# ... but this seems to be consistent with the autoconf docs? |
76 |
+# Needs more investigation: https://www.gnu.org/software/autoconf/manual/autoconf-2.67/html_node/autom4te-Invocation.html |
77 |
+QA_AM_MAINTAINER_MODE=".*--run autom4te --language=autotest.*" |
78 |
+ |
79 |
+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 hr 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" |
80 |
+ |
81 |
+pkg_setup() { |
82 |
+ # See bug #830132 for the huge list |
83 |
+ # We can probably narrow it down a bit but it's rather fragile |
84 |
+ local CONFIG_CHECK="~NF_CONNTRACK ~NETFILTER_XT_MATCH_CONNTRACK |
85 |
+ ~NETFILTER |
86 |
+ ~NETFILTER_ADVANCED |
87 |
+ ~NETFILTER_INGRESS |
88 |
+ ~NF_NAT_MASQUERADE |
89 |
+ ~NF_NAT_REDIRECT |
90 |
+ ~NF_TABLES_INET |
91 |
+ ~NF_TABLES_IPV4 |
92 |
+ ~NF_TABLES_IPV6 |
93 |
+ ~NF_CONNTRACK |
94 |
+ ~NF_CONNTRACK_BROADCAST |
95 |
+ ~NF_CONNTRACK_NETBIOS_NS |
96 |
+ ~NF_CONNTRACK_TFTP |
97 |
+ ~NF_CT_NETLINK |
98 |
+ ~NF_CT_NETLINK_HELPER |
99 |
+ ~NF_DEFRAG_IPV4 |
100 |
+ ~NF_DEFRAG_IPV6 |
101 |
+ ~NF_NAT |
102 |
+ ~NF_NAT_TFTP |
103 |
+ ~NF_REJECT_IPV4 |
104 |
+ ~NF_REJECT_IPV6 |
105 |
+ ~NF_SOCKET_IPV4 |
106 |
+ ~NF_SOCKET_IPV6 |
107 |
+ ~NF_TABLES |
108 |
+ ~NF_TPROXY_IPV4 |
109 |
+ ~NF_TPROXY_IPV6 |
110 |
+ ~IP_NF_FILTER |
111 |
+ ~IP_NF_IPTABLES |
112 |
+ ~IP_NF_MANGLE |
113 |
+ ~IP_NF_NAT |
114 |
+ ~IP_NF_RAW |
115 |
+ ~IP_NF_SECURITY |
116 |
+ ~IP_NF_TARGET_MASQUERADE |
117 |
+ ~IP_NF_TARGET_REJECT |
118 |
+ ~IP6_NF_FILTER |
119 |
+ ~IP6_NF_IPTABLES |
120 |
+ ~IP6_NF_MANGLE |
121 |
+ ~IP6_NF_NAT |
122 |
+ ~IP6_NF_RAW |
123 |
+ ~IP6_NF_SECURITY |
124 |
+ ~IP6_NF_TARGET_MASQUERADE |
125 |
+ ~IP6_NF_TARGET_REJECT |
126 |
+ ~IP_SET |
127 |
+ ~NETFILTER_CONNCOUNT |
128 |
+ ~NETFILTER_NETLINK |
129 |
+ ~NETFILTER_NETLINK_OSF |
130 |
+ ~NETFILTER_NETLINK_QUEUE |
131 |
+ ~NETFILTER_SYNPROXY |
132 |
+ ~NETFILTER_XTABLES |
133 |
+ ~NETFILTER_XT_CONNMARK |
134 |
+ ~NETFILTER_XT_MATCH_CONNTRACK |
135 |
+ ~NETFILTER_XT_MATCH_MULTIPORT |
136 |
+ ~NETFILTER_XT_MATCH_STATE |
137 |
+ ~NETFILTER_XT_NAT |
138 |
+ ~NETFILTER_XT_TARGET_MASQUERADE |
139 |
+ ~NFT_COMPAT |
140 |
+ ~NFT_COUNTER |
141 |
+ ~NFT_CT |
142 |
+ ~NFT_FIB |
143 |
+ ~NFT_FIB_INET |
144 |
+ ~NFT_FIB_IPV4 |
145 |
+ ~NFT_FIB_IPV6 |
146 |
+ ~NFT_HASH |
147 |
+ ~NFT_LIMIT |
148 |
+ ~NFT_LOG |
149 |
+ ~NFT_MASQ |
150 |
+ ~NFT_NAT |
151 |
+ ~NFT_OBJREF |
152 |
+ ~NFT_QUEUE |
153 |
+ ~NFT_QUOTA |
154 |
+ ~NFT_REDIR |
155 |
+ ~NFT_REJECT |
156 |
+ ~NFT_REJECT_INET |
157 |
+ ~NFT_REJECT_IPV4 |
158 |
+ ~NFT_REJECT_IPV6 |
159 |
+ ~NFT_SOCKET |
160 |
+ ~NFT_SYNPROXY |
161 |
+ ~NFT_TPROXY |
162 |
+ ~NFT_TUNNEL |
163 |
+ ~NFT_XFRM" |
164 |
+ |
165 |
+ # kernel >= 4.19 has unified a NF_CONNTRACK module, bug #692944 |
166 |
+ if kernel_is -lt 4 19; then |
167 |
+ CONFIG_CHECK+=" ~NF_CONNTRACK_IPV4 ~NF_CONNTRACK_IPV6" |
168 |
+ fi |
169 |
+ |
170 |
+ # bug #831259 |
171 |
+ if kernel_is -le 5 4 ; then |
172 |
+ CONFIG_CHECK+=" ~NF_TABLES_SET" |
173 |
+ fi |
174 |
+ |
175 |
+ linux-info_pkg_setup |
176 |
+} |
177 |
+ |
178 |
+src_prepare() { |
179 |
+ default |
180 |
+ |
181 |
+ plocale_find_changes "po" "" ".po" || die |
182 |
+ plocale_get_locales | sed -e 's/ /\n/g' > po/LINGUAS |
183 |
+} |
184 |
+ |
185 |
+src_configure() { |
186 |
+ python_setup |
187 |
+ |
188 |
+ local myeconfargs=( |
189 |
+ --enable-systemd |
190 |
+ $(use_with iptables iptables "${EPREFIX}/sbin/iptables") |
191 |
+ $(use_with iptables iptables_restore "${EPREFIX}/sbin/iptables-restore") |
192 |
+ $(use_with iptables ip6tables "${EPREFIX}/sbin/ip6tables") |
193 |
+ $(use_with iptables ip6tables_restore "${EPREFIX}/sbin/ip6tables-restore") |
194 |
+ $(use_with iptables ebtables "${EPREFIX}/sbin/ebtables") |
195 |
+ $(use_with iptables ebtables_restore "${EPREFIX}/sbin/ebtables-restore") |
196 |
+ $(use_with iptables ipset "${EPREFIX}/usr/sbin/ipset") |
197 |
+ --with-systemd-unitdir="$(systemd_get_systemunitdir)" |
198 |
+ --with-bashcompletiondir="$(get_bashcompdir)" |
199 |
+ ) |
200 |
+ |
201 |
+ econf "${myeconfargs[@]}" |
202 |
+} |
203 |
+ |
204 |
+src_install() { |
205 |
+ default |
206 |
+ python_optimize |
207 |
+ |
208 |
+ # Get rid of junk |
209 |
+ rm -rf "${D}/etc/sysconfig/" || die |
210 |
+ |
211 |
+ # For non-gui installs we need to remove GUI bits |
212 |
+ if ! use gui; then |
213 |
+ rm -rf "${D}/etc/xdg/autostart" || die |
214 |
+ rm -f "${D}/usr/bin/firewall-applet" || die |
215 |
+ rm -f "${D}/usr/bin/firewall-config" || die |
216 |
+ rm -rf "${D}/usr/share/applications" || die |
217 |
+ rm -rf "${D}/usr/share/icons" || die |
218 |
+ fi |
219 |
+ |
220 |
+ newinitd "${FILESDIR}"/firewalld.init firewalld |
221 |
+ |
222 |
+ # Our version drops the/an obsolete 'conflicts' line with old iptables services |
223 |
+ # bug #833506 |
224 |
+ systemd_dounit "${FILESDIR}"/firewalld.service |
225 |
+} |
226 |
+ |
227 |
+pkg_preinst() { |
228 |
+ gnome2_schemas_savelist |
229 |
+} |
230 |
+ |
231 |
+pkg_postinst() { |
232 |
+ xdg_icon_cache_update |
233 |
+ gnome2_schemas_update |
234 |
+ |
235 |
+ # bug #833569 |
236 |
+ optfeature "changing zones with NetworkManager" gnome-extra/nm-applet |
237 |
+} |
238 |
+ |
239 |
+pkg_postrm() { |
240 |
+ xdg_icon_cache_update |
241 |
+ gnome2_schemas_update |
242 |
+} |