Compare commits
8 Commits
b79ffaec74
...
b772e8ab10
Author | SHA1 | Date | |
---|---|---|---|
|
b772e8ab10 | ||
5f70fad843 | |||
fcebba836b | |||
b44b2a60e2 | |||
433a057a23 | |||
e3f42a6aa5 | |||
c7e8f885bf | |||
14915a367d |
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,10 +1,10 @@
|
||||
---
|
||||
src/pstree.c | 37 ++++++++++++++++++++++++++++++-------
|
||||
1 file changed, 30 insertions(+), 7 deletions(-)
|
||||
src/pstree.c | 38 +++++++++++++++++++++++++++++++-------
|
||||
1 file changed, 31 insertions(+), 7 deletions(-)
|
||||
|
||||
--- src/pstree.c
|
||||
+++ src/pstree.c 2022-01-20 13:27:44.175949055 +0000
|
||||
@@ -72,6 +72,7 @@ extern const char *__progname;
|
||||
+++ src/pstree.c 2022-12-13 07:46:58.243076344 +0000
|
||||
@@ -79,6 +79,7 @@ extern const char *__progname;
|
||||
#define UTF_HD "\342\224\254" /* U+252C, Horizontal and down */
|
||||
|
||||
#define VT_BEG "\033(0\017" /* use graphic chars */
|
||||
@@ -12,8 +12,8 @@
|
||||
#define VT_END "\033(B" /* back to normal char set */
|
||||
#define VT_V "x" /* see UTF definitions above */
|
||||
#define VT_VR "t"
|
||||
@@ -522,6 +523,27 @@ static void out_scontext(const PROC *cur
|
||||
}
|
||||
@@ -578,6 +579,28 @@ static void out_scontext(const PROC *cur
|
||||
out_string("'");
|
||||
}
|
||||
|
||||
+/*
|
||||
@@ -36,11 +36,12 @@
|
||||
+ putchar (*str++);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+
|
||||
static void out_newline(void)
|
||||
{
|
||||
if (last_char && cur_x == output_width)
|
||||
@@ -761,11 +783,12 @@ dump_tree(PROC * current, int level, int
|
||||
@@ -817,11 +840,12 @@ dump_tree(PROC * current, int level, int
|
||||
for (lvl = 0; lvl < level; lvl++) {
|
||||
for (i = width[lvl] + 1; i; i--)
|
||||
out_char(' ');
|
||||
@@ -58,7 +59,7 @@
|
||||
}
|
||||
|
||||
if (rep < 2)
|
||||
@@ -875,7 +898,7 @@ dump_tree(PROC * current, int level, int
|
||||
@@ -931,7 +955,7 @@ dump_tree(PROC * current, int level, int
|
||||
}
|
||||
width[level] = comm_len + cur_x - offset + add;
|
||||
if (cur_x >= output_width && trunc) {
|
||||
@@ -67,7 +68,7 @@
|
||||
out_string("+");
|
||||
out_newline();
|
||||
return;
|
||||
@@ -899,7 +922,7 @@ dump_tree(PROC * current, int level, int
|
||||
@@ -955,7 +979,7 @@ dump_tree(PROC * current, int level, int
|
||||
}
|
||||
}
|
||||
if (first) {
|
||||
|
@@ -1,51 +0,0 @@
|
||||
---
|
||||
configure.ac | 2 +-
|
||||
src/fuser.c | 5 ++++-
|
||||
2 files changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
--- configure.ac
|
||||
+++ configure.ac 2021-01-14 11:31:31.640709812 +0000
|
||||
@@ -145,7 +145,7 @@ AC_CHECK_MEMBERS([struct user_regs_struc
|
||||
struct user_regs_struct.rdi,
|
||||
struct user_regs_struct.rsi,
|
||||
struct user_regs_struct.rdx], [],[],
|
||||
- [#include <bits/types.h>
|
||||
+ [#include <sys/types.h>
|
||||
#include <sys/user.h>])
|
||||
AC_CHECK_MEMBERS([struct pt_regs.orig_gpr3,
|
||||
struct pt_regs.gpr], [],[], [#include <linux/ptrace.h>])
|
||||
--- src/fuser.c
|
||||
+++ src/fuser.c 2021-01-14 11:31:31.640709812 +0000
|
||||
@@ -1153,6 +1153,7 @@ int main(int argc, char *argv[])
|
||||
struct option *optr;
|
||||
char *nsptr;
|
||||
int skip_argv;
|
||||
+ int seen_file;
|
||||
|
||||
struct option options[] = {
|
||||
{"all", 0, NULL, 'a'},
|
||||
@@ -1196,6 +1197,7 @@ int main(int argc, char *argv[])
|
||||
#endif
|
||||
atexit(atexit_free_lists);
|
||||
|
||||
+ seen_file = 0;
|
||||
for (argc_cnt = 1; argc_cnt < argc; argc_cnt++) {
|
||||
current_argv = argv[argc_cnt];
|
||||
if (current_argv[0] == '-') { /* its an option */
|
||||
@@ -1340,6 +1342,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
this_name->matched_procs = NULL;
|
||||
+ seen_file = 1;
|
||||
if (opts & (OPT_MOUNTS | OPT_ISMOUNTPOINT)
|
||||
&& this_name->name_space != NAMESPACE_FILE) {
|
||||
free(this_name);
|
||||
@@ -1393,7 +1396,7 @@ int main(int argc, char *argv[])
|
||||
names_tail->next = this_name;
|
||||
names_tail = this_name;
|
||||
} /* for across the argvs */
|
||||
- if (names_head == NULL)
|
||||
+ if (names_head == NULL && !seen_file)
|
||||
usage(_("No process specification given"));
|
||||
|
||||
/* Check if -M flag was used and if so check mounts */
|
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c2347df0c9713643827697386278d70bfe85be06e9ecc91e1f7015bf55e9a988
|
||||
size 221210
|
51
psmisc-v23.6.dif
Normal file
51
psmisc-v23.6.dif
Normal file
@@ -0,0 +1,51 @@
|
||||
---
|
||||
configure.ac | 2 +-
|
||||
src/fuser.c | 5 ++++-
|
||||
2 files changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
--- configure.ac
|
||||
+++ configure.ac 2022-12-13 07:57:11.751636898 +0000
|
||||
@@ -162,7 +162,7 @@ AC_CHECK_MEMBERS([struct user_regs_struc
|
||||
struct user_regs_struct.rdi,
|
||||
struct user_regs_struct.rsi,
|
||||
struct user_regs_struct.rdx], [],[],
|
||||
- [#include <bits/types.h>
|
||||
+ [#include <sys/types.h>
|
||||
#include <sys/user.h>])
|
||||
AC_CHECK_MEMBERS([struct pt_regs.orig_gpr3,
|
||||
struct pt_regs.gpr], [],[], [#include <linux/ptrace.h>])
|
||||
--- src/fuser.c
|
||||
+++ src/fuser.c 2022-12-13 07:59:50.896670010 +0000
|
||||
@@ -1223,6 +1223,7 @@ int main(int argc, char *argv[])
|
||||
struct option *optr;
|
||||
char *nsptr;
|
||||
int skip_argv;
|
||||
+ int seen_file;
|
||||
|
||||
struct option options[] = {
|
||||
{"all", 0, NULL, 'a'},
|
||||
@@ -1266,6 +1267,7 @@ int main(int argc, char *argv[])
|
||||
#endif
|
||||
atexit(atexit_free_lists);
|
||||
|
||||
+ seen_file = 0;
|
||||
for (argc_cnt = 1; argc_cnt < argc; argc_cnt++)
|
||||
{
|
||||
current_argv = argv[argc_cnt];
|
||||
@@ -1416,6 +1418,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
this_name->matched_procs = NULL;
|
||||
+ seen_file = 1;
|
||||
if (opts & (OPT_MOUNTS | OPT_ISMOUNTPOINT)
|
||||
&& this_name->name_space != NAMESPACE_FILE)
|
||||
{
|
||||
@@ -1467,7 +1470,7 @@ int main(int argc, char *argv[])
|
||||
names_tail->next = this_name;
|
||||
names_tail = this_name;
|
||||
} /* for across the argvs */
|
||||
- if (names_head == NULL)
|
||||
+ if (names_head == NULL && !seen_file)
|
||||
usage(_("No process specification given"));
|
||||
|
||||
/* Check if -M flag was used and if so check mounts */
|
BIN
psmisc-v23.6.tar.bz2
(Stored with Git LFS)
Normal file
BIN
psmisc-v23.6.tar.bz2
(Stored with Git LFS)
Normal file
Binary file not shown.
@@ -1,3 +1,40 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Dec 27 13:15:30 UTC 2022 - Ludwig Nussel <lnussel@suse.com>
|
||||
|
||||
- Replace transitional %usrmerged macro with regular version check (boo#1206798)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Dec 13 08:01:33 UTC 2022 - Dr. Werner Fink <werner@suse.de>
|
||||
|
||||
- Update to 23.6:
|
||||
* buildsys: Fix DEJAGNU work-around Debian #1015089
|
||||
* killall: Use kill if pidfd_send_signal fails Debian #1015228
|
||||
* fuser: Do not mention nonexistent - reset option #42
|
||||
* fuser: Use modern statn where possible
|
||||
* pstree: Better AppArmor support !30
|
||||
* killall: Check truncated names !28
|
||||
* killall: Use openat and pidfd_send_signal #37
|
||||
* killall: Don't check paths of sockets #35
|
||||
* pstree: Check for process with show_parents #38
|
||||
* pstree: Don't disable compaction with show pgids #34
|
||||
* pstree: Fix storage leak !29
|
||||
- Enable new apparmor support
|
||||
- Remove patch now upstream
|
||||
0002-Use-new-statx-2-system-call-to-avoid-hangs-on-NFS.patch
|
||||
- Port patch psmisc-22.21-pstree.patch
|
||||
- Port patch psmisc-v23.4.dif which now becomes psmisc-v23.6.dif
|
||||
- Merge patch socket-fix.patch with ported patch
|
||||
0001-Use-mountinfo-to-be-able-to-use-the-mount-identity.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Nov 25 11:48:39 UTC 2022 - Dr. Werner Fink <werner@suse.de>
|
||||
|
||||
- Add patch socket-fix.patch
|
||||
* Add test to check for named sockets as file as well as on mounts
|
||||
* Fix code to find named sockets
|
||||
- The former test requires nc at build aka netcat from openbsd to
|
||||
create a named socket on the fly
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 23 13:04:06 UTC 2022 - Dr. Werner Fink <werner@suse.de>
|
||||
|
||||
|
18
psmisc.spec
18
psmisc.spec
@@ -15,6 +15,7 @@
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
%bcond_without apparmor
|
||||
|
||||
Name: psmisc
|
||||
BuildRequires: autoconf
|
||||
@@ -26,8 +27,12 @@ BuildRequires: glibc-devel
|
||||
BuildRequires: libselinux-devel
|
||||
BuildRequires: linux-glibc-devel >= 4.12
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: netcat-openbsd
|
||||
%if %{with appamor}
|
||||
BuildRequires: pkgconfig(libapparmor)
|
||||
%endif
|
||||
URL: https://gitlab.com/psmisc/psmisc/
|
||||
Version: 23.4
|
||||
Version: 23.6
|
||||
Release: 0
|
||||
Provides: ps:/usr/bin/killall
|
||||
Summary: Utilities for managing processes on your system
|
||||
@@ -39,7 +44,6 @@ Patch2: %{name}-22.21-pstree.patch
|
||||
# PATCH-ADD-SUSE boo#908068, boo#1046237, boo#1046237
|
||||
# https://gitlab.com/bitstreamout/psmisc/tree/mountinfo
|
||||
Patch3: 0001-Use-mountinfo-to-be-able-to-use-the-mount-identity.patch
|
||||
Patch4: 0002-Use-new-statx-2-system-call-to-avoid-hangs-on-NFS.patch
|
||||
|
||||
%define have_peekfd %ix86 x86_64 ppc ppc64 ppc64le %arm mipsel m68k aarch64
|
||||
|
||||
@@ -57,7 +61,6 @@ processes that are using specified files or filesystems.
|
||||
%setup -q -n %{name}-v%{version}
|
||||
%patch2 -p0 -b .pstree
|
||||
%patch3 -p0 -b .mntinf
|
||||
%patch4 -p0 -b .statx
|
||||
%patch0 -p0 -b .p0
|
||||
|
||||
%build
|
||||
@@ -74,9 +77,8 @@ CC=gcc
|
||||
export CFLAGS CXXFLAGS LDFLAGS CC
|
||||
%configure --disable-rpath \
|
||||
--with-gnu-ld \
|
||||
--enable-selinux \
|
||||
--enable-mountinfo-list \
|
||||
--enable-timeout-stat=static
|
||||
%{?with_apparmor:--enable-apparmor} \
|
||||
--enable-selinux
|
||||
make %{?_smp_mflags} CFLAGS="$CFLAGS" "CC=$CC"
|
||||
|
||||
%check
|
||||
@@ -84,7 +86,7 @@ make check
|
||||
|
||||
%install
|
||||
make DESTDIR=%{buildroot} install
|
||||
%if !0%{?usrmerged}
|
||||
%if 0%{?suse_version} < 1550
|
||||
mkdir -p %{buildroot}/bin/
|
||||
ln -sf %{_bindir}/fuser %{buildroot}/bin/
|
||||
%endif
|
||||
@@ -96,7 +98,7 @@ rm -f %{buildroot}%{_mandir}/man1/peekfd.1*
|
||||
%files
|
||||
%defattr (-,root,root,755)
|
||||
%license COPYING
|
||||
%if !0%{?usrmerged}
|
||||
%if 0%{?suse_version} < 1550
|
||||
/bin/fuser
|
||||
%endif
|
||||
%{_bindir}/fuser
|
||||
|
Reference in New Issue
Block a user