diff --git a/backport-vmstat-Update-memory-statistics.patch b/backport-vmstat-Update-memory-statistics.patch deleted file mode 100644 index 5802a115bba5bc8cf2c1bfccedfaa5b878074414..0000000000000000000000000000000000000000 --- a/backport-vmstat-Update-memory-statistics.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 7e24816538b777fe0b3f709df3b9c1824681461c Mon Sep 17 00:00:00 2001 -From: Ingo Saitz -Date: Fri, 6 Jan 2023 13:30:39 +1100 -Subject: [PATCH] vmstat: Update memory statistics - -vmstat would update most fields, but the memory statistics -were only fetched the first time. - -References: - https://bugs.debian.org/1027963 - -Signed-off-by: Craig Small ---- - NEWS | 1 + - src/vmstat.c | 3 +++ - 2 files changed, 4 insertions(+) - -diff --git a/NEWS b/NEWS -index 2d13978..fade38f 100644 ---- a/NEWS -+++ b/NEWS -@@ -2,6 +2,7 @@ procps-ng-NEXT - --------------- - * docs: Don't install English manpages twice - * skill: Match on -p again Debian #1025915 -+ * vmstat: Referesh memory statistics Debian #1027963 - procps-ng-4.0.2 - --------------- - * library revision - 0:1:0 -diff --git a/src/vmstat.c b/src/vmstat.c -index 8610983..acb7b80 100644 ---- a/src/vmstat.c -+++ b/src/vmstat.c -@@ -468,6 +468,9 @@ static void new_format(void) - pswpin[tog] = VMSTAT_GET(vm_info, VMSTAT_PSWPIN, ul_int); - pswpout[tog] = VMSTAT_GET(vm_info, VMSTAT_PSWPOUT, ul_int); - -+ if (!(mem_stack = procps_meminfo_select(mem_info, Mem_items, MAX_mem))) -+ xerrx(EXIT_FAILURE, _("Unable to select memory information")); -+ - if (t_option) { - (void) time( &the_time ); - tm_ptr = localtime( &the_time ); --- -2.33.0 - diff --git a/procps-ng-4.0.2.tar.xz b/procps-ng-4.0.2.tar.xz deleted file mode 100644 index 8ebf3053e7530340f9da4bcbc543e70f7e4722a7..0000000000000000000000000000000000000000 Binary files a/procps-ng-4.0.2.tar.xz and /dev/null differ diff --git a/procps-ng-4.0.3.tar.xz b/procps-ng-4.0.3.tar.xz new file mode 100644 index 0000000000000000000000000000000000000000..759b4df20decc9547af740ce6909bf83b3b42777 Binary files /dev/null and b/procps-ng-4.0.3.tar.xz differ diff --git a/procps-ng.spec b/procps-ng.spec index 8ea3276f64e407e27269efeb2fdf0d7543e95db7..2d69b7df2f9f9fbce483291595fff5e9e2f6c92b 100644 --- a/procps-ng.spec +++ b/procps-ng.spec @@ -1,6 +1,6 @@ Name: procps-ng -Version: 4.0.2 -Release: 10 +Version: 4.0.3 +Release: 1 Summary: Utilities that provide system information. License: GPL+ and GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ URL: https://sourceforge.net/projects/procps-ng/ @@ -11,17 +11,15 @@ Source2: README.top Patch1: openeuler-add-M-and-N-options-for-top.patch Patch2: openeuler-top-exit-with-error-when-pid-overflow.patch -Patch3: skill-Restore-the-p-flag-functionality.patch -Patch4: backport-top-address-the-missing-guest-tics-for-summary-area.patch -Patch5: backport-0001-ps-address-missing-or-corrupted-fields-with-m-option.patch -Patch6: backport-0002-ps-trade-previous-fix-for-final-solution-to-m-option.patch -Patch7: backport-top-lessen-summary-cpu-distortions-with-first-displa.patch -Patch8: backport-pmap-Increase-memory-allocation-failure-judgment.patch -Patch9: backport-top-added-guest-tics-when-multiple-cpus-were-merged.patch -Patch10: backport-library-restore-the-proper-main-thread-tics-valuation.patch -Patch11: backport-vmstat-Update-memory-statistics.patch -Patch12: backport-vmstat-Print-guest-time.patch -Patch13: backport-ps-Fix-possible-buffer-overflow-in-C-option.patch +Patch3: backport-top-address-the-missing-guest-tics-for-summary-area.patch +Patch4: backport-0001-ps-address-missing-or-corrupted-fields-with-m-option.patch +Patch5: backport-0002-ps-trade-previous-fix-for-final-solution-to-m-option.patch +Patch6: backport-top-lessen-summary-cpu-distortions-with-first-displa.patch +Patch7: backport-pmap-Increase-memory-allocation-failure-judgment.patch +Patch8: backport-top-added-guest-tics-when-multiple-cpus-were-merged.patch +Patch9: backport-library-restore-the-proper-main-thread-tics-valuation.patch +Patch10: backport-vmstat-Print-guest-time.patch +Patch11: backport-ps-Fix-possible-buffer-overflow-in-C-option.patch BuildRequires: ncurses-devel libtool autoconf automake gcc gettext-devel systemd-devel @@ -104,6 +102,9 @@ ln -s %{_bindir}/pidof %{buildroot}%{_sbindir}/pidof %{_mandir}/man* %changelog +* Tue Aug 15 2023 Liu Chao - 4.0.3-1 +- Update to v4.0.3 + * Tue Aug 15 2023 Liu Chao - 4.0.2-10 - ps: Fix possible buffer overflow in -C option diff --git a/skill-Restore-the-p-flag-functionality.patch b/skill-Restore-the-p-flag-functionality.patch deleted file mode 100644 index 55065d128a762a9b489aaf34a23f3c233680d7bb..0000000000000000000000000000000000000000 --- a/skill-Restore-the-p-flag-functionality.patch +++ /dev/null @@ -1,85 +0,0 @@ -From f7a33746f8484629df9055f9a2dc5654f377c2fe Mon Sep 17 00:00:00 2001 -From: Craig Small -Date: Mon, 12 Dec 2022 16:46:36 +1100 -Subject: [PATCH] skill: Restore the -p flag functionality - -When the skill program was ported to the new API the code to filter -on PID, used by the -p option, was missed. It is now restored. - -References: - https://bugs.debian.org/1025915 - -Signed-off-by: Qiang Wei ---- - NEWS | 4 ++++ - src/skill.c | 2 ++ - testsuite/skill.test/skill.exp | 32 ++++++++++++++++++++++++++++++++ - 3 files changed, 38 insertions(+) - create mode 100644 testsuite/skill.test/skill.exp - -diff --git a/NEWS b/NEWS -index d334c0d6..2d13978d 100644 ---- a/NEWS -+++ b/NEWS -@@ -1,3 +1,7 @@ -+procps-ng-NEXT -+--------------- -+ * docs: Don't install English manpages twice -+ * skill: Match on -p again Debian #1025915 - procps-ng-4.0.2 - --------------- - * library revision - 0:1:0 -diff --git a/src/skill.c b/src/skill.c -index 9f617bfd..c2e52744 100644 ---- a/src/skill.c -+++ b/src/skill.c -@@ -287,6 +287,8 @@ static void scan_procs(struct run_time_conf_t *run_time) - for (i=0; i < total_procs; i++) { - if (PIDS_GETINT(PID) == my_pid || PIDS_GETINT(PID) == 0) - continue; -+ if (pids && !match_intlist(PIDS_GETINT(PID), pid_count, pids)) -+ continue; - if (uids && !match_intlist(PIDS_GETUNT(EUID), uid_count, (int *)uids)) - continue; - if (ttys && !match_intlist(PIDS_GETINT(TTY), tty_count, ttys)) -diff --git a/testsuite/skill.test/skill.exp b/testsuite/skill.test/skill.exp -new file mode 100644 -index 00000000..162d9610 ---- /dev/null -+++ b/testsuite/skill.test/skill.exp -@@ -0,0 +1,32 @@ -+# -+# Dejagnu testsuite for skill - part of procps -+# -+set skill ${topdir}src/skill -+set tty [ get_tty ] -+ -+if { ![ file exists $skill ] } { -+ untested { skipping (not built)} -+ return -+} -+ -+set test "skill with no arguments" -+spawn $skill -+expect_pass "$test" "Usage:\\s+\(lt-\)?skill \\\[signal\\\] \\\[options\\\] " -+ -+set test "skill list signal names" -+spawn $skill -l -+expect_pass "$test" "^\(\[A-Z12+-\]\\s*\)+$" -+ -+set test "skill list signal names in table" -+spawn $skill -L -+expect_pass "$test" "^\(\\s+\\d+ \[A-Z12+-\]+\)+\\s*$" -+ -+make_testproc -+ -+# Debian 1025915 -+set test "skill find one process" -+spawn $skill -n -p $testproc1_pid -+expect_pass "$test" "^$testproc1_pid\\s*$" -+ -+# Cleanup -+kill_testproc --- -2.33.0 -