From 32c0e160ea4f8c59f1246011a4f38c03138f1220 Mon Sep 17 00:00:00 2001 From: Armin Kuster Date: Sun, 13 Feb 2022 13:05:41 -0800 Subject: tpm2-tss: update to 3.1.0 Drop 001-configure.ac-fix-compatibility-with-autoconf-2.70.patch which is included in update. Signed-off-by: Armin Kuster --- ...e.ac-fix-compatibility-with-autoconf-2.70.patch | 48 ------------ .../tpm2-tss/tpm2-tss/fixup_hosttools.patch | 26 +++++++ meta-tpm/recipes-tpm2/tpm2-tss/tpm2-tss_3.0.3.bb | 83 -------------------- meta-tpm/recipes-tpm2/tpm2-tss/tpm2-tss_3.1.0.bb | 91 ++++++++++++++++++++++ 4 files changed, 117 insertions(+), 131 deletions(-) delete mode 100644 meta-tpm/recipes-tpm2/tpm2-tss/tpm2-tss/0001-configure.ac-fix-compatibility-with-autoconf-2.70.patch create mode 100644 meta-tpm/recipes-tpm2/tpm2-tss/tpm2-tss/fixup_hosttools.patch delete mode 100644 meta-tpm/recipes-tpm2/tpm2-tss/tpm2-tss_3.0.3.bb create mode 100644 meta-tpm/recipes-tpm2/tpm2-tss/tpm2-tss_3.1.0.bb (limited to 'meta-tpm') diff --git a/meta-tpm/recipes-tpm2/tpm2-tss/tpm2-tss/0001-configure.ac-fix-compatibility-with-autoconf-2.70.patch b/meta-tpm/recipes-tpm2/tpm2-tss/tpm2-tss/0001-configure.ac-fix-compatibility-with-autoconf-2.70.patch deleted file mode 100644 index cae2e76..0000000 --- a/meta-tpm/recipes-tpm2/tpm2-tss/tpm2-tss/0001-configure.ac-fix-compatibility-with-autoconf-2.70.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 03cca78d24d716eec792f86f5b0bc69886fad981 Mon Sep 17 00:00:00 2001 -From: Patrick McCarty -Date: Fri, 18 Dec 2020 01:54:05 +0000 -Subject: [PATCH] configure.ac: fix compatibility with autoconf 2.70 - -With autoconf 2.70, not quoting the second argument to one of the AS_IF -macro expansions leads to generation of invalid shell code affecting the -first nested ERROR_IF_NO_PROG expansion. - -The invalid shell code leads to an error resembling: - - ./configure: line 18826: syntax error near unexpected token `newline' - ./configure: line 18826: ` ''' - -Fix the issue by quoting the second argument to the affected AS_IF, -similar to the quoting found elsewhere in configure.ac. - -Signed-off-by: Patrick McCarty - -Upstream-Status: Backport -Signed-off-by: Armin Kuster - ---- - configure.ac | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -Index: tpm2-tss-3.0.3/configure.ac -=================================================================== ---- tpm2-tss-3.0.3.orig/configure.ac -+++ tpm2-tss-3.0.3/configure.ac -@@ -279,7 +279,7 @@ AC_ARG_ENABLE([integration], - [build and execute integration tests])],, - [enable_integration=no]) - AS_IF([test "x$enable_integration" = "xyes"], -- AS_IF([test "$HOSTOS" = "Linux"], -+ [AS_IF([test "$HOSTOS" = "Linux"], - [ERROR_IF_NO_PROG([ss])], - [ERROR_IF_NO_PROG([sockstat])]) - ERROR_IF_NO_PROG([echo]) -@@ -328,7 +328,7 @@ AS_IF([test "x$enable_integration" = "xy - [AC_MSG_ERROR([No simulator executable found in PATH for testing TCTI.])]) - AC_SUBST([INTEGRATION_TCTI], [$integration_tcti]) - AC_SUBST([INTEGRATION_ARGS], [$integration_args]) -- AC_SUBST([ENABLE_INTEGRATION], [$enable_integration])) -+ AC_SUBST([ENABLE_INTEGRATION], [$enable_integration])]) - AM_CONDITIONAL([ENABLE_INTEGRATION],[test "x$enable_integration" = "xyes"]) - # - # sanitizer compiler flags diff --git a/meta-tpm/recipes-tpm2/tpm2-tss/tpm2-tss/fixup_hosttools.patch b/meta-tpm/recipes-tpm2/tpm2-tss/tpm2-tss/fixup_hosttools.patch new file mode 100644 index 0000000..b5579e1 --- /dev/null +++ b/meta-tpm/recipes-tpm2/tpm2-tss/tpm2-tss/fixup_hosttools.patch @@ -0,0 +1,26 @@ +revert configure: add checks for all tools used by make install + +Not appropriate for cross build env. + +Upstream-Status: OE [inappropriate] +Signed-off-by: Armin Kuster + +Index: tpm2-tss-3.1.0/configure.ac +=================================================================== +--- tpm2-tss-3.1.0.orig/configure.ac ++++ tpm2-tss-3.1.0/configure.ac +@@ -471,14 +471,6 @@ AM_CONDITIONAL(SYSD_SYSUSERS, test "x$sy + AC_CHECK_PROG(systemd_tmpfiles, systemd-tmpfiles, yes) + AM_CONDITIONAL(SYSD_TMPFILES, test "x$systemd_tmpfiles" = "xyes") + # Check all tools used by make install +-AS_IF([test "$HOSTOS" = "Linux"], +- [ERROR_IF_NO_PROG([groupadd]) +- ERROR_IF_NO_PROG([useradd]) +- ERROR_IF_NO_PROG([id]) +- ERROR_IF_NO_PROG([chown]) +- ERROR_IF_NO_PROG([chmod]) +- ERROR_IF_NO_PROG([mkdir]) +- ERROR_IF_NO_PROG([setfacl])]) + + AC_SUBST([PATH]) + diff --git a/meta-tpm/recipes-tpm2/tpm2-tss/tpm2-tss_3.0.3.bb b/meta-tpm/recipes-tpm2/tpm2-tss/tpm2-tss_3.0.3.bb deleted file mode 100644 index 1a36a5b..0000000 --- a/meta-tpm/recipes-tpm2/tpm2-tss/tpm2-tss_3.0.3.bb +++ /dev/null @@ -1,83 +0,0 @@ -SUMMARY = "Software stack for TPM2." -DESCRIPTION = "OSS implementation of the TCG TPM2 Software Stack (TSS2) " -LICENSE = "BSD-2-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=500b2e742befc3da00684d8a1d5fd9da" -SECTION = "tpm" - -DEPENDS = "autoconf-archive-native libgcrypt openssl" - -SRC_URI = "https://github.com/tpm2-software/${BPN}/releases/download/${PV}/${BPN}-${PV}.tar.gz \ - file://0001-configure.ac-fix-compatibility-with-autoconf-2.70.patch \ - " -SRC_URI[sha256sum] = "78392be7309baf47f51b122f566ac915fd4d1760ea78571cba2e1484f9b5be17" - -inherit autotools pkgconfig systemd extrausers - -PACKAGECONFIG ??= "" -PACKAGECONFIG[oxygen] = ",--disable-doxygen-doc, " -PACKAGECONFIG[fapi] = "--enable-fapi,--disable-fapi,curl json-c " - -EXTRA_OECONF += "--enable-static --with-udevrulesdir=${nonarch_base_libdir}/udev/rules.d/" -EXTRA_OECONF:remove = " --disable-static" - - -EXTRA_USERS_PARAMS = "\ - useradd -p '' tss; \ - groupadd tss; \ - " - -PROVIDES = "${PACKAGES}" -PACKAGES = " \ - ${PN} \ - ${PN}-dbg \ - ${PN}-doc \ - libtss2-mu \ - libtss2-mu-dev \ - libtss2-mu-staticdev \ - libtss2-tcti-device \ - libtss2-tcti-device-dev \ - libtss2-tcti-device-staticdev \ - libtss2-tcti-mssim \ - libtss2-tcti-mssim-dev \ - libtss2-tcti-mssim-staticdev \ - libtss2 \ - libtss2-dev \ - libtss2-staticdev \ -" - -FILES:libtss2-tcti-device = "${libdir}/libtss2-tcti-device.so.*" -FILES:libtss2-tcti-device-dev = " \ - ${includedir}/tss2/tss2_tcti_device.h \ - ${libdir}/pkgconfig/tss2-tcti-device.pc \ - ${libdir}/libtss2-tcti-device.so" -FILES:libtss2-tcti-device-staticdev = "${libdir}/libtss2-tcti-device.*a" - -FILES:libtss2-tcti-mssim = "${libdir}/libtss2-tcti-mssim.so.*" -FILES:libtss2-tcti-mssim-dev = " \ - ${includedir}/tss2/tss2_tcti_mssim.h \ - ${libdir}/pkgconfig/tss2-tcti-mssim.pc \ - ${libdir}/libtss2-tcti-mssim.so" -FILES:libtss2-tcti-mssim-staticdev = "${libdir}/libtss2-tcti-mssim.*a" - -FILES:libtss2-mu = "${libdir}/libtss2-mu.so.*" -FILES:libtss2-mu-dev = " \ - ${includedir}/tss2/tss2_mu.h \ - ${libdir}/pkgconfig/tss2-mu.pc \ - ${libdir}/libtss2-mu.so" -FILES:libtss2-mu-staticdev = "${libdir}/libtss2-mu.*a" - -FILES:libtss2 = "${libdir}/libtss2*so.*" -FILES:libtss2-dev = " \ - ${includedir} \ - ${libdir}/pkgconfig \ - ${libdir}/libtss2*so" -FILES:libtss2-staticdev = "${libdir}/libtss*a" - -FILES:${PN} = "\ - ${libdir}/udev \ - ${nonarch_base_libdir}/udev \ - ${sysconfdir}/tmpfiles.d \ - ${sysconfdir}/tpm2-tss \ - ${sysconfdir}/sysusers.d" - -RDEPENDS:libtss2 = "libgcrypt" diff --git a/meta-tpm/recipes-tpm2/tpm2-tss/tpm2-tss_3.1.0.bb b/meta-tpm/recipes-tpm2/tpm2-tss/tpm2-tss_3.1.0.bb new file mode 100644 index 0000000..e0f2d09 --- /dev/null +++ b/meta-tpm/recipes-tpm2/tpm2-tss/tpm2-tss_3.1.0.bb @@ -0,0 +1,91 @@ +SUMMARY = "Software stack for TPM2." +DESCRIPTION = "OSS implementation of the TCG TPM2 Software Stack (TSS2) " +LICENSE = "BSD-2-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=500b2e742befc3da00684d8a1d5fd9da" +SECTION = "tpm" + +DEPENDS = "autoconf-archive-native libgcrypt openssl" + +SRC_URI = "https://github.com/tpm2-software/${BPN}/releases/download/${PV}/${BPN}-${PV}.tar.gz \ + file://fixup_hosttools.patch \ + " + +SRC_URI[sha256sum] = "8900a6603f74310b749b65f23c3461cde6e2a23a5f61058b21004c25f9cf19e8" + +inherit autotools pkgconfig systemd extrausers + +PACKAGECONFIG ??= "" +PACKAGECONFIG[oxygen] = ",--disable-doxygen-doc, " +PACKAGECONFIG[fapi] = "--enable-fapi,--disable-fapi,curl json-c " + +EXTRA_OECONF += "--enable-static --with-udevrulesdir=${nonarch_base_libdir}/udev/rules.d/" +EXTRA_OECONF += "--runstatedir=/run" +EXTRA_OECONF:remove = " --disable-static" + +EXTRA_USERS_PARAMS = "\ + useradd -p '' tss; \ + groupadd tss; \ + " + +do_install:append() { + # Remove /run as it is created on startup + rm -rf ${D}/run +} + +PROVIDES = "${PACKAGES}" +PACKAGES = " \ + ${PN} \ + ${PN}-dbg \ + ${PN}-doc \ + libtss2-mu \ + libtss2-mu-dev \ + libtss2-mu-staticdev \ + libtss2-tcti-device \ + libtss2-tcti-device-dev \ + libtss2-tcti-device-staticdev \ + libtss2-tcti-mssim \ + libtss2-tcti-mssim-dev \ + libtss2-tcti-mssim-staticdev \ + libtss2 \ + libtss2-dev \ + libtss2-staticdev \ +" + +FILES:libtss2-tcti-device = "${libdir}/libtss2-tcti-device.so.*" +FILES:libtss2-tcti-device-dev = " \ + ${includedir}/tss2/tss2_tcti_device.h \ + ${libdir}/pkgconfig/tss2-tcti-device.pc \ + ${libdir}/libtss2-tcti-device.so" +FILES:libtss2-tcti-device-staticdev = "${libdir}/libtss2-tcti-device.*a" + +FILES:libtss2-tcti-mssim = "${libdir}/libtss2-tcti-mssim.so.*" +FILES:libtss2-tcti-mssim-dev = " \ + ${includedir}/tss2/tss2_tcti_mssim.h \ + ${libdir}/pkgconfig/tss2-tcti-mssim.pc \ + ${libdir}/libtss2-tcti-mssim.so" +FILES:libtss2-tcti-mssim-staticdev = "${libdir}/libtss2-tcti-mssim.*a" + +FILES:libtss2-mu = "${libdir}/libtss2-mu.so.*" +FILES:libtss2-mu-dev = " \ + ${includedir}/tss2/tss2_mu.h \ + ${libdir}/pkgconfig/tss2-mu.pc \ + ${libdir}/libtss2-mu.so" +FILES:libtss2-mu-staticdev = "${libdir}/libtss2-mu.*a" + +FILES:libtss2 = "${libdir}/libtss2*so.*" +FILES:libtss2-dev = " \ + ${includedir} \ + ${libdir}/pkgconfig \ + ${libdir}/libtss2*so" +FILES:libtss2-staticdev = "${libdir}/libtss*a" + +FILES:${PN} = "\ + ${libdir}/udev \ + /var/lib/tpm2-tss \ + /var/run \ + ${nonarch_base_libdir}/udev \ + ${sysconfdir}/tmpfiles.d \ + ${sysconfdir}/tpm2-tss \ + ${sysconfdir}/sysusers.d" + +RDEPENDS:libtss2 = "libgcrypt" -- cgit v1.2.3-54-g00ecf