From a06fd6533eb568aaf932f98525363b77a5638c9e Mon Sep 17 00:00:00 2001 From: Jan Rybar Date: Thu, 29 Sep 2022 17:20:37 +0200 Subject: [PATCH] free: backport 91e58792: fix --si option + cleanup Resolves: bz#2083789 --- free-si-fix.patch | 12 ++++++++++++ procps-ng.spec | 7 ++++++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 free-si-fix.patch diff --git a/free-si-fix.patch b/free-si-fix.patch new file mode 100644 index 0000000..c414a98 --- /dev/null +++ b/free-si-fix.patch @@ -0,0 +1,12 @@ +diff -up ./free.c.ori ./free.c +--- ./free.c.ori 2022-09-20 15:02:22.469320938 +0200 ++++ ./free.c 2022-09-20 15:03:33.767710892 +0200 +@@ -120,7 +120,7 @@ static const char *scale_size(unsigned l + + /* default output */ + if (args.exponent == 0 && !(flags & FREE_HUMANREADABLE)) { +- snprintf(buf, sizeof(buf), "%ld", size); ++ snprintf(buf, sizeof(buf), "%ld", (long)( ((long long int)size) * 1024 / (long long int)base)); + return buf; + } + diff --git a/procps-ng.spec b/procps-ng.spec index 2bb8f41..8217782 100644 --- a/procps-ng.spec +++ b/procps-ng.spec @@ -4,7 +4,7 @@ Summary: System and process monitoring utilities Name: procps-ng Version: 3.3.17 -Release: 6%{?dist} +Release: 7%{?dist} License: GPL+ and GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ URL: https://sourceforge.net/projects/procps-ng/ @@ -18,6 +18,7 @@ Source2: README.top Patch1: pwait-to-pidwait.patch Patch2: covscan-findings.patch Patch3: sysctl-hyphen-param.patch +Patch4: free-si-fix.patch BuildRequires: make @@ -161,6 +162,10 @@ ln -s %{_bindir}/pidof %{buildroot}%{_sbindir}/pidof %files i18n -f %{name}.lang %changelog +* Mon Sep 19 2022 Jan Rybar - 3.3.17-7 +- free: backport 91e58792: fix --si option + cleanup +- Resolves: bz#2083789 + * Fri Jul 22 2022 Fedora Release Engineering - 3.3.17-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild