auto-import sysstat-5.0.0-0.6 from sysstat-5.0.0-0.6.src.rpm

This commit is contained in:
cvsdist 2004-09-09 13:01:17 +00:00
parent 27c2d0a26f
commit ae9757d4f0
5 changed files with 73 additions and 17 deletions

View File

@ -1 +1 @@
sysstat-4.0.7.tar.bz2 sysstat-5.0.0.tar.bz2

View File

@ -1 +1 @@
4756d98b7fd8a0999129e88643ea5869 sysstat-4.0.7.tar.bz2 64a6f2956b6178961e0fa1aa1fd7d9a4 sysstat-5.0.0.tar.bz2

View File

@ -1,5 +1,5 @@
# run system activity accounting tool every 10 minutes # run system activity accounting tool every 10 minutes
*/10 * * * * root /usr/lib64/sa/sa1 1 1 */10 * * * * root /usr/lib/sa/sa1 1 1
# generate a daily summary of process accounting at 23:53 # generate a daily summary of process accounting at 23:53
53 23 * * * root /usr/lib64/sa/sa2 -A 53 23 * * * root /usr/lib/sa/sa2 -A

View File

@ -1,6 +1,6 @@
Name: sysstat Name: sysstat
Version: 4.0.7 Version: 5.0.0
Release: 5 Release: 0.6
Summary: The sar and iostat system monitoring commands. Summary: The sar and iostat system monitoring commands.
License: GPL License: GPL
Group: Applications/System Group: Applications/System
@ -8,15 +8,21 @@ URL: http://perso.wanadoo.fr/sebastien.godard/
Source: http://perso.wanadoo.fr/sebastien.godard/%{name}-%{version}.tar.bz2 Source: http://perso.wanadoo.fr/sebastien.godard/%{name}-%{version}.tar.bz2
Source1: sysstat.crond Source1: sysstat.crond
Source2: sysstat.crondaily Source2: sysstat.crondaily
Source3: sysstat.sysconfig
Patch0: sysstat-4.0.1-config.patch Patch0: sysstat-4.0.1-config.patch
Patch1: sysstat-4.0.1-prevday.patch Patch1: sysstat-4.0.1-prevday.patch
Patch2: sysstat-3.3.5-fixutilization.patch Patch2: sysstat-3.3.5-fixutilization.patch
Patch3: sysstat-4.0.1-verbose.patch Patch3: sysstat-5.0.0-verbose.patch
Patch4: sysstat-4.0.7-lib64.patch Patch4: sysstat-4.0.7-lib64.patch
Patch5: sysstat-5.0.0-ifnamsiz.patch
Patch6: sysstat-5.0.0-history.patch
Patch7: sysstat-5.0.0-statreset.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRoot: %{_tmppath}/%{name}-%{version}-root
Requires: kernel >= 2.2.16-21 Requires: kernel >= 2.2.16-21 /sbin/chkconfig
Prereq: sh-utils textutils grep fileutils /etc/cron.d Prereq: sh-utils textutils grep fileutils /etc/cron.d
BuildRequires: perl %{_includedir}/linux/if.h
Requires: %__cp %__mv %__chmod %__grep %__mkdir %__install %__id
%description %description
This package provides the sar and iostat commands for Linux. Sar and This package provides the sar and iostat commands for Linux. Sar and
@ -30,6 +36,9 @@ activity.
#patch2 -p1 -b .fixutilization #patch2 -p1 -b .fixutilization
%patch3 -p1 -b .verbose %patch3 -p1 -b .verbose
%patch4 -p1 -b .lib64 %patch4 -p1 -b .lib64
%patch5 -p1 -b .ifnamsiz
%patch6 -p1 -b .history
%patch7 -p1 -b .statreset
%build %build
# FIXME: I need to fix the upstream Makefile to use LIBDIR et al. properly and # FIXME: I need to fix the upstream Makefile to use LIBDIR et al. properly and
@ -37,20 +46,28 @@ activity.
CFLAGS="$RPM_OPT_FLAGS -DSADC_PATH=\\\"%{_libdir}/sa/sadc\\\"" CFLAGS="$RPM_OPT_FLAGS -DSADC_PATH=\\\"%{_libdir}/sa/sadc\\\""
make CFLAGS="$CFLAGS" PREFIX=%{_prefix} LIB_DIR=%{_libdir} MAN_DIR=%{_mandir} DATA_DIR=%{_datadir} DOC_DIR=%{_docdir} make CFLAGS="$CFLAGS" PREFIX=%{_prefix} LIB_DIR=%{_libdir} MAN_DIR=%{_mandir} DATA_DIR=%{_datadir} DOC_DIR=%{_docdir}
# Thou shalt not write to source files or patches
rm -f sysstat.crond
%if %_lib == "lib64"
perl -p -e "s|/lib|/lib64|g" %{SOURCE1} > sysstat.crond
%else
cat %{SOURCE1} > sysstat.crond
%endif
%install %install
rm -rf %{buildroot} rm -rf %{buildroot}
%makeinstall PREFIX=%{_prefix} LIB_DIR=%{_libdir} MAN_DIR=%{_mandir} DATA_DIR=%{_datadir} DOC_DIR=%{_docdir} %makeinstall PREFIX=%{_prefix} LIB_DIR=%{_libdir} MAN_DIR=%{_mandir} DATA_DIR=%{_datadir} DOC_DIR=%{_docdir} INIT_DIR=%{_initrddir}
#make install MAN_DIR=%{_mandir} #make install MAN_DIR=%{_mandir}
mkdir -p %{buildroot}/etc/{cron.daily,cron.d} mkdir -p %{buildroot}/etc/{cron.daily,cron.d,sysconfig}
%ifarch x86_64 ppc64 s390x install -m 0644 sysstat.crond %{buildroot}/etc/cron.d/sysstat
perl -pi -e "s|/lib|/lib64|g" %{SOURCE1}
%endif
install %{SOURCE1} %{buildroot}/etc/cron.d/sysstat
#install %{SOURCE2} %{buildroot}/etc/cron.daily/sysstat #install %{SOURCE2} %{buildroot}/etc/cron.daily/sysstat
install -m 0644 %{SOURCE3} %{buildroot}/etc/sysconfig/sysstat
mkdir -p %{buildroot}%{_initrddir}
install -m 0755 sysstat %{buildroot}%{_initrddir}/
# sysstat makefiles install the docs in the wrong place, blow them away # sysstat makefiles install the docs in the wrong place, blow them away
rm -f %{buildroot}/usr/share/doc/* rm -f %{buildroot}/usr/share/doc/*
@ -61,14 +78,26 @@ rm -f %{buildroot}/usr/share/doc/*
%triggerpostun -- sysstat <= 3.3.3-1 %triggerpostun -- sysstat <= 3.3.3-1
# earlier versions of sysstat had crontabs done in a bad way. fix it. # earlier versions of sysstat had crontabs done in a bad way. fix it.
if [ `id -u` = "0" -a "$1" -ge "2" ]; then if [ `id -u` = "0" -a "$1" -ge "2" ]; then
egrep -v 'sysstat|sa1|sa2' /etc/crontab > /tmp/crontab.$$ if grep -E -v 'sysstat|sa1|sa2' /etc/crontab > /etc/crontab.tmp.$$; then
mv /tmp/crontab.$$ /etc/crontab && chmod 644 /etc/crontab cp -dpf /etc/crontab /etc/crontab.save.$$ && \
if mv /etc/crontab.tmp.$$ /etc/crontab; then
chmod --reference=/etc/crontab.save.$$ /etc/crontab && \
rm -f /etc/crontab.save.$$
else
mv -f /etc/crontab.save.$$ /etc/crontab
fi
fi
fi fi
%post
/sbin/chkconfig --add sysstat
%preun %preun
if [ "$1" = 0 ]; then if [ "$1" = 0 ]; then
# Remove sa logs if removing sysstat completely # Remove sa logs if removing sysstat completely
rm -f /var/log/sa/* rm -f /var/log/sa/*
# Remove service
/sbin/chkconfig --del sysstat
fi fi
%clean %clean
@ -79,6 +108,8 @@ rm -rf %{buildroot}
%doc CHANGES COPYING CREDITS README TODO %doc CHANGES COPYING CREDITS README TODO
%config(noreplace) /etc/cron.d/sysstat %config(noreplace) /etc/cron.d/sysstat
#config(noreplace) /etc/cron.daily/sysstat #config(noreplace) /etc/cron.daily/sysstat
%config(noreplace) /etc/sysconfig/sysstat
%{_initrddir}/sysstat
%{_bindir}/* %{_bindir}/*
%{_libdir}/sa %{_libdir}/sa
%{_mandir}/man1/* %{_mandir}/man1/*
@ -86,6 +117,29 @@ rm -rf %{buildroot}
/var/log/sa /var/log/sa
%changelog %changelog
* Thu Jan 22 2004 Nils Philippsen <nphilipp@redhat.com> 5.0.0-0.6
- let user configure how long to keep logs through /etc/sysconfig/sysstat
(#81294)
- reset stats at system boot (#102445)
* Wed Jan 21 2004 Nils Philippsen <nphilipp@redhat.com> 5.0.0-0.5
- fix ifnamsiz patch for s390x (hopefully)
* Tue Jan 20 2004 Nils Philippsen <nphilipp@redhat.com> 5.0.0-0.4
- fix insecure tmp files in scripts (#78212)
- require tools needed in scripts
- use IFNAMSIZ from %{_includedir}/linux/if.h for maximum interface length
* Mon Jan 12 2004 Nils Philippsen <nphilipp@redhat.com> 5.0.0-0.3
- Buildrequires: perl
- check for %%_lib == lib64 instead of specific arches
* Mon Jan 12 2004 Nils Philippsen <nphilipp@redhat.com> 5.0.0-0.2
- fix dealing with lib64 case of cron.d file
* Mon Jan 12 2004 Nils Philippsen <nphilipp@redhat.com> 5.0.0-0.1
- version 5.0.0
* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com> * Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com>
- rebuilt - rebuilt

2
sysstat.sysconfig Normal file
View File

@ -0,0 +1,2 @@
# How long to keep log files (days), maximum is a month
HISTORY=7