]>
Commit | Line | Data |
---|---|---|
e5a8c0d8 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without pie # auditd as PIE binary | |
526a1f46 | 4 | %bcond_without prelude # prelude audisp plugin |
57f09668 | 5 | %bcond_without python # don't build python bindings |
e5a8c0d8 | 6 | # |
54697230 | 7 | Summary: User space tools for 2.6 kernel auditing |
7f0a1e1e | 8 | Summary(pl.UTF-8): Narzędzia przestrzeni użytkownika do audytu jąder 2.6 |
54697230 | 9 | Name: audit |
4c11c375 | 10 | Version: 1.7.13 |
1e78f2d9 | 11 | Release: 5 |
ab8f94cb | 12 | License: GPL v2+ |
54697230 JB |
13 | Group: Daemons |
14 | Source0: http://people.redhat.com/sgrubb/audit/%{name}-%{version}.tar.gz | |
4c11c375 | 15 | # Source0-md5: 967776cbec046043ef02ffefe0e89cb7 |
de2a21fd JB |
16 | Source2: %{name}d.init |
17 | Source3: %{name}d.sysconfig | |
80475ae6 | 18 | Patch0: %{name}-install.patch |
1e78f2d9 | 19 | Patch1: %{name}-pthread.patch |
54697230 JB |
20 | URL: http://people.redhat.com/sgrubb/audit/ |
21 | BuildRequires: autoconf >= 2.59 | |
10583781 | 22 | BuildRequires: automake >= 1:1.9 |
e5a8c0d8 | 23 | %{?with_pie:BuildRequires: gcc >= 5:3.4} |
0a348a92 | 24 | BuildRequires: gettext-devel >= 0.14.6 |
10583781 | 25 | BuildRequires: glibc-headers >= 6:2.3.6 |
1e78f2d9 | 26 | BuildRequires: heimdal-devel |
5e4a6748 | 27 | BuildRequires: intltool |
10583781 | 28 | BuildRequires: libstdc++-devel |
526a1f46 | 29 | %{?with_prelude:BuildRequires: libprelude-devel} |
54697230 | 30 | BuildRequires: libtool |
80475ae6 | 31 | BuildRequires: linux-libc-headers >= 7:2.6.20 |
792ef7a1 | 32 | BuildRequires: openldap-devel |
57f09668 | 33 | %if %{with python} |
84214962 | 34 | BuildRequires: python-devel >= 1:2.5 |
9ee6c1ce | 35 | BuildRequires: rpm-pythonprov |
7e695d35 | 36 | BuildRequires: swig-python |
57f09668 | 37 | %endif |
38 | BuildRequires: rpmbuild(macros) >= 1.268 | |
ab8f94cb | 39 | BuildRequires: sed >= 4.0 |
54697230 JB |
40 | Requires(post,preun): /sbin/chkconfig |
41 | Requires: %{name}-libs = %{version}-%{release} | |
96102055 | 42 | Requires: rc-scripts |
526a1f46 | 43 | Obsoletes: audit-audispd-plugins |
54697230 JB |
44 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
45 | ||
46 | %define _sbindir /sbin | |
ab8f94cb JB |
47 | # use /lib, because this path is put in /usr/share/.../settings.py |
48 | %define _libexecdir %{_prefix}/lib | |
54697230 JB |
49 | |
50 | %description | |
51 | The audit package contains the user space utilities for storing and | |
52 | processing the audit records generate by the audit subsystem in the | |
53 | Linux 2.6 kernel. | |
54 | ||
b27e8f95 JR |
55 | %description -l pl.UTF-8 |
56 | Ten pakiet zawiera narzędzia przestrzeni użytkownika do przechowywania | |
57 | i przetwarzania rekordów audytu generowanych przez podsystem audytu w | |
58 | jądrach Linuksa 2.6. | |
54697230 JB |
59 | |
60 | %package libs | |
5a56b716 | 61 | Summary: Dynamic audit libraries |
7f0a1e1e | 62 | Summary(pl.UTF-8): Biblioteki dynamiczne audit |
ab8f94cb | 63 | License: LGPL v2.1+ |
54697230 JB |
64 | Group: Libraries |
65 | ||
66 | %description libs | |
5a56b716 | 67 | The audit-libs package contains the dynamic libraries needed for |
54697230 JB |
68 | applications to use the audit framework. |
69 | ||
b27e8f95 | 70 | %description libs -l pl.UTF-8 |
5a56b716 | 71 | Ten pakiet zawiera biblioteki dynamiczne potrzebne dla aplikacji |
b27e8f95 | 72 | używających środowiska audytu. |
54697230 JB |
73 | |
74 | %package libs-devel | |
5a56b716 | 75 | Summary: Header files for audit libraries |
7f0a1e1e | 76 | Summary(pl.UTF-8): Pliki nagłówkowe bibliotek audit |
ab8f94cb | 77 | License: LGPL v2.1+ |
54697230 JB |
78 | Group: Development/Libraries |
79 | Requires: %{name}-libs = %{version}-%{release} | |
ab8f94cb | 80 | Requires: linux-libc-headers >= 7:2.6.20 |
54697230 JB |
81 | |
82 | %description libs-devel | |
83 | The audit-libs-devel package contains the header files needed for | |
84 | developing applications that need to use the audit framework library. | |
85 | ||
b27e8f95 JR |
86 | %description libs-devel -l pl.UTF-8 |
87 | Ten pakiet zawiera pliki nagłówkowe potrzebne do tworzenia aplikacji | |
88 | używających biblioteki środowiska audytu. | |
54697230 JB |
89 | |
90 | %package libs-static | |
5a56b716 | 91 | Summary: Static audit libraries |
7f0a1e1e | 92 | Summary(pl.UTF-8): Statyczne biblioteki audit |
ab8f94cb | 93 | License: LGPL v2.1+ |
54697230 JB |
94 | Group: Development/Libraries |
95 | Requires: %{name}-libs-devel = %{version}-%{release} | |
96 | ||
97 | %description libs-static | |
5a56b716 JB |
98 | The audit-libs-static package contains the static libraries for |
99 | developing applications that need to use the audit framework. | |
54697230 | 100 | |
b27e8f95 | 101 | %description libs-static -l pl.UTF-8 |
5a56b716 | 102 | Ten pakiet zawiera statyczne biblioteki do tworzenia aplikacji |
b27e8f95 | 103 | używających środowiska audytu. |
54697230 | 104 | |
526a1f46 JB |
105 | %package plugin-prelude |
106 | Summary: prelude plugin for audispd | |
107 | Summary(pl.UTF-8): Wtyczka prelude dla audispd | |
108 | Group: Daemons | |
109 | Requires: %{name} = %{version}-%{release} | |
110 | ||
111 | %description plugin-prelude | |
112 | audisp-prelude is a plugin for the audit event dispatcher daemon, | |
113 | audispd, that uses libprelude to send IDMEF alerts for possible | |
114 | Intrusion Detection events. | |
115 | ||
116 | %description plugin-prelude -l pl.UTF-8 | |
117 | audisp-prelude to wtyczka demona audispd przekazującego zdarzenia | |
118 | audytowe wykorzystująca libprelude do wysyłania alarmów IDMEF o | |
119 | prawdopodobnych zdarzeniach IDS. | |
120 | ||
9ee6c1ce JB |
121 | %package -n python-audit |
122 | Summary: Python interface to libaudit library | |
7f0a1e1e | 123 | Summary(pl.UTF-8): Pythonowy interfejs do biblioteki libaudit |
ab8f94cb | 124 | License: LGPL v2.1+ |
9ee6c1ce JB |
125 | Group: Libraries/Python |
126 | Requires: %{name}-libs = %{version}-%{release} | |
127 | ||
128 | %description -n python-audit | |
129 | Python interface to libaudit library. | |
130 | ||
b27e8f95 | 131 | %description -n python-audit -l pl.UTF-8 |
9ee6c1ce JB |
132 | Pythonowy interfejs do biblioteki libaudit. |
133 | ||
ab8f94cb JB |
134 | %package -n system-config-audit |
135 | Summary: Utility for editing audit configuration | |
136 | Summary(pl.UTF-8): Narzędzie do zmiany konfiguracji audytu | |
137 | License: GPL v2 | |
138 | Group: Applications/System | |
139 | Requires: %{name} = %{version}-%{release} | |
df9476f1 | 140 | Version: 0.4.8 |
6fc26f9b | 141 | Requires: python-pygtk-glade >= 2:2.0 |
ab8f94cb JB |
142 | Requires: usermode |
143 | #Requires: usermode-gtk ??? | |
144 | ||
145 | %description -n system-config-audit | |
146 | An utility for editing audit configuration. | |
147 | ||
148 | %description -n system-config-audit -l pl.UTF-8 | |
149 | Narzędzie do zmiany konfiguracji audytu. | |
150 | ||
54697230 JB |
151 | %prep |
152 | %setup -q | |
eb9b3ab9 | 153 | %patch0 -p1 |
1e78f2d9 | 154 | %patch1 -p1 |
1a8b063a | 155 | |
3d5ad897 | 156 | %if !%{with python} |
b89f6d79 | 157 | sed 's#swig/Makefile ##' -i configure.ac |
9d3991e5 | 158 | sed 's/swig//' -i Makefile.am |
57f09668 | 159 | %endif |
160 | ||
ab8f94cb JB |
161 | sed -i -e 's,/main\.py,/main.pyc,' system-config-audit/src/system-config-audit.in |
162 | ||
54697230 JB |
163 | %build |
164 | %{__libtoolize} | |
165 | %{__aclocal} | |
166 | %{__autoconf} | |
167 | %{__autoheader} | |
168 | %{__automake} | |
0a348a92 | 169 | cd system-config-audit |
526a1f46 | 170 | %{__libtoolize} |
0a348a92 JB |
171 | %{__aclocal} |
172 | %{__autoconf} | |
173 | %{__autoheader} | |
174 | %{__automake} | |
175 | cd .. | |
cc094a3e | 176 | %configure \ |
526a1f46 | 177 | --with-apparmor \ |
1e78f2d9 | 178 | --enable-gssapi-krb5 \ |
526a1f46 | 179 | %{?with_prelude:--with-prelude} |
e5a8c0d8 JB |
180 | # override auditd_{C,LD}FLAGS to avoid -fPIE unsupported by gcc 3.3 |
181 | %{__make} \ | |
aac5fae1 | 182 | %{!?with_pie:auditd_CFLAGS="-D_REENTRANT -D_GNU_SOURCE" auditd_LDFLAGS="-Wl,-z,relro"} |
54697230 | 183 | |
bf2e6acc JB |
184 | # temporarily not included in all |
185 | %{__make} -C auparse | |
186 | ||
54697230 JB |
187 | %install |
188 | rm -rf $RPM_BUILD_ROOT | |
189 | install -d $RPM_BUILD_ROOT%{_var}/log/audit | |
190 | ||
191 | %{__make} install \ | |
192 | DESTDIR=$RPM_BUILD_ROOT | |
193 | ||
bf2e6acc JB |
194 | # temporarily not included in all |
195 | %{__make} -C auparse install \ | |
196 | DESTDIR=$RPM_BUILD_ROOT | |
197 | ||
54697230 JB |
198 | install -d $RPM_BUILD_ROOT/%{_lib} |
199 | mv -f $RPM_BUILD_ROOT%{_libdir}/libaudit.so.* $RPM_BUILD_ROOT/%{_lib} | |
fef538cf | 200 | ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libaudit.so.*.*.*) \ |
1a8b063a | 201 | $RPM_BUILD_ROOT%{_libdir}/libaudit.so |
8ba70267 | 202 | mv -f $RPM_BUILD_ROOT%{_libdir}/libauparse.so.* $RPM_BUILD_ROOT/%{_lib} |
fef538cf | 203 | ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libauparse.so.*.*.*) \ |
8ba70267 | 204 | $RPM_BUILD_ROOT%{_libdir}/libauparse.so |
54697230 JB |
205 | |
206 | # We manually install this since Makefile doesn't | |
207 | install -d $RPM_BUILD_ROOT%{_includedir} | |
208 | install lib/libaudit.h $RPM_BUILD_ROOT%{_includedir} | |
209 | ||
de2a21fd JB |
210 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/auditd |
211 | install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/auditd | |
212 | ||
57f09668 | 213 | %if %{with python} |
eb9b3ab9 | 214 | %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir} |
8e99bb72 | 215 | %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir} |
eb9b3ab9 | 216 | rm -f $RPM_BUILD_ROOT%{py_sitescriptdir}/*.py |
8e99bb72 | 217 | rm -f $RPM_BUILD_ROOT%{py_sitedir}/*.{la,a} |
ab8f94cb JB |
218 | |
219 | %py_postclean $RPM_BUILD_ROOT%{_datadir}/system-config-audit | |
220 | %find_lang system-config-audit | |
57f09668 | 221 | %endif |
9ee6c1ce | 222 | |
54697230 JB |
223 | %clean |
224 | rm -rf $RPM_BUILD_ROOT | |
225 | ||
226 | %post libs -p /sbin/ldconfig | |
227 | %postun libs -p /sbin/ldconfig | |
228 | ||
229 | %post | |
230 | /sbin/chkconfig --add auditd | |
2a6b8c9c | 231 | %service auditd restart "audit daemon" |
54697230 JB |
232 | |
233 | %preun | |
234 | if [ "$1" = "0" ]; then | |
2a6b8c9c | 235 | %service auditd stop |
54697230 JB |
236 | /sbin/chkconfig --del auditd |
237 | fi | |
238 | ||
239 | %files | |
240 | %defattr(644,root,root,755) | |
bd0730be | 241 | %doc AUTHORS ChangeLog README THANKS TODO |
2bfdaebd | 242 | %attr(750,root,root) %{_bindir}/aulast |
08b12da9 JB |
243 | %attr(750,root,root) %{_bindir}/aulastlog |
244 | %attr(750,root,root) %{_bindir}/ausyscall | |
80475ae6 | 245 | %attr(750,root,root) %{_sbindir}/audispd |
54697230 JB |
246 | %attr(750,root,root) %{_sbindir}/auditctl |
247 | %attr(750,root,root) %{_sbindir}/auditd | |
e5a8c0d8 | 248 | %attr(750,root,root) %{_sbindir}/aureport |
54697230 JB |
249 | %attr(750,root,root) %{_sbindir}/ausearch |
250 | %attr(750,root,root) %{_sbindir}/autrace | |
08b12da9 | 251 | %attr(755,root,root) %{_sbindir}/audisp-remote |
2f4ad87a | 252 | %attr(755,root,root) %{_sbindir}/audispd-zos-remote |
0a348a92 JB |
253 | %dir %{_sysconfdir}/audisp |
254 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/audispd.conf | |
08b12da9 | 255 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/audisp-remote.conf |
2f4ad87a | 256 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/zos-remote.conf |
0a348a92 JB |
257 | %dir %{_sysconfdir}/audisp/plugins.d |
258 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/plugins.d/af_unix.conf | |
08b12da9 | 259 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/plugins.d/au-remote.conf |
792ef7a1 | 260 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/plugins.d/audispd-zos-remote.conf |
0a348a92 | 261 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/plugins.d/syslog.conf |
7630c8d3 JB |
262 | %dir %{_sysconfdir}/audit |
263 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audit/auditd.conf | |
264 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audit/audit.rules | |
80475ae6 | 265 | %attr(754,root,root) /etc/rc.d/init.d/auditd |
f6ae0a53 | 266 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/auditd |
54697230 | 267 | %attr(750,root,root) %dir %{_var}/log/audit |
0a348a92 | 268 | %{_mandir}/man5/audispd.conf.5* |
08b12da9 | 269 | %{_mandir}/man5/audisp-remote.conf.5* |
80475ae6 | 270 | %{_mandir}/man5/auditd.conf.5* |
526a1f46 | 271 | %{_mandir}/man5/ausearch-expression.5* |
2f4ad87a | 272 | %{_mandir}/man5/zos-remote.conf.5* |
08b12da9 | 273 | %{_mandir}/man8/audisp-remote.8* |
526a1f46 JB |
274 | %{_mandir}/man8/audispd-zos-remote.8* |
275 | %{_mandir}/man8/audispd.8* | |
276 | %{_mandir}/man8/auditctl.8* | |
277 | %{_mandir}/man8/auditd.8* | |
2bfdaebd | 278 | %{_mandir}/man8/aulast.8* |
526a1f46 JB |
279 | %{_mandir}/man8/aulastlog.8* |
280 | %{_mandir}/man8/aureport.8* | |
281 | %{_mandir}/man8/ausearch.8* | |
08b12da9 | 282 | %{_mandir}/man8/ausyscall.8* |
526a1f46 | 283 | %{_mandir}/man8/autrace.8* |
54697230 JB |
284 | |
285 | %files libs | |
286 | %defattr(644,root,root,755) | |
287 | %attr(755,root,root) /%{_lib}/libaudit.so.*.*.* | |
fef538cf | 288 | %attr(755,root,root) %ghost /%{_lib}/libaudit.so.0 |
8ba70267 | 289 | %attr(755,root,root) /%{_lib}/libauparse.so.*.*.* |
fef538cf | 290 | %attr(755,root,root) %ghost /%{_lib}/libauparse.so.0 |
7630c8d3 | 291 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libaudit.conf |
54697230 JB |
292 | |
293 | %files libs-devel | |
294 | %defattr(644,root,root,755) | |
295 | %attr(755,root,root) %{_libdir}/libaudit.so | |
8ba70267 | 296 | %attr(755,root,root) %{_libdir}/libauparse.so |
54697230 | 297 | %{_libdir}/libaudit.la |
8ba70267 | 298 | %{_libdir}/libauparse.la |
6d3a6f20 | 299 | %{_includedir}/auparse*.h |
54697230 | 300 | %{_includedir}/libaudit.h |
526a1f46 JB |
301 | %{_mandir}/man3/audit_*.3* |
302 | %{_mandir}/man3/auparse_*.3* | |
303 | %{_mandir}/man3/ausearch_*.3* | |
304 | %{_mandir}/man3/get_auditfail_action.3* | |
305 | %{_mandir}/man3/set_aumessage_mode.3* | |
54697230 JB |
306 | |
307 | %files libs-static | |
308 | %defattr(644,root,root,755) | |
309 | %{_libdir}/libaudit.a | |
8ba70267 | 310 | %{_libdir}/libauparse.a |
9ee6c1ce | 311 | |
526a1f46 JB |
312 | %if %{with prelude} |
313 | %files plugin-prelude | |
314 | %defattr(644,root,root,755) | |
315 | %attr(755,root,root) %{_sbindir}/audisp-prelude | |
316 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/audisp-prelude.conf | |
317 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/plugins.d/au-prelude.conf | |
318 | %{_mandir}/man5/audisp-prelude.conf.5* | |
319 | %{_mandir}/man8/audisp-prelude.8* | |
320 | %endif | |
321 | ||
57f09668 | 322 | %if %{with python} |
9ee6c1ce JB |
323 | %files -n python-audit |
324 | %defattr(644,root,root,755) | |
325 | %attr(755,root,root) %{py_sitedir}/_audit.so | |
84214962 | 326 | %attr(755,root,root) %{py_sitedir}/auparse.so |
4c11c375 | 327 | %{py_sitedir}/audit.py[co] |
ab8f94cb JB |
328 | |
329 | %files -n system-config-audit -f system-config-audit.lang | |
330 | %defattr(644,root,root,755) | |
331 | %attr(755,root,root) %{_bindir}/system-config-audit | |
332 | %attr(755,root,root) %{_libexecdir}/system-config-audit-server | |
333 | %{_datadir}/system-config-audit | |
334 | %{_desktopdir}/system-config-audit.desktop | |
57f09668 | 335 | %endif |