From 4bd4248c962fa13d40bd19715eec4ccda6e52d0b Mon Sep 17 00:00:00 2001 From: Steve Date: Dec 12 2012 18:57:52 +0000 Subject: New upstream release --- diff --git a/audit.spec b/audit.spec index 28d23d2..559c678 100644 --- a/audit.spec +++ b/audit.spec @@ -1,25 +1,30 @@ %{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} +# Do we want systemd? +%define WITH_SYSTEMD 1 + Summary: User space tools for 2.6 kernel auditing Name: audit -Version: 2.2.1 +Version: 2.2.2 Release: 2%{?dist} License: GPLv2+ Group: System Environment/Daemons URL: http://people.redhat.com/sgrubb/audit/ Source0: http://people.redhat.com/sgrubb/audit/%{name}-%{version}.tar.gz +Patch1: fix-srand.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -Source1: auditd.service BuildRequires: swig python-devel -BuildRequires: tcp_wrappers-devel libcap-ng-devel -BuildRequires: autoconf automake libtool -BuildRequires: systemd-units +BuildRequires: tcp_wrappers-devel krb5-devel libcap-ng-devel BuildRequires: kernel-headers >= 2.6.29 Requires: %{name}-libs = %{version}-%{release} +%if %{WITH_SYSTEMD} +BuildRequires: systemd-units Requires(post): systemd-units systemd-sysv chkconfig coreutils Requires(preun): systemd-units Requires(postun): systemd-units coreutils - +%else +Requires: chkconfig +%endif %description The audit package contains the user space utilities for @@ -85,15 +90,22 @@ behavior. %prep %setup -q +%patch1 -p1 %build -autoreconf -v --install -%configure --sbindir=/sbin --libdir=/%{_lib} --with-prelude --with-libwrap --enable-gssapi-krb5=no --with-libcap-ng=yes +%configure --sbindir=/sbin --libdir=/%{_lib} --with-python=yes --with-prelude --with-libwrap --enable-gssapi-krb5=yes --with-libcap-ng=yes --with-armeb \ +%if %{WITH_SYSTEMD} + --enable-systemd +%endif + make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT -mkdir -p $RPM_BUILD_ROOT/{sbin,etc/{sysconfig,audispd/plugins.d}} +mkdir -p $RPM_BUILD_ROOT/{sbin,etc/audispd/plugins.d} +%if !%{WITH_SYSTEMD} +mkdir -p $RPM_BUILD_ROOT/{etc/{sysconfig,rc.d/init.d}} +%endif mkdir -p $RPM_BUILD_ROOT/%{_mandir}/{man5,man8} mkdir -p $RPM_BUILD_ROOT/%{_lib} mkdir -p $RPM_BUILD_ROOT/%{_libdir}/audit @@ -128,11 +140,6 @@ rm -f $RPM_BUILD_ROOT/%{_libdir}/python?.?/site-packages/auparse.la touch -r ./audit.spec $RPM_BUILD_ROOT/etc/libaudit.conf touch -r ./audit.spec $RPM_BUILD_ROOT/usr/share/man/man5/libaudit.conf.5.gz -# Systemd -mkdir -p %{buildroot}%{_unitdir} -install -m644 %{SOURCE1} %{buildroot}%{_unitdir} -rm -rf %{buildroot}%{_initrddir} - %ifnarch ppc ppc64 %check make check @@ -144,39 +151,32 @@ rm -rf $RPM_BUILD_ROOT %post libs -p /sbin/ldconfig %post -if [ $1 -eq 1 ] ; then - # Initial installation - /bin/systemctl enable auditd.service >/dev/null 2>&1 || : -fi +%if %{WITH_SYSTEMD} +%systemd_post auditd.service +%else +/sbin/chkconfig --add auditd +%endif %preun -if [ $1 -eq 0 ] ; then - # Package removal, not upgrade - /bin/systemctl --no-reload disable auditd.service > /dev/null 2>&1 || : - /bin/systemctl stop auditd.service > /dev/null 2>&1 || : +%if %{WITH_SYSTEMD} +%systemd_preun auditd.service +%else +if [ $1 -eq 0 ]; then + /sbin/service auditd stop > /dev/null 2>&1 + /sbin/chkconfig --del auditd fi +%endif %postun libs -p /sbin/ldconfig %postun -/bin/systemctl daemon-reload >/dev/null 2>&1 || : -if [ $1 -ge 1 ] ; then - # Package upgrade, not uninstall - /bin/systemctl try-restart auditd.service >/dev/null 2>&1 || : +%if %{WITH_SYSTEMD} +%systemd_postun_with_restart auditd.service +%else +if [ $1 -ge 1 ]; then + /sbin/service auditd condrestart > /dev/null 2>&1 || : fi - -%triggerun -- audit < 2.1.2-2 -# Save the current service runlevel info -# User must manually run systemd-sysv-convert --apply auditd -# to migrate them to systemd targets -/usr/bin/systemd-sysv-convert --save auditd >/dev/null 2>&1 ||: - -# The package is allowed to autostart (and was autostarted before): -/bin/systemctl --no-reload enable auditd.service >/dev/null 2>&1 ||: - -# Run these because the SysV package being removed won't do them -/sbin/chkconfig --del auditd >/dev/null 2>&1 || : -/bin/systemctl try-restart auditd.service >/dev/null 2>&1 || : +%endif %files libs %defattr(-,root,root,-) @@ -233,7 +233,12 @@ fi %attr(755,root,root) %{_bindir}/aulastlog %attr(755,root,root) %{_bindir}/ausyscall %attr(755,root,root) %{_bindir}/auvirt +%if %{WITH_SYSTEMD} %attr(755,root,root) %{_unitdir}/auditd.service +%else +%attr(755,root,root) /etc/rc.d/init.d/auditd +%config(noreplace) %attr(640,root,root) /etc/sysconfig/auditd +%endif %attr(750,root,root) %dir %{_var}/log/audit %attr(750,root,root) %dir /etc/audit %attr(750,root,root) %dir /etc/audisp @@ -241,7 +246,6 @@ fi %attr(750,root,root) %dir %{_libdir}/audit %config(noreplace) %attr(640,root,root) /etc/audit/auditd.conf %config(noreplace) %attr(640,root,root) /etc/audit/audit.rules -%config(noreplace) %attr(640,root,root) /etc/sysconfig/auditd %config(noreplace) %attr(640,root,root) /etc/audisp/audispd.conf %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 @@ -266,6 +270,9 @@ fi %attr(644,root,root) %{_mandir}/man8/audisp-remote.8.gz %changelog +* Wed Dec 12 2012 Steve Grubb 2.2.2-2 +- New upstream release + * Wed Jul 18 2012 Fedora Release Engineering - 2.2.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild diff --git a/auditd.service b/auditd.service deleted file mode 100644 index 04b0b36..0000000 --- a/auditd.service +++ /dev/null @@ -1,11 +0,0 @@ -[Unit] -Description=Security Auditing Service -After=syslog.target - -[Service] -ExecStart=/sbin/auditd -n -ExecStartPost=/sbin/auditctl -R /etc/audit/audit.rules - -[Install] -WantedBy=multi-user.target - diff --git a/fix-srand.patch b/fix-srand.patch new file mode 100644 index 0000000..d18185e --- /dev/null +++ b/fix-srand.patch @@ -0,0 +1,11 @@ +Index: trunk/lib/test/lookup_test.c +=================================================================== +--- trunk/lib/test/lookup_test.c (revision 737) ++++ trunk/lib/test/lookup_test.c (revision 738) +@@ -385,5 +385,5 @@ + // This is only for preventing collisions in s2i tests. + // If collisions are found in future, change the number. +- srand(2); ++ srand(3); + #ifdef WITH_ALPHA + test_alpha_table(); diff --git a/sources b/sources index 398047c..06a4758 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -dc099fcb2f9242d47ecc35b46d71dfd1 audit-2.2.1.tar.gz +6641fde111cf5dfda6d4282ab8410df5 audit-2.2.2.tar.gz