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