]>
Commit | Line | Data |
---|---|---|
ce14e998 | 1 | # |
e5a8c0d8 | 2 | # Conditional build: |
49caa03e | 3 | %bcond_without kerberos5 # Kerberos V support via heimdal |
ffa39469 | 4 | %bcond_without prelude # prelude audisp plugin |
49caa03e JB |
5 | %bcond_without golang # Go language bindings |
6 | %bcond_without python # Python bindings | |
7 | %bcond_without zos_remote # zos-remote audisp plugin (LDAP dep) | |
e5a8c0d8 | 8 | # |
54697230 | 9 | Summary: User space tools for 2.6 kernel auditing |
7f0a1e1e | 10 | Summary(pl.UTF-8): Narzędzia przestrzeni użytkownika do audytu jąder 2.6 |
54697230 | 11 | Name: audit |
0b094d2d | 12 | Version: 2.4.1 |
816d3bb0 | 13 | Release: 2 |
ab8f94cb | 14 | License: GPL v2+ |
54697230 JB |
15 | Group: Daemons |
16 | Source0: http://people.redhat.com/sgrubb/audit/%{name}-%{version}.tar.gz | |
0b094d2d | 17 | # Source0-md5: 03a73041e2de853148b2bca67a1d9138 |
de2a21fd JB |
18 | Source2: %{name}d.init |
19 | Source3: %{name}d.sysconfig | |
80475ae6 | 20 | Patch0: %{name}-install.patch |
b0722891 | 21 | Patch1: %{name}-m4.patch |
61d763d9 | 22 | Patch2: %{name}-nolibs.patch |
220b3c30 | 23 | Patch3: %{name}-no_zos_remote.patch |
ffa39469 | 24 | Patch4: %{name}-systemd-notonly.patch |
0bd7ba4a | 25 | Patch5: %{name}-am.patch |
738da8d6 JR |
26 | Patch6: %{name}-no-refusemanualstop.patch |
27 | Patch7: %{name}-cronjob.patch | |
23c6312b | 28 | Patch8: golang-paths.patch |
816d3bb0 AM |
29 | # https://fedorahosted.org/fesco/ticket/1311 |
30 | Patch9: never-audit.patch | |
54697230 JB |
31 | URL: http://people.redhat.com/sgrubb/audit/ |
32 | BuildRequires: autoconf >= 2.59 | |
10583781 | 33 | BuildRequires: automake >= 1:1.9 |
10583781 | 34 | BuildRequires: glibc-headers >= 6:2.3.6 |
49caa03e | 35 | %{?with_golang:BuildRequires: golang} |
220b3c30 | 36 | %{?with_kerberos5:BuildRequires: heimdal-devel} |
693afa1c | 37 | BuildRequires: libcap-ng-devel |
526a1f46 | 38 | %{?with_prelude:BuildRequires: libprelude-devel} |
54697230 | 39 | BuildRequires: libtool |
61d763d9 | 40 | BuildRequires: libwrap-devel |
d80f3483 | 41 | BuildRequires: linux-libc-headers >= 7:2.6.30 |
220b3c30 | 42 | %{?with_zos_remote:BuildRequires: openldap-devel} |
57f09668 | 43 | %if %{with python} |
84214962 | 44 | BuildRequires: python-devel >= 1:2.5 |
9ee6c1ce | 45 | BuildRequires: rpm-pythonprov |
7e695d35 | 46 | BuildRequires: swig-python |
57f09668 | 47 | %endif |
9a3b9076 | 48 | BuildRequires: rpmbuild(macros) >= 1.623 |
ab8f94cb | 49 | BuildRequires: sed >= 4.0 |
54697230 | 50 | Requires(post,preun): /sbin/chkconfig |
195529ba | 51 | Requires(post,preun,postun): systemd-units >= 38 |
54697230 | 52 | Requires: %{name}-libs = %{version}-%{release} |
96102055 | 53 | Requires: rc-scripts |
195529ba | 54 | Requires: systemd-units >= 38 |
526a1f46 | 55 | Obsoletes: audit-audispd-plugins |
7ede5762 | 56 | Obsoletes: audit-systemd |
54697230 JB |
57 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
58 | ||
59 | %define _sbindir /sbin | |
ab8f94cb JB |
60 | # use /lib, because this path is put in /usr/share/.../settings.py |
61 | %define _libexecdir %{_prefix}/lib | |
54697230 JB |
62 | |
63 | %description | |
64 | The audit package contains the user space utilities for storing and | |
65 | processing the audit records generate by the audit subsystem in the | |
66 | Linux 2.6 kernel. | |
67 | ||
b27e8f95 JR |
68 | %description -l pl.UTF-8 |
69 | Ten pakiet zawiera narzędzia przestrzeni użytkownika do przechowywania | |
70 | i przetwarzania rekordów audytu generowanych przez podsystem audytu w | |
71 | jądrach Linuksa 2.6. | |
54697230 JB |
72 | |
73 | %package libs | |
5a56b716 | 74 | Summary: Dynamic audit libraries |
7f0a1e1e | 75 | Summary(pl.UTF-8): Biblioteki dynamiczne audit |
ab8f94cb | 76 | License: LGPL v2.1+ |
54697230 JB |
77 | Group: Libraries |
78 | ||
79 | %description libs | |
5a56b716 | 80 | The audit-libs package contains the dynamic libraries needed for |
54697230 JB |
81 | applications to use the audit framework. |
82 | ||
b27e8f95 | 83 | %description libs -l pl.UTF-8 |
5a56b716 | 84 | Ten pakiet zawiera biblioteki dynamiczne potrzebne dla aplikacji |
b27e8f95 | 85 | używających środowiska audytu. |
54697230 JB |
86 | |
87 | %package libs-devel | |
5a56b716 | 88 | Summary: Header files for audit libraries |
7f0a1e1e | 89 | Summary(pl.UTF-8): Pliki nagłówkowe bibliotek audit |
ab8f94cb | 90 | License: LGPL v2.1+ |
54697230 JB |
91 | Group: Development/Libraries |
92 | Requires: %{name}-libs = %{version}-%{release} | |
d80f3483 | 93 | Requires: linux-libc-headers >= 7:2.6.30 |
54697230 JB |
94 | |
95 | %description libs-devel | |
96 | The audit-libs-devel package contains the header files needed for | |
97 | developing applications that need to use the audit framework library. | |
98 | ||
b27e8f95 JR |
99 | %description libs-devel -l pl.UTF-8 |
100 | Ten pakiet zawiera pliki nagłówkowe potrzebne do tworzenia aplikacji | |
101 | używających biblioteki środowiska audytu. | |
54697230 JB |
102 | |
103 | %package libs-static | |
5a56b716 | 104 | Summary: Static audit libraries |
7f0a1e1e | 105 | Summary(pl.UTF-8): Statyczne biblioteki audit |
ab8f94cb | 106 | License: LGPL v2.1+ |
54697230 JB |
107 | Group: Development/Libraries |
108 | Requires: %{name}-libs-devel = %{version}-%{release} | |
109 | ||
110 | %description libs-static | |
5a56b716 JB |
111 | The audit-libs-static package contains the static libraries for |
112 | developing applications that need to use the audit framework. | |
54697230 | 113 | |
b27e8f95 | 114 | %description libs-static -l pl.UTF-8 |
5a56b716 | 115 | Ten pakiet zawiera statyczne biblioteki do tworzenia aplikacji |
b27e8f95 | 116 | używających środowiska audytu. |
54697230 | 117 | |
526a1f46 JB |
118 | %package plugin-prelude |
119 | Summary: prelude plugin for audispd | |
120 | Summary(pl.UTF-8): Wtyczka prelude dla audispd | |
121 | Group: Daemons | |
122 | Requires: %{name} = %{version}-%{release} | |
123 | ||
124 | %description plugin-prelude | |
125 | audisp-prelude is a plugin for the audit event dispatcher daemon, | |
126 | audispd, that uses libprelude to send IDMEF alerts for possible | |
127 | Intrusion Detection events. | |
128 | ||
129 | %description plugin-prelude -l pl.UTF-8 | |
130 | audisp-prelude to wtyczka demona audispd przekazującego zdarzenia | |
131 | audytowe wykorzystująca libprelude do wysyłania alarmów IDMEF o | |
132 | prawdopodobnych zdarzeniach IDS. | |
133 | ||
49caa03e JB |
134 | %package -n golang-audit |
135 | Summary: Go language interface to libaudit library | |
136 | Summary(pl.UTF-8): Interfejs języka Go do biblioteki libaudit | |
137 | License: LGPL v2.1+ | |
138 | Group: Development/Languages | |
139 | Requires: %{name}-libs = %{version}-%{release} | |
140 | Requires: golang | |
141 | ||
142 | %description -n golang-audit | |
143 | Go language interface to libaudit library. | |
144 | ||
145 | %description -n golang-audit -l pl.UTF-8 | |
146 | Interfejs języka Go do biblioteki libaudit. | |
147 | ||
9ee6c1ce JB |
148 | %package -n python-audit |
149 | Summary: Python interface to libaudit library | |
7f0a1e1e | 150 | Summary(pl.UTF-8): Pythonowy interfejs do biblioteki libaudit |
ab8f94cb | 151 | License: LGPL v2.1+ |
9ee6c1ce JB |
152 | Group: Libraries/Python |
153 | Requires: %{name}-libs = %{version}-%{release} | |
154 | ||
155 | %description -n python-audit | |
156 | Python interface to libaudit library. | |
157 | ||
b27e8f95 | 158 | %description -n python-audit -l pl.UTF-8 |
9ee6c1ce JB |
159 | Pythonowy interfejs do biblioteki libaudit. |
160 | ||
54697230 JB |
161 | %prep |
162 | %setup -q | |
eb9b3ab9 | 163 | %patch0 -p1 |
1e78f2d9 | 164 | %patch1 -p1 |
61d763d9 | 165 | %patch2 -p1 |
220b3c30 | 166 | %{!?with_zos_remote:%patch3 -p1} |
ffa39469 | 167 | %patch4 -p1 |
0bd7ba4a | 168 | %patch5 -p1 |
738da8d6 JR |
169 | %patch6 -p1 |
170 | %patch7 -p1 | |
23c6312b | 171 | %patch8 -p1 |
816d3bb0 | 172 | %patch9 -p1 |
1a8b063a | 173 | |
68d62ac9 | 174 | %if %{without python} |
b89f6d79 | 175 | sed 's#swig/Makefile ##' -i configure.ac |
9d3991e5 | 176 | sed 's/swig//' -i Makefile.am |
57f09668 | 177 | %endif |
178 | ||
54697230 JB |
179 | %build |
180 | %{__libtoolize} | |
181 | %{__aclocal} | |
182 | %{__autoconf} | |
183 | %{__autoheader} | |
184 | %{__automake} | |
cc094a3e | 185 | %configure \ |
220b3c30 | 186 | %{?with_kerberos5:--enable-gssapi-krb5} \ |
ffa39469 | 187 | --enable-systemd \ |
61d763d9 JB |
188 | --with-apparmor \ |
189 | --with-libwrap \ | |
526a1f46 | 190 | %{?with_prelude:--with-prelude} |
54697230 | 191 | |
738da8d6 | 192 | %{__make} |
bf2e6acc | 193 | |
54697230 JB |
194 | %install |
195 | rm -rf $RPM_BUILD_ROOT | |
196 | install -d $RPM_BUILD_ROOT%{_var}/log/audit | |
197 | ||
198 | %{__make} install \ | |
199 | DESTDIR=$RPM_BUILD_ROOT | |
200 | ||
738da8d6 JR |
201 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/auditd |
202 | install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/auditd | |
bf2e6acc | 203 | |
54697230 JB |
204 | install -d $RPM_BUILD_ROOT/%{_lib} |
205 | mv -f $RPM_BUILD_ROOT%{_libdir}/libaudit.so.* $RPM_BUILD_ROOT/%{_lib} | |
fef538cf | 206 | ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libaudit.so.*.*.*) \ |
1a8b063a | 207 | $RPM_BUILD_ROOT%{_libdir}/libaudit.so |
8ba70267 | 208 | mv -f $RPM_BUILD_ROOT%{_libdir}/libauparse.so.* $RPM_BUILD_ROOT/%{_lib} |
fef538cf | 209 | ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libauparse.so.*.*.*) \ |
8ba70267 | 210 | $RPM_BUILD_ROOT%{_libdir}/libauparse.so |
54697230 | 211 | |
738da8d6 JR |
212 | # RH initscripts-specific |
213 | %{__rm} -r $RPM_BUILD_ROOT%{_libexecdir}/initscripts | |
6c98eb8c | 214 | |
57f09668 | 215 | %if %{with python} |
68d62ac9 JB |
216 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} |
217 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} | |
738da8d6 | 218 | %py_postclean |
68d62ac9 | 219 | %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/*.{la,a} |
57f09668 | 220 | %endif |
9ee6c1ce | 221 | |
54697230 JB |
222 | %clean |
223 | rm -rf $RPM_BUILD_ROOT | |
224 | ||
225 | %post libs -p /sbin/ldconfig | |
226 | %postun libs -p /sbin/ldconfig | |
227 | ||
228 | %post | |
738da8d6 JR |
229 | # Copy default rules into place on new installation |
230 | if [ ! -e %{_sysconfdir}/audit/audit.rules ] ; then | |
231 | cp -a %{_sysconfdir}/audit/rules.d/audit.rules %{_sysconfdir}/audit/audit.rules | |
232 | fi | |
54697230 | 233 | /sbin/chkconfig --add auditd |
2a6b8c9c | 234 | %service auditd restart "audit daemon" |
7ede5762 | 235 | %systemd_post auditd.service |
54697230 JB |
236 | |
237 | %preun | |
238 | if [ "$1" = "0" ]; then | |
2a6b8c9c | 239 | %service auditd stop |
54697230 JB |
240 | /sbin/chkconfig --del auditd |
241 | fi | |
9a3b9076 BZ |
242 | %systemd_preun auditd.service |
243 | ||
7ede5762 JR |
244 | %postun |
245 | %systemd_reload | |
246 | ||
247 | %triggerpostun -- %{name} < 2.2-2 | |
248 | %systemd_trigger auditd.service | |
9a3b9076 | 249 | |
738da8d6 JR |
250 | %triggerpostun -- %{name} < 2.3-1 |
251 | if [ -e %{_sysconfdir}/audit/audit.rules.rpmsave ] ; then | |
252 | %{__mv} %{_sysconfdir}/audit/audit.rules{.rpmsave,} | |
253 | fi | |
f5eaf0b6 JR |
254 | %service auditd restart "audit daemon" |
255 | %systemd_post auditd.service | |
738da8d6 | 256 | |
54697230 JB |
257 | %files |
258 | %defattr(644,root,root,755) | |
bd0730be | 259 | %doc AUTHORS ChangeLog README THANKS TODO |
738da8d6 | 260 | %doc contrib/{capp,nispom,lspp,stig}.rules init.d/auditd.cron |
2bfdaebd | 261 | %attr(750,root,root) %{_bindir}/aulast |
08b12da9 JB |
262 | %attr(750,root,root) %{_bindir}/aulastlog |
263 | %attr(750,root,root) %{_bindir}/ausyscall | |
d80f3483 | 264 | %attr(750,root,root) %{_bindir}/auvirt |
80475ae6 | 265 | %attr(750,root,root) %{_sbindir}/audispd |
54697230 JB |
266 | %attr(750,root,root) %{_sbindir}/auditctl |
267 | %attr(750,root,root) %{_sbindir}/auditd | |
896d27e1 | 268 | %attr(750,root,root) %{_sbindir}/augenrules |
e5a8c0d8 | 269 | %attr(750,root,root) %{_sbindir}/aureport |
54697230 JB |
270 | %attr(750,root,root) %{_sbindir}/ausearch |
271 | %attr(750,root,root) %{_sbindir}/autrace | |
08b12da9 | 272 | %attr(755,root,root) %{_sbindir}/audisp-remote |
ffa39469 | 273 | %{?with_zos_remote:%attr(755,root,root) %{_sbindir}/audispd-zos-remote} |
0a348a92 JB |
274 | %dir %{_sysconfdir}/audisp |
275 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/audispd.conf | |
08b12da9 | 276 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/audisp-remote.conf |
ffa39469 | 277 | %{?with_zos_remote:%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/zos-remote.conf} |
0a348a92 JB |
278 | %dir %{_sysconfdir}/audisp/plugins.d |
279 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/plugins.d/af_unix.conf | |
08b12da9 | 280 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/plugins.d/au-remote.conf |
ffa39469 | 281 | %{?with_zos_remote:%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/plugins.d/audispd-zos-remote.conf} |
0a348a92 | 282 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/plugins.d/syslog.conf |
7630c8d3 JB |
283 | %dir %{_sysconfdir}/audit |
284 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audit/auditd.conf | |
896d27e1 AZ |
285 | %dir %{_sysconfdir}/audit/rules.d |
286 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audit/rules.d/audit.rules | |
80475ae6 | 287 | %attr(754,root,root) /etc/rc.d/init.d/auditd |
f6ae0a53 | 288 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/auditd |
7ede5762 | 289 | %{systemdunitdir}/auditd.service |
54697230 | 290 | %attr(750,root,root) %dir %{_var}/log/audit |
0a348a92 | 291 | %{_mandir}/man5/audispd.conf.5* |
08b12da9 | 292 | %{_mandir}/man5/audisp-remote.conf.5* |
80475ae6 | 293 | %{_mandir}/man5/auditd.conf.5* |
526a1f46 | 294 | %{_mandir}/man5/ausearch-expression.5* |
ffa39469 | 295 | %{?with_zos_remote:%{_mandir}/man5/zos-remote.conf.5*} |
693afa1c | 296 | %{_mandir}/man7/audit.rules.7* |
08b12da9 | 297 | %{_mandir}/man8/audisp-remote.8* |
ffa39469 | 298 | %{?with_zos_remote:%{_mandir}/man8/audispd-zos-remote.8*} |
526a1f46 JB |
299 | %{_mandir}/man8/audispd.8* |
300 | %{_mandir}/man8/auditctl.8* | |
301 | %{_mandir}/man8/auditd.8* | |
896d27e1 | 302 | %{_mandir}/man8/augenrules.8* |
2bfdaebd | 303 | %{_mandir}/man8/aulast.8* |
526a1f46 JB |
304 | %{_mandir}/man8/aulastlog.8* |
305 | %{_mandir}/man8/aureport.8* | |
306 | %{_mandir}/man8/ausearch.8* | |
08b12da9 | 307 | %{_mandir}/man8/ausyscall.8* |
526a1f46 | 308 | %{_mandir}/man8/autrace.8* |
d80f3483 | 309 | %{_mandir}/man8/auvirt.8* |
54697230 JB |
310 | |
311 | %files libs | |
312 | %defattr(644,root,root,755) | |
313 | %attr(755,root,root) /%{_lib}/libaudit.so.*.*.* | |
82313177 | 314 | %attr(755,root,root) %ghost /%{_lib}/libaudit.so.1 |
8ba70267 | 315 | %attr(755,root,root) /%{_lib}/libauparse.so.*.*.* |
fef538cf | 316 | %attr(755,root,root) %ghost /%{_lib}/libauparse.so.0 |
7630c8d3 | 317 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libaudit.conf |
693afa1c | 318 | %{_mandir}/man5/libaudit.conf.5* |
54697230 JB |
319 | |
320 | %files libs-devel | |
321 | %defattr(644,root,root,755) | |
322 | %attr(755,root,root) %{_libdir}/libaudit.so | |
8ba70267 | 323 | %attr(755,root,root) %{_libdir}/libauparse.so |
54697230 | 324 | %{_libdir}/libaudit.la |
8ba70267 | 325 | %{_libdir}/libauparse.la |
6d3a6f20 | 326 | %{_includedir}/auparse*.h |
54697230 | 327 | %{_includedir}/libaudit.h |
49caa03e | 328 | %{_pkgconfigdir}/audit.pc |
526a1f46 JB |
329 | %{_mandir}/man3/audit_*.3* |
330 | %{_mandir}/man3/auparse_*.3* | |
331 | %{_mandir}/man3/ausearch_*.3* | |
332 | %{_mandir}/man3/get_auditfail_action.3* | |
333 | %{_mandir}/man3/set_aumessage_mode.3* | |
54697230 JB |
334 | |
335 | %files libs-static | |
336 | %defattr(644,root,root,755) | |
337 | %{_libdir}/libaudit.a | |
8ba70267 | 338 | %{_libdir}/libauparse.a |
9ee6c1ce | 339 | |
526a1f46 JB |
340 | %if %{with prelude} |
341 | %files plugin-prelude | |
342 | %defattr(644,root,root,755) | |
343 | %attr(755,root,root) %{_sbindir}/audisp-prelude | |
344 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/audisp-prelude.conf | |
345 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/plugins.d/au-prelude.conf | |
346 | %{_mandir}/man5/audisp-prelude.conf.5* | |
347 | %{_mandir}/man8/audisp-prelude.8* | |
348 | %endif | |
349 | ||
49caa03e JB |
350 | %if %{with golang} |
351 | %files -n golang-audit | |
352 | %defattr(644,root,root,755) | |
353 | %dir %{_libdir}/golang/src/pkg/redhat.com | |
354 | %{_libdir}/golang/src/pkg/redhat.com/audit | |
355 | %endif | |
356 | ||
57f09668 | 357 | %if %{with python} |
9ee6c1ce JB |
358 | %files -n python-audit |
359 | %defattr(644,root,root,755) | |
360 | %attr(755,root,root) %{py_sitedir}/_audit.so | |
84214962 | 361 | %attr(755,root,root) %{py_sitedir}/auparse.so |
4c11c375 | 362 | %{py_sitedir}/audit.py[co] |
57f09668 | 363 | %endif |