2007-01-15 23:51:54 +01:00
|
|
|
#
|
2011-02-21 14:53:49 +01:00
|
|
|
# spec file for package audit
|
2007-01-15 23:51:54 +01:00
|
|
|
#
|
2012-02-29 19:06:19 +01:00
|
|
|
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2007-01-15 23:51:54 +01:00
|
|
|
#
|
2008-08-06 01:41:00 +02:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2007-01-15 23:51:54 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
Name: audit
|
2012-02-29 19:06:19 +01:00
|
|
|
BuildRequires: gcc-c++
|
2010-05-05 20:41:24 +02:00
|
|
|
BuildRequires: kernel-headers >= 2.6.29
|
2011-10-02 17:39:13 +02:00
|
|
|
BuildRequires: libtool
|
2012-02-29 19:06:19 +01:00
|
|
|
BuildRequires: tcpd-devel
|
2007-01-15 23:51:54 +01:00
|
|
|
Summary: User Space Tools for 2.6 Kernel Auditing
|
2012-02-29 19:06:19 +01:00
|
|
|
License: GPL-2.0+
|
2007-01-15 23:51:54 +01:00
|
|
|
Group: System/Monitoring
|
2012-02-29 19:06:19 +01:00
|
|
|
Version: 2.1.3
|
|
|
|
Release: 0
|
2007-10-11 18:47:28 +02:00
|
|
|
Url: http://people.redhat.com/sgrubb/audit/
|
2008-03-28 15:45:19 +01:00
|
|
|
Source0: %{name}-%{version}.tar.bz2
|
2007-01-15 23:51:54 +01:00
|
|
|
Source1: auditd.init
|
|
|
|
Source2: auditd.sysconfig
|
2010-05-05 20:41:23 +02:00
|
|
|
Source3: baselibs.conf
|
2010-06-25 23:50:35 +02:00
|
|
|
Source4: README-BEFORE-ADDING-PATCHES
|
2007-07-27 01:18:47 +02:00
|
|
|
Patch1: audit-no_python.patch
|
2008-03-28 15:45:19 +01:00
|
|
|
Patch2: audit-no_plugins.patch
|
2008-09-29 17:28:30 +02:00
|
|
|
Patch3: audit-no-gss.patch
|
2007-01-15 23:51:54 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2010-05-05 20:41:24 +02:00
|
|
|
Requires: %{name}-libs = %{version}
|
2010-12-08 19:45:55 +01:00
|
|
|
PreReq: %insserv_prereq %fillup_prereq sysvinit(syslog)
|
2007-01-15 23:51:54 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
The audit package contains the user space utilities for storing and
|
|
|
|
processing the audit records generated by the audit subsystem in the
|
|
|
|
Linux 2.6 kernel.
|
|
|
|
|
2010-05-05 20:41:24 +02:00
|
|
|
%package -n libaudit1
|
2007-01-15 23:51:54 +01:00
|
|
|
Summary: Dynamic library for libaudit
|
2012-02-29 19:06:19 +01:00
|
|
|
License: LGPL-2.1+
|
2007-01-15 23:51:54 +01:00
|
|
|
Group: System/Monitoring
|
2010-05-05 20:41:24 +02:00
|
|
|
Obsoletes: %{name}-libs < 2.0.4
|
|
|
|
Provides: %{name}-libs = %{version}
|
2007-01-15 23:51:54 +01:00
|
|
|
|
2010-05-05 20:41:24 +02:00
|
|
|
%description -n libaudit1
|
|
|
|
The libaudit package contains the dynamic libraries needed for
|
2007-01-15 23:51:54 +01:00
|
|
|
applications to use the audit framework.
|
|
|
|
|
2010-05-05 20:41:24 +02:00
|
|
|
%package -n libauparse0
|
|
|
|
Summary: Dynamic library for libauparse
|
2012-02-29 19:06:19 +01:00
|
|
|
License: LGPL-2.1+
|
2010-05-05 20:41:24 +02:00
|
|
|
Group: System/Monitoring
|
2007-01-15 23:51:54 +01:00
|
|
|
|
2010-05-05 20:41:24 +02:00
|
|
|
%description -n libauparse0
|
|
|
|
The libauparse package contains the dynamic libraries needed to
|
|
|
|
parse audit records.
|
2007-01-15 23:51:54 +01:00
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: Header files and static library for libaudit
|
2012-02-29 19:06:19 +01:00
|
|
|
License: LGPL-2.1+
|
2008-03-28 15:45:19 +01:00
|
|
|
Group: Development/Libraries/C and C++
|
2010-05-05 20:41:24 +02:00
|
|
|
Requires: libaudit1 = %{version}
|
|
|
|
Requires: libauparse0 = %{version}
|
2007-01-15 23:51:54 +01:00
|
|
|
|
|
|
|
%description devel
|
|
|
|
The audit-devel package contains the static libraries and header files
|
|
|
|
needed for developing applications that need to use the audit framework
|
|
|
|
libraries.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
2007-07-27 01:18:47 +02:00
|
|
|
%patch1 -p1
|
2008-03-15 12:00:55 +01:00
|
|
|
%patch2 -p1
|
2008-09-29 17:28:30 +02:00
|
|
|
%patch3 -p1
|
2007-01-15 23:51:54 +01:00
|
|
|
|
|
|
|
%build
|
2008-03-19 11:57:31 +01:00
|
|
|
autoreconf -fi
|
2007-01-15 23:51:54 +01:00
|
|
|
export CFLAGS="%{optflags} -fno-strict-aliasing"
|
|
|
|
export CXXFLAGS="$CFLAGS"
|
2010-11-09 13:34:18 +01:00
|
|
|
export LDFLAGS="-Wl,-z,relro,-z,now"
|
2009-06-05 22:36:33 +02:00
|
|
|
# no krb support (omit --enable-gssapi-krb5=yes), see audit-no-gss.patch
|
2009-11-16 09:56:53 +01:00
|
|
|
%configure --sbindir=/sbin \
|
2010-05-05 20:41:24 +02:00
|
|
|
--libdir=/%{_lib} --libexecdir=%{_prefix}/lib/%{name} \
|
|
|
|
--with-apparmor --with-libwrap --with-libcap-ng=yes \
|
|
|
|
--disable-static --with-pic
|
2010-07-30 12:34:44 +02:00
|
|
|
%{__make} %{?_smp_mflags}
|
2007-01-15 23:51:54 +01:00
|
|
|
|
|
|
|
%install
|
2007-05-06 17:10:42 +02:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/{sbin,etc/{sysconfig,audispd/plugins.d,init.d}}
|
2007-01-15 23:51:54 +01:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/usr/sbin
|
2008-03-28 15:45:19 +01:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{_mandir}/{man5,man8}
|
2007-01-15 23:51:54 +01:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{_lib}/security
|
|
|
|
make DESTDIR=$RPM_BUILD_ROOT install
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{_includedir}
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{_libdir}
|
|
|
|
# We manually install this since Makefile doesn't
|
|
|
|
install -m 0644 lib/libaudit.h $RPM_BUILD_ROOT/%{_includedir}
|
2010-05-05 20:41:24 +02:00
|
|
|
|
2009-11-16 09:56:53 +01:00
|
|
|
for libname in libaudit libauparse;do
|
|
|
|
%{__ln_s} -v /%{_lib}/$(readlink %{buildroot}/%{_lib}/$libname.so) %{buildroot}%{_libdir}/$libname.so
|
|
|
|
%{__rm} -v %{buildroot}/%{_lib}/$libname.{so,la}
|
|
|
|
done
|
2010-05-05 20:41:24 +02:00
|
|
|
|
2007-01-15 23:51:54 +01:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates
|
|
|
|
cp %{SOURCE2} $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.auditd
|
|
|
|
# delete redhat script, use ours
|
|
|
|
rm -rf $RPM_BUILD_ROOT/etc/sysconfig/auditd
|
|
|
|
rm -rf $RPM_BUILD_ROOT/etc/init.d/auditd
|
|
|
|
rm -rf $RPM_BUILD_ROOT/etc/rc.d/init.d
|
|
|
|
install -c -m 755 %{SOURCE1} $RPM_BUILD_ROOT/etc/init.d/auditd
|
|
|
|
ln -s /etc/init.d/auditd $RPM_BUILD_ROOT/sbin/rcauditd
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/var/log/audit/
|
|
|
|
touch $RPM_BUILD_ROOT/var/log/audit/audit.log
|
2011-04-28 02:17:07 +02:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/var/spool/audit/
|
|
|
|
# For ghost below, so that old location files will still be there when
|
|
|
|
# post copy runs
|
2007-01-15 23:51:54 +01:00
|
|
|
touch $RPM_BUILD_ROOT/etc/{auditd.conf,audit.rules}
|
2007-05-06 17:10:42 +02:00
|
|
|
# On platforms with 32 & 64 bit libs, we need to coordinate the timestamp
|
|
|
|
touch -r ./audit.spec $RPM_BUILD_ROOT/etc/libaudit.conf
|
2010-05-05 20:41:23 +02:00
|
|
|
|
2008-09-29 17:28:30 +02:00
|
|
|
%check
|
|
|
|
make check
|
|
|
|
|
2010-05-05 20:41:24 +02:00
|
|
|
%post -n libaudit1 -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%post -n libauparse0 -p /sbin/ldconfig
|
2007-01-15 23:51:54 +01:00
|
|
|
|
2010-05-05 20:41:24 +02:00
|
|
|
%postun -n libaudit1 -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%postun -n libauparse0 -p /sbin/ldconfig
|
2007-01-15 23:51:54 +01:00
|
|
|
|
|
|
|
%post
|
|
|
|
%{fillup_and_insserv -yn auditd auditd}
|
|
|
|
# Save existing audit files if any (from old location)
|
|
|
|
if [ -f /etc/auditd.conf ]; then
|
|
|
|
mv /etc/audit/auditd.conf /etc/audit/auditd.conf.new
|
|
|
|
mv /etc/auditd.conf /etc/audit/auditd.conf
|
|
|
|
fi
|
|
|
|
if [ -f /etc/audit.rules ]; then
|
|
|
|
mv /etc/audit/audit.rules /etc/audit/audit.rules.new
|
|
|
|
mv /etc/audit.rules /etc/audit/audit.rules
|
|
|
|
fi
|
|
|
|
|
|
|
|
%preun
|
|
|
|
%stop_on_removal auditd
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%restart_on_update auditd
|
|
|
|
%{insserv_cleanup}
|
|
|
|
|
2010-05-05 20:41:24 +02:00
|
|
|
%files -n libaudit1
|
2007-01-15 23:51:54 +01:00
|
|
|
%defattr(-,root,root)
|
|
|
|
/%{_lib}/libaudit.*
|
2010-05-05 20:41:23 +02:00
|
|
|
%config(noreplace) %attr(640,root,root) /etc/libaudit.conf
|
2010-05-05 20:41:24 +02:00
|
|
|
%{_mandir}/man5/libaudit.conf.5*
|
|
|
|
|
|
|
|
%files -n libauparse0
|
|
|
|
%defattr(-,root,root)
|
|
|
|
/%{_lib}/libauparse.*
|
2007-01-15 23:51:54 +01:00
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root)
|
2008-03-28 15:45:19 +01:00
|
|
|
%doc contrib/skeleton.c contrib/plugin
|
2007-01-15 23:51:54 +01:00
|
|
|
%{_libdir}/libaudit.*
|
2007-05-06 17:10:42 +02:00
|
|
|
%{_libdir}/libauparse.*
|
2007-01-15 23:51:54 +01:00
|
|
|
%{_includedir}/libaudit.h
|
2007-05-06 17:10:42 +02:00
|
|
|
%{_includedir}/auparse.h
|
|
|
|
%{_includedir}/auparse-defs.h
|
2007-01-15 23:51:54 +01:00
|
|
|
%{_mandir}/man3/*
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root,-)
|
2008-06-25 18:53:54 +02:00
|
|
|
%doc README COPYING ChangeLog contrib/capp.rules contrib/nispom.rules contrib/lspp.rules contrib/stig.rules init.d/auditd.cron
|
2008-03-28 15:45:19 +01:00
|
|
|
%attr(644,root,root) %{_mandir}/man8/audispd.8.gz
|
|
|
|
%attr(644,root,root) %{_mandir}/man8/auditctl.8.gz
|
|
|
|
%attr(644,root,root) %{_mandir}/man8/auditd.8.gz
|
|
|
|
%attr(644,root,root) %{_mandir}/man8/aureport.8.gz
|
|
|
|
%attr(644,root,root) %{_mandir}/man8/ausearch.8.gz
|
|
|
|
%attr(644,root,root) %{_mandir}/man8/autrace.8.gz
|
2009-06-05 22:36:33 +02:00
|
|
|
%attr(644,root,root) %{_mandir}/man8/aulast.8.gz
|
2008-03-28 15:45:19 +01:00
|
|
|
%attr(644,root,root) %{_mandir}/man8/aulastlog.8.gz
|
2008-06-25 18:53:54 +02:00
|
|
|
%attr(644,root,root) %{_mandir}/man8/ausyscall.8.gz
|
2010-05-05 20:41:24 +02:00
|
|
|
%attr(644,root,root) %{_mandir}/man7/audit.rules.7.gz
|
2008-03-28 15:45:19 +01:00
|
|
|
%attr(644,root,root) %{_mandir}/man5/auditd.conf.5.gz
|
|
|
|
%attr(644,root,root) %{_mandir}/man5/audispd.conf.5.gz
|
2008-09-29 17:28:30 +02:00
|
|
|
%attr(644,root,root) %{_mandir}/man5/ausearch-expression.5.gz
|
2007-01-15 23:51:54 +01:00
|
|
|
%attr(750,root,root) /sbin/auditctl
|
|
|
|
%attr(750,root,root) /sbin/auditd
|
2007-05-06 17:10:42 +02:00
|
|
|
%attr(755,root,root) /sbin/ausearch
|
2007-01-15 23:51:54 +01:00
|
|
|
%attr(750,root,root) /sbin/rcauditd
|
|
|
|
%attr(750,root,root) /sbin/autrace
|
2007-05-06 17:10:42 +02:00
|
|
|
%attr(750,root,root) /sbin/audispd
|
2009-06-05 22:36:33 +02:00
|
|
|
%attr(755,root,root) /usr/bin/aulast
|
|
|
|
%attr(755,root,root) /usr/bin/aulastlog
|
2008-06-25 18:53:54 +02:00
|
|
|
%attr(755,root,root) /usr/bin/ausyscall
|
2007-05-06 17:10:42 +02:00
|
|
|
%attr(755,root,root) /sbin/aureport
|
2007-01-15 23:51:54 +01:00
|
|
|
/etc/init.d/auditd
|
|
|
|
%dir %attr(750,root,root) /etc/audit
|
2007-10-11 18:47:28 +02:00
|
|
|
%attr(750,root,root) %dir /etc/audisp
|
|
|
|
%attr(750,root,root) %dir /etc/audisp/plugins.d
|
2008-03-28 15:45:19 +01:00
|
|
|
%config(noreplace) %attr(640,root,root) /etc/audisp/plugins.d/af_unix.conf
|
|
|
|
%config(noreplace) %attr(640,root,root) /etc/audisp/plugins.d/syslog.conf
|
2007-01-15 23:51:54 +01:00
|
|
|
%ghost /etc/auditd.conf
|
|
|
|
%ghost /etc/audit.rules
|
|
|
|
%config(noreplace) %attr(640,root,root) /etc/audit/auditd.conf
|
|
|
|
%config(noreplace) %attr(640,root,root) /etc/audit/audit.rules
|
2007-10-11 18:47:28 +02:00
|
|
|
%config(noreplace) %attr(640,root,root) /etc/audisp/audispd.conf
|
2007-01-15 23:51:54 +01:00
|
|
|
/var/adm/fillup-templates/sysconfig.auditd
|
|
|
|
%dir %attr(700,root,root) /var/log/audit
|
2007-07-12 03:01:37 +02:00
|
|
|
%ghost %config(noreplace) /var/log/audit/audit.log
|
2011-04-28 02:17:07 +02:00
|
|
|
%dir %attr(700,root,root) /var/spool/audit
|
2008-06-25 18:53:54 +02:00
|
|
|
%attr(755,root,root) /usr/bin/ausyscall
|
2008-03-07 20:35:26 +01:00
|
|
|
|
2007-05-06 17:10:42 +02:00
|
|
|
%changelog
|