Accepting request 1179169 from home:pgajdos

- version update to 12.7.5
  2023/12/17: Version 12.7.5 - Sebastien Godard (sysstat <at> orange.fr)
	* [Quan quan Cao]: sar/sadc: Add new metrics pgprom/s and pgdem/s.
	* sar: Remove %vmeff metric.
	* sadf: Update various output formats to take into account metrics
	  that have been added or removed.
	* Update DTD and XSD documents.
	* Update sar manual page.
	* sar: Add a cron entry and a new systemd service and timer to rotate
	  daily data file at midnight.
	* Option -V with sysstat commands also displays environment contents.
	* [Sam Morris]: Use correct encoding to produce hyphen-minus when
	  rendering man pages.
	* Add UMASK variable definition to sysstat(5) manual page.
	* Update non regression tests.
	* Add --getenv option to commands that didn't have it.
	* Update README file for Debian-based distros.
	* Update link to my personal web page in README and manual pages.
	* NLS: Translations updated.
  2023/06/18: Version 12.7.4 - Sebastien Godard (sysstat <at> orange.fr)
	* Makefile.in: Fix installation error.
	* Makefile.in: Remove gcc warning displayed in LTO mode.
  2023/06/16: Version 12.7.3 - Sebastien Godard (sysstat <at> orange.fr)
	* sar: Add new option '-x' used to display extended reports.
	* [Pavel Kopylov]: Fix an overflow which is still possible for
	  some values.
	* [Jan Kurik]: Fix export of PSI metrics to a PCP archive.
	* [Lukáš Zaoral]: Tools that take `--dec=X` option should only accept
	  digits.
	* common.c: Fix an overflow which was still possible for some values.

OBS-URL: https://build.opensuse.org/request/show/1179169
OBS-URL: https://build.opensuse.org/package/show/Base:System/sysstat?expand=0&rev=151
This commit is contained in:
David Anes 2024-06-11 20:26:16 +00:00 committed by Git OBS Bridge
parent 40592b751a
commit 85dc38b6b9
7 changed files with 149 additions and 74 deletions

BIN
sysstat-12.6.2.tar.gz (Stored with Git LFS)

Binary file not shown.

3
sysstat-12.7.5.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a4d30e37c0c894214b941b51184723e19d492118c946cfdeac74b6d1f0068016
size 1528558

View File

@ -1,8 +1,8 @@
Index: sysstat-11.6.1/common.h
Index: sysstat-12.7.5/common.h
===================================================================
--- sysstat-11.6.1.orig/common.h
+++ sysstat-11.6.1/common.h
@@ -178,8 +178,8 @@ extern unsigned int kb_shift;
--- sysstat-12.7.5.orig/common.h
+++ sysstat-12.7.5/common.h
@@ -191,8 +191,8 @@ extern unsigned int kb_shift;
* kB <-> number of pages.
* Page size depends on machine architecture (4 kB, 8 kB, 16 kB, 64 kB...)
*/

View File

@ -1,7 +1,7 @@
Index: sysstat-12.6.0/sa1.in
Index: sysstat-12.7.5/sa1.in
===================================================================
--- sysstat-12.6.0.orig/sa1.in
+++ sysstat-12.6.0/sa1.in
--- sysstat-12.7.5.orig/sa1.in
+++ sysstat-12.7.5/sa1.in
@@ -31,8 +31,14 @@ then
LONG_NAME=y
fi
@ -34,10 +34,10 @@ Index: sysstat-12.6.0/sa1.in
- exec ${ENDIR}/sadc -F -L ${SADC_OPTIONS} $* ${SA_DIR}
+ ${ENDIR}/sadc -F -L ${SADC_OPTIONS} $* ${SA_DIR}
fi
Index: sysstat-12.6.0/sa2.in
Index: sysstat-12.7.5/sa2.in
===================================================================
--- sysstat-12.6.0.orig/sa2.in
+++ sysstat-12.6.0/sa2.in
--- sysstat-12.7.5.orig/sa2.in
+++ sysstat-12.7.5/sa2.in
@@ -59,6 +59,17 @@ fi
[ -f "${DFILE}" ] || exit 0
@ -55,4 +55,4 @@ Index: sysstat-12.6.0/sa2.in
+
if [ x${REPORTS} != xfalse ]
then
${ENDIR}/sar $* -f ${DFILE} > ${RPT}
S_REPEAT_HEADER=${REPEAT_HEADER} ${ENDIR}/sar $* -f ${DFILE} > ${RPT}

