]> git.pld-linux.org Git - packages/audit.git/blame - audit.spec
- rel 2; add systemd service
[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
7e709041 10Version: 2.1.3
6c97be47 11Release: 2
ab8f94cb 12License: GPL v2+
54697230
JB
13Group: Daemons
14Source0: http://people.redhat.com/sgrubb/audit/%{name}-%{version}.tar.gz
7e709041 15# Source0-md5: abf26e3ac09f666905c5636dd24611fa
de2a21fd
JB
16Source2: %{name}d.init
17Source3: %{name}d.sysconfig
6c97be47 18Source4: %{name}d.service
80475ae6 19Patch0: %{name}-install.patch
b0722891 20Patch1: %{name}-m4.patch
61d763d9 21Patch2: %{name}-nolibs.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}
10583781 26BuildRequires: glibc-headers >= 6:2.3.6
1e78f2d9 27BuildRequires: heimdal-devel
693afa1c 28BuildRequires: libcap-ng-devel
526a1f46 29%{?with_prelude:BuildRequires: libprelude-devel}
54697230 30BuildRequires: libtool
61d763d9 31BuildRequires: libwrap-devel
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
6c97be47
BZ
135%package systemd
136Summary: systemd units for audit
137Group: Base
138Requires: %{name} = %{version}-%{release}
139
140%description systemd
141systemd units for audit.
142
54697230
JB
143%prep
144%setup -q
eb9b3ab9 145%patch0 -p1
1e78f2d9 146%patch1 -p1
61d763d9 147%patch2 -p1
1a8b063a 148
68d62ac9 149%if %{without python}
b89f6d79 150sed 's#swig/Makefile ##' -i configure.ac
9d3991e5 151sed 's/swig//' -i Makefile.am
57f09668 152%endif
153
54697230
JB
154%build
155%{__libtoolize}
156%{__aclocal}
157%{__autoconf}
158%{__autoheader}
159%{__automake}
cc094a3e 160%configure \
1e78f2d9 161 --enable-gssapi-krb5 \
61d763d9
JB
162 --with-apparmor \
163 --with-libwrap \
526a1f46 164 %{?with_prelude:--with-prelude}
e5a8c0d8
JB
165# override auditd_{C,LD}FLAGS to avoid -fPIE unsupported by gcc 3.3
166%{__make} \
aac5fae1 167 %{!?with_pie:auditd_CFLAGS="-D_REENTRANT -D_GNU_SOURCE" auditd_LDFLAGS="-Wl,-z,relro"}
54697230 168
bf2e6acc
JB
169# temporarily not included in all
170%{__make} -C auparse
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
bf2e6acc
JB
179# temporarily not included in all
180%{__make} -C auparse install \
181 DESTDIR=$RPM_BUILD_ROOT
182
54697230
JB
183install -d $RPM_BUILD_ROOT/%{_lib}
184mv -f $RPM_BUILD_ROOT%{_libdir}/libaudit.so.* $RPM_BUILD_ROOT/%{_lib}
fef538cf 185ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libaudit.so.*.*.*) \
1a8b063a 186 $RPM_BUILD_ROOT%{_libdir}/libaudit.so
8ba70267 187mv -f $RPM_BUILD_ROOT%{_libdir}/libauparse.so.* $RPM_BUILD_ROOT/%{_lib}
fef538cf 188ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libauparse.so.*.*.*) \
8ba70267 189 $RPM_BUILD_ROOT%{_libdir}/libauparse.so
54697230
JB
190
191# We manually install this since Makefile doesn't
6c97be47 192install -d $RPM_BUILD_ROOT{%{_includedir},/lib/systemd/system}
54697230
JB
193install lib/libaudit.h $RPM_BUILD_ROOT%{_includedir}
194
de2a21fd
JB
195install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/auditd
196install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/auditd
6c97be47 197install %{SOURCE4} $RPM_BUILD_ROOT/lib/systemd/system
de2a21fd 198
57f09668 199%if %{with python}
68d62ac9
JB
200%py_comp $RPM_BUILD_ROOT%{py_sitedir}
201%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
202%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/*.py
203%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/*.{la,a}
57f09668 204%endif
9ee6c1ce 205
54697230
JB
206%clean
207rm -rf $RPM_BUILD_ROOT
208
209%post libs -p /sbin/ldconfig
210%postun libs -p /sbin/ldconfig
211
212%post
213/sbin/chkconfig --add auditd
2a6b8c9c 214%service auditd restart "audit daemon"
54697230
JB
215
216%preun
217if [ "$1" = "0" ]; then
2a6b8c9c 218 %service auditd stop
54697230
JB
219 /sbin/chkconfig --del auditd
220fi
221
222%files
223%defattr(644,root,root,755)
bd0730be 224%doc AUTHORS ChangeLog README THANKS TODO
2bfdaebd 225%attr(750,root,root) %{_bindir}/aulast
08b12da9
JB
226%attr(750,root,root) %{_bindir}/aulastlog
227%attr(750,root,root) %{_bindir}/ausyscall
80475ae6 228%attr(750,root,root) %{_sbindir}/audispd
54697230
JB
229%attr(750,root,root) %{_sbindir}/auditctl
230%attr(750,root,root) %{_sbindir}/auditd
e5a8c0d8 231%attr(750,root,root) %{_sbindir}/aureport
54697230
JB
232%attr(750,root,root) %{_sbindir}/ausearch
233%attr(750,root,root) %{_sbindir}/autrace
08b12da9 234%attr(755,root,root) %{_sbindir}/audisp-remote
2f4ad87a 235%attr(755,root,root) %{_sbindir}/audispd-zos-remote
0a348a92
JB
236%dir %{_sysconfdir}/audisp
237%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/audispd.conf
08b12da9 238%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/audisp-remote.conf
2f4ad87a 239%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/zos-remote.conf
0a348a92
JB
240%dir %{_sysconfdir}/audisp/plugins.d
241%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/plugins.d/af_unix.conf
08b12da9 242%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/plugins.d/au-remote.conf
792ef7a1 243%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/plugins.d/audispd-zos-remote.conf
0a348a92 244%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/plugins.d/syslog.conf
7630c8d3
JB
245%dir %{_sysconfdir}/audit
246%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audit/auditd.conf
247%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audit/audit.rules
80475ae6 248%attr(754,root,root) /etc/rc.d/init.d/auditd
f6ae0a53 249%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/auditd
54697230 250%attr(750,root,root) %dir %{_var}/log/audit
0a348a92 251%{_mandir}/man5/audispd.conf.5*
08b12da9 252%{_mandir}/man5/audisp-remote.conf.5*
80475ae6 253%{_mandir}/man5/auditd.conf.5*
526a1f46 254%{_mandir}/man5/ausearch-expression.5*
2f4ad87a 255%{_mandir}/man5/zos-remote.conf.5*
693afa1c 256%{_mandir}/man7/audit.rules.7*
08b12da9 257%{_mandir}/man8/audisp-remote.8*
526a1f46
JB
258%{_mandir}/man8/audispd-zos-remote.8*
259%{_mandir}/man8/audispd.8*
260%{_mandir}/man8/auditctl.8*
261%{_mandir}/man8/auditd.8*
2bfdaebd 262%{_mandir}/man8/aulast.8*
526a1f46
JB
263%{_mandir}/man8/aulastlog.8*
264%{_mandir}/man8/aureport.8*
265%{_mandir}/man8/ausearch.8*
08b12da9 266%{_mandir}/man8/ausyscall.8*
526a1f46 267%{_mandir}/man8/autrace.8*
54697230
JB
268
269%files libs
270%defattr(644,root,root,755)
271%attr(755,root,root) /%{_lib}/libaudit.so.*.*.*
82313177 272%attr(755,root,root) %ghost /%{_lib}/libaudit.so.1
8ba70267 273%attr(755,root,root) /%{_lib}/libauparse.so.*.*.*
fef538cf 274%attr(755,root,root) %ghost /%{_lib}/libauparse.so.0
7630c8d3 275%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libaudit.conf
693afa1c 276%{_mandir}/man5/libaudit.conf.5*
54697230
JB
277
278%files libs-devel
279%defattr(644,root,root,755)
280%attr(755,root,root) %{_libdir}/libaudit.so
8ba70267 281%attr(755,root,root) %{_libdir}/libauparse.so
54697230 282%{_libdir}/libaudit.la
8ba70267 283%{_libdir}/libauparse.la
6d3a6f20 284%{_includedir}/auparse*.h
54697230 285%{_includedir}/libaudit.h
526a1f46
JB
286%{_mandir}/man3/audit_*.3*
287%{_mandir}/man3/auparse_*.3*
288%{_mandir}/man3/ausearch_*.3*
289%{_mandir}/man3/get_auditfail_action.3*
290%{_mandir}/man3/set_aumessage_mode.3*
54697230
JB
291
292%files libs-static
293%defattr(644,root,root,755)
294%{_libdir}/libaudit.a
8ba70267 295%{_libdir}/libauparse.a
9ee6c1ce 296
6c97be47
BZ
297%files systemd
298%defattr(644,root,root,755)
299/lib/systemd/system/auditd.service
300
526a1f46
JB
301%if %{with prelude}
302%files plugin-prelude
303%defattr(644,root,root,755)
304%attr(755,root,root) %{_sbindir}/audisp-prelude
305%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/audisp-prelude.conf
306%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/plugins.d/au-prelude.conf
307%{_mandir}/man5/audisp-prelude.conf.5*
308%{_mandir}/man8/audisp-prelude.8*
309%endif
310
57f09668 311%if %{with python}
9ee6c1ce
JB
312%files -n python-audit
313%defattr(644,root,root,755)
314%attr(755,root,root) %{py_sitedir}/_audit.so
84214962 315%attr(755,root,root) %{py_sitedir}/auparse.so
4c11c375 316%{py_sitedir}/audit.py[co]
57f09668 317%endif
This page took 0.090197 seconds and 4 git commands to generate.