pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/lsof A patch (courtesy of the lsof maintainer...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/1c32e182f9ec
branches:  trunk
changeset: 459965:1c32e182f9ec
user:      atatat <atatat%pkgsrc.org@localhost>
date:      Wed Aug 13 13:24:15 2003 +0000

description:
A patch (courtesy of the lsof maintainer) to make lsof build again on
NetBSD-current, where the structure of the vnode has been altered.
This patch will, as usual, be obsoleted by the next lsof release.
PKGREVISION bumped accordingly.

Install the lsof.8 man page in man8 instead of installing the
preformatted copy in man1 (doing so used to slide by, by new groff
really doesn't like formatting preformatted man pages, and besides, it
was in the wrong place).

Since the only thing left untouched was the DESCR file, I also added
mention of kqueues as something lsof might note, meaning that this
patch touches every file in the pkg.

diffstat:

 sysutils/lsof/DESCR            |    2 +-
 sysutils/lsof/Makefile         |    5 +-
 sysutils/lsof/PLIST            |    4 +-
 sysutils/lsof/distinfo         |    8 +-
 sysutils/lsof/patches/patch-aa |   30 +++++++++-
 sysutils/lsof/patches/patch-ab |  104 ++++++++++++++++++++++++++++++++++
 sysutils/lsof/patches/patch-ac |   33 ++++++++++
 sysutils/lsof/patches/patch-ad |  124 +++++++++++++++++++++++++++++++++++++++++
 sysutils/lsof/patches/patch-ae |   18 +++++
 9 files changed, 320 insertions(+), 8 deletions(-)

diffs (truncated from 403 to 300 lines):

diff -r a62c0c146f38 -r 1c32e182f9ec sysutils/lsof/DESCR
--- a/sysutils/lsof/DESCR       Wed Aug 13 10:22:56 2003 +0000
+++ b/sysutils/lsof/DESCR       Wed Aug 13 13:24:15 2003 +0000
@@ -2,4 +2,4 @@
 running processes.  An open file may be a regular file, a directory, a block
 special file, a character special file, an executing text reference, a
 library, a stream or a network file (Internet socket, NFS file or Unix domain
-socket).
+socket), a kqueue descriptor...
diff -r a62c0c146f38 -r 1c32e182f9ec sysutils/lsof/Makefile
--- a/sysutils/lsof/Makefile    Wed Aug 13 10:22:56 2003 +0000
+++ b/sysutils/lsof/Makefile    Wed Aug 13 13:24:15 2003 +0000
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.65 2003/07/17 22:53:41 grant Exp $
+# $NetBSD: Makefile,v 1.66 2003/08/13 13:24:15 atatat Exp $
 #
 
 DISTNAME=              lsof_4.68
 PKGNAME=               ${DISTNAME:S/_/-/}
+PKGREVISION=           1
 WRKSRC=                        ${WRKDIR}/${DISTNAME}/${SRCBALL_NAME}
 CATEGORIES=            sysutils
 MASTER_SITES=          ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/  \
@@ -56,7 +57,7 @@
 do-install:
        ${INSTALL} ${COPY} ${_STRIPFLAG_INSTALL} -o ${BINOWN} -g ${BINGRP} -m 2755 ${REAL_GROUP} \
                ${WRKSRC}/lsof ${PREFIX}/sbin
