Gentoo Archives: gentoo-commits

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