]>
Commit | Line | Data |
---|---|---|
4df63b55 JB |
1 | # |
2 | # Conditional build: | |
deffcb0e JB |
3 | %bcond_without python2 # Python 2.x modules |
4 | %bcond_without python3 # Python 3.x modules | |
4df63b55 JB |
5 | # |
6 | Summary: Policy analysis tools for SELinux | |
7 | Summary(pl.UTF-8): Narzędzia do analizy polityk SELinuksa | |
db420033 | 8 | Name: setools |
deffcb0e JB |
9 | Version: 4.1.1 |
10 | Release: 1 | |
4df63b55 JB |
11 | License: GPL v2+ (tools), LGPL v2.1+ (libraries) |
12 | Group: Applications/System | |
deffcb0e JB |
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 | |
68222393 JB |
16 | # https://github.com/TresysTechnology/setools/issues/174 |
17 | # https://github.com/bigon/setools/commit/e41adf01647c695b80b112b337e76021bb9f30c3.patch | |
18 | Patch0: %{name}-format-truncation.patch | |
deffcb0e | 19 | URL: https://github.com/TresysTechnology/setools4/wiki |
fde4ef77 | 20 | BuildRequires: bison |
2f15a047 | 21 | BuildRequires: flex |
deffcb0e JB |
22 | BuildRequires: libsepol-devel >= 2.7 |
23 | BuildRequires: libsepol-static >= 2.7 | |
24 | %if %{with python2} | |
25 | BuildRequires: python-devel >= 1:2.7 | |
26 | BuildRequires: python-setuptools | |
27 | %endif | |
28 | %if %{with python3} | |
29 | BuildRequires: python3-devel >= 1:3.3 | |
30 | BuildRequires: python3-setuptools | |
31 | %endif | |
32 | BuildRequires: rpmbuild(macros) >= 1.714 | |
33 | BuildRequires: swig-python >= 2.0.12 | |
4df63b55 | 34 | Suggests: policy-sources |
deffcb0e JB |
35 | %if %{with python2} |
36 | Requires: python-setools = %{version}-%{release} | |
37 | %else | |
38 | Requires: python3-setools = %{version}-%{release} | |
39 | %endif | |
db420033 JB |
40 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
41 | ||
42 | %description | |
4df63b55 JB |
43 | SETools is a collection of graphical tools, command-line tools, and |
44 | libraries designed to facilitate SELinux policy analysis. | |
45 | ||
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 | |
50 | indexcon | |
51 | - sediff: semantic policy difference tool | |
db420033 | 52 | |
63b63c72 | 53 | %description -l pl.UTF-8 |
4df63b55 JB |
54 | SETools to zbiór narzędzi graficznych, narzędzi linii poleceń oraz |
55 | bibliotek mających na celu ułatwienie analizy polityk SELinuksa. | |
56 | ||
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 | |
61 | oraz indexcon | |
62 | - sediff - narzędzie do znajdywania różnic semantycznych polityk | |
63 | ||
64 | %package gui | |
65 | Summary: Policy analysis graphical tools for SELinux | |
66 | Summary(pl.UTF-8): Graficzne narzędzia do analizy polityk SELinuksa | |
67 | License: GPL v2+ | |
68 | Group: Applications/System | |
69 | Requires: %{name} = %{version}-%{release} | |
deffcb0e JB |
70 | %if %{with python2} |
71 | Requires: python-setoolsgui = %{version}-%{release} | |
72 | %else | |
73 | Requires: python3-setoolsgui = %{version}-%{release} | |
74 | %endif | |
4df63b55 JB |
75 | |
76 | %description gui | |
77 | SETools is a collection of graphical tools, command-line tools, and | |
78 | libraries designed to facilitate SELinux policy analysis. | |
79 | ||
80 | This package includes the following graphical tools: | |
81 | - apol: policy analysis tool | |
4df63b55 JB |
82 | |
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. | |
86 | ||
87 | Ten pakiet zawiera narzędzia graficzne: | |
88 | - apol - narzędzie do analizy polityk | |
deffcb0e JB |
89 | |
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 | |
99 | ||
100 | %description -n python-setools | |
4df63b55 JB |
101 | SETools is a collection of graphical tools, command-line tools, and |
102 | libraries designed to facilitate SELinux policy analysis. | |
103 | ||
deffcb0e JB |
104 | This package includes Python bindings for SELinux policy analysis |
105 | libraries. | |
4df63b55 | 106 | |
deffcb0e | 107 | %description -n python-setools -l pl.UTF-8 |
4df63b55 JB |
108 | SETools to zbiór narzędzi graficznych, narzędzi linii poleceń oraz |
109 | bibliotek mających na celu ułatwienie analizy polityk SELinuksa. | |
110 | ||
deffcb0e JB |
111 | Ten pakiet zawiera wiązania Pythona do bibliotek analizy polityk |
112 | SELinuksa. | |
4df63b55 | 113 | |
deffcb0e JB |
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 | |
4df63b55 | 120 | |
deffcb0e JB |
121 | %description -n python-setoolsgui |
122 | SETools GUI modules for Python 2. | |
4df63b55 | 123 | |
deffcb0e JB |
124 | %description -n python-setoolsgui -l pl.UTF-8 |
125 | Moduły graficznego interfejsu użytkownika SETools dla Pythona 2. | |
4df63b55 | 126 | |
deffcb0e JB |
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 | |
4df63b55 | 130 | Group: Libraries/Python |
deffcb0e JB |
131 | %if "%{py3_ver}" < "3.4" |
132 | Requires: python3-enum34 | |
133 | %endif | |
134 | Requires: python3-modules >= 1:3.3 | |
135 | Requires: python3-networkx >= 1.8 | |
136 | Suggests: python3-selinux | |
4df63b55 | 137 | |
deffcb0e | 138 | %description -n python3-setools |
4df63b55 JB |
139 | SETools is a collection of graphical tools, command-line tools, and |
140 | libraries designed to facilitate SELinux policy analysis. | |
141 | ||
deffcb0e JB |
142 | This package includes Python bindings for SELinux policy analysis |
143 | libraries. | |
4df63b55 | 144 | |
deffcb0e | 145 | %description -n python3-setools -l pl.UTF-8 |
4df63b55 JB |
146 | SETools to zbiór narzędzi graficznych, narzędzi linii poleceń oraz |
147 | bibliotek mających na celu ułatwienie analizy polityk SELinuksa. | |
148 | ||
deffcb0e JB |
149 | Ten pakiet zawiera wiązania Pythona do bibliotek analizy polityk |
150 | SELinuksa. | |
4df63b55 | 151 | |
deffcb0e JB |
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 | |
4df63b55 | 158 | |
deffcb0e JB |
159 | %description -n python3-setoolsgui |
160 | SETools GUI modules for Python 3. | |
4df63b55 | 161 | |
deffcb0e JB |
162 | %description -n python3-setoolsgui -l pl.UTF-8 |
163 | Moduły graficznego interfejsu użytkownika SETools dla Pythona 3. | |
4d18f116 | 164 | |
db420033 | 165 | %prep |
28988f53 | 166 | %setup -q |
68222393 | 167 | %patch0 -p1 |
db420033 JB |
168 | |
169 | %build | |
68222393 JB |
170 | export SEPOL=%{_libdir}/libsepol.a |
171 | ||
deffcb0e JB |
172 | %if %{with python2} |
173 | %py_build | |
174 | %endif | |
175 | ||
176 | %if %{with python3} | |
177 | %py3_build | |
178 | %endif | |
db420033 JB |
179 | |
180 | %install | |
181 | rm -rf $RPM_BUILD_ROOT | |
deffcb0e | 182 | |
68222393 JB |
183 | export SEPOL=%{_libdir}/libsepol.a |
184 | ||
deffcb0e JB |
185 | %if %{with python3} |
186 | %py3_install | |
4df63b55 JB |
187 | %endif |
188 | ||
deffcb0e JB |
189 | %if %{with python2} |
190 | %py_install | |
191 | ||
192 | %py_postclean | |
4df63b55 | 193 | %endif |
db420033 JB |
194 | |
195 | %clean | |
196 | rm -rf $RPM_BUILD_ROOT | |
197 | ||
db420033 JB |
198 | %files |
199 | %defattr(644,root,root,755) | |
4df63b55 | 200 | %attr(755,root,root) %{_bindir}/sediff |
deffcb0e | 201 | %attr(755,root,root) %{_bindir}/sedta |
4df63b55 | 202 | %attr(755,root,root) %{_bindir}/seinfo |
deffcb0e | 203 | %attr(755,root,root) %{_bindir}/seinfoflow |
4df63b55 | 204 | %attr(755,root,root) %{_bindir}/sesearch |
4df63b55 | 205 | %{_mandir}/man1/sediff.1* |
deffcb0e | 206 | %{_mandir}/man1/sedta.1* |
4df63b55 | 207 | %{_mandir}/man1/seinfo.1* |
deffcb0e | 208 | %{_mandir}/man1/seinfoflow.1* |
4df63b55 | 209 | %{_mandir}/man1/sesearch.1* |
4df63b55 JB |
210 | |
211 | %files gui | |
212 | %defattr(644,root,root,755) | |
213 | %attr(755,root,root) %{_bindir}/apol | |
4df63b55 | 214 | %{_mandir}/man1/apol.1* |
4df63b55 | 215 | |
deffcb0e | 216 | %if %{with python2} |
4df63b55 JB |
217 | %files -n python-setools |
218 | %defattr(644,root,root,755) | |
deffcb0e | 219 | %doc COPYING ChangeLog KNOWN-BUGS README.md |
4df63b55 | 220 | %dir %{py_sitedir}/setools |
deffcb0e JB |
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 | |
228 | ||
229 | %files -n python-setoolsgui | |
230 | %defattr(644,root,root,755) | |
231 | %{py_sitedir}/setoolsgui | |
4df63b55 JB |
232 | %endif |
233 | ||
deffcb0e JB |
234 | %if %{with python3} |
235 | %files -n python3-setools | |
4df63b55 | 236 | %defattr(644,root,root,755) |
deffcb0e JB |
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 | |
248 | ||
249 | %files -n python3-setoolsgui | |
250 | %defattr(644,root,root,755) | |
251 | %{py3_sitedir}/setoolsgui | |
252 | %endif |