diff options
author | Armin Kuster <akuster808@gmail.com> | 2017-02-18 11:27:18 -0800 |
---|---|---|
committer | Armin Kuster <akuster808@gmail.com> | 2017-02-18 11:43:20 -0800 |
commit | 21e1f1177c7293b7b2fe622dd499767e1a766b5b (patch) | |
tree | e2c6cd27cb297e0c32cd8290d20d6be3d2757890 | |
parent | c12aa7601e715a44d02927267bc89745f8a82a5b (diff) | |
download | meta-security-21e1f1177c7293b7b2fe622dd499767e1a766b5b.tar.gz |
libtpm: Fix arm build issues
backport two upstream patches and remove local verison
Signed-off-by: Armin Kuster <akuster808@gmail.com>
4 files changed, 61 insertions, 19 deletions
diff --git a/recipes-tpm/libtpm/files/Convert-another-vdprintf-to-dprintf.patch b/recipes-tpm/libtpm/files/Convert-another-vdprintf-to-dprintf.patch new file mode 100644 index 0000000..9e1021a --- /dev/null +++ b/recipes-tpm/libtpm/files/Convert-another-vdprintf-to-dprintf.patch | |||
@@ -0,0 +1,26 @@ | |||
1 | From 09e7dd42e5201d079bad70e9f7cc6033ce1c7cad Mon Sep 17 00:00:00 2001 | ||
2 | From: Stefan Berger <stefanb@linux.vnet.ibm.com> | ||
3 | Date: Fri, 3 Feb 2017 10:58:22 -0500 | ||
4 | Subject: [PATCH] Convert another vdprintf to dprintf | ||
5 | |||
6 | Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com> | ||
7 | Upstream-Status: Backport | ||
8 | Signed-off-by: Armin Kuster <akuster@mvista.com> | ||
9 | |||
10 | --- | ||
11 | src/tpm_library.c | 2 +- | ||
12 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
13 | |||
14 | Index: git/src/tpm_library.c | ||
15 | =================================================================== | ||
16 | --- git.orig/src/tpm_library.c | ||
17 | +++ git/src/tpm_library.c | ||
18 | @@ -427,7 +427,7 @@ void TPMLIB_LogPrintfA(unsigned int inde | ||
19 | indent = sizeof(spaces) - 1; | ||
20 | memset(spaces, ' ', indent); | ||
21 | spaces[indent] = 0; | ||
22 | - vdprintf(debug_fd, spaces, NULL); | ||
23 | + dprintf(debug_fd, "%s", spaces); | ||
24 | } | ||
25 | |||
26 | va_start(args, format); | ||
diff --git a/recipes-tpm/libtpm/files/Use-format-s-for-call-to-dprintf.patch b/recipes-tpm/libtpm/files/Use-format-s-for-call-to-dprintf.patch new file mode 100644 index 0000000..a71b5c1 --- /dev/null +++ b/recipes-tpm/libtpm/files/Use-format-s-for-call-to-dprintf.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | From 6a9b4e5d70f770aa9ca31e3e6d3b1ae72c192070 Mon Sep 17 00:00:00 2001 | ||
2 | From: Stefan Berger <stefanb@linux.vnet.ibm.com> | ||
3 | Date: Tue, 31 Jan 2017 20:10:51 -0500 | ||
4 | Subject: [PATCH] Use format '%s' for call to dprintf | ||
5 | |||
6 | Fix the dprintf call to use a format parameter that otherwise causes | ||
7 | errors with gcc on certain platforms. | ||
8 | |||
9 | Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com> | ||
10 | |||
11 | Upstream-Status: Backport | ||
12 | replaces local patch | ||
13 | Signed-off-by: Armin Kuster <akuster@mvsita.com> | ||
14 | |||
15 | --- | ||
16 | src/tpm_library.c | 4 ++-- | ||
17 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
18 | |||
19 | Index: git/src/tpm_library.c | ||
20 | =================================================================== | ||
21 | --- git.orig/src/tpm_library.c | ||
22 | +++ git/src/tpm_library.c | ||
23 | @@ -405,8 +405,8 @@ int TPMLIB_LogPrintf(const char *format, | ||
24 | } | ||
25 | |||
26 | if (debug_prefix) | ||
27 | - dprintf(debug_fd, debug_prefix); | ||
28 | - dprintf(debug_fd, buffer); | ||
29 | + dprintf(debug_fd, "%s", debug_prefix); | ||
30 | + dprintf(debug_fd, "%s", buffer); | ||
31 | |||
32 | return i; | ||
33 | } | ||
diff --git a/recipes-tpm/libtpm/files/fix_dprintf_issue.patch b/recipes-tpm/libtpm/files/fix_dprintf_issue.patch deleted file mode 100644 index 25760bb..0000000 --- a/recipes-tpm/libtpm/files/fix_dprintf_issue.patch +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | Upstream-Status: Pending | ||
2 | Signed-off-by: Armin Kuster <akuster808@gmail.com> | ||
3 | |||
4 | Index: src/tpm_library.c | ||
5 | =================================================================== | ||
6 | --- git.orig/src/tpm_library.c | ||
7 | +++ git/src/tpm_library.c | ||
8 | @@ -405,8 +405,8 @@ int TPMLIB_LogPrintf(const char *format, | ||
9 | } | ||
10 | |||
11 | if (debug_prefix) | ||
12 | - dprintf(debug_fd, debug_prefix); | ||
13 | - dprintf(debug_fd, buffer); | ||
14 | + dprintf(debug_fd, "%s" , debug_prefix); | ||
15 | + dprintf(debug_fd, "%s" , buffer); | ||
16 | |||
17 | return i; | ||
18 | } | ||
diff --git a/recipes-tpm/libtpm/libtpm_1.0.bb b/recipes-tpm/libtpm/libtpm_1.0.bb index 449e8c1..f9624f6 100644 --- a/recipes-tpm/libtpm/libtpm_1.0.bb +++ b/recipes-tpm/libtpm/libtpm_1.0.bb | |||
@@ -5,7 +5,8 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=97e5eea8d700d76b3ddfd35c4c96485f" | |||
5 | SRCREV = "ad44846dda5a96e269ad2f78a532e01e9a2f02a1" | 5 | SRCREV = "ad44846dda5a96e269ad2f78a532e01e9a2f02a1" |
6 | SRC_URI = " \ | 6 | SRC_URI = " \ |
7 | git://github.com/stefanberger/libtpms.git \ | 7 | git://github.com/stefanberger/libtpms.git \ |
8 | file://fix_dprintf_issue.patch \ | 8 | file://Convert-another-vdprintf-to-dprintf.patch \ |
9 | file://Use-format-s-for-call-to-dprintf.patch \ | ||
9 | " | 10 | " |
10 | 11 | ||
11 | S = "${WORKDIR}/git" | 12 | S = "${WORKDIR}/git" |