View File

@ -1,38 +0,0 @@
From 954ff2e2673cef48f0ed44668c466eab041db387 Mon Sep 17 00:00:00 2001
From: Pavel Kopylov <pkopylov@cloudlinux.com>
Date: Wed, 17 May 2023 11:33:45 +0200
Subject: [PATCH] Fix an overflow which is still possible for some values.
---
common.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
Index: sysstat-12.6.2/common.c
===================================================================
--- sysstat-12.6.2.orig/common.c
+++ sysstat-12.6.2/common.c
@@ -447,15 +447,17 @@ int check_dir(char *dirname)
void check_overflow(unsigned int val1, unsigned int val2,
unsigned int val3)
{
- if ((unsigned long long) val1 * (unsigned long long) val2 *
- (unsigned long long) val3 > UINT_MAX) {
+ if ((val1 != 0) && (val2 != 0) && (val3 != 0) &&
+ (((unsigned long long) UINT_MAX / (unsigned long long) val1 <
+ (unsigned long long) val2) ||
+ ((unsigned long long) UINT_MAX / ((unsigned long long) val1 * (unsigned long long) val2) <
+ (unsigned long long) val3))) {
#ifdef DEBUG
- fprintf(stderr, "%s: Overflow detected (%llu). Aborting...\n",
- __FUNCTION__, (unsigned long long) val1 * (unsigned long long) val2 *
- (unsigned long long) val3);
+ fprintf(stderr, "%s: Overflow detected (%u,%u,%u). Aborting...\n",
+ __FUNCTION__, val1, val2, val3);
#endif
- exit(4);
- }
+ exit(4);
+ }
}
#ifndef SOURCE_SADC

View File

@ -1,3 +1,129 @@
-------------------------------------------------------------------
Fri Jun 7 08:58:41 UTC 2024 - pgajdos@suse.com
- version update to 12.7.5
2023/12/17: Version 12.7.5 - Sebastien Godard (sysstat <at> orange.fr)
* [Quan quan Cao]: sar/sadc: Add new metrics pgprom/s and pgdem/s.
* sar: Remove %vmeff metric.
* sadf: Update various output formats to take into account metrics
that have been added or removed.
* Update DTD and XSD documents.
* Update sar manual page.
* sar: Add a cron entry and a new systemd service and timer to rotate
daily data file at midnight.
* Option -V with sysstat commands also displays environment contents.
* [Sam Morris]: Use correct encoding to produce hyphen-minus when
rendering man pages.
* Add UMASK variable definition to sysstat(5) manual page.
* Update non regression tests.
* Add --getenv option to commands that didn't have it.
* Update README file for Debian-based distros.
* Update link to my personal web page in README and manual pages.
* NLS: Translations updated.
2023/06/18: Version 12.7.4 - Sebastien Godard (sysstat <at> orange.fr)
* Makefile.in: Fix installation error.
* Makefile.in: Remove gcc warning displayed in LTO mode.
2023/06/16: Version 12.7.3 - Sebastien Godard (sysstat <at> orange.fr)
* sar: Add new option '-x' used to display extended reports.
* [Pavel Kopylov]: Fix an overflow which is still possible for
some values.
* [Jan Kurik]: Fix export of PSI metrics to a PCP archive.
* [Lukáš Zaoral]: Tools that take `--dec=X` option should only accept
digits.
* common.c: Fix an overflow which was still possible for some values.
* iostat: Try to avoid displaying negative values.
* Free pointer if realloc() fails.
* Don't check if unsigned expressions are less than zero.
* Declare parameters with "const" when possible.
* Remove conditions which are always true.
* Reduce variables scope when relevant.
* Don't assign values that are never used.
* Fix types used in format strings.
* Split large functions into smaller ones.
* Specify field width when using sscanf() function.
* search_list_item(): Return position in list instead of a boolean.
* add_list_item(): Also return item position in list.
* svg_stats.c: Ignore negative values for fields position.
* svg_stats.c: Reuse buffers pointers definition.
* svg_stats.c: Reuse intermediate calculations.
* svg_stats.c: Don't repeat test on DISPLAY_CPU_DEF().
* sa_common.c: Don't use (void *) pointer in calculation.
* iostat.c: Clarify calculation precedence for '+' and '?'.
* sar/sadf: Refactor buffer allocation functions.
* sar/sadf: Add a check on file's records header data.
* sar/sadf: Stop when invalid data are read in records header.
* sar/sadf: Check upper bounds of value read from file.
* sadf_misc.c: Fix indentation in code.
* activity.c: Init item_list even for other commands than sadf.
* sa_conv.c: Reallocate buffers only when needed.
* sa_conv.c: Fix untrusted allocation size.
* pr_stats.c: Remove some dead code.
* sar.c: Make sure buffer is null terminated.
* do_test: Add several new options.
* do_test: Don't strip binaries when in TEST mode.
* Update non regression tests.
* simtest: Change default _unix_time value.
* Makefile.in: Simplify dependencies.
* Makefile_in: Small update made to copyyear target.
* sadf: XML: Update DTD and XSD documents.
* sadf: XML: Remove references to my personal web site.
* Restore mode for iconfig file.
* Fix typo in sar's manual page. Sar manual page updated.
* Other manual pages updated.
2023/01/29: Version 12.7.2 - Sebastien Godard (sysstat <at> orange.fr)
* All commands: Avoid displaying healthy metrics values in "red".
* sar/sadf: Add new activity: Battery statistics (A_PWR_BAT).
* [Kevin Stubbings]: Add CodeQL workflow.
* sar: Make sure timestamps are always displayed in local time.
* sar/sadf: Starting and ending times used with options -s/-e can now
be entered as a number of seconds since the epoch.
* sar/sadf: Strengthen tests made on arguments given to options -s/-e.
* sadf: PCP: Fix pmiID used for two USB metrics [12.6.2].
* [Nathanael P Wilson]: sadf: Fix extra space when no TZ printed.
* sadc: Add another overflow check [12.6.2].
* DTD and XSD documents updated.
* Makefile: Fix dependencies.
* NLS translations updated. New Belarusian translation added.
* Remove LGTM links from README file.
* Manual pages updated.
* Non regression tests updated.
2022/11/06: Version 12.7.1 - Sebastien Godard (sysstat <at> orange.fr)
* Fix possible overflow in sa_common.c (GHSL-2022-074) [12.6.1].
* sadf: Add support for option -t with SVG output to make it possible
to display timestamps in the same locale as that of the file creator.
* sadf: Print timezone instead of UTC in true time mode. Timezone is
also displayed in local time.
* sadf: PCP: Fix timestamps written to PCP archive file.
* sar: Add new environment variable S_REPEAT_HEADER.
* pidstat: Return exit code of the process that was monitored with option
-e.
* mpstat: Add option -H to handle vCPU physical hotplug.
* Add local, xlocal and debug targets to iconfig script.
* Turn off gcc's tree-slp-vectorize option which was making sadf crash
in some situations.
* sa_conv.c: Make size of statistics structures from older sysstat
versions immutable [12.6.1].
* [Bernhard M. Wiedemann]: Declare sadc dependency on libsyscom.a
[12.6.1].
* [Steve Kay]: Fix gcc v11.2 warnings [12.6.1].
* [Steve Kay]: Various cosmetic fixes [12.6.1].
* [Jan Christoph Uhde]: sar: Remove `-I int_list` from man-page and
help [12.6.1].
* [Frank Dana]: Consolidate systemctl commands in README file [12.6.1].
* [Rong Tao]: Remove whitespace characters at the end of lines
[12.6.1].
* Update configure file to deal with newer autoconf version. configure.in
file is renamed to configure.ac.
* Update DTD and XSD documents.
* sar and sysstat manual pages updated.
* NLS updated. Add new Georgian translation.
* Non regression tests updated.
- modified patches
% sysstat-8.0.4-pagesize.diff (refreshed)
% sysstat-8.1.6-sa1sa2lock.diff (refreshed)
- deleted patches
- sysstat-CVE-2023-33204.patch (upstreamed)
-------------------------------------------------------------------
Mon Feb 26 13:34:52 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>

