]> git.pld-linux.org Git - packages/audit.git/blame - audit.spec
- versioned Obsoletes
[packages/audit.git] / audit.spec
CommitLineData
ce14e998 1#
e5a8c0d8 2# Conditional build:
49caa03e 3%bcond_without kerberos5 # Kerberos V support via heimdal
ffa39469 4%bcond_without prelude # prelude audisp plugin
49caa03e 5%bcond_without golang # Go language bindings
b7895bd5 6%bcond_with gccgo # use GCC go frontend instead of golang implementation
659527ec 7%bcond_without python # Python bindings (any)
3c5110f4 8%bcond_without python2 # Python 2 bindings
659527ec 9%bcond_without python3 # Python 3 bindings
49caa03e 10%bcond_without zos_remote # zos-remote audisp plugin (LDAP dep)
f99a4738 11
b7895bd5
JB
12%ifnarch %{ix86} %{x8664} %{arm} aarch64 mips64 mips64le ppc64 ppc64le s390x
13%define with_gccgo 1
f99a4738
JR
14%endif
15
659527ec 16%if %{without python}
3c5110f4 17%undefine with_python2
659527ec
JB
18%undefine with_python3
19%endif
54697230 20Summary: User space tools for 2.6 kernel auditing
7f0a1e1e 21Summary(pl.UTF-8): Narzędzia przestrzeni użytkownika do audytu jąder 2.6
54697230 22Name: audit
ac7f1d16 23Version: 2.8.5
dbc7b480 24Release: 6
ab8f94cb 25License: GPL v2+
54697230 26Group: Daemons
3e98c4b4 27Source0: https://people.redhat.com/sgrubb/audit/%{name}-%{version}.tar.gz
ac7f1d16 28# Source0-md5: 9455e5773670afdbccaeb92681b2e97d
de2a21fd
JB
29Source2: %{name}d.init
30Source3: %{name}d.sysconfig
80475ae6 31Patch0: %{name}-install.patch
b0722891 32Patch1: %{name}-m4.patch
61d763d9 33Patch2: %{name}-nolibs.patch
d1e0ebb3
JK
34Patch3: %{name}-systemd-notonly.patch
35Patch4: %{name}-am.patch
36Patch5: %{name}-no-refusemanualstop.patch
37Patch6: %{name}-cronjob.patch
38Patch7: golang-paths.patch
5f5ab865 39Patch8: gcc10.patch
1dc8b4bb 40Patch9: ipx_fix.patch
54697230
JB
41URL: http://people.redhat.com/sgrubb/audit/
42BuildRequires: autoconf >= 2.59
4faf4930 43BuildRequires: automake >= 1:1.12.6
10583781 44BuildRequires: glibc-headers >= 6:2.3.6
220b3c30 45%{?with_kerberos5:BuildRequires: heimdal-devel}
693afa1c 46BuildRequires: libcap-ng-devel
526a1f46 47%{?with_prelude:BuildRequires: libprelude-devel}
54697230 48BuildRequires: libtool
61d763d9 49BuildRequires: libwrap-devel
d80f3483 50BuildRequires: linux-libc-headers >= 7:2.6.30
220b3c30 51%{?with_zos_remote:BuildRequires: openldap-devel}
3c5110f4 52%if %{with python2}
84214962 53BuildRequires: python-devel >= 1:2.5
9ee6c1ce 54BuildRequires: rpm-pythonprov
7e695d35 55BuildRequires: swig-python
57f09668 56%endif
2d0ad02a
JR
57%if %{with python3}
58BuildRequires: python3-devel
59BuildRequires: rpm-pythonprov
60BuildRequires: swig-python
61%endif
56c44177 62BuildRequires: rpmbuild(macros) >= 1.644
ab8f94cb 63BuildRequires: sed >= 4.0
b7895bd5
JB
64%if %{with golang}
65%{?with_gccgo:BuildRequires: gcc-go >= 5.1}
66%{!?with_gccgo:BuildRequires: golang >= 1.4}
67%endif
54697230 68Requires(post,preun): /sbin/chkconfig
195529ba 69Requires(post,preun,postun): systemd-units >= 38
54697230 70Requires: %{name}-libs = %{version}-%{release}
96102055 71Requires: rc-scripts
195529ba 72Requires: systemd-units >= 38
d50aaacc
JB
73Obsoletes: audit-audispd-plugins < 1.6.7
74Obsoletes: audit-systemd < 2.2-2
54697230
JB
75BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
76
77%define _sbindir /sbin
ab8f94cb
JB
78# use /lib, because this path is put in /usr/share/.../settings.py
79%define _libexecdir %{_prefix}/lib
54697230
JB
80
81%description
82The audit package contains the user space utilities for storing and
83processing the audit records generate by the audit subsystem in the
84Linux 2.6 kernel.
85
b27e8f95
JR
86%description -l pl.UTF-8
87Ten pakiet zawiera narzędzia przestrzeni użytkownika do przechowywania
88i przetwarzania rekordów audytu generowanych przez podsystem audytu w
89jądrach Linuksa 2.6.
54697230
JB
90
91%package libs
5a56b716 92Summary: Dynamic audit libraries
7f0a1e1e 93Summary(pl.UTF-8): Biblioteki dynamiczne audit
ab8f94cb 94License: LGPL v2.1+
54697230
JB
95Group: Libraries
96
97%description libs
5a56b716 98The audit-libs package contains the dynamic libraries needed for
54697230
JB
99applications to use the audit framework.
100
b27e8f95 101%description libs -l pl.UTF-8
5a56b716 102Ten pakiet zawiera biblioteki dynamiczne potrzebne dla aplikacji
b27e8f95 103używających środowiska audytu.
54697230
JB
104
105%package libs-devel
5a56b716 106Summary: Header files for audit libraries
7f0a1e1e 107Summary(pl.UTF-8): Pliki nagłówkowe bibliotek audit
ab8f94cb 108License: LGPL v2.1+
54697230
JB
109Group: Development/Libraries
110Requires: %{name}-libs = %{version}-%{release}
d80f3483 111Requires: linux-libc-headers >= 7:2.6.30
9a4de669 112Requires: libcap-ng-devel
54697230
JB
113
114%description libs-devel
115The audit-libs-devel package contains the header files needed for
116developing applications that need to use the audit framework library.
117
b27e8f95
JR
118%description libs-devel -l pl.UTF-8
119Ten pakiet zawiera pliki nagłówkowe potrzebne do tworzenia aplikacji
120używających biblioteki środowiska audytu.
54697230
JB
121
122%package libs-static
5a56b716 123Summary: Static audit libraries
7f0a1e1e 124Summary(pl.UTF-8): Statyczne biblioteki audit
ab8f94cb 125License: LGPL v2.1+
54697230
JB
126Group: Development/Libraries
127Requires: %{name}-libs-devel = %{version}-%{release}
128
129%description libs-static
5a56b716
JB
130The audit-libs-static package contains the static libraries for
131developing applications that need to use the audit framework.
54697230 132
b27e8f95 133%description libs-static -l pl.UTF-8
5a56b716 134Ten pakiet zawiera statyczne biblioteki do tworzenia aplikacji
b27e8f95 135używających środowiska audytu.
54697230 136
526a1f46
JB
137%package plugin-prelude
138Summary: prelude plugin for audispd
139Summary(pl.UTF-8): Wtyczka prelude dla audispd
140Group: Daemons
141Requires: %{name} = %{version}-%{release}
142
143%description plugin-prelude
144audisp-prelude is a plugin for the audit event dispatcher daemon,
145audispd, that uses libprelude to send IDMEF alerts for possible
146Intrusion Detection events.
147
148%description plugin-prelude -l pl.UTF-8
149audisp-prelude to wtyczka demona audispd przekazującego zdarzenia
150audytowe wykorzystująca libprelude do wysyłania alarmów IDMEF o
151prawdopodobnych zdarzeniach IDS.
152
49caa03e
JB
153%package -n golang-audit
154Summary: Go language interface to libaudit library
155Summary(pl.UTF-8): Interfejs języka Go do biblioteki libaudit
156License: LGPL v2.1+
157Group: Development/Languages
158Requires: %{name}-libs = %{version}-%{release}
b7895bd5
JB
159%if %{with gccgo}
160Requires: gcc-go >= 5.1
161%else
659527ec 162Requires: golang >= 1.4
b7895bd5 163%endif
49caa03e
JB
164
165%description -n golang-audit
166Go language interface to libaudit library.
167
168%description -n golang-audit -l pl.UTF-8
169Interfejs języka Go do biblioteki libaudit.
170
9ee6c1ce 171%package -n python-audit
659527ec
JB
172Summary: Python 2.x interface to libaudit library
173Summary(pl.UTF-8): Interfejs Pythona 2.x do biblioteki libaudit
ab8f94cb 174License: LGPL v2.1+
9ee6c1ce
JB
175Group: Libraries/Python
176Requires: %{name}-libs = %{version}-%{release}
177
178%description -n python-audit
659527ec 179Python 2.x interface to libaudit library.
9ee6c1ce 180
b27e8f95 181%description -n python-audit -l pl.UTF-8
659527ec 182Interfejs Pythona 2.x do biblioteki libaudit.
9ee6c1ce 183
2d0ad02a 184%package -n python3-audit
659527ec
JB
185Summary: Python 3.x interface to libaudit library
186Summary(pl.UTF-8): Interfejs Pythona 3.x do biblioteki libaudit
2d0ad02a
JR
187License: LGPL v2.1+
188Group: Libraries/Python
189Requires: %{name}-libs = %{version}-%{release}
190
191%description -n python3-audit
659527ec 192Python 3.x interface to libaudit library.
2d0ad02a
JR
193
194%description -n python3-audit -l pl.UTF-8
659527ec 195Interfejs Pythona 3.x do biblioteki libaudit.
2d0ad02a 196
54697230
JB
197%prep
198%setup -q
eb9b3ab9 199%patch0 -p1
1e78f2d9 200%patch1 -p1
61d763d9 201%patch2 -p1
d1e0ebb3 202%patch3 -p1
ffa39469 203%patch4 -p1
0bd7ba4a 204%patch5 -p1
738da8d6
JR
205%patch6 -p1
206%patch7 -p1
5f5ab865 207%patch8 -p1
1dc8b4bb 208%patch9 -p1
1a8b063a 209
68d62ac9 210%if %{without python}
99572413
JP
211sed 's#[^ ]*swig/[^ ]*/Makefile ##g' -i configure.ac
212sed 's/swig//' -i bindings/Makefile.am
57f09668 213%endif
214
54697230
JB
215%build
216%{__libtoolize}
217%{__aclocal}
218%{__autoconf}
219%{__autoheader}
220%{__automake}
cc094a3e 221%configure \
56096462
JP
222 CC_FOR_BUILD="%{__cc}" \
223 CPPFLAGS_FOR_BUILD="%{rpmcppflags}" \
224 CFLAGS_FOR_BUILD="%{rpmcflags}" \
225 LDFLAGS_FOR_BUILD="%{rpmldflags}" \
220b3c30 226 %{?with_kerberos5:--enable-gssapi-krb5} \
ffa39469 227 --enable-systemd \
61d763d9
JB
228 --with-apparmor \
229 --with-libwrap \
d1e0ebb3
JK
230 %{?with_prelude:--with-prelude} \
231 %{!?with_zos_remote:--disable-zos-remote}
54697230 232
738da8d6 233%{__make}
bf2e6acc 234
54697230
JB
235%install
236rm -rf $RPM_BUILD_ROOT
0167336b 237install -d $RPM_BUILD_ROOT{%{_sysconfdir}/audit/rules.d,%{_var}/log/audit}
54697230
JB
238
239%{__make} install \
240 DESTDIR=$RPM_BUILD_ROOT
241
0167336b
JB
242# default to no audit (and no overhead)
243cp -p rules/10-no-audit.rules $RPM_BUILD_ROOT%{_sysconfdir}/audit/rules.d
244
738da8d6
JR
245install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/auditd
246install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/auditd
bf2e6acc 247
54697230
JB
248install -d $RPM_BUILD_ROOT/%{_lib}
249mv -f $RPM_BUILD_ROOT%{_libdir}/libaudit.so.* $RPM_BUILD_ROOT/%{_lib}
fef538cf 250ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libaudit.so.*.*.*) \
1a8b063a 251 $RPM_BUILD_ROOT%{_libdir}/libaudit.so
8ba70267 252mv -f $RPM_BUILD_ROOT%{_libdir}/libauparse.so.* $RPM_BUILD_ROOT/%{_lib}
fef538cf 253ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libauparse.so.*.*.*) \
8ba70267 254 $RPM_BUILD_ROOT%{_libdir}/libauparse.so
54697230 255
738da8d6
JR
256# RH initscripts-specific
257%{__rm} -r $RPM_BUILD_ROOT%{_libexecdir}/initscripts
6c98eb8c 258
3c5110f4 259%if %{with python2}
68d62ac9
JB
260%py_comp $RPM_BUILD_ROOT%{py_sitedir}
261%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
738da8d6 262%py_postclean
68d62ac9 263%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/*.{la,a}
57f09668 264%endif
9ee6c1ce 265
659527ec 266%if %{with python3}
2d0ad02a
JR
267%{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/*.{la,a}
268%endif
269
54697230
JB
270%clean
271rm -rf $RPM_BUILD_ROOT
272
273%post libs -p /sbin/ldconfig
274%postun libs -p /sbin/ldconfig
275
276%post
738da8d6
JR
277# Copy default rules into place on new installation
278if [ ! -e %{_sysconfdir}/audit/audit.rules ] ; then
0167336b 279 cp -a %{_sysconfdir}/audit/rules.d/10-no-audit.rules %{_sysconfdir}/audit/audit.rules
738da8d6 280fi
54697230 281/sbin/chkconfig --add auditd
2a6b8c9c 282%service auditd restart "audit daemon"
7ede5762 283%systemd_post auditd.service
54697230
JB
284
285%preun
286if [ "$1" = "0" ]; then
2a6b8c9c 287 %service auditd stop
54697230
JB
288 /sbin/chkconfig --del auditd
289fi
9a3b9076
BZ
290%systemd_preun auditd.service
291
7ede5762
JR
292%postun
293%systemd_reload
294
54697230
JB
295%files
296%defattr(644,root,root,755)
a32d4fda 297%doc AUTHORS ChangeLog README THANKS rules/{README-rules,*.rules} init.d/auditd.cron
2bfdaebd 298%attr(750,root,root) %{_bindir}/aulast
08b12da9
JB
299%attr(750,root,root) %{_bindir}/aulastlog
300%attr(750,root,root) %{_bindir}/ausyscall
d80f3483 301%attr(750,root,root) %{_bindir}/auvirt
80475ae6 302%attr(750,root,root) %{_sbindir}/audispd
54697230
JB
303%attr(750,root,root) %{_sbindir}/auditctl
304%attr(750,root,root) %{_sbindir}/auditd
896d27e1 305%attr(750,root,root) %{_sbindir}/augenrules
e5a8c0d8 306%attr(750,root,root) %{_sbindir}/aureport
54697230
JB
307%attr(750,root,root) %{_sbindir}/ausearch
308%attr(750,root,root) %{_sbindir}/autrace
08b12da9 309%attr(755,root,root) %{_sbindir}/audisp-remote
ffa39469 310%{?with_zos_remote:%attr(755,root,root) %{_sbindir}/audispd-zos-remote}
0a348a92
JB
311%dir %{_sysconfdir}/audisp
312%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/audispd.conf
08b12da9 313%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/audisp-remote.conf
ffa39469 314%{?with_zos_remote:%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/zos-remote.conf}
0a348a92
JB
315%dir %{_sysconfdir}/audisp/plugins.d
316%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/plugins.d/af_unix.conf
08b12da9 317%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/plugins.d/au-remote.conf
ffa39469 318%{?with_zos_remote:%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/plugins.d/audispd-zos-remote.conf}
0a348a92 319%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/plugins.d/syslog.conf
7630c8d3 320%dir %{_sysconfdir}/audit
9a4de669 321%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audit/audit-stop.rules
7630c8d3 322%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audit/auditd.conf
896d27e1 323%dir %{_sysconfdir}/audit/rules.d
0167336b 324%attr(640,root,root) %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/audit/rules.d/10-no-audit.rules
80475ae6 325%attr(754,root,root) /etc/rc.d/init.d/auditd
f6ae0a53 326%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/auditd
7ede5762 327%{systemdunitdir}/auditd.service
54697230 328%attr(750,root,root) %dir %{_var}/log/audit
0a348a92 329%{_mandir}/man5/audispd.conf.5*
08b12da9 330%{_mandir}/man5/audisp-remote.conf.5*
80475ae6 331%{_mandir}/man5/auditd.conf.5*
526a1f46 332%{_mandir}/man5/ausearch-expression.5*
ffa39469 333%{?with_zos_remote:%{_mandir}/man5/zos-remote.conf.5*}
693afa1c 334%{_mandir}/man7/audit.rules.7*
08b12da9 335%{_mandir}/man8/audisp-remote.8*
ffa39469 336%{?with_zos_remote:%{_mandir}/man8/audispd-zos-remote.8*}
526a1f46
JB
337%{_mandir}/man8/audispd.8*
338%{_mandir}/man8/auditctl.8*
339%{_mandir}/man8/auditd.8*
896d27e1 340%{_mandir}/man8/augenrules.8*
2bfdaebd 341%{_mandir}/man8/aulast.8*
526a1f46
JB
342%{_mandir}/man8/aulastlog.8*
343%{_mandir}/man8/aureport.8*
344%{_mandir}/man8/ausearch.8*
08b12da9 345%{_mandir}/man8/ausyscall.8*
526a1f46 346%{_mandir}/man8/autrace.8*
d80f3483 347%{_mandir}/man8/auvirt.8*
54697230
JB
348
349%files libs
350%defattr(644,root,root,755)
351%attr(755,root,root) /%{_lib}/libaudit.so.*.*.*
82313177 352%attr(755,root,root) %ghost /%{_lib}/libaudit.so.1
8ba70267 353%attr(755,root,root) /%{_lib}/libauparse.so.*.*.*
fef538cf 354%attr(755,root,root) %ghost /%{_lib}/libauparse.so.0
7630c8d3 355%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libaudit.conf
693afa1c 356%{_mandir}/man5/libaudit.conf.5*
54697230
JB
357
358%files libs-devel
359%defattr(644,root,root,755)
360%attr(755,root,root) %{_libdir}/libaudit.so
8ba70267 361%attr(755,root,root) %{_libdir}/libauparse.so
54697230 362%{_libdir}/libaudit.la
8ba70267 363%{_libdir}/libauparse.la
6d3a6f20 364%{_includedir}/auparse*.h
54697230 365%{_includedir}/libaudit.h
49caa03e 366%{_pkgconfigdir}/audit.pc
2d0ad02a 367%{_pkgconfigdir}/auparse.pc
0167336b 368%{_aclocaldir}/audit.m4
526a1f46
JB
369%{_mandir}/man3/audit_*.3*
370%{_mandir}/man3/auparse_*.3*
371%{_mandir}/man3/ausearch_*.3*
372%{_mandir}/man3/get_auditfail_action.3*
373%{_mandir}/man3/set_aumessage_mode.3*
54697230
JB
374
375%files libs-static
376%defattr(644,root,root,755)
377%{_libdir}/libaudit.a
8ba70267 378%{_libdir}/libauparse.a
9ee6c1ce 379
526a1f46
JB
380%if %{with prelude}
381%files plugin-prelude
382%defattr(644,root,root,755)
383%attr(755,root,root) %{_sbindir}/audisp-prelude
384%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/audisp-prelude.conf
385%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/audisp/plugins.d/au-prelude.conf
386%{_mandir}/man5/audisp-prelude.conf.5*
387%{_mandir}/man8/audisp-prelude.8*
388%endif
389
49caa03e
JB
390%if %{with golang}
391%files -n golang-audit
392%defattr(644,root,root,755)
2d0ad02a
JR
393%dir %{_libdir}/golang/src/redhat.com
394%{_libdir}/golang/src/redhat.com/audit
49caa03e
JB
395%endif
396
3c5110f4 397%if %{with python2}
9ee6c1ce
JB
398%files -n python-audit
399%defattr(644,root,root,755)
400%attr(755,root,root) %{py_sitedir}/_audit.so
84214962 401%attr(755,root,root) %{py_sitedir}/auparse.so
4c11c375 402%{py_sitedir}/audit.py[co]
57f09668 403%endif
2d0ad02a
JR
404
405%if %{with python3}
406%files -n python3-audit
407%defattr(644,root,root,755)
408%attr(755,root,root) %{py3_sitedir}/_audit.so
409%attr(755,root,root) %{py3_sitedir}/auparse.so
410%{py3_sitedir}/audit.py
4faf4930 411%{py3_sitedir}/__pycache__/audit.cpython-*.py[co]
2d0ad02a 412%endif
This page took 0.179036 seconds and 4 git commands to generate.