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