swtpm and libtpms host packages
cover swtpm and libtpms host packages
Add swtpm and libtpms host packages.
Jarkko Sakkinen (4):
package/quota: Update DEVELOPERS address
package/json-glib: add host build
package/libtpms: add host package
package/swtpm: add host package
DEVELOPERS | 4 +++- package/Config.in | 1 + package/Config.in.host | 1 + package/json-glib/json-glib.mk | 12 ++++++++++++ package/libtpms/Config.in | 20 ++++++++++++++++++++ package/libtpms/libtpms.hash | 2 ++ package/libtpms/libtpms.mk | 17 +++++++++++++++++ package/swtpm/Config.in.host | 16 ++++++++++++++++ package/swtpm/swtpm.hash | 2 ++ package/swtpm/swtpm.mk | 17 +++++++++++++++++ 10 files changed, 91 insertions(+), 1 deletion(-) create mode 100644 package/libtpms/Config.in create mode 100644 package/libtpms/libtpms.hash create mode 100644 package/libtpms/libtpms.mk create mode 100644 package/swtpm/Config.in.host create mode 100644 package/swtpm/swtpm.hash create mode 100644 package/swtpm/swtpm.mk
--
2.45.0
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 1/4 package/quota: Update DEVELOPERS address
--- DEVELOPERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
DEVELOPERS +1 -1
@@ -1518,7 +1518,7 @@ F: package/zip/ N: Jared Bents <[email protected]> F: package/libvirt/ -N: Jarkko Sakkinen <[email protected]> +N: Jarkko Sakkinen <[email protected]> F: package/quota/ N: Jason Pruitt <[email protected]>
Signature · 6 lines
2.45.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Yann E. MORIN
AppliedRe: [Buildroot] [PATCH 1/4] package/quota: Update DEVELOPERS address
Jarkko, All,
On 2024-05-17 16:20 +0300, Jarkko Sakkinen spake thusly:
Quoted 1 line
Signed-off-by Jarkko Sakkinen <[email protected]>
Applied to master, thanks.
Regards,
Yann E. MORIN.
Quoted 24 lines
--- DEVELOPERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)DEVELOPERS +1
-1@@ -1518,7 +1518,7 @@ F: package/zip/ N: Jared Bents <[email protected]> F: package/libvirt/ -N: Jarkko Sakkinen <[email protected]> +N: Jarkko Sakkinen <[email protected]> F: package/quota/ N: Jason Pruitt <[email protected]>Signature · 6 lines
2.45.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH 1/4] package/quota: Update DEVELOPERS address
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Yann" == Yann E MORIN <[email protected]> writes:
Jarkko, All,
On 2024-05-17 16:20 +0300, Jarkko Sakkinen spake thusly:Quoted 1 line
Signed-off-by Jarkko Sakkinen <[email protected]>Applied to master, thanks.
Committed to 2024.02.x, thanks.
Signature · 5 lines
Bye, Peter Korsgaard _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 2/4 package/json-glib: add host build
In reply to Jarkko Sakkinen--- package/json-glib/json-glib.mk | 12 ++++++++++++ 1 file changed, 12 insertions(+)
package/json-glib/json-glib.mk +12 -0
@@ -18,19 +18,31 @@ JSON_GLIB_DEPENDENCIES = \ host-pkgconf \ libglib2 +HOST_JSON_GLIB_DEPENDENCIES = \ + $(HOST_NLS_DEPENDENCIES) \ + host-pkgconf \ + host-libglib2 + ifeq ($(BR2_PACKAGE_GOBJECT_INTROSPECTION),y) JSON_GLIB_CONF_OPTS += -Dintrospection=enabled JSON_GLIB_DEPENDENCIES += gobject-introspection +HOST_JSON_GLIB_CONF_OPTS += -Dintrospection=enabled +HOST_JSON_GLIB_DEPENDENCIES += gobject-introspection else JSON_GLIB_CONF_OPTS += -Dintrospection=disabled +HOST_JSON_GLIB_CONF_OPTS += -Dintrospection=disabled endif ifeq ($(BR2_SYSTEM_ENABLE_NLS),y) JSON_GLIB_CONF_OPTS += -Dnls=enabled +HOST_JSON_GLIB_CONF_OPTS += -Dnls=enabled else JSON_GLIB_CONF_OPTS += -Dnls=disabled +HOST_JSON_GLIB_CONF_OPTS += -Dnls=disabled endif JSON_GLIB_LDFLAGS = $(TARGET_LDFLAGS) $(TARGET_NLS_LIBS) +HOST_JSON_GLIB_LDFLAGS = $(HOST_LDFLAGS) $(HOST_NLS_LIBS) $(eval $(meson-package)) +$(eval $(host-meson-package))
Signature · 6 lines
2.45.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH 2/4] package/json-glib: add host build
Jarkko, All,
Thanks for these patches; please find comments below.
On 2024-05-17 16:20 +0300, Jarkko Sakkinen spake thusly:
Quoted 12 lines
Signed-off-by Jarkko Sakkinen <[email protected]>--- package/json-glib/json-glib.mk | 12 ++++++++++++ 1 file changed, 12 insertions(+)package/json-glib/json-glib.mk +0
-0@@ -18,19 +18,31 @@ JSON_GLIB_DEPENDENCIES = \ host-pkgconf \ libglib2
package/json-glib/json-glib.mk JSON_GLIB_DEPENDENCIES = \ · line 29
Quoted 10 lines
package/json-glib/json-glib.mk +6
-0+HOST_JSON_GLIB_DEPENDENCIES = \ + $(HOST_NLS_DEPENDENCIES) \ + host-pkgconf \ + host-libglib2 + ifeq ($(BR2_PACKAGE_GOBJECT_INTROSPECTION),y) JSON_GLIB_CONF_OPTS += -Dintrospection=enabled JSON_GLIB_DEPENDENCIES += gobject-introspection +HOST_JSON_GLIB_CONF_OPTS += -Dintrospection=enabled
BR2_PACKAGE_GOBJECT_INTROSPECTION (the condition for this block) is a target setting, so it semantically does not make sense to protect the host variant with that condition.
Usually, for host variants, we do not have conditional compilation of features; either the feature is needed to run on the host, in which case we always enable it, or it is not needed, in which case we always disable it.
The only case where we would have such an option for such a feature, is when the feature needs a lot of dependencies, or time-consuming dependencies (e.g. needs LLVM!). GOI is probably a good reasong to add such an option, *iff* introspection is needed on the host, which I doubt is.
package/json-glib/json-glib.mk JSON_GLIB_DEPENDENCIES = \ · line 30
Quoted 1 line
package/json-glib/json-glib.mk +1
-0+HOST_JSON_GLIB_DEPENDENCIES += gobject-introspection
Here, you instruct a host variant to depend on a target variant, which is usually not what you intended. And indeed, I believe here you'd need a dependency on host-gobject-introspection. I guess it worked ion your case, because gobject-introspection has a dependency on host-gobject-introspection, so that pulled it in for you. Still, this is probably not correct.
So, my proposal would be to always disable GOI unconditionally in the host variant, unless there are cases where it is required, in which case we always enable it.
Unless there is actually a reason that the host variant has the same feature set as the target variant, in which case it should be explained in the commit log.
package/json-glib/json-glib.mk JSON_GLIB_DEPENDENCIES = \ · line 42
Quoted 12 lines
package/json-glib/json-glib.mk +3
-0else JSON_GLIB_CONF_OPTS += -Dintrospection=disabled +HOST_JSON_GLIB_CONF_OPTS += -Dintrospection=disabled endif ifeq ($(BR2_SYSTEM_ENABLE_NLS),y) JSON_GLIB_CONF_OPTS += -Dnls=enabled +HOST_JSON_GLIB_CONF_OPTS += -Dnls=enabled else JSON_GLIB_CONF_OPTS += -Dnls=disabled +HOST_JSON_GLIB_CONF_OPTS += -Dnls=disabled endif
Ditto: the BR2_SYSTEM_ENABLE_NLS option drives NLS support for the target, not for the host. For the host, we assume it is never needed, and it is already forcefully disabled in the autotools-package infra:
https://gitlab.com/buildroot.org/buildroot/-/blob/master/package/pkg-autotools.mk#L196
package/json-glib/json-glib.mk JSON_GLIB_DEPENDENCIES = \ · line 45
Quoted 2 lines
package/json-glib/json-glib.mk +1
-0JSON_GLIB_LDFLAGS = $(TARGET_LDFLAGS) $(TARGET_NLS_LIBS) +HOST_JSON_GLIB_LDFLAGS = $(HOST_LDFLAGS) $(HOST_NLS_LIBS)
HOST_NLS_LIBS is never defined anywhere, so this is basically a noop. ;-)
Regards,
Yann E. MORIN.
Quoted 9 lines
package/json-glib/json-glib.mk +1
-0$(eval $(meson-package)) +$(eval $(host-meson-package))Signature · 6 lines
2.45.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH 2/4] package/json-glib: add host build
Quoted 78 lines · Yann E. MORIN
Jarkko, All,
Thanks for these patches; please find comments below.
On 2024-05-17 16:20 +0300, Jarkko Sakkinen spake thusly:
Quoted 12 lines
Signed-off-by Jarkko Sakkinen <[email protected]>--- package/json-glib/json-glib.mk | 12 ++++++++++++ 1 file changed, 12 insertions(+)package/json-glib/json-glib.mk +0
-0@@ -18,19 +18,31 @@ JSON_GLIB_DEPENDENCIES = \ host-pkgconf \ libglib2package/json-glib/json-glib.mk JSON_GLIB_DEPENDENCIES = \ · line 29
Quoted 10 lines
package/json-glib/json-glib.mk +6
-0+HOST_JSON_GLIB_DEPENDENCIES = \ + $(HOST_NLS_DEPENDENCIES) \ + host-pkgconf \ + host-libglib2 + ifeq ($(BR2_PACKAGE_GOBJECT_INTROSPECTION),y) JSON_GLIB_CONF_OPTS += -Dintrospection=enabled JSON_GLIB_DEPENDENCIES += gobject-introspection +HOST_JSON_GLIB_CONF_OPTS += -Dintrospection=enabled
BR2_PACKAGE_GOBJECT_INTROSPECTION(the condition for this block) is a target setting, so it semantically does not make sense to protect the host variant with that condition.Usually, for host variants, we do not have conditional compilation of features; either the feature is needed to run on the host, in which case we always enable it, or it is not needed, in which case we always disable it.
The only case where we would have such an option for such a feature, is when the feature needs a lot of dependencies, or time-consuming dependencies (e.g. needs LLVM!). GOI is probably a good reasong to add such an option, *iff* introspection is needed on the host, which I doubt is.
package/json-glib/json-glib.mk JSON_GLIB_DEPENDENCIES = \ · line 30
Quoted 1 line
package/json-glib/json-glib.mk +1
-0+HOST_JSON_GLIB_DEPENDENCIES += gobject-introspectionHere, you instruct a host variant to depend on a target variant, which is usually not what you intended. And indeed, I believe here you'd need a dependency on host-gobject-introspection. I guess it worked ion your case, because gobject-introspection has a dependency on host-gobject-introspection, so that pulled it in for you. Still, this is probably not correct.
So, my proposal would be to always disable GOI unconditionally in the host variant, unless there are cases where it is required, in which case we always enable it.
Unless there is actually a reason that the host variant has the same feature set as the target variant, in which case it should be explained in the commit log.
package/json-glib/json-glib.mk JSON_GLIB_DEPENDENCIES = \ · line 42
Quoted 12 lines
package/json-glib/json-glib.mk +3
-0else JSON_GLIB_CONF_OPTS += -Dintrospection=disabled +HOST_JSON_GLIB_CONF_OPTS += -Dintrospection=disabled endif ifeq ($(BR2_SYSTEM_ENABLE_NLS),y) JSON_GLIB_CONF_OPTS += -Dnls=enabled +HOST_JSON_GLIB_CONF_OPTS += -Dnls=enabled else JSON_GLIB_CONF_OPTS += -Dnls=disabled +HOST_JSON_GLIB_CONF_OPTS += -Dnls=disabled endifDitto: the
BR2_SYSTEM_ENABLE_NLSoption drives NLS support for the target, not for the host. For the host, we assume it is never needed, and it is already forcefully disabled in the autotools-package infra:
https://gitlab.com/buildroot.org/buildroot/-/blob/master/package/pkg-autotools.mk#L196
Quoted 5 lines
package/json-glib/json-glib.mk JSON_GLIB_DEPENDENCIES = \ · line 45
Quoted 2 lines
package/json-glib/json-glib.mk +1
-0JSON_GLIB_LDFLAGS = $(TARGET_LDFLAGS) $(TARGET_NLS_LIBS) +HOST_JSON_GLIB_LDFLAGS = $(HOST_LDFLAGS) $(HOST_NLS_LIBS)
HOST_NLS_LIBSis never defined anywhere, so this is basically a noop. ;-)
Thanks for the feedback.
I have already patch in my tree to address this, which I will later on squash to the patch under the review:
https://gitlab.com/jarkkojs/buildroot/-/commits/swtpm
Quoted 2 lines
Regards,
Yann E. MORIN.
BR, Jarkko
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 3/4 package/libtpms: add host package
In reply to Jarkko SakkinenLibtpms is a library that targets the integration of TPM functionality into hypervisors, primarily into Qemu. Libtpms provides a very narrow public API for this purpose so that integration is possible. Only the minimum of necessary APIs are made publicly available.
--- DEVELOPERS | 1 + package/Config.in | 1 + package/libtpms/Config.in | 20 ++++++++++++++++++++ package/libtpms/libtpms.hash | 2 ++ package/libtpms/libtpms.mk | 17 +++++++++++++++++ 5 files changed, 41 insertions(+) create mode 100644 package/libtpms/Config.in create mode 100644 package/libtpms/libtpms.hash create mode 100644 package/libtpms/libtpms.mk
DEVELOPERS +1 -0
@@ -1519,6 +1519,7 @@ N: Jared Bents <[email protected]> F: package/libvirt/ N: Jarkko Sakkinen <[email protected]> +F: package/libtpms/ F: package/quota/ N: Jason Pruitt <[email protected]>
package/Config.in +1 -0
@@ -1569,6 +1569,7 @@ menu "Crypto" source "package/libssh/Config.in" source "package/libssh2/Config.in" source "package/libtomcrypt/Config.in" + source "package/libtpms/Config.in" source "package/libuecc/Config.in" source "package/libxcrypt/Config.in" source "package/mbedtls/Config.in"
package/libtpms/Config.in new file +20 -0
@@ -0,0 +1,20 @@ +config BR2_PACKAGE_LIBTPMS + bool "libtpms" + select BR2_PACKAGE_LIBOPENSSL + select BR2_PACKAGE_LIBTOOL + help + Libtpms is a library that targets the integration of TPM + functionality into hypervisors, primarily into Qemu. Libtpms + provides a very narrow public API for this purpose so that + integration is possible. Only the minimum of necessary APIs + are made publicly available. + + It is assumed that the user of libtpms is familiar with the + concepts of the Trusted Platform Module (TPM). For the + interaction with libtpms it is necessary to know how to + construct valid TPM commands and to be able to parse their + results. It is not within the scope of libtpms's documentation + to provide background on this. See the section on references + below. + + https://github.com/stefanberger/libtpms/wiki
package/libtpms/libtpms.hash new file +2 -0
@@ -0,0 +1,2 @@ +sha256 2807466f1563ebe45fdd12dd26e501e8a0c4fbb99c7c428fbb508789efd221c0 libtpms-0.9.6.tar.gz +sha256 82f1e6bae374bb6a9d4f4596767fd33e499718d560de140fd9f3d402cc5e41fb LICENSE
package/libtpms/libtpms.mk new file +17 -0
@@ -0,0 +1,17 @@ +################################################################################ +# +# libtpms +# +################################################################################ + +LIBTPMS_VERSION = 0.9.6 +LIBTPMS_SITE = $(call github,stefanberger,libtpms,v$(LIBTPMS_VERSION)) +LIBTPMS_LICENSE = BSD-4-Clause +LIBTPMS_LICENSE_FILES = LICENSE +LIBTPMS_INSTALL_STAGING = YES +LIBTPMS_AUTORECONF = YES + +HOST_LIBTPMS_DEPENDENCIES = host-libtool host-pkgconf host-libopenssl +HOST_LIBTPMS_CONF_OPTS = --with-openssl -with-tpm2 + +$(eval $(host-autotools-package))
Signature · 6 lines
2.45.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH 3/4] package/libtpms: add host package
Jarkko, All,
On 2024-05-17 16:20 +0300, Jarkko Sakkinen spake thusly:
Quoted 8 lines
Libtpms is a library that targets the integration of TPM functionality into hypervisors, primarily into Qemu. Libtpms provides a very narrow public API for this purpose so that integration is possible. Only the minimum of necessary APIs are made publicly available.
Signed-off-by Jarkko Sakkinen <[email protected]>---
[--SNIP--]
package/libtpms/Config.in line 1
Quoted 7 lines
package/libtpms/Config.in new file +1
-0@@ -0,0 +1,20 @@ +config BR2_PACKAGE_LIBTPMS
BR2_PACKAGE_LIBTPMS is for target package; for the host variant, you'd have to name it BR2_PACKAGE_HOST_LIBTPMS.
The Config.in is sourced from ackage/Config.in, too, which is for target packages.
package/libtpms/Config.in line 4
Quoted 3 lines
package/libtpms/Config.in new file +3
-0+ bool "libtpms" + select BR2_PACKAGE_LIBOPENSSL + select BR2_PACKAGE_LIBTOOL
It even selects target packages.
However [0]...
[--SNIP--]
Quoted 13 lines
package/libtpms/libtpms.mk new file +7
-0@@ -0,0 +1,17 @@ +################################################################################ +# +# libtpms +# +################################################################################ + +LIBTPMS_VERSION = 0.9.6
package/libtpms/libtpms.mk line 17
Quoted 10 lines
package/libtpms/libtpms.mk new file +10
-0+LIBTPMS_SITE = $(call github,stefanberger,libtpms,v$(LIBTPMS_VERSION)) +LIBTPMS_LICENSE = BSD-4-Clause +LIBTPMS_LICENSE_FILES = LICENSE +LIBTPMS_INSTALL_STAGING = YES +LIBTPMS_AUTORECONF = YES + +HOST_LIBTPMS_DEPENDENCIES = host-libtool host-pkgconf host-libopenssl +HOST_LIBTPMS_CONF_OPTS = --with-openssl -with-tpm2 + +$(eval $(host-autotools-package))
[0]... you've made it a host-only package.
So it means that if one enable BR2_PACKAGE_LIBTPMS in the menuconfig, there will be no libtpms available in the target.
For host packages that only provide a library used by other host packages, we usually do not add a Kconfig symbol at all, and just rely on the _DEPENDENCIES to bring in the library.
Regards,
Yann E. MORIN.
Quoted 7 lines
Signature · 6 lines
2.45.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 4/4 package/swtpm: add host package
In reply to Jarkko SakkinenThe SWTPM package provides TPM emulators with different front-end interfaces to libtpms. TPM emulators provide socket interfaces (TCP/IP and Unix) and the Linux CUSE interface for the creation of multiple native /dev/vtpm* devices.
--- DEVELOPERS | 1 + package/Config.in.host | 1 + package/swtpm/Config.in.host | 16 ++++++++++++++++ package/swtpm/swtpm.hash | 2 ++ package/swtpm/swtpm.mk | 17 +++++++++++++++++ 5 files changed, 37 insertions(+) create mode 100644 package/swtpm/Config.in.host create mode 100644 package/swtpm/swtpm.hash create mode 100644 package/swtpm/swtpm.mk
DEVELOPERS +1 -0
@@ -1521,6 +1521,7 @@ F: package/libvirt/ N: Jarkko Sakkinen <[email protected]> F: package/libtpms/ F: package/quota/ +F: package/swtpm/ N: Jason Pruitt <[email protected]> F: package/librtlsdr/
package/Config.in.host +1 -0
@@ -110,6 +110,7 @@ menu "Host utilities" source "package/starfive-spltool/Config.in.host" source "package/sunxi-tools/Config.in.host" source "package/swig/Config.in.host" + source "package/swtpm/Config.in.host" source "package/swugenerator/Config.in.host" source "package/systemd/Config.in.host" source "package/tegrarcm/Config.in.host"
package/swtpm/Config.in.host new file +16 -0
@@ -0,0 +1,16 @@ +config BR2_PACKAGE_HOST_SWTPM + bool "host swtpm" + select BR2_PACKAGE_JSON_GLIB + select BR2_PACKAGE_LIBOPENSSL + select BR2_PACKAGE_LIBTASN1 + select BR2_PACKAGE_LIBTOOL + select BR2_PACKAGE_LIBTPMS + help + Compiles SWTPM software TPM emulator for the host. + + The SWTPM package provides TPM emulators with different + front-end interfaces to libtpms. TPM emulators provide socket + interfaces (TCP/IP and Unix) and the Linux CUSE interface for + the creation of multiple native /dev/vtpm* devices. + + https://github.com/stefanberger/swtpm/wiki
package/swtpm/swtpm.hash new file +2 -0
@@ -0,0 +1,2 @@ +sha256 b281b4e8c39f68e1928675f788abc70072e4081152e129144359a8c5c304c06b swtpm-0.8.2.tar.gz +sha256 19d27d6e96d07022e5e688f75c974f1ceb9aae9e90e0fccae68666d02099cc4b LICENSE
package/swtpm/swtpm.mk new file +17 -0
@@ -0,0 +1,17 @@ +################################################################################ +# +# swtpm +# +################################################################################ + +SWTPM_VERSION = 0.8.2 +SWTPM_SITE = $(call github,stefanberger,swtpm,v$(SWTPM_VERSION)) +SWTPM_LICENSE = BSD-4-Clause +SWTPM_LICENSE_FILES = LICENSE +SWTPM_AUTORECONF = YES + +HOST_SWTPM_DEPENDENCIES = host-m4 host-libtool host-pkgconf host-json-glib \ + host-libopenssl host-libtasn1 host-libtpms +HOST_SWTPM_CONF_OPTS = --with-openssl --without-seccomp + +$(eval $(host-autotools-package))
Signature · 6 lines
2.45.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH 4/4] package/swtpm: add host package
Jarkko, All,
On 2024-05-17 16:20 +0300, Jarkko Sakkinen spake thusly:
Quoted 7 lines
The SWTPM package provides TPM emulators with different front-end interfaces to libtpms. TPM emulators provide socket interfaces (TCP/IP and Unix) and the Linux CUSE interface for the creation of multiple native
/dev/vtpm*devices.
[--SNIP--]
package/swtpm/Config.in.host line 1
Quoted 7 lines
package/swtpm/Config.in.host new file +1
-0@@ -0,0 +1,16 @@ +config BR2_PACKAGE_HOST_SWTPM
This is a host package (by name, and sourced from Config.in.host), so...
package/swtpm/Config.in.host line 7
Quoted 6 lines
package/swtpm/Config.in.host new file +6
-0+ bool "host swtpm" + select BR2_PACKAGE_JSON_GLIB + select BR2_PACKAGE_LIBOPENSSL + select BR2_PACKAGE_LIBTASN1 + select BR2_PACKAGE_LIBTOOL + select BR2_PACKAGE_LIBTPMS
... it should select target packages.
Usually, unless there is a good reason, we do not expose in menuconfig, host packages that only provide libraries used by other host packages.
[--SNIP--]
Quoted 10 lines
package/swtpm/swtpm.mk new file +4
-0@@ -0,0 +1,17 @@ +################################################################################ +# +# swtpm +#
package/swtpm/swtpm.mk line 14
Quoted 10 lines
package/swtpm/swtpm.mk new file +10
-0+################################################################################ + +SWTPM_VERSION = 0.8.2 +SWTPM_SITE = $(call github,stefanberger,swtpm,v$(SWTPM_VERSION)) +SWTPM_LICENSE = BSD-4-Clause +SWTPM_LICENSE_FILES = LICENSE +SWTPM_AUTORECONF = YES + +HOST_SWTPM_DEPENDENCIES = host-m4 host-libtool host-pkgconf host-json-glib \ + host-libopenssl host-libtasn1 host-libtpms
Lists should be alphabetically sorted, and long lists should be one-item per line:
HOST_SWTPM_DEPENDENCIES = \
host-json-glib \
host-libopenssl \
host-libtasn1 \
host-libtool \
host-libtpms \
host-m4 \
host-pkgconfhost-m4 is usualy only required when you need to autoreconf, in which case it is automatically pulled in (because _AUTORECONF pulls in host-autoconf in _DEPENDENCIES, which in turns pulls in host-m4). And as you do indeed autoreconf, there is no reason to explicitly pul it in, unless swtpm does have explicit m4 scripts besides those in the autotools machinery.
Regards,
Yann E. MORIN.
Quoted 10 lines
package/swtpm/swtpm.mk new file +3
-0+HOST_SWTPM_CONF_OPTS = --with-openssl --without-seccomp + +$(eval $(host-autotools-package))Signature · 6 lines
2.45.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot