[OpenAFS-devel] openafs spec-file kernel-detection
Alexander Bergolth
leo@strike.wu-wien.ac.at
Mon, 15 May 2006 17:04:20 +0200
This is a multi-part message in MIME format.
--------------010302070909080109070309
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
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
--------------010302070909080109070309
Content-Type: text/x-patch;
name="openafs-kvers-is.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="openafs-kvers-is.patch"
--- /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
--------------010302070909080109070309--