Browse Source

package/ibm-sw-tpm2: bump version

Switch from tarball to git checkout, upstream does not provide tarballs
anymore: https://sourceforge.net/projects/ibmswtpm2/files/

Rebased patch.

This bump introduces compatibility with OpenSSL 3.x:
https://sourceforge.net/p/ibmswtpm2/tpm2/ci/920ce656af833ce6fb2b76c34cf8f58a4b6a4175/

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Bernd Kuhls 2 years ago
parent
commit
3d6bbf4bae

+ 12 - 2
package/ibm-sw-tpm2/0001-Use-LONG_BIT-to-define-RADIX_BITS.patch

@@ -12,6 +12,8 @@ as we're now using >= POSIX.1-2001 definitions of fd_set and friends.
 
 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
 Signed-off-by: Vincent Fazio <vfazio@gmail.com>
+[Bernd: rebased for git rev 5452af422edeff70fcae8ea99dd28a0922051d7b]
+Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
 ---
  src/LibSupport.h     | 21 +++------------------
  src/TcpServerPosix.c |  1 +
@@ -22,7 +24,7 @@ diff --git a/src/LibSupport.h b/src/LibSupport.h
 index 5055560..48b1e16 100644
 --- a/src/LibSupport.h
 +++ b/src/LibSupport.h
-@@ -64,24 +64,9 @@
+@@ -64,32 +64,9 @@
  #ifndef _LIB_SUPPORT_H_
  #define _LIB_SUPPORT_H_
  
@@ -40,6 +42,14 @@ index 5055560..48b1e16 100644
 -    || defined(_M_ARM) || defined(__arm__) || defined(__thumb__)	\
 -    || defined(__powerpc__) || defined(__PPC__)
 -#       define RADIX_BITS                      32
+-#   elif defined(__riscv) || defined(__riscv__)
+-#       if __riscv_xlen == 32
+-#            define RADIX_BITS                 32
+-#       elif __riscv_xlen == 64
+-#            define RADIX_BITS                 64
+-#       else
+-#            error Unsupported __riscv_xlen value
+-#       endif
 -#   else
 -#       error Unable to determine RADIX_BITS from compiler environment
 -#   endif
@@ -66,7 +76,7 @@ diff --git a/src/makefile b/src/makefile
 index f124e78..6ee128e 100644
 --- a/src/makefile
 +++ b/src/makefile
-@@ -46,6 +46,8 @@ CCFLAGS = -Wall  			\
+@@ -47,6 +47,8 @@ CCFLAGS = -Wall  			\
  	 -c -ggdb -O0 			\
  	-DTPM_POSIX			\
  	-D_POSIX_			\

+ 1 - 4
package/ibm-sw-tpm2/ibm-sw-tpm2.hash

@@ -1,6 +1,3 @@
-# from https://sourceforge.net/projects/ibmswtpm2/files
-sha1  a2a5335024a2edc1739f08b99e716fa355be627d  ibmtpm1563.tar.gz
-md5  13013612b3a13dc935fefe1a5684179c  ibmtpm1563.tar.gz
 # Locally computed:
-sha256  55145928ad2b24f34be6a0eacf9fb492e10e0ea919b8428c721fa970e85d6147  ibmtpm1661.tar.gz
+sha256  d11203a73946ad14ca39f4b74742c0d81762dbe7e913a4685f92620f1d6fe295  ibm-sw-tpm2-5452af422edeff70fcae8ea99dd28a0922051d7b-br1.tar.gz
 sha256  dd2d31b560011ea673e197251e710e52669d911367d83cd3cfd018f8ed58bde9  LICENSE

+ 3 - 3
package/ibm-sw-tpm2/ibm-sw-tpm2.mk

@@ -4,9 +4,9 @@
 #
 ################################################################################
 
-IBM_SW_TPM2_VERSION = 1661
-IBM_SW_TPM2_SOURCE = ibmtpm$(IBM_SW_TPM2_VERSION).tar.gz
-IBM_SW_TPM2_SITE = https://sourceforge.net/projects/ibmswtpm2/files
+IBM_SW_TPM2_VERSION = 5452af422edeff70fcae8ea99dd28a0922051d7b
+IBM_SW_TPM2_SITE = https://git.code.sf.net/p/ibmswtpm2/tpm2
+IBM_SW_TPM2_SITE_METHOD = git
 IBM_SW_TPM2_LICENSE = BSD-3-Clause
 IBM_SW_TPM2_LICENSE_FILES = LICENSE
 IBM_SW_TPM2_DEPENDENCIES = openssl