-       ${INSTALL_MAN} ${WRKSRC}/lsof.man ${PREFIX}/man/man1/lsof.1
+       ${INSTALL_MAN} ${WRKSRC}/lsof.8 ${PREFIX}/man/man8/lsof.8
        @${INSTALL_DATA_DIR} ${PREFIX}/share/lsof
        ${INSTALL_SCRIPT} ${WRKSRC}/scripts/* ${PREFIX}/share/lsof
        @${CHMOD} 0444 ${PREFIX}/share/lsof/00*
diff -r a62c0c146f38 -r 1c32e182f9ec sysutils/lsof/PLIST
--- a/sysutils/lsof/PLIST       Wed Aug 13 10:22:56 2003 +0000
+++ b/sysutils/lsof/PLIST       Wed Aug 13 13:24:15 2003 +0000
@@ -1,6 +1,6 @@
-@comment $NetBSD: PLIST,v 1.1 2001/10/31 22:53:26 zuntum Exp $
+@comment $NetBSD: PLIST,v 1.2 2003/08/13 13:24:15 atatat Exp $
 sbin/lsof
-man/man1/lsof.1.gz
+man/man8/lsof.8.gz
 share/lsof/00MANIFEST
 share/lsof/00README
 share/lsof/big_brother.perl5
diff -r a62c0c146f38 -r 1c32e182f9ec sysutils/lsof/distinfo
--- a/sysutils/lsof/distinfo    Wed Aug 13 10:22:56 2003 +0000
+++ b/sysutils/lsof/distinfo    Wed Aug 13 13:24:15 2003 +0000
@@ -1,5 +1,9 @@
-$NetBSD: distinfo,v 1.29 2003/06/19 03:09:37 atatat Exp $
+$NetBSD: distinfo,v 1.30 2003/08/13 13:24:15 atatat Exp $
 
 SHA1 (lsof_4.68.tar.gz) = 71df82816e84b4218c473a7102ff31c002192803
 Size (lsof_4.68.tar.gz) = 963862 bytes
-SHA1 (patch-aa) = 36790019394b4088c226222d4aefaec50430bcf3
+SHA1 (patch-aa) = 7e13302b231240a5225fb02a604268539d956fe7
+SHA1 (patch-ab) = 5c7f1c1ce17644c5c5062fcd0106c9fbcec4b5e5
+SHA1 (patch-ac) = 4cd8d56feb94008c7d54df7f3bbd0c64bcbcfbd8
+SHA1 (patch-ad) = f1c66f3903ac99dfdfce9163ede04dc3b84af2d4
+SHA1 (patch-ae) = ab22b7026bb59bbaa9e41349f452b8274ccdc43a
diff -r a62c0c146f38 -r 1c32e182f9ec sysutils/lsof/patches/patch-aa
--- a/sysutils/lsof/patches/patch-aa    Wed Aug 13 10:22:56 2003 +0000
+++ b/sysutils/lsof/patches/patch-aa    Wed Aug 13 13:24:15 2003 +0000
@@ -1,12 +1,31 @@
-$NetBSD: patch-aa,v 1.20 2002/12/22 20:04:31 atatat Exp $
+$NetBSD: patch-aa,v 1.21 2003/08/13 13:24:16 atatat Exp $
 
 If LSOF_MORE_SECURE is non-zero, compile lsof with security, and
 only let unprivileged (non-root) users view their own open files.
 Set LSOF_LESS_SECURE_SOCKETS to non-zero in order to allow non-root
 users to see open sockets, even when LSOF_MORE_SECURE is set.
 
+Patch for vnode/DNLC interface change courtesy of lsof maintainer.
+
 --- dialects/n+obsd/machine.h.orig     Tue Dec  3 13:23:54 2002
 +++ dialects/n+obsd/machine.h
+@@ -214,16 +214,12 @@
+  * that lsof can search.  A value of 1 directs printname() to prefix the
+  * cache value with the file system directory name; 2, avoid the prefix.
+  *
+- * HASNCAPID is defined for those dialects with a searchable kernel name
+- * cache whose cache and vnodes are linked by a capability ID.
+- *
+  * NCACHELDPFX is a set of C commands to execute before calling ncache_load().
+  *
+  * NCACHELDSFX is a set of C commands to execute after calling ncache_load().
+  */
+ 
+ #define       HASNCACHE       1
+-#define       HASNCAPID       1
+ /* #define    NCACHELDPFX     ??? */
+ /* #define    NCACHELDSFX     ??? */
+ 
 @@ -371,7 +371,9 @@
   * (the one that its user logged on with) of the lsof process.
   */
