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