]> git.pld-linux.org Git - SPECS.git/blob - setools3.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / setools3.spec
1 #
2 # Conditional build:
3 %bcond_without  java    # Java bindings
4 %bcond_without  python  # Python bindings
5 #
6 Summary:        Policy analysis tools for SELinux
7 Summary(pl.UTF-8):      Narzędzia do analizy polityk SELinuksa
8 Name:           setools3
9 Version:        3.3.8
10 Release:        6
11 License:        GPL v2+ (tools), LGPL v2.1+ (libraries)
12 Group:          Applications/System
13 #Source0Download: https://github.com/TresysTechnology/setools3/wiki/Download
14 Source0:        https://raw.githubusercontent.com/wiki/TresysTechnology/setools3/files/dists/setools-%{version}/setools-%{version}.tar.bz2
15 # Source0-md5:  d68d0d4e4da0f01da0f208782ff04b91
16 Source1:        seaudit.pamd
17 Patch0:         setools-swig.patch
18 Patch1:         setools-sh.patch
19 Patch2:         setools-tcl.patch
20 Patch3:         setools-format.patch
21 Patch4:         setools-swig-part2.patch
22 Patch5:         setools-link.patch
23 Patch6:         setools-x32.patch
24 Patch7:         setools-swig-version.patch
25 Patch8:         setools-sepol.patch
26 Patch9:         setools-selinux.patch
27 Patch10:        python-prefix.patch
28 URL:            https://github.com/TresysTechnology/setools3/wiki
29 BuildRequires:  autoconf >= 2.59
30 BuildRequires:  automake
31 BuildRequires:  bison
32 BuildRequires:  bzip2-devel
33 BuildRequires:  flex
34 BuildRequires:  gcc >= 5:3.2
35 BuildRequires:  gtk+2-devel >= 2:2.8
36 %{?with_java:BuildRequires:     jdk >= 1.2}
37 BuildRequires:  libglade2-devel >= 2.0
38 BuildRequires:  libselinux-devel >= 1.30
39 BuildRequires:  libsepol-devel >= 2.8
40 BuildRequires:  libsepol-static >= 2.8
41 BuildRequires:  libstdc++-devel
42 BuildRequires:  libtool
43 BuildRequires:  libxml2-devel >= 2
44 BuildRequires:  perl-base
45 BuildRequires:  pkgconfig
46 %{?with_python:BuildRequires:   python-devel >= 1:2.7}
47 BuildRequires:  rpmbuild(macros) >= 1.219
48 BuildRequires:  sqlite3-devel >= 3.2.0
49 BuildRequires:  swig >= 2.0.0
50 %{?with_python:BuildRequires:   swig-python >= 2.0.0}
51 BuildRequires:  swig-tcl >= 2.0.0
52 BuildRequires:  tcl-devel >= 8.4
53 BuildRequires:  tk-devel >= 8.4
54 Requires:       %{name}-libs = %{version}-%{release}
55 Suggests:       policy-sources
56 Obsoletes:      setools < 4
57 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
58
59 %define         pkgdatadir      %{_datadir}/setools-3.3
60
61 # python modules use Py* symbols, some of .so files are versioned
62 %define         skip_post_check_so      .*%{py_sitedir}/setools/.*
63
64 %description
65 SETools is a collection of graphical tools, command-line tools, and
66 libraries designed to facilitate SELinux policy analysis.
67
68 The base package includes the following console tools:
69 - seaudit-report: audit log analysis tool
70 - sechecker: SELinux policy checking tool
71 - secmds command line tools: seinfo, sesearch, findcon, replcon, and
72   indexcon
73 - sediff: semantic policy difference tool
74
75 %description -l pl.UTF-8
76 SETools to zbiór narzędzi graficznych, narzędzi linii poleceń oraz
77 bibliotek mających na celu ułatwienie analizy polityk SELinuksa.
78
79 Pakiet podstawowy zawiera narzędzia terminalowe:
80 - seaudit-report - narzędzie do analizy logu audytowego
81 - sechecker - narzędzie do sprawdzania polityk SELinuksa
82 - narzędzia linii poleceń secmds: seinfo, sesearch, findcon, replcon
83   oraz indexcon
84 - sediff - narzędzie do znajdywania różnic semantycznych polityk
85
86 %package gui
87 Summary: Policy analysis graphical tools for SELinux
88 Summary(pl.UTF-8):      Graficzne narzędzia do analizy polityk SELinuksa
89 License:        GPL v2+
90 Group:          Applications/System
91 Requires:       %{name} = %{version}-%{release}
92 Requires:       gtk+2 >= 2:2.8
93 Requires:       tk >= 8.4
94 Requires:       tk-BWidget >= 1.8
95 Obsoletes:      setools-gui < 4
96
97 %description gui
98 SETools is a collection of graphical tools, command-line tools, and
99 libraries designed to facilitate SELinux policy analysis.
100
101 This package includes the following graphical tools:
102 - apol: policy analysis tool
103 - seaudit: audit log analysis tool
104 - sediffx: semantic policy difference tool
105
106 %description gui -l pl.UTF-8
107 SETools to zbiór narzędzi graficznych, narzędzi linii poleceń oraz
108 bibliotek mających na celu ułatwienie analizy polityk SELinuksa.
109
110 Ten pakiet zawiera narzędzia graficzne:
111 - apol - narzędzie do analizy polityk
112 - seaudit - narzędzie do analizy logu audytowego
113 - sediffx - narzędzie do znajdywania różnic semantycznych polityk
114
115 %package libs
116 Summary:        Policy analysis support libraries for SELinux
117 Summary(pl.UTF-8):      Biblioteki wspierające analizę polityk SELinuksa
118 License:        LGPL v2.1+
119 Group:          Libraries
120 Requires:       libselinux >= 2.4
121 Requires:       libsepol >= 2.8
122 Requires:       sqlite3 >= 3.2.0
123 Obsoletes:      setools-libs < 4
124
125 %description libs
126 SETools is a collection of graphical tools, command-line tools, and
127 libraries designed to facilitate SELinux policy analysis.
128
129 This package includes the following run-time libraries:
130 - libapol: policy analysis library
131 - libpoldiff: semantic policy difference library
132 - libqpol: library that abstracts policy internals
133 - libseaudit: parse and filter SELinux audit messages in log files
134 - libsefs: SELinux file contexts library
135
136 %description libs -l pl.UTF-8
137 SETools to zbiór narzędzi graficznych, narzędzi linii poleceń oraz
138 bibliotek mających na celu ułatwienie analizy polityk SELinuksa.
139
140 Ten pakiet zawiera biblioteki uruchomieniowe:
141 - libapol - analizy polityk
142 - libpoldiff - różnic semantycznych polityk
143 - libqpol - abstrakcji wnętrzności polityk
144 - libseaudit - analizy i filtrowania komunikatów audytowych SELinuksa
145   z plików logów
146 - libsefs - kontekstów plików SELinuksa
147
148 %package devel
149 Summary:        Header files for SETools libraries
150 Summary(pl.UTF-8):      Pliki nagłówkowe bibliotek SETools
151 License:        LGPL v2.1+
152 Group:          Development/Libraries
153 Requires:       %{name}-libs = %{version}-%{release}
154 Obsoletes:      setools-devel < 4
155
156 %description devel
157 Header files for SETools libraries: libapol, libpoldiff, libqpol,
158 libseaudit, libsefs.
159
160 %description devel -l pl.UTF-8
161 Pliki nagłówkowe bibliotek SETools: libapol, libpoldiff, libqpol,
162 libseaudit, libsefs.
163
164 %package static
165 Summary:        Static SETools libraries
166 Summary(pl.UTF-8):      Statyczne biblioteki SETools
167 License:        LGPL v2.1+
168 Group:          Development/Libraries
169 Requires:       %{name}-devel = %{version}-%{release}
170 Obsoletes:      setools-static < 4
171
172 %description static
173 Static SETools libraries.
174
175 %description static -l pl.UTF-8
176 Statyczne biblioteki SETools.
177
178 %package -n java-setools
179 Summary:        Java bindings for SELinux policy analysis libraries
180 Summary(pl.UTF-8):      Wiązania Javy do bibliotek analizy polityk SELinuksa
181 License:        LGPL v2.1+
182 Group:          Libraries/Java
183 Requires:       %{name}-libs = %{version}-%{release}
184 Requires:       jre >= 1.2
185
186 %description -n java-setools
187 SETools is a collection of graphical tools, command-line tools, and
188 libraries designed to facilitate SELinux policy analysis.
189
190 This package includes Java bindings for the following libraries:
191 - libapol: policy analysis library
192 - libpoldiff: semantic policy difference library
193 - libqpol: library that abstracts policy internals
194 - libseaudit: parse and filter SELinux audit messages in log files
195 - libsefs: SELinux file contexts library
196
197 %description -n java-setools -l pl.UTF-8
198 SETools to zbiór narzędzi graficznych, narzędzi linii poleceń oraz
199 bibliotek mających na celu ułatwienie analizy polityk SELinuksa.
200
201 Ten pakiet zawiera wiązania Javy do bibliotek uruchomieniowych:
202 - libapol - analizy polityk
203 - libpoldiff - różnic semantycznych polityk
204 - libqpol - abstrakcji wnętrzności polityk
205 - libseaudit - analizy i filtrowania komunikatów audytowych SELinuksa
206   z plików logów
207 - libsefs - kontekstów plików SELinuksa
208
209 %package -n python-setools3
210 Summary:        Python bindings for SELinux policy analysis libraries
211 Summary(pl.UTF-8):      Wiązania Pythona do bibliotek analizy polityk SELinuksa
212 License:        LGPL v2.1+ (core modules), GPL v2+ (seinfo and sesearch)
213 Group:          Libraries/Python
214 Requires:       %{name}-libs = %{version}-%{release}
215 Requires:       python-setools >= 4
216 Obsoletes:      python-setools < 4
217
218 %description -n python-setools3
219 SETools is a collection of graphical tools, command-line tools, and
220 libraries designed to facilitate SELinux policy analysis.
221
222 This package includes Python bindings for the following libraries:
223 - libapol: policy analysis library
224 - libpoldiff: semantic policy difference library
225 - libqpol: library that abstracts policy internals
226 - libseaudit: parse and filter SELinux audit messages in log files
227 - libsefs: SELinux file contexts library
228
229 %description -n python-setools3 -l pl.UTF-8
230 SETools to zbiór narzędzi graficznych, narzędzi linii poleceń oraz
231 bibliotek mających na celu ułatwienie analizy polityk SELinuksa.
232
233 Ten pakiet zawiera wiązania Pythona do bibliotek uruchomieniowych:
234 - libapol - analizy polityk
235 - libpoldiff - różnic semantycznych polityk
236 - libqpol - abstrakcji wnętrzności polityk
237 - libseaudit - analizy i filtrowania komunikatów audytowych SELinuksa
238   z plików logów
239 - libsefs - kontekstów plików SELinuksa
240
241 %package -n tcl-setools
242 Summary:        Tcl bindings for SELinux policy analysis libraries
243 Summary(pl.UTF-8):      Wiązania Tcl-a do bibliotek analizy polityk SELinuksa
244 License:        LGPL v2.1+
245 Group:          Libraries
246 Requires:       %{name}-libs = %{version}-%{release}
247 Requires:       tcl >= 8.4
248
249 %description -n tcl-setools
250 SETools is a collection of graphical tools, command-line tools, and
251 libraries designed to facilitate SELinux policy analysis.
252
253 This package includes Tcl bindings for the following libraries:
254 - libapol: policy analysis library
255 - libpoldiff: semantic policy difference library
256 - libqpol: library that abstracts policy internals
257 - libseaudit: parse and filter SELinux audit messages in log files
258 - libsefs: SELinux file contexts library
259
260 %description -n tcl-setools -l pl.UTF-8
261 SETools to zbiór narzędzi graficznych, narzędzi linii poleceń oraz
262 bibliotek mających na celu ułatwienie analizy polityk SELinuksa.
263
264 Ten pakiet zawiera wiązania Tcl-a do bibliotek uruchomieniowych:
265 - libapol - analizy polityk
266 - libpoldiff - różnic semantycznych polityk
267 - libqpol - abstrakcji wnętrzności polityk
268 - libseaudit - analizy i filtrowania komunikatów audytowych SELinuksa
269   z plików logów
270 - libsefs - kontekstów plików SELinuksa
271
272 %prep
273 %setup -q -n setools-%{version}
274 %patch0 -p1
275 %patch1 -p1
276 %patch2 -p1
277 %patch3 -p1
278 %patch4 -p1
279 %patch5 -p1
280 %patch6 -p1
281 %patch7 -p1
282 %patch8 -p1
283 %patch9 -p1
284 %patch10 -p1
285
286 %build
287 %{__libtoolize}
288 %{__aclocal} -I m4
289 %{__autoconf}
290 %{__autoheader}
291 %{__automake}
292 %configure \
293         CLASSPATH=. \
294         TCLSH_PROG=/usr/bin/tclsh \
295         WISH_PROG=/usr/bin/wish \
296         --disable-bwidget-check \
297         --disable-selinux-check \
298         %{?with_java:--enable-swig-java} \
299         %{?with_python:--enable-swig-python} \
300         --with-java-prefix=%{java_home}
301
302 %{__make}
303
304 %install
305 rm -rf $RPM_BUILD_ROOT
306 install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},/etc/pam.d}
307
308 %{__make} install \
309         DESTDIR=$RPM_BUILD_ROOT
310
311 # continued in setools 4.x
312 %{__rm} $RPM_BUILD_ROOT%{_bindir}/{apol,sediff,seinfo,sesearch}
313 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/{apol,sediff,seinfo,sesearch}.1
314 %if %{with python}
315 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/setools/{_qpol.so*,qpol.py}
316 %endif
317
318 cp -p %{SOURCE1} $RPM_BUILD_ROOT/etc/pam.d/seaudit
319 cp -p packages/rpm/{seaudit,sediffx}.desktop $RPM_BUILD_ROOT%{_desktopdir}
320 cp -p seaudit/seaudit.png sediff/sediffx.png $RPM_BUILD_ROOT%{_pixmapsdir}
321
322 # let rpm autodetect dependencies
323 chmod 755 $RPM_BUILD_ROOT%{_libdir}/lib*.so* \
324         $RPM_BUILD_ROOT%{_libdir}/setools/*/*.so*
325 %if %{with python}
326 chmod 755 $RPM_BUILD_ROOT%{py_sitedir}/setools/*.so*
327 %py_comp $RPM_BUILD_ROOT%{py_sitedir}/setools
328 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}/setools
329 %py_postclean
330 %endif
331
332 %if %{with java}
333 # replace symlinks with direct jars
334 %{__mv} $RPM_BUILD_ROOT%{pkgdatadir}/*.jar $RPM_BUILD_ROOT%{_javadir}
335 %endif
336
337 %clean
338 rm -rf $RPM_BUILD_ROOT
339
340 %post   libs -p /sbin/ldconfig
341 %postun libs -p /sbin/ldconfig
342
343 %post   -n java-setools -p /sbin/ldconfig
344 %postun -n java-setools -p /sbin/ldconfig
345
346 %files
347 %defattr(644,root,root,755)
348 %attr(755,root,root) %{_bindir}/findcon
349 %attr(755,root,root) %{_bindir}/indexcon
350 %attr(755,root,root) %{_bindir}/replcon
351 %attr(755,root,root) %{_bindir}/seaudit-report
352 %attr(755,root,root) %{_bindir}/sechecker
353 %dir %{pkgdatadir}
354 %{pkgdatadir}/sechecker-profiles
355 %{pkgdatadir}/sechecker_help.txt
356 %{pkgdatadir}/seaudit-report-service
357 %{pkgdatadir}/seaudit-report.conf
358 %{pkgdatadir}/seaudit-report.css
359 %{_mandir}/man1/findcon.1*
360 %{_mandir}/man1/indexcon.1*
361 %{_mandir}/man1/replcon.1*
362 %{_mandir}/man1/sechecker.1*
363 %{_mandir}/man8/seaudit-report.8*
364
365 %files gui
366 %defattr(644,root,root,755)
367 %attr(755,root,root) %{_bindir}/sediffx
368 %attr(755,root,root) %{_sbindir}/seaudit
369 %dir %{_libdir}/setools/apol_tcl
370 %attr(755,root,root) %{_libdir}/setools/apol_tcl/libapol_tcl.so.*.*
371 %{_libdir}/setools/apol_tcl/pkgIndex.tcl
372 %{pkgdatadir}/apol.gif
373 %{pkgdatadir}/apol_help.txt
374 %{pkgdatadir}/apol_perm_mapping_*
375 %{pkgdatadir}/domaintrans_help.txt
376 %{pkgdatadir}/dot_seaudit
377 %{pkgdatadir}/file_relabel_help.txt
378 %{pkgdatadir}/infoflow_help.txt
379 %{pkgdatadir}/sediff_help.txt
380 %{pkgdatadir}/seaudit_help.txt
381 %{pkgdatadir}/types_relation_help.txt
382 %{pkgdatadir}/*.glade
383 %{pkgdatadir}/*.png
384 %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/seaudit
385 %{_desktopdir}/seaudit.desktop
386 %{_desktopdir}/sediffx.desktop
387 %{_pixmapsdir}/seaudit.png
388 %{_pixmapsdir}/sediffx.png
389 %{_mandir}/man1/sediffx.1*
390 %{_mandir}/man8/seaudit.8*
391
392 %files libs
393 %defattr(644,root,root,755)
394 %doc AUTHORS COPYING ChangeLog KNOWN-BUGS NEWS README TODO
395 %attr(755,root,root) %{_libdir}/libapol.so.*.*
396 %attr(755,root,root) %ghost %{_libdir}/libapol.so.4
397 %attr(755,root,root) %{_libdir}/libpoldiff.so.*.*.*
398 %attr(755,root,root) %ghost %{_libdir}/libpoldiff.so.1
399 %attr(755,root,root) %{_libdir}/libqpol.so.*.*
400 %attr(755,root,root) %ghost %{_libdir}/libqpol.so.1
401 %attr(755,root,root) %{_libdir}/libseaudit.so.*.*
402 %attr(755,root,root) %ghost %{_libdir}/libseaudit.so.4
403 %attr(755,root,root) %{_libdir}/libsefs.so.*.*.*
404 %attr(755,root,root) %ghost %{_libdir}/libsefs.so.4
405
406 %files devel
407 %defattr(644,root,root,755)
408 %attr(755,root,root) %{_libdir}/libapol.so
409 %attr(755,root,root) %{_libdir}/libpoldiff.so
410 %attr(755,root,root) %{_libdir}/libqpol.so
411 %attr(755,root,root) %{_libdir}/libseaudit.so
412 %attr(755,root,root) %{_libdir}/libsefs.so
413 %{_includedir}/apol
414 %{_includedir}/poldiff
415 %{_includedir}/qpol
416 %{_includedir}/seaudit
417 %{_includedir}/sefs
418 %{_pkgconfigdir}/libapol.pc
419 %{_pkgconfigdir}/libpoldiff.pc
420 %{_pkgconfigdir}/libqpol.pc
421 %{_pkgconfigdir}/libseaudit.pc
422 %{_pkgconfigdir}/libsefs.pc
423
424 %files static
425 %defattr(644,root,root,755)
426 %{_libdir}/libapol.a
427 %{_libdir}/libpoldiff.a
428 %{_libdir}/libqpol.a
429 %{_libdir}/libseaudit.a
430 %{_libdir}/libsefs.a
431
432 %if %{with java}
433 %files -n java-setools
434 %defattr(644,root,root,755)
435 %attr(755,root,root) %{_libdir}/libjapol.so.*.*
436 %attr(755,root,root) %ghost %{_libdir}/libjapol.so.4
437 %attr(755,root,root) %{_libdir}/libjapol.so
438 %attr(755,root,root) %{_libdir}/libjpoldiff.so.*.*.*
439 %attr(755,root,root) %ghost %{_libdir}/libjpoldiff.so.1
440 %attr(755,root,root) %{_libdir}/libjpoldiff.so
441 %attr(755,root,root) %{_libdir}/libjqpol.so.*.*
442 %attr(755,root,root) %ghost %{_libdir}/libjqpol.so.1
443 %attr(755,root,root) %{_libdir}/libjqpol.so
444 %attr(755,root,root) %{_libdir}/libjseaudit.so.*.*
445 %attr(755,root,root) %ghost %{_libdir}/libjseaudit.so.4
446 %attr(755,root,root) %{_libdir}/libjseaudit.so
447 %attr(755,root,root) %{_libdir}/libjsefs.so.*.*.*
448 %attr(755,root,root) %ghost %{_libdir}/libjsefs.so.4
449 %attr(755,root,root) %{_libdir}/libjsefs.so
450 %{_javadir}/apol.jar
451 %{_javadir}/poldiff.jar
452 %{_javadir}/qpol.jar
453 %{_javadir}/seaudit.jar
454 %{_javadir}/sefs.jar
455 %endif
456
457 %if %{with python}
458 %files -n python-setools3
459 %defattr(644,root,root,755)
460 %dir %{py_sitedir}/setools
461 %attr(755,root,root) %{py_sitedir}/setools/_apol.so*
462 %attr(755,root,root) %{py_sitedir}/setools/_poldiff.so*
463 %attr(755,root,root) %{py_sitedir}/setools/_seaudit.so*
464 %attr(755,root,root) %{py_sitedir}/setools/_sefs.so*
465 %attr(755,root,root) %{py_sitedir}/setools/_seinfo.so
466 %attr(755,root,root) %{py_sitedir}/setools/_sesearch.so
467 %{py_sitedir}/setools/__init__.py[co]
468 %{py_sitedir}/setools/apol.py[co]
469 %{py_sitedir}/setools/poldiff.py[co]
470 %{py_sitedir}/setools/seaudit.py[co]
471 %{py_sitedir}/setools/sefs.py[co]
472 %{py_sitedir}/setools-1.0-py*.egg-info
473 %dir %{py_sitescriptdir}/setools
474 %{py_sitescriptdir}/setools/__init__.py[co]
475 %endif
476
477 %files -n tcl-setools
478 %defattr(644,root,root,755)
479 %dir %{_libdir}/setools
480 %dir %{_libdir}/setools/apol
481 %attr(755,root,root) %{_libdir}/setools/apol/libtapol.so.*.*
482 %{_libdir}/setools/apol/pkgIndex.tcl
483 %dir %{_libdir}/setools/poldiff
484 %attr(755,root,root) %{_libdir}/setools/poldiff/libtpoldiff.so.*.*.*
485 %{_libdir}/setools/poldiff/pkgIndex.tcl
486 %dir %{_libdir}/setools/qpol
487 %attr(755,root,root) %{_libdir}/setools/qpol/libtqpol.so.*.*
488 %{_libdir}/setools/qpol/pkgIndex.tcl
489 %dir %{_libdir}/setools/seaudit
490 %attr(755,root,root) %{_libdir}/setools/seaudit/libtseaudit.so.*.*
491 %{_libdir}/setools/seaudit/pkgIndex.tcl
492 %dir %{_libdir}/setools/sefs
493 %attr(755,root,root) %{_libdir}/setools/sefs/libtsefs.so.*.*.*
494 %{_libdir}/setools/sefs/pkgIndex.tcl
This page took 0.176566 seconds and 3 git commands to generate.