rpms/psacct/devel psacct-logrotate.in,NONE,1.1 psacct.spec,1.45,1.46
Ivana Varekova
varekova at fedoraproject.org
Thu Jan 28 11:41:10 UTC 2010
Author: varekova
Update of /cvs/pkgs/rpms/psacct/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv9037
Modified Files:
psacct.spec
Added Files:
psacct-logrotate.in
Log Message:
- Fix the logrotate script and split its template to a separate file.
(Michal Schmidt patch, thanks)
--- NEW FILE psacct-logrotate.in ---
# 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
}
Index: psacct.spec
===================================================================
RCS file: /cvs/pkgs/rpms/psacct/devel/psacct.spec,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -p -r1.45 -r1.46
--- psacct.spec 28 Jan 2010 08:30:26 -0000 1.45
+++ psacct.spec 28 Jan 2010 11:41:10 -0000 1.46
@@ -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
# Create logrotate config file
mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d
-cat > $RPM_BUILD_ROOT/etc/logrotate.d/psacct <<EOF
-# Logrotate file for psacct RPM
-
-%{accounting_logdir}/pacct {
-#prerotate loses accounting records, let's no
-# prerotate
-# /etc/init.d/psacct status;
-# STATUS=\$?
-# %{_sbindir}/accton
-# endscript
- compress
- delaycompress
- notifempty
- daily
- rotate 31
- create 0600 root root
- postrotate
- if [ \$STATUS -eq 0 ]
- then
- %{_sbindir}/accton %{accounting_logdir}/pacct
- fi
- endscript
-}
-EOF
+sed -e 's|%%{accounting_logdir}|%{accounting_logdir}|g;s|%%{_sbindir}|%{_sbindir}|g' %{SOURCE2} > $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 <varekova at redhat.com> - 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 <varekova at redhat.com> - 6.5.1-4
- fix the logrotate change
More information about the scm-commits
mailing list