diff --git a/backport-patch-fix-checking-truncated-process-names.patch b/backport-patch-fix-checking-truncated-process-names.patch deleted file mode 100644 index 1dc91cd..0000000 --- a/backport-patch-fix-checking-truncated-process-names.patch +++ /dev/null @@ -1,85 +0,0 @@ -From fb2a412e086be7169e42b7169292c35f9e3063ce Mon Sep 17 00:00:00 2001 -From: cielavenir -Date: Fri, 9 Jul 2021 14:27:30 +0900 -Subject: [PATCH 1/2] killall: call load_proc_cmdline if the length is - OLD_COMM_LEN-1 as well - ---- - src/killall.c | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - -diff --git a/src/killall.c b/src/killall.c -index 9fab8f5..645aaa1 100644 ---- a/src/killall.c -+++ b/src/killall.c -@@ -426,7 +426,7 @@ load_process_name_and_age(char *comm, double *process_age_sec, - } - - static int --load_proc_cmdline(const pid_t pid, const char *comm, char **command, int *got_long) -+load_proc_cmdline(const pid_t pid, const char *comm, const int check_comm_length, char **command, int *got_long) - { - FILE *file; - char *path, *p, *command_buf; -@@ -482,7 +482,7 @@ load_proc_cmdline(const pid_t pid, const char *comm, char **command, int *got_lo - } - p = strrchr(command_buf,'/'); - p = p ? p+1 : command_buf; -- if (strncmp(p, comm, COMM_LEN-1) == 0) { -+ if (strncmp(p, comm, check_comm_length) == 0) { - okay = 1; - if (!(*command = strdup(p))) { - free(command_buf); -@@ -664,8 +664,9 @@ kill_all(int signal, int name_count, char **namelist, struct passwd *pwent, - free(command); - command = NULL; - } -- if (length == COMM_LEN - 1) -- if (load_proc_cmdline(pid_table[i], comm, &command, &got_long) < 0) -+ -+ if (length == COMM_LEN - 1 || length == OLD_COMM_LEN - 1) -+ if (load_proc_cmdline(pid_table[i], comm, length, &command, &got_long) < 0) - continue; - - /* match by process name */ --- -GitLab - - -From 43af55f4c4e5972a1354c6cafeca85ecd38dc122 Mon Sep 17 00:00:00 2001 -From: cielavenir -Date: Fri, 9 Jul 2021 14:30:37 +0900 -Subject: [PATCH 2/2] killall: match_process_name comparision with got_long - should be full-length - ---- - src/killall.c | 6 ++---- - 1 file changed, 2 insertions(+), 4 deletions(-) - -diff --git a/src/killall.c b/src/killall.c -index 645aaa1..7bfb9a9 100644 ---- a/src/killall.c -+++ b/src/killall.c -@@ -564,8 +564,7 @@ static int match_process_name( - { - if (got_long) - { -- return (0 == strncmp2 (match_name, proc_cmdline, OLD_COMM_LEN - 1, -- ignore_case)); -+ return (0 == strcmp2 (match_name, proc_cmdline, ignore_case)); - } else { - return (0 == strncmp2 (match_name, proc_comm, OLD_COMM_LEN - 1, - ignore_case)); -@@ -576,8 +575,7 @@ static int match_process_name( - { - if (got_long) - { -- return (0 == strncmp2 (match_name, proc_cmdline, COMM_LEN - 1, -- ignore_case)); -+ return (0 == strcmp2 (match_name, proc_cmdline, ignore_case)); - } else { - return (0 == strncmp2 (match_name, proc_comm, COMM_LEN - 1, - ignore_case)); --- -GitLab - diff --git a/psmisc-23.4.tar.xz b/psmisc-23.4.tar.xz deleted file mode 100644 index d1b51bd..0000000 Binary files a/psmisc-23.4.tar.xz and /dev/null differ diff --git a/psmisc-23.6.tar.xz b/psmisc-23.6.tar.xz new file mode 100644 index 0000000..048e271 Binary files /dev/null and b/psmisc-23.6.tar.xz differ diff --git a/psmisc.spec b/psmisc.spec index 5e01182..89b0603 100644 --- a/psmisc.spec +++ b/psmisc.spec @@ -1,14 +1,11 @@ Name: psmisc -Version: 23.4 -Release: 2 +Version: 23.6 +Release: 1 Summary: Utilities for managing processes on your system License: GPLv2+ URL: https://gitlab.com/psmisc/psmisc Source0: https://sourceforge.net/projects/%{name}/files/%{name}/%{name}-%{version}.tar.xz - -Patch6000: backport-patch-fix-checking-truncated-process-names.patch - -BuildRequires: libselinux-devel gettext ncurses-devel autoconf automake gcc +BuildRequires: libselinux-devel gettext gettext-devel ncurses-devel autoconf automake gcc %description This PSmisc package is a set of some small useful utilities that use the proc @@ -19,6 +16,8 @@ administrator with some help in common tasks. %autosetup -n %{name}-%{version} -p1 %build +echo %{version} > .tarball-version +./autogen.sh %configure --prefix=%{_prefix} --enable-selinux %make_build @@ -36,6 +35,9 @@ mv $RPM_BUILD_ROOT%{_bindir}/fuser $RPM_BUILD_ROOT%{_sbindir} %doc AUTHORS ChangeLog README %changelog +* Thu Feb 09 2023 zhujin - 23.6-1 +- upgrade to 23.6 + * Thu Aug 11 2022 liutie - 23.4-2 - Fix checking truncated process names