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
|
|
|
#
|
2023-04-15 20:17:27 +02:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
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
|
2023-04-15 20:17:27 +02:00
|
|
|
Version: 12.6.2
|
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
|
2020-08-16 23:50:17 +02:00
|
|
|
URL: https://github.com/sysstat/sysstat
|
|
|
|
Source: https://github.com/sysstat/sysstat/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
2009-06-02 13:00:28 +02:00
|
|
|
Source1: isag.desktop
|
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
|
2019-11-05 13:04:02 +01:00
|
|
|
# PATCH-FIX-OPENSUSE bsc#1151453
|
2019-12-13 09:28:11 +01:00
|
|
|
Patch3: sysstat-service.patch
|
2021-11-29 16:52:56 +01:00
|
|
|
Patch4: harden_sysstat.service.patch
|
2011-06-27 14:50:07 +02:00
|
|
|
BuildRequires: findutils
|
2019-08-28 01:39:17 +02:00
|
|
|
BuildRequires: gettext-runtime
|
2022-09-15 19:18:33 +02:00
|
|
|
BuildRequires: libpcp-devel
|
|
|
|
BuildRequires: libpcp_import1
|
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: procmail
|
|
|
|
Requires: xz
|
2020-10-06 18:42:49 +02:00
|
|
|
%{?systemd_ordering}
|
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
|
2019-09-24 14:27:30 +02:00
|
|
|
%patch3 -p1
|
2021-02-01 11:29:25 +01:00
|
|
|
cp %{SOURCE1} .
|
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' {} \;
|
2021-11-29 16:52:56 +01:00
|
|
|
%patch4 -p1
|
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"
|
2019-12-13 09:28:11 +01:00
|
|
|
export cron_owner=root
|
2007-03-15 01:50:14 +01:00
|
|
|
export LFLAGS="-L. -lsyscom"
|
2012-10-17 11:18:34 +02:00
|
|
|
export history="60"
|
2019-11-05 13:04:02 +01:00
|
|
|
export sadc_options="-S ALL"
|
2007-03-15 01:50:14 +01:00
|
|
|
%configure \
|
2019-11-05 13:04:02 +01:00
|
|
|
--enable-install-cron \
|
|
|
|
--disable-silent-rules \
|
|
|
|
--enable-nls \
|
|
|
|
--disable-man-group \
|
|
|
|
--enable-copy-only \
|
|
|
|
--disable-file-attr \
|
|
|
|
--enable-debug-info \
|
2022-09-15 19:18:33 +02:00
|
|
|
--enable-pcp \
|
2016-05-25 12:09:48 +02:00
|
|
|
%ifnarch s390 s390x
|
2019-11-05 13:04:02 +01:00
|
|
|
--enable-sensors \
|
2016-05-25 12:09:48 +02:00
|
|
|
%endif
|
2019-11-05 13:04:02 +01:00
|
|
|
--disable-stripping
|
2021-02-01 11:29:25 +01:00
|
|
|
%make_build
|
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*
|
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}
|
2011-10-17 17:46:37 +02:00
|
|
|
|
2018-11-12 22:22:43 +01:00
|
|
|
%check
|
2019-12-13 09:28:11 +01:00
|
|
|
# Newer versions only have simulation tests
|
|
|
|
# make %%{?_smp_mflags} test
|
2018-11-12 22:22:43 +01:00
|
|
|
|
2011-10-17 17:46:37 +02:00
|
|
|
%pre
|
2019-11-01 11:02:41 +01:00
|
|
|
%service_add_pre sysstat.service sysstat-collect.timer sysstat-summary.timer
|
2007-01-16 00:38:35 +01:00
|
|
|
|
2019-11-05 13:04:02 +01:00
|
|
|
%post
|
|
|
|
%service_add_post sysstat.service sysstat-collect.timer sysstat-summary.timer
|
2021-06-04 09:19:16 +02:00
|
|
|
# Earlier versions used cron, remove leftover
|
|
|
|
rm -f /etc/cron.d/sysstat || :
|
2019-11-05 13:04:02 +01:00
|
|
|
|
2007-01-16 00:38:35 +01:00
|
|
|
%preun
|
2019-11-01 11:02:41 +01:00
|
|
|
%service_del_preun sysstat.service sysstat-collect.timer sysstat-summary.timer
|
2012-10-17 11:18:34 +02:00
|
|
|
[ "$1" -gt 0 ] || rm -rf %{_localstatedir}/log/sa/*
|
2007-01-16 00:38:35 +01:00
|
|
|
|
|
|
|
%postun
|
2019-11-01 11:02:41 +01:00
|
|
|
%service_del_postun sysstat.service sysstat-collect.timer sysstat-summary.timer
|
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.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
|
2019-11-01 11:02:41 +01:00
|
|
|
%{_unitdir}/sysstat-collect.service
|
|
|
|
%{_unitdir}/sysstat-collect.timer
|
|
|
|
%{_unitdir}/sysstat-summary.service
|
|
|
|
%{_unitdir}/sysstat-summary.timer
|
2020-08-16 23:50:17 +02:00
|
|
|
%{_prefix}/lib/systemd/system-sleep/sysstat.sleep
|
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
|