Package: lm-sensors-3
Version: 1:3.2.0-1
Severity: normal
Tags: patch
User: [email protected]
Usertags: origin-ubuntu oneiric ubuntu-patch



*** /tmp/tmpCUtHyd
In Ubuntu, the attached patch was applied to achieve the following:

Ubuntu switched to a 2 number base kernel like upstream wants to do (3.0), this 
is breaking the sensors detect kernel detection, which looks for 3 numbers 
(i.e. > 2.6.5).  This patch simply makes the 3rd number optional in the check.  
I noticed a similar but more complicated patch on the lm-sensors ML:
http://lists.lm-sensors.org/pipermail/lm-sensors/2011-June/032856.html

I sent mine to the list here (before I realized someone else had already sent 
one):
http://lists.lm-sensors.org/pipermail/lm-sensors/2011-June/032881.html

  * fix LP: #797001 - sensors-detect won't recognize 3.0 kernel
    - add debian/patches/101_detect_3_0_kernel_version.patch
    - update debian/patches/series


Thanks for considering the patch.


-- System Information:
Debian Release: squeeze/sid
  APT prefers natty-updates
  APT policy: (500, 'natty-updates'), (500, 'natty-security'), (500, 'natty'), 
(300, 'natty-proposed'), (100, 'natty-backports')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.38-8-generic (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -Nru lm-sensors-3-3.2.0/debian/changelog lm-sensors-3-3.2.0/debian/changelog
diff -Nru lm-sensors-3-3.2.0/debian/patches/101_detect_3_0_kernel_version.patch lm-sensors-3-3.2.0/debian/patches/101_detect_3_0_kernel_version.patch
--- lm-sensors-3-3.2.0/debian/patches/101_detect_3_0_kernel_version.patch	1969-12-31 18:00:00.000000000 -0600
+++ lm-sensors-3-3.2.0/debian/patches/101_detect_3_0_kernel_version.patch	2011-06-13 23:03:46.000000000 -0500
@@ -0,0 +1,16 @@
+Description: sensors-detect won't recognize 3.0 kernel
+Author: Micah Gersten <[email protected]>
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/797001
+
+--- lm-sensors-3-3.2.0.orig/prog/detect/sensors-detect
++++ lm-sensors-3-3.2.0/prog/detect/sensors-detect
+@@ -2258,7 +2258,8 @@ use vars qw(@kernel_version $kernel_arch
+ 
+ sub initialize_kernel_version
+ {
+-	`uname -r` =~ /(\d+)\.(\d+)\.(\d+)(.*)/;
++	#Third decimal only for point releases starting with 3.0
++	`uname -r` =~ /(\d+)\.(\d+)(\.(\d+))?(.*)/;
+ 	@kernel_version = ($1, $2, $3, $4);
+ 	chomp($kernel_arch = `uname -m`);
+ 
diff -Nru lm-sensors-3-3.2.0/debian/patches/series lm-sensors-3-3.2.0/debian/patches/series
--- lm-sensors-3-3.2.0/debian/patches/series	2011-04-04 13:38:29.000000000 -0500
+++ lm-sensors-3-3.2.0/debian/patches/series	2011-06-13 23:04:16.000000000 -0500
@@ -11,3 +11,4 @@
 11-fancontrol-check.patch
 12-upstream-patches.patch
 100_recommend_using_upstart.patch
+101_detect_3_0_kernel_version.patch

Reply via email to