* [Buildroot] [PATCH 0/4] swtpm and libtpms host packages
@ 2024-05-17 13:20 Jarkko Sakkinen
2024-05-17 13:20 ` [Buildroot] [PATCH 1/4] package/quota: Update DEVELOPERS address Jarkko Sakkinen
` (3 more replies)
0 siblings, 4 replies; 11+ messages in thread
From: Jarkko Sakkinen @ 2024-05-17 13:20 UTC (permalink / raw)
To: buildroot; +Cc: Jarkko Sakkinen, Stefan Berger
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
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH 1/4] package/quota: Update DEVELOPERS address
2024-05-17 13:20 [Buildroot] [PATCH 0/4] swtpm and libtpms host packages Jarkko Sakkinen
@ 2024-05-17 13:20 ` Jarkko Sakkinen
2024-05-17 15:39 ` Yann E. MORIN
2024-05-17 13:20 ` [Buildroot] [PATCH 2/4] package/json-glib: add host build Jarkko Sakkinen
` (2 subsequent siblings)
3 siblings, 1 reply; 11+ messages in thread
From: Jarkko Sakkinen @ 2024-05-17 13:20 UTC (permalink / raw)
To: buildroot; +Cc: Jarkko Sakkinen, Stefan Berger
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
---
DEVELOPERS | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/DEVELOPERS b/DEVELOPERS
index a9deddb343..52c9b84a9d 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1518,7 +1518,7 @@ F: package/zip/
N: Jared Bents <jared.bents@rockwellcollins.com>
F: package/libvirt/
-N: Jarkko Sakkinen <jarkko.sakkinen@intel.com>
+N: Jarkko Sakkinen <jarkko@kernel.org>
F: package/quota/
N: Jason Pruitt <jrspruitt@gmail.com>
--
2.45.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH 2/4] package/json-glib: add host build
2024-05-17 13:20 [Buildroot] [PATCH 0/4] swtpm and libtpms host packages Jarkko Sakkinen
2024-05-17 13:20 ` [Buildroot] [PATCH 1/4] package/quota: Update DEVELOPERS address Jarkko Sakkinen
@ 2024-05-17 13:20 ` Jarkko Sakkinen
2024-05-17 13:39 ` Yann E. MORIN
2024-05-17 13:20 ` [Buildroot] [PATCH 3/4] package/libtpms: add host package Jarkko Sakkinen
2024-05-17 13:20 ` [Buildroot] [PATCH 4/4] package/swtpm: " Jarkko Sakkinen
3 siblings, 1 reply; 11+ messages in thread
From: Jarkko Sakkinen @ 2024-05-17 13:20 UTC (permalink / raw)
To: buildroot; +Cc: Jarkko Sakkinen, Stefan Berger
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
---
package/json-glib/json-glib.mk | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/package/json-glib/json-glib.mk b/package/json-glib/json-glib.mk
index cd53f24cee..ffdc76f2c1 100644
--- a/package/json-glib/json-glib.mk
+++ b/package/json-glib/json-glib.mk
@@ -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))
--
2.45.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH 3/4] package/libtpms: add host package
2024-05-17 13:20 [Buildroot] [PATCH 0/4] swtpm and libtpms host packages Jarkko Sakkinen
2024-05-17 13:20 ` [Buildroot] [PATCH 1/4] package/quota: Update DEVELOPERS address Jarkko Sakkinen
2024-05-17 13:20 ` [Buildroot] [PATCH 2/4] package/json-glib: add host build Jarkko Sakkinen
@ 2024-05-17 13:20 ` Jarkko Sakkinen
2024-05-17 13:44 ` Yann E. MORIN
2024-05-17 13:20 ` [Buildroot] [PATCH 4/4] package/swtpm: " Jarkko Sakkinen
3 siblings, 1 reply; 11+ messages in thread
From: Jarkko Sakkinen @ 2024-05-17 13:20 UTC (permalink / raw)
To: buildroot; +Cc: Jarkko Sakkinen, Stefan Berger
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.
Link: https://github.com/stefanberger/libtpms
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
---
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
diff --git a/DEVELOPERS b/DEVELOPERS
index 52c9b84a9d..db0dc702a8 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1519,6 +1519,7 @@ N: Jared Bents <jared.bents@rockwellcollins.com>
F: package/libvirt/
N: Jarkko Sakkinen <jarkko@kernel.org>
+F: package/libtpms/
F: package/quota/
N: Jason Pruitt <jrspruitt@gmail.com>
diff --git a/package/Config.in b/package/Config.in
index 1b6a5b0dab..30b76349ec 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -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"
diff --git a/package/libtpms/Config.in b/package/libtpms/Config.in
new file mode 100644
index 0000000000..d5ae47375a
--- /dev/null
+++ b/package/libtpms/Config.in
@@ -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
diff --git a/package/libtpms/libtpms.hash b/package/libtpms/libtpms.hash
new file mode 100644
index 0000000000..1026aaa4f4
--- /dev/null
+++ b/package/libtpms/libtpms.hash
@@ -0,0 +1,2 @@
+sha256 2807466f1563ebe45fdd12dd26e501e8a0c4fbb99c7c428fbb508789efd221c0 libtpms-0.9.6.tar.gz
+sha256 82f1e6bae374bb6a9d4f4596767fd33e499718d560de140fd9f3d402cc5e41fb LICENSE
diff --git a/package/libtpms/libtpms.mk b/package/libtpms/libtpms.mk
new file mode 100644
index 0000000000..c588b2892c
--- /dev/null
+++ b/package/libtpms/libtpms.mk
@@ -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))
--
2.45.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH 4/4] package/swtpm: add host package
2024-05-17 13:20 [Buildroot] [PATCH 0/4] swtpm and libtpms host packages Jarkko Sakkinen
` (2 preceding siblings ...)
2024-05-17 13:20 ` [Buildroot] [PATCH 3/4] package/libtpms: add host package Jarkko Sakkinen
@ 2024-05-17 13:20 ` Jarkko Sakkinen
2024-05-17 13:52 ` Yann E. MORIN
3 siblings, 1 reply; 11+ messages in thread
From: Jarkko Sakkinen @ 2024-05-17 13:20 UTC (permalink / raw)
To: buildroot; +Cc: Jarkko Sakkinen, Stefan Berger
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.
Link: https://gitlab.com/jarkkojs/linux-tpmdd-test
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
---
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
diff --git a/DEVELOPERS b/DEVELOPERS
index db0dc702a8..732002f85b 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1521,6 +1521,7 @@ F: package/libvirt/
N: Jarkko Sakkinen <jarkko@kernel.org>
F: package/libtpms/
F: package/quota/
+F: package/swtpm/
N: Jason Pruitt <jrspruitt@gmail.com>
F: package/librtlsdr/
diff --git a/package/Config.in.host b/package/Config.in.host
index 986b2854d0..0cf9dc3897 100644
--- a/package/Config.in.host
+++ b/package/Config.in.host
@@ -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"
diff --git a/package/swtpm/Config.in.host b/package/swtpm/Config.in.host
new file mode 100644
index 0000000000..264f74e458
--- /dev/null
+++ b/package/swtpm/Config.in.host
@@ -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
diff --git a/package/swtpm/swtpm.hash b/package/swtpm/swtpm.hash
new file mode 100644
index 0000000000..934d3b6ee0
--- /dev/null
+++ b/package/swtpm/swtpm.hash
@@ -0,0 +1,2 @@
+sha256 b281b4e8c39f68e1928675f788abc70072e4081152e129144359a8c5c304c06b swtpm-0.8.2.tar.gz
+sha256 19d27d6e96d07022e5e688f75c974f1ceb9aae9e90e0fccae68666d02099cc4b LICENSE
diff --git a/package/swtpm/swtpm.mk b/package/swtpm/swtpm.mk
new file mode 100644
index 0000000000..29c8e37c47
--- /dev/null
+++ b/package/swtpm/swtpm.mk
@@ -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))
--
2.45.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [Buildroot] [PATCH 2/4] package/json-glib: add host build
2024-05-17 13:20 ` [Buildroot] [PATCH 2/4] package/json-glib: add host build Jarkko Sakkinen
@ 2024-05-17 13:39 ` Yann E. MORIN
2024-05-17 16:26 ` Jarkko Sakkinen
0 siblings, 1 reply; 11+ messages in thread
From: Yann E. MORIN @ 2024-05-17 13:39 UTC (permalink / raw)
To: Jarkko Sakkinen; +Cc: Stefan Berger, buildroot
Jarkko, All,
Thanks for these patches; please find comments below.
On 2024-05-17 16:20 +0300, Jarkko Sakkinen spake thusly:
> Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
> ---
> package/json-glib/json-glib.mk | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/package/json-glib/json-glib.mk b/package/json-glib/json-glib.mk
> index cd53f24cee..ffdc76f2c1 100644
> --- a/package/json-glib/json-glib.mk
> +++ b/package/json-glib/json-glib.mk
> @@ -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
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.
> +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.
> 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
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
> JSON_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.
> $(eval $(meson-package))
> +$(eval $(host-meson-package))
> --
> 2.45.0
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| 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
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Buildroot] [PATCH 3/4] package/libtpms: add host package
2024-05-17 13:20 ` [Buildroot] [PATCH 3/4] package/libtpms: add host package Jarkko Sakkinen
@ 2024-05-17 13:44 ` Yann E. MORIN
0 siblings, 0 replies; 11+ messages in thread
From: Yann E. MORIN @ 2024-05-17 13:44 UTC (permalink / raw)
To: Jarkko Sakkinen; +Cc: Stefan Berger, buildroot
Jarkko, All,
On 2024-05-17 16:20 +0300, Jarkko Sakkinen spake thusly:
> 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.
>
> Link: https://github.com/stefanberger/libtpms
> Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
> ---
[--SNIP--]
> diff --git a/package/libtpms/Config.in b/package/libtpms/Config.in
> new file mode 100644
> index 0000000000..d5ae47375a
> --- /dev/null
> +++ b/package/libtpms/Config.in
> @@ -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.
> + bool "libtpms"
> + select BR2_PACKAGE_LIBOPENSSL
> + select BR2_PACKAGE_LIBTOOL
It even selects target packages.
However [0]...
[--SNIP--]
> diff --git a/package/libtpms/libtpms.mk b/package/libtpms/libtpms.mk
> new file mode 100644
> index 0000000000..c588b2892c
> --- /dev/null
> +++ b/package/libtpms/libtpms.mk
> @@ -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))
[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.
> --
> 2.45.0
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| 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
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Buildroot] [PATCH 4/4] package/swtpm: add host package
2024-05-17 13:20 ` [Buildroot] [PATCH 4/4] package/swtpm: " Jarkko Sakkinen
@ 2024-05-17 13:52 ` Yann E. MORIN
0 siblings, 0 replies; 11+ messages in thread
From: Yann E. MORIN @ 2024-05-17 13:52 UTC (permalink / raw)
To: Jarkko Sakkinen; +Cc: Stefan Berger, buildroot
Jarkko, All,
On 2024-05-17 16:20 +0300, Jarkko Sakkinen spake thusly:
> 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.
>
> Link: https://gitlab.com/jarkkojs/linux-tpmdd-test
> Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
[--SNIP--]
> diff --git a/package/swtpm/Config.in.host b/package/swtpm/Config.in.host
> new file mode 100644
> index 0000000000..264f74e458
> --- /dev/null
> +++ b/package/swtpm/Config.in.host
> @@ -0,0 +1,16 @@
> +config BR2_PACKAGE_HOST_SWTPM
This is a host package (by name, and sourced from Config.in.host), so...
> + 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--]
> diff --git a/package/swtpm/swtpm.mk b/package/swtpm/swtpm.mk
> new file mode 100644
> index 0000000000..29c8e37c47
> --- /dev/null
> +++ b/package/swtpm/swtpm.mk
> @@ -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
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-pkgconf
host-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.
> +HOST_SWTPM_CONF_OPTS = --with-openssl --without-seccomp
> +
> +$(eval $(host-autotools-package))
> --
> 2.45.0
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| 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
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Buildroot] [PATCH 1/4] package/quota: Update DEVELOPERS address
2024-05-17 13:20 ` [Buildroot] [PATCH 1/4] package/quota: Update DEVELOPERS address Jarkko Sakkinen
@ 2024-05-17 15:39 ` Yann E. MORIN
2024-06-08 13:38 ` Peter Korsgaard
0 siblings, 1 reply; 11+ messages in thread
From: Yann E. MORIN @ 2024-05-17 15:39 UTC (permalink / raw)
To: Jarkko Sakkinen; +Cc: Stefan Berger, buildroot
Jarkko, All,
On 2024-05-17 16:20 +0300, Jarkko Sakkinen spake thusly:
> Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Applied to master, thanks.
Regards,
Yann E. MORIN.
> ---
> DEVELOPERS | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/DEVELOPERS b/DEVELOPERS
> index a9deddb343..52c9b84a9d 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -1518,7 +1518,7 @@ F: package/zip/
> N: Jared Bents <jared.bents@rockwellcollins.com>
> F: package/libvirt/
>
> -N: Jarkko Sakkinen <jarkko.sakkinen@intel.com>
> +N: Jarkko Sakkinen <jarkko@kernel.org>
> F: package/quota/
>
> N: Jason Pruitt <jrspruitt@gmail.com>
> --
> 2.45.0
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| 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
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Buildroot] [PATCH 2/4] package/json-glib: add host build
2024-05-17 13:39 ` Yann E. MORIN
@ 2024-05-17 16:26 ` Jarkko Sakkinen
0 siblings, 0 replies; 11+ messages in thread
From: Jarkko Sakkinen @ 2024-05-17 16:26 UTC (permalink / raw)
To: Yann E. MORIN; +Cc: Stefan Berger, buildroot
On Fri May 17, 2024 at 4:39 PM EEST, Yann E. MORIN wrote:
> Jarkko, All,
>
> Thanks for these patches; please find comments below.
>
> On 2024-05-17 16:20 +0300, Jarkko Sakkinen spake thusly:
> > Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
> > ---
> > package/json-glib/json-glib.mk | 12 ++++++++++++
> > 1 file changed, 12 insertions(+)
> >
> > diff --git a/package/json-glib/json-glib.mk b/package/json-glib/json-glib.mk
> > index cd53f24cee..ffdc76f2c1 100644
> > --- a/package/json-glib/json-glib.mk
> > +++ b/package/json-glib/json-glib.mk
> > @@ -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
>
> 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.
>
> > +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.
>
> > 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
>
> 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
>
> > JSON_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.
> ;-)
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
> Regards,
> Yann E. MORIN.
BR, Jarkko
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Buildroot] [PATCH 1/4] package/quota: Update DEVELOPERS address
2024-05-17 15:39 ` Yann E. MORIN
@ 2024-06-08 13:38 ` Peter Korsgaard
0 siblings, 0 replies; 11+ messages in thread
From: Peter Korsgaard @ 2024-06-08 13:38 UTC (permalink / raw)
To: Yann E. MORIN; +Cc: Jarkko Sakkinen, buildroot, Stefan Berger
>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:
> Jarkko, All,
> On 2024-05-17 16:20 +0300, Jarkko Sakkinen spake thusly:
>> Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
> Applied to master, thanks.
Committed to 2024.02.x, thanks.
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2024-06-08 13:38 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-17 13:20 [Buildroot] [PATCH 0/4] swtpm and libtpms host packages Jarkko Sakkinen
2024-05-17 13:20 ` [Buildroot] [PATCH 1/4] package/quota: Update DEVELOPERS address Jarkko Sakkinen
2024-05-17 15:39 ` Yann E. MORIN
2024-06-08 13:38 ` Peter Korsgaard
2024-05-17 13:20 ` [Buildroot] [PATCH 2/4] package/json-glib: add host build Jarkko Sakkinen
2024-05-17 13:39 ` Yann E. MORIN
2024-05-17 16:26 ` Jarkko Sakkinen
2024-05-17 13:20 ` [Buildroot] [PATCH 3/4] package/libtpms: add host package Jarkko Sakkinen
2024-05-17 13:44 ` Yann E. MORIN
2024-05-17 13:20 ` [Buildroot] [PATCH 4/4] package/swtpm: " Jarkko Sakkinen
2024-05-17 13:52 ` Yann E. MORIN
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox