859841
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
859841
859841
# Do we want systemd?
859841
%define WITH_SYSTEMD 1
859841
859841
Summary: User space tools for 2.6 kernel auditing
859841
Name: audit
859841
Version: 2.4
859841
Release: 1%{?dist}
859841
License: GPLv2+
859841
Group: System Environment/Daemons
859841
URL: http://people.redhat.com/sgrubb/audit/
859841
Source0: http://people.redhat.com/sgrubb/audit/%{name}-%{version}.tar.gz
859841
# Default to using augenrules to create audit.rules
859841
Patch1: audit-2.3.3-augenrules.patch
859841
# Adjust beginning user id's to 1000
859841
Patch2: audit-2.3.3-uid-1000.patch
859841
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
859841
BuildRequires: swig python-devel
859841
BuildRequires: tcp_wrappers-devel krb5-devel libcap-ng-devel
859841
BuildRequires: kernel-headers >= 2.6.29
859841
%ifnarch aarch64 ppc %{power64} s390 s390x %{ix86}
859841
BuildRequires: golang
859841
%endif
859841
Requires: %{name}-libs = %{version}-%{release}
859841
%if %{WITH_SYSTEMD}
859841
BuildRequires: systemd-units
859841
Requires(post): systemd-units systemd-sysv chkconfig coreutils
859841
Requires(preun): systemd-units
859841
Requires(postun): systemd-units coreutils
859841
%else
859841
Requires: chkconfig
859841
%endif
859841
859841
%description
859841
The audit package contains the user space utilities for
859841
storing and searching the audit records generate by
859841
the audit subsystem in the Linux 2.6 kernel.
859841
859841
%package libs
859841
Summary: Dynamic library for libaudit
859841
License: LGPLv2+
859841
Group: Development/Libraries
859841
859841
%description libs
859841
The audit-libs package contains the dynamic libraries needed for 
859841
applications to use the audit framework.
859841
859841
%package libs-devel
859841
Summary: Header files for libaudit
859841
License: LGPLv2+
859841
Group: Development/Libraries
859841
Requires: %{name}-libs = %{version}
859841
Requires: kernel-headers >= 2.6.29
859841
859841
%description libs-devel
859841
The audit-libs-devel package contains the header files needed for
859841
developing applications that need to use the audit framework libraries.
859841
859841
%package libs-static
859841
Summary: Static version of libaudit library
859841
License: LGPLv2+
859841
Group: Development/Libraries
859841
Requires: kernel-headers >= 2.6.29
859841
859841
%description libs-static
859841
The audit-libs-static package contains the static libraries
859841
needed for developing applications that need to use static audit
859841
framework libraries
859841
859841
%package libs-python
859841
Summary: Python bindings for libaudit
859841
License: LGPLv2+
859841
Group: Development/Libraries
859841
Requires: %{name}-libs = %{version}-%{release}
859841
859841
%description libs-python
859841
The audit-libs-python package contains the bindings so that libaudit
859841
and libauparse can be used by python.
859841
859841
%package -n audispd-plugins
859841
Summary: Plugins for the audit event dispatcher
859841
License: GPLv2+
859841
Group: System Environment/Daemons
859841
BuildRequires: openldap-devel
859841
Requires: %{name} = %{version}-%{release}
859841
Requires: %{name}-libs = %{version}-%{release}
859841
Requires: openldap
859841
859841
%description -n audispd-plugins
859841
The audispd-plugins package provides plugins for the real-time
859841
interface to the audit system, audispd. These plugins can do things
859841
like relay events to remote machines or analyze events for suspicious
859841
behavior.
859841
859841
%prep
859841
%setup -q
859841
# augenrules
859841
%patch1 -p1
859841
# uid 1000
859841
%patch2 -p1
859841
859841
%build
859841
%configure --sbindir=/sbin --libdir=/%{_lib} --with-python=yes --with-libwrap --enable-gssapi-krb5=yes --with-libcap-ng=yes --with-arm --with-aarch64 \
859841
%ifnarch aarch64 ppc %{power64} s390 s390x %{ix86}
859841
           --with-golang \
859841
%endif
859841
%if %{WITH_SYSTEMD}
859841
	--enable-systemd
