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