From 6768abc7d453ae854091aa0fe70ba2e215290f5b Mon Sep 17 00:00:00 2001 From: Yi Zhao Date: Wed, 4 Aug 2021 10:46:28 +0800 Subject: 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 --- .../0001-Remove-build-time-from-show_banner.patch | 58 ++++++++++++++++++++++ .../recipes-tpm/cryptfs-tpm2/cryptfs-tpm2_git.bb | 1 + 2 files changed, 59 insertions(+) create mode 100644 meta-encrypted-storage/recipes-tpm/cryptfs-tpm2/cryptfs-tpm2/0001-Remove-build-time-from-show_banner.patch 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 @@ +From b97871b4af8c91d9a294b48d15a2fec58287bb62 Mon Sep 17 00:00:00 2001 +From: Yi Zhao +Date: Wed, 4 Aug 2021 10:15:18 +0800 +Subject: [PATCH] Remove build time from show_banner + +Fix build reproducibility issue: + +| 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 + +Upstream-Status: Submitted [https://github.com/jiazhang0/cryptfs-tpm2/pull/12] + +Signed-off-by: Yi Zhao +--- + src/cryptfs-tpm2/main.c | 3 +-- + src/tcti-probe/main.c | 1 - + 2 files changed, 1 insertion(+), 3 deletions(-) + +diff --git a/src/cryptfs-tpm2/main.c b/src/cryptfs-tpm2/main.c +index 0795a25..fd105b6 100644 +--- a/src/cryptfs-tpm2/main.c ++++ b/src/cryptfs-tpm2/main.c +@@ -40,7 +40,6 @@ show_banner(void) + info_cont("(C)Copyright 2016-2017, Wind River Systems, Inc.\n"); + info_cont("Version: %s+git-%s\n", VERSION, cryptfs_tpm2_git_commit); + info_cont("Build Machine: %s\n", cryptfs_tpm2_build_machine); +- info_cont("Build Time: " __DATE__ " " __TIME__ "\n\n"); + } + + static void +@@ -224,4 +223,4 @@ main(int argc, char *argv[], char *envp[]) + show_banner(); + + return subcommand_run_current(); +-} +\ No newline at end of file ++} +diff --git a/src/tcti-probe/main.c b/src/tcti-probe/main.c +index 068e2cb..9421bd8 100644 +--- a/src/tcti-probe/main.c ++++ b/src/tcti-probe/main.c +@@ -42,7 +42,6 @@ show_banner(void) + info_cont("(C)Copyright 2017, Wind River Systems, Inc.\n"); + info_cont("Version: %s+git-%s\n", VERSION, cryptfs_tpm2_git_commit); + info_cont("Build Machine: %s\n", cryptfs_tpm2_build_machine); +- info_cont("Build Time: " __DATE__ " " __TIME__ "\n\n"); + } + + static void +-- +2.25.1 + 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 = "\ file://0001-encrypt_secret.py-switch-to-python3.patch \ file://0002-luks-setup.sh-Updated-TPM-Tools.patch \ file://0001-lib-Makefile-set-correct-soname-for-libcryptfs-tpm2.patch \ + file://0001-Remove-build-time-from-show_banner.patch \ " SRCREV = "87c35c63090a33d4de437f518b8da9f2d1f1d828" -- cgit v1.2.3-54-g00ecf