summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArmin Kuster <akuster808@gmail.com>2017-02-18 11:27:18 -0800
committerArmin Kuster <akuster808@gmail.com>2017-02-18 11:43:20 -0800
commit21e1f1177c7293b7b2fe622dd499767e1a766b5b (patch)
treee2c6cd27cb297e0c32cd8290d20d6be3d2757890
parentc12aa7601e715a44d02927267bc89745f8a82a5b (diff)
downloadmeta-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>
-rw-r--r--recipes-tpm/libtpm/files/Convert-another-vdprintf-to-dprintf.patch26
-rw-r--r--recipes-tpm/libtpm/files/Use-format-s-for-call-to-dprintf.patch33
-rw-r--r--recipes-tpm/libtpm/files/fix_dprintf_issue.patch18
-rw-r--r--recipes-tpm/libtpm/libtpm_1.0.bb3
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 @@
1From 09e7dd42e5201d079bad70e9f7cc6033ce1c7cad Mon Sep 17 00:00:00 2001
2From: Stefan Berger <stefanb@linux.vnet.ibm.com>
3Date: Fri, 3 Feb 2017 10:58:22 -0500
4Subject: [PATCH] Convert another vdprintf to dprintf
5
6Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
7Upstream-Status: Backport
8Signed-off-by: Armin Kuster <akuster@mvista.com>
9
10---
11 src/tpm_library.c | 2 +-
12 1 file changed, 1 insertion(+), 1 deletion(-)
13
14Index: 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 @@
1From 6a9b4e5d70f770aa9ca31e3e6d3b1ae72c192070 Mon Sep 17 00:00:00 2001
2From: Stefan Berger <stefanb@linux.vnet.ibm.com>
3Date: Tue, 31 Jan 2017 20:10:51 -0500
4Subject: [PATCH] Use format '%s' for call to dprintf
5
6Fix the dprintf call to use a format parameter that otherwise causes
7errors with gcc on certain platforms.
8
9Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
10
11Upstream-Status: Backport
12replaces local patch
13Signed-off-by: Armin Kuster <akuster@mvsita.com>
14
15---
16 src/tpm_library.c | 4 ++--
17 1 file changed, 2 insertions(+), 2 deletions(-)
18
19Index: 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 @@
1Upstream-Status: Pending
2Signed-off-by: Armin Kuster <akuster808@gmail.com>
3
4Index: 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"
5SRCREV = "ad44846dda5a96e269ad2f78a532e01e9a2f02a1" 5SRCREV = "ad44846dda5a96e269ad2f78a532e01e9a2f02a1"
6SRC_URI = " \ 6SRC_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
11S = "${WORKDIR}/git" 12S = "${WORKDIR}/git"