summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/strace
diff options
context:
space:
mode:
authorAndreas Oberritter <obi@opendreambox.org>2013-03-08 01:31:24 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-03-10 04:36:51 +0000
commit1905f253d2cca22dddb47fcdd3709c3f18f1a8b3 (patch)
tree07c61e7ce08ac9d55f3b3e8d91038decf8e2462a /meta/recipes-devtools/strace
parentbdd6d457a1caee7fc2d31789ffd7339cd4afcfed (diff)
downloadpoky-1905f253d2cca22dddb47fcdd3709c3f18f1a8b3.tar.gz
strace: fix kernel release string parsing
* Strace just aborts with two-digit kernel versions (e.g. 3.0-foo). Backport a patch from strace Git. (From OE-Core rev: bff8456be448f0ae7ddae917ed3e9893f056376d) Signed-off-by: Andreas Oberritter <obi@opendreambox.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/strace')
-rw-r--r--meta/recipes-devtools/strace/strace-4.7/0032-Fix-kernel-release-string-parsing.patch38
-rw-r--r--meta/recipes-devtools/strace/strace_4.7.bb3
2 files changed, 40 insertions, 1 deletions
diff --git a/meta/recipes-devtools/strace/strace-4.7/0032-Fix-kernel-release-string-parsing.patch b/meta/recipes-devtools/strace/strace-4.7/0032-Fix-kernel-release-string-parsing.patch
new file mode 100644
index 0000000000..cef42223d2
--- /dev/null
+++ b/meta/recipes-devtools/strace/strace-4.7/0032-Fix-kernel-release-string-parsing.patch
@@ -0,0 +1,38 @@
1Upstream-Status: Backport
2
3From 0dbc80de895c25769791b7726022a274695eec31 Mon Sep 17 00:00:00 2001
4From: "Dmitry V. Levin" <ldv@altlinux.org>
5Date: Mon, 14 May 2012 23:42:10 +0000
6Subject: [PATCH] Fix kernel release string parsing
7
8* strace.c (get_os_release): Handle "X.Y-something" utsname.release
9strings properly.
10
11Reported-by: Bryce Gibson <bryce@gibson-consulting.com.au>
12---
13 strace.c | 8 +++++++-
14 1 file changed, 7 insertions(+), 1 deletion(-)
15
16diff --git a/strace.c b/strace.c
17index 857136d..65dee7d 100644
18--- a/strace.c
19+++ b/strace.c
20@@ -1432,8 +1432,14 @@ get_os_release(void)
21 break;
22 while (*p >= '0' && *p <= '9')
23 p++;
24- if (*p != '.')
25+ if (*p != '.') {
26+ if (rel >= KERNEL_VERSION(0,1,0)) {
27+ /* "X.Y-something" means "X.Y.0" */
28+ rel <<= 8;
29+ break;
30+ }
31 error_msg_and_die("Bad OS release string: '%s'", u.release);
32+ }
33 p++;
34 }
35 return rel;
36--
371.7.10.4
38
diff --git a/meta/recipes-devtools/strace/strace_4.7.bb b/meta/recipes-devtools/strace/strace_4.7.bb
index 2d56e9af42..e360e63527 100644
--- a/meta/recipes-devtools/strace/strace_4.7.bb
+++ b/meta/recipes-devtools/strace/strace_4.7.bb
@@ -3,7 +3,7 @@ HOMEPAGE = "http://strace.sourceforge.net"
3SECTION = "console/utils" 3SECTION = "console/utils"
4LICENSE = "BSD" 4LICENSE = "BSD"
5LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=124500c21e856f0912df29295ba104c7" 5LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=124500c21e856f0912df29295ba104c7"
6PR = "r3" 6PR = "r4"
7 7
8SRC_URI = "${SOURCEFORGE_MIRROR}/strace/strace-${PV}.tar.xz \ 8SRC_URI = "${SOURCEFORGE_MIRROR}/strace/strace-${PV}.tar.xz \
9 file://0003-util-fix-building-when-glibc-has-a-stub-process_vm_r.patch \ 9 file://0003-util-fix-building-when-glibc-has-a-stub-process_vm_r.patch \
@@ -17,6 +17,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/strace/strace-${PV}.tar.xz \
17 file://0029-Filter-out-redundant-32-ioctl-entries.patch \ 17 file://0029-Filter-out-redundant-32-ioctl-entries.patch \
18 file://0030-Move-asm-generic-ioctl-definitions-to-linux-ioctlent.patch \ 18 file://0030-Move-asm-generic-ioctl-definitions-to-linux-ioctlent.patch \
19 file://0031-Add-support-for-tracing-32-bit-ARM-EABI-binaries-on-.patch \ 19 file://0031-Add-support-for-tracing-32-bit-ARM-EABI-binaries-on-.patch \
20 file://0032-Fix-kernel-release-string-parsing.patch \
20 " 21 "
21 22
22SRC_URI[md5sum] = "6054c3880a00c6703f83b57f15e04642" 23SRC_URI[md5sum] = "6054c3880a00c6703f83b57f15e04642"