3 %bcond_without python2 # Python 2.x modules
4 %bcond_without python3 # Python 3.x modules
6 Summary: Policy analysis tools for SELinux
7 Summary(pl.UTF-8): Narzędzia do analizy polityk SELinuksa
11 License: GPL v2+ (tools), LGPL v2.1+ (libraries)
12 Group: Applications/System
13 #Source0Download: https://github.com/TresysTechnology/setools/releases
14 Source0: https://github.com/TresysTechnology/setools/archive/%{version}/%{name}-%{version}.tar.gz
15 # Source0-md5: 54cf5c0ca2aa4ef7c6ac153981af34cd
16 # https://github.com/TresysTechnology/setools/issues/174
17 # https://github.com/bigon/setools/commit/e41adf01647c695b80b112b337e76021bb9f30c3.patch
18 Patch0: %{name}-format-truncation.patch
19 URL: https://github.com/TresysTechnology/setools4/wiki
22 BuildRequires: libsepol-devel >= 2.7
23 BuildRequires: libsepol-static >= 2.7
25 BuildRequires: python-devel >= 1:2.7
26 BuildRequires: python-setuptools
29 BuildRequires: python3-devel >= 1:3.3
30 BuildRequires: python3-setuptools
32 BuildRequires: rpmbuild(macros) >= 1.714
33 BuildRequires: swig-python >= 2.0.12
34 Suggests: policy-sources
36 Requires: python-setools = %{version}-%{release}
38 Requires: python3-setools = %{version}-%{release}
40 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43 SETools is a collection of graphical tools, command-line tools, and
44 libraries designed to facilitate SELinux policy analysis.
46 The base package includes the following console tools:
47 - seaudit-report: audit log analysis tool
48 - sechecker: SELinux policy checking tool
49 - secmds command line tools: seinfo, sesearch, findcon, replcon, and
51 - sediff: semantic policy difference tool
53 %description -l pl.UTF-8
54 SETools to zbiór narzędzi graficznych, narzędzi linii poleceń oraz
55 bibliotek mających na celu ułatwienie analizy polityk SELinuksa.
57 Pakiet podstawowy zawiera narzędzia terminalowe:
58 - seaudit-report - narzędzie do analizy logu audytowego
59 - sechecker - narzędzie do sprawdzania polityk SELinuksa
60 - narzędzia linii poleceń secmds: seinfo, sesearch, findcon, replcon
62 - sediff - narzędzie do znajdywania różnic semantycznych polityk
65 Summary: Policy analysis graphical tools for SELinux
66 Summary(pl.UTF-8): Graficzne narzędzia do analizy polityk SELinuksa
68 Group: Applications/System
69 Requires: %{name} = %{version}-%{release}
71 Requires: python-setoolsgui = %{version}-%{release}
73 Requires: python3-setoolsgui = %{version}-%{release}
77 SETools is a collection of graphical tools, command-line tools, and
78 libraries designed to facilitate SELinux policy analysis.
80 This package includes the following graphical tools:
81 - apol: policy analysis tool
83 %description gui -l pl.UTF-8
84 SETools to zbiór narzędzi graficznych, narzędzi linii poleceń oraz
85 bibliotek mających na celu ułatwienie analizy polityk SELinuksa.
87 Ten pakiet zawiera narzędzia graficzne:
88 - apol - narzędzie do analizy polityk
90 %package -n python-setools
91 Summary: Python 2 bindings for SELinux policy analysis libraries
92 Summary(pl.UTF-8): Wiązania Pythona 2 do bibliotek analizy polityk SELinuksa
93 License: LGPL v2.1+ (core modules), GPL v2+ (seinfo and sesearch)
94 Group: Libraries/Python
95 Requires: python-enum34
96 Requires: python-modules >= 1:2.7
97 Requires: python-networkx >= 1.8
98 Suggests: python-selinux
100 %description -n python-setools
101 SETools is a collection of graphical tools, command-line tools, and
102 libraries designed to facilitate SELinux policy analysis.
104 This package includes Python bindings for SELinux policy analysis
107 %description -n python-setools -l pl.UTF-8
108 SETools to zbiór narzędzi graficznych, narzędzi linii poleceń oraz
109 bibliotek mających na celu ułatwienie analizy polityk SELinuksa.
111 Ten pakiet zawiera wiązania Pythona do bibliotek analizy polityk
114 %package -n python-setoolsgui
115 Summary: SETools GUI modules for Python 2
116 Summary(pl.UTF-8): Moduły graficznego interfejsu użytkownika SETools dla Pythona 2
117 Group: Libraries/Python
118 Requires: python-setools = %{version}-%{release}
119 Requires: python-PyQt5 >= 5
121 %description -n python-setoolsgui
122 SETools GUI modules for Python 2.
124 %description -n python-setoolsgui -l pl.UTF-8
125 Moduły graficznego interfejsu użytkownika SETools dla Pythona 2.
127 %package -n python3-setools
128 Summary: Python 3 bindings for SELinux policy analysis libraries
129 Summary(pl.UTF-8): Wiązania Pythona 3 do bibliotek analizy polityk SELinuksa
130 Group: Libraries/Python
131 %if "%{py3_ver}" < "3.4"
132 Requires: python3-enum34
134 Requires: python3-modules >= 1:3.3
135 Requires: python3-networkx >= 1.8
136 Suggests: python3-selinux
138 %description -n python3-setools
139 SETools is a collection of graphical tools, command-line tools, and
140 libraries designed to facilitate SELinux policy analysis.
142 This package includes Python bindings for SELinux policy analysis
145 %description -n python3-setools -l pl.UTF-8
146 SETools to zbiór narzędzi graficznych, narzędzi linii poleceń oraz
147 bibliotek mających na celu ułatwienie analizy polityk SELinuksa.
149 Ten pakiet zawiera wiązania Pythona do bibliotek analizy polityk
152 %package -n python3-setoolsgui
153 Summary: SETools GUI modules for Python 3
154 Summary(pl.UTF-8): Moduły graficznego interfejsu użytkownika SETools dla Pythona 3
155 Group: Libraries/Python
156 Requires: python3-setools = %{version}-%{release}
157 Requires: python3-PyQt5 >= 5
159 %description -n python3-setoolsgui
160 SETools GUI modules for Python 3.
162 %description -n python3-setoolsgui -l pl.UTF-8
163 Moduły graficznego interfejsu użytkownika SETools dla Pythona 3.
170 export SEPOL=%{_libdir}/libsepol.a
181 rm -rf $RPM_BUILD_ROOT
183 export SEPOL=%{_libdir}/libsepol.a
196 rm -rf $RPM_BUILD_ROOT
199 %defattr(644,root,root,755)
200 %attr(755,root,root) %{_bindir}/sediff
201 %attr(755,root,root) %{_bindir}/sedta
202 %attr(755,root,root) %{_bindir}/seinfo
203 %attr(755,root,root) %{_bindir}/seinfoflow
204 %attr(755,root,root) %{_bindir}/sesearch
205 %{_mandir}/man1/sediff.1*
206 %{_mandir}/man1/sedta.1*
207 %{_mandir}/man1/seinfo.1*
208 %{_mandir}/man1/seinfoflow.1*
209 %{_mandir}/man1/sesearch.1*
212 %defattr(644,root,root,755)
213 %attr(755,root,root) %{_bindir}/apol
214 %{_mandir}/man1/apol.1*
217 %files -n python-setools
218 %defattr(644,root,root,755)
219 %doc COPYING ChangeLog KNOWN-BUGS README.md
220 %dir %{py_sitedir}/setools
221 %{py_sitedir}/setools/diff
222 %dir %{py_sitedir}/setools/policyrep
223 %attr(755,root,root) %{py_sitedir}/setools/policyrep/_qpol.so
224 %{py_sitedir}/setools/policyrep/*.py[co]
225 %{py_sitedir}/setools/*.py[co]
226 %{py_sitedir}/setools/perm_map
227 %{py_sitedir}/setools-%{version}-py*.egg-info
229 %files -n python-setoolsgui
230 %defattr(644,root,root,755)
231 %{py_sitedir}/setoolsgui
235 %files -n python3-setools
236 %defattr(644,root,root,755)
237 %doc COPYING ChangeLog KNOWN-BUGS README.md
238 %dir %{py3_sitedir}/setools
239 %{py3_sitedir}/setools/diff
240 %dir %{py3_sitedir}/setools/policyrep
241 %attr(755,root,root) %{py3_sitedir}/setools/policyrep/_qpol.cpython-*.so
242 %{py3_sitedir}/setools/policyrep/*.py
243 %{py3_sitedir}/setools/policyrep/__pycache__
244 %{py3_sitedir}/setools/*.py
245 %{py3_sitedir}/setools/perm_map
246 %{py3_sitedir}/setools/__pycache__
247 %{py3_sitedir}/setools-%{version}-py*.egg-info
249 %files -n python3-setoolsgui
250 %defattr(644,root,root,755)
251 %{py3_sitedir}/setoolsgui