Compare commits
1 Commits
Author | SHA256 | Date | |
---|---|---|---|
f29d548af1 |
36
procps-ng-4.0.5-bsc1246330.patch
Normal file
36
procps-ng-4.0.5-bsc1246330.patch
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
From edb4a8769c1edd99b7cf618fa1970325b7ecc55a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jim Warner <james.warner@comcast.net>
|
||||||
|
Date: Mon, 30 Dec 2024 00:00:00 -0600
|
||||||
|
Subject: [PATCH] uptime: address the 'raw' option 32-bit overflow issue
|
||||||
|
|
||||||
|
Linux ensures that time_t is at least 64 bits, even on
|
||||||
|
32 bit platforms, to prevent an overflow in year 2038.
|
||||||
|
|
||||||
|
This patch guarantees uptime won't negate that effort.
|
||||||
|
|
||||||
|
Reference(s):
|
||||||
|
https://gitlab.com/procps-ng/procps/-/issues/362
|
||||||
|
|
||||||
|
Signed-off-by: Jim Warner <james.warner@comcast.net>
|
||||||
|
---
|
||||||
|
src/uptime.c | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/uptime.c b/src/uptime.c
|
||||||
|
index a38486b0..b35ebdae 100644
|
||||||
|
--- src/uptime.c
|
||||||
|
+++ src/uptime.c
|
||||||
|
@@ -97,8 +97,8 @@ static void print_uptime_raw()
|
||||||
|
if (procps_loadavg(&av1, &av5, &av15) < 0)
|
||||||
|
xerrx(EXIT_FAILURE, "procps_loadavg");
|
||||||
|
|
||||||
|
- printf("%d %f %d %.2f %.2f %.2f\n",
|
||||||
|
- (int)realseconds, uptime_secs, users, av1, av5, av15);
|
||||||
|
+ printf("%lld %f %d %.2f %.2f %.2f\n",
|
||||||
|
+ (long long)realseconds, uptime_secs, users, av1, av5, av15);
|
||||||
|
}
|
||||||
|
static void __attribute__ ((__noreturn__)) usage(FILE * out)
|
||||||
|
{
|
||||||
|
--
|
||||||
|
GitLab
|
||||||
|
|
@@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Jul 11 12:30:21 UTC 2025 - Dr. Werner Fink <werner@suse.de>
|
||||||
|
|
||||||
|
- Add patch procps-ng-4.0.5-bsc1246330.patch
|
||||||
|
* Do not Fail in year 2038 (bsc#1246330)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Dec 19 14:34:39 UTC 2024 - Dr. Werner Fink <werner@suse.de>
|
Thu Dec 19 14:34:39 UTC 2024 - Dr. Werner Fink <werner@suse.de>
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package procps
|
# spec file for package procps
|
||||||
#
|
#
|
||||||
# Copyright (c) 2024 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@@ -39,6 +39,7 @@ Source2: procps-rpmlintrc
|
|||||||
Source3: procps.keyring
|
Source3: procps.keyring
|
||||||
# PATCH-FIX-USTREAM -- w: Don't crash when using short option
|
# PATCH-FIX-USTREAM -- w: Don't crash when using short option
|
||||||
Patch1: procps-v3.3.3-ia64.diff
|
Patch1: procps-v3.3.3-ia64.diff
|
||||||
|
Patch2: procps-ng-4.0.5-bsc1246330.patch
|
||||||
Patch3: procps-ng-3.3.9-w-notruncate.diff
|
Patch3: procps-ng-3.3.9-w-notruncate.diff
|
||||||
Patch7: procps-ng-3.3.8-readeof.patch
|
Patch7: procps-ng-3.3.8-readeof.patch
|
||||||
Patch8: procps-ng-3.3.10-slab.patch
|
Patch8: procps-ng-3.3.10-slab.patch
|
||||||
@@ -133,6 +134,7 @@ the process information pseudo-file system.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q -n procps-ng-%{version}
|
%setup -q -n procps-ng-%{version}
|
||||||
%patch -P1
|
%patch -P1
|
||||||
|
%patch -P2
|
||||||
%patch -P3 -p1 -b .trcate
|
%patch -P3 -p1 -b .trcate
|
||||||
%patch -P7 -b .rof
|
%patch -P7 -b .rof
|
||||||
%patch -P8 -b .cache
|
%patch -P8 -b .cache
|
||||||
|
Reference in New Issue
Block a user