859841
%endif
859841
859841
make %{?_smp_mflags}
859841
859841
%install
859841
rm -rf $RPM_BUILD_ROOT
859841
mkdir -p $RPM_BUILD_ROOT/{sbin,etc/audispd/plugins.d}
859841
%if !%{WITH_SYSTEMD}
859841
mkdir -p $RPM_BUILD_ROOT/{etc/{sysconfig,rc.d/init.d}}
859841
%endif
859841
mkdir -p $RPM_BUILD_ROOT/%{_mandir}/{man5,man8}
859841
mkdir -p $RPM_BUILD_ROOT/%{_lib}
859841
mkdir -p $RPM_BUILD_ROOT/%{_libdir}/audit
859841
mkdir -p $RPM_BUILD_ROOT/%{_var}/log/audit
859841
mkdir -p $RPM_BUILD_ROOT/%{_var}/spool/audit
859841
make DESTDIR=$RPM_BUILD_ROOT install
859841
859841
mkdir -p $RPM_BUILD_ROOT/%{_libdir}
859841
# This winds up in the wrong place when libtool is involved
859841
mv $RPM_BUILD_ROOT/%{_lib}/libaudit.a $RPM_BUILD_ROOT%{_libdir}
859841
mv $RPM_BUILD_ROOT/%{_lib}/libauparse.a $RPM_BUILD_ROOT%{_libdir}
859841
curdir=`pwd`
859841
cd $RPM_BUILD_ROOT/%{_libdir}
859841
LIBNAME=`basename \`ls $RPM_BUILD_ROOT/%{_lib}/libaudit.so.1.*.*\``
859841
ln -s ../../%{_lib}/$LIBNAME libaudit.so
859841
LIBNAME=`basename \`ls $RPM_BUILD_ROOT/%{_lib}/libauparse.so.0.*.*\``
859841
ln -s ../../%{_lib}/$LIBNAME libauparse.so
859841
cd $curdir
859841
# Remove these items so they don't get picked up.
859841
rm -f $RPM_BUILD_ROOT/%{_lib}/libaudit.so
859841
rm -f $RPM_BUILD_ROOT/%{_lib}/libauparse.so
859841
rm -f $RPM_BUILD_ROOT/%{_lib}/libaudit.la
859841
rm -f $RPM_BUILD_ROOT/%{_lib}/libauparse.la
859841
rm -f $RPM_BUILD_ROOT/%{_libdir}/python?.?/site-packages/_audit.a
859841
rm -f $RPM_BUILD_ROOT/%{_libdir}/python?.?/site-packages/_audit.la
859841
rm -f $RPM_BUILD_ROOT/%{_libdir}/python?.?/site-packages/_auparse.a
859841
rm -f $RPM_BUILD_ROOT/%{_libdir}/python?.?/site-packages/_auparse.la
859841
rm -f $RPM_BUILD_ROOT/%{_libdir}/python?.?/site-packages/auparse.a
859841
rm -f $RPM_BUILD_ROOT/%{_libdir}/python?.?/site-packages/auparse.la
859841
859841
# Move the pkgconfig file
859841
mv $RPM_BUILD_ROOT/%{_lib}/pkgconfig $RPM_BUILD_ROOT%{_libdir}
859841
859841
# On platforms with 32 & 64 bit libs, we need to coordinate the timestamp
859841
touch -r ./audit.spec $RPM_BUILD_ROOT/etc/libaudit.conf
859841
touch -r ./audit.spec $RPM_BUILD_ROOT/usr/share/man/man5/libaudit.conf.5.gz
859841
859841
%ifnarch aarch64 ppc %{power64} s390 s390x
859841
%check
859841
make check
859841
%endif
859841
859841
%clean
859841
rm -rf $RPM_BUILD_ROOT
859841
859841
%post libs -p /sbin/ldconfig
859841
859841
%post
859841
# Copy default rules into place on new installation
859841
if [ ! -e /etc/audit/audit.rules ] ; then
859841
	cp /etc/audit/rules.d/audit.rules /etc/audit/audit.rules
859841
fi
859841
%if %{WITH_SYSTEMD}
859841
%systemd_post auditd.service
859841
%else
859841
/sbin/chkconfig --add auditd
859841
%endif
859841
859841
%preun
859841
%if %{WITH_SYSTEMD}
859841
%systemd_preun auditd.service
859841
%else
859841
if [ $1 -eq 0 ]; then
859841
   /sbin/service auditd stop > /dev/null 2>&1
859841
   /sbin/chkconfig --del auditd
859841
fi
859841
%endif
859841
859841
%postun libs -p /sbin/ldconfig
859841
859841
%postun
859841
if [ $1 -ge 1 ]; then
859841
   /sbin/service auditd condrestart > /dev/null 2>&1 || :
