diff options
author | atatat <atatat> | 2003-06-19 03:09:37 +0000 |
---|---|---|
committer | atatat <atatat> | 2003-06-19 03:09:37 +0000 |
commit | 1473455a9b9af396f502ce6bfd9790bcca6710ee (patch) | |
tree | 48a3657dab9fdb52f5816a4b15729424fbb8cac8 /sysutils/lsof | |
parent | 825c64d403d05979160300aa2d0f86868c03ad22 (diff) | |
download | pkgsrc-1473455a9b9af396f502ce6bfd9790bcca6710ee.tar.gz |
Upgrade to lsof version 4.68. Changes related to or affecting NetBSD
(or pkgsrc) from the 00DIST file:
4.68 June 18, 2003
...
Upgraded EXT2FS and UFS support for NetBSD and
OpenBSD to handle new inode information, and the
fast UFS1 and UFS2 file systems.
With the help of Andrew Brown <atatat@atatdot.net>
determined the NetBSD snapshot (1.6F) at which
<sys/mount.h> could be included under _KERNEL, thus
eliminating the lsof netexport.h hack. The same
change applies to OpenBSD versions 3.3 and above.
...
The former change obsoletes patches ab, ac, and ad.
Diffstat (limited to 'sysutils/lsof')
-rw-r--r-- | sysutils/lsof/Makefile | 5 | ||||
-rw-r--r-- | sysutils/lsof/distinfo | 9 | ||||
-rw-r--r-- | sysutils/lsof/patches/patch-ab | 245 | ||||
-rw-r--r-- | sysutils/lsof/patches/patch-ac | 71 | ||||
-rw-r--r-- | sysutils/lsof/patches/patch-ad | 151 |
5 files changed, 5 insertions, 476 deletions
diff --git a/sysutils/lsof/Makefile b/sysutils/lsof/Makefile index 40092beace3..aeae3f2cddc 100644 --- a/sysutils/lsof/Makefile +++ b/sysutils/lsof/Makefile @@ -1,9 +1,8 @@ -# $NetBSD: Makefile,v 1.62 2003/05/04 10:28:30 salo Exp $ +# $NetBSD: Makefile,v 1.63 2003/06/19 03:09:37 atatat Exp $ # -DISTNAME= lsof_4.67 +DISTNAME= lsof_4.68 PKGNAME= ${DISTNAME:S/_/-/} -PKGREVISION= 2 WRKSRC= ${WRKDIR}/${DISTNAME}/${SRCBALL_NAME} CATEGORIES= sysutils MASTER_SITES= ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ \ diff --git a/sysutils/lsof/distinfo b/sysutils/lsof/distinfo index a829c5f19ee..11950c29bd6 100644 --- a/sysutils/lsof/distinfo +++ b/sysutils/lsof/distinfo @@ -1,8 +1,5 @@ -$NetBSD: distinfo,v 1.28 2003/05/04 10:27:44 salo Exp $ +$NetBSD: distinfo,v 1.29 2003/06/19 03:09:37 atatat Exp $ -SHA1 (lsof_4.67.tar.gz) = bc6339455586e1dbb7e9b1b70af6f43ec12144f1 -Size (lsof_4.67.tar.gz) = 959529 bytes +SHA1 (lsof_4.68.tar.gz) = 71df82816e84b4218c473a7102ff31c002192803 +Size (lsof_4.68.tar.gz) = 963862 bytes SHA1 (patch-aa) = 36790019394b4088c226222d4aefaec50430bcf3 -SHA1 (patch-ab) = b44156ef6b2a5b586df2746101bbd22309a434ed -SHA1 (patch-ac) = 1a8dd0ac9e6fe2613e356e1abc8702a920a63026 -SHA1 (patch-ad) = dd3823ae58866885216993a1297ee8154943cabf diff --git a/sysutils/lsof/patches/patch-ab b/sysutils/lsof/patches/patch-ab deleted file mode 100644 index fda099a6ea5..00000000000 --- a/sysutils/lsof/patches/patch-ab +++ /dev/null @@ -1,245 +0,0 @@ -$NetBSD: patch-ab,v 1.20 2003/05/03 16:55:29 atatat Exp $ - ---- dialects/n+obsd/dnode.c.orig 2003-03-23 14:26:47.000000000 -0500 -+++ dialects/n+obsd/dnode.c -@@ -200,6 +200,22 @@ process_node(va) - - #endif /* defined(HASFDESCFS) */ - -+#if defined(HASEXT2FS) -+# if defined(HASI_E2FS_PTR) -+ struct ext2fs_dinode ed; -+# endif /* defined(HASI_E2FS_PTR) */ -+ struct ext2fs_dinode *edp = (struct ext2fs_dinode *)NULL; -+#endif /* defined(HASEXT2FS) */ -+ -+#if defined(HASI_FFS1) -+ unsigned char ffs = 0; -+ unsigned char u1s = 0; -+ unsigned char u2s = 0; -+ struct ufs1_dinode u1; -+ struct ufs2_dinode u2; -+ struct ufsmount um; -+#endif /* defined(HASI_FFS1) */ -+ - #if defined(HASKERNFS) - struct kernfs_node kn; - struct stat ksb; -@@ -262,6 +278,14 @@ process_overlaid_node: - ksbs = 0; - #endif /* defined(HASKERNFS) */ - -+#if defined(HASEXT2FS) -+ edp = (struct ext2fs_dinode *)NULL; -+#endif /* defined(HASEXT2FS) */ -+ -+#if defined(HASI_FFS1) -+ ffs = u1s = u2s = 0; -+#endif /* defined(HASI_FFS1) */ -+ - /* - * Read the vnode. - */ -@@ -503,12 +527,51 @@ process_overlaid_node: - } - - #if defined(HASEXT2FS) -- if (v->v_tag == VT_EXT2FS) -+ if (v->v_tag == VT_EXT2FS) { - nty = EXT2NODE; -- else -+ -+# if defined(HASI_E2FS_PTR) -+ if (i.i_din.e2fs_din -+ && !kread((KA_T)i.i_din.e2fs_din, (char *)&ed, sizeof(ed))) -+ edp = &ed; -+# else /* !defined(HASI_E2FS_PTR) */ -+ edp = &i.i_din.e2fs_din; -+# endif /* defined(HASI_E2FS_PTR) */ -+ -+ } else - #endif /* defined(HASEXT2FS) */ - -+ { - nty = INODE; -+ -+#if defined(HASI_FFS1) -+ /* -+ * If there are multiple FFS's, read the relevant structures. -+ */ -+ if (i.i_ump -+ && !kread((KA_T)i.i_ump, (char *)&um, sizeof(um))) { -+ if (um.um_fstype == UFS1) { -+ ffs = 1; -+ if (i.i_din.ffs1_din -+ && !kread((KA_T)i.i_din.ffs1_din, (char *)&u1, -+ sizeof(u1))) -+ { -+ u1s = 1; -+ } -+ } else if (um.um_fstype == UFS2) { -+ ffs = 2; -+ if (i.i_din.ffs2_din -+ && !kread((KA_T)i.i_din.ffs2_din, (char *)&u2, -+ sizeof(u2))) -+ { -+ u2s = 1; -+ } -+ } -+ } -+#endif /* defined(HASI_FFS1) */ -+ -+ } -+ - if ((lff = i.i_lockf)) { - - /* -@@ -609,18 +672,21 @@ process_overlaid_node: - #if defined(HASEXT2FS) - case EXT2NODE: - --# if defined(HASI_FFS) -- dev = i.i_dev; -- devs = 1; --# else /* !defined(HASI_FFS) */ - dev = i.i_dev; - devs = 1; - if ((type == VCHR) || (type == VBLK)) { -- rdev = i.i_rdev; -+ -+# if defined(HASI_E2FS_PTR) -+ if (edp) { -+ rdev = edp->e2di_rdev; -+ rdevs = 1; -+ } -+# else /* !defined(HASI_E2FS_PTR) */ -+ rdev = i.i_din.e2fs_din.e2di_rdev; - rdevs = 1; -- } --# endif /* defined(HASI_FFS) */ -+# endif /* defined(HASI_E2FS_PTR) */ - -+ } - break; - #endif /* defined(HASEXT2FS) */ - -@@ -631,11 +697,26 @@ process_overlaid_node: - - #if defined(HASI_FFS) - rdev = i.i_ffs_rdev; -+ rdevs = 1; - #else /* !defined(HASI_FFS) */ -+# if defined(HASI_FFS1) -+ if (ffs == 1) { -+ if (u1s) { -+ rdev = u1.di_rdev; -+ rdevs = 1; -+ } -+ } else if (ffs == 2) { -+ if (u2s) { -+ rdev = u2.di_rdev; -+ rdevs = 1; -+ } -+ } -+# else /* !defined(HASI_FFS1) */ - rdev = i.i_rdev; -+ rdevs = 1; -+# endif /* defined(HASI_FFS1) */ - #endif /* defined(HASI_FFS) */ - -- rdevs = 1; - } - break; - -@@ -807,11 +888,26 @@ process_overlaid_node: - - #if defined(HASI_FFS) - Lf->sz = (SZOFFTYPE)i.i_ffs_size; -+ Lf->sz_def = 1; - #else /* !defined(HASI_FFS) */ -+# if defined(HASI_FFS1) -+ if (ffs == 1) { -+ if (u1s) { -+ Lf->sz = (SZOFFTYPE)u1.di_size; -+ Lf->sz_def = 1; -+ } -+ } else if (ffs == 2) { -+ if (u2s) { -+ Lf->sz = (SZOFFTYPE)u2.di_size; -+ Lf->sz_def = 1; -+ } -+ } -+# else /* !defined(HASI_FFS1) */ - Lf->sz = (SZOFFTYPE)i.i_size; -+ Lf->sz_def = 1; -+# endif /* defined(HASI_FFS1) */ - #endif /* defined(HASI_FFS) */ - -- Lf->sz_def = 1; - } - - #if defined(HASMSDOSFS) -@@ -828,14 +924,15 @@ process_overlaid_node: - - #if defined(HASEXT2FS) - else if (nty == EXT2NODE) { -- --# if defined(HASI_E2FS) -+# if defined(HASI_E2FS_PTR) -+ if (edp) { -+ Lf->sz = (SZOFFTYPE)edp->e2di_size; -+ Lf->sz_def = 1; -+ } -+# else /* !defined(HASI_E2FS_PTR) */ - Lf->sz = (SZOFFTYPE)i.i_e2fs_size; --# else /* !defined(HASI_E2FS) */ -- Lf->sz = (SZOFFTYPE)i.i_size; --# endif /* defined(HASI_E2FS) */ -- - Lf->sz_def = 1; -+# endif /* defined(HASI_E2FS_PTR) */ - } - #endif /* defined(HASEXT2FS) */ - -@@ -880,8 +977,24 @@ process_overlaid_node: - - # if defined(HASI_FFS) - Lf->nlink = (long)i.i_ffs_nlink; -+ Lf->nlink_def = 1; - # else /* !defined(HASI_FFS) */ -+# if defined(HASI_FFS1) -+ if (ffs == 1) { -+ if (u1s) { -+ Lf->nlink = (long)u1.di_nlink; -+ Lf->nlink_def = 1; -+ } -+ } else if (ffs == 2) { -+ if (u2s) { -+ Lf->nlink = (long)u2.di_nlink; -+ Lf->nlink_def = 1; -+ } -+ } -+# else /* !defined(HASI_FFS1) */ - Lf->nlink = (long)i.i_nlink; -+ Lf->nlink_def = 1; -+# endif /* defined(HASI_FFS1) */ - # endif /* defined(HASI_FFS) */ - - Lf->nlink_def = 1; -@@ -897,8 +1010,15 @@ process_overlaid_node: - - #if defined(HASEXT2FS) - else if (nty == EXT2NODE) { -- Lf->nlink - (long)i.i_e2fs_nlink; -+# if defined(HASI_E2FS_PTR) -+ if (edp) { -+ Lf->nlink = (long)edp->e2di_nlink; -+ Lf->nlink_def = 1; -+ } -+# else /* !defined(HASI_E2FS_PTR) */ -+ Lf->nlink = (long)i.i_e2fs_nlink; - Lf->nlink_def = 1; -+# endif /* defined(HASI_E2FS_PTR) */ - } - #endif /* defined(HASEXT2FS) */ - diff --git a/sysutils/lsof/patches/patch-ac b/sysutils/lsof/patches/patch-ac deleted file mode 100644 index 66f89e3f4aa..00000000000 --- a/sysutils/lsof/patches/patch-ac +++ /dev/null @@ -1,71 +0,0 @@ -$NetBSD: patch-ac,v 1.8 2003/05/03 16:55:29 atatat Exp $ - ---- dialects/n+obsd/dlsof.h.orig 2003-03-23 14:51:12.000000000 -0500 -+++ dialects/n+obsd/dlsof.h -@@ -73,7 +73,17 @@ struct buf; /* dummy for function protot - - #define NFS - #define m_stat mnt_stat -+ -+# if defined(NETBSDV) && __NetBSD_Version__>=106060000 -+#define _KERNEL -+# endif /* defined(NETBSDV) && __NetBSD_Version__>=106060000 */ -+ - #include <sys/mount.h> -+ -+# if defined(NETBSDV) && __NetBSD_Version__>=106060000 -+#undef _KERNEL -+# endif /* defined(NETBSDV) && __NetBSD_Version__>=106060000 */ -+ - #include <rpc/types.h> - #include <sys/protosw.h> - -@@ -87,6 +97,7 @@ struct buf; /* dummy for function protot - #include <msdosfs/bpb.h> - #include <msdosfs/fat.h> - -+# if defined(OPENBSDV) || (defined(NETBSDV) && __NetBSD_Version__<106060000) - /* - * As a terrible hack, the lsof Configure script extracts the netcred and - * netexport structure definitions from <sys/mount.h> and places them in -@@ -100,9 +111,14 @@ struct buf; /* dummy for function protot - * - * THIS IS A TERRIBLE AND FRAGILE HACK!!! It might break if the netexport or - * netcred definitions change radically in <sys/mount.h>. -+ * -+ * It is no longer needed for NetBSD Versions 1.6F and above. - */ - - #include "netexport.h" -+# endif /* defined(OPENBSDV) -+ || (defined(NETBSDV) && __NetBSD_Version__<106060000) */ -+ - #define _KERNEL - struct nameidata; /* to satisfy a function prototype in msdosfsmount.h */ - #include <msdosfs/msdosfsmount.h> -@@ -178,6 +194,12 @@ struct sockproto { - #undef DIRBLKSIZ - # endif /* defined(DIRBLKSIZ) */ - -+# if defined(HASI_FFS1) -+#define _KERNEL -+#include <ufs/ufs/ufsmount.h> -+#undef _KERNEL -+# endif /* defined(HASI_FFS1) */ -+ - #include <ufs/ufs/inode.h> - - # if defined(DIRENT_BLKSIZ) -@@ -223,9 +245,10 @@ struct sockproto { - - # if defined(HASNULLFS) - #define _KERNEL --# if defined(NETBSDV) && NETBSDV>=1050 -+# if defined(NETBSDV) && NETBSDV>=1050 && __NetBSD_Version__<106060000 - #include "netexport.h" --# endif /* defined(NETBSDV) && NETBSDV>=1050 */ -+# endif /* defined(NETBSDV) && NETBSDV>=1050 -+ && __NetBSD_Version__<106060000 */ - #include <miscfs/nullfs/null.h> - #undef _KERNEL - # endif /* defined(HASNULLFS) */ diff --git a/sysutils/lsof/patches/patch-ad b/sysutils/lsof/patches/patch-ad deleted file mode 100644 index 7921c412beb..00000000000 --- a/sysutils/lsof/patches/patch-ad +++ /dev/null @@ -1,151 +0,0 @@ -$NetBSD: patch-ad,v 1.3 2003/05/03 16:55:30 atatat Exp $ - ---- Configure.orig 2003-03-23 14:28:10.000000000 -0500 -+++ Configure -@@ -169,9 +169,9 @@ then - LSOF_VSTR="" - fi # } - --# Make sure the help file is removed before an abnormal exit. -+# Make sure temporary files are removed before an abnormal exit. - --trap 'rm -f $LSOF_HLP ${LSOF_TMPC_BASE}*; exit 1' 1 2 3 15 -+trap 'rm -f ${LSOF_HLP_BASE}* ${LSOF_TMPC_BASE}*; exit 1' 1 2 3 15 - - rm -f $LSOF_HLP - cat > $LSOF_HLP << LSOF_HLP -@@ -230,11 +230,11 @@ do - echo "(cd ${LSOF_TSTSUBD}; make spotless)" - (cd ${LSOF_TSTSUBD}; make spotless) - else -- echo '(cd ${LSOF_TSTSUBD); rm *.o config.*)' -+ echo '(cd ${LSOF_TSTSUBD}; rm *.o config.*)' - (cd ${LSOF_TSTSUBD}; rm *.o config.*) - fi # } -- rm -f $LSOF_F $LSOF_HLP $LSOF_MKFC ${LSOF_TMPC_BASE}* -- echo rm -f $LSOF_F $LSOF_HLP $LSOF_MKFC ${LSOF_TMPC_BASE}* -+ rm -f $LSOF_F $LSOF_MKFC ${LSOF_TMPC_BASE}* -+ echo rm -f $LSOF_F $LSOF_MKFC ${LSOF_TMPC_BASE}* - rm -rf AFSHeaders AFSVersion version.h - echo "rm -rf AFSHeaders AFSVersion version.h" - rm -f ${LSOF_HLP_BASE}* cd9660_node.h -@@ -2212,15 +2212,21 @@ kernel generation process. - if test $? -eq 0 # { - then - LSOF_CFGF="$LSOF_CFGF -DHASI_FFS" -+ else -+ grep -q i_ffs1_size ${LSOF_INCLUDE}/ufs/ufs/inode.h -+ if test $? -eq 0 # { -+ then -+ LSOF_CFGF="$LSOF_CFGF -DHASI_FFS1" -+ fi #} - fi # } - grep -q VT_EXT2FS ${LSOF_INCLUDE}/sys/vnode.h - if test $? -eq 0 # { - then - LSOF_CFGF="$LSOF_CFGF -DHASEXT2FS" -- grep -q i_e2fs_size ${LSOF_INCLUDE}/ufs/ufs/inode.h -+ grep -q "*e2fs_din" ${LSOF_INCLUDE}/ufs/ufs/inode.h - if test $? -eq 0 # { - then -- LSOF_CFGF="$LSOF_CFGF -DHASI_E2FS" -+ LSOF_CFGF="$LSOF_CFGF -DHASI_E2FS_PTR" - fi # } - fi # } - if test -r ${LSOF_INCLUDE}/nfs/nfsnode.h # { -@@ -2272,7 +2278,7 @@ kernel generation process. - if test -r ${LSOF_INCLUDE}/sys/mount.h # { - then - -- # Build the netexport.h header file for NetBSD from <sys/mount.h>. -+ # Build the netexport.h header file for NetBSD. - - LSOF_TMP1=${LSOF_TMPC}.edscr - LSOF_TMP2=${LSOF_TMPC}.netcred -@@ -2447,23 +2453,10 @@ kernel generation process. - # If the OpenBSD version isn't pre-defined, determine it. - - case $LSOF_VSTR in # { -- 1.2*) -+ 1*) - LSOF_VERS=1020 -- ;; -- 2.0*) -- LSOF_VERS=2000 -- ;; -- 2.1*) -- LSOF_VERS=2010 -- ;; -- 2.2*) -- LSOF_VERS=2020 -- ;; -- 2.3*) -- LSOF_VERS=2030 -- ;; -- 2.4*) -- LSOF_VERS=2040 -+ echo "!!!WARNING!!! Unsupported OpenBSD 1.x version: $LSOF_VSTR" -+ echo "!!!WARNING!!! Configuring for OpenBSD 1.2" - ;; - 2.5*) - LSOF_VERS=2050 -@@ -2483,6 +2476,12 @@ kernel generation process. - LSOF_TSTBIGF=" " - LSOF_VERS=2090 - ;; -+ 2*) -+ LSOF_TSTBIGF=" " -+ LSOF_VERS=2090 -+ echo "!!!WARNING!!! Unsupported OpenBSD 2.x version: $LSOF_VSTR" -+ echo "!!!WARNING!!! Configuring for OpenBSD 2.9" -+ ;; - 3.0*) - LSOF_TSTBIGF=" " - LSOF_VERS=3000 -@@ -2495,15 +2494,20 @@ kernel generation process. - LSOF_TSTBIGF=" " - LSOF_VERS=3020 - ;; -+ 3.3*) -+ LSOF_TSTBIGF=" " -+ LSOF_VERS=3030 -+ ;; - 3*) -- LSOF_VERS=3010 -- echo "!!!WARNING!!! Unsupported OpenBSD version: $LSOF_VSTR" -- echo "!!!WARNING!!! Configuring for OpenBSD 3.1" -+ LSOF_TSTBIGF=" " -+ LSOF_VERS=3020 -+ echo "!!!WARNING!!! Unsupported OpenBSD 3.x version: $LSOF_VSTR" -+ echo "!!!WARNING!!! Configuring for OpenBSD 3.2" - ;; - *) - echo "Unknown OpenBSD release: $LSOF_VSTR" -- echo Assuming OpenBSD 1.2 -- LSOF_VERS=1020 -+ echo Assuming OpenBSD 3.2 -+ LSOF_VERS=3020 - ;; - esac # } - fi # } -@@ -2511,7 +2515,7 @@ kernel generation process. - # Test for legal OpenBSD version. - - case $LSOF_VERS in # { -- 1020|2000|2010|2020|2030|2040|2050|2060|2070|2080|2090|3000|3010|3020) -+ 1020|2050|2060|2070|2080|2090|3000|3010|3020|3030) - ;; - *) - echo "Unknown OpenBSD version: $LSOF_VERS" -@@ -2597,6 +2601,11 @@ kernel generation process. - if test $? -eq 0 # { - then - LSOF_CFGF="$LSOF_CFGF -DHASEXT2FS" -+ grep -q "*e2fs_din" ${LSOF_INCLUDE}/ufs/ufs/inode.h -+ if test $? -eq 0 # { -+ then -+ LSOF_CFGF="$LSOF_CFGF -DHASI_E2FS_PTR" -+ fi # } - fi # } - grep -q nc_vpid ${LSOF_INCLUDE}/sys/namei.h - if test $? -eq 0 # { |