sysstat/sysstat.spec

175 lines
5.1 KiB
RPMSpec
Raw Normal View History

#
# spec file for package sysstat
#
# Copyright (c) 2020 SUSE LLC
#
# 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.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: sysstat
Accepting request 804970 from home:polslinux:branches:Base:System - Update to 12.3.3: * sar/sadc: Add new Pressure-Stall Information (PSI) statistics. * sadf: Add support for PSI statistics. * iostat: Add support for devices managed by userspace drivers (e.g. spdk). Add new flags -f/+f to specify an alternate location for stats files. * sar: Don't display duplicate entries in /etc/mtab [12.2.2]. * sar: Don't display "Inconsistent input data" error message when no activities are collected by sadc. * sadf: XML: Remove "per" attribute for memory activity. * sadf: Add new option "hz=" for datafile conversion. * Various updates to remove GCC v9/v10 warnings. * sar: Don't check if we are close enough to selected interval when interval=1 [12.2.2]. * sadf: Use actual number of items, not its pointer address [12.2.2]. * [Sdrkun]: sa1: Create default sa directory if it doesn't exist [12.2.2]. * pr_stats.c: Printing timestamp should appear only once [12.2.2]. * common.c: Remove unused get_dev_part_nr() function [12.2.2]. * DTD and XSD documents updated. * sar and sadf manual pages updated. * Non regression tests updated. New tests added (sar, iostat). * pidstat: Major code refactoring. Several bugs fixed. * pidstat: Don't display unneeded spaces following command name when option -l is used. * cifsiostat: Major code refactoring. * simtest: Add test environment for pidstat command. * simtest: Add new non regression tests for iostat command. * pidstat: Remove extra space at end of command name [12.2.2]. * [Anatoly Pugachev]: Fix sa2 script, so it wont complain on empty list for compress program [12.2.2]. * iostat: Make sure pointer on linked list is initialized [12.2.2]. * [Fabrice Fontaine]: Makefile: Link with -lintl if needed [12.2.2]. * NLS translation updated. OBS-URL: https://build.opensuse.org/request/show/804970 OBS-URL: https://build.opensuse.org/package/show/Base:System/sysstat?expand=0&rev=109
2020-05-13 11:35:04 +02:00
Version: 12.3.3
Release: 0
Summary: Sar and Iostat Commands for Linux
License: GPL-2.0-or-later
Group: System/Monitoring
Accepting request 804970 from home:polslinux:branches:Base:System - Update to 12.3.3: * sar/sadc: Add new Pressure-Stall Information (PSI) statistics. * sadf: Add support for PSI statistics. * iostat: Add support for devices managed by userspace drivers (e.g. spdk). Add new flags -f/+f to specify an alternate location for stats files. * sar: Don't display duplicate entries in /etc/mtab [12.2.2]. * sar: Don't display "Inconsistent input data" error message when no activities are collected by sadc. * sadf: XML: Remove "per" attribute for memory activity. * sadf: Add new option "hz=" for datafile conversion. * Various updates to remove GCC v9/v10 warnings. * sar: Don't check if we are close enough to selected interval when interval=1 [12.2.2]. * sadf: Use actual number of items, not its pointer address [12.2.2]. * [Sdrkun]: sa1: Create default sa directory if it doesn't exist [12.2.2]. * pr_stats.c: Printing timestamp should appear only once [12.2.2]. * common.c: Remove unused get_dev_part_nr() function [12.2.2]. * DTD and XSD documents updated. * sar and sadf manual pages updated. * Non regression tests updated. New tests added (sar, iostat). * pidstat: Major code refactoring. Several bugs fixed. * pidstat: Don't display unneeded spaces following command name when option -l is used. * cifsiostat: Major code refactoring. * simtest: Add test environment for pidstat command. * simtest: Add new non regression tests for iostat command. * pidstat: Remove extra space at end of command name [12.2.2]. * [Anatoly Pugachev]: Fix sa2 script, so it wont complain on empty list for compress program [12.2.2]. * iostat: Make sure pointer on linked list is initialized [12.2.2]. * [Fabrice Fontaine]: Makefile: Link with -lintl if needed [12.2.2]. * NLS translation updated. OBS-URL: https://build.opensuse.org/request/show/804970 OBS-URL: https://build.opensuse.org/package/show/Base:System/sysstat?expand=0&rev=109
2020-05-13 11:35:04 +02:00
URL: https://github.com/sysstat/sysstat
Source: https://github.com/sysstat/sysstat/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1: isag.desktop
# PATCH-FIX-OPENSUSE should be upstreamed
# add locking to scripts sa1 and sa2 (bnc#7861)
Patch0: sysstat-8.1.6-sa1sa2lock.diff
# PATCH-FIX-OPENSUSE should be upstreamed
# use getpagesize() instead of kb_shift for hugetable archs
Patch2: sysstat-8.0.4-pagesize.diff
# PATCH-FIX-OPENSUSE bsc#1151453
2019-12-13 09:28:11 +01:00
Patch3: sysstat-service.patch
# PATCH-FIX-OPENSUSE Temporarily disable failing tests on s390x and ppc64
2019-12-13 09:28:11 +01:00
Patch4: sysstat-disable-test-failures.patch
BuildRequires: findutils
BuildRequires: gettext-runtime
BuildRequires: pkgconfig
BuildRequires: sed
BuildRequires: systemd-rpm-macros
BuildRequires: update-desktop-files
BuildRequires: pkgconfig(systemd)
Requires: procmail
Requires: xz
%{?systemd_requires}
%ifnarch s390 s390x
BuildRequires: libsensors4-devel
%endif
%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
inspection. Both commands now support SMP machines when displaying CPU
utilization.
%package isag
Summary: Interactive System Activity Grapher for sysstat
Group: System/Monitoring
Requires: gnuplot
Requires: sysstat = %{version}
Requires: tk
%description isag
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.
%prep
%setup -q
%patch0 -p1
%patch2 -p1
%patch3 -p1
%ifarch s390x ppc64
2019-12-13 09:28:11 +01:00
%patch4 -p1
%endif
cp %{S:1} .
# remove date and time from objects
find ./ -name \*.c -exec sed -i -e 's: " compiled " __DATE__ " " __TIME__::g' {} \;
%build
export conf_dir="%{_sysconfdir}/sysstat"
export sa_lib_dir="%{_libdir}/sa"
2019-12-13 09:28:11 +01:00
export cron_owner=root
export LFLAGS="-L. -lsyscom"
export history="60"
export sadc_options="-S ALL"
%configure \
--enable-install-cron \
--disable-silent-rules \
--enable-nls \
--disable-man-group \
--enable-copy-only \
--disable-file-attr \
--enable-debug-info \
%ifnarch s390 s390x
--enable-sensors \
%endif
--disable-stripping
make %{?_smp_mflags}
%install
mkdir -p %{buildroot}%{_localstatedir}/log/sa %{buildroot}%{_sbindir}
%make_install
install -D -m 0644 isag.desktop %{buildroot}%{_datadir}/applications/isag.desktop
%suse_update_desktop_file isag
cp contrib/isag/isag %{buildroot}%{_bindir}
cp contrib/isag/isag.1 %{buildroot}%{_mandir}/man1
rm -rf %{buildroot}%{_datadir}/doc/sysstat*
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcsysstat
%find_lang %{name}
%check
2019-12-13 09:28:11 +01:00
# Newer versions only have simulation tests
# make %%{?_smp_mflags} test
%pre
%service_add_pre sysstat.service sysstat-collect.timer sysstat-summary.timer
%post
%service_add_post sysstat.service sysstat-collect.timer sysstat-summary.timer
%preun
%service_del_preun sysstat.service sysstat-collect.timer sysstat-summary.timer
[ "$1" -gt 0 ] || rm -rf %{_localstatedir}/log/sa/*
%postun
%service_del_postun sysstat.service sysstat-collect.timer sysstat-summary.timer
%if 0%{?suse_version} < 1500
%post isag
%desktop_database_post
%postun isag
%desktop_database_postun
%endif
%files -f "%{name}.lang"
%license COPYING
%doc CHANGES CREDITS FAQ.md README.md
%{_mandir}/man1/*
%{_mandir}/man5/*
%{_mandir}/man8/*
%exclude %{_mandir}/man1/isag*
%dir %{_sysconfdir}/sysstat
%config(noreplace) %{_sysconfdir}/sysstat/sysstat
%attr(644,root,root) %config(noreplace) %{_sysconfdir}/sysstat/sysstat.ioconf
%{_bindir}/cifsiostat
%{_bindir}/iostat
%{_bindir}/mpstat
%{_bindir}/pidstat
%{_bindir}/sadf
%{_bindir}/sar
%{_bindir}/tapestat
%exclude %{_bindir}/isag
%{_libdir}/sa
%{_unitdir}/sysstat.service
%{_unitdir}/sysstat-collect.service
%{_unitdir}/sysstat-collect.timer
%{_unitdir}/sysstat-summary.service
%{_unitdir}/sysstat-summary.timer
%dir %{_localstatedir}/log/sa
%{_sbindir}/rcsysstat
%files isag
%doc contrib/isag/README-isag
%{_mandir}/man1/isag*
%{_bindir}/isag
%{_datadir}/applications/isag.desktop
%changelog