summaryrefslogtreecommitdiff
path: root/sysutils/lsof
diff options
context:
space:
mode:
authorbsiegert <bsiegert@pkgsrc.org>2015-12-29 12:42:57 +0000
committerbsiegert <bsiegert@pkgsrc.org>2015-12-29 12:42:57 +0000
commit5d8c31fd85d1c19d403bf8fedfdf1cd6e8298db6 (patch)
treedb2d83175a214a375b07308b582c21bc43c749e5 /sysutils/lsof
parent910d4790e8ff1c414c8beb3e7dcb838035fed3ad (diff)
downloadpkgsrc-5d8c31fd85d1c19d403bf8fedfdf1cd6e8298db6.tar.gz
Update lsof to 4.88. From David H. Gutteridge in PR pkg/50487.
Reduced to 50 the number of open file descriptors lsof attempts to close while trying to protect itself from a file descriptor exec() attack. This limits the overhead lsof incurs on systems that have large file descriptor limits, yet provides sufficient open descriptors for the library functions lsof calls. Updated for changes in FreeBSD 10 with advice from Eygene Ryabinkin <rea@freebsd.org>. Taught Configure to recognize FreeBSD 8.4. Herein am noting that lsof for Solaris 10 or 11 is no longer supported. I no longer have test systems. Some support is still available from Casper Dik <Casper.Dik@oracle.com> and a Solaris 11 patch he provided is included in this revision. Initialized local variables in the Linux process_id() function. Jia He <jiakernel@gmail.com> reported the problem. Added support for FreeBSD 11. Updated FreeBSD ZFS Configure stanza to supply a dummy opt_kdtrace.h when needed. Added tmpfs file system support for FreeBSD. Since a test system is no longer available, dropped the claim of FreeBSD 4.9 support. Added the +|-E options for Linux. -E displays endpoint info; +E displays endpoint info and endpopint files. Masatake YAMATO <yamato@redhat.com> requested this support and suggested code to implement it. Fixed a Linux bug handling processes whose command includes a non-printing character, particularly a NEWLINE character, and clarified printing of single '\\' characters in command and file names. Stephane Chazelas <stephane.chazelas@gmail.com> reported the problem. Added support for Linux RDMA and CRYPTO protocal names and UNIX socket type with code from Masatake YAMATO <yamato@redhat.com>. Fixed field output to insure that the field descriptor field is always selected, since it identifies the file set. The bug was reported by Gary Plewa <gary.m.plewa-1@lowes.com>.
Diffstat (limited to 'sysutils/lsof')
-rw-r--r--sysutils/lsof/Makefile5
-rw-r--r--sysutils/lsof/distinfo12
-rw-r--r--sysutils/lsof/patches/patch-ag139
3 files changed, 73 insertions, 83 deletions
diff --git a/sysutils/lsof/Makefile b/sysutils/lsof/Makefile
index 930289edc19..cdd0e9c9e1b 100644
--- a/sysutils/lsof/Makefile
+++ b/sysutils/lsof/Makefile
@@ -1,8 +1,7 @@
-# $NetBSD: Makefile,v 1.120 2015/06/12 10:51:14 wiz Exp $
+# $NetBSD: Makefile,v 1.121 2015/12/29 12:42:57 bsiegert Exp $
-DISTNAME= lsof_4.87
+DISTNAME= lsof_4.88
PKGNAME= ${DISTNAME:S/_/-/}
-PKGREVISION= 2
CATEGORIES= sysutils
MASTER_SITES= ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ \
ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/NEW/ \
diff --git a/sysutils/lsof/distinfo b/sysutils/lsof/distinfo
index 35fdf710de3..43744ad3e14 100644
--- a/sysutils/lsof/distinfo
+++ b/sysutils/lsof/distinfo
@@ -1,15 +1,15 @@
-$NetBSD: distinfo,v 1.85 2015/11/04 01:32:20 agc Exp $
+$NetBSD: distinfo,v 1.86 2015/12/29 12:42:57 bsiegert Exp $
-SHA1 (lsof_4.87.tar.bz2) = 68e61e0a45491420ace80770157206328c27d8c4
-RMD160 (lsof_4.87.tar.bz2) = 27aff2ec91dd8ece34ffee6f2be7e328c78552e3
-SHA512 (lsof_4.87.tar.bz2) = 5e811225dd65366e3ef49628d567864fadda1dbda2d66a5e473123e73c468f5a3a577ae4e1b701a55ac49c2a759dab5c413663121c260a2804fca10ece902766
-Size (lsof_4.87.tar.bz2) = 773664 bytes
+SHA1 (lsof_4.88.tar.bz2) = 09db6d2cd96bc6832d9b767084b9c67cf5cf52bb
+RMD160 (lsof_4.88.tar.bz2) = fdfc5a5c8c8d4915c8bbd0c2ebe4ec3393fd98d9
+SHA512 (lsof_4.88.tar.bz2) = acf3901ac08bac5acaa123af835de03fcf86c1cb851a2cba5bb6d08c53dff62570e4129c18ffa241ae84a83d5e6fc5207fb12e43b5ff5a21a0c1967ca117848b
+Size (lsof_4.88.tar.bz2) = 778563 bytes
SHA1 (patch-aa) = 4469a5fed540e3c5635b6082efedc477ea96a382
SHA1 (patch-ab) = 1501d8b0e6fd2c61949ba0d447c7b726655725c4
SHA1 (patch-ac) = dac0fcdfee97d42c8f23684a4321519b9f8698d9
SHA1 (patch-ad) = 4bd73dea4770c7f5a43be0d096c26e7d6728dd2c
SHA1 (patch-ae) = 1d8c1c3baf9575631c23d3ced7b12fab1df95cd6
SHA1 (patch-af) = b52c15a507960ecf33a61a3cbd608a92ebac1188
-SHA1 (patch-ag) = 5a48b4036d65af7cb6da0a1c89e06f02ae921ac6
+SHA1 (patch-ag) = 6f3236ff8d84c79c830e521c9e7c5a5760adb04e
SHA1 (patch-ah) = 2de22b9a3733f958298af5e33b66c0653c320f59
SHA1 (patch-dialects_n+obsd_dnode1.c) = dc8c766760aca4eb2e7d7af3944260dd49795c09
diff --git a/sysutils/lsof/patches/patch-ag b/sysutils/lsof/patches/patch-ag
index c51603d828c..607be80122e 100644
--- a/sysutils/lsof/patches/patch-ag
+++ b/sysutils/lsof/patches/patch-ag
@@ -1,28 +1,8 @@
-$NetBSD: patch-ag,v 1.7 2013/01/12 03:27:21 dholland Exp $
+$NetBSD: patch-ag,v 1.8 2015/12/29 12:42:57 bsiegert Exp $
---- Configure.orig 2010-07-29 15:59:32.000000000 +0000
+--- Configure.orig 2014-10-13 22:31:13.000000000 +0000
+++ Configure
-@@ -105,6 +105,7 @@ LSOF_VF=version
- # $LSOF_LOCALSUFFIX local suffix for Makefile
- # $LSOF_NBSD_BUFQH NetBSD <sys/bufq.h> copy status
- # $LSOF_NBSD_PTYFS NetBSD ${NETBSD_SYS}/sys/fs/ptyfs/ copy status
-+# $LSOF_NBSD_TMPFS NetBSD ${NETBSD_SYS}/sys/fs/tmpfs/ copy status
- # $LSOF_N_UNIXV *BSD system's kernel file
- # $LSOF_PL patch level
- # $LSOF_RANLIB randomizing command for the lsof library
-@@ -2782,6 +2783,11 @@ return(0); }
- # Validate the NetBSD version.
-
- case $LSOF_VSTR in # {
-+ 0*|1.[01]*)
-+ LSOF_VERS="1006000"
-+ echo "!!!WARNING!!! Unsupported NetBSD version: $LSOF_VSTR"
-+ echo "!!!WARNING!!! Configuring for NetBSD 1.2"
-+ ;;
- 1.2*)
- LSOF_VERS="1002000"
- ;;
-@@ -2838,10 +2844,44 @@ return(0); }
+@@ -2966,32 +2966,62 @@ return(0); }
echo "!!!WARNING!!! Unsupported NetBSD version: $LSOF_VSTR"
echo "!!!WARNING!!! Configuring for NetBSD 3.0"
;;
@@ -52,7 +32,7 @@ $NetBSD: patch-ag,v 1.7 2013/01/12 03:27:21 dholland Exp $
+ echo "!!!WARNING!!! Unsupported NetBSD version: $LSOF_VSTR"
+ echo "!!!WARNING!!! Configuring for NetBSD 5.0"
+ ;;
-+ 6.0*)
++ 6.[01]*)
+ LSOF_TSTBIGF=" "
+ LSOF_VERS="6000000"
+ ;;
@@ -60,41 +40,50 @@ $NetBSD: patch-ag,v 1.7 2013/01/12 03:27:21 dholland Exp $
+ LSOF_TSTBIGF=" "
+ LSOF_VERS="6099000"
+ ;;
++ 7.[01]*)
++ LSOF_TSTBIGF=" "
++ LSOF_VERS="7000000"
++ ;;
++ 7.99.*)
++ LSOF_TSTBIGF=" "
++ LSOF_VERS="7099000"
++ ;;
*)
-+ LSOF_VERS="5000000"
echo "Unknown NetBSD release: $LSOF_VSTR"
- echo Assuming NetBSD 1.6
- LSOF_VERS="1006000"
-+ echo "!!!WARNING!!! Configuring for NetBSD 5.0"
++ echo Assuming NetBSD 7.0
++ LSOF_VERS="7000000"
;;
esac # }
fi # }
-@@ -2855,6 +2895,12 @@ return(0); }
- ;;
- 3000000|3099000)
- ;;
-+ 4000000|4099000)
-+ ;;
-+ 5000000|5099000)
-+ ;;
-+ 6000000|6099000)
-+ ;;
- *)
- echo "Unknown NetBSD version: $LSOF_VERS"
- rm -f $LSOF_HLP
-@@ -2863,7 +2909,10 @@ return(0); }
- esac # }
+
+- # Test for legal NetBSD version.
+-
+- case $LSOF_VERS in # {
+- 1002000|1003000|1004000|1005000|1006000)
+- ;;
+- 2000000|2099009|2099010)
+- ;;
+- 3000000|3099000)
+- ;;
+- *)
+- echo "Unknown NetBSD version: $LSOF_VERS"
+- rm -f $LSOF_HLP
+- exit 1
+- ;;
+- esac # }
LSOF_CFGF="$LSOF_CFGF -DNETBSDV=$LSOF_VERS"
LSOF_TMP1="-DN_UNIXV=/netbsd"
- if test -r ${LSOF_INCLUDE}/util.h # {
-+ if test -r /dev/ksyms # {
++ if test -r /dev/ksyms # {
+ then
+ LSOF_TMP1="-DN_UNIXV=/dev/ksyms"
-+ elif test -r ${LSOF_INCLUDE}/util.h # {
++ elif test -r ${LSOF_INCLUDE}/util.h # {
then
grep -q getbootfile ${LSOF_INCLUDE}/util.h
if test $? -eq 0 # {
-@@ -3262,6 +3311,7 @@ return(0); }
+@@ -3390,6 +3420,7 @@ return(0); }
fi # }
LSOF_TMP2="sys/vnode.h"
LSOF_NBSD_PTYFS=0
@@ -102,61 +91,63 @@ $NetBSD: patch-ag,v 1.7 2013/01/12 03:27:21 dholland Exp $
if test -r ${LSOF_INCLUDE}/$LSOF_TMP2 # {
then
LSOF_TMP3="${LSOF_INCLUDE}/$LSOF_TMP2"
-@@ -3339,6 +3389,24 @@ return(0); }
+@@ -3467,7 +3498,25 @@ return(0); }
fi # }
fi # }
fi # }
+- if test "X$NETBSD_UVM" = "X" # {
+ grep -q VT_TMPFS $LSOF_TMP3
+ if test $? -eq 0 # {
+ then
-+ LSOF_TMP2="fs/tmpfs/tmpfs.h"
-+ if test -r ${LSOF_INCLUDE}/$LSOF_TMP2 # {
-+ then
-+ LSOF_CFGF="$LSOF_CFGF -DHASTMPFS"
-+ else
-+ if test -r ${NETBSD_SYS}/$LSOF_TMP2 # {
-+ then
-+ if test $NETBSD_SYS != $LSOF_INCLUDE # {
-+ then
-+ LSOF_CFGF="$LSOF_CFGF -DHASTMPFS"
-+ LSOF_NBSD_TMPFS=1
-+ fi # }
-+ fi # }
-+ fi # }
-+ fi # }
- if test "X$NETBSD_UVM" = "X" # {
++ LSOF_TMP2="fs/tmpfs/tmpfs.h"
++ if test -r ${LSOF_INCLUDE}/$LSOF_TMP2 # {
++ then
++ LSOF_CFGF="$LSOF_CFGF -DHASTMPFS"
++ else
++ if test -r ${NETBSD_SYS}/$LSOF_TMP2 # {
++ then
++ if test $NETBSD_SYS != $LSOF_INCLUDE # {
++ then
++ LSOF_CFGF="$LSOF_CFGF -DHASTMPFS"
++ LSOF_NBSD_TMPFS=1
++ fi # }
++ fi # }
++ fi # }
++ fi # }
++ if test "X$NETBSD_UVM" = "X" # {
then
grep -q UVM $LSOF_TMP3
-@@ -3624,6 +3692,28 @@ return(0); }
+ if test $? -ne 0 # {
+@@ -3752,6 +3801,28 @@ return(0); }
LSOF_CFGF="$LSOF_CFGF -I`pwd`/dialects/n+obsd/include"
fi # }
fi # }
-+ if test $LSOF_NBSD_TMPFS -eq 1 # {
++ if test $LSOF_NBSD_TMPFS -eq 1 # {
+ then
+
+ # Make a local copy of $NETBSD_SYS/sys/fs/tmpfs/tmpfs.h.
+
-+ if test ! -d dialects/n+obsd/include # {
++ if test ! -d dialects/n+obsd/include # {
+ then
-+ mkdir dialects/n+obsd/include
-+ fi # }
-+ if test ! -d dialects/n+obsd/include/fs # {
++ mkdir dialects/n+obsd/include
++ fi # }
++ if test ! -d dialects/n+obsd/include/fs # {
+ then
-+ mkdir dialects/n+obsd/include/fs
-+ fi # }
++ mkdir dialects/n+obsd/include/fs
++ fi # }
+ rm -rf dialects/n+obsd/include/fs/tmpfs
+ mkdir dialects/n+obsd/include/fs/tmpfs
+ cp $NETBSD_SYS/fs/tmpfs/tmpfs.h dialects/n+obsd/include/fs/tmpfs
+ echo $LSOF_CFGF | grep /dialects/n+obsd/include > /dev/null 2>&1
-+ if test $? -ne 0 # {
++ if test $? -ne 0 # {
+ then
-+ LSOF_CFGF="$LSOF_CFGF -I`pwd`/dialects/n+obsd/include"
-+ fi # }
-+ fi # }
++ LSOF_CFGF="$LSOF_CFGF -I`pwd`/dialects/n+obsd/include"
++ fi # }
++ fi # }
LSOF_CFGL="$LSOF_CFGL -lkvm"
LSOF_DIALECT_DIR=n+obsd
;;
-@@ -5309,7 +5399,7 @@ fi # }
+@@ -5488,7 +5559,7 @@ fi # }
echo "" >> $LSOF_MKFC
if test "X$LSOF_DEBUG" = "X" # {
then