Skip to contentSkip to conversation

package/tpm2-openssl: bump version to 1.3.0

PATCH Applied Bernd Kuhls 2 participants 2 messages Sep 11 – Sep 16

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/tpm2-openssl: bump version to 1.3.0

https://github.com/tpm2-software/tpm2-openssl/releases/tag/1.3.0

Updated license hash due to copyright year bump:
https://github.com/tpm2-software/tpm2-openssl/commit/3fb3a5ff7fcd9921ad6e933aed8f34e8e63d46db

Removed -Werror -Wall from Makefile.{am, in} which was added by upstream
commit https://github.com/tpm2-software/tpm2-openssl/commit/c3a8758cad1520d36d6cb87aa87ff8012f3283d8
first included in this release.

This fixes a build error seen with the Gitlab pipelines for bootlin-aarch64-glibc-old:

src/tpm2-provider-encoder.c:
In function ‘tpm2_rsa_encoder_encode_SubjectPublicKeyInfo_der’:
src/tpm2-provider-encoder.c:86:71: error: the comparison will always
evaluate as ‘true’ for the address of ‘tpm2_rsa_encode_public_
SubjectPublicKeyInfo_der’ will never be NULL [-Werror=address]

---
Gitlab pipelines passed:
https://gitlab.com/bkuhls/buildroot/-/commits/e66004a22a3133e7c49ede80bca9d13780df0201

 package/tpm2-openssl/tpm2-openssl.hash | 4 ++--
 package/tpm2-openssl/tpm2-openssl.mk   | 7 ++++++-
 2 files changed, 8 insertions(+), 3 deletions(-)
package/tpm2-openssl/tpm2-openssl.hash +2 -2
index ee15ee885f..36ef705069 100644
@@ -1,3 +1,3 @@
 # Locally computed:
-sha256  2ee15da2dceae1466ffba868e75a00b119d752babc1b6a2792286336a3324fb0  tpm2-openssl-1.2.0.tar.gz
-sha256  7ffba9d66226eb67abb9747ce1cd47477d566143a8ded597bbd974c6fb5fe9f5  LICENSE
+sha256  9a9aca55d4265ec501bcf9c56d21d6ca18dba902553f21c888fe725b42ea9964  tpm2-openssl-1.3.0.tar.gz
+sha256  355dd0ed306eaba0b7397542973b0bdcce84fed036a58f94be8cf7d75f42deba  LICENSE
package/tpm2-openssl/tpm2-openssl.mk +6 -1
index ed590c2f47..5c87cc4a64 100644
@@ -4,13 +4,18 @@
 #
 ################################################################################
 
-TPM2_OPENSSL_VERSION = 1.2.0
+TPM2_OPENSSL_VERSION = 1.3.0
 TPM2_OPENSSL_SITE = https://github.com/tpm2-software/tpm2-openssl/releases/download/$(TPM2_OPENSSL_VERSION)
 TPM2_OPENSSL_LICENSE = BSD-3-Clause
 TPM2_OPENSSL_LICENSE_FILES = LICENSE
 TPM2_OPENSSL_INSTALL_STAGING = YES
 TPM2_OPENSSL_DEPENDENCIES = host-pkgconf openssl tpm2-tss
 
+define TPM2_OPENSSL_DISABLE_WERROR
+	$(SED) 's/-Werror -Wall //g' -i $(@D)/Makefile.*
+endef
+TPM2_OPENSSL_PRE_CONFIGURE_HOOKS += TPM2_OPENSSL_DISABLE_WERROR
+
 # Provide --with-modulesdir to avoid using abs_builddir and DESTDIR
 # (also defined as absolute path) at the same time to define modules
 # install path (am__installdirs).
Signature · 6 lines
2.47.3

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 12 lines · Bernd Kuhls

https://github.com/tpm2-software/tpm2-openssl/releases/tag/1.3.0

Updated license hash due to copyright year bump:
https://github.com/tpm2-software/tpm2-openssl/commit/3fb3a5ff7fcd9921ad6e933aed8f34e8e63d46db

Removed -Werror -Wall from Makefile.{am, in} which was added by upstream
commit https://github.com/tpm2-software/tpm2-openssl/commit/c3a8758cad1520d36d6cb87aa87ff8012f3283d8
first included in this release.

This fixes a build error seen with the Gitlab pipelines for bootlin-aarch64-glibc-old:

Quoted 7 lines

src/tpm2-provider-encoder.c:
In function ‘tpm2_rsa_encoder_encode_SubjectPublicKeyInfo_der’:
src/tpm2-provider-encoder.c:86:71: error: the comparison will always
evaluate as ‘true’ for the address of ‘tpm2_rsa_encode_public_
SubjectPublicKeyInfo_der’ will never be NULL [-Werror=address]

Applied to master, after changing one aspect, see below.

package/tpm2-openssl/tpm2-openssl.mk line 17

Quoted 12 lines
package/tpm2-openssl/tpm2-openssl.mk +5 -1
-TPM2_OPENSSL_VERSION = 1.2.0
+TPM2_OPENSSL_VERSION = 1.3.0
 TPM2_OPENSSL_SITE = https://github.com/tpm2-software/tpm2-openssl/releases/download/$(TPM2_OPENSSL_VERSION)
 TPM2_OPENSSL_LICENSE = BSD-3-Clause
 TPM2_OPENSSL_LICENSE_FILES = LICENSE
 TPM2_OPENSSL_INSTALL_STAGING = YES
 TPM2_OPENSSL_DEPENDENCIES = host-pkgconf openssl tpm2-tss
 
+define TPM2_OPENSSL_DISABLE_WERROR
+	$(SED) 's/-Werror -Wall //g' -i $(@D)/Makefile.*
+endef
+TPM2_OPENSSL_PRE_CONFIGURE_HOOKS += TPM2_OPENSSL_DISABLE_WERROR

I really don't like this kind of random patching, so I've replaced this with:

+# Need to disable -Werror to avoid warnings being treated as errors +# with some gcc versions
+TPM2_OPENSSL_CONF_ENV = CFLAGS="$(TARGET_CFLAGS) -Wno-error"

which is a lot cleaner IMO.

Best regards,

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot