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