Group :: System/Base
RPM: sysstat
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Name: sysstat
Version: 7.1.4
Release: alt1
Summary: The sar and iostat system monitoring commands
License: GPL
Group: System/Base
URL: http://perso.orange.fr/sebastien.godard/
Source: %url/sysstat-%version.tar.bz2
Source1: sysstat.init
%description
This package provides the sar and iostat commands for the Linux
operating system, similar to their traditional UNIX counterparts.
They enable system monitoring of disk, network, and other IO activity.
%package isag
Summary: Interactive System Activity Graph
License: GPL
Group: System/Base
Requires: gnuplot, sysstat = %version
%description isag
isag is a command that enables you to plot data stored in a daily data file
by a previous sar run.
%prep
%setup -q
%build
export sa_lib_dir=%_libdir/sa
# we build script for daily summary that takes yesterday's data and will
# run it by cron after midnight
./configure --prefix=/usr \
--enable-yesterday \
--mandir=%_mandir \
--disable-compress-manpg
%make_build SA_LIB_DIR="%_libdir/sa"
%install
%make_install DESTDIR=%buildroot install IGNORE_MAN_GROUP=y
install -p -m644 -D sysstat.ioconf %buildroot%_sysconfdir/sysconfig/
install -p -m644 -D sysstat.sysconfig %buildroot/etc/sysconfig/sysstat
install -d %buildroot%_sysconfdir/cron.d/
# Create cronjob file inline. We can easily use here rpm macros for libdir and
# thus allows for multiarch build.
cat > %buildroot%_sysconfdir/cron.d/%name <<EOF
# run system activity accounting tool every 10 minutes
*/10 * * * * root %_libdir/sa/sa1 1 1
# generate a daily summary of process accounting
0 2 * * * root %_libdir/sa/sa2 -A
EOF
install -pD -m755 %_sourcedir/sysstat.init %buildroot%_initrddir/sysstat
%__subst 's at LIBDIR at %_libdir at ' %buildroot%_initrddir/sysstat
# sysstat makefiles install the docs, blow them away
rm -rf %buildroot/usr/doc
install -pD -m755 contrib/isag/isag %buildroot%_bindir/isag
install -pD -m644 contrib/isag/isag.1 %buildroot%_man1dir/isag.1
%find_lang %name
%preun
%preun_service sysstat
if [ "$1" = 0 ]; then
# Remove sa logs if removing %name completely.
rm -f %_logdir/sa/*
fi
%post -p "%post_service sysstat"
%files -f %name.lang
%config(noreplace) %attr(644,root,root) %_sysconfdir/cron.d/%name
%config(noreplace) %_sysconfdir/sysconfig/%name
%config %_sysconfdir/sysconfig/sysstat.ioconf
%_bindir/*
%exclude %_bindir/isag
%_libdir/sa
%_initrddir/*
%_man1dir/*
%exclude %_man1dir/isag.*
%_man8dir/*
%attr(750,root,adm) %_logdir/sa
%doc CHANGES CREDITS FAQ
%files isag
%_bindir/isag
%_man1dir/isag.*
%changelog
…
Full changelog you can see here
Version: 7.1.4
Release: alt1
Summary: The sar and iostat system monitoring commands
License: GPL
Group: System/Base
URL: http://perso.orange.fr/sebastien.godard/
Source: %url/sysstat-%version.tar.bz2
Source1: sysstat.init
%description
This package provides the sar and iostat commands for the Linux
operating system, similar to their traditional UNIX counterparts.
They enable system monitoring of disk, network, and other IO activity.
%package isag
Summary: Interactive System Activity Graph
License: GPL
Group: System/Base
Requires: gnuplot, sysstat = %version
%description isag
isag is a command that enables you to plot data stored in a daily data file
by a previous sar run.
%prep
%setup -q
%build
export sa_lib_dir=%_libdir/sa
# we build script for daily summary that takes yesterday's data and will
# run it by cron after midnight
./configure --prefix=/usr \
--enable-yesterday \
--mandir=%_mandir \
--disable-compress-manpg
%make_build SA_LIB_DIR="%_libdir/sa"
%install
%make_install DESTDIR=%buildroot install IGNORE_MAN_GROUP=y
install -p -m644 -D sysstat.ioconf %buildroot%_sysconfdir/sysconfig/
install -p -m644 -D sysstat.sysconfig %buildroot/etc/sysconfig/sysstat
install -d %buildroot%_sysconfdir/cron.d/
# Create cronjob file inline. We can easily use here rpm macros for libdir and
# thus allows for multiarch build.
cat > %buildroot%_sysconfdir/cron.d/%name <<EOF
# run system activity accounting tool every 10 minutes
*/10 * * * * root %_libdir/sa/sa1 1 1
# generate a daily summary of process accounting
0 2 * * * root %_libdir/sa/sa2 -A
EOF
install -pD -m755 %_sourcedir/sysstat.init %buildroot%_initrddir/sysstat
%__subst 's at LIBDIR at %_libdir at ' %buildroot%_initrddir/sysstat
# sysstat makefiles install the docs, blow them away
rm -rf %buildroot/usr/doc
install -pD -m755 contrib/isag/isag %buildroot%_bindir/isag
install -pD -m644 contrib/isag/isag.1 %buildroot%_man1dir/isag.1
%find_lang %name
%preun
%preun_service sysstat
if [ "$1" = 0 ]; then
# Remove sa logs if removing %name completely.
rm -f %_logdir/sa/*
fi
%post -p "%post_service sysstat"
%files -f %name.lang
%config(noreplace) %attr(644,root,root) %_sysconfdir/cron.d/%name
%config(noreplace) %_sysconfdir/sysconfig/%name
%config %_sysconfdir/sysconfig/sysstat.ioconf
%_bindir/*
%exclude %_bindir/isag
%_libdir/sa
%_initrddir/*
%_man1dir/*
%exclude %_man1dir/isag.*
%_man8dir/*
%attr(750,root,adm) %_logdir/sa
%doc CHANGES CREDITS FAQ
%files isag
%_bindir/isag
%_man1dir/isag.*
%changelog
…
Full changelog you can see here