[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

r2286 - in glibc-package/branches/glibc-2.6/debian: . debhelper.in local/etc_init.d script.in



Author: aurel32
Date: 2007-05-24 12:50:31 +0000 (Thu, 24 May 2007)
New Revision: 2286

Modified:
   glibc-package/branches/glibc-2.6/debian/changelog
   glibc-package/branches/glibc-2.6/debian/debhelper.in/libc.preinst
   glibc-package/branches/glibc-2.6/debian/local/etc_init.d/glibc.sh
   glibc-package/branches/glibc-2.6/debian/script.in/kernelcheck.sh
Log:
  * debian/script.in/kernelcheck.sh: add a warning for FreeBSD kernels 
    5.X.
  * local/etc_init.d/glibc.sh, debhelper.in/libc.preinst: don't check for
    linux kernel, it is now done in script.in/kernelcheck.sh.




Modified: glibc-package/branches/glibc-2.6/debian/changelog
===================================================================
--- glibc-package/branches/glibc-2.6/debian/changelog	2007-05-24 12:36:53 UTC (rev 2285)
+++ glibc-package/branches/glibc-2.6/debian/changelog	2007-05-24 12:50:31 UTC (rev 2286)
@@ -56,8 +56,12 @@
   [ Aurelien Jarno ]
   * patches/sparc/local-undefined-registers.diff: new file to ignore
     global registers while looking for undefined symbols.
+  * debian/script.in/kernelcheck.sh: add a warning for FreeBSD kernels 
+    5.X.
+  * local/etc_init.d/glibc.sh, debhelper.in/libc.preinst: don't check for
+    linux kernel, it is now done in script.in/kernelcheck.sh.
 
- -- Aurelien Jarno <aurel32@debian.org>  Thu, 24 May 2007 14:36:19 +0200
+ -- Aurelien Jarno <aurel32@debian.org>  Thu, 24 May 2007 14:48:49 +0200
 
 glibc (2.5-10) UNRELEASED; urgency=low
 

Modified: glibc-package/branches/glibc-2.6/debian/debhelper.in/libc.preinst
===================================================================
--- glibc-package/branches/glibc-2.6/debian/debhelper.in/libc.preinst	2007-05-24 12:36:53 UTC (rev 2285)
+++ glibc-package/branches/glibc-2.6/debian/debhelper.in/libc.preinst	2007-05-24 12:50:31 UTC (rev 2286)
@@ -205,7 +205,7 @@
   fi
 fi
 
-if [ "$1" != abort-upgrade ] && [ "`uname -s`" = Linux ]
+if [ "$1" != abort-upgrade ]
 then
     # glibc kernel version check: KERNEL_VERSION_CHECK
 fi

Modified: glibc-package/branches/glibc-2.6/debian/local/etc_init.d/glibc.sh
===================================================================
--- glibc-package/branches/glibc-2.6/debian/local/etc_init.d/glibc.sh	2007-05-24 12:36:53 UTC (rev 2285)
+++ glibc-package/branches/glibc-2.6/debian/local/etc_init.d/glibc.sh	2007-05-24 12:50:31 UTC (rev 2286)
@@ -12,8 +12,6 @@
 # This script detects deprecated kernel versions incompatible with
 # the current version of the glibc
 
-if [ "`uname -s`" = Linux ]; then
-    # glibc kernel version check: KERNEL_VERSION_CHECK
-fi
+# glibc kernel version check: KERNEL_VERSION_CHECK
 
 : exit 0

Modified: glibc-package/branches/glibc-2.6/debian/script.in/kernelcheck.sh
===================================================================
--- glibc-package/branches/glibc-2.6/debian/script.in/kernelcheck.sh	2007-05-24 12:36:53 UTC (rev 2285)
+++ glibc-package/branches/glibc-2.6/debian/script.in/kernelcheck.sh	2007-05-24 12:50:31 UTC (rev 2286)
@@ -1,92 +1,111 @@
-kernel_compare_versions () {
+linux_compare_versions () {
     verA=$(($(echo "$1" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 10000 + \2 \* 100 + \3/')))
     verB=$(($(echo "$3" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 10000 + \2 \* 100 + \3/')))
     
     test $verA -$2 $verB
 }
 
+kfreebsd_compare_versions () {
+    verA=$(($(echo "$1" | sed 's/\([0-9]*\)\.\([0-9]*\).*/\1 \* 100 + \2/')))
+    verB=$(($(echo "$3" | sed 's/\([0-9]*\)\.\([0-9]*\).*/\1 \* 100 + \2/')))
+    
+    test $verA -$2 $verB
+}
+
 exit_check () {
     EXIT_CHECK
     exit 1
 }
 
-    # Test to make sure z < 255, in x.y.z-n form of kernel version
-    # Also make sure we don't trip on x.y.zFOO-n form
-    #kernel_rev=$(uname -r | tr -- - . | cut -d. -f3 | tr -d '[:alpha:]')
-    kernel_rev=$(uname -r | sed 's/\([0-9]*\.[0-9]*\.\)\([0-9]*\)\(.*\)/\2/')
-    if [ "$kernel_rev" -ge 255 ]
+    system=`uname -s`
+    if [ "$system" = "Linux" ]
     then
-        echo WARNING: Your kernel version indicates a revision number
-        echo of 255 or greater.  Glibc has a number of built in
-        echo assumptions that this revision number is less than 255.
-        echo If you\'ve built your own kernel, please make sure that any 
-        echo custom version numbers are appended to the upstream
-        echo kernel number with a dash or some other delimiter.
-
-        exit_check
-    fi
-
-    # sanity checking for the appropriate kernel on each architecture.
-    realarch=`uname -m`
-    kernel_ver=`uname -r`
-
-    # convert "armv4l" and similar to just "arm", and "mips64" and similar
-    # to just "mips"
-    case $realarch in
-      arm*) realarch="arm";;
-      mips*) realarch="mips";;
-    esac
+        # Test to make sure z < 255, in x.y.z-n form of kernel version
+        # Also make sure we don't trip on x.y.zFOO-n form
+        #kernel_rev=$(uname -r | tr -- - . | cut -d. -f3 | tr -d '[:alpha:]')
+        kernel_rev=$(uname -r | sed 's/\([0-9]*\.[0-9]*\.\)\([0-9]*\)\(.*\)/\2/')
+        if [ "$kernel_rev" -ge 255 ]
+        then
+            echo WARNING: Your kernel version indicates a revision number
+            echo of 255 or greater.  Glibc has a number of built in
+            echo assumptions that this revision number is less than 255.
+            echo If you\'ve built your own kernel, please make sure that any 
+            echo custom version numbers are appended to the upstream
+            echo kernel number with a dash or some other delimiter.
     
-
-    # From glibc 2.3.5-7 real-i386 is dropped.
-    if [ "$realarch" = i386 ]
-    then
-	echo WARNING: This machine has real i386 class processor.
-	echo Debian etch and later does not support such old hardware
-	echo any longer.
-	echo The reason is that \"bswap\" instruction is not supported
-	echo on i386 class processors, and some core libraries have 
-	echo such instruction.  You\'ll see illegal instruction error
-	echo when you upgrade your Debian system.
-	exit_check
+            exit_check
+        fi
+    
+        # sanity checking for the appropriate kernel on each architecture.
+        realarch=`uname -m`
+        kernel_ver=`uname -r`
+    
+        # convert "armv4l" and similar to just "arm", and "mips64" and similar
+        # to just "mips"
+        case $realarch in
+          arm*) realarch="arm";;
+          mips*) realarch="mips";;
+        esac
+        
+    
+        # From glibc 2.3.5-7 real-i386 is dropped.
+        if [ "$realarch" = i386 ]
+        then
+            echo WARNING: This machine has real i386 class processor.
+            echo Debian etch and later does not support such old hardware
+            echo any longer.
+            echo The reason is that \"bswap\" instruction is not supported
+            echo on i386 class processors, and some core libraries have 
+            echo such instruction.  You\'ll see illegal instruction error
+            echo when you upgrade your Debian system.
+            exit_check
+        fi
+    
+        # The GNU libc requires 2.6 kernel (except on m68k) because we drop to 
+        # support linuxthreads
+        if [ "$realarch" != m68k ]
+        then
+            if linux_compare_versions "$kernel_ver" lt 2.6.1
+            then
+                echo WARNING: POSIX threads library NPTL requires kernel version
+                echo 2.6.1 or later.  If you use a kernel 2.4, please upgrade it
+                echo before installing glibc.
+                exit_check
+            fi
+        fi
+    
+        # HPPA boxes require latest fixes in the kernel to function properly.
+        if [ "$realarch" = parisc ]
+        then
+            if linux_compare_versions "$kernel_ver" lt 2.6.9
+            then
+                echo WARNING: This version of glibc requires that you be running
+                echo kernel version 2.6.9 or later.  Earlier kernels contained
+                echo bugs that may render the system unusable if a modern version
+                echo of glibc is installed.
+                exit_check
+            fi
+        fi
+    
+        # The GNU libc is now built with --with-kernel= >= 2.4.1 on m68k
+        if [ "$realarch" = m68k ]
+        then
+            if linux_compare_versions "$kernel_ver" lt 2.4.1
+            then
+                echo WARNING: This version of glibc requires that you be running
+                echo kernel version 2.4.1 or later.  Earlier kernels contained
+                echo bugs that may render the system unusable if a modern version
+                echo of glibc is installed.
+                exit_check
+            fi
+        fi
+    elif [ $system = "GNU/kFreeBSD" ] ; then
+        kernel_ver=`uname -r`
+        if kfreebsd_compare_versions "$kernel_ver" lt 6.0
+        then
+            echo WARNING: This version of glibc uses UMTX_OP_WAIT and UMTX_OP_WAKE
+	    echo syscalls that are not present in the current running kernel. They
+	    echo have been added in kFreeBSD 6.0.  Your system should still work,
+	    echo but it is recommended to upgrade to a more recent version.
+        fi
     fi
-
-    # The GNU libc requires 2.6 kernel (except on m68k) because we drop to 
-    # support linuxthreads
-    if [ "$realarch" != m68k ]
-    then
-	if kernel_compare_versions "$kernel_ver" lt 2.6.1
-	then
-	    echo WARNING: POSIX threads library NPTL requires kernel version
-	    echo 2.6.1 or later.  If you use a kernel 2.4, please upgrade it
-	    echo before installing glibc.
-	    exit_check
-	fi
-    fi
-
-    # HPPA boxes require latest fixes in the kernel to function properly.
-    if [ "$realarch" = parisc ]
-    then
-	if kernel_compare_versions "$kernel_ver" lt 2.6.9
-	then
-	    echo WARNING: This version of glibc requires that you be running
-	    echo kernel version 2.6.9 or later.  Earlier kernels contained
-	    echo bugs that may render the system unusable if a modern version
-	    echo of glibc is installed.
-	    exit_check
-	fi	
-    fi
-
-    # The GNU libc is now built with --with-kernel= >= 2.4.1 on m68k
-    if [ "$realarch" = m68k ]
-    then
-	if kernel_compare_versions "$kernel_ver" lt 2.4.1
-	then
-	    echo WARNING: This version of glibc requires that you be running
-	    echo kernel version 2.4.1 or later.  Earlier kernels contained
-	    echo bugs that may render the system unusable if a modern version
-	    echo of glibc is installed.
-	    exit_check
-	fi
-    fi
-



Reply to: