summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYi Zhao <yi.zhao@windriver.com>2021-08-04 10:46:28 +0800
committerJia Zhang <zhang.jia@linux.alibaba.com>2021-08-09 18:51:13 +0800
commit6768abc7d453ae854091aa0fe70ba2e215290f5b (patch)
treeeea14274a2cc67544067513923a3ebcd790ce250
parentb84dc32e1de11135a57c4a8953b54befd2d4fe1b (diff)
downloadmeta-secure-core-6768abc7d453ae854091aa0fe70ba2e215290f5b.tar.gz
cryptfs-tpm2: fix build reproducibility issue
Fixes: | main.c: In function 'show_banner': | main.c:43:62: error: macro "__DATE__" might prevent reproducible builds [-Werror=date-time] | 43 | info_cont("Build Time: " __DATE__ " " __TIME__ "\n\n"); | | ^ | main.c:43:34: error: macro "__TIME__" might prevent reproducible builds [-Werror=date-time] | 43 | info_cont("Build Time: " __DATE__ " " __TIME__ "\n\n"); | | ^~~~~~~~ | cc1: all warnings being treated as errors Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
-rw-r--r--meta-encrypted-storage/recipes-tpm/cryptfs-tpm2/cryptfs-tpm2/0001-Remove-build-time-from-show_banner.patch58
-rw-r--r--meta-encrypted-storage/recipes-tpm/cryptfs-tpm2/cryptfs-tpm2_git.bb1
2 files changed, 59 insertions, 0 deletions
diff --git a/meta-encrypted-storage/recipes-tpm/cryptfs-tpm2/cryptfs-tpm2/0001-Remove-build-time-from-show_banner.patch b/meta-encrypted-storage/recipes-tpm/cryptfs-tpm2/cryptfs-tpm2/0001-Remove-build-time-from-show_banner.patch
new file mode 100644
index 0000000..a275e89
--- /dev/null
+++ b/meta-encrypted-storage/recipes-tpm/cryptfs-tpm2/cryptfs-tpm2/0001-Remove-build-time-from-show_banner.patch
@@ -0,0 +1,58 @@
1From b97871b4af8c91d9a294b48d15a2fec58287bb62 Mon Sep 17 00:00:00 2001
2From: Yi Zhao <yi.zhao@windriver.com>
3Date: Wed, 4 Aug 2021 10:15:18 +0800
4Subject: [PATCH] Remove build time from show_banner
5
6Fix build reproducibility issue:
7
8| main.c: In function 'show_banner':
9| main.c:43:62: error: macro "__DATE__" might prevent reproducible builds [-Werror=date-time]
10| 43 | info_cont("Build Time: " __DATE__ " " __TIME__ "\n\n");
11| | ^
12| main.c:43:34: error: macro "__TIME__" might prevent reproducible builds [-Werror=date-time]
13| 43 | info_cont("Build Time: " __DATE__ " " __TIME__ "\n\n");
14| | ^~~~~~~~
15| cc1: all warnings being treated as errors
16
17Upstream-Status: Submitted [https://github.com/jiazhang0/cryptfs-tpm2/pull/12]
18
19Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
20---
21 src/cryptfs-tpm2/main.c | 3 +--
22 src/tcti-probe/main.c | 1 -
23 2 files changed, 1 insertion(+), 3 deletions(-)
24
25diff --git a/src/cryptfs-tpm2/main.c b/src/cryptfs-tpm2/main.c
26index 0795a25..fd105b6 100644
27--- a/src/cryptfs-tpm2/main.c
28+++ b/src/cryptfs-tpm2/main.c
29@@ -40,7 +40,6 @@ show_banner(void)
30 info_cont("(C)Copyright 2016-2017, Wind River Systems, Inc.\n");
31 info_cont("Version: %s+git-%s\n", VERSION, cryptfs_tpm2_git_commit);
32 info_cont("Build Machine: %s\n", cryptfs_tpm2_build_machine);
33- info_cont("Build Time: " __DATE__ " " __TIME__ "\n\n");
34 }
35
36 static void
37@@ -224,4 +223,4 @@ main(int argc, char *argv[], char *envp[])
38 show_banner();
39
40 return subcommand_run_current();
41-}
42\ No newline at end of file
43+}
44diff --git a/src/tcti-probe/main.c b/src/tcti-probe/main.c
45index 068e2cb..9421bd8 100644
46--- a/src/tcti-probe/main.c
47+++ b/src/tcti-probe/main.c
48@@ -42,7 +42,6 @@ show_banner(void)
49 info_cont("(C)Copyright 2017, Wind River Systems, Inc.\n");
50 info_cont("Version: %s+git-%s\n", VERSION, cryptfs_tpm2_git_commit);
51 info_cont("Build Machine: %s\n", cryptfs_tpm2_build_machine);
52- info_cont("Build Time: " __DATE__ " " __TIME__ "\n\n");
53 }
54
55 static void
56--
572.25.1
58
diff --git a/meta-encrypted-storage/recipes-tpm/cryptfs-tpm2/cryptfs-tpm2_git.bb b/meta-encrypted-storage/recipes-tpm/cryptfs-tpm2/cryptfs-tpm2_git.bb
index 42f5bb1..594e52f 100644
--- a/meta-encrypted-storage/recipes-tpm/cryptfs-tpm2/cryptfs-tpm2_git.bb
+++ b/meta-encrypted-storage/recipes-tpm/cryptfs-tpm2/cryptfs-tpm2_git.bb
@@ -25,6 +25,7 @@ SRC_URI = "\
25 file://0001-encrypt_secret.py-switch-to-python3.patch \ 25 file://0001-encrypt_secret.py-switch-to-python3.patch \
26 file://0002-luks-setup.sh-Updated-TPM-Tools.patch \ 26 file://0002-luks-setup.sh-Updated-TPM-Tools.patch \
27 file://0001-lib-Makefile-set-correct-soname-for-libcryptfs-tpm2.patch \ 27 file://0001-lib-Makefile-set-correct-soname-for-libcryptfs-tpm2.patch \
28 file://0001-Remove-build-time-from-show_banner.patch \
28" 29"
29SRCREV = "87c35c63090a33d4de437f518b8da9f2d1f1d828" 30SRCREV = "87c35c63090a33d4de437f518b8da9f2d1f1d828"
30 31