lsof: update to 4.99.7#29935
Conversation
3bc0b98 to
f7ad93c
Compare
| Subject: [PATCH] don't build man pages | ||
|
|
||
| - Not all build environments may have groff-base installed | ||
| - We don't install them anyway |
There was a problem hiding this comment.
I've looked into this patch. You are right, the man pages are built during compilation but they never make it into the package, you are right, but... MAKE_FLAGS += man8_MANS= achieves the same result without maintaining a patch that needs rebasing on every version bump.
Ideally, lsof upstream could add a --disable-manpages configure option. That might be worth an upstream PR or we can just create issue to ask for it.
Please don't take this the wrong way, but since we are already adding a commit subject and commit description here, I think we can make it even better and fully polish it. 😇
There was a problem hiding this comment.
Thank you for the suggestions!
I'm inclined to take the easy route and disable man pages locally with MAKE_FLAGS, but I'll check what it takes to add --disable-manpages
There was a problem hiding this comment.
@BKPepe , I'm not an autotools expect to any degree, but by repeating the pattern, I've got this:
diff --git a/Makefile.am b/Makefile.am
index 9cd951c..2063e0f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -221,11 +221,14 @@ EXTRA_DIST += 00.README.FIRST 00CREDITS 00DCACHE 00DIALECTS 00DIST 00FAQ 00LSOF-
# Testing
EXTRA_DIST += tests/00README tests/TestDB tests/CkTestDB tests/Makefile tests/LsofTest.h check.bash
+if INSTALL_MANPAGES
# Manpages
lsof.man: Lsof.8 version 00DIALECTS
soelim < Lsof.8 > $@
man8_MANS = lsof.man
EXTRA_DIST += Lsof.8
+endif
+
# Fix distcheck error
clean-local:
rm -rf lsof.man
diff --git a/configure.ac b/configure.ac
index ef664c9..ac143db 100644
--- a/configure.ac
+++ b/configure.ac
@@ -272,6 +272,11 @@ AS_IF([test "x$enable_security" = xyes], [
CFLAGS="$CFLAGS -DHASSECURITY"
])
+# --disable-manpages to stop building and installing lsof.8
+AC_ARG_ENABLE(manpages, AS_HELP_STRING([--disable-manpages],
+ [do not build and install lsof.8]), [], [enable_manpages=yes])
+AM_CONDITIONAL([INSTALL_MANPAGES], [test "x$enable_manpages" = xyes])
+
# --enable-no-sock-security to define HASNOSOCKSECURITY
AC_ARG_ENABLE(no_sock_security, AS_HELP_STRING([--enable-no-sock-security],
[combined with --enable-security, allow anyone to list anyone else's socket files]), [], [enable_no_sock_security=no])
It builds the man page by default, and does not build it with --disable-manpages
Does the change look ok? If it does, I can try to upstream it, and until it's accepted use your MAKE_FLAGS= method.
./configure --help:
...
--enable-security allow only the root user to list all open files
--enable-no-sock-security
combined with --enable-security, allow anyone to
list anyone else's socket files
--disable-manpages do not build and install lsof.8
--disable-largefile omit support for large files
--enable-year2038 support timestamps after 2038
...
There was a problem hiding this comment.
I have just nitpick: INSTALL_MANPAGES x ENABLE_MANPAGES to be in sync with configure.ac
Otherwise LGTM. Thanks! :)
- convert the patch to a make option - Add -J/-j options for JSON and JSON Lines output format. - lsof_free_result(): handle result == NULL - Fix missing parenthesis in lstat error message format - Fix use-after-free in lsof_select_process_regex - Fix truncated fd numbers in -F field output - Display connection state for UDP sockets with -T option Signed-off-by: Maxim Storchak <m.storchak@gmail.com>
📦 Package Details
Maintainer: me
(You can find this by checking the history of the package
Makefile.)Description:
🧪 Run Testing Details
✅ Formalities
If your PR contains a patch:
git am(e.g., subject line, commit description, etc.)
We must try to upstream patches to reduce maintenance burden.