- #759321 - psacct logrotate script references init.d service
- #735300 - Enabling psacct causes daily cron spam
This commit is contained in:
parent
2fcd03c291
commit
ecd59bfdf2
@ -8,8 +8,8 @@
|
||||
rotate 31
|
||||
create 0600 root root
|
||||
postrotate
|
||||
if /etc/init.d/psacct status >/dev/null 2>&1; then
|
||||
%{_sbindir}/accton /var/account/pacct
|
||||
if %{_bindir}/systemctl --quiet is-active psacct.service ; then
|
||||
%{_sbindir}/accton /var/account/pacct | %{_bindir}/grep -v "Turning on process accounting, file set to '/var/account/pacct'." | %{_bindir}/cat
|
||||
fi
|
||||
endscript
|
||||
}
|
||||
|
33
psacct.spec
33
psacct.spec
@ -4,7 +4,7 @@
|
||||
Summary: Utilities for monitoring process activities
|
||||
Name: psacct
|
||||
Version: 6.5.5
|
||||
Release: 7%{?dist}
|
||||
Release: 8%{?dist}
|
||||
License: GPLv3+
|
||||
Group: Applications/System
|
||||
URL: ftp://ftp.gnu.org/pub/gnu/acct/
|
||||
@ -56,29 +56,28 @@ sed -i 's|.*(gets,.*||g' lib/stdio.in.h
|
||||
make
|
||||
|
||||
%install
|
||||
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
|
||||
mkdir -p $RPM_BUILD_ROOT{/sbin,%{_bindir},%{_mandir},%{_sbindir}}
|
||||
make install prefix=$RPM_BUILD_ROOT%{_prefix} \
|
||||
bindir=$RPM_BUILD_ROOT%{_bindir} sbindir=$RPM_BUILD_ROOT%{_sbindir} \
|
||||
infodir=$RPM_BUILD_ROOT%{_datadir}/info mandir=$RPM_BUILD_ROOT%{_mandir}
|
||||
cp dump-acct.8 $RPM_BUILD_ROOT%{_mandir}/man8/
|
||||
mkdir -p %{buildroot}{/sbin,%{_bindir},%{_mandir},%{_sbindir}}
|
||||
make install prefix=%{buildroot}%{_prefix} \
|
||||
bindir=%{buildroot}%{_bindir} sbindir=%{buildroot}%{_sbindir} \
|
||||
infodir=%{buildroot}%{_datadir}/info mandir=%{buildroot}%{_mandir}
|
||||
cp dump-acct.8 %{buildroot}%{_mandir}/man8/
|
||||
|
||||
# remove unwanted file
|
||||
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
|
||||
rm -f %{buildroot}%{_infodir}/dir
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT/var/account
|
||||
touch $RPM_BUILD_ROOT/var/account/pacct
|
||||
mkdir -p %{buildroot}/var/account
|
||||
touch %{buildroot}/var/account/pacct
|
||||
|
||||
# create logrotate config file
|
||||
mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d
|
||||
sed -e 's|%%{_sbindir}|%{_sbindir}|g' %{SOURCE2} > $RPM_BUILD_ROOT/etc/logrotate.d/psacct
|
||||
mkdir -p %{buildroot}/etc/logrotate.d
|
||||
sed -e 's|%%{_bindir}|%{_bindir}|g' -e 's|%%{_sbindir}|%{_sbindir}|g' %{SOURCE2} > %{buildroot}/etc/logrotate.d/psacct
|
||||
|
||||
# install systemd unit file
|
||||
mkdir -p $RPM_BUILD_ROOT%{_unitdir}
|
||||
install -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_unitdir}
|
||||
mkdir -p %{buildroot}%{_unitdir}
|
||||
install -m 644 %{SOURCE1} %{buildroot}%{_unitdir}
|
||||
|
||||
%if ! %{with_last}
|
||||
rm -f $RPM_BUILD_ROOT%{_bindir}/last $RPM_BUILD_ROOT%{_mandir}/man1/last.1*
|
||||
rm -f %{buildroot}%{_bindir}/last %{buildroot}%{_mandir}/man1/last.1*
|
||||
%endif
|
||||
|
||||
%post
|
||||
@ -135,6 +134,10 @@ fi
|
||||
%{_infodir}/accounting.info.gz
|
||||
|
||||
%changelog
|
||||
* Wed Jan 16 2013 Jaromir Capik <jcapik@redhat.com> - 6.5.5-8
|
||||
- #759321 - psacct logrotate script references init.d service
|
||||
- #735300 - Enabling psacct causes daily cron spam
|
||||
|
||||
* Tue Aug 28 2012 Jaromir Capik <jcapik@redhat.com> - 6.5.5-7
|
||||
- Migration to new systemd scriptlet macros
|
||||
- Fixing the build (new glibc) - 'gets' undeclared
|
||||
|
Loading…
Reference in New Issue
Block a user