pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/sysutils/lsof make this work again.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/0192b9a98526
branches:  trunk
changeset: 542462:0192b9a98526
user:      christos <christos%pkgsrc.org@localhost>
date:      Sat May 17 23:53:29 2008 +0000

description:
make this work again.

diffstat:

 sysutils/lsof/Makefile         |   4 +-
 sysutils/lsof/distinfo         |   8 ++-
 sysutils/lsof/patches/patch-aa |  21 +++++++++--
 sysutils/lsof/patches/patch-ac |  13 +++++++
 sysutils/lsof/patches/patch-ad |  38 ++++++++++++++-------
 sysutils/lsof/patches/patch-ah |  74 ++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 135 insertions(+), 23 deletions(-)

diffs (279 lines):

diff -r 6a546595bccf -r 0192b9a98526 sysutils/lsof/Makefile
--- a/sysutils/lsof/Makefile    Sat May 17 23:46:46 2008 +0000
+++ b/sysutils/lsof/Makefile    Sat May 17 23:53:29 2008 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.95 2008/04/26 11:54:24 apb Exp $
+# $NetBSD: Makefile,v 1.96 2008/05/17 23:53:29 christos Exp $
 
 DISTNAME=              lsof_4.78
 PKGNAME=               ${DISTNAME:S/_/-/}.${OS_VERSION}
-PKGREVISION=           2
+PKGREVISION=           3
 CATEGORIES=            sysutils
 MASTER_SITES=          ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/  \
                        ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/NEW/ \
diff -r 6a546595bccf -r 0192b9a98526 sysutils/lsof/distinfo
--- a/sysutils/lsof/distinfo    Sat May 17 23:46:46 2008 +0000
+++ b/sysutils/lsof/distinfo    Sat May 17 23:53:29 2008 +0000
@@ -1,11 +1,13 @@
-$NetBSD: distinfo,v 1.73 2007/12/28 16:15:39 adam Exp $
+$NetBSD: distinfo,v 1.74 2008/05/17 23:53:29 christos Exp $
 
 SHA1 (lsof_4.78.tar.bz2) = 0379fc9f38a931ce19e8386e662314d96fc2a099
 RMD160 (lsof_4.78.tar.bz2) = 50d71e500f1109cda717b73ce209c0e100a6dbe9
 Size (lsof_4.78.tar.bz2) = 756729 bytes
-SHA1 (patch-aa) = 051015025297ab131c30ceb62e926750c365d14a
+SHA1 (patch-aa) = 73c41a9d897425c8482f6f1673b38304ec794b47
 SHA1 (patch-ab) = 1501d8b0e6fd2c61949ba0d447c7b726655725c4
-SHA1 (patch-ad) = 3c0444a3a22520abdce4584c3fe07334662cea15
+SHA1 (patch-ac) = dac0fcdfee97d42c8f23684a4321519b9f8698d9
+SHA1 (patch-ad) = 4bd73dea4770c7f5a43be0d096c26e7d6728dd2c
 SHA1 (patch-ae) = 1d8c1c3baf9575631c23d3ced7b12fab1df95cd6
 SHA1 (patch-af) = 7481b1d10b12b7c6216858db30b25a3b985e4d3d
 SHA1 (patch-ag) = febdf5429228a921496d89bb6e589e22ee21e728
+SHA1 (patch-ah) = 0ed8ca9cc34d85dc01b135e70077c922d26d8831
diff -r 6a546595bccf -r 0192b9a98526 sysutils/lsof/patches/patch-aa
--- a/sysutils/lsof/patches/patch-aa    Sat May 17 23:46:46 2008 +0000
+++ b/sysutils/lsof/patches/patch-aa    Sat May 17 23:53:29 2008 +0000
@@ -1,13 +1,24 @@
-$NetBSD: patch-aa,v 1.26 2007/08/14 19:59:18 veego Exp $
+$NetBSD: patch-aa,v 1.27 2008/05/17 23:53:29 christos 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.
 
---- dialects/n+obsd/machine.h.orig     2006-03-28 23:54:17.000000000 +0200
-+++ dialects/n+obsd/machine.h  2007-08-11 18:01:56.000000000 +0200
-@@ -410,7 +410,9 @@
+--- dialects/n+obsd/machine.h.orig     2006-03-28 16:54:17.000000000 -0500
++++ dialects/n+obsd/machine.h  2008-05-17 18:53:29.000000000 -0400
+@@ -41,6 +41,10 @@
+ 
+ #include <sys/types.h>
+ #include <sys/param.h>
++#include <stdbool.h>
++#if __NetBSD_Version__ >= 499006200
++#define HASCWDINFO
++#endif
+ 
+ 
+ /*
+@@ -410,7 +414,9 @@
   * (the one that its user logged on with) of the lsof process.
   */
  
