# # spec file for package ibmswtpm2 # # Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %define suite ibmtss %define download_version 183-2024-03-27 %ifarch ppc ppc64 s390 s390x %define extra_ccflags -DBIG_ENDIAN_TPM=1 %else %define extra_ccflags "" %endif Name: ibmswtpm2 Version: %(echo %{download_version} | tr '-' '+') Release: 5.1 Summary: IBM's Software TPM 2.0 License: BSD-3-Clause Group: Development/Tools/Other URL: https://github.com/kgoldman/ibmswtpm2 Source: https://github.com/kgoldman/ibmswtpm2/archive/rev%{download_version}.tar.gz#/%{name}-%{download_version}.tar.gz Patch0: makefile.patch Patch1: ibmswtpm2-TcpServerPosix-Fix-use-of-uninitialized-value.patch #PATCH-FIX-OPENSUSE bsc#1241037 Fix build with OpenSSL 3.5 Patch2: ibmswtpm2-Build-with-OpenSSL-3.5.patch BuildRequires: libopenssl-devel >= 1.0 %description An implementation of the TCG TPM 2.0 specification. It is based on the TPM specification Parts 3 and 4 source code donated by Microsoft, with additional files to complete the implementation. This TPM emulator listens on TCP ports (default 2321 and 2322) and saves state to the file "NVChip" in the current directory. It is probably not of much use other than testing the IBM TSS implementation because of this specific interface. %prep %autosetup -p 1 -n %{name}-rev%{download_version} %build cd src CCFLAGS="%{optflags} "%{extra_ccflags} make %{?_smp_mflags} %install cd src install -m 755 -D -t %{buildroot}/%{_libexecdir}/%{suite} tpm_server %files %license LICENSE %dir %{_libexecdir}/%{suite} %{_libexecdir}/%{suite}/tpm_server %doc ibmtpm.doc %changelog * Fri Apr 4 2025 Pedro Monreal - Fix build with OpenSSL 3.5: [bsc#1241037] * Fails with "error Untested OpenSSL version" when building for the upcoming OpenSSL version 3.5. * Add ibmswtpm2-Build-with-OpenSSL-3.5.patch * Tue Apr 9 2024 Michal Suchanek - Package LICENSE file. * Thu Apr 4 2024 Michal Suchanek - Update to version 183-2024-03-27 * tpm: Updates to rev 180 - Drop obsolete patches * Drop ibmswtpm2-NVDynamic-Fix-use-of-uninitialized-value.patch - addressed upstream * Drop ibmswtpm2-Add-support-for-OpenSSL-3.2.x.patch - merged upstream * Tue Dec 12 2023 Otto Hollmann - Add support for OpenSSL 3.2.x * Add ibmswtpm2-Add-support-for-OpenSSL-3.2.x.patch * Fri Dec 1 2023 Michal Suchanek - Update to version 164-2020-192.2 * Implement the RSA 5 primes optimization. * Check command size for int32 overflow. * Add support for OpenSSL 3.1.x * Do not accept a NULL signKey in TPM2_CertifyX509 * Add Nuvoton to gcc makefile - New project URL - move to github - Drop usptreamed ibmswtpm2-OpenSSL-3.1.patch * Wed Mar 15 2023 Otto Hollmann - Add support for OpenSSL 3.1.x * Add ibmswtpm2-OpenSSL-3.1.patch * Sat Sep 24 2022 Dirk Müller - update to 1682: * tpm: Fix cast in BnSetBit. * tpm2: Fix size check in CryptSecretDecrypt * tpm: Port Windows code for OpenSSL 3.0 * tpm: Update to openssl 3.0.2 * tpm: Add command and handle tracing * tpm: Update for openssl 3.0.1 * tpm: Add ECC encrypt and decrypt commands * Fix compilation on RISC-V * PlatformSvc: return error on control socket failure * main: set a return code if StartTcpServer fails * tpm: Add all updates to TPM specification 164. - drop ibmswtpm2-fix-ppc32.patch (upstream) - makefile.patch: refresh * Tue Sep 1 2020 Michal Suchanek - Fix ppc32 build. + ibmswtpm2-fix-ppc32.patch * Mon Aug 17 2020 Michal Suchanek - Update to upstream version 1637 * fixes build of ibmtss 1.5.0 * Refresh makefile.patch * Drop upstreamed patches - ibmswtpm2-fix-uninitialized.patch - ibmswtpm2-fix-empty-decrypt.patch * Fix use of uninitialized value: + ibmswtpm2-TcpServerPosix-Fix-use-of-uninitialized-value.patch + ibmswtpm2-NVDynamic-Fix-use-of-uninitialized-value.patch * Mon Dec 23 2019 mgerstner - Add ibmswtpm2-fix-empty-decrypt.patch: Fix a corner case in the emulator that causes an error when trying to RSA-decrypt an empty message (bsc#1159510). This fix was confirmed to be by the upstream author and is supposed to be contained in the next release. * Thu Jul 4 2019 Michal Suchanek - Update to upstream version 1332 * fixes build of ibmtpm v1470 * add ibmswtpm2-fix-uninitialized.patch * run through spec-cleaner * Thu Jan 18 2018 msuchanek@suse.com - Enable bigendian build * Tue Jan 16 2018 vcizek@suse.com - Update to upstream version 1119 * adds openssl 1.1 support (bsc#1066916) - drop patches (upstream): * bits.patch * fix_unreferenced_macro-gcc7.patch * Wed Nov 8 2017 msuchanek@suse.com - Update to upstream version 974 - deal with openssl 1.0 vs 1.1 split (bsc#1066916) * Mon Jun 5 2017 msuchanek@suse.com - fix build with gcc7: fix_unreferenced_macro-gcc7.patch * Tue Feb 14 2017 msuchanek@suse.com - Drop a pointer cast hack in bits.patch. It builds without the hack. * Wed Feb 8 2017 jengelh@inai.de - Wrap description, drop empty scriptlets. * Fri Jan 27 2017 msuchanek@suse.com - Import version 832 (FATE#321601) - bits.patch: handle some 32/64bit issues - makefile.patch: some compiler flag adjustments