New upstream release
This commit is contained in:
parent
a733b9fc31
commit
963a8b6af0
1
.gitignore
vendored
1
.gitignore
vendored
@ -112,3 +112,4 @@ audit-2.0.4.tar.gz
|
|||||||
/audit-2.1.3.tar.gz
|
/audit-2.1.3.tar.gz
|
||||||
/audit-2.2.tar.gz
|
/audit-2.2.tar.gz
|
||||||
/audit-2.2.1.tar.gz
|
/audit-2.2.1.tar.gz
|
||||||
|
/audit-2.2.2.tar.gz
|
||||||
|
87
audit.spec
87
audit.spec
@ -1,25 +1,29 @@
|
|||||||
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
|
%{!?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
|
Summary: User space tools for 2.6 kernel auditing
|
||||||
Name: audit
|
Name: audit
|
||||||
Version: 2.2.1
|
Version: 2.2.2
|
||||||
Release: 2%{?dist}
|
Release: 1%{?dist}
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
URL: http://people.redhat.com/sgrubb/audit/
|
URL: http://people.redhat.com/sgrubb/audit/
|
||||||
Source0: http://people.redhat.com/sgrubb/audit/%{name}-%{version}.tar.gz
|
Source0: http://people.redhat.com/sgrubb/audit/%{name}-%{version}.tar.gz
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
Source1: auditd.service
|
|
||||||
BuildRequires: swig python-devel
|
BuildRequires: swig python-devel
|
||||||
BuildRequires: tcp_wrappers-devel libcap-ng-devel
|
BuildRequires: tcp_wrappers-devel krb5-devel libcap-ng-devel
|
||||||
BuildRequires: autoconf automake libtool
|
|
||||||
BuildRequires: systemd-units
|
|
||||||
BuildRequires: kernel-headers >= 2.6.29
|
BuildRequires: kernel-headers >= 2.6.29
|
||||||
Requires: %{name}-libs = %{version}-%{release}
|
Requires: %{name}-libs = %{version}-%{release}
|
||||||
|
%if %{WITH_SYSTEMD}
|
||||||
|
BuildRequires: systemd-units
|
||||||
Requires(post): systemd-units systemd-sysv chkconfig coreutils
|
Requires(post): systemd-units systemd-sysv chkconfig coreutils
|
||||||
Requires(preun): systemd-units
|
Requires(preun): systemd-units
|
||||||
Requires(postun): systemd-units coreutils
|
Requires(postun): systemd-units coreutils
|
||||||
|
%else
|
||||||
|
Requires: chkconfig
|
||||||
|
%endif
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The audit package contains the user space utilities for
|
The audit package contains the user space utilities for
|
||||||
@ -87,13 +91,19 @@ behavior.
|
|||||||
%setup -q
|
%setup -q
|
||||||
|
|
||||||
%build
|
%build
|
||||||
autoreconf -v --install
|
%configure --sbindir=/sbin --libdir=/%{_lib} --with-python=yes --with-prelude --with-libwrap --enable-gssapi-krb5=yes --with-libcap-ng=yes \
|
||||||
%configure --sbindir=/sbin --libdir=/%{_lib} --with-prelude --with-libwrap --enable-gssapi-krb5=no --with-libcap-ng=yes
|
%if %{WITH_SYSTEMD}
|
||||||
|
--enable-systemd
|
||||||
|
%endif
|
||||||
|
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf $RPM_BUILD_ROOT
|
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/%{_mandir}/{man5,man8}
|
||||||
mkdir -p $RPM_BUILD_ROOT/%{_lib}
|
mkdir -p $RPM_BUILD_ROOT/%{_lib}
|
||||||
mkdir -p $RPM_BUILD_ROOT/%{_libdir}/audit
|
mkdir -p $RPM_BUILD_ROOT/%{_libdir}/audit
|
||||||
@ -128,11 +138,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/etc/libaudit.conf
|
||||||
touch -r ./audit.spec $RPM_BUILD_ROOT/usr/share/man/man5/libaudit.conf.5.gz
|
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
|
%ifnarch ppc ppc64
|
||||||
%check
|
%check
|
||||||
make check
|
make check
|
||||||
@ -144,39 +149,32 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%post libs -p /sbin/ldconfig
|
%post libs -p /sbin/ldconfig
|
||||||
|
|
||||||
%post
|
%post
|
||||||
if [ $1 -eq 1 ] ; then
|
%if %{WITH_SYSTEMD}
|
||||||
# Initial installation
|
%systemd_post auditd.service
|
||||||
/bin/systemctl enable auditd.service >/dev/null 2>&1 || :
|
%else
|
||||||
fi
|
/sbin/chkconfig --add auditd
|
||||||
|
%endif
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
if [ $1 -eq 0 ] ; then
|
%if %{WITH_SYSTEMD}
|
||||||
# Package removal, not upgrade
|
%systemd_preun auditd.service
|
||||||
/bin/systemctl --no-reload disable auditd.service > /dev/null 2>&1 || :
|
%else
|
||||||
/bin/systemctl stop auditd.service > /dev/null 2>&1 || :
|
if [ $1 -eq 0 ]; then
|
||||||
|
/sbin/service auditd stop > /dev/null 2>&1
|
||||||
|
/sbin/chkconfig --del auditd
|
||||||
fi
|
fi
|
||||||
|
%endif
|
||||||
|
|
||||||
%postun libs -p /sbin/ldconfig
|
%postun libs -p /sbin/ldconfig
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
%if %{WITH_SYSTEMD}
|
||||||
if [ $1 -ge 1 ] ; then
|
%systemd_postun_with_restart auditd.service
|
||||||
# Package upgrade, not uninstall
|
%else
|
||||||
/bin/systemctl try-restart auditd.service >/dev/null 2>&1 || :
|
if [ $1 -ge 1 ]; then
|
||||||
|
/sbin/service auditd condrestart > /dev/null 2>&1 || :
|
||||||
fi
|
fi
|
||||||
|
%endif
|
||||||
%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 || :
|
|
||||||
|
|
||||||
%files libs
|
%files libs
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
@ -233,7 +231,12 @@ fi
|
|||||||
%attr(755,root,root) %{_bindir}/aulastlog
|
%attr(755,root,root) %{_bindir}/aulastlog
|
||||||
%attr(755,root,root) %{_bindir}/ausyscall
|
%attr(755,root,root) %{_bindir}/ausyscall
|
||||||
%attr(755,root,root) %{_bindir}/auvirt
|
%attr(755,root,root) %{_bindir}/auvirt
|
||||||
|
%if %{WITH_SYSTEMD}
|
||||||
%attr(755,root,root) %{_unitdir}/auditd.service
|
%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 %{_var}/log/audit
|
||||||
%attr(750,root,root) %dir /etc/audit
|
%attr(750,root,root) %dir /etc/audit
|
||||||
%attr(750,root,root) %dir /etc/audisp
|
%attr(750,root,root) %dir /etc/audisp
|
||||||
@ -241,7 +244,6 @@ fi
|
|||||||
%attr(750,root,root) %dir %{_libdir}/audit
|
%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/auditd.conf
|
||||||
%config(noreplace) %attr(640,root,root) /etc/audit/audit.rules
|
%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/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/af_unix.conf
|
||||||
%config(noreplace) %attr(640,root,root) /etc/audisp/plugins.d/syslog.conf
|
%config(noreplace) %attr(640,root,root) /etc/audisp/plugins.d/syslog.conf
|
||||||
@ -266,6 +268,9 @@ fi
|
|||||||
%attr(644,root,root) %{_mandir}/man8/audisp-remote.8.gz
|
%attr(644,root,root) %{_mandir}/man8/audisp-remote.8.gz
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Dec 12 2012 Steve Grubb <sgrubb@redhat.com> 2.2.2-1
|
||||||
|
- New upstream release
|
||||||
|
|
||||||
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.1-2
|
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.1-2
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
||||||
|
|
||||||
|
@ -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
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user