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: Sat, 26 Mar 2022 21:22:01
Message-Id: 1648329700.b6d2bef61b69df7c6c193fd3fd6434ebfbb66eca.sam@gentoo
1 commit: b6d2bef61b69df7c6c193fd3fd6434ebfbb66eca
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Sat Mar 26 21:00:11 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sat Mar 26 21:21:40 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b6d2bef6
7
8 net-firewall/firewalld: add 1.1.1
9
10 Signed-off-by: Sam James <sam <AT> gentoo.org>
11
12 net-firewall/firewalld/Manifest | 1 +
13 net-firewall/firewalld/firewalld-1.1.1.ebuild | 213 ++++++++++++++++++++++++++
14 2 files changed, 214 insertions(+)
15
16 diff --git a/net-firewall/firewalld/Manifest b/net-firewall/firewalld/Manifest
17 index eb1690b0d69a..6ef8dd026dee 100644
18 --- a/net-firewall/firewalld/Manifest
19 +++ b/net-firewall/firewalld/Manifest
20 @@ -1,3 +1,4 @@
21 DIST firewalld-1.0.2.tar.gz 1307963 BLAKE2B 11a7710981ba39f4bcb8431558e5b558a60d77fb1aa3fe4c5febc37f2eab754a6608e4820b6318c963bb6290a9b26ae9e162d9e46277c34dfdacac46ba938b21 SHA512 fbb60a6f52e5be26051303769b6521a6c775d450ab6704f2d63fe38dc6194976ad36f1d924380d09012f41ab6dab1f6f78c5a859fbfe00c52cdff40d82e62283
22 DIST firewalld-1.0.3.tar.gz 1310433 BLAKE2B c414a347ca1008e010bf8393e45ffff38b5845fde7cc53b810276e46d67c6302cfe93a59665ad6ebc533b3ae04908f9089546b109888f60f0c798f3cac62a30d SHA512 0ba423e8c294d143f31bbdac13553e58cd0a3429812b555829c34f411478c26cffcc40095218539155e9ed7fe7e360fb8dd85a572a8ad9d5650b0cc206fe42a1
23 DIST firewalld-1.1.0.tar.gz 1324519 BLAKE2B d9f97c88a1ed44b325bb95616770c0aff6e0088bccd08d062b3be686964d3d36003c1e13809a8802af2062ff7544b2a1fd870c1e933952a9b77af989ec0f9b54 SHA512 4cb8b0d6387de72827d06c19019e5608e36f647a70aef04879f9225795571638758abd5ff6333bd9db816b6de40d7e8df04c402556c2402e85ad34633d337091
24 +DIST firewalld-1.1.1.tar.gz 1325362 BLAKE2B 0167d9bc1c76da420dfe8aa5e6bfdd743116fbe6959d5920b972fac09c72608c90b9d6b2bb4bd7bb01250cbab2bdbb30a017becf5d050f490f4f289661e4366a SHA512 ecf75c30be63d2285d0b915b26d20e679c2f45f121c37b8cecc236da02d21039c692d1fec72e6c29d2a7b6de570daad573c230deacaef7491a2fd39c35332479
25
26 diff --git a/net-firewall/firewalld/firewalld-1.1.1.ebuild b/net-firewall/firewalld/firewalld-1.1.1.ebuild
27 new file mode 100644
28 index 000000000000..93efaebbee7e
29 --- /dev/null
30 +++ b/net-firewall/firewalld/firewalld-1.1.1.ebuild
31 @@ -0,0 +1,213 @@
32 +# Copyright 1999-2022 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=8
36 +
37 +PYTHON_COMPAT=( python3_{8,9,10} )
38 +inherit autotools bash-completion-r1 gnome2-utils linux-info optfeature plocale python-single-r1 systemd xdg-utils
39 +
40 +DESCRIPTION="A firewall daemon with D-Bus interface providing a dynamic firewall"
41 +HOMEPAGE="https://firewalld.org/"
42 +SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
43 +
44 +LICENSE="GPL-2+"
45 +SLOT="0"
46 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
47 +IUSE="gui +nftables +iptables"
48 +REQUIRED_USE="${PYTHON_REQUIRED_USE}"
49 +
50 +RDEPEND="${PYTHON_DEPS}
51 + iptables? (
52 + net-firewall/iptables[ipv6(+)]
53 + net-firewall/ebtables
54 + net-firewall/ipset
55 + nftables? ( net-firewall/nftables[xtables(+)] )
56 + )
57 + || ( >=sys-apps/openrc-0.11.5 sys-apps/systemd )
58 + $(python_gen_cond_dep '
59 + dev-python/dbus-python[${PYTHON_USEDEP}]
60 + dev-python/pygobject:3[${PYTHON_USEDEP}]
61 + gui? (
62 + x11-libs/gtk+:3
63 + dev-python/PyQt5[gui,widgets,${PYTHON_USEDEP}]
64 + )
65 + nftables? ( >=net-firewall/nftables-0.9.4[python,json] )
66 + ')"
67 +DEPEND="${RDEPEND}
68 + dev-libs/glib:2"
69 +BDEPEND=">=dev-util/intltool-0.35
70 + sys-devel/gettext"
71 +
72 +RESTRICT="test" # bug 650760
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 + eautoreconf
182 +
183 + plocale_find_changes "po" "" ".po" || die
184 + plocale_get_locales | sed -e 's/ /\n/g' > po/LINGUAS
185 +}
186 +
187 +src_configure() {
188 + python_setup
189 +
190 + local econf_args=(
191 + --enable-systemd
192 + $(use_with iptables iptables "${EPREFIX}/sbin/iptables")
193 + $(use_with iptables iptables_restore "${EPREFIX}/sbin/iptables-restore")
194 + $(use_with iptables ip6tables "${EPREFIX}/sbin/ip6tables")
195 + $(use_with iptables ip6tables_restore "${EPREFIX}/sbin/ip6tables-restore")
196 + $(use_with iptables ebtables "${EPREFIX}/sbin/ebtables")
197 + $(use_with iptables ebtables_restore "${EPREFIX}/sbin/ebtables-restore")
198 + $(use_with iptables ipset "${EPREFIX}/usr/sbin/ipset")
199 + --with-systemd-unitdir="$(systemd_get_systemunitdir)"
200 + --with-bashcompletiondir="$(get_bashcompdir)"
201 + )
202 +
203 + econf "${econf_args[@]}"
204 +}
205 +
206 +src_install() {
207 + default
208 + python_optimize
209 +
210 + # Get rid of junk
211 + rm -rf "${D}/etc/sysconfig/" || die
212 +
213 + # For non-gui installs we need to remove GUI bits
214 + if ! use gui; then
215 + rm -rf "${D}/etc/xdg/autostart" || die
216 + rm -f "${D}/usr/bin/firewall-applet" || die
217 + rm -f "${D}/usr/bin/firewall-config" || die
218 + rm -rf "${D}/usr/share/applications" || die
219 + rm -rf "${D}/usr/share/icons" || die
220 + fi
221 +
222 + newinitd "${FILESDIR}"/firewalld.init firewalld
223 +
224 + # Our version drops the/an obsolete 'conflicts' line with old iptables services
225 + # bug #833506
226 + systemd_dounit "${FILESDIR}"/firewalld.service
227 +}
228 +
229 +pkg_preinst() {
230 + gnome2_schemas_savelist
231 +}
232 +
233 +pkg_postinst() {
234 + xdg_icon_cache_update
235 + gnome2_schemas_update
236 +
237 + # bug #833569
238 + optfeature "changing zones with NetworkManager" gnome-extra/nm-applet
239 +}
240 +
241 +pkg_postrm() {
242 + xdg_icon_cache_update
243 + gnome2_schemas_update
244 +}