2007-01-16 00:38:35 +01:00
|
|
|
#
|
2011-03-07 15:16:44 +01:00
|
|
|
# spec file for package sysstat
|
2007-01-16 00:38:35 +01:00
|
|
|
#
|
2019-02-09 17:23:01 +01:00
|
|
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
2007-01-16 00:38:35 +01:00
|
|
|
#
|
2008-08-22 22:22:55 +02:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2018-10-16 12:11:17 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2007-01-16 00:38:35 +01:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
Name: sysstat
|
2019-02-09 17:23:01 +01:00
|
|
|
Version: 12.0.3
|
2011-12-21 16:23:22 +01:00
|
|
|
Release: 0
|
2007-01-16 00:38:35 +01:00
|
|
|
Summary: Sar and Iostat Commands for Linux
|
2018-04-27 09:56:28 +02:00
|
|
|
License: GPL-2.0-or-later
|
2011-06-27 14:50:07 +02:00
|
|
|
Group: System/Monitoring
|
2018-06-21 14:29:47 +02:00
|
|
|
URL: http://pagesperso-orange.fr/sebastien.godard/
|
2013-11-05 12:23:43 +01:00
|
|
|
Source: http://pagesperso-orange.fr/sebastien.godard/%{name}-%{version}.tar.xz
|
2009-06-02 13:00:28 +02:00
|
|
|
Source1: isag.desktop
|
|
|
|
Source2: sysstat.cron.suse
|
2011-10-17 17:46:37 +02:00
|
|
|
Source4: sysstat.service
|
2010-10-20 16:01:27 +02:00
|
|
|
# PATCH-FIX-OPENSUSE should be upstreamed
|
|
|
|
# add locking to scripts sa1 and sa2 (bnc#7861)
|
2010-05-28 18:48:21 +02:00
|
|
|
Patch0: sysstat-8.1.6-sa1sa2lock.diff
|
2010-10-20 16:01:27 +02:00
|
|
|
# PATCH-FIX-OPENSUSE should be upstreamed
|
|
|
|
# use getpagesize() instead of kb_shift for hugetable archs
|
2010-05-28 18:48:21 +02:00
|
|
|
Patch2: sysstat-8.0.4-pagesize.diff
|
2011-06-27 14:50:07 +02:00
|
|
|
BuildRequires: findutils
|
2017-02-19 11:24:47 +01:00
|
|
|
BuildRequires: pkgconfig
|
2011-06-27 14:50:07 +02:00
|
|
|
BuildRequires: sed
|
2015-02-22 10:00:02 +01:00
|
|
|
BuildRequires: systemd-rpm-macros
|
2011-12-21 16:23:22 +01:00
|
|
|
BuildRequires: update-desktop-files
|
2015-02-22 10:00:02 +01:00
|
|
|
BuildRequires: pkgconfig(systemd)
|
|
|
|
Requires: gettext
|
|
|
|
Requires: procmail
|
|
|
|
Requires: xz
|
|
|
|
%{?systemd_requires}
|
2017-02-19 11:24:47 +01:00
|
|
|
%ifnarch s390 s390x
|
|
|
|
BuildRequires: libsensors4-devel
|
|
|
|
%endif
|
2007-01-16 00:38:35 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
Sar and Iostat commands for Linux. The sar command collects and reports
|
|
|
|
system activity information. The iostat command reports CPU statistics
|
|
|
|
and I/O statistics for TTY devices and disks. The information
|
|
|
|
collected by sar and iostat can be saved in a binary file for future
|
2010-08-30 12:41:32 +02:00
|
|
|
inspection. Both commands now support SMP machines when displaying CPU
|
2007-01-16 00:38:35 +01:00
|
|
|
utilization.
|
|
|
|
|
2007-04-18 01:00:01 +02:00
|
|
|
%package isag
|
2010-08-30 12:41:32 +02:00
|
|
|
Summary: Interactive System Activity Grapher for sysstat
|
2007-04-18 01:00:01 +02:00
|
|
|
Group: System/Monitoring
|
2011-06-27 14:50:07 +02:00
|
|
|
Requires: gnuplot
|
|
|
|
Requires: sysstat = %{version}
|
|
|
|
Requires: tk
|
2007-04-18 01:00:01 +02:00
|
|
|
|
|
|
|
%description isag
|
2007-05-04 00:05:19 +02:00
|
|
|
This package includes the isag command, which graphically displays the
|
|
|
|
system activity data stored in a binary data produced by a sar command
|
|
|
|
from a sysstat package.
|
2007-04-18 01:00:01 +02:00
|
|
|
|
2007-01-16 00:38:35 +01:00
|
|
|
%prep
|
2009-06-02 13:00:28 +02:00
|
|
|
%setup -q
|
2017-11-02 10:54:07 +01:00
|
|
|
%patch0 -p1
|
|
|
|
%patch2 -p1
|
2013-10-29 15:42:26 +01:00
|
|
|
cp %{SOURCE1} %{SOURCE2} %{SOURCE4} .
|
2017-02-19 11:24:47 +01:00
|
|
|
# remove date and time from objects
|
|
|
|
find ./ -name \*.c -exec sed -i -e 's: " compiled " __DATE__ " " __TIME__::g' {} \;
|
2007-01-16 00:38:35 +01:00
|
|
|
|
|
|
|
%build
|
2010-08-30 12:41:32 +02:00
|
|
|
export conf_dir="%{_sysconfdir}/sysstat"
|
|
|
|
export sa_lib_dir="%{_libdir}/sa"
|
2007-03-15 01:50:14 +01:00
|
|
|
export cron_owner=root
|
|
|
|
export LFLAGS="-L. -lsyscom"
|
2012-10-17 11:18:34 +02:00
|
|
|
export history="60"
|
2007-03-15 01:50:14 +01:00
|
|
|
%configure \
|
2017-02-19 11:24:47 +01:00
|
|
|
--disable-silent-rules \
|
2015-02-22 10:00:02 +01:00
|
|
|
--enable-nls \
|
|
|
|
--disable-man-group \
|
2017-02-19 11:24:47 +01:00
|
|
|
--enable-copy-only \
|
|
|
|
--disable-file-attr \
|
2015-02-22 10:00:02 +01:00
|
|
|
--enable-debug-info \
|
2016-05-25 12:09:48 +02:00
|
|
|
%ifnarch s390 s390x
|
|
|
|
--enable-sensors \
|
|
|
|
%endif
|
|
|
|
--disable-stripping
|
2010-11-01 09:18:22 +01:00
|
|
|
make %{?_smp_mflags}
|
2007-01-16 00:38:35 +01:00
|
|
|
|
|
|
|
%install
|
2011-06-27 14:50:07 +02:00
|
|
|
mkdir -p %{buildroot}%{_localstatedir}/log/sa %{buildroot}%{_sbindir}
|
2017-02-19 11:24:47 +01:00
|
|
|
%make_install
|
2011-06-27 14:50:07 +02:00
|
|
|
install -D -m 0644 isag.desktop %{buildroot}%{_datadir}/applications/isag.desktop
|
2009-06-02 13:00:28 +02:00
|
|
|
%suse_update_desktop_file isag
|
2011-06-27 14:50:07 +02:00
|
|
|
cp contrib/isag/isag %{buildroot}%{_bindir}
|
|
|
|
cp contrib/isag/isag.1 %{buildroot}%{_mandir}/man1
|
|
|
|
rm -rf %{buildroot}%{_datadir}/doc/sysstat*
|
|
|
|
install -D -m 0755 sysstat.cron.suse %{buildroot}%{_sysconfdir}/sysstat/sysstat.cron
|
2013-11-05 12:23:43 +01:00
|
|
|
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcsysstat
|
2008-08-22 22:22:55 +02:00
|
|
|
%find_lang %{name}
|
2015-02-22 10:00:02 +01:00
|
|
|
install -D -m 0644 %{SOURCE4} %{buildroot}%{_unitdir}/sysstat.service
|
2013-11-05 12:23:43 +01:00
|
|
|
# change /usr/lib to /usr/lib64 or something else when needed
|
2018-06-21 14:29:47 +02:00
|
|
|
if [ "%{_libdir}" != "%{_libexecdir}" ]; then
|
2015-02-22 10:00:02 +01:00
|
|
|
sed -i 's:%{_libexecdir}/:%{_libdir}/:g' \
|
2013-11-05 12:23:43 +01:00
|
|
|
%{buildroot}%{_sysconfdir}/sysstat/sysstat.cron \
|
|
|
|
%{buildroot}%{_unitdir}/sysstat.service
|
|
|
|
fi
|
2011-10-17 17:46:37 +02:00
|
|
|
|
2018-11-12 22:22:43 +01:00
|
|
|
%check
|
|
|
|
make %{?_smp_mflags} test
|
|
|
|
|
2011-10-17 17:46:37 +02:00
|
|
|
%pre
|
|
|
|
%service_add_pre sysstat.service
|
2007-01-16 00:38:35 +01:00
|
|
|
|
|
|
|
%preun
|
2011-10-17 17:46:37 +02:00
|
|
|
%service_del_preun sysstat.service
|
2012-10-17 11:18:34 +02:00
|
|
|
[ "$1" -gt 0 ] || rm -rf %{_localstatedir}/log/sa/*
|
2007-01-16 00:38:35 +01:00
|
|
|
|
|
|
|
%post
|
2012-11-14 09:07:52 +01:00
|
|
|
%service_add_post sysstat.service
|
2007-01-16 00:38:35 +01:00
|
|
|
|
|
|
|
%postun
|
2011-10-17 17:46:37 +02:00
|
|
|
%service_del_postun sysstat.service
|
2007-01-16 00:38:35 +01:00
|
|
|
|
2018-04-27 09:57:24 +02:00
|
|
|
%if 0%{?suse_version} < 1500
|
2015-05-18 11:11:51 +02:00
|
|
|
%post isag
|
|
|
|
%desktop_database_post
|
|
|
|
|
|
|
|
%postun isag
|
|
|
|
%desktop_database_postun
|
2018-04-27 09:57:24 +02:00
|
|
|
%endif
|
2015-05-18 11:11:51 +02:00
|
|
|
|
2010-08-30 12:41:32 +02:00
|
|
|
%files -f "%{name}.lang"
|
2018-06-21 14:29:47 +02:00
|
|
|
%license COPYING
|
|
|
|
%doc CHANGES CREDITS FAQ.md README.md
|
2015-05-18 11:11:51 +02:00
|
|
|
%{_mandir}/man1/*
|
|
|
|
%{_mandir}/man5/*
|
|
|
|
%{_mandir}/man8/*
|
2008-08-22 22:22:55 +02:00
|
|
|
%exclude %{_mandir}/man1/isag*
|
2007-02-08 08:57:37 +01:00
|
|
|
%dir %{_sysconfdir}/sysstat
|
2011-03-07 12:37:16 +01:00
|
|
|
%config(noreplace) %{_sysconfdir}/sysstat/sysstat
|
2008-08-22 22:22:55 +02:00
|
|
|
%attr(644,root,root) %config(noreplace) %{_sysconfdir}/sysstat/sysstat.cron
|
|
|
|
%attr(644,root,root) %config(noreplace) %{_sysconfdir}/sysstat/sysstat.ioconf
|
2018-11-12 22:22:43 +01:00
|
|
|
%{_bindir}/cifsiostat
|
|
|
|
%{_bindir}/iostat
|
|
|
|
%{_bindir}/mpstat
|
|
|
|
%{_bindir}/pidstat
|
|
|
|
%{_bindir}/sadf
|
|
|
|
%{_bindir}/sar
|
|
|
|
%{_bindir}/tapestat
|
2008-08-22 22:22:55 +02:00
|
|
|
%exclude %{_bindir}/isag
|
2007-04-18 01:00:01 +02:00
|
|
|
%{_libdir}/sa
|
2012-11-14 09:07:52 +01:00
|
|
|
%{_unitdir}/sysstat.service
|
2009-06-10 14:57:42 +02:00
|
|
|
%dir %{_localstatedir}/log/sa
|
2013-11-05 12:23:43 +01:00
|
|
|
%{_sbindir}/rcsysstat
|
2007-01-16 00:38:35 +01:00
|
|
|
|
2007-04-18 01:00:01 +02:00
|
|
|
%files isag
|
2008-08-22 22:22:55 +02:00
|
|
|
%doc contrib/isag/README-isag
|
2015-05-18 11:11:51 +02:00
|
|
|
%{_mandir}/man1/isag*
|
2008-08-22 22:22:55 +02:00
|
|
|
%{_bindir}/isag
|
2010-08-30 12:41:32 +02:00
|
|
|
%{_datadir}/applications/isag.desktop
|
2008-01-10 03:14:11 +01:00
|
|
|
|
2007-03-15 01:50:14 +01:00
|
|
|
%changelog
|