Compare commits
8 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| c96ee3e039 | |||
| 72535fd0a8 | |||
| bdc9bb79f4 | |||
| 24f4d5abc6 | |||
| ccde0decbe | |||
| 7afea1e871 | |||
| ebf187bf16 | |||
| 09c1b704a6 |
@@ -1,46 +0,0 @@
|
|||||||
From: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
|
|
||||||
Date: Fri, 17 May 2024 07:48:27 +0200
|
|
||||||
Subject: tests: eliminate use of fgrep
|
|
||||||
Git-repo: https://github.com/lsof-org/lsof
|
|
||||||
Git-commit: 3729186f3220814d5f07550051679377fde0cf92
|
|
||||||
Patch-mainline: submitted, https://github.com/lsof-org/lsof/pull/319
|
|
||||||
References: kernel 6.9
|
|
||||||
|
|
||||||
fgrep use is deprecated. Use grep -F instead.
|
|
||||||
|
|
||||||
See: https://git.savannah.gnu.org/cgit/grep.git/commit/?id=a95156247098
|
|
||||||
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
|
|
||||||
---
|
|
||||||
lib/dialects/linux/tests/case-20-inet6-ffffffff-handling.bash | 2 +-
|
|
||||||
lib/dialects/linux/tests/case-20-pidfd-pid.bash | 2 +-
|
|
||||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/lib/dialects/linux/tests/case-20-inet6-ffffffff-handling.bash b/lib/dialects/linux/tests/case-20-inet6-ffffffff-handling.bash
|
|
||||||
index a3a62822..1e3f459b 100755
|
|
||||||
--- a/lib/dialects/linux/tests/case-20-inet6-ffffffff-handling.bash
|
|
||||||
+++ b/lib/dialects/linux/tests/case-20-inet6-ffffffff-handling.bash
|
|
||||||
@@ -30,7 +30,7 @@ expectation="n[${v6addr}]:$port"
|
|
||||||
result=1
|
|
||||||
if "${lsof}" -p "${pid}" -a -d fd -P -n -F n \
|
|
||||||
| tee -a "${report}" \
|
|
||||||
- | fgrep -q "$expectation"; then
|
|
||||||
+ | grep -Fq "$expectation"; then
|
|
||||||
result=0
|
|
||||||
fi
|
|
||||||
|
|
||||||
diff --git a/lib/dialects/linux/tests/case-20-pidfd-pid.bash b/lib/dialects/linux/tests/case-20-pidfd-pid.bash
|
|
||||||
index fe439e5e..ceeddb41 100755
|
|
||||||
--- a/lib/dialects/linux/tests/case-20-pidfd-pid.bash
|
|
||||||
+++ b/lib/dialects/linux/tests/case-20-pidfd-pid.bash
|
|
||||||
@@ -11,7 +11,7 @@ $TARGET | (
|
|
||||||
exit 77
|
|
||||||
fi
|
|
||||||
line=$($lsof -p $pid -a -d $fd -F pfn| tr '\n' ' ')
|
|
||||||
- if ! fgrep -q "p${pid} f${fd} n[pidfd:$pid]" <<<"$line"; then
|
|
||||||
+ if ! grep -Fq "p${pid} f${fd} n[pidfd:$pid]" <<<"$line"; then
|
|
||||||
$lsof -p $pid -a -d $fd -F pfn
|
|
||||||
echo
|
|
||||||
echo $line
|
|
||||||
--
|
|
||||||
2.45.1
|
|
||||||
|
|
||||||
@@ -1,64 +0,0 @@
|
|||||||
From: Jiajie Chen <c@jia.je>
|
|
||||||
Date: Fri, 17 May 2024 15:22:35 +0800
|
|
||||||
Subject: [linux] Maintain original output for pidfd in linux 6.9
|
|
||||||
Git-repo: https://github.com/lsof-org/lsof
|
|
||||||
Git-commit: c1678e3f6e4b4d984cb3078b7bf0c9e24bedb8ca
|
|
||||||
Patch-mainline: submitted, https://github.com/lsof-org/lsof/pull/319
|
|
||||||
References: kernel 6.9
|
|
||||||
|
|
||||||
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
|
|
||||||
---
|
|
||||||
00DIST | 3 +++
|
|
||||||
lib/dialects/linux/dproc.c | 13 +++++++++++++
|
|
||||||
2 files changed, 16 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/00DIST b/00DIST
|
|
||||||
index e4b9a972..981fb4ef 100644
|
|
||||||
--- a/00DIST
|
|
||||||
+++ b/00DIST
|
|
||||||
@@ -5587,6 +5587,12 @@ Supplement Regenerated the 4.04 distribution to correct a non-
|
|
||||||
|
|
||||||
fix 00DIST file <space> -> tabs
|
|
||||||
|
|
||||||
+4.9?.? ????????? ??, ????
|
|
||||||
+
|
|
||||||
+ [linux] Linux 6.9 changed the pidfs appearence in procfs. Try
|
|
||||||
+ to maintain original output in lsof (#317)
|
|
||||||
+
|
|
||||||
+
|
|
||||||
Vic Abell <abe@purdue.edu>
|
|
||||||
July 14, 2018
|
|
||||||
|
|
||||||
diff --git a/lib/dialects/linux/dproc.c b/lib/dialects/linux/dproc.c
|
|
||||||
index cb6bb64f..3a7a1204 100644
|
|
||||||
--- a/lib/dialects/linux/dproc.c
|
|
||||||
+++ b/lib/dialects/linux/dproc.c
|
|
||||||
@@ -1273,6 +1273,10 @@ static int process_id(struct lsof_context *ctx, /* context */
|
|
||||||
#endif /* defined(HASEPTOPTS) */
|
|
||||||
if (rest && rest[0] == '[' && rest[1] == 'p')
|
|
||||||
fdinfo_mask |= FDINFO_PID;
|
|
||||||
+ else if (Lf->ntype == N_REGLR && rest && *rest && strcmp(pbuf, "pidfd") == 0) {
|
|
||||||
+ // https://github.com/lsof-org/lsof/issues/317
|
|
||||||
+ fdinfo_mask |= FDINFO_PID;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
if ((av = get_fdinfo(ctx, pathi, fdinfo_mask, &fi)) &
|
|
||||||
FDINFO_POS) {
|
|
||||||
@@ -1338,6 +1342,15 @@ static int process_id(struct lsof_context *ctx, /* context */
|
|
||||||
Lf->sf |= SELPTYINFO;
|
|
||||||
}
|
|
||||||
#endif /* defined(HASEPTOPTS) && defined(HASPTYEPT) */
|
|
||||||
+ else if (Lf->ntype == N_REGLR && rest && *rest && Lf->nm &&
|
|
||||||
+ strcmp(Lf->nm, "pidfd") == 0) {
|
|
||||||
+ // https://github.com/lsof-org/lsof/issues/317
|
|
||||||
+ // pidfd since Linux 6.9 becomes a regular file:
|
|
||||||
+ // /proc/PID/fd/FD -> pidfd:[INODE]
|
|
||||||
+ (void)snpf(rest, sizeof(pbuf) - (rest - pbuf),
|
|
||||||
+ "[pidfd:%d]", fi.pid);
|
|
||||||
+ enter_nm(ctx, rest);
|
|
||||||
+ }
|
|
||||||
|
|
||||||
if (Lf->sf)
|
|
||||||
link_lfile(ctx);
|
|
||||||
--
|
|
||||||
2.45.1
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
From 932a0b3b1992497e23fd9b8d31116b9ca9b0f98d Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jiajie Chen <c@jia.je>
|
|
||||||
Date: Sun, 17 Dec 2023 09:21:27 +0800
|
|
||||||
Subject: [PATCH] fix version in configure.ac
|
|
||||||
|
|
||||||
---
|
|
||||||
configure.ac | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/configure.ac b/configure.ac
|
|
||||||
index 65ab74b9..b98eac6b 100644
|
|
||||||
--- a/configure.ac
|
|
||||||
+++ b/configure.ac
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-AC_INIT([lsof],[4.99.0])
|
|
||||||
+AC_INIT([lsof],[4.99.3])
|
|
||||||
AM_INIT_AUTOMAKE([subdir-objects])
|
|
||||||
LT_INIT([disable-fast-install]) # avoid lt-lsof naming
|
|
||||||
# Locate custom m4 macros
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:b9c56468b927d9691ab168c0b1e9f8f1f835694a35ff898c549d383bd8d09bd4
|
|
||||||
size 1134357
|
|
||||||
BIN
lsof-4.99.4.tar.gz
LFS
Normal file
BIN
lsof-4.99.4.tar.gz
LFS
Normal file
Binary file not shown.
12
lsof-skip-nfs-test.patch
Normal file
12
lsof-skip-nfs-test.patch
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
diff -u lsof-4.99.4.orig/Makefile.am lsof-4.99.4/Makefile.am
|
||||||
|
--- lsof-4.99.4.orig/Makefile.am 2023-11-15 02:04:56.000000000 +0100
|
||||||
|
+++ lsof-4.99.4/Makefile.am 2025-05-28 15:30:06.629701140 +0200
|
||||||
|
@@ -180,7 +180,7 @@
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Testing programs
|
||||||
|
-TESTS += tests/LTbasic tests/LTbigf tests/LTdnlc tests/LTlock tests/LTnfs tests/LTnlink tests/LTsock tests/LTszoff tests/LTunix
|
||||||
|
+TESTS += tests/LTbasic tests/LTbigf tests/LTdnlc tests/LTlock tests/LTnlink tests/LTsock tests/LTszoff tests/LTunix
|
||||||
|
|
||||||
|
check_PROGRAMS += tests/LTbasic tests/LTbigf tests/LTdnlc tests/LTlock tests/LTnfs tests/LTnlink tests/LTsock tests/LTszoff tests/LTunix
|
||||||
|
tests_LTbasic_SOURCES = tests/LTbasic.c tests/LTlib.c
|
||||||
27
lsof.changes
27
lsof.changes
@@ -1,3 +1,30 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed May 28 13:35:44 UTC 2025 - Stanislav Brabec <sbrabec@suse.com>
|
||||||
|
|
||||||
|
- Force skip NFS test, as it cannot complete properly in OBS but it
|
||||||
|
can be accidentally triggered there on ppc64. (bsc#1243577,
|
||||||
|
lsof-skip-nfs-test.patch).
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Mar 4 20:17:45 UTC 2025 - Stanislav Brabec <sbrabec@suse.com>
|
||||||
|
|
||||||
|
- Update to version 4.99.4:
|
||||||
|
* In lsof manpage: mention /etc/services for -P option
|
||||||
|
* Fix typos in docs
|
||||||
|
* Linux 6.9 changed the pidfs appearence in procfs. Try to
|
||||||
|
maintain original output in lsof (bsc#1224285)
|
||||||
|
* closefrom_shim: Add optimized fallback for platforms without
|
||||||
|
closefrom or close_range
|
||||||
|
* fix build against -std=c23 (`void (*)()`) changed the meaning)
|
||||||
|
- Drop obsolete lsof-4.99.3-fix-version-in-configure-ac.patch,
|
||||||
|
0001-tests-eliminate-use-of-fgrep.patch and
|
||||||
|
0002-linux-Maintain-original-output-for-pidfd-in-linux-6..patch.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Oct 28 09:06:23 UTC 2024 - Bernhard Wiedemann <bwiedemann@suse.com>
|
||||||
|
|
||||||
|
- Add reproducible.patch to not store build host kernel version (boo#1232425)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri May 17 08:12:42 UTC 2024 - Jiri Slaby <jslaby@suse.cz>
|
Fri May 17 08:12:42 UTC 2024 - Jiri Slaby <jslaby@suse.cz>
|
||||||
|
|
||||||
|
|||||||
12
lsof.spec
12
lsof.spec
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package lsof
|
# spec file for package lsof
|
||||||
#
|
#
|
||||||
# Copyright (c) 2024 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@@ -18,16 +18,16 @@
|
|||||||
|
|
||||||
%define sover 0
|
%define sover 0
|
||||||
Name: lsof
|
Name: lsof
|
||||||
Version: 4.99.3
|
Version: 4.99.4
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: A Program That Lists Information about Files Opened by Processes
|
Summary: A Program That Lists Information about Files Opened by Processes
|
||||||
License: Zlib
|
License: Zlib
|
||||||
Group: System/Monitoring
|
Group: System/Monitoring
|
||||||
URL: https://github.com/lsof-org/lsof
|
URL: https://github.com/lsof-org/lsof
|
||||||
Source: https://github.com/lsof-org/lsof/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
Source: https://github.com/lsof-org/lsof/releases/download/%{version}/lsof-%{version}.tar.gz
|
||||||
Patch0: lsof-4.99.3-fix-version-in-configure-ac.patch
|
# PATCH-FIX-BUILD lsof-skip-nfs-test.patch bsc1243577 sbrabec@suse.com -- Skip NFS test, as it cannot complete properly in OBS.
|
||||||
Patch1: 0001-tests-eliminate-use-of-fgrep.patch
|
Patch1: lsof-skip-nfs-test.patch
|
||||||
Patch2: 0002-linux-Maintain-original-output-for-pidfd-in-linux-6..patch
|
Patch3: reproducible.patch
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
BuildRequires: automake
|
BuildRequires: automake
|
||||||
BuildRequires: groff
|
BuildRequires: groff
|
||||||
|
|||||||
27
reproducible.patch
Normal file
27
reproducible.patch
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
commit 514c942cd723eba5c2bbd63aaca0e7fb18bd88c6
|
||||||
|
Author: Bernhard M. Wiedemann <bwiedemann@suse.de>
|
||||||
|
Date: Mon Oct 28 10:03:44 2024 +0100
|
||||||
|
|
||||||
|
Don't store build host kernel version
|
||||||
|
|
||||||
|
because it is not used anyway
|
||||||
|
and breaks reproducible builds.
|
||||||
|
|
||||||
|
See https://reproducible-builds.org/ for why this matters.
|
||||||
|
|
||||||
|
Fixes https://bugzilla.opensuse.org/show_bug.cgi?id=1232425
|
||||||
|
|
||||||
|
diff --git a/configure.ac b/configure.ac
|
||||||
|
index 65ab74b..536d4d5 100644
|
||||||
|
--- a/configure.ac
|
||||||
|
+++ b/configure.ac
|
||||||
|
@@ -12,7 +12,8 @@ AM_PROG_CC_C_O
|
||||||
|
# Detect OS
|
||||||
|
AC_CANONICAL_HOST
|
||||||
|
|
||||||
|
-LSOF_VSTR=$(uname -r)
|
||||||
|
+# LSOF_VSTR is unused
|
||||||
|
+LSOF_VSTR=6.0.0
|
||||||
|
LSOF_DIALECT=unknown
|
||||||
|
LSOF_DIALECT_DIR=unknown
|
||||||
|
LSOF_TGT=unknown
|
||||||
Reference in New Issue
Block a user