Get rid of the WITH_SYSTEMD switches
This commit is contained in:
parent
c89913942d
commit
b431fd5163
29
audit.spec
29
audit.spec
@ -1,9 +1,5 @@
|
||||
%{!?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
|
||||
# %define snapshot .svn20140803
|
||||
|
||||
Summary: User space tools for 2.6 kernel auditing
|
||||
Name: audit
|
||||
Version: 2.4.4
|
||||
@ -30,14 +26,10 @@ BuildRequires: audit-libs-devel
|
||||
%endif
|
||||
|
||||
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||
%if %{WITH_SYSTEMD}
|
||||
BuildRequires: systemd
|
||||
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
|
||||
@ -123,17 +115,12 @@ cp %{SOURCE1} .
|
||||
%ifarch %{golang_arches}
|
||||
--with-golang \
|
||||
%endif
|
||||
%if %{WITH_SYSTEMD}
|
||||
--enable-systemd
|
||||
%endif
|
||||
|
||||
make CFLAGS="%{optflags}" %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
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
|
||||
@ -181,21 +168,10 @@ rm -rf $RPM_BUILD_ROOT
|
||||
if [ ! -e /etc/audit/audit.rules ] ; then
|
||||
cp /etc/audit/rules.d/audit.rules /etc/audit/audit.rules
|
||||
fi
|
||||
%if %{WITH_SYSTEMD}
|
||||
%systemd_post auditd.service
|
||||
%else
|
||||
/sbin/chkconfig --add auditd
|
||||
%endif
|
||||
|
||||
%preun
|
||||
%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
|
||||
|
||||
@ -277,7 +253,6 @@ fi
|
||||
%attr(755,root,root) %{_bindir}/aulastlog
|
||||
%attr(755,root,root) %{_bindir}/ausyscall
|
||||
%attr(755,root,root) %{_bindir}/auvirt
|
||||
%if %{WITH_SYSTEMD}
|
||||
%attr(640,root,root) %{_unitdir}/auditd.service
|
||||
%attr(750,root,root) %dir %{_libexecdir}/initscripts/legacy-actions/auditd
|
||||
%attr(750,root,root) %{_libexecdir}/initscripts/legacy-actions/auditd/resume
|
||||
@ -285,10 +260,6 @@ fi
|
||||
%attr(750,root,root) %{_libexecdir}/initscripts/legacy-actions/auditd/stop
|
||||
%attr(750,root,root) %{_libexecdir}/initscripts/legacy-actions/auditd/restart
|
||||
%attr(750,root,root) %{_libexecdir}/initscripts/legacy-actions/auditd/condrestart
|
||||
%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/audit/rules.d
|
||||
|
Loading…
Reference in New Issue
Block a user