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