From 8ec53db9b96c46735441fd56e94b6fa943dd8b40 Mon Sep 17 00:00:00 2001 From: chantra Date: Apr 13 2022 22:32:14 +0000 Subject: Merge remote-tracking branch 'fedora/f34' into c8s-sig-hyperscale --- diff --git a/.gitignore b/.gitignore index 7f9425d..24cd101 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/tpm2-tools-5.0.tar.gz +/tpm2-tools-*.tar.gz diff --git a/.tpm2-tools.metadata b/.tpm2-tools.metadata deleted file mode 100644 index 9919e19..0000000 --- a/.tpm2-tools.metadata +++ /dev/null @@ -1 +0,0 @@ -cdfe4e12e679e547528a2d908862762b63921e63 SOURCES/tpm2-tools-5.0.tar.gz diff --git a/SOURCES/2021.patch b/SOURCES/2021.patch deleted file mode 100644 index 089b1b4..0000000 --- a/SOURCES/2021.patch +++ /dev/null @@ -1,245 +0,0 @@ -From 84556dd39531638ef69c8f1eec7f917de2c88146 Mon Sep 17 00:00:00 2001 -From: Trammell hudson -Date: Wed, 13 May 2020 12:00:14 +0200 -Subject: [PATCH 1/6] tpm2_event_log: parse EV_POST_CODE events according to - 2.3.4.1 - -Signed-off-by: Trammell hudson ---- - lib/tpm2_eventlog.c | 5 ++++- - lib/tpm2_eventlog_yaml.c | 24 ++++++++++++++++++++++++ - 2 files changed, 28 insertions(+), 1 deletion(-) - -diff --git a/lib/tpm2_eventlog.c b/lib/tpm2_eventlog.c -index b44ae10a9..b7bea6124 100644 ---- a/lib/tpm2_eventlog.c -+++ b/lib/tpm2_eventlog.c -@@ -88,8 +88,11 @@ bool parse_event2body(TCG_EVENT2 const *event, UINT32 type) { - } - } - break; -- /* TCG PC Client FPF section 9.2.5 */ -+ /* TCG PC Client FPF section 2.3.4.1 and 9.4.1 */ - case EV_POST_CODE: -+ // the event is a string, so there are no length requirements. -+ break; -+ /* TCG PC Client FPF section 9.2.5 */ - case EV_S_CRTM_CONTENTS: - case EV_EFI_PLATFORM_FIRMWARE_BLOB: - { -diff --git a/lib/tpm2_eventlog_yaml.c b/lib/tpm2_eventlog_yaml.c -index 307c4a09d..ae1406bfe 100644 ---- a/lib/tpm2_eventlog_yaml.c -+++ b/lib/tpm2_eventlog_yaml.c -@@ -164,6 +164,29 @@ static bool yaml_uefi_var_data(UEFI_VARIABLE_DATA *data) { - - return true; - } -+/* -+ * TCG PC Client FPF section 2.3.4.1 and 9.4.1: -+ * Usage of the event type EV_POST_CODE: -+ * - If a combined event is measured, the event field SHOULD -+ * be the string "POST CODE" in all caps. ... -+ * - Embedded SMM code and the code that sets it up SHOULD use -+ * the string "SMM CODE" in all caps... -+ * - BIS code (eclusing the BIS Certificate) should use event -+ * field string of "BIS CODE" in all caps. ... -+ * - ACPI flash data prior to any modifications ... should use -+ * event field string of "ACPI DATA" in all caps. -+ */ -+static bool yaml_uefi_post_code(const char * data, size_t len) -+{ -+ tpm2_tool_output( -+ " Event:\n" -+ " - Length: %zu\n" -+ " String: '%.*s'\n", -+ len, -+ (int) len, -+ data); -+ return true; -+} - /* - * TCG PC Client FPF section 9.2.6 - * The tpm2_eventlog module validates the event structure but nothing within -@@ -247,6 +270,7 @@ bool yaml_event2data(TCG_EVENT2 const *event, UINT32 type) { - case EV_EFI_VARIABLE_AUTHORITY: - return yaml_uefi_var((UEFI_VARIABLE_DATA*)event->Event); - case EV_POST_CODE: -+ return yaml_uefi_post_code((const char*)event->Event, event->EventSize); - case EV_S_CRTM_CONTENTS: - case EV_EFI_PLATFORM_FIRMWARE_BLOB: - return yaml_uefi_platfwblob((UEFI_PLATFORM_FIRMWARE_BLOB*)event->Event); - -From abfae7af25bdbb41709d09bf99a01132f2f3c24e Mon Sep 17 00:00:00 2001 -From: Trammell hudson -Date: Wed, 13 May 2020 12:04:49 +0200 -Subject: [PATCH 2/6] tpm2_eventlog: rename postcode test to firmware blob test - -Signed-off-by: Trammell hudson ---- - test/unit/test_tpm2_eventlog.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/test/unit/test_tpm2_eventlog.c b/test/unit/test_tpm2_eventlog.c -index e992ac848..661778506 100644 ---- a/test/unit/test_tpm2_eventlog.c -+++ b/test/unit/test_tpm2_eventlog.c -@@ -266,7 +266,7 @@ static void test_parse_event2body_uefivar_badlength(void **state){ - - assert_false(parse_event2body(event, EV_EFI_VARIABLE_DRIVER_CONFIG)); - } --static void test_parse_event2body_postcode_badlength(void **state){ -+static void test_parse_event2body_firmware_blob_badlength(void **state){ - - (void)state; - -@@ -465,7 +465,7 @@ int main(void) { - cmocka_unit_test(test_foreach_event2_parse_event2body_fail), - cmocka_unit_test(test_parse_event2body_uefivar_badsize), - cmocka_unit_test(test_parse_event2body_uefivar_badlength), -- cmocka_unit_test(test_parse_event2body_postcode_badlength), -+ cmocka_unit_test(test_parse_event2body_firmware_blob_badlength), - cmocka_unit_test(test_specid_event_nohdr), - cmocka_unit_test(test_specid_event_badeventtype), - cmocka_unit_test(test_specid_event_badpcrindex), - -From de84d5bd6f89bded62e8dc0ae57619a3758920e5 Mon Sep 17 00:00:00 2001 -From: Trammell hudson -Date: Wed, 13 May 2020 12:09:45 +0200 -Subject: [PATCH 3/6] tpm2_eventlog: pass TCG_EVENT2* to yaml-Uefi_post_code() - -Signed-off-by: Trammell hudson ---- - lib/tpm2_eventlog_yaml.c | 9 ++++++--- - 1 file changed, 6 insertions(+), 3 deletions(-) - -diff --git a/lib/tpm2_eventlog_yaml.c b/lib/tpm2_eventlog_yaml.c -index ae1406bfe..e9092769d 100644 ---- a/lib/tpm2_eventlog_yaml.c -+++ b/lib/tpm2_eventlog_yaml.c -@@ -171,13 +171,16 @@ static bool yaml_uefi_var_data(UEFI_VARIABLE_DATA *data) { - * be the string "POST CODE" in all caps. ... - * - Embedded SMM code and the code that sets it up SHOULD use - * the string "SMM CODE" in all caps... -- * - BIS code (eclusing the BIS Certificate) should use event -+ * - BIS code (excluding the BIS Certificate) should use event - * field string of "BIS CODE" in all caps. ... - * - ACPI flash data prior to any modifications ... should use - * event field string of "ACPI DATA" in all caps. - */ --static bool yaml_uefi_post_code(const char * data, size_t len) -+static bool yaml_uefi_post_code(const TCG_EVENT2 * const event) - { -+ const char * const data = (const char *) event->Event; -+ const size_t len = event->EventSize; -+ - tpm2_tool_output( - " Event:\n" - " - Length: %zu\n" -@@ -270,7 +273,7 @@ bool yaml_event2data(TCG_EVENT2 const *event, UINT32 type) { - case EV_EFI_VARIABLE_AUTHORITY: - return yaml_uefi_var((UEFI_VARIABLE_DATA*)event->Event); - case EV_POST_CODE: -- return yaml_uefi_post_code((const char*)event->Event, event->EventSize); -+ return yaml_uefi_post_code(event); - case EV_S_CRTM_CONTENTS: - case EV_EFI_PLATFORM_FIRMWARE_BLOB: - return yaml_uefi_platfwblob((UEFI_PLATFORM_FIRMWARE_BLOB*)event->Event); - -From dddeb4d3bc2e4d1eddf143a1ee70de7f7f32fbf3 Mon Sep 17 00:00:00 2001 -From: Trammell hudson -Date: Wed, 13 May 2020 12:55:14 +0200 -Subject: [PATCH 4/6] tpm2_eventlog: use "PCRIndex:" consistently - -Signed-off-by: Trammell hudson ---- - lib/tpm2_eventlog_yaml.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lib/tpm2_eventlog_yaml.c b/lib/tpm2_eventlog_yaml.c -index e9092769d..d1f308904 100644 ---- a/lib/tpm2_eventlog_yaml.c -+++ b/lib/tpm2_eventlog_yaml.c -@@ -329,7 +329,7 @@ void yaml_eventhdr(TCG_EVENT const *event, size_t *count) { - bytes_to_str(event->digest, sizeof(event->digest), digest_hex, sizeof(digest_hex)); - - tpm2_tool_output("- Event[%zu]:\n" -- " pcrIndex: %" PRIu32 "\n" -+ " PCRIndex: %" PRIu32 "\n" - " eventType: %s\n" - " digest: %s\n" - " eventDataSize: %" PRIu32 "\n", (*count)++, event->pcrIndex, - -From c56c70f62af9a4fe884c6efa69eeb36f39d6fe65 Mon Sep 17 00:00:00 2001 -From: Trammell hudson -Date: Wed, 13 May 2020 12:58:20 +0200 -Subject: [PATCH 5/6] tpm2_eventlog: use "Digest:" and "EventSize:" - consistently - -Signed-off-by: Trammell hudson ---- - lib/tpm2_eventlog_yaml.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/lib/tpm2_eventlog_yaml.c b/lib/tpm2_eventlog_yaml.c -index d1f308904..50bd2fa6d 100644 ---- a/lib/tpm2_eventlog_yaml.c -+++ b/lib/tpm2_eventlog_yaml.c -@@ -330,9 +330,9 @@ void yaml_eventhdr(TCG_EVENT const *event, size_t *count) { - - tpm2_tool_output("- Event[%zu]:\n" - " PCRIndex: %" PRIu32 "\n" -- " eventType: %s\n" -- " digest: %s\n" -- " eventDataSize: %" PRIu32 "\n", (*count)++, event->pcrIndex, -+ " EventType: %s\n" -+ " Digest: %s\n" -+ " EventSize: %" PRIu32 "\n", (*count)++, event->pcrIndex, - eventtype_to_string(event->eventType), digest_hex, - event->eventDataSize); - } - -From 113ab8c213418c6d1c9045bb19069159cc5b594b Mon Sep 17 00:00:00 2001 -From: Trammell hudson -Date: Wed, 13 May 2020 14:16:39 +0200 -Subject: [PATCH 6/6] tpm2_eventlog: use same output format for EV_EFI_ACTION - and EV_POST_CODE - -This also avoids a potential stack smash if the event log -violates the spec and has an action string longer than -permitted. - -Signed-off-by: Trammell hudson ---- - lib/tpm2_eventlog_yaml.c | 11 ++--------- - 1 file changed, 2 insertions(+), 9 deletions(-) - -diff --git a/lib/tpm2_eventlog_yaml.c b/lib/tpm2_eventlog_yaml.c -index 50bd2fa6d..8966cae42 100644 ---- a/lib/tpm2_eventlog_yaml.c -+++ b/lib/tpm2_eventlog_yaml.c -@@ -182,10 +182,7 @@ static bool yaml_uefi_post_code(const TCG_EVENT2 * const event) - const size_t len = event->EventSize; - - tpm2_tool_output( -- " Event:\n" -- " - Length: %zu\n" -- " String: '%.*s'\n", -- len, -+ " Event: '%.*s'\n", - (int) len, - data); - return true; -@@ -225,11 +222,7 @@ bool yaml_uefi_platfwblob(UEFI_PLATFORM_FIRMWARE_BLOB *data) { - /* TCG PC Client PFP section 9.4.4 */ - bool yaml_uefi_action(UINT8 const *action, size_t size) { - -- /* longest string permitted by spec is 47 chars */ -- char buf[50] = { '\0', }; -- -- memcpy (buf, action, size); -- tpm2_tool_output(" Event: %s\n", buf); -+ tpm2_tool_output(" Event: '%.*s'\n", (int) size, action); - - return true; - } diff --git a/SPECS/tpm2-tools.spec b/SPECS/tpm2-tools.spec deleted file mode 100644 index ba93a37..0000000 --- a/SPECS/tpm2-tools.spec +++ /dev/null @@ -1,250 +0,0 @@ -#global candidate rc2 - -Name: tpm2-tools -Version: 5.0 -Release: 2%{?candidate:.%{candidate}}%{?dist} -Summary: A bunch of TPM testing toolS build upon tpm2-tss - -License: BSD -URL: https://github.com/tpm2-software/tpm2-tools -Source0: https://github.com/tpm2-software/tpm2-tools/releases/download/%{version}%{?candidate:-%{candidate}}/%{name}-%{version}%{?candidate:-%{candidate}}.tar.gz - -BuildRequires: make -BuildRequires: gcc-c++ -BuildRequires: libtool -BuildRequires: autoconf-archive -BuildRequires: pandoc -BuildRequires: pkgconfig(cmocka) -BuildRequires: pkgconfig(libcurl) -BuildRequires: pkgconfig(openssl) -# tpm2-tss-devel provides tss2-mu/sys/esys package config -BuildRequires: pkgconfig(tss2-mu) -BuildRequires: pkgconfig(tss2-sys) -BuildRequires: pkgconfig(tss2-esys) -BuildRequires: pkgconfig(uuid) - -# tpm2-tools is heavily depending on TPM2.0-TSS project, matched tss is required -Requires: tpm2-tss%{?_isa} >= 2.3.1 - -%description -tpm2-tools is a batch of tools for tpm2.0. It is based on tpm2-tss. - -%prep -%autosetup -p1 -n %{name}-%{version}%{?candidate:-%{candidate}} - -%build -# LTO exposes a latent uninitialized variable "value" in the function # "nt". -# This has been reported to the maintainer (Yunying), but they have not -# responded and I am not comfortable enough with the code to know if a trivial -# initialization to zero is appropriate/safe. So LTO is disabled for now. -%define _lto_cflags %{nil} -%configure --prefix=/usr --disable-static --disable-silent-rules -%make_build - -%install -%make_install - -%files -%license doc/LICENSE -%doc README.md doc/CHANGELOG.md -%{_bindir}/tpm2 -%{_bindir}/tpm2_* -%{_bindir}/tss2 -%{_bindir}/tss2_* -%{_datadir}/bash-completion/completions/tpm2* -%{_datadir}/bash-completion/completions/tss2* -%{_mandir}/man1/tpm2_*.1.gz -%{_mandir}/man1/tpm2.1.gz -%{_mandir}/man1/tss2_*.1.gz - -%changelog -* Wed Jan 27 2021 Fedora Release Engineering - 5.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Mon Nov 23 2020 Peter Robinson - 5.0-1 -- Update tp tpm2-tools 5.0 - -* Sat Aug 29 2020 Peter Robinson - 4.3.0-1 -- Update to 4.3.0 - -* Mon Aug 10 2020 Peter Robinson - 4.2.1-4 -- Rebuild for tpm2-tss 3.0 - -* Wed Jul 29 2020 Fedora Release Engineering - 4.2.1-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Tue Jun 30 2020 Jeff Law - 4.2.1-2 -- Disable LTO due to latent uninitialized variable exposed by LTO - -* Wed May 27 2020 Peter Robinson - 4.2.1-1 -- Update to 4.2.1 - -* Tue Apr 14 2020 Peter Robinson - 4.2-1 -- Update to 4.2 - -* Fri Jan 31 2020 Fedora Release Engineering - 4.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Thu Nov 28 2019 Yunying Sun - 4.1-1 -- Update to 4.1 release - -* Tue Oct 29 2019 Yunying Sun - 4.0.1-1 -- Update to 4.0.1 release - -* Tue Sep 10 2019 Peter Robinson 4.0-1 -- Update to 4.0 - -* Fri Sep 6 2019 Javier Martinez Canillas 4.0-0.4-rc2 -- Use a release tarball instead of a source code tarball - -* Fri Sep 6 2019 Peter Robinson 4.0-0.3-rc2 -- Update to 4.0 RC2 - -* Tue Aug 27 2019 Peter Robinson 4.0-0.2-rc1 -- Update to 4.0 RC1 - -* Tue Aug 20 2019 Peter Robinson 4.0-0.1-rc0 -- Update to 4.0 RC0 - -* Thu Aug 1 2019 Peter Robinson 3.2.0-3 -- Fix for crash for max PCRs available - -* Sat Jul 27 2019 Fedora Release Engineering - 3.2.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Fri Jun 21 2019 Yunying Sun - 3.2.0-1 -- Update to 3.2.0 release -- Removed patches since all have been included in 3.2.0 release - -* Fri May 10 2019 Javier Martinez Canillas - 3.1.4-2 -- Allow tpm2_makecredential to run without a TPM (jetwhiz) -- Add tpm2_pcrreset and tpm2_checkquote tools (jetwhiz) - -* Fri Mar 15 2019 Yunying Sun - 3.1.4-1 -- Update to 3.1.4 release -- Removed the 4 patches since all have been included in 3.1.4 release - -* Sun Feb 03 2019 Fedora Release Engineering - 3.1.3-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Mon Jan 7 2019 Javier Martinez Canillas - 3.1.3-3 -- Fix broken -T option when passing additional arguments - -* Mon Jan 7 2019 Javier Martinez Canillas - 3.1.3-2 -- Fix broken -T option and a couple of minor fixes -- Add pandoc BuildRequires - -* Wed Nov 7 2018 Yunying Sun - 3.1.3-1 -- Update to 3.1.3 release - -* Wed Sep 12 2018 Javier Martinez Canillas - 3.1.2-1 -- Update to 3.1.2 release -- Restore TCTI configuration environment for tools -- Restore tpm2_getcap tool properties output - Resolves: rhbz#1625647 - -* Sat Jul 14 2018 Javier Martinez Canillas - 3.1.1-3 -- Revert backward incompatible change that removes default object attributes - -* Sat Jul 14 2018 Fedora Release Engineering - 3.1.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Thu Jul 12 2018 Yunying Sun - 3.1.1-1 -- Update to 3.1.1 release - -* Thu Jul 5 2018 Yunying Sun - 3.1.0-1 -- Update Requires version of tpm2-tss to 2.0.0 -- Remove BuildRequires for tcti-abrmd since it is optional -- Remove BuildRequires for tcti-{device,mssim} as it is now dynamically loaded -- Update to 3.1.0 release - -* Mon Apr 30 2018 Javier Martinez Canillas - 3.0.4-1 -- Update URLs to point to the new project location -- Update to 3.0.4 release - -* Wed Feb 21 2018 Javier Martinez Canillas - 3.0.3-3 -- Remove ExclusiveArch: x86_64 directive - -* Fri Feb 09 2018 Fedora Release Engineering - 3.0.3-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Tue Jan 16 2018 Javier Martinez Canillas - 3.0.3-1 -- Update to 3.0.3 release - -* Mon Dec 18 2017 Javier Martinez Canillas - 3.0.2-1 -- Update to 3.0.2 release - -* Tue Dec 12 2017 Javier Martinez Canillas - 3.0.1-1 -- Update to 3.0.1 release (RHBZ#1512743) -- Download the generated tarball provided instead of the source code tarball - -* Fri Dec 08 2017 Javier Martinez Canillas - 3.0-1 -- Update to 3.0 release - -* Wed Nov 29 2017 Javier Martinez Canillas - 3.0-0.1.rc1 -- Update to 3.0 release candidate 1 -- Update URLs to point to the new project location -- Make the package to obsolete version 2.1.1 - -* Wed Nov 01 2017 Javier Martinez Canillas - 2.1.1-1 -- Rename remaining tpm2.0-tools prefixes to tpm2-tools -- Remove global pkg_prefix since now the upstream repo and package names match -- Remove downstream patches since now these are in the latest upstream release -- Update to 2.1.1 release (RHBZ#1504438) - -* Thu Oct 19 2017 Jerry Snitselaar - 2.1.0-7 -- Clean up potential memleak (RHBZ#1503959) - -* Thu Oct 05 2017 Javier Martinez Canillas - 2.1.0-6 -- Add tpm2-abrmd-devel BuildRequires so tools have abrmd support (RHBZ#1498909) - -* Fri Aug 18 2017 Javier Martinez Canillas - 2.1.0-5 -- Remove unneeded source tarballs (RHBZ#1482830) - -* Tue Aug 15 2017 Sun Yunying - 2.1.0-4 -- Add patch to fix build error when openssl-devel is installed(RHBZ#1481236) - -* Thu Aug 03 2017 Fedora Release Engineering - 2.1.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild - -* Mon Jul 31 2017 Sun Yunying - 2.1.0-2 -- Add patch to fix gcc7 complaining about implicit-fallthrough cases - -* Fri Jul 28 2017 Sun Yunying - 2.1.0-1 -- Update to latest upstream release 2.1.0 - -* Fri Jul 28 2017 Sun Yunying - 1.1.0-9 -- Update Requires dependency so that tpm2-tss update won't break tpm2-tools - -* Thu Jul 27 2017 Fedora Release Engineering - 1.1.0-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Wed May 10 2017 Sun Yunying - 1.1.0-7 -- Only update release version to make fedpkg build works for f26 - -* Wed Mar 1 2017 Sun Yunying - 1.1.0-6 -- Update tpm2-tss version to 1.0-3 to fix broken dependency on f26 - -* Sat Feb 11 2017 Fedora Release Engineering - 1.1.0-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Fri Jan 20 2017 Sun Yunying - 1.1.0-4 -- Dependency check failed for Requires again, here to fix this -- Update release version and changelog - -* Thu Jan 19 2017 Sun Yunying - 1.1.0-3 -- Change spec file permission to 644 to avoid rpmlint complain -- Update Requires to fix dependency check error reported in Bodhi -- Remove tpm2-tss-devel version in BuildRequires comment -- Update release version and changelog - -* Wed Dec 21 2016 Sun Yunying - 1.1.0-2 -- Remove pkg_version to avoid dupliate use of version -- Remove redundant BuildRequires for autoconf/automake/pkgconfig -- Add comments for BuildRequires of sapi/tcti-device/tcti-socket -- Use ExclusiveArch instead of ExcludeArch -- Requires tpm2-tss version updated to 1.0-2 -- Updated release version and changelog - -* Fri Dec 2 2016 Sun Yunying - 1.1.0-1 -- Initial version of the package diff --git a/sources b/sources new file mode 100644 index 0000000..0e2dff3 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (tpm2-tools-5.1.1.tar.gz) = 4e094dcffb66103773d85e866ab9ba8db5d0f205ff9658e08fe14e8e41250570a7f7274b4048934adf256ea41650fa498fc3d6da2786adc241a4bf2e8f7bf78e diff --git a/tpm2-tools.spec b/tpm2-tools.spec new file mode 100644 index 0000000..025eb16 --- /dev/null +++ b/tpm2-tools.spec @@ -0,0 +1,257 @@ +#global candidate rc2 + +Name: tpm2-tools +Version: 5.1.1 +Release: 1%{?candidate:.%{candidate}}%{?dist} +Summary: A bunch of TPM testing toolS build upon tpm2-tss + +License: BSD +URL: https://github.com/tpm2-software/tpm2-tools +Source0: https://github.com/tpm2-software/tpm2-tools/releases/download/%{version}%{?candidate:-%{candidate}}/%{name}-%{version}%{?candidate:-%{candidate}}.tar.gz + +BuildRequires: make +BuildRequires: gcc-c++ +BuildRequires: libtool +BuildRequires: autoconf-archive +BuildRequires: pandoc +BuildRequires: pkgconfig(cmocka) +BuildRequires: pkgconfig(libcurl) +BuildRequires: pkgconfig(openssl) +# tpm2-tss-devel provides tss2-mu/sys/esys package config +BuildRequires: pkgconfig(tss2-mu) >= 3.1.0 +BuildRequires: pkgconfig(tss2-sys) >= 3.1.0 +BuildRequires: pkgconfig(tss2-esys) >= 3.1.0 +BuildRequires: pkgconfig(uuid) + +# tpm2-tools is heavily depending on TPM2.0-TSS project, matched tss is required +Requires: tpm2-tss%{?_isa} >= 3.1.0 + +%description +tpm2-tools is a batch of tools for tpm2.0. It is based on tpm2-tss. + +%prep +%autosetup -p1 -n %{name}-%{version}%{?candidate:-%{candidate}} + +%build +# LTO exposes a latent uninitialized variable "value" in the function # "nt". +# This has been reported to the maintainer (Yunying), but they have not +# responded and I am not comfortable enough with the code to know if a trivial +# initialization to zero is appropriate/safe. So LTO is disabled for now. +%define _lto_cflags %{nil} +%configure --prefix=/usr --disable-static --disable-silent-rules +%make_build + +%install +%make_install + +%files +%license doc/LICENSE +%doc README.md doc/CHANGELOG.md +%{_bindir}/tpm2 +%{_bindir}/tpm2_* +%{_bindir}/tss2 +%{_bindir}/tss2_* +%{_datadir}/bash-completion/completions/tpm2* +%{_datadir}/bash-completion/completions/tss2* +%{_mandir}/man1/tpm2_*.1.gz +%{_mandir}/man1/tpm2.1.gz +%{_mandir}/man1/tss2_*.1.gz + +%changelog +* Mon Jun 21 2021 Peter Robinson - 5.1.1-1 +- Update to 5.1.1 +- Fixes CVE-2021-3565 (rhbz 1964428) + +* Tue May 25 2021 Peter Robinson - 5.1-1 +- Update to 5.1 + +* Wed Jan 27 2021 Fedora Release Engineering - 5.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Mon Nov 23 2020 Peter Robinson - 5.0-1 +- Update tp tpm2-tools 5.0 + +* Sat Aug 29 2020 Peter Robinson - 4.3.0-1 +- Update to 4.3.0 + +* Mon Aug 10 2020 Peter Robinson - 4.2.1-4 +- Rebuild for tpm2-tss 3.0 + +* Wed Jul 29 2020 Fedora Release Engineering - 4.2.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Tue Jun 30 2020 Jeff Law - 4.2.1-2 +- Disable LTO due to latent uninitialized variable exposed by LTO + +* Wed May 27 2020 Peter Robinson - 4.2.1-1 +- Update to 4.2.1 + +* Tue Apr 14 2020 Peter Robinson - 4.2-1 +- Update to 4.2 + +* Fri Jan 31 2020 Fedora Release Engineering - 4.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Nov 28 2019 Yunying Sun - 4.1-1 +- Update to 4.1 release + +* Tue Oct 29 2019 Yunying Sun - 4.0.1-1 +- Update to 4.0.1 release + +* Tue Sep 10 2019 Peter Robinson 4.0-1 +- Update to 4.0 + +* Fri Sep 6 2019 Javier Martinez Canillas 4.0-0.4-rc2 +- Use a release tarball instead of a source code tarball + +* Fri Sep 6 2019 Peter Robinson 4.0-0.3-rc2 +- Update to 4.0 RC2 + +* Tue Aug 27 2019 Peter Robinson 4.0-0.2-rc1 +- Update to 4.0 RC1 + +* Tue Aug 20 2019 Peter Robinson 4.0-0.1-rc0 +- Update to 4.0 RC0 + +* Thu Aug 1 2019 Peter Robinson 3.2.0-3 +- Fix for crash for max PCRs available + +* Sat Jul 27 2019 Fedora Release Engineering - 3.2.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Fri Jun 21 2019 Yunying Sun - 3.2.0-1 +- Update to 3.2.0 release +- Removed patches since all have been included in 3.2.0 release + +* Fri May 10 2019 Javier Martinez Canillas - 3.1.4-2 +- Allow tpm2_makecredential to run without a TPM (jetwhiz) +- Add tpm2_pcrreset and tpm2_checkquote tools (jetwhiz) + +* Fri Mar 15 2019 Yunying Sun - 3.1.4-1 +- Update to 3.1.4 release +- Removed the 4 patches since all have been included in 3.1.4 release + +* Sun Feb 03 2019 Fedora Release Engineering - 3.1.3-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Mon Jan 7 2019 Javier Martinez Canillas - 3.1.3-3 +- Fix broken -T option when passing additional arguments + +* Mon Jan 7 2019 Javier Martinez Canillas - 3.1.3-2 +- Fix broken -T option and a couple of minor fixes +- Add pandoc BuildRequires + +* Wed Nov 7 2018 Yunying Sun - 3.1.3-1 +- Update to 3.1.3 release + +* Wed Sep 12 2018 Javier Martinez Canillas - 3.1.2-1 +- Update to 3.1.2 release +- Restore TCTI configuration environment for tools +- Restore tpm2_getcap tool properties output + Resolves: rhbz#1625647 + +* Sat Jul 14 2018 Javier Martinez Canillas - 3.1.1-3 +- Revert backward incompatible change that removes default object attributes + +* Sat Jul 14 2018 Fedora Release Engineering - 3.1.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Thu Jul 12 2018 Yunying Sun - 3.1.1-1 +- Update to 3.1.1 release + +* Thu Jul 5 2018 Yunying Sun - 3.1.0-1 +- Update Requires version of tpm2-tss to 2.0.0 +- Remove BuildRequires for tcti-abrmd since it is optional +- Remove BuildRequires for tcti-{device,mssim} as it is now dynamically loaded +- Update to 3.1.0 release + +* Mon Apr 30 2018 Javier Martinez Canillas - 3.0.4-1 +- Update URLs to point to the new project location +- Update to 3.0.4 release + +* Wed Feb 21 2018 Javier Martinez Canillas - 3.0.3-3 +- Remove ExclusiveArch: x86_64 directive + +* Fri Feb 09 2018 Fedora Release Engineering - 3.0.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Tue Jan 16 2018 Javier Martinez Canillas - 3.0.3-1 +- Update to 3.0.3 release + +* Mon Dec 18 2017 Javier Martinez Canillas - 3.0.2-1 +- Update to 3.0.2 release + +* Tue Dec 12 2017 Javier Martinez Canillas - 3.0.1-1 +- Update to 3.0.1 release (RHBZ#1512743) +- Download the generated tarball provided instead of the source code tarball + +* Fri Dec 08 2017 Javier Martinez Canillas - 3.0-1 +- Update to 3.0 release + +* Wed Nov 29 2017 Javier Martinez Canillas - 3.0-0.1.rc1 +- Update to 3.0 release candidate 1 +- Update URLs to point to the new project location +- Make the package to obsolete version 2.1.1 + +* Wed Nov 01 2017 Javier Martinez Canillas - 2.1.1-1 +- Rename remaining tpm2.0-tools prefixes to tpm2-tools +- Remove global pkg_prefix since now the upstream repo and package names match +- Remove downstream patches since now these are in the latest upstream release +- Update to 2.1.1 release (RHBZ#1504438) + +* Thu Oct 19 2017 Jerry Snitselaar - 2.1.0-7 +- Clean up potential memleak (RHBZ#1503959) + +* Thu Oct 05 2017 Javier Martinez Canillas - 2.1.0-6 +- Add tpm2-abrmd-devel BuildRequires so tools have abrmd support (RHBZ#1498909) + +* Fri Aug 18 2017 Javier Martinez Canillas - 2.1.0-5 +- Remove unneeded source tarballs (RHBZ#1482830) + +* Tue Aug 15 2017 Sun Yunying - 2.1.0-4 +- Add patch to fix build error when openssl-devel is installed(RHBZ#1481236) + +* Thu Aug 03 2017 Fedora Release Engineering - 2.1.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Mon Jul 31 2017 Sun Yunying - 2.1.0-2 +- Add patch to fix gcc7 complaining about implicit-fallthrough cases + +* Fri Jul 28 2017 Sun Yunying - 2.1.0-1 +- Update to latest upstream release 2.1.0 + +* Fri Jul 28 2017 Sun Yunying - 1.1.0-9 +- Update Requires dependency so that tpm2-tss update won't break tpm2-tools + +* Thu Jul 27 2017 Fedora Release Engineering - 1.1.0-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Wed May 10 2017 Sun Yunying - 1.1.0-7 +- Only update release version to make fedpkg build works for f26 + +* Wed Mar 1 2017 Sun Yunying - 1.1.0-6 +- Update tpm2-tss version to 1.0-3 to fix broken dependency on f26 + +* Sat Feb 11 2017 Fedora Release Engineering - 1.1.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Fri Jan 20 2017 Sun Yunying - 1.1.0-4 +- Dependency check failed for Requires again, here to fix this +- Update release version and changelog + +* Thu Jan 19 2017 Sun Yunying - 1.1.0-3 +- Change spec file permission to 644 to avoid rpmlint complain +- Update Requires to fix dependency check error reported in Bodhi +- Remove tpm2-tss-devel version in BuildRequires comment +- Update release version and changelog + +* Wed Dec 21 2016 Sun Yunying - 1.1.0-2 +- Remove pkg_version to avoid dupliate use of version +- Remove redundant BuildRequires for autoconf/automake/pkgconfig +- Add comments for BuildRequires of sapi/tcti-device/tcti-socket +- Use ExclusiveArch instead of ExcludeArch +- Requires tpm2-tss version updated to 1.0-2 +- Updated release version and changelog + +* Fri Dec 2 2016 Sun Yunying - 1.1.0-1 +- Initial version of the package