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