Clean up packaging, use parallel make, and port to Solaris 11.

Thu, 08 Jan 2009 10:21:08 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 08 Jan 2009 10:21:08 +0100
changeset 36
88242dc55a66
parent 35
f9bd3f5f28c7
child 37
a13194f0acb7

Clean up packaging, use parallel make, and port to Solaris 11.

lsof/lsof.patch file | annotate | diff | comparison | revisions
lsof/lsof.spec file | annotate | diff | comparison | revisions
     1.1 --- a/lsof/lsof.patch	Thu Jan 08 10:19:54 2009 +0100
     1.2 +++ b/lsof/lsof.patch	Thu Jan 08 10:21:08 2009 +0100
     1.3 @@ -1,7 +1,7 @@
     1.4  Index: Configure
     1.5  --- Configure.orig	2008-04-15 15:24:36 +0200
     1.6  +++ Configure	2008-04-16 08:19:20 +0200
     1.7 -@@ -413,7 +413,7 @@
     1.8 +@@ -417,7 +417,7 @@
     1.9         fi	# }
    1.10       fi	# }
    1.11       LSOF_TGT="aix"
    1.12 @@ -10,7 +10,7 @@
    1.13       if test $? -eq 0	# {
    1.14       then
    1.15   
    1.16 -@@ -567,7 +567,7 @@
    1.17 +@@ -571,7 +571,7 @@
    1.18   
    1.19   	    rm -f dialects/aix/aix5/j2/j2_snapshot.h
    1.20   	  fi	# }
    1.21 @@ -19,7 +19,7 @@
    1.22   	  if test $? -eq 0	# {
    1.23   	  then
    1.24   
    1.25 -@@ -605,7 +605,7 @@
    1.26 +@@ -609,7 +609,7 @@
    1.27         # This is AIX >= 5 on ia64.
    1.28   
    1.29   	LSOF_TSTK64=1
    1.30 @@ -28,7 +28,7 @@
    1.31   	if test $? -eq 0	# {
    1.32   	then
    1.33   
    1.34 -@@ -682,7 +682,7 @@
    1.35 +@@ -686,7 +686,7 @@
    1.36   	  fi	# }
    1.37   	  LSOF_TSTK64=1
    1.38   	  LSOF_TMP1=1
    1.39 @@ -37,7 +37,7 @@
    1.40   	  if test $? -eq 0	# {
    1.41   	  then
    1.42   	    LSOF_CFGF="$LSOF_CFGF -maix64"
    1.43 -@@ -729,7 +729,7 @@
    1.44 +@@ -733,7 +733,7 @@
    1.45       fi	#}
    1.46       LSOF_CFGF="$LSOF_CFGF -DAIXV=$LSOF_VERS"
    1.47       LSOF_DIALECT_DIR=aix
    1.48 @@ -46,7 +46,7 @@
    1.49       if test $? -eq 0 	# {
    1.50       then
    1.51   
    1.52 -@@ -1995,7 +1995,7 @@
    1.53 +@@ -2134,7 +2134,7 @@
    1.54   	fi	# }
    1.55         fi	# }
    1.56       fi	# }
    1.57 @@ -55,7 +55,7 @@
    1.58       if test $? -eq 0	# {
    1.59       then
    1.60         LSOF_CCV=`$LSOF_CC -v 2>&1 | sed -n 's/.*version \(.*\)/\1/p'`
    1.61 -@@ -2047,7 +2047,7 @@
    1.62 +@@ -2188,7 +2188,7 @@
    1.63         then
    1.64   	LSOF_CFGF="$LSOF_CFGF -Ae +DD32"
    1.65         else
    1.66 @@ -64,7 +64,7 @@
    1.67   	if test $? -ne 0	# {
    1.68   	then
    1.69   	  LSOF_CFGF="$LSOF_CFGF +DD32"
    1.70 -@@ -2127,7 +2127,7 @@
    1.71 +@@ -2272,7 +2272,7 @@
    1.72   	    echo "* NOTICE!  Configuring for 64 bit HP-UX *"
    1.73   	    echo "*                                       *"
    1.74   	    echo "*****************************************"
    1.75 @@ -73,7 +73,7 @@
    1.76   	    if test $? -eq 0	# {
    1.77   	    then
    1.78   
    1.79 -@@ -2196,7 +2196,7 @@
    1.80 +@@ -2341,7 +2341,7 @@
    1.81   	  else
    1.82   	    LSOF_CFGF="$LSOF_CFGF -D_FILE_OFFSET_BITS=64"
    1.83   	    LSOF_CINFO="${LSOF_CINFO}, 32 bit HP-UX"
    1.84 @@ -82,7 +82,7 @@
    1.85   	    if test $? -ne 0	# {
    1.86   	    then
    1.87   	      LSOF_CFGF="$LSOF_CFGF +DAportable"
    1.88 -@@ -3403,7 +3403,7 @@
    1.89 +@@ -3550,7 +3550,7 @@
    1.90   	LSOF_CCV=`$LSOF_CC -v 2>&1 | sed -n 's/.*version \(.*\)/\1/p'`
    1.91         fi	# }
    1.92       fi	# }
    1.93 @@ -91,17 +91,34 @@
    1.94       if test $? -eq 0	# {
    1.95       then
    1.96         LSOF_CFGL="-w"
    1.97 -@@ -4040,6 +4040,9 @@
    1.98 +@@ -4187,6 +4187,17 @@
    1.99   	LSOF_TSTBIGF=" "
   1.100   	LSOF_TSTLFLG="-lsocket -lnsl"
   1.101   	LSOF_VERS="100000"
   1.102  + 	if [ ".`isainfo -k`" = .amd64 ]; then
   1.103  + 	    LSOF_CFGL="$LSOF_CFGL -lmp -lmd5 -lscf -ldoor -luutil"
   1.104  + 	fi
   1.105 ++	;;
   1.106 ++      5.11*)
   1.107 ++	LSOF_TSTBIGF=" "
   1.108 ++	LSOF_TSTLFLG="-lsocket -lnsl"
   1.109 ++	LSOF_VERS="110000"
   1.110 ++ 	if [ ".`isainfo -k`" = .amd64 ]; then
   1.111 ++ 	    LSOF_CFGL="$LSOF_CFGL -lmp -lmd5 -lscf -ldoor -luutil"
   1.112 ++ 	fi
   1.113   	;;
   1.114         *)
   1.115   	echo Unknown Solaris version: $LSOF_VSTR
   1.116 -@@ -4118,7 +4121,7 @@
   1.117 +@@ -4264,7 +4275,7 @@
   1.118 +       ;;
   1.119 +     20500|20501)
   1.120 +       ;;
   1.121 +-    20600|70000|80000|90000|100000)
   1.122 ++    20600|70000|80000|90000|100000|110000)
   1.123 +       if test "X$SOLARIS_26PR_GWINDOWS" = "X"	# {
   1.124 +       then
   1.125 + 	rm -f ${LSOF_TMPC}.*
   1.126 +@@ -4273,7 +4284,7 @@
   1.127   	echo "main(){" >> ${LSOF_TMPC}.c
   1.128   	echo "enum prnodetype p=PR_GWINDOWS;}" >> ${LSOF_TMPC}.c
   1.129   	echo "Testing prdata.h for PR_GWINDOWS, using $LSOF_CC"
   1.130 @@ -110,7 +127,7 @@
   1.131   	if test $? -eq 0	# {
   1.132   	then
   1.133   	  $LSOF_CC ${LSOF_TMPC}.c -o ${LSOF_TMPC}.x  > /dev/null 2>&1
   1.134 -@@ -4143,7 +4146,7 @@
   1.135 +@@ -4298,7 +4309,7 @@
   1.136   	echo "main(){" >> ${LSOF_TMPC}.c
   1.137   	echo "enum prnodetype p=PR_LDT;}" >> ${LSOF_TMPC}.c
   1.138   	echo "Testing prdata.h for PR_LDT, using $LSOF_CC"
   1.139 @@ -119,7 +136,7 @@
   1.140   	if test $? -eq 0	# {
   1.141   	then
   1.142   	  $LSOF_CC ${LSOF_TMPC}.c -o ${LSOF_TMPC}.x > /dev/null 2>&1
   1.143 -@@ -4173,7 +4176,7 @@
   1.144 +@@ -4328,7 +4339,7 @@
   1.145   	echo $SOLARIS_KERNBITS | grep 64 > /dev/null
   1.146   	if test $? -eq 0	# {
   1.147   	then
   1.148 @@ -128,7 +145,7 @@
   1.149   	  if test $? -eq 0	# {
   1.150   	  then
   1.151   
   1.152 -@@ -4377,7 +4380,7 @@
   1.153 +@@ -4532,7 +4543,7 @@
   1.154   
   1.155         # Check for Solaris 10 or higher ZFS.
   1.156   
   1.157 @@ -137,7 +154,7 @@
   1.158         then
   1.159   	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"
   1.160   	LSOF_TMP2=""
   1.161 -@@ -4460,7 +4463,7 @@
   1.162 +@@ -4615,7 +4626,7 @@
   1.163         echo "main(){" >> ${LSOF_TMPC}.c
   1.164         echo "enum vtype p=VSOCK;}" >> ${LSOF_TMPC}.c
   1.165         echo "Testing vnode.h for VSOCK, using $LSOF_CC"
   1.166 @@ -146,7 +163,7 @@
   1.167         if test $? -eq 0	# {
   1.168         then
   1.169   	$LSOF_CC ${LSOF_TMPC}.c -o ${LSOF_TMPC}.x > /dev/null 2>&1
   1.170 -@@ -5139,7 +5142,7 @@
   1.171 +@@ -5295,7 +5306,7 @@
   1.172       echo "$i" >> $LSOF_TSTCFLG
   1.173     done	# }
   1.174   fi	# }
   1.175 @@ -155,10 +172,42 @@
   1.176   if test $? -eq 0	# {
   1.177   then
   1.178     echo "-DLT_GCC" >> $LSOF_TSTCFLG
   1.179 +Index: dialects/sun/dnode.c
   1.180 +--- dialects/sun/dnode.c.orig	2008-10-21 18:16:45.000000000 +0200
   1.181 ++++ dialects/sun/dnode.c	2009-01-08 01:59:20.609120000 +0100
   1.182 +@@ -85,6 +85,8 @@
   1.183 + #define	LOOKDEV_ALL	(LOOKDEV_TAB | LOOKDEV_CLONE | LOOKDEV_PSEUDO)
   1.184 + 					/* look all places */
   1.185 + 
   1.186 ++#define NOOP ((void)0)
   1.187 ++
   1.188 + 
   1.189 + /*
   1.190 +  * SAM-FS definitions
   1.191 +@@ -2065,7 +2067,9 @@
   1.192 + 	    if (kvs && kv.vfs_data
   1.193 + 	    && !kread((KA_T)kv.vfs_data, (char *)&pcfs, sizeof(pcfs))) {
   1.194 + 
   1.195 +-#if	solaris>=70000
   1.196 ++#if	solaris>=110000  /* pcfs_entps doesn't exist any more */
   1.197 ++		NOOP;
   1.198 ++#elif	solaris>=70000
   1.199 + 		Lf->inode = (INODETYPE)pc_makenodeid(pc.pc_eblkno,
   1.200 + 			    pc.pc_eoffset,
   1.201 + 			    pc.pc_entry.pcd_attr,
   1.202 +@@ -2079,7 +2083,7 @@
   1.203 + 			    pc.pc_eoffset,
   1.204 + 			    &pc.pc_entry,
   1.205 + 			    pcfs.pcfs_entps);
   1.206 +-#endif	/* solaris>=70000 */
   1.207 ++#endif	/* solaris>=110000 */
   1.208 + 
   1.209 + 		Lf->inp_ty = 1;
   1.210 + 	    }
   1.211  Index: dialects/freebsd/machine.h
   1.212  --- dialects/freebsd/machine.h.orig	2006-03-28 01:29:14 +0200
   1.213  +++ dialects/freebsd/machine.h	2008-04-16 08:17:46 +0200
   1.214 -@@ -436,6 +436,11 @@
   1.215 +@@ -441,6 +441,11 @@
   1.216    */
   1.217   
   1.218   /* #define	HASSECURITY	1 */
   1.219 @@ -181,3 +230,15 @@
   1.220   #include <sys/wait.h>
   1.221   #include <sys/types32.h>
   1.222   #define	_KERNEL	1
   1.223 +Index: proc.c
   1.224 +--- proc.c.orig	2008-10-21 18:22:05.000000000 +0200
   1.225 ++++ proc.c	2009-01-08 01:13:31.388963909 +0100
   1.226 +@@ -841,8 +841,6 @@
   1.227 + {
   1.228 + 	if (Lf->sf & SELEXCLF)
   1.229 + 	    return;
   1.230 +-	if (((Selflags & SELNET) == SELNET) && !(Lf->sf & SELNET))
   1.231 +-	    return;
   1.232 + 	Lp->pss |= PS_SEC;
   1.233 + 	if (Plf)
   1.234 + 	    Plf->next = Lf;
     2.1 --- a/lsof/lsof.spec	Thu Jan 08 10:19:54 2009 +0100
     2.2 +++ b/lsof/lsof.spec	Thu Jan 08 10:21:08 2009 +0100
     2.3 @@ -32,7 +32,7 @@
     2.4  Group:        Debugging
     2.5  License:      BSD
     2.6  Version:      4.81
     2.7 -Release:      20081023
     2.8 +Release:      20090106
     2.9  
    2.10  #   list of sources
    2.11  Source0:      ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_%{version}.tar.gz
    2.12 @@ -67,7 +67,7 @@
    2.13      cd lsof_%{version}_src
    2.14      export PATH="/bin:/usr/bin:$PATH"
    2.15      export LSOF_CC="%{l_cc}"
    2.16 -    export LSOF_MAKE="%{l_make} %{l_mflags}"
    2.17 +    export LSOF_MAKE="%{l_make} %{l_mflags -O}"
    2.18      case "%{l_platform -t}" in
    2.19          *-freebsd* ) platform="freebsd"; LSOF_CC="/usr/bin/cc"; LSOF_MAKE="/usr/bin/make" ;;
    2.20          *-linux*   ) platform="linux"   ;;

mercurial