2007-01-15 23:51:54 +01:00
|
|
|
#
|
2009-06-05 22:36:33 +02:00
|
|
|
# spec file for package audit (Version 1.7.13)
|
2007-01-15 23:51:54 +01:00
|
|
|
#
|
2010-01-14 15:25:16 +01:00
|
|
|
# Copyright (c) 2010 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/
|
|
|
|
#
|
|
|
|
|
|
|
|
# norootforbuild
|
|
|
|
|
2008-03-07 20:35:26 +01:00
|
|
|
|
2007-01-15 23:51:54 +01:00
|
|
|
Name: audit
|
2008-09-29 17:28:30 +02:00
|
|
|
BuildRequires: gcc-c++ tcpd-devel
|
2007-01-15 23:51:54 +01:00
|
|
|
Summary: User Space Tools for 2.6 Kernel Auditing
|
2009-06-05 22:36:33 +02:00
|
|
|
Version: 1.7.13
|
2010-01-14 15:25:16 +01:00
|
|
|
Release: 5
|
|
|
|
License: GPLv2+
|
2007-01-15 23:51:54 +01:00
|
|
|
Group: System/Monitoring
|
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-01-14 15:25:16 +01:00
|
|
|
Source3: baselibs.conf
|
2007-07-27 01:18:47 +02:00
|
|
|
Patch0: audit-no_sca.patch
|
|
|
|
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
|
2009-06-29 14:31:39 +02:00
|
|
|
Patch4: audit-as_needed.patch
|
2007-01-15 23:51:54 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
Requires: %{name}-libs = %{version}-%{release}
|
|
|
|
PreReq: %insserv_prereq %fillup_prereq
|
|
|
|
|
|
|
|
%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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Authors:
|
|
|
|
--------
|
|
|
|
Steve Grubb <sgrubb@redhat.com>
|
|
|
|
|
|
|
|
%package libs
|
|
|
|
Summary: Dynamic library for libaudit
|
2010-01-14 15:25:16 +01:00
|
|
|
License: GPLv2+
|
2007-01-15 23:51:54 +01:00
|
|
|
Group: System/Monitoring
|
2008-11-02 15:33:58 +01:00
|
|
|
# bug437293
|
|
|
|
%ifarch ppc64
|
|
|
|
Obsoletes: audit-libs-64bit
|
|
|
|
%endif
|
|
|
|
#
|
2007-01-15 23:51:54 +01:00
|
|
|
|
|
|
|
%description libs
|
|
|
|
The audit-libs package contains the dynamic libraries needed for
|
|
|
|
applications to use the audit framework.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Authors:
|
|
|
|
--------
|
|
|
|
Steve Grubb <sgrubb@redhat.com>
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: Header files and static library for libaudit
|
2010-01-14 15:25:16 +01:00
|
|
|
License: LGPLv2.1+
|
2008-03-28 15:45:19 +01:00
|
|
|
Group: Development/Libraries/C and C++
|
2009-11-16 09:56:53 +01:00
|
|
|
Requires: %{name}-libs = %{version} glibc-devel
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Authors:
|
|
|
|
--------
|
|
|
|
Steve Grubb <sgrubb@redhat.com>
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
%patch0 -p1
|
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
|
2009-06-29 14:31:39 +02:00
|
|
|
%patch4
|
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"
|
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 \
|
|
|
|
--libdir=/%{_lib} --libexecdir=%{_prefix}/lib/%{name} \
|
|
|
|
--with-apparmor --with-libwrap \
|
|
|
|
--disable-static --with-pic
|
|
|
|
%{__make} %{?jobs:-j%jobs}
|
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}
|
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
|
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
|
2008-03-28 15:45:19 +01:00
|
|
|
# For %ghost below, so that old location files will still be there when
|
2007-01-15 23:51:54 +01:00
|
|
|
# %post copy runs
|
|
|
|
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
|
2007-01-15 23:51:54 +01:00
|
|
|
|
2008-09-29 17:28:30 +02:00
|
|
|
%check
|
|
|
|
make check
|
|
|
|
|
2007-01-15 23:51:54 +01:00
|
|
|
%clean
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
%post libs -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%postun libs -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%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}
|
|
|
|
|
|
|
|
%files libs
|
|
|
|
%defattr(-,root,root)
|
|
|
|
/%{_lib}/libaudit.*
|
2007-05-06 17:10:42 +02:00
|
|
|
/%{_lib}/libauparse.*
|
2007-01-15 23:51:54 +01:00
|
|
|
%config(noreplace) %attr(640,root,root) /etc/libaudit.conf
|
|
|
|
|
|
|
|
%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
|
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
|
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
|