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