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