Package: strace
Followup-For: Bug #702309

Hello,

  Applied fix proposed by Gerardo Malazdrewicz. That works for me.
  Find attached packaging diff.

Regards

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (900, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 
'experimental')
Architecture: i386 (i686)

Kernel: Linux 3.8-trunk-686-pae (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages strace depends on:
ii  libc6  2.17-0experimental2

strace recommends no packages.

strace suggests no packages.

-- no debconf information
diff -Nru strace-4.7/debian/changelog strace-4.7/debian/changelog
--- strace-4.7/debian/changelog	2013-02-12 10:35:43.000000000 +0100
+++ strace-4.7/debian/changelog	2013-06-17 17:18:27.000000000 +0200
@@ -1,3 +1,9 @@
+strace (4.7-1.1) experimental; urgency=low
+
+  * Apply fix for kernel release string parsing. (Closes: #702309)
+
+ -- Hector Oron <[email protected]>  Mon, 17 Jun 2013 17:16:51 +0200
+
 strace (4.7-1) experimental; urgency=low
 
   [ Dmitry V. Levin ]
diff -Nru strace-4.7/debian/patches/0032-Fix-kernel-release-string-parsing.patch strace-4.7/debian/patches/0032-Fix-kernel-release-string-parsing.patch
--- strace-4.7/debian/patches/0032-Fix-kernel-release-string-parsing.patch	1970-01-01 01:00:00.000000000 +0100
+++ strace-4.7/debian/patches/0032-Fix-kernel-release-string-parsing.patch	2013-06-17 17:16:24.000000000 +0200
@@ -0,0 +1,38 @@
+Upstream-Status: Backport
+
+From 0dbc80de895c25769791b7726022a274695eec31 Mon Sep 17 00:00:00 2001
+From: "Dmitry V. Levin" <[email protected]>
+Date: Mon, 14 May 2012 23:42:10 +0000
+Subject: [PATCH] Fix kernel release string parsing
+
+* strace.c (get_os_release): Handle "X.Y-something" utsname.release
+strings properly.
+
+Reported-by: Bryce Gibson <[email protected]>
+---
+ strace.c |    8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/strace.c b/strace.c
+index 857136d..65dee7d 100644
+--- a/strace.c
++++ b/strace.c
+@@ -1432,8 +1432,14 @@ get_os_release(void)
+ 			break;
+ 		while (*p >= '0' && *p <= '9')
+ 			p++;
+-		if (*p != '.')
++		if (*p != '.') {
++			if (rel >= KERNEL_VERSION(0,1,0)) {
++				/* "X.Y-something" means "X.Y.0" */
++				rel <<= 8;
++				break;
++			}
+ 			error_msg_and_die("Bad OS release string: '%s'", u.release);
++		}
+ 		p++;
+ 	}
+ 	return rel;
+-- 
+1.7.10.4
+
diff -Nru strace-4.7/debian/patches/series strace-4.7/debian/patches/series
--- strace-4.7/debian/patches/series	1970-01-01 01:00:00.000000000 +0100
+++ strace-4.7/debian/patches/series	2013-06-17 17:16:31.000000000 +0200
@@ -0,0 +1 @@
+0032-Fix-kernel-release-string-parsing.patch

Reply via email to