# HG changeset patch # User Michael Schloh von Bennewitz # Date 1231406468 -3600 # Node ID 88242dc55a66b0268c5c0becdc105d9a01c57b22 # Parent f9bd3f5f28c75623b143b59bd148f5e8958f46a6 Clean up packaging, use parallel make, and port to Solaris 11. diff -r f9bd3f5f28c7 -r 88242dc55a66 lsof/lsof.patch --- a/lsof/lsof.patch Thu Jan 08 10:19:54 2009 +0100 +++ b/lsof/lsof.patch Thu Jan 08 10:21:08 2009 +0100 @@ -1,7 +1,7 @@ Index: Configure --- Configure.orig 2008-04-15 15:24:36 +0200 +++ Configure 2008-04-16 08:19:20 +0200 -@@ -413,7 +413,7 @@ +@@ -417,7 +417,7 @@ fi # } fi # } LSOF_TGT="aix" @@ -10,7 +10,7 @@ if test $? -eq 0 # { then -@@ -567,7 +567,7 @@ +@@ -571,7 +571,7 @@ rm -f dialects/aix/aix5/j2/j2_snapshot.h fi # } @@ -19,7 +19,7 @@ if test $? -eq 0 # { then -@@ -605,7 +605,7 @@ +@@ -609,7 +609,7 @@ # This is AIX >= 5 on ia64. LSOF_TSTK64=1 @@ -28,7 +28,7 @@ if test $? -eq 0 # { then -@@ -682,7 +682,7 @@ +@@ -686,7 +686,7 @@ fi # } LSOF_TSTK64=1 LSOF_TMP1=1 @@ -37,7 +37,7 @@ if test $? -eq 0 # { then LSOF_CFGF="$LSOF_CFGF -maix64" -@@ -729,7 +729,7 @@ +@@ -733,7 +733,7 @@ fi #} LSOF_CFGF="$LSOF_CFGF -DAIXV=$LSOF_VERS" LSOF_DIALECT_DIR=aix @@ -46,7 +46,7 @@ if test $? -eq 0 # { then -@@ -1995,7 +1995,7 @@ +@@ -2134,7 +2134,7 @@ fi # } fi # } fi # } @@ -55,7 +55,7 @@ if test $? -eq 0 # { then LSOF_CCV=`$LSOF_CC -v 2>&1 | sed -n 's/.*version \(.*\)/\1/p'` -@@ -2047,7 +2047,7 @@ +@@ -2188,7 +2188,7 @@ then LSOF_CFGF="$LSOF_CFGF -Ae +DD32" else @@ -64,7 +64,7 @@ if test $? -ne 0 # { then LSOF_CFGF="$LSOF_CFGF +DD32" -@@ -2127,7 +2127,7 @@ +@@ -2272,7 +2272,7 @@ echo "* NOTICE! Configuring for 64 bit HP-UX *" echo "* *" echo "*****************************************" @@ -73,7 +73,7 @@ if test $? -eq 0 # { then -@@ -2196,7 +2196,7 @@ +@@ -2341,7 +2341,7 @@ else LSOF_CFGF="$LSOF_CFGF -D_FILE_OFFSET_BITS=64" LSOF_CINFO="${LSOF_CINFO}, 32 bit HP-UX" @@ -82,7 +82,7 @@ if test $? -ne 0 # { then LSOF_CFGF="$LSOF_CFGF +DAportable" -@@ -3403,7 +3403,7 @@ +@@ -3550,7 +3550,7 @@ LSOF_CCV=`$LSOF_CC -v 2>&1 | sed -n 's/.*version \(.*\)/\1/p'` fi # } fi # } @@ -91,17 +91,34 @@ if test $? -eq 0 # { then LSOF_CFGL="-w" -@@ -4040,6 +4040,9 @@ +@@ -4187,6 +4187,17 @@ LSOF_TSTBIGF=" " LSOF_TSTLFLG="-lsocket -lnsl" LSOF_VERS="100000" + if [ ".`isainfo -k`" = .amd64 ]; then + LSOF_CFGL="$LSOF_CFGL -lmp -lmd5 -lscf -ldoor -luutil" + fi ++ ;; ++ 5.11*) ++ LSOF_TSTBIGF=" " ++ LSOF_TSTLFLG="-lsocket -lnsl" ++ LSOF_VERS="110000" ++ if [ ".`isainfo -k`" = .amd64 ]; then ++ LSOF_CFGL="$LSOF_CFGL -lmp -lmd5 -lscf -ldoor -luutil" ++ fi ;; *) echo Unknown Solaris version: $LSOF_VSTR -@@ -4118,7 +4121,7 @@ +@@ -4264,7 +4275,7 @@ + ;; + 20500|20501) + ;; +- 20600|70000|80000|90000|100000) ++ 20600|70000|80000|90000|100000|110000) + if test "X$SOLARIS_26PR_GWINDOWS" = "X" # { + then + rm -f ${LSOF_TMPC}.* +@@ -4273,7 +4284,7 @@ echo "main(){" >> ${LSOF_TMPC}.c echo "enum prnodetype p=PR_GWINDOWS;}" >> ${LSOF_TMPC}.c echo "Testing prdata.h for PR_GWINDOWS, using $LSOF_CC" @@ -110,7 +127,7 @@ if test $? -eq 0 # { then $LSOF_CC ${LSOF_TMPC}.c -o ${LSOF_TMPC}.x > /dev/null 2>&1 -@@ -4143,7 +4146,7 @@ +@@ -4298,7 +4309,7 @@ echo "main(){" >> ${LSOF_TMPC}.c echo "enum prnodetype p=PR_LDT;}" >> ${LSOF_TMPC}.c echo "Testing prdata.h for PR_LDT, using $LSOF_CC" @@ -119,7 +136,7 @@ if test $? -eq 0 # { then $LSOF_CC ${LSOF_TMPC}.c -o ${LSOF_TMPC}.x > /dev/null 2>&1 -@@ -4173,7 +4176,7 @@ +@@ -4328,7 +4339,7 @@ echo $SOLARIS_KERNBITS | grep 64 > /dev/null if test $? -eq 0 # { then @@ -128,7 +145,7 @@ if test $? -eq 0 # { then -@@ -4377,7 +4380,7 @@ +@@ -4532,7 +4543,7 @@ # Check for Solaris 10 or higher ZFS. @@ -137,7 +154,7 @@ then LSOF_TMP1="dmu.h zfs_acl.h zfs_debug.h zfs_rlock.h zil.h spa.h zfs_context.h zfs_dir.h zfs_vfsops.h zio.h txg.h zfs_ctldir.h zfs_ioctl.h zfs_znode.h zio_impl.h" LSOF_TMP2="" -@@ -4460,7 +4463,7 @@ +@@ -4615,7 +4626,7 @@ echo "main(){" >> ${LSOF_TMPC}.c echo "enum vtype p=VSOCK;}" >> ${LSOF_TMPC}.c echo "Testing vnode.h for VSOCK, using $LSOF_CC" @@ -146,7 +163,7 @@ if test $? -eq 0 # { then $LSOF_CC ${LSOF_TMPC}.c -o ${LSOF_TMPC}.x > /dev/null 2>&1 -@@ -5139,7 +5142,7 @@ +@@ -5295,7 +5306,7 @@ echo "$i" >> $LSOF_TSTCFLG done # } fi # } @@ -155,10 +172,42 @@ if test $? -eq 0 # { then echo "-DLT_GCC" >> $LSOF_TSTCFLG +Index: dialects/sun/dnode.c +--- dialects/sun/dnode.c.orig 2008-10-21 18:16:45.000000000 +0200 ++++ dialects/sun/dnode.c 2009-01-08 01:59:20.609120000 +0100 +@@ -85,6 +85,8 @@ + #define LOOKDEV_ALL (LOOKDEV_TAB | LOOKDEV_CLONE | LOOKDEV_PSEUDO) + /* look all places */ + ++#define NOOP ((void)0) ++ + + /* + * SAM-FS definitions +@@ -2065,7 +2067,9 @@ + if (kvs && kv.vfs_data + && !kread((KA_T)kv.vfs_data, (char *)&pcfs, sizeof(pcfs))) { + +-#if solaris>=70000 ++#if solaris>=110000 /* pcfs_entps doesn't exist any more */ ++ NOOP; ++#elif solaris>=70000 + Lf->inode = (INODETYPE)pc_makenodeid(pc.pc_eblkno, + pc.pc_eoffset, + pc.pc_entry.pcd_attr, +@@ -2079,7 +2083,7 @@ + pc.pc_eoffset, + &pc.pc_entry, + pcfs.pcfs_entps); +-#endif /* solaris>=70000 */ ++#endif /* solaris>=110000 */ + + Lf->inp_ty = 1; + } Index: dialects/freebsd/machine.h --- dialects/freebsd/machine.h.orig 2006-03-28 01:29:14 +0200 +++ dialects/freebsd/machine.h 2008-04-16 08:17:46 +0200 -@@ -436,6 +436,11 @@ +@@ -441,6 +441,11 @@ */ /* #define HASSECURITY 1 */ @@ -181,3 +230,15 @@ #include #include #define _KERNEL 1 +Index: proc.c +--- proc.c.orig 2008-10-21 18:22:05.000000000 +0200 ++++ proc.c 2009-01-08 01:13:31.388963909 +0100 +@@ -841,8 +841,6 @@ + { + if (Lf->sf & SELEXCLF) + return; +- if (((Selflags & SELNET) == SELNET) && !(Lf->sf & SELNET)) +- return; + Lp->pss |= PS_SEC; + if (Plf) + Plf->next = Lf; diff -r f9bd3f5f28c7 -r 88242dc55a66 lsof/lsof.spec --- a/lsof/lsof.spec Thu Jan 08 10:19:54 2009 +0100 +++ b/lsof/lsof.spec Thu Jan 08 10:21:08 2009 +0100 @@ -32,7 +32,7 @@ Group: Debugging License: BSD Version: 4.81 -Release: 20081023 +Release: 20090106 # list of sources Source0: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_%{version}.tar.gz @@ -67,7 +67,7 @@ cd lsof_%{version}_src export PATH="/bin:/usr/bin:$PATH" export LSOF_CC="%{l_cc}" - export LSOF_MAKE="%{l_make} %{l_mflags}" + export LSOF_MAKE="%{l_make} %{l_mflags -O}" case "%{l_platform -t}" in *-freebsd* ) platform="freebsd"; LSOF_CC="/usr/bin/cc"; LSOF_MAKE="/usr/bin/make" ;; *-linux* ) platform="linux" ;;