View File

@ -1,7 +1,7 @@
#
# spec file for package sysstat
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -17,7 +17,7 @@
Name: sysstat
Version: 12.6.2
Version: 12.7.5
Release: 0
Summary: Sar and Iostat Commands for Linux
License: GPL-2.0-or-later
@ -34,8 +34,6 @@ Patch2: sysstat-8.0.4-pagesize.diff
# PATCH-FIX-OPENSUSE bsc#1151453
Patch3: sysstat-service.patch
Patch4: harden_sysstat.service.patch
# PATCH-FIX-UPSTREAM CVE-2023-33204, bsc#1211507 https://github.com/sysstat/sysstat/pull/360.patch
Patch5: sysstat-CVE-2023-33204.patch
BuildRequires: findutils
BuildRequires: gettext-runtime
BuildRequires: libpcp-devel
@ -72,15 +70,10 @@ system activity data stored in a binary data produced by a sar command
from a sysstat package.
%prep
%setup -q
%patch -P 0 -p1
%patch -P 2 -p1
%patch -P 3 -p1
%autosetup -p1
cp %{SOURCE1} .
# remove date and time from objects
find ./ -name \*.c -exec sed -i -e 's: " compiled " __DATE__ " " __TIME__::g' {} \;
%patch -P 4 -p1
%patch -P 5 -p1
%build
export conf_dir="%{_sysconfdir}/sysstat"
@ -122,27 +115,19 @@ ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcsysstat
# make %%{?_smp_mflags} test
%pre
%service_add_pre sysstat.service sysstat-collect.timer sysstat-summary.timer
%service_add_pre sysstat.service sysstat-collect.service sysstat-collect.timer sysstat-summary.service sysstat-summary.timer sysstat-rotate.service syssstat-rotate.timer
%post
%service_add_post sysstat.service sysstat-collect.timer sysstat-summary.timer
%service_add_post sysstat.service sysstat-collect.service sysstat-collect.timer sysstat-summary.service sysstat-summary.timer sysstat-rotate.service syssstat-rotate.timer
# Earlier versions used cron, remove leftover
rm -f /etc/cron.d/sysstat || :
%preun
%service_del_preun sysstat.service sysstat-collect.timer sysstat-summary.timer
%service_del_preun sysstat.service sysstat-collect.service sysstat-collect.timer sysstat-summary.service sysstat-summary.timer sysstat-rotate.service syssstat-rotate.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
%service_del_postun sysstat.service sysstat-collect.service sysstat-collect.timer sysstat-summary.service sysstat-summary.timer sysstat-rotate.service syssstat-rotate.timer
%files -f "%{name}.lang"
%license COPYING
@ -169,6 +154,8 @@ rm -f /etc/cron.d/sysstat || :
%{_unitdir}/sysstat-collect.timer
%{_unitdir}/sysstat-summary.service
%{_unitdir}/sysstat-summary.timer
%{_unitdir}/sysstat-rotate.service
%{_unitdir}/sysstat-rotate.timer
%{_systemd_util_dir}/system-sleep/sysstat.sleep
%dir %{_localstatedir}/log/sa
%{_sbindir}/rcsysstat