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: Mon, 10 Jan 2022 22:52:34
Message-Id: 1641855097.26e9b66291419aaf7f458a9ed972da92ea27dffc.sam@gentoo
1 commit: 26e9b66291419aaf7f458a9ed972da92ea27dffc
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jan 10 22:51:37 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Mon Jan 10 22:51:37 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=26e9b662
7
8 net-firewall/firewalld: add 1.0.3
9
10 Signed-off-by: Sam James <sam <AT> gentoo.org>
11
12 net-firewall/firewalld/Manifest | 1 +
13 net-firewall/firewalld/firewalld-1.0.3.ebuild | 204 ++++++++++++++++++++++++++
14 2 files changed, 205 insertions(+)
15
16 diff --git a/net-firewall/firewalld/Manifest b/net-firewall/firewalld/Manifest
17 index df3e7246dc75..b33424011e4d 100644
18 --- a/net-firewall/firewalld/Manifest
19 +++ b/net-firewall/firewalld/Manifest
20 @@ -1 +1,2 @@
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
24 diff --git a/net-firewall/firewalld/firewalld-1.0.3.ebuild b/net-firewall/firewalld/firewalld-1.0.3.ebuild
25 new file mode 100644
26 index 000000000000..2bf06009d02d
27 --- /dev/null
28 +++ b/net-firewall/firewalld/firewalld-1.0.3.ebuild
29 @@ -0,0 +1,204 @@
30 +# Copyright 1999-2022 Gentoo Authors
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=7
34 +
35 +PYTHON_COMPAT=( python3_{8,9,10} )
36 +inherit autotools bash-completion-r1 gnome2-utils linux-info plocale python-single-r1 systemd xdg-utils
37 +
38 +DESCRIPTION="A firewall daemon with D-Bus interface providing a dynamic firewall"
39 +HOMEPAGE="https://www.firewalld.org/"
40 +SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
41 +
42 +LICENSE="GPL-2+"
43 +SLOT="0"
44 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
45 +IUSE="gui +nftables +iptables"
46 +REQUIRED_USE="${PYTHON_REQUIRED_USE}"
47 +
48 +RDEPEND="${PYTHON_DEPS}
49 + !!net-firewall/gshield
50 + iptables? (
51 + net-firewall/iptables[ipv6]
52 + net-firewall/ebtables
53 + net-firewall/ipset
54 + nftables? ( net-firewall/nftables[xtables(+)] )
55 + )
56 + || ( >=sys-apps/openrc-0.11.5 sys-apps/systemd )
57 + $(python_gen_cond_dep '
58 + dev-python/dbus-python[${PYTHON_USEDEP}]
59 + dev-python/pygobject:3[${PYTHON_USEDEP}]
60 + gui? (
61 + x11-libs/gtk+:3
62 + dev-python/PyQt5[gui,widgets,${PYTHON_USEDEP}]
63 + )
64 + nftables? ( >=net-firewall/nftables-0.9.4[python,json] )
65 + ')"
66 +DEPEND="${RDEPEND}
67 + dev-libs/glib:2"
68 +BDEPEND=">=dev-util/intltool-0.35
69 + sys-devel/gettext"
70 +
71 +RESTRICT="test" # bug 650760
72 +
73 +# Testsuite's Makefile.am calls missing(!)
74 +# ... but this seems to be consistent with the autoconf docs?
75 +# Needs more investigation: https://www.gnu.org/software/autoconf/manual/autoconf-2.67/html_node/autom4te-Invocation.html
76 +QA_AM_MAINTAINER_MODE=".*--run autom4te --language=autotest.*"
77 +
78 +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"
79 +
80 +pkg_setup() {
81 + # See bug #830132 for the huge list
82 + # We can probably narrow it down a bit but it's rather fragile
83 + local CONFIG_CHECK="~NF_CONNTRACK ~NETFILTER_XT_MATCH_CONNTRACK
84 + ~NETFILTER
85 + ~NETFILTER_ADVANCED
86 + ~NETFILTER_INGRESS
87 + ~NF_NAT_MASQUERADE
88 + ~NF_NAT_REDIRECT
89 + ~NF_TABLES_INET
90 + ~NF_TABLES_IPV4
91 + ~NF_TABLES_IPV6
92 + ~NF_CONNTRACK
93 + ~NF_CONNTRACK_BROADCAST
94 + ~NF_CONNTRACK_NETBIOS
95 + ~NF_CONNTRACK_TFTP
96 + ~NF_CT_NETLINK
97 + ~NF_CT_NETLINK_HELPER
98 + ~NF_DEFRAG_IPV4
99 + ~NF_DEFRAG_IPV6
100 + ~NF_NAT
101 + ~NF_NAT_TFTP
102 + ~NF_REJECT_IPV4
103 + ~NF_REJECT_IPV6
104 + ~NF_SOCKET_IPV4
105 + ~NF_SOCKET_IPV6
106 + ~NF_TABLES
107 + ~NF_TABLES_SET
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_NET
152 + ~NFT_OBJREF
153 + ~NFT_QUEUE
154 + ~NFT_QUOTA
155 + ~NFT_REDIR
156 + ~NFT_REJECT
157 + ~NFT_REJECT_INET
158 + ~NFT_REJECT_IPV4
159 + ~NFT_REJECT_IPV6
160 + ~NFT_SOCKET
161 + ~NFT_SYNPROXY
162 + ~NFT_TPROXY
163 + ~NFT_TUNNEL
164 + ~NFT_XFRM"
165 +
166 + # kernel >= 4.19 has unified a NF_CONNTRACK module, bug 692944
167 + if kernel_is -lt 4 19; then
168 + CONFIG_CHECK="${CONFIG_CHECK} ~NF_CONNTRACK_IPV4 ~NF_CONNTRACK_IPV6"
169 + fi
170 +
171 + linux-info_pkg_setup
172 +}
173 +
174 +src_prepare() {
175 + default
176 +
177 + eautoreconf
178 +
179 + plocale_find_changes "po" "" ".po"
180 + plocale_get_locales | sed -e 's/ /\n/g' > po/LINGUAS
181 +}
182 +
183 +src_configure() {
184 + python_setup
185 +
186 + local econf_args=(
187 + --enable-systemd
188 + $(use_with iptables iptables "${EPREFIX}/sbin/iptables")
189 + $(use_with iptables iptables_restore "${EPREFIX}/sbin/iptables-restore")
190 + $(use_with iptables ip6tables "${EPREFIX}/sbin/ip6tables")
191 + $(use_with iptables ip6tables_restore "${EPREFIX}/sbin/ip6tables-restore")
192 + $(use_with iptables ebtables "${EPREFIX}/sbin/ebtables")
193 + $(use_with iptables ebtables_restore "${EPREFIX}/sbin/ebtables-restore")
194 + $(use_with iptables ipset "${EPREFIX}/usr/sbin/ipset")
195 + --with-systemd-unitdir="$(systemd_get_systemunitdir)"
196 + --with-bashcompletiondir="$(get_bashcompdir)"
197 + )
198 +
199 + econf "${econf_args[@]}"
200 +}
201 +
202 +src_install() {
203 + default
204 + python_optimize
205 +
206 + # Get rid of junk
207 + rm -rf "${D}/etc/sysconfig/" || die
208 +
209 + # For non-gui installs we need to remove GUI bits
210 + if ! use gui; then
211 + rm -rf "${D}/etc/xdg/autostart" || die
212 + rm -f "${D}/usr/bin/firewall-applet" || die
213 + rm -f "${D}/usr/bin/firewall-config" || die
214 + rm -rf "${D}/usr/share/applications" || die
215 + rm -rf "${D}/usr/share/icons" || die
216 + fi
217 +
218 + newinitd "${FILESDIR}"/firewalld.init firewalld
219 +}
220 +
221 +pkg_preinst() {
222 + gnome2_schemas_savelist
223 +}
224 +
225 +pkg_postinst() {
226 + xdg_icon_cache_update
227 + gnome2_schemas_update
228 +}
229 +
230 +pkg_postrm() {
231 + xdg_icon_cache_update
232 + gnome2_schemas_update
233 +}