diff --git a/psacct-logrotate.in b/psacct-logrotate.in new file mode 100644 index 0000000..a24e64d --- /dev/null +++ b/psacct-logrotate.in @@ -0,0 +1,15 @@ +# Logrotate file for psacct RPM + +%{accounting_logdir}/pacct { + compress + delaycompress + notifempty + daily + rotate 31 + create 0600 root root + postrotate + if /etc/init.d/psacct status >/dev/null 2>&1; then + %{_sbindir}/accton %{accounting_logdir}/pacct + fi + endscript +} diff --git a/psacct.spec b/psacct.spec index 84e31c9..04ae011 100644 --- a/psacct.spec +++ b/psacct.spec @@ -12,12 +12,13 @@ Summary: Utilities for monitoring process activities Name: psacct Version: 6.5.1 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2+ Group: Applications/System URL: ftp://ftp.gnu.org/pub/gnu/acct/ Source: ftp://ftp.gnu.org/pub/gnu/acct/acct-%{version}.tar.gz Source1: psacct.init +Source2: psacct-logrotate.in # This dumb patch breaks FHS 2.2 compliance, so it is disabled now except # in 7.x builds. Do not use it in new products. Patch0: acct-6.3.2-config.patch @@ -99,30 +100,7 @@ touch $RPM_BUILD_ROOT%{accounting_logdir}/pacct # Create logrotate config file mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d -cat > $RPM_BUILD_ROOT/etc/logrotate.d/psacct < $RPM_BUILD_ROOT/etc/logrotate.d/psacct # Install initscript mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d @@ -184,6 +162,10 @@ fi %{_infodir}/accounting.info.gz %changelog +* Wed Jan 28 2010 Ivana Hutarova Varekova - 6.5.1-5 +- Fix the logrotate script and split its template to a separate file. + (Michal Schmidt patch, thanks) + * Thu Jan 28 2010 Ivana Hutarova Varekova - 6.5.1-4 - fix the logrotate change