possible update to kexec-tools package in stable
Hello release team,
A bug was filed for kexec-tools recently that might be worth fixing in
stable - <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=722285>. The
bug in kexec-tools version in wheezy prevents kexec from loading a
kernel with version x.y as opposed to x.y.z. This does not affect
loading debian kernels but any one building their own kernel from
upstream kernel.org sources will run into this because of the version
number change with 3.0 kernel. If we do intend to support users
installing their own kernels built from upstream sources, we should
update kexec-tools to support those kernels. This bug is fixed in the
kexec-tools package version in jessie/sid.
A debdiff of proposed changes is attached.
Thanks,
Khalid
diff -Nru kexec-tools-2.0.3/debian/changelog kexec-tools-2.0.3/debian/changelog
--- kexec-tools-2.0.3/debian/changelog 2012-01-31 09:11:44.000000000 -0700
+++ kexec-tools-2.0.3/debian/changelog 2013-11-08 15:59:02.000000000 -0700
@@ -1,3 +1,10 @@
+kexec-tools (1:2.0.3-1.1) stable; urgency=low
+
+ * Fixed the "kexec -p" failure with kernel versions of the form
+ x.y (closes (closes: Bug#722285)
+
+ -- Khalid Aziz <khalid@debian.org> Fri, 08 Nov 2013 15:45:11 -0700
+
kexec-tools (1:2.0.3-1) unstable; urgency=low
* New upstream release
diff -Nru kexec-tools-2.0.3/debian/patches/kexec-p-fails-to-load-kernels-with-version-x.y.patch kexec-tools-2.0.3/debian/patches/kexec-p-fails-to-load-kernels-with-version-x.y.patch
--- kexec-tools-2.0.3/debian/patches/kexec-p-fails-to-load-kernels-with-version-x.y.patch 1969-12-31 17:00:00.000000000 -0700
+++ kexec-tools-2.0.3/debian/patches/kexec-p-fails-to-load-kernels-with-version-x.y.patch 2013-11-08 16:05:04.000000000 -0700
@@ -0,0 +1,50 @@
+Description: kexec -p fails on kernel versions of form x.y
+ "kexec -p" fails to load kernels with version of the form x.y instead of
+ x.y.z with an error message similar to "Unsupported utsname.release:
+ 3.10-1-amd64". Code in kernel_version() also checks the wrong variable
+ name for error return value from strtoul() for "minor" and "patch" and
+ hence possibly missing a real error.
+
+ This patch fixes both of these problems.
+
+Author: Khalid Aziz <khalid@debian.org>
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=708034
+Forwarded: http://lists.infradead.org/pipermail/kexec/2013-July/009355.html
+Applied-Upstream: commit: 5f32e0d2d693f46825345f589ee11fa439a4ca12
+Last-Update: 2013-07-26
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/kexec/kernel_version.c
++++ b/kexec/kernel_version.c
+@@ -31,21 +31,20 @@ long kernel_version(void)
+ }
+
+ minor = strtoul(p, &p, 10);
+- if (major == ULONG_MAX) {
++ if (minor == ULONG_MAX) {
+ fprintf(stderr, "strtoul failed: %s\n", strerror(errno));
+ return -1;
+ }
+
+- if (*p++ != '.') {
+- fprintf(stderr, "Unsupported utsname.release: %s\n",
+- utsname.release);
+- return -1;
+- }
+-
+- patch = strtoul(p, &p, 10);
+- if (major == ULONG_MAX) {
+- fprintf(stderr, "strtoul failed: %s\n", strerror(errno));
+- return -1;
++ /* There may or may not be a patch level for this kernel */
++ if (*p++ == '.') {
++ patch = strtoul(p, &p, 10);
++ if (patch == ULONG_MAX) {
++ fprintf(stderr, "strtoul failed: %s\n",strerror(errno));
++ return -1;
++ }
++ } else {
++ patch = 0;
+ }
+
+ if (major >= 256 || minor >= 256 || patch >= 256) {
diff -Nru kexec-tools-2.0.3/debian/patches/series kexec-tools-2.0.3/debian/patches/series
--- kexec-tools-2.0.3/debian/patches/series 2012-01-31 09:12:50.000000000 -0700
+++ kexec-tools-2.0.3/debian/patches/series 2013-11-08 15:38:07.000000000 -0700
@@ -6,3 +6,4 @@
add_debian_readme.patch
coldreboot.patch
linker-option.patch
+kexec-p-fails-to-load-kernels-with-version-x.y.patch
Reply to: