yocto.lists.yoctoproject.org archive mirror
 help / color / mirror / Atom feed
* [meta-parsec][PATCH 1/2] tpm2-tss: restore version 3.2.x to meta-parsec
@ 2023-03-20 11:49 Armin Kuster
  2023-03-20 11:49 ` [meta-parsec][PATCH 2/2] meta-parsec: bump BBFILE_PRIORITY to the right tpm2-tss is included Armin Kuster
  2023-03-20 13:22 ` [meta-parsec][PATCH 1/2] tpm2-tss: restore version 3.2.x to meta-parsec Anton Antonov
  0 siblings, 2 replies; 3+ messages in thread
From: Armin Kuster @ 2023-03-20 11:49 UTC (permalink / raw)
  To: yocto

parsec-service does not support 4.x so keep older version for now too

This fixes parsec-service build
Error:
thread 'main' panicked at 'Unsupported TSS version: 4',

Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
 .../tpm2-tss-3.2.0/fixup_hosttools.patch      | 29 ++++++
 .../recipes-tpm2/tpm2-tss/tpm2-tss_3.2.0.bb   | 97 +++++++++++++++++++
 2 files changed, 126 insertions(+)
 create mode 100644 meta-parsec/recipes-tpm2/tpm2-tss/tpm2-tss-3.2.0/fixup_hosttools.patch
 create mode 100644 meta-parsec/recipes-tpm2/tpm2-tss/tpm2-tss_3.2.0.bb

diff --git a/meta-parsec/recipes-tpm2/tpm2-tss/tpm2-tss-3.2.0/fixup_hosttools.patch b/meta-parsec/recipes-tpm2/tpm2-tss/tpm2-tss-3.2.0/fixup_hosttools.patch
new file mode 100644
index 0000000..450698f
--- /dev/null
+++ b/meta-parsec/recipes-tpm2/tpm2-tss/tpm2-tss-3.2.0/fixup_hosttools.patch
@@ -0,0 +1,29 @@
+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 <akuster808@gmail.com>
+
+Index: tpm2-tss-3.2.0/configure.ac
+===================================================================
+--- tpm2-tss-3.2.0.orig/configure.ac
++++ tpm2-tss-3.2.0/configure.ac
+@@ -488,17 +488,6 @@
+ 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"],
+-    [ AC_CHECK_PROG(useradd, useradd, yes)
+-      AC_CHECK_PROG(groupadd, groupadd, yes)
+-      AC_CHECK_PROG(adduser, adduser, yes)
+-      AC_CHECK_PROG(addgroup, addgroup, yes)
+-      AS_IF([test "x$addgroup" != "xyes" && test "x$groupadd" != "xyes" ],
+-         [AC_MSG_ERROR([addgroup or groupadd are needed.])])
+-      AS_IF([test "x$adduser" != "xyes" && test "x$useradd" != "xyes" ],
+-         [AC_MSG_ERROR([adduser or useradd are needed.])])])
+-
+ AC_SUBST([PATH])
+ 
+ dnl --------- Doxy Gen -----------------------
diff --git a/meta-parsec/recipes-tpm2/tpm2-tss/tpm2-tss_3.2.0.bb b/meta-parsec/recipes-tpm2/tpm2-tss/tpm2-tss_3.2.0.bb
new file mode 100644
index 0000000..1556273
--- /dev/null
+++ b/meta-parsec/recipes-tpm2/tpm2-tss/tpm2-tss_3.2.0.bb
@@ -0,0 +1,97 @@
+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] = "48305e4144dcf6d10f3b25b7bccf0189fd2d1186feafd8cd68c6b17ecf0d7912"
+
+UPSTREAM_CHECK_URI = "https://github.com/tpm2-software/${BPN}/releases"
+
+inherit autotools pkgconfig systemd useradd
+
+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"
+
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM:${PN} = "--system tss"
+USERADD_PARAM:${PN} = "--system -M -d /var/lib/tpm -s /bin/false -g tss tss"
+
+do_configure:prepend() {
+    # do not extract the version number from git
+    sed -i -e 's/m4_esyscmd_s(\[git describe --tags --always --dirty\])/${PV}/' ${S}/configure.ac
+}
+
+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"
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [meta-parsec][PATCH 2/2] meta-parsec: bump BBFILE_PRIORITY to the right tpm2-tss is included
  2023-03-20 11:49 [meta-parsec][PATCH 1/2] tpm2-tss: restore version 3.2.x to meta-parsec Armin Kuster
@ 2023-03-20 11:49 ` Armin Kuster
  2023-03-20 13:22 ` [meta-parsec][PATCH 1/2] tpm2-tss: restore version 3.2.x to meta-parsec Anton Antonov
  1 sibling, 0 replies; 3+ messages in thread
From: Armin Kuster @ 2023-03-20 11:49 UTC (permalink / raw)
  To: yocto

Parsec-service does not support tpm2-tss 4 so us the older release 3.2.x

Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
 meta-parsec/conf/layer.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta-parsec/conf/layer.conf b/meta-parsec/conf/layer.conf
index 0a71694..84d4172 100644
--- a/meta-parsec/conf/layer.conf
+++ b/meta-parsec/conf/layer.conf
@@ -6,7 +6,7 @@ BBFILES += "${LAYERDIR}/recipes*/*/*.bb ${LAYERDIR}/recipes*/*/*.bbappend"
 
 BBFILE_COLLECTIONS += "parsec-layer"
 BBFILE_PATTERN_parsec-layer = "^${LAYERDIR}/"
-BBFILE_PRIORITY_parsec-layer = "5"
+BBFILE_PRIORITY_parsec-layer = "7"
 
 LAYERSERIES_COMPAT_parsec-layer = "mickledore"
 
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [meta-parsec][PATCH 1/2] tpm2-tss: restore version 3.2.x to meta-parsec
  2023-03-20 11:49 [meta-parsec][PATCH 1/2] tpm2-tss: restore version 3.2.x to meta-parsec Armin Kuster
  2023-03-20 11:49 ` [meta-parsec][PATCH 2/2] meta-parsec: bump BBFILE_PRIORITY to the right tpm2-tss is included Armin Kuster
@ 2023-03-20 13:22 ` Anton Antonov
  1 sibling, 0 replies; 3+ messages in thread
From: Anton Antonov @ 2023-03-20 13:22 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 222 bytes --]

Hi Armin,

We're in the process of releasing new version of Parsec where this issue is fixed. https://github.com/parallaxsecond/parsec/issues/663

We will update parsec recipes in the next few days.

Cheers,
Anton

[-- Attachment #2: Type: text/html, Size: 280 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-03-20 13:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-20 11:49 [meta-parsec][PATCH 1/2] tpm2-tss: restore version 3.2.x to meta-parsec Armin Kuster
2023-03-20 11:49 ` [meta-parsec][PATCH 2/2] meta-parsec: bump BBFILE_PRIORITY to the right tpm2-tss is included Armin Kuster
2023-03-20 13:22 ` [meta-parsec][PATCH 1/2] tpm2-tss: restore version 3.2.x to meta-parsec Anton Antonov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).