[OpenAFS-devel] openafs spec-file kernel-detection

Derek Atkins warlord@MIT.EDU
Mon, 15 May 2006 18:51:05 -0400


Thanks.  I applied this to my tree; it'll make it into the next
set of RPMs.

-derek

Alexander Bergolth <leo@strike.wu-wien.ac.at> writes:

> Hi!
>
> When trying to build an OpenAFS kernel-rpm, the openafs-kvers-is.sh
> helper script failed detecting the kernel-type and -version for my
> kernel version 2.6.16-1.2111_1.99.rhfc5.cubbi_suspend2_8ksmp.
>
> The attached patch fixes ktype and kvers detection for me.
>
> Apart from this small problem kernel-rpm generation works very smooth,
> thanks! (Except for the annoying CONFIG_DEBUG_RODATA which is enabled on
> new FC4 and FC5 kernels by default.)
>
> Cheers,
> --leo
> -- 
> -----------------------------------------------------------------------
> Alexander.Bergolth@wu-wien.ac.at                Fax: +43-1-31336-906050
> Zentrum fuer Informatikdienste - Wirtschaftsuniversitaet Wien - Austria
>
>
> --- /tmp/openafs-kvers-is.sh	2006-04-17 04:33:11.000000000 +0200
> +++ openafs-kvers-is.sh	2006-05-14 19:23:14.042413000 +0200
> @@ -10,13 +10,16 @@
>  
>  if [ "$1" = "parset" ] ; then
>    #logger "parsing type from $2"
> -  echo "$2" | /bin/sed -e 's/^.*[0-9L]\([^0-9L]*\)/\1/'
> +  case "$2" in
> +    *smp) echo 'smp' ;;
> +    *hugemem) echo 'hugemem' ;;
> +  esac
>    exit 0
>  fi
>  
>  if [ "$1" = "kvers" ] ; then
>    #logger "parsing type from $2"
> -  echo "$2" | /bin/sed -e 's/^\(.*[0-9L]\)[^0-9L]*$/\1/'
> +  echo "$2" | /bin/sed -re 's/smp$//; s/hugemem$//;'
>    exit 0
>  fi
>  
>

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord@MIT.EDU                        PGP key available