859841
fi
859841
859841
%files libs
859841
%defattr(-,root,root,-)
859841
/%{_lib}/libaudit.so.1*
859841
/%{_lib}/libauparse.*
859841
%config(noreplace) %attr(640,root,root) /etc/libaudit.conf
859841
%{_mandir}/man5/libaudit.conf.5.gz
859841
859841
%files libs-devel
859841
%defattr(-,root,root,-)
859841
%doc contrib/skeleton.c contrib/plugin
859841
%{_libdir}/libaudit.so
859841
%{_libdir}/libauparse.so
859841
%ifnarch aarch64 ppc %{power64} s390 s390x %{ix86}
859841
%dir %{_prefix}/lib/golang/src/pkg/redhat.com/audit
859841
%{_prefix}/lib/golang/src/pkg/redhat.com/audit/audit.go
859841
%endif
859841
%{_includedir}/libaudit.h
859841
%{_includedir}/auparse.h
859841
%{_includedir}/auparse-defs.h
859841
%{_libdir}/pkgconfig/audit.pc
859841
%{_mandir}/man3/*
859841
859841
%files libs-static
859841
%defattr(-,root,root,-)
859841
%{_libdir}/libaudit.a
859841
%{_libdir}/libauparse.a
859841
859841
%files libs-python
859841
%defattr(-,root,root,-)
859841
%attr(755,root,root) %{python_sitearch}/_audit.so
859841
%attr(755,root,root) %{python_sitearch}/auparse.so
859841
%{python_sitearch}/audit.py*
859841
859841
%files
859841
%defattr(-,root,root,-)
859841
%doc  README COPYING ChangeLog contrib/capp.rules contrib/nispom.rules contrib/lspp.rules contrib/stig.rules init.d/auditd.cron
859841
%attr(644,root,root) %{_mandir}/man8/audispd.8.gz
859841
%attr(644,root,root) %{_mandir}/man8/auditctl.8.gz
859841
%attr(644,root,root) %{_mandir}/man8/auditd.8.gz
859841
%attr(644,root,root) %{_mandir}/man8/aureport.8.gz
859841
%attr(644,root,root) %{_mandir}/man8/ausearch.8.gz
859841
%attr(644,root,root) %{_mandir}/man8/autrace.8.gz
859841
%attr(644,root,root) %{_mandir}/man8/aulast.8.gz
859841
%attr(644,root,root) %{_mandir}/man8/aulastlog.8.gz
859841
%attr(644,root,root) %{_mandir}/man8/auvirt.8.gz
859841
%attr(644,root,root) %{_mandir}/man8/augenrules.8.gz
859841
%attr(644,root,root) %{_mandir}/man8/ausyscall.8.gz
859841
%attr(644,root,root) %{_mandir}/man7/audit.rules.7.gz
859841
%attr(644,root,root) %{_mandir}/man5/auditd.conf.5.gz
859841
%attr(644,root,root) %{_mandir}/man5/audispd.conf.5.gz
859841
%attr(644,root,root) %{_mandir}/man5/ausearch-expression.5.gz
859841
%attr(750,root,root) /sbin/auditctl
859841
%attr(750,root,root) /sbin/auditd
859841
%attr(755,root,root) /sbin/ausearch
859841
%attr(755,root,root) /sbin/aureport
859841
%attr(750,root,root) /sbin/autrace
859841
%attr(750,root,root) /sbin/audispd
859841
%attr(750,root,root) /sbin/augenrules
859841
%attr(755,root,root) %{_bindir}/aulast
859841
%attr(755,root,root) %{_bindir}/aulastlog
859841
%attr(755,root,root) %{_bindir}/ausyscall
859841
%attr(755,root,root) %{_bindir}/auvirt
859841
%if %{WITH_SYSTEMD}
859841
%attr(640,root,root) %{_unitdir}/auditd.service
859841
%attr(750,root,root) %dir %{_libexecdir}/initscripts/legacy-actions/auditd
859841
%attr(750,root,root) %{_libexecdir}/initscripts/legacy-actions/auditd/resume
859841
%attr(750,root,root) %{_libexecdir}/initscripts/legacy-actions/auditd/rotate
859841
%attr(750,root,root) %{_libexecdir}/initscripts/legacy-actions/auditd/stop
859841
%attr(750,root,root) %{_libexecdir}/initscripts/legacy-actions/auditd/restart
859841
%attr(750,root,root) %{_libexecdir}/initscripts/legacy-actions/auditd/condrestart
859841
%else
859841
%attr(755,root,root) /etc/rc.d/init.d/auditd
859841
%config(noreplace) %attr(640,root,root) /etc/sysconfig/auditd
859841
%endif
859841
%attr(750,root,root) %dir %{_var}/log/audit
859841
%attr(750,root,root) %dir /etc/audit
859841
%attr(750,root,root) %dir /etc/audit/rules.d
859841
%attr(750,root,root) %dir /etc/audisp
859841
%attr(750,root,root) %dir /etc/audisp/plugins.d
859841
%config(noreplace) %attr(640,root,root) /etc/audit/auditd.conf
859841
%config(noreplace) %attr(640,root,root) /etc/audit/rules.d/audit.rules
859841
%config(noreplace) %attr(640,root,root) /etc/audisp/audispd.conf
859841
%config(noreplace) %attr(640,root,root) /etc/audisp/plugins.d/af_unix.conf
859841
%config(noreplace) %attr(640,root,root) /etc/audisp/plugins.d/syslog.conf
859841
859841
%files -n audispd-plugins
859841
%defattr(-,root,root,-)
859841
%attr(644,root,root) %{_mandir}/man8/audispd-zos-remote.8.gz
859841
%attr(644,root,root) %{_mandir}/man5/zos-remote.conf.5.gz
859841
%config(noreplace) %attr(640,root,root) /etc/audisp/plugins.d/audispd-zos-remote.conf
859841
%config(noreplace) %attr(640,root,root) /etc/audisp/zos-remote.conf
859841
%attr(750,root,root) /sbin/audispd-zos-remote
859841
%config(noreplace) %attr(640,root,root) /etc/audisp/audisp-remote.conf
859841
%config(noreplace) %attr(640,root,root) /etc/audisp/plugins.d/au-remote.conf
859841
%attr(750,root,root) /sbin/audisp-remote
859841
%attr(700,root,root) %dir %{_var}/spool/audit
859841
%attr(644,root,root) %{_mandir}/man5/audisp-remote.conf.5.gz
859841
%attr(644,root,root) %{_mandir}/man8/audisp-remote.8.gz
859841
859841
%changelog
859841
* Thu Sep 18 2014 Steve Grubb <sgrubb@redhat.com> 2.4-1
859841
resolves: #1115196 - Add golang bindings for libaudit
859841
resolves: #1105150 - audispd config file parser fails on long input
859841
resolves: #1104973 - auparse truncating selinux context after first category
859841
resolves: #1088593 - auditctl man page examples use deprecated syscalls
859841
resolves: #1087849 - support for setting loginuid immutable
859841
resolves: #1073063 - AUDIT_SECCOMP events syscall field is not interpretted
859841
resolves: #975796  - confusing aulast records for bad logins
859841
859841
* Tue Mar 18 2014 Steve Grubb <sgrubb@redhat.com> 2.3.3-4
859841
resolves: #1077249 - Audit update, various issues
859841
859841
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 2.3.3-3
859841
- Mass rebuild 2014-01-24
859841
859841
* Mon Jan 20 2014 Steve Grubb <sgrubb@redhat.com> 2.3.3-2
859841
- New upstream bugfix/enhancement release
859841
resolves: #1053804 - ausearch issues found by ausearch-test
859841
resolves: #1030409 - ausearch help typo for "-x" option
859841
859841
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 2.3.2-4
859841
- Mass rebuild 2013-12-27
859841
859841
* Thu Oct 03 2013 Steve Grubb <sgrubb@redhat.com> 2.3.2-3
859841
resolves: #828495 - semanage port should generate an audit event
859841
859841
* Thu Aug 29 2013 Steve Grubb <sgrubb@redhat.com> 2.3.2-2
859841
resolves: #991056 - ausearch ignores USER events with -ua option
859841
859841
* Mon Jul 29 2013 Steve Grubb <sgrubb@redhat.com> 2.3.2-1
859841
- New upstream bugfix/enhancement release
859841
resolves: #982112 Add delay between stopping and starting auditd
859841
859841
* Wed Jul 10 2013 Steve Grubb <sgrubb@redhat.com> 2.3.1-4
859841
resolves: #982112 Add delay between stopping and starting auditd
859841
859841
* Wed Jul 03 2013 Steve Grubb <sgrubb@redhat.com> 2.3.1-3
859841
- Remove prelude support
859841
859841
* Fri May 31 2013 Steve Grubb <sgrubb@redhat.com> 2.3.1-2
859841
- Fix unknown lvalue in auditd.service (#969345)
859841
859841
* Thu May 30 2013 Steve Grubb <sgrubb@redhat.com> 2.3.1-1
859841
- New upstream bugfix/enhancement release
859841
859841
* Fri May 03 2013 Steve Grubb <sgrubb@redhat.com> 2.3-2
859841
- If no rules exist, copy shipped rules into place
859841
859841
* Tue Apr 30 2013 Steve Grubb <sgrubb@redhat.com> 2.3-1
859841
- New upstream bugfix release
859841
859841
* Thu Mar 21 2013 Steve Grubb <sgrubb@redhat.com> 2.2.3-2
859841
- Fix clone syscall interpretation
859841
859841
* Tue Mar 19 2013 Steve Grubb <sgrubb@redhat.com> 2.2.3-1
859841
- New upstream bugfix release
859841
859841
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.2-5
859841
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
859841
859841
* Wed Jan 16 2013 Steve Grubb <sgrubb@redhat.com> 2.2.2-4
859841
- Don't make auditd.service file executable (#896113)
859841
859841
* Fri Jan 11 2013 Steve Grubb <sgrubb@redhat.com> 2.2.2-3
859841
- Do not own /usr/lib64/audit
859841
859841
* Wed Dec 12 2012 Steve Grubb <sgrubb@redhat.com> 2.2.2-2
859841
- New upstream release
859841
859841
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.1-2
859841
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
859841
859841
* Fri Mar 23 2012 Steve Grubb <sgrubb@redhat.com> 2.2.1-1
859841
- New upstream release
859841
859841
* Thu Mar 1 2012 Steve Grubb <sgrubb@redhat.com> 2.2-1
859841
- New upstream release
859841
859841
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.3-5
859841
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
859841
859841
* Thu Sep 15 2011 Adam Williamson <awilliam@redhat.com> 2.1.3-4
859841
- add in some systemd scriptlets that were missed, including one which
859841
  will cause auditd to be enabled on upgrade from pre-systemd builds
859841
859841
* Wed Sep 14 2011 Steve Grubb <sgrubb@redhat.com> 2.1.3-3
859841
- Enable by default (#737060)
859841
859841
* Tue Aug 30 2011 Steve Grubb <sgrubb@redhat.com> 2.1.3-2
859841
- Correct misplaced ifnarch (#734359)
859841
859841
* Mon Aug 15 2011 Steve Grubb <sgrubb@redhat.com> 2.1.3-1
859841
- New upstream release
859841
859841
* Tue Jul 26 2011 Jóhann B. Guðmundsson <johannbg@gmail.com> - 2.1.2-2
859841
- Introduce systemd unit file, drop SysV support
859841
859841
* Sat Jun 11 2011 Steve Grubb <sgrubb@redhat.com> 2.1.2-1
859841
- New upstream release
859841
859841
* Wed Apr 20 2011 Steve Grubb <sgrubb@redhat.com> 2.1.1-1
859841
- New upstream release
859841
859841
* Tue Mar 29 2011 Steve Grubb <sgrubb@redhat.com> 2.1-1
859841
- New upstream release
859841
859841
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.6-2
859841
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
859841
859841
* Fri Feb 04 2011 Steve Grubb <sgrubb@redhat.com> 2.0.6-1
859841
- New upstream release
859841
859841
* Thu Jan 20 2011 Karsten Hopp <karsten@redhat.com> 2.0.5-2
859841
- bump and rebuild as 2.0.5-1 was erroneously linked with python-2.6 on ppc
859841
859841
* Tue Nov 02 2010 Steve Grubb <sgrubb@redhat.com> 2.0.5-1
859841
- New upstream release
859841
859841
* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 2.0.4-4
859841
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
859841
859841
* Tue Feb 16 2010 Adam Jackson <ajax@redhat.com> 2.0.4-3
859841
- audit-2.0.4-add-needed.patch: Fix FTBFS for --no-add-needed
859841
859841
* Fri Jan 29 2010 Steve Grubb <sgrubb@redhat.com> 2.0.4-2
859841
- Split out static libs (#556039)
859841
859841
* Tue Dec 08 2009 Steve Grubb <sgrubb@redhat.com> 2.0.4-1
859841
- New upstream release
859841
859841
* Sat Oct 17 2009 Steve Grubb <sgrubb@redhat.com> 2.0.3-1
859841
- New upstream release
859841
859841
* Fri Oct 16 2009 Steve Grubb <sgrubb@redhat.com> 2.0.2-1
859841
- New upstream release
859841
859841
* Mon Sep 28 2009 Steve Grubb <sgrubb@redhat.com> 2.0.1-1
859841
- New upstream release
859841
859841
* Fri Aug 21 2009 Steve Grubb <sgrubb@redhat.com> 2.0-3
859841
- New upstream release