Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Jarkko Sakkinen" <jarkko@kernel.org>
To: "Stefan Berger" <stefanb@linux.ibm.com>, <buildroot@buildroot.org>
Subject: Re: [Buildroot] [PATCH RFC 2/2] package/swtpm: add host package
Date: Fri, 22 Mar 2024 17:11:25 +0200	[thread overview]
Message-ID: <D00DINCDWI2B.1N6Q54IC0C3WQ@kernel.org> (raw)
In-Reply-To: <72dda3ce-5cf6-4830-9f18-30a64a01af15@linux.ibm.com>

On Fri Mar 22, 2024 at 4:04 PM EET, Stefan Berger wrote:
>
>
> On 3/22/24 05:00, Jarkko Sakkinen wrote:
> > On Fri Mar 22, 2024 at 10:35 AM EET, Jarkko Sakkinen wrote:
> >> On Fri, 2024-03-22 at 10:22 +0200, Jarkko Sakkinen wrote:
> >>> On Thu, 2024-03-21 at 16:30 -0400, Stefan Berger wrote:
> >>>>
> >>>>
> >>>> On 3/21/24 14:21, Jarkko Sakkinen wrote:
> >>>>> Add swtpm and its dependency libtpms to host packages. These are
> >>>>> useful
> >>>>> for emulating TPM in QEMU environment.
> >>>>>
> >>>>> Link: https://gitlab.com/jarkkojs/linux-tpmdd-test
> >>>>> Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
> >>>>> ---
> >>>>
> >>>>> +---
> >>>>> + configure.ac | 16 ++++++++--------
> >>>>> + 1 file changed, 8 insertions(+), 8 deletions(-)
> >>>>> +
> >>>>> +diff --git a/configure.ac b/configure.ac
> >>>>> +index 49caf96..4acc763 100644
> >>>>> +--- a/configure.ac
> >>>>> ++++ b/configure.ac
> >>>>> +@@ -394,20 +394,20 @@ AS_IF([test "x$enable_default_pcr_banks"
> >>>>> !=
> >>>>> "x"],[
> >>>>> + pcr_bank_checks
> >>>>> + AC_SUBST([DEFAULT_PCR_BANKS])
> >>>>> +
> >>>>> +-AC_PATH_PROG([EXPECT], expect)
> >>>>> +-if test "x$EXPECT" = "x"; then
> >>>>> +-	AC_MSG_ERROR([expect is required: expect package])
> >>>>> +-fi
> >>>>> ++# AC_PATH_PROG([EXPECT], expect)
> >>>>> ++# if test "x$EXPECT" = "x"; then
> >>>>> ++# 	AC_MSG_ERROR([expect is required: expect package])
> >>>>> ++# fi
> >>>>> +
> >>>>> + AC_PATH_PROG([GAWK], gawk)
> >>>>> + if test "x$GAWK" = "x"; then
> >>>>> + 	AC_MSG_ERROR([gawk is required: gawk package])
> >>>>> + fi
> >>>>> +
> >>>>> +-AC_PATH_PROG([SOCAT], socat)
> >>>>> +-if test "x$SOCAT" = "x"; then
> >>>>> +-	AC_MSG_ERROR([socat is required: socat package])
> >>>>> +-fi
> >>>>> ++# AC_PATH_PROG([SOCAT], socat)
> >>>>> ++# if test "x$SOCAT" = "x"; then
> >>>>> ++# 	AC_MSG_ERROR([socat is required: socat package])
> >>>>> ++# fi
> >>>>
> >>>>
> >>>> cat and expect are used for running the test cases. When not
> >>>> running
> >>>> the tests then an alternative to commenting the above out may be to
> >>>> do
> >>>> the following before running autogen.sh:
> >>>>
> >>>> tmpdir=$(mktemp -d) || exit 1
> >>>> cp /usr/bin/true "${tmpdir}/socat"
> >>>> cp /usr/bin/true "${tmpdir}/expect"
> >>>>
> >>>> PATH=$PATH:${tmpdir}
> >>>> ./autogen --prefix=...
> >>>> rm -rf "${tmpdir}"
> >>>>
> >>>>       Stefan
> >>>
> >>> ... which would be more tedious than simply commenting them out
> >>> because then you would have to tweak the build itself with manual
> >>> steps instead of using autotools build command.
> >>>
> >>> Up until this is fixed in the upstream project, we are better off
> >>> simply commenting them out, as they are test dependency, not a build
> >>> dependency for building e.g. initramfs image or some other type of
> >>> OS image.
> >>
> >> And there's a lot of shenanigans related to the cross-compilation
> >> environment, which render out the suggestion anyway in that form.
> >>
> >> It's a bug because neither socat nor expect are actua build
> >> dependencies, and the patch works around the bug.
> > 
> > I put out an issue:
> > 
> > https://github.com/stefanberger/swtpm/issues/843
> This PR should help resolve the issue:
>
> https://github.com/stefanberger/swtpm/pull/844

It does thanks!

As commented to the PR I was successfully able to run full TPM2
kselftest:

https://gitlab.com/jarkkojs/linux-tpmdd-test/-/commits/swtpm-fix

Possible to tag a version with the fix? Alternatively I can export
your patch from your tree and include it to the next revision of
this patch set.

BR, Jarkko
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  parent reply	other threads:[~2024-03-22 15:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-21 18:21 [Buildroot] [PATCH RFC 0/2] Add swtpm to host packages Jarkko Sakkinen
2024-03-21 18:21 ` [Buildroot] [PATCH RFC 1/2] package/json-glib: add host build Jarkko Sakkinen
2024-03-21 18:21 ` [Buildroot] [PATCH RFC 2/2] package/swtpm: add host package Jarkko Sakkinen
     [not found]   ` <be88778f-53fc-493b-829a-2434ea0782ef@linux.ibm.com>
2024-03-22  8:22     ` Jarkko Sakkinen
2024-03-22  8:35       ` Jarkko Sakkinen
2024-03-22  9:00         ` Jarkko Sakkinen
     [not found]           ` <72dda3ce-5cf6-4830-9f18-30a64a01af15@linux.ibm.com>
2024-03-22 15:11             ` Jarkko Sakkinen [this message]
     [not found]               ` <267dc37d-86aa-407f-96e0-5be4d2464b13@linux.ibm.com>
2024-03-22 16:46                 ` Jarkko Sakkinen
     [not found]                   ` <baa6bac2-394c-4dee-ac2b-65c3aebddd20@linux.ibm.com>
2024-03-23 19:01                     ` Jarkko Sakkinen
2024-03-22 20:47   ` Arnout Vandecappelle via buildroot
2024-03-23 18:52     ` Jarkko Sakkinen
2024-03-26 15:08     ` Peter Korsgaard
2024-03-26 17:06       ` Jarkko Sakkinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D00DINCDWI2B.1N6Q54IC0C3WQ@kernel.org \
    --to=jarkko@kernel.org \
    --cc=buildroot@buildroot.org \
    --cc=stefanb@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox