import procps-ng-3.3.15-6.el8
This commit is contained in:
parent
9aa93a5648
commit
e55bb051d3
28
SOURCES/procps-ng-3.3.15-pgrep-uid-conversion-overflow.patch
Normal file
28
SOURCES/procps-ng-3.3.15-pgrep-uid-conversion-overflow.patch
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
commit c833a6241893c7e566a5eed762661942e4cd90d3
|
||||||
|
Author: Todd Lewis <utoddl@gmail.com>
|
||||||
|
Date: Mon Oct 29 18:33:48 2018 +0000
|
||||||
|
|
||||||
|
Fix user and group name to number conversion for uid/gid above 2^31.
|
||||||
|
|
||||||
|
diff --git a/pgrep.c b/pgrep.c
|
||||||
|
index bde7448..8b82a54 100644
|
||||||
|
--- a/pgrep.c
|
||||||
|
+++ b/pgrep.c
|
||||||
|
@@ -280,7 +280,7 @@ static int conv_uid (const char *restrict name, struct el *restrict e)
|
||||||
|
xwarnx(_("invalid user name: %s"), name);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
- e->num = pwd->pw_uid;
|
||||||
|
+ e->num = (int) pwd->pw_uid;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -297,7 +297,7 @@ static int conv_gid (const char *restrict name, struct el *restrict e)
|
||||||
|
xwarnx(_("invalid group name: %s"), name);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
- e->num = grp->gr_gid;
|
||||||
|
+ e->num = (int) grp->gr_gid;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
112
SOURCES/procps-ng-3.3.15-pidof-kernel-workers-option.patch
Normal file
112
SOURCES/procps-ng-3.3.15-pidof-kernel-workers-option.patch
Normal file
@ -0,0 +1,112 @@
|
|||||||
|
From d9b3415d2a761cb7669a67f5309665335d5eb4c4 Mon Sep 17 00:00:00 2001
|
||||||
|
From: rpm-build <rpm-build>
|
||||||
|
Date: Mon, 9 Nov 2020 16:10:22 +0100
|
||||||
|
Subject: [PATCH] New '-w' option for kernel workers.
|
||||||
|
|
||||||
|
---
|
||||||
|
pidof.1 | 3 +++
|
||||||
|
pidof.c | 17 ++++++++++++-----
|
||||||
|
2 files changed, 15 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/pidof.1 b/pidof.1
|
||||||
|
index 1368704..c85c088 100644
|
||||||
|
--- a/pidof.1
|
||||||
|
+++ b/pidof.1
|
||||||
|
@@ -45,6 +45,9 @@ the current root directory of processes they do not own.
|
||||||
|
.IP \-x
|
||||||
|
Scripts too - this causes the program to also return process id's of
|
||||||
|
shells running the named scripts.
|
||||||
|
+.IP \-w
|
||||||
|
+Show also processes that do not have visible command line (e.g. kernel
|
||||||
|
+worker threads).
|
||||||
|
.IP "-o \fIomitpid\fP"
|
||||||
|
Tells \fIpidof\fP to omit processes with that process id. The special
|
||||||
|
pid \fB%PPID\fP can be used to name the parent process of the \fIpidof\fP
|
||||||
|
diff --git a/pidof.c b/pidof.c
|
||||||
|
index 94e19bb..7fdf27a 100644
|
||||||
|
--- a/pidof.c
|
||||||
|
+++ b/pidof.c
|
||||||
|
@@ -55,6 +55,8 @@ static char *program = NULL;
|
||||||
|
static int opt_single_shot = 0; /* -s */
|
||||||
|
static int opt_scripts_too = 0; /* -x */
|
||||||
|
static int opt_rootdir_check = 0; /* -c */
|
||||||
|
+static int opt_with_workers = 0; /* -w */
|
||||||
|
+
|
||||||
|
|
||||||
|
static char *pidof_root = NULL;
|
||||||
|
|
||||||
|
@@ -69,6 +71,7 @@ static int __attribute__ ((__noreturn__)) usage(int opt)
|
||||||
|
fputs(_(" -s, --single-shot return one PID only\n"), fp);
|
||||||
|
fputs(_(" -c, --check-root omit processes with different root\n"), fp);
|
||||||
|
fputs(_(" -x also find shells running the named scripts\n"), fp);
|
||||||
|
+ fputs(_(" -w, --with-workers show kernel workers too\n"), fp);
|
||||||
|
fputs(_(" -o, --omit-pid <PID,...> omit processes with PID\n"), fp);
|
||||||
|
fputs(_(" -S, --separator SEP use SEP as separator put between PIDs"), fp);
|
||||||
|
fputs(USAGE_SEPARATOR, fp);
|
||||||
|
@@ -142,7 +145,6 @@ static void select_procs (void)
|
||||||
|
static int size = 0;
|
||||||
|
char *cmd_arg0, *cmd_arg0base;
|
||||||
|
char *cmd_arg1, *cmd_arg1base;
|
||||||
|
- char *stat_cmd;
|
||||||
|
char *program_base;
|
||||||
|
char *root_link;
|
||||||
|
char *exe_link;
|
||||||
|
@@ -168,10 +170,9 @@ static void select_procs (void)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (!is_omitted(task.XXXID)) {
|
||||||
|
+ if (!is_omitted(task.XXXID) && ((task.cmdline && *task.cmdline) || opt_with_workers)) {
|
||||||
|
|
||||||
|
cmd_arg0 = (task.cmdline && *task.cmdline) ? *task.cmdline : "\0";
|
||||||
|
- stat_cmd = task.cmd ? task.cmd : "\0";
|
||||||
|
|
||||||
|
/* processes starting with '-' are login shells */
|
||||||
|
if (*cmd_arg0 == '-') {
|
||||||
|
@@ -193,7 +194,7 @@ static void select_procs (void)
|
||||||
|
!strcmp(program_base, cmd_arg0) ||
|
||||||
|
!strcmp(program, cmd_arg0) ||
|
||||||
|
|
||||||
|
- !strcmp(program, stat_cmd) ||
|
||||||
|
+ (opt_with_workers && !strcmp(program, task.cmd)) ||
|
||||||
|
|
||||||
|
!strcmp(program, exe_link_base) ||
|
||||||
|
!strcmp(program, exe_link))
|
||||||
|
@@ -293,13 +294,14 @@ int main (int argc, char **argv)
|
||||||
|
int first_pid = 1;
|
||||||
|
|
||||||
|
const char *separator = " ";
|
||||||
|
- const char *opts = "scnxmo:S:?Vh";
|
||||||
|
+ const char *opts = "scnxwmo:S:?Vh";
|
||||||
|
|
||||||
|
static const struct option longopts[] = {
|
||||||
|
{"check-root", no_argument, NULL, 'c'},
|
||||||
|
{"single-shot", no_argument, NULL, 's'},
|
||||||
|
{"omit-pid", required_argument, NULL, 'o'},
|
||||||
|
{"separator", required_argument, NULL, 's'},
|
||||||
|
+ {"with-workers", no_argument, NULL, 'w'},
|
||||||
|
{"help", no_argument, NULL, 'h'},
|
||||||
|
{"version", no_argument, NULL, 'V'},
|
||||||
|
{NULL, 0, NULL, 0}
|
||||||
|
@@ -325,6 +327,9 @@ int main (int argc, char **argv)
|
||||||
|
case 'x':
|
||||||
|
opt_scripts_too = 1;
|
||||||
|
break;
|
||||||
|
+ case 'w':
|
||||||
|
+ opt_with_workers = 1;
|
||||||
|
+ break;
|
||||||
|
case 'c':
|
||||||
|
if (geteuid() == 0) {
|
||||||
|
opt_rootdir_check = 1;
|
||||||
|
@@ -358,6 +363,8 @@ int main (int argc, char **argv)
|
||||||
|
|
||||||
|
program = argv[optind++];
|
||||||
|
|
||||||
|
+ if (*program == '\0') continue;
|
||||||
|
+
|
||||||
|
select_procs(); /* get the list of matching processes */
|
||||||
|
|
||||||
|
if (proc_count) {
|
||||||
|
--
|
||||||
|
2.25.4
|
||||||
|
|
@ -0,0 +1,13 @@
|
|||||||
|
diff --git a/pidof.c b/pidof.c
|
||||||
|
index 7fdf27a..2166265 100644
|
||||||
|
--- a/pidof.c
|
||||||
|
+++ b/pidof.c
|
||||||
|
@@ -300,7 +300,7 @@ int main (int argc, char **argv)
|
||||||
|
{"check-root", no_argument, NULL, 'c'},
|
||||||
|
{"single-shot", no_argument, NULL, 's'},
|
||||||
|
{"omit-pid", required_argument, NULL, 'o'},
|
||||||
|
- {"separator", required_argument, NULL, 's'},
|
||||||
|
+ {"separator", required_argument, NULL, 'S'},
|
||||||
|
{"with-workers", no_argument, NULL, 'w'},
|
||||||
|
{"help", no_argument, NULL, 'h'},
|
||||||
|
{"version", no_argument, NULL, 'V'},
|
41
SOURCES/procps-ng-3.3.15-vmstat-watch-manpage.patch
Normal file
41
SOURCES/procps-ng-3.3.15-vmstat-watch-manpage.patch
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
commit 354b5a56bf2ea831427ab8268ec7101bd3870f8e
|
||||||
|
Author: Jan Rybar <jrybar@redhat.com>
|
||||||
|
Date: Thu Apr 30 17:06:18 2020 +0200
|
||||||
|
|
||||||
|
vmstat and watch manpage slight fixes
|
||||||
|
|
||||||
|
vmstat - align wording with proc manpage to clarify ambiguities (rhbz#1796043)
|
||||||
|
watch - manpage presumes ntp tools are present by default (which they're not on rpm and deb distros, rhbz#1583669)
|
||||||
|
|
||||||
|
diff --git a/vmstat.8 b/vmstat.8
|
||||||
|
index e408bca..dcc1b1e 100644
|
||||||
|
--- a/vmstat.8
|
||||||
|
+++ b/vmstat.8
|
||||||
|
@@ -93,7 +93,7 @@ Display help and exit.
|
||||||
|
.B "Procs"
|
||||||
|
.nf
|
||||||
|
r: The number of runnable processes (running or waiting for run time).
|
||||||
|
-b: The number of processes in uninterruptible sleep.
|
||||||
|
+b: The number of processes blocked waiting for I/O to complete.
|
||||||
|
.fi
|
||||||
|
.PP
|
||||||
|
.SS
|
||||||
|
diff --git a/watch.1 b/watch.1
|
||||||
|
index 256c36b..e06e04e 100644
|
||||||
|
--- a/watch.1
|
||||||
|
+++ b/watch.1
|
||||||
|
@@ -34,7 +34,7 @@ every
|
||||||
|
.I interval
|
||||||
|
seconds. Try it with
|
||||||
|
.B ntptime
|
||||||
|
-and notice how the fractional seconds stays (nearly) the same, as opposed to
|
||||||
|
+(if present) and notice how the fractional seconds stays (nearly) the same, as opposed to
|
||||||
|
normal mode where they continuously increase.
|
||||||
|
.TP
|
||||||
|
\fB\-t\fR, \fB\-\-no\-title\fR
|
||||||
|
@@ -190,4 +190,4 @@ watch uname \-r
|
||||||
|
.I \-p
|
||||||
|
isn't guaranteed to work across reboots, especially in the face of
|
||||||
|
.B ntpdate
|
||||||
|
-or other bootup time-changing mechanisms)
|
||||||
|
+(if present) or other bootup time-changing mechanisms)
|
@ -4,7 +4,7 @@
|
|||||||
Summary: System and process monitoring utilities
|
Summary: System and process monitoring utilities
|
||||||
Name: procps-ng
|
Name: procps-ng
|
||||||
Version: 3.3.15
|
Version: 3.3.15
|
||||||
Release: 2%{?dist}
|
Release: 6%{?dist}
|
||||||
License: GPL+ and GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+
|
License: GPL+ and GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+
|
||||||
Group: Applications/System
|
Group: Applications/System
|
||||||
URL: https://sourceforge.net/projects/procps-ng/
|
URL: https://sourceforge.net/projects/procps-ng/
|
||||||
@ -17,6 +17,10 @@ Source1: README.md
|
|||||||
Source2: README.top
|
Source2: README.top
|
||||||
|
|
||||||
Patch1: procps-ng-3.3.15-pidof-show-worker-threads.patch
|
Patch1: procps-ng-3.3.15-pidof-show-worker-threads.patch
|
||||||
|
Patch2: procps-ng-3.3.15-pgrep-uid-conversion-overflow.patch
|
||||||
|
Patch3: procps-ng-3.3.15-vmstat-watch-manpage.patch
|
||||||
|
Patch4: procps-ng-3.3.15-pidof-kernel-workers-option.patch
|
||||||
|
Patch5: procps-ng-3.3.15-pidof-separator-option-backport.patch
|
||||||
|
|
||||||
BuildRequires: ncurses-devel
|
BuildRequires: ncurses-devel
|
||||||
BuildRequires: libtool
|
BuildRequires: libtool
|
||||||
@ -159,6 +163,31 @@ ln -s %{_bindir}/pidof %{buildroot}%{_sbindir}/pidof
|
|||||||
%files i18n -f %{name}.lang
|
%files i18n -f %{name}.lang
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Dec 01 2020 Jan Rybar <jrybar@redhat.com> - 3.3.15-6
|
||||||
|
- pidof: option for separator collides with other option
|
||||||
|
- Resolves: rhbz#1895985
|
||||||
|
|
||||||
|
* Mon Nov 09 2020 Jan Rybar <jrybar@redhat.com> - 3.3.15-5
|
||||||
|
- version bump due to unspotted malformed backport patch
|
||||||
|
- Resolves: rhbz#1860486
|
||||||
|
- Resolves: rhbz#1894526
|
||||||
|
- Related: rhbz#1803640
|
||||||
|
|
||||||
|
* Fri Nov 06 2020 Jan Rybar <jrybar@redhat.com> - 3.3.15-4
|
||||||
|
- pidof: new option to show kernel worker threads
|
||||||
|
- pidof: empty input causes to show kernel worker threads
|
||||||
|
- Resolves: rhbz#1860486
|
||||||
|
- Resolves: rhbz#1894526
|
||||||
|
- Related: rhbz#1803640
|
||||||
|
-
|
||||||
|
* Wed Jul 08 2020 Jan Rybar <jrybar@redhat.com> - 3.3.15-3
|
||||||
|
- pgrep: uid/gid conversion overflow
|
||||||
|
- vmstat: align manpage with procfs wording
|
||||||
|
- watch: manpage presumes NTP on system
|
||||||
|
- Resolves: rhbz#1827731
|
||||||
|
- Resolves: rhbz#1829920
|
||||||
|
- Resolves: rhbz#1583669
|
||||||
|
|
||||||
* Tue Apr 14 2020 Jan Rybar <jrybar@redhat.com> - 3.3.15-2
|
* Tue Apr 14 2020 Jan Rybar <jrybar@redhat.com> - 3.3.15-2
|
||||||
- pidof: show kernel workers
|
- pidof: show kernel workers
|
||||||
- gating activated
|
- gating activated
|
||||||
|
Loading…
Reference in New Issue
Block a user