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