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