@@ -18,7 +29,7 @@
  
  
  /*
-@@ -419,7 +421,9 @@
+@@ -419,7 +425,9 @@
   * listing is selected by the "-i" option.
   */
  
diff -r 6a546595bccf -r 0192b9a98526 sysutils/lsof/patches/patch-ac
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/lsof/patches/patch-ac    Sat May 17 23:53:29 2008 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-ac,v 1.29 2008/05/17 23:53:29 christos Exp $
+
+--- dialects/n+obsd/dstore.c.orig      2004-12-30 13:42:32.000000000 -0500
++++ dialects/n+obsd/dstore.c   2008-05-17 19:35:34.000000000 -0400
+@@ -119,6 +119,8 @@
+ 
+ # if  defined(UF_EXCLOSE)
+       { (long)UF_EXCLOSE,     POF_CLOEXEC     },
++# else
++      { (long)1,              POF_CLOEXEC     },
+ # endif       /* defined(UF_EXCLOSE) */
+ 
+ # if  defined(UF_MAPPED)
diff -r 6a546595bccf -r 0192b9a98526 sysutils/lsof/patches/patch-ad
--- a/sysutils/lsof/patches/patch-ad    Sat May 17 23:46:46 2008 +0000
+++ b/sysutils/lsof/patches/patch-ad    Sat May 17 23:53:29 2008 +0000
@@ -1,8 +1,8 @@
-$NetBSD: patch-ad,v 1.14 2007/11/21 11:01:55 apb Exp $
+$NetBSD: patch-ad,v 1.15 2008/05/17 23:53:29 christos Exp $
 
---- dialects/n+obsd/dnode.c.orig       2007-04-24 18:22:06.000000000 +0200
-+++ dialects/n+obsd/dnode.c
-@@ -38,6 +38,9 @@ static char *rcsid = "$Id: dnode.c,v 1.3
+--- dialects/n+obsd/dnode.c.orig       2007-04-24 12:22:06.000000000 -0400
++++ dialects/n+obsd/dnode.c    2008-05-17 18:49:56.000000000 -0400
+@@ -38,6 +38,9 @@
  
  #include "lsof.h"
  
@@ -12,7 +12,7 @@
  
  #if   defined(HAS_DINODE_U)
  #define       DINODE_U        dinode_u
-@@ -194,12 +197,17 @@ process_node(va)
+@@ -194,12 +197,17 @@
        unsigned char ns;
        unsigned char rdevs;
        char *ep, *ty;
@@ -31,7 +31,19 @@
        enum vtype type;
        struct vnode *v, vb;
        struct l_vfs *vfs;