@@ -29,3 +48,12 @@
  
  
  /*
+@@ -497,7 +493,7 @@
+ 
+ # if  (defined(OPENBSDV) && OPENBSDV>=2010) || (defined(NETBSDV) && NETBSDV>=1020)
+ #define       USE_LIB_RNMH                            1       /* rnmh.c */
+-# else        /* (defined(OPENBSDV) && OPENBSDV>=2010) || (defined(NETBSDV) && NETBSDV>=1020) */
++# else        /* (defined(OPENBSDV) && OPENBSDV<2010) && (defined(NETBSDV) && NETBSDV<1020) */
+ #define       USE_LIB_RNAM                            1       /* rnam.c */
+ # endif       /* (defined(OPENBSDV) && OPENBSDV>=2010) || (defined(NETBSDV) && NETBSDV>=1020) */
+ 
diff -r a62c0c146f38 -r 1c32e182f9ec sysutils/lsof/patches/patch-ab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/lsof/patches/patch-ab    Wed Aug 13 13:24:15 2003 +0000
@@ -0,0 +1,104 @@
+$NetBSD: patch-ab,v 1.22 2003/08/13 13:24:16 atatat Exp $
+
+Patch for vnode/DNLC interface change courtesy of lsof maintainer.
+
+--- Configure.orig     2003-06-11 20:55:38.000000000 -0400
++++ Configure
+@@ -819,10 +819,13 @@
+       LSOF_CFGF="$LSOF_CFGF -DHASFDLINK"
+       fi      # }
+     fi        # }
+-    grep -q nc_vpid ${LSOF_INCLUDE}/sys/namei.h
+-    if test $? -eq 0  # {
++    if test -r ${LSOF_INCLUDE}/sys/namei.h
+     then
+-      LSOF_CFGF="$LSOF_CFGF -DHASNCVPID"
++      grep -q nc_vpid ${LSOF_INCLUDE}/sys/namei.h
++      if test $? -eq 0        # {
++      then
++        LSOF_CFGF="$LSOF_CFGF -DHASNCVPID"
++      fi      # }
+     fi        # }
+     if test $LSOF_VERS -ge 40000      # {
+     then
+@@ -938,6 +941,14 @@
+       exit 1
+       fi      # }
+     fi        # }
++    if test -r ${LSOF_INCLUDE}/sys/namei.h
++    then
++      grep -q nc_vpid ${LSOF_INCLUDE}/sys/namei.h
++      if test $? -eq 0        # {
++      then
++        LSOF_CFGF="$LSOF_CFGF -DHASNCVPID"
++      fi      # }
++    fi        # }
+     LSOF_DINC="$LSOF_DINC -I`pwd`/dialects/darwin/xnu/bsd"
+     LSOF_DINC="$LSOF_DINC -I/usr/include"
+     LSOF_DINC="$LSOF_DINC -I${DARWIN_SYSDIR}/System.framework/PrivateHeaders"
+@@ -1175,6 +1186,14 @@
+ 
+       LSOF_CFGF="$LSOF_CFGF -DHASIPv6"
+     fi        # }
++    if test -r ${LSOF_INCLUDE}/sys/namei.h
++    then
++      grep -q nc_vpid ${LSOF_INCLUDE}/sys/namei.h
++      if test $? -eq 0        # {
++      then
++        LSOF_CFGF="$LSOF_CFGF -DHASNCVPID"
++      fi      # }
++    fi        # }
+     LSOF_DIALECT_DIR=du
+     ;;
+ 
+@@ -1526,10 +1545,13 @@
+       fi      # }
+       LSOF_CFGF="$LSOF_CFGF -DHAS9660FS"
+     fi        # }
+-    grep -q nc_vpid ${LSOF_INCLUDE}/sys/namei.h
+-    if test $? -eq 0  # {
++    if test -r ${LSOF_INCLUDE}/sys/namei.h
+     then
+-      LSOF_CFGF="$LSOF_CFGF -DHASNCVPID"
++      grep -q nc_vpid ${LSOF_INCLUDE}/sys/namei.h
++      if test $? -eq 0        # {
++      then
++        LSOF_CFGF="$LSOF_CFGF -DHASNCVPID"
++      fi      # }
+     fi        # }
+     if test $LSOF_DINC_ADD -eq 1      # {
+     then
+@@ -2241,10 +2263,13 @@
+     then
+       LSOF_DINC="-I$LSOF_INCLUDE -I$NETBSD_SYS"
+     fi        # }
+-    grep -q nc_vpid ${LSOF_INCLUDE}/sys/namei.h
+-    if test $? -eq 0  # {
++    if test -r ${LSOF_INCLUDE}/sys/namei.h
+     then
+-      LSOF_CFGF="$LSOF_CFGF -DHASNCVPID"
++      grep -q nc_vpid ${LSOF_INCLUDE}/sys/namei.h
++      if test $? -eq 0        # {
++      then
++        LSOF_CFGF="$LSOF_CFGF -DHASNCVPID"
++      fi      # }
+     fi        # }
+     grep -q i_ffs_size ${LSOF_INCLUDE}/ufs/ufs/inode.h
+     if test $? -eq 0  # {
+@@ -2645,10 +2670,13 @@
+       LSOF_CFGF="$LSOF_CFGF -DHASI_E2FS_PTR"
+       fi      # }
+     fi        # }
+-    grep -q nc_vpid ${LSOF_INCLUDE}/sys/namei.h
+-    if test $? -eq 0  # {
++    if test -r ${LSOF_INCLUDE}/sys/namei.h
+     then
+-      LSOF_CFGF="$LSOF_CFGF -DHASNCVPID"
++      grep -q nc_vpid ${LSOF_INCLUDE}/sys/namei.h
++      if test $? -eq 0        # {
++      then
++        LSOF_CFGF="$LSOF_CFGF -DHASNCVPID"
++      fi      # }
+     fi        # }
+     if test "X$OPENBSD_UVM" = "X"     # {
+     then
diff -r a62c0c146f38 -r 1c32e182f9ec sysutils/lsof/patches/patch-ac
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/lsof/patches/patch-ac    Wed Aug 13 13:24:15 2003 +0000
@@ -0,0 +1,33 @@
+$NetBSD: patch-ac,v 1.10 2003/08/13 13:24:16 atatat Exp $
+
+Patch for vnode/DNLC interface change courtesy of lsof maintainer.
+
+--- dialects/n+obsd/dnode.c.orig       2003-06-11 07:45:16.000000000 -0400
++++ dialects/n+obsd/dnode.c
+@@ -68,8 +68,14 @@
+               if (!p->P_VMSPACE
+               ||  kread((KA_T)p->P_VMSPACE, (char *)&vm, sizeof(vm)))
+                   return;
++# if  defined(OPENBSDV)
++              Lf->sz = (SZOFFTYPE)((vm.vm_tsize + vm.vm_dsize
++                     + vm.vm_ssize) * sysconf(_SC_PAGESIZE));
++# else        /* !defined(OPENBSDV */
+               Lf->sz = (SZOFFTYPE)ctob(vm.vm_tsize + vm.vm_dsize
+                                                    + vm.vm_ssize);
++# endif       /* defined(OPENBSDV) */
++
+               Lf->sz_def = 1;
+               return;
+           }
+@@ -301,9 +307,9 @@
+ 
+ #if   defined(HASNCACHE)
+       Lf->na = va;
+-# if  defined(HASNCAPID)
++# if  defined(HASNCVPID)
+       Lf->id = v->v_id;
+-# endif       /* defined(HASNCAPID) */
++# endif       /* defined(HASNCVPID) */
+ #endif        /* defined(HASNCACHE) */
+ 
+ #if   defined(HASFSTRUCT)
diff -r a62c0c146f38 -r 1c32e182f9ec sysutils/lsof/patches/patch-ad
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/lsof/patches/patch-ad    Wed Aug 13 13:24:15 2003 +0000
@@ -0,0 +1,124 @@
+$NetBSD: patch-ad,v 1.5 2003/08/13 13:24:17 atatat Exp $
+
+Patch for vnode/DNLC interface change courtesy of lsof maintainer.
+
+--- lib/rnam.c.orig    2000-08-02 08:53:30.000000000 -0400
++++ lib/rnam.c
+@@ -111,7 +111,10 @@
+                                        * table */
+ struct l_nch {
+       KA_T na;                        /* node address */
++
++# if  defined(NCACHE_NODEID)
+       unsigned long id;               /* capability ID */
++# endif       /* defined(NCACHE_NODEID) */
+ 
+ # if  defined(NCACHE_PARADDR) && defined(NCACHE_PARID)
+       KA_T pa;                        /* parent node address */
+@@ -128,13 +131,18 @@
+ static struct l_nch **Nchash = (struct l_nch **)NULL;
+                                       /* Ncache hash pointers */
+ static int Ncfirst = 1;                       /* first-call status */
+-      
++
++# if  defined(NCACHE_NODEID)
+ #define ncachehash(i,n)               Nchash+(((((int)(n)>>2)+((int)(i)))*31415)&Mch)
++_PROTOTYPE(static struct l_nch *ncache_addr,(unsigned long i, KA_T na));
++# else        /* !defined(NCACHE_NODEID) */
++#define ncachehash(n)         Nchash+((((int)(n)>>2)*31415)&Mch)
++_PROTOTYPE(static struct l_nch *ncache_addr,(KA_T na));
++# endif       /* defined(NCACHE_NODEID) */
++
+ #define DEFNCACHESZ   1024    /* local size if X_NCSIZE kernel value < 1 */
+ #define       LNCHINCRSZ      64      /* local size increment */
+ 
+-_PROTOTYPE(static struct l_nch *ncache_addr,(unsigned long i, KA_T na));
+-
+ # if  !defined(NCACHE_NO_ROOT)
+ _PROTOTYPE(static int ncache_isroot,(KA_T na, char *cp));
+ # endif       /* !defined(NCACHE_NO_ROOT) */
+@@ -145,14 +153,32 @@
+  */
+ 
+ static struct l_nch *



Home | Main Index | Thread Index | Old Index