- fix sa2 problem (sa2 works wrong when the /var/log/sa file is a link to

another directory)
This commit is contained in:
Ivana Varekova 2007-03-23 10:54:28 +00:00
parent adb1a209cf
commit e48876ae34
2 changed files with 21 additions and 1 deletions

14
sysstat-7.0.4-links.patch Normal file
View File

@ -0,0 +1,14 @@
--- sysstat-7.0.4/sa2.in.link 2007-01-25 21:13:10.000000000 +0100
+++ sysstat-7.0.4/sa2.in 2007-03-23 11:49:50.000000000 +0100
@@ -37,9 +37,9 @@
[ -f "$DFILE" ] || exit 0
cd ${ENDIR}
${ENDIR}/sar $* -f ${DFILE} > ${RPT}
-find ${DDIR} \( -name 'sar??' -o -name 'sa??' -o -name 'sar??.gz' -o -name 'sa??.gz' \) \
+find ${DDIR}/ \( -name 'sar??' -o -name 'sa??' -o -name 'sar??.gz' -o -name 'sa??.gz' \) \
-mtime +"${HISTORY}" -exec rm -f {} \;
-find ${DDIR} \( -name 'sar??' -o -name 'sa??' \) -type f -mtime +"${COMPRESSAFTER}" \
+find ${DDIR}/ \( -name 'sar??' -o -name 'sa??' \) -type f -mtime +"${COMPRESSAFTER}" \
-exec gzip {} \; > /dev/null 2>&1
cd ${DDIR}
rmdir [0-9]????? > /dev/null 2>&1

View File

@ -1,6 +1,6 @@
Name: sysstat
Version: 7.0.4
Release: 1%{?dist}
Release: 2%{?dist}
Summary: The sar and iostat system monitoring commands
License: GPL
Group: Applications/System
@ -14,6 +14,7 @@ Patch3: sysstat-7.0.4-statreset.patch
Patch6: sysstat-5.0.5-append-msg.patch
Patch9: sysstat-7.0.4-tmp.patch
Patch10: sysstat-7.0.3-debuginfo.patch
Patch11: sysstat-7.0.4-links.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -34,6 +35,7 @@ activity.
%patch6 -p1 -b .append-msg
%patch9 -p1 -b .tmp
%patch10 -p1 -b .db
%patch11 -p1 -b .link
%build
# FIXME: I need to fix the upstream Makefile to use LIBDIR et al. properly and
@ -112,6 +114,10 @@ rm -rf %{buildroot}
/var/log/sa
%changelog
* Fri Mar 23 2007 Ivana Varekova <varekova@redhat.com> - 7.0.4-2
- fix sa2 problem (sa2 works wrong when the /var/log/sa file is
a link to another directory)
* Mon Feb 12 2007 Ivana Varekova <varekova@redhat.com> - 7.0.4-1
- update to 7.0.4
- spec file cleanup