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