]>
Commit | Line | Data |
---|---|---|
f4a37e4d ER |
1 | Summary: A firewall daemon with D-Bus interface providing a dynamic firewall |
2 | Name: firewalld | |
6a1554d7 | 3 | Version: 0.4.2 |
d3b8f1cc | 4 | Release: 9 |
f4a37e4d ER |
5 | License: GPL v2+ |
6 | Source0: https://fedorahosted.org/released/firewalld/%{name}-%{version}.tar.bz2 | |
6a1554d7 | 7 | # Source0-md5: 21983c929bd5061df73408a11cb3a8fd |
f4a37e4d | 8 | Group: Networking/Admin |
f4a37e4d | 9 | Patch0: MDNS-default.patch |
f4a37e4d ER |
10 | URL: http://www.firewalld.org/ |
11 | BuildRequires: desktop-file-utils | |
12 | BuildRequires: docbook-style-xsl | |
13 | BuildRequires: gettext | |
14 | BuildRequires: glib2 | |
15 | # glib2-devel is needed for gsettings.m4 | |
16 | BuildRequires: glib2-devel | |
17 | BuildRequires: intltool | |
6a1554d7 JK |
18 | BuildRequires: python3 |
19 | BuildRequires: python3-modules | |
f4a37e4d ER |
20 | BuildRequires: rpm-pythonprov |
21 | BuildRequires: rpmbuild(macros) >= 1.713 | |
6a1554d7 | 22 | BuildRequires: sed >= 4.0 |
f4a37e4d | 23 | BuildRequires: systemd-units |
f4a37e4d | 24 | Requires: iptables |
6a1554d7 | 25 | Suggests: ipset |
f4a37e4d ER |
26 | Requires(post): systemd |
27 | Requires(preun): systemd | |
28 | Requires(postun): systemd | |
6a1554d7 | 29 | Requires: python3-firewall = %{version}-%{release} |
1c53071a JK |
30 | Obsoletes: firewalld-config-cloud |
31 | Obsoletes: firewalld-config-server | |
32 | Obsoletes: firewalld-config-standard | |
33 | Obsoletes: firewalld-config-workstation | |
f4a37e4d ER |
34 | BuildArch: noarch |
35 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
36 | ||
37 | %description | |
38 | firewalld is a firewall service daemon that provides a dynamic | |
39 | customizable firewall with a D-Bus interface. | |
40 | ||
41 | %package -n python-firewall | |
42 | Summary: Python2 bindings for firewalld | |
43 | Group: Libraries/Python | |
f4a37e4d ER |
44 | Requires: python-dbus |
45 | Requires: python-decorator | |
46 | Requires: python-slip-dbus | |
1c53071a | 47 | Requires: python3-pygobject3 |
f4a37e4d ER |
48 | Provides: python2-firewall |
49 | Obsoletes: python2-firewall | |
50 | ||
51 | %description -n python-firewall | |
52 | Python2 bindings for firewalld. | |
53 | ||
54 | %package -n python3-firewall | |
55 | Summary: Python3 bindings for firewalld | |
56 | Group: Libraries/Python | |
57 | Requires: python3-dbus | |
58 | Requires: python3-decorator | |
1c53071a | 59 | Requires: python3-pygobject3 |
f4a37e4d ER |
60 | Requires: python3-slip-dbus |
61 | ||
62 | %description -n python3-firewall | |
63 | Python3 bindings for firewalld. | |
64 | ||
f4a37e4d ER |
65 | %package -n firewall-applet |
66 | Summary: Firewall panel applet | |
67 | Group: X11/Applications | |
68 | Requires: %{name} = %{version}-%{release} | |
1c53071a | 69 | Requires: NetworkManager-libs |
f4a37e4d ER |
70 | Requires: firewall-config = %{version}-%{release} |
71 | Requires: hicolor-icon-theme | |
72 | Requires: libnotify | |
1c53071a JK |
73 | Requires: python-PyQt4 |
74 | Requires: python3-pygobject3 | |
f4a37e4d ER |
75 | |
76 | %description -n firewall-applet | |
77 | The firewall panel applet provides a status information of firewalld | |
78 | and also the firewall settings. | |
79 | ||
80 | %package -n firewall-config | |
81 | Summary: Firewall configuration application | |
82 | Group: Base | |
83 | Requires: %{name} = %{version}-%{release} | |
1c53071a | 84 | Requires: NetworkManager-libs |
f4a37e4d ER |
85 | Requires: gtk+3 |
86 | Requires: hicolor-icon-theme | |
1c53071a | 87 | Requires: python-pygobject3 |
f4a37e4d ER |
88 | |
89 | %description -n firewall-config | |
90 | The firewall configuration application provides an configuration | |
91 | interface for firewalld. | |
92 | ||
f4a37e4d ER |
93 | %prep |
94 | %setup -q | |
95 | %patch0 -p1 | |
f4a37e4d ER |
96 | |
97 | %build | |
98 | %configure \ | |
99 | --enable-sysconfig \ | |
100 | --enable-rpmmacros \ | |
6a1554d7 | 101 | --with-systemd-unitdir=%{systemdunitdir} \ |
1c53071a JK |
102 | --with-iptables=%{_sbindir}/iptables \ |
103 | --with-iptables-restore=%{_sbindir}/iptables-restore \ | |
104 | --with-ip6tables=%{_sbindir}/ip6tables \ | |
105 | --with-ip6tables-restore=%{_sbindir}/ip6tables-restore \ | |
106 | --with-ebtables=%{_sbindir}/ebtables \ | |
107 | --with-ebtables-restore=%{_sbindir}/ebtables-restore \ | |
108 | --with-ipset=%{_sbindir}/ipset \ | |
f4a37e4d | 109 | PYTHON=%{__python3} |
f4a37e4d ER |
110 | |
111 | %install | |
112 | rm -rf $RPM_BUILD_ROOT | |
f4a37e4d | 113 | |
6a1554d7 | 114 | # Python 2 library, in case anything still wants this |
f4a37e4d | 115 | %{__make} -C src \ |
6a1554d7 JK |
116 | install-nobase_dist_pythonDATA \ |
117 | pythondir=%{py_sitescriptdir} \ | |
118 | pyexecdir=%{py_sitescriptdir} \ | |
119 | PYTHON=%{__python} \ | |
120 | DESTDIR=$RPM_BUILD_ROOT | |
121 | ||
122 | %{__make} install \ | |
123 | pythondir=%{py3_sitescriptdir} \ | |
124 | pyexecdir=%{py3_sitescriptdir} \ | |
f4a37e4d ER |
125 | PYTHON=%{__python3} \ |
126 | DESTDIR=$RPM_BUILD_ROOT | |
f4a37e4d ER |
127 | |
128 | %find_lang %{name} --all-name | |
129 | ||
130 | desktop-file-install --delete-original \ | |
131 | --dir $RPM_BUILD_ROOT%{_sysconfdir}/xdg/autostart \ | |
132 | $RPM_BUILD_ROOT%{_sysconfdir}/xdg/autostart/firewall-applet.desktop | |
133 | ||
134 | desktop-file-install --delete-original \ | |
135 | --dir $RPM_BUILD_ROOT%{_desktopdir} \ | |
136 | $RPM_BUILD_ROOT%{_desktopdir}/firewall-config.desktop | |
137 | ||
138 | install -d $RPM_BUILD_ROOT%{_prefix}/lib/firewalld/zones/ | |
6a1554d7 | 139 | |
1c53071a JK |
140 | rm -f $RPM_BUILD_ROOT%{_prefix}/lib/firewalld/ipsets/README |
141 | rm -f $RPM_BUILD_ROOT%{_prefix}/lib/rpm/macros.d/macros.firewalld | |
6a1554d7 JK |
142 | |
143 | %{__sed} -i -e '1s,^#!.*python,#!%{__python3},' $RPM_BUILD_ROOT{%{_sbindir},%{_bindir}}/* | |
144 | ||
145 | %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}/firewall | |
146 | %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}/firewall | |
147 | ||
148 | for module in "" "/config" "/core" "/core/io" "/server" ; do | |
149 | %{__python3} -m compileall -l -d %{py3_sitescriptdir}/firewall$module $RPM_BUILD_ROOT%{py3_sitescriptdir}/firewall$module | |
150 | %{__python3} -O -m compileall -l -d %{py3_sitescriptdir}/firewall$module $RPM_BUILD_ROOT%{py3_sitescriptdir}/firewall$module | |
151 | done | |
152 | %{__python3} -m compileall -l -d %{_datadir}/firewalld $RPM_BUILD_ROOT%{_datadir}/firewalld | |
153 | %{__python3} -O -m compileall -l -d %{_datadir}/firewalld $RPM_BUILD_ROOT%{_datadir}/firewalld | |
f4a37e4d ER |
154 | |
155 | %clean | |
156 | rm -rf $RPM_BUILD_ROOT | |
157 | ||
158 | %post | |
159 | %systemd_post firewalld.service | |
160 | ||
161 | %preun | |
162 | %systemd_preun firewalld.service | |
163 | ||
164 | %postun | |
6a1554d7 | 165 | %systemd_reload firewalld.service |
f4a37e4d | 166 | |
f4a37e4d ER |
167 | %post -n firewall-applet |
168 | %update_icon_cache hicolor | |
169 | ||
170 | %postun -n firewall-applet | |
171 | %update_icon_cache hicolor | |
172 | %glib_compile_schemas | |
173 | ||
174 | %posttrans -n firewall-applet | |
175 | %update_icon_cache hicolor | |
176 | %glib_compile_schemas | |
177 | ||
178 | %post -n firewall-config | |
179 | %update_icon_cache hicolor | |
180 | ||
181 | %postun -n firewall-config | |
182 | %update_icon_cache hicolor | |
183 | %glib_compile_schemas | |
184 | ||
185 | %posttrans -n firewall-config | |
186 | %update_icon_cache hicolor | |
187 | %glib_compile_schemas | |
188 | ||
f4a37e4d ER |
189 | %files -f %{name}.lang |
190 | %defattr(644,root,root,755) | |
191 | %doc README | |
192 | %attr(755,root,root) %{_sbindir}/firewalld | |
193 | %attr(755,root,root) %{_bindir}/firewall-cmd | |
194 | %attr(755,root,root) %{_bindir}/firewall-offline-cmd | |
f4a37e4d | 195 | %{bash_compdir}/firewall-cmd |
1c53071a JK |
196 | %dir %{_prefix}/lib/firewalld |
197 | %dir %{_prefix}/lib/firewalld/icmptypes | |
f4a37e4d | 198 | %{_prefix}/lib/firewalld/icmptypes/*.xml |
1c53071a | 199 | %dir %{_prefix}/lib/firewalld/services |
f4a37e4d | 200 | %{_prefix}/lib/firewalld/services/*.xml |
1c53071a | 201 | %dir %{_prefix}/lib/firewalld/zones |
f4a37e4d | 202 | %{_prefix}/lib/firewalld/zones/*.xml |
1c53071a | 203 | %dir %{_prefix}/lib/firewalld/xmlschema |
f4a37e4d | 204 | %{_prefix}/lib/firewalld/xmlschema/*.xsd |
6a1554d7 | 205 | %attr(755,root,root) %{_prefix}/lib/firewalld/xmlschema/check.sh |
f4a37e4d | 206 | %dir %attr(750,root,root) %dir %{_sysconfdir}/firewalld |
1c53071a | 207 | %config(noreplace) %{_sysconfdir}/firewalld/firewalld.conf |
f4a37e4d ER |
208 | %attr(750,root,root) %dir %{_sysconfdir}/firewalld/icmptypes |
209 | %attr(750,root,root) %dir %{_sysconfdir}/firewalld/services | |
210 | %attr(750,root,root) %dir %{_sysconfdir}/firewalld/zones | |
6a1554d7 | 211 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/firewalld/lockdown-whitelist.xml |
f4a37e4d | 212 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/firewalld |
6a1554d7 | 213 | %{systemdunitdir}/firewalld.service |
f4a37e4d ER |
214 | %config(noreplace) /etc/dbus-1/system.d/FirewallD.conf |
215 | %{_datadir}/polkit-1/actions/org.fedoraproject.FirewallD1.desktop.policy | |
216 | %{_datadir}/polkit-1/actions/org.fedoraproject.FirewallD1.server.policy | |
1c53071a JK |
217 | %{_datadir}/polkit-1/actions/org.fedoraproject.FirewallD1.policy |
218 | %dir %{_datadir}/firewalld | |
6a1554d7 | 219 | %{_datadir}/%{name}/tests |
f4a37e4d ER |
220 | %{_mandir}/man1/firewall*cmd*.1* |
221 | %{_mandir}/man1/firewalld*.1* | |
222 | %{_mandir}/man5/firewall*.5* | |
223 | ||
224 | %files -n python-firewall | |
225 | %defattr(644,root,root,755) | |
226 | %dir %{py_sitescriptdir}/firewall | |
227 | %dir %{py_sitescriptdir}/firewall/config | |
228 | %dir %{py_sitescriptdir}/firewall/core | |
229 | %dir %{py_sitescriptdir}/firewall/core/io | |
230 | %dir %{py_sitescriptdir}/firewall/server | |
231 | %{py_sitescriptdir}/firewall/*.py* | |
232 | %{py_sitescriptdir}/firewall/config/*.py* | |
233 | %{py_sitescriptdir}/firewall/core/*.py* | |
234 | %{py_sitescriptdir}/firewall/core/io/*.py* | |
235 | %{py_sitescriptdir}/firewall/server/*.py* | |
236 | ||
f4a37e4d ER |
237 | %files -n python3-firewall |
238 | %defattr(644,root,root,755) | |
6a1554d7 | 239 | %{py3_sitescriptdir}/firewall |
f4a37e4d | 240 | |
f4a37e4d ER |
241 | %files -n firewall-applet |
242 | %defattr(644,root,root,755) | |
243 | %attr(755,root,root) %{_bindir}/firewall-applet | |
244 | %defattr(0644,root,root) | |
245 | %{_sysconfdir}/xdg/autostart/firewall-applet.desktop | |
246 | %{_iconsdir}/hicolor/*/apps/firewall-applet*.* | |
247 | %{_mandir}/man1/firewall-applet*.1* | |
6a1554d7 JK |
248 | %dir %{_sysconfdir}/firewall |
249 | %config(noreplace) %{_sysconfdir}/firewall/applet.conf | |
f4a37e4d ER |
250 | |
251 | %files -n firewall-config | |
252 | %defattr(644,root,root,755) | |
253 | %attr(755,root,root) %{_bindir}/firewall-config | |
254 | %defattr(0644,root,root) | |
6a1554d7 | 255 | %{_datadir}/firewalld/__pycache__ |
f4a37e4d | 256 | %{_datadir}/firewalld/firewall-config.glade |
6a1554d7 | 257 | %{_datadir}/firewalld/gtk3_* |
f4a37e4d ER |
258 | %{_desktopdir}/firewall-config.desktop |
259 | %{_datadir}/appdata/firewall-config.appdata.xml | |
260 | %{_iconsdir}/hicolor/*/apps/firewall-config*.* | |
261 | %{_datadir}/glib-2.0/schemas/org.fedoraproject.FirewallConfig.gschema.xml | |
262 | %{_mandir}/man1/firewall-config*.1* |