-@@ -414,7 +422,7 @@ process_overlaid_node:
+@@ -276,6 +284,11 @@
+ 
+ #if   defined(HASPTYFS)
+       struct ptyfsnode pt;
++#if __NetBSD_Version__ >= 499006200
++#define specinfo specnode
++#define vu_specinfo vu_specnode
++#define si_rdev sn_rdev
++#endif
+       struct specinfo si;
+ #endif        /* defined(HASPTYFS) */
+ 
+@@ -414,7 +427,7 @@
         */
            if (!v->v_data
            ||  kread((KA_T)v->v_data, (char *)&kn, sizeof(kn))) {
@@ -40,7 +52,7 @@
                    (void) snpf(Namech, Namechl,
                        "can't read kernfs_node at: %s",
                        print_kptr((KA_T)v->v_data, (char *)NULL, 0));
-@@ -449,7 +457,7 @@ process_overlaid_node:
+@@ -449,7 +462,7 @@
         * size are fixed; otherwise, safely stat() the file to get the
         * inode number and size.
         */
@@ -49,7 +61,7 @@
                (void) snpf(Namech, Namechl, "%s", _PATH_KERNFS);
                ksb.st_ino = (ino_t)2;
                ksb.st_size = DEV_BSIZE;
-@@ -471,6 +479,19 @@ process_overlaid_node:
+@@ -471,6 +484,19 @@
            nty = MFSNODE;
            break;
  
@@ -69,7 +81,7 @@
  #if   defined(HASMSDOSFS)
        case VT_MSDOSFS:
            if (!v->v_data
-@@ -619,6 +640,7 @@ process_overlaid_node:
+@@ -619,6 +645,7 @@
  
            }
  
@@ -77,7 +89,7 @@
            if ((lff = i.i_lockf)) {
  
            /*
-@@ -667,6 +689,7 @@ process_overlaid_node:
+@@ -667,6 +694,7 @@
                    break;
                } while ((lfp = lf.lf_next) && lfp != lff);
            }
@@ -85,7 +97,7 @@
            break;
        default:
            if (v->v_type == VBAD || v->v_type == VNON)
-@@ -900,6 +923,13 @@ process_overlaid_node:
+@@ -900,6 +928,13 @@
            break;
  #endif        /* defined(HASPTYFS) */
  
@@ -99,7 +111,7 @@
        }
  
  /*
-@@ -1019,6 +1049,13 @@ process_overlaid_node:
+@@ -1019,6 +1054,13 @@
                        Lf->sz_def = 1;
                        break;
  
@@ -113,7 +125,7 @@
  #if   defined(HASEXT2FS)
                    case EXT2NODE:
  # if  defined(HASI_E2FS_PTR)
-@@ -1221,6 +1258,9 @@ process_overlaid_node:
+@@ -1221,6 +1263,9 @@
            Lf->dev_def = Lf->rdev_def = 0;
            (void) snpf(Namech, Namechl, "%#x", m.mfs_baseoff);
            enter_dev_ch("memory");
diff -r 6a546595bccf -r 0192b9a98526 sysutils/lsof/patches/patch-ah
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/lsof/patches/patch-ah    Sat May 17 23:53:29 2008 +0000
@@ -0,0 +1,74 @@
+$NetBSD: patch-ah,v 1.3 2008/05/17 23:53:29 christos Exp $
+
+--- dialects/n+obsd/dproc.c.orig       2005-05-11 08:54:00.000000000 -0400
++++ dialects/n+obsd/dproc.c    2008-05-17 19:35:00.000000000 -0400
+@@ -37,6 +37,11 @@
+ 
+ #include "lsof.h"
+ 
++#if __NetBSD_Version__ < 499006200
++#define FILESTRUCT struct file
++#else
++#define FILESTRUCT struct fdfile
++#endif
+ 
+ _PROTOTYPE(static void enter_vn_text,(KA_T va, int *n));
+ _PROTOTYPE(static void get_kernel_access,(void));
+@@ -152,7 +157,7 @@
+       struct filedesc fd;
+       int i, nf;
+       MALLOC_S nb;
+-      static struct file **ofb = NULL;
++      static FILESTRUCT **ofb = NULL;
+       static int ofbb = 0;
+       short pss, sf;
+       int px;
+@@ -280,12 +285,12 @@
+        */
+           if (!fd.fd_ofiles || (nf = fd.fd_nfiles) <= 0)
+               continue;
+-          nb = (MALLOC_S)(sizeof(struct file *) * nf);
++          nb = (MALLOC_S)(sizeof(FILESTRUCT *) * nf);
+           if (nb > ofbb) {
+               if (!ofb)
+-                  ofb = (struct file **)malloc(nb);
++                  ofb = (FILESTRUCT **)malloc(nb);
+               else
+-                  ofb = (struct file **)realloc((MALLOC_P *)ofb, nb);
++                  ofb = (FILESTRUCT **)realloc((MALLOC_P *)ofb, nb);
+               if (!ofb) {
+                   (void) fprintf(stderr, "%s: PID %d, no file * space\n",
+                       Pn, p->P_PID);
+@@ -311,8 +316,10 @@
+                   }
+                   pofb = nb;
+               }
++#if __NetBSD_Version__ < 499006200
+               if (!fd.fd_ofileflags || kread((KA_T)fd.fd_ofileflags, pof, nb))
+                   zeromem(pof, nb);
++#endif
+           }
+ #endif        /* defined(HASFSTRUCT) */
+ 
+@@ -321,8 +328,20 @@
+        */
+           for (i = 0; i < nf; i++) {
+               if (ofb[i]) {
++#if __NetBSD_Version__ >= 499006200
++                  struct fdfile fdf;
++                  if (kread((KA_T)ofb[i], (char *)&fdf, sizeof(fdf)))
++                      continue;
++                  Cfp = fdf.ff_file;
++                  if (Cfp == NULL)
++                      continue;
++                  if (pof)
++                      pof[i] = fdf.ff_exclose;
++#else
++                  Cfp = ofb[i];
++#endif
+                   alloc_lfile(NULL, i);
+-                  process_file((KA_T)(Cfp = ofb[i]));
++                  process_file((KA_T)Cfp);
+                   if (Lf->sf) {
+ 
+ #if   defined(HASFSTRUCT)



Home | Main Index | Thread Index | Old Index