Merged update from upstream sources
This is an automated DistroBaker update from upstream sources. If you do not know what this is about or would like to opt out, contact the OSCI team. Source: https://src.fedoraproject.org/rpms/procps-ng.git#c10476b9a0f3a4eccfeb7ce50b87fe27e916f822
This commit is contained in:
parent
1a56512065
commit
190a064159
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,3 +3,4 @@
|
||||
/procps-ng-3.3.14.tar.xz
|
||||
/procps-ng-3.3.15.tar.xz
|
||||
/procps-ng-3.3.16.tar.xz
|
||||
/procps-ng-3.3.17.tar.xz
|
||||
|
@ -3,8 +3,8 @@
|
||||
|
||||
Summary: System and process monitoring utilities
|
||||
Name: procps-ng
|
||||
Version: 3.3.16
|
||||
Release: 4%{?dist}
|
||||
Version: 3.3.17
|
||||
Release: 1%{?dist}
|
||||
License: GPL+ and GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+
|
||||
URL: https://sourceforge.net/projects/procps-ng/
|
||||
|
||||
@ -15,10 +15,8 @@ Source1: README.md
|
||||
# wget https://gitlab.com/procps-ng/procps/raw/e0784ddaed30d095bb1d9a8ad6b5a23d10a212c4/top/README.top
|
||||
Source2: README.top
|
||||
|
||||
Patch1: pidof-show-worker-threads.patch
|
||||
Patch2: pidof-show-workers-option.patch
|
||||
Patch3: pkill-manpage-e-option.patch
|
||||
Patch4: ps-exe-format-option.patch
|
||||
Patch1: pwait-to-pidwait.patch
|
||||
|
||||
|
||||
BuildRequires: make
|
||||
BuildRequires: ncurses-devel
|
||||
@ -29,6 +27,7 @@ BuildRequires: gcc
|
||||
BuildRequires: gettext-devel
|
||||
BuildRequires: systemd-devel
|
||||
BuildRequires: git
|
||||
BuildRequires: po4a
|
||||
|
||||
%if %{tests_enabled}
|
||||
BuildRequires: dejagnu
|
||||
@ -45,8 +44,8 @@ Provides: /bin/ps
|
||||
%description
|
||||
The procps package contains a set of system utilities that provide
|
||||
system information. Procps includes ps, free, skill, pkill, pgrep,
|
||||
snice, tload, top, uptime, vmstat, pidof, pmap, slabtop, w, watch
|
||||
and pwdx.
|
||||
snice, tload, top, uptime, vmstat, pidof, pmap, slabtop, w, watch,
|
||||
pwdx and pidwait.
|
||||
The ps command displays a snapshot of running processes. The top command
|
||||
provides a repetitive update of the statuses of running processes.
|
||||
The free command displays the amounts of free and used memory on your
|
||||
@ -62,7 +61,8 @@ who are currently logged on and what they are running. The watch
|
||||
program watches a running program. The vmstat command displays
|
||||
virtual memory statistics about processes, memory, paging, block
|
||||
I/O, traps, and CPU activity. The pwdx command reports the current
|
||||
working directory of a process or processes.
|
||||
working directory of a process or processes. The pidwait command
|
||||
waits for processes of specified names.
|
||||
|
||||
%package devel
|
||||
Summary: System and process monitoring utilities
|
||||
@ -87,7 +87,9 @@ Conflicts: man-pages-pl < 0.7-5
|
||||
Internationalization pack for procps-ng
|
||||
|
||||
%prep
|
||||
%autosetup -S git
|
||||
%setup -q -n procps-%{version}
|
||||
%autopatch
|
||||
|
||||
cp -p %{SOURCE1} .
|
||||
cp -p %{SOURCE2} top/
|
||||
|
||||
@ -109,7 +111,8 @@ autoreconf --verbose --force --install
|
||||
--enable-sigwinch \
|
||||
--enable-libselinux \
|
||||
--with-systemd \
|
||||
--disable-modern-top
|
||||
--disable-modern-top\
|
||||
--enable-pidwait
|
||||
|
||||
make CFLAGS="%{optflags}"
|
||||
|
||||
@ -123,9 +126,8 @@ make check
|
||||
%install
|
||||
%make_install
|
||||
|
||||
# translated man pages
|
||||
find man-po/ -type d -maxdepth 1 -mindepth 1 | while read dirname; do cp -a $dirname %{buildroot}%{_mandir}/ ; done
|
||||
rm -f %{buildroot}%{_mandir}/translate/{de,fr,pl,pt_BR,sv,uk}/kill.1
|
||||
# these are created by make, yet empty. This causes rpmbuild errors.
|
||||
rm -rf %{buildroot}%{_mandir}/{pl,pt_BR,sv}/man5
|
||||
|
||||
%find_lang %{name} --all-name --with-man
|
||||
|
||||
@ -155,9 +157,13 @@ ln -s %{_bindir}/pidof %{buildroot}%{_sbindir}/pidof
|
||||
%{_mandir}/man3/*
|
||||
|
||||
%files i18n -f %{name}.lang
|
||||
%exclude %{_mandir}/translated/*
|
||||
|
||||
%changelog
|
||||
* Thu Feb 18 2021 Jan Rybar <jrybar@redhat.com> - 3.3.17-1
|
||||
- rebase to procps-ng-3.3.17
|
||||
- new distribution of i18n manpages
|
||||
- new pidwait command
|
||||
|
||||
* Tue Feb 02 2021 Jan Rybar <jrybar@redhat.com> - 3.3.16-4
|
||||
- version bump to apply latest specfile changes into build
|
||||
|
||||
|
286
pwait-to-pidwait.patch
Normal file
286
pwait-to-pidwait.patch
Normal file
@ -0,0 +1,286 @@
|
||||
From 52afb3a8d31871d28b1c39573a7ed5196c2d5023 Mon Sep 17 00:00:00 2001
|
||||
From: Craig Small <csmall@dropbear.xyz>
|
||||
Date: Mon, 15 Feb 2021 21:10:06 +1100
|
||||
Subject: [PATCH] pidwait: Rename from pwait
|
||||
|
||||
pwait is already in at least Debian in a different package
|
||||
|
||||
References:
|
||||
https://bugs.debian.org/982391
|
||||
---
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index e037e4c..de15e13 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -49,8 +49,8 @@ bin_PROGRAMS = \
|
||||
uptime \
|
||||
vmstat \
|
||||
w
|
||||
-if BUILD_PWAIT
|
||||
-bin_PROGRAMS += pwait
|
||||
+if BUILD_PIDWAIT
|
||||
+bin_PROGRAMS += pidwait
|
||||
endif
|
||||
else
|
||||
usrbin_exec_PROGRAMS += \
|
||||
@@ -85,8 +85,8 @@ dist_man_MANS += \
|
||||
sysctl.conf.5 \
|
||||
ps/ps.1
|
||||
|
||||
-if BUILD_PWAIT
|
||||
-dist_man_MANS += pwait.1
|
||||
+if BUILD_PIDWAIT
|
||||
+dist_man_MANS += pidwait.1
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -199,8 +199,8 @@ free_SOURCES = free.c lib/strutils.c lib/fileutils.c
|
||||
pgrep_SOURCES = pgrep.c lib/fileutils.c lib/nsutils.c
|
||||
pkill_SOURCES = pgrep.c lib/fileutils.c lib/nsutils.c
|
||||
pmap_SOURCES = pmap.c lib/fileutils.c
|
||||
-if BUILD_PWAIT
|
||||
-pwait_SOURCES = pgrep.c lib/fileutils.c lib/nsutils.c
|
||||
+if BUILD_PIDWAIT
|
||||
+pidwait_SOURCES = pgrep.c lib/fileutils.c lib/nsutils.c
|
||||
endif
|
||||
if !CYGWIN
|
||||
pwdx_SOURCES = pwdx.c lib/fileutils.c
|
||||
diff --git a/NEWS b/NEWS
|
||||
index da63c9c..5fe6761 100644
|
||||
--- a/NEWS
|
||||
+++ b/NEWS
|
||||
@@ -1,3 +1,7 @@
|
||||
+procps-ng-NEXT
|
||||
+---------------
|
||||
+ * Rename pwait to pidwait
|
||||
+
|
||||
procps-ng-3.3.17
|
||||
---------------
|
||||
* library: Incremented to 8:3:0
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 56a8669..750c0fb 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -132,20 +132,20 @@ AC_TRY_COMPILE([#include <errno.h>],
|
||||
AC_MSG_RESULT(yes),
|
||||
AC_MSG_RESULT(no))
|
||||
|
||||
-AC_CHECK_FUNC([pidfd_open], [enable_pwait=yes], [
|
||||
+AC_CHECK_FUNC([pidfd_open], [enable_pidwait=yes], [
|
||||
AC_MSG_CHECKING([for __NR_pidfd_open])
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
|
||||
#include <sys/syscall.h>
|
||||
#ifndef __NR_pidfd_open
|
||||
#error __NR_pidfd_open not defined
|
||||
#endif
|
||||
- ])], [enable_pwait=yes], [enable_pwait=no])
|
||||
- AC_MSG_RESULT([$enable_pwait])
|
||||
+ ])], [enable_pidwait=yes], [enable_pidwait=no])
|
||||
+ AC_MSG_RESULT([$enable_pidwait])
|
||||
])
|
||||
-if test "$enable_pwait" = yes; then
|
||||
- AC_DEFINE([ENABLE_PWAIT], [1], [Enable pwait])
|
||||
+if test "$enable_pidwait" = yes; then
|
||||
+ AC_DEFINE([ENABLE_PIDWAIT], [1], [Enable pidwait])
|
||||
fi
|
||||
-AM_CONDITIONAL([BUILD_PWAIT], [test x$enable_pwait = xyes])
|
||||
+AM_CONDITIONAL([BUILD_PIDWAIT], [test x$enable_pidwait = xyes])
|
||||
|
||||
dnl watch8bit must be before the AC_ARG_WITH set as it sets up ncurses
|
||||
AC_SUBST([WITH_WATCH8BIT])
|
||||
diff --git a/pgrep.1 b/pgrep.1
|
||||
index 4f8907b..af6dcd5 100644
|
||||
--- a/pgrep.1
|
||||
+++ b/pgrep.1
|
||||
@@ -9,7 +9,7 @@
|
||||
.\"
|
||||
.TH PGREP "1" "2020-06-04" "procps-ng" "User Commands"
|
||||
.SH NAME
|
||||
-pgrep, pkill, pwait \- look up, signal, or wait for processes based on name and other attributes
|
||||
+pgrep, pkill, pidwait \- look up, signal, or wait for processes based on name and other attributes
|
||||
.SH SYNOPSIS
|
||||
.B pgrep
|
||||
[options] pattern
|
||||
@@ -17,7 +17,7 @@ pgrep, pkill, pwait \- look up, signal, or wait for processes based on name and
|
||||
.B pkill
|
||||
[options] pattern
|
||||
.br
|
||||
-.B pwait
|
||||
+.B pidwait
|
||||
[options] pattern
|
||||
.SH DESCRIPTION
|
||||
.B pgrep
|
||||
@@ -45,7 +45,7 @@ will send the specified signal (by default
|
||||
.BR SIGTERM )
|
||||
to each process instead of listing them on stdout.
|
||||
.PP
|
||||
-.B pwait
|
||||
+.B pidwait
|
||||
will wait for each process instead of listing them on stdout.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
@@ -60,7 +60,7 @@ only.)
|
||||
\fB\-c\fR, \fB\-\-count\fR
|
||||
Suppress normal output; instead print a count of matching processes. When
|
||||
count does not match anything, e.g. returns zero, the command will return
|
||||
-non-zero value. Note that for pkill and pwait, the count is the number of
|
||||
+non-zero value. Note that for pkill and pidwait, the count is the number of
|
||||
matching processes, not the processes that were successfully signaled or waited
|
||||
for.
|
||||
.TP
|
||||
@@ -88,7 +88,7 @@ translated into
|
||||
.BR pgrep 's,
|
||||
.BR pkill 's,
|
||||
or
|
||||
-.BR pwait 's
|
||||
+.BR pidwait 's
|
||||
own process group.
|
||||
.TP
|
||||
\fB\-G\fR, \fB\-\-group\fR \fIgid\fP,...
|
||||
@@ -126,7 +126,7 @@ is translated into
|
||||
.BR pgrep 's,
|
||||
.BR pkill 's,
|
||||
or
|
||||
-.BR pwait 's
|
||||
+.BR pidwait 's
|
||||
own session ID.
|
||||
.TP
|
||||
\fB\-t\fR, \fB\-\-terminal\fR \fIterm\fP,...
|
||||
@@ -145,7 +145,7 @@ symbolical value may be used.
|
||||
Negates the matching. This option is usually used in
|
||||
.BR pgrep 's
|
||||
or
|
||||
-.BR pwait 's
|
||||
+.BR pidwait 's
|
||||
context. In
|
||||
.BR pkill 's
|
||||
context the short option is disabled to avoid accidental usage of the option.
|
||||
@@ -154,7 +154,7 @@ context the short option is disabled to avoid accidental usage of the option.
|
||||
Shows all thread ids instead of pids in
|
||||
.BR pgrep 's
|
||||
or
|
||||
-.BR pwait 's
|
||||
+.BR pidwait 's
|
||||
context. In
|
||||
.BR pkill 's
|
||||
context this option is disabled.
|
||||
@@ -167,7 +167,7 @@ match the
|
||||
.TP
|
||||
\fB\-F\fR, \fB\-\-pidfile\fR \fIfile\fR
|
||||
Read \fIPID\fRs from \fIfile\fR. This option is more useful for
|
||||
-.BR pkill or pwait
|
||||
+.BR pkill or pidwait
|
||||
than
|
||||
.BR pgrep .
|
||||
.TP
|
||||
@@ -237,7 +237,7 @@ $ renice +4 $(pgrep chrome)
|
||||
.PD 0
|
||||
.TP
|
||||
0
|
||||
-One or more processes matched the criteria. For pkill and pwait, one or more
|
||||
+One or more processes matched the criteria. For pkill and pidwait, one or more
|
||||
processes must also have been successfully signalled or waited for.
|
||||
.TP
|
||||
1
|
||||
@@ -258,7 +258,7 @@ The running
|
||||
.BR pgrep ,
|
||||
.BR pkill ,
|
||||
or
|
||||
-.B pwait
|
||||
+.B pidwait
|
||||
process will never report itself as a
|
||||
match.
|
||||
.SH BUGS
|
||||
diff --git a/pgrep.c b/pgrep.c
|
||||
index 4fe5e8a..1905cd1 100644
|
||||
--- a/pgrep.c
|
||||
+++ b/pgrep.c
|
||||
@@ -38,7 +38,7 @@
|
||||
#include <stdbool.h>
|
||||
#include <time.h>
|
||||
|
||||
-#if defined(ENABLE_PWAIT) && !defined(HAVE_PIDFD_OPEN)
|
||||
+#if defined(ENABLE_PIDWAIT) && !defined(HAVE_PIDFD_OPEN)
|
||||
#include <sys/epoll.h>
|
||||
#include <sys/syscall.h>
|
||||
#endif
|
||||
@@ -68,8 +68,8 @@
|
||||
static enum {
|
||||
PGREP = 0,
|
||||
PKILL,
|
||||
-#ifdef ENABLE_PWAIT
|
||||
- PWAIT,
|
||||
+#ifdef ENABLE_PIDWAIT
|
||||
+ PIDWAIT,
|
||||
#endif
|
||||
} prog_mode;
|
||||
|
||||
@@ -136,8 +136,8 @@ static int __attribute__ ((__noreturn__)) usage(int opt)
|
||||
fputs(_(" -q, --queue <value> integer value to be sent with the signal\n"), fp);
|
||||
fputs(_(" -e, --echo display what is killed\n"), fp);
|
||||
break;
|
||||
-#ifdef ENABLE_PWAIT
|
||||
- case PWAIT:
|
||||
+#ifdef ENABLE_PIDWAIT
|
||||
+ case PIDWAIT:
|
||||
fputs(_(" -e, --echo display PIDs before waiting\n"), fp);
|
||||
break;
|
||||
#endif
|
||||
@@ -687,7 +687,7 @@ static struct el * select_procs (int *num)
|
||||
xerrx(EXIT_FAILURE, _("internal error"));
|
||||
}
|
||||
|
||||
- // pkill and pwait don't support -w, but this is checked in getopt
|
||||
+ // pkill and pidwait don't support -w, but this is checked in getopt
|
||||
if (opt_threads) {
|
||||
while (readtask(ptp, &task, &subtask)){
|
||||
// don't add redundant tasks
|
||||
@@ -742,7 +742,7 @@ static int signal_option(int *argc, char **argv)
|
||||
return -1;
|
||||
}
|
||||
|
||||
-#if defined(ENABLE_PWAIT) && !defined(HAVE_PIDFD_OPEN)
|
||||
+#if defined(ENABLE_PIDWAIT) && !defined(HAVE_PIDFD_OPEN)
|
||||
static int pidfd_open (pid_t pid, unsigned int flags)
|
||||
{
|
||||
return syscall(__NR_pidfd_open, pid, flags);
|
||||
@@ -793,9 +793,9 @@ static void parse_opts (int argc, char **argv)
|
||||
{NULL, 0, NULL, 0}
|
||||
};
|
||||
|
||||
-#ifdef ENABLE_PWAIT
|
||||
- if (strcmp (program_invocation_short_name, "pwait") == 0) {
|
||||
- prog_mode = PWAIT;
|
||||
+#ifdef ENABLE_PIDWAIT
|
||||
+ if (strcmp (program_invocation_short_name, "pidwait") == 0) {
|
||||
+ prog_mode = PIDWAIT;
|
||||
strcat (opts, "e");
|
||||
} else
|
||||
#endif
|
||||
@@ -1008,7 +1008,7 @@ int main (int argc, char **argv)
|
||||
int num;
|
||||
int i;
|
||||
int kill_count = 0;
|
||||
-#ifdef ENABLE_PWAIT
|
||||
+#ifdef ENABLE_PIDWAIT
|
||||
int poll_count = 0;
|
||||
int wait_count = 0;
|
||||
int epollfd = epoll_create(1);
|
||||
@@ -1055,8 +1055,8 @@ int main (int argc, char **argv)
|
||||
fprintf(stdout, "%d\n", num);
|
||||
return !kill_count;
|
||||
|
||||
-#ifdef ENABLE_PWAIT
|
||||
- case PWAIT:
|
||||
+#ifdef ENABLE_PIDWAIT
|
||||
+ case PIDWAIT:
|
||||
if (opt_count)
|
||||
fprintf(stdout, "%d\n", num);
|
||||
|
||||
diff --git a/pwait.1 b/pidwait.1
|
||||
similarity index 100%
|
||||
rename from pwait.1
|
||||
rename to pidwait.1
|
||||
--
|
||||
GitLab
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (procps-ng-3.3.16.tar.xz) = d83da472df256b188c32082632202e7f8ebd1b161082387760876ae34d50221b3682299a2816a7d6a29afb40322743c31b87d92ca299c2944a6b55e50736d367
|
||||
SHA512 (procps-ng-3.3.17.tar.xz) = 59e9a5013430fd9da508c4655d58375dc32e025bb502bb28fb9a92a48e4f2838b3355e92b4648f7384b2050064d17079bf4595d889822ebb5030006bc154a1a7
|
||||
|
Loading…
Reference in New Issue
Block a user