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

Re: gcc done, eglibc problem



On Fri, 22 Oct 2010, Thorsten Glaser wrote:

> eglibc preinst refuses to let dpkg install it if the kernel running is 
> too old.

I think this patch is what you are looking for.

The situation isn't ideal, because libc can still be installed in the 
absence of TLS support, given a mainline kernel between 2.6.32 and .33.y.

However, you are quite right, it is a good idea.

(This patch is completely untested, BTW.)

Finn


Index: debian/debhelper.in/libc.preinst
===================================================================
--- debian/debhelper.in/libc.preinst	(revision 4436)
+++ debian/debhelper.in/libc.preinst	(working copy)
@@ -292,33 +292,22 @@
         mips*) realarch="mips";;
       esac
 
-      # The GNU libc requires a >= 2.6.18 kernel (except on m68k)
-      if [ "$realarch" != m68k ]
+      # The GNU libc requires a >= 2.6.32 kernel on m68k (for TLS support)
+      if [ "$realarch" = m68k ]
       then
-          if linux_compare_versions "$kernel_ver" lt 2.6.18
-          then
-              echo WARNING: this version of the GNU libc requires kernel version
-              echo 2.6.18 or later.  Please upgrade your kernel before installing
-              echo glibc.
-              kernel26_help
-
-              exit 1
-          fi
+          min_kernel_ver=2.6.32
+      else
+          min_kernel_ver=2.6.18
       fi
 
-      # The GNU libc is now built with --with-kernel= >= 2.4.1 on m68k
-      if [ "$realarch" = m68k ]
+      if linux_compare_versions "$kernel_ver" lt "$min_kernel_ver"
       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.
-              kernel26_help
+          echo WARNING: this version of the GNU libc requires kernel version
+          echo $min_kernel_ver or later.  Please upgrade your kernel before installing
+          echo glibc.
+          kernel26_help
 
-              exit 1
-          fi
+          exit 1
       fi
 
       # From glibc 2.6-3 SPARC V8 support is dropped.


Reply to: