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