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