diff mbox series

[meta-security] meta-security: Add recipe for libhoth

Message ID 20220721223854.2093685-1-jebr@google.com
State Accepted
Delegated to: Armin Kuster
Headers show
Series [meta-security] meta-security: Add recipe for libhoth | expand

Commit Message

John Broadbent July 21, 2022, 10:38 p.m. UTC
From: John Edward Broadbent <jebr@google.com>

Libhoth is usb protocol implementation which is required for hoth class
devices

Signed-off-by: John Edward Broadbent <jebr@google.com>
---
 meta-tpm/recipes-tpm/hoth/libhoth_git.bb | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 meta-tpm/recipes-tpm/hoth/libhoth_git.bb

Comments

Khem Raj July 21, 2022, 10:45 p.m. UTC | #1
On Thu, Jul 21, 2022 at 6:39 PM jebr via lists.yoctoproject.org
<jebr=google.com@lists.yoctoproject.org> wrote:
>
> From: John Edward Broadbent <jebr@google.com>
>
> Libhoth is usb protocol implementation which is required for hoth class
> devices
>
> Signed-off-by: John Edward Broadbent <jebr@google.com>
> ---
>  meta-tpm/recipes-tpm/hoth/libhoth_git.bb | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
>  create mode 100644 meta-tpm/recipes-tpm/hoth/libhoth_git.bb
>
> diff --git a/meta-tpm/recipes-tpm/hoth/libhoth_git.bb b/meta-tpm/recipes-tpm/hoth/libhoth_git.bb
> new file mode 100644
> index 0000000..59f52ad
> --- /dev/null
> +++ b/meta-tpm/recipes-tpm/hoth/libhoth_git.bb
> @@ -0,0 +1,17 @@
> +SUMMARY = "Google Hoth USB library"
> +DESCRIPTION = "Libraries and example programs for interacting with a \
> +               hoth-class root of trust."
> +HOME_PAGE = https://github.com/google/libhoth
> +
> +LICENSE = "Apache-2.0"
> +LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
> +
> +SRC_URI = "git://github.com/google/libhoth;protocol=https;branch=main"
> +SRCREV = "b31307b7bf525efda0164e461fb1e0a5c302d306"
> +
> +DEPENDS += "libusb1"
> +
> +S = "${WORKDIR}/git"
> +
> +inherit pkgconfig meson

Dont we want to package the examples too ? perhaps in a ${PN}-examples
or something ?

> +
> --
> 2.37.1.359.gd136c6c3e2-goog
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> You automatically follow any topics you start or reply to.
> View/Reply Online (#57610): https://lists.yoctoproject.org/g/yocto/message/57610
> Mute This Topic: https://lists.yoctoproject.org/mt/92537492/1997914
> Group Owner: yocto+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
John Broadbent July 21, 2022, 11:11 p.m. UTC | #2
The examples are not separately buildable, and not installed. So there
is currently no way to make a sperate ${PN}-examples.
We don't need the examples now, but we are interested to know what you think.

Thanks for the speedy review.
Joh Broadbent


On Thu, Jul 21, 2022 at 3:46 PM Khem Raj <raj.khem@gmail.com> wrote:
>
> On Thu, Jul 21, 2022 at 6:39 PM jebr via lists.yoctoproject.org
> <jebr=google.com@lists.yoctoproject.org> wrote:
> >
> > From: John Edward Broadbent <jebr@google.com>
> >
> > Libhoth is usb protocol implementation which is required for hoth class
> > devices
> >
> > Signed-off-by: John Edward Broadbent <jebr@google.com>
> > ---
> >  meta-tpm/recipes-tpm/hoth/libhoth_git.bb | 17 +++++++++++++++++
> >  1 file changed, 17 insertions(+)
> >  create mode 100644 meta-tpm/recipes-tpm/hoth/libhoth_git.bb
> >
> > diff --git a/meta-tpm/recipes-tpm/hoth/libhoth_git.bb b/meta-tpm/recipes-tpm/hoth/libhoth_git.bb
> > new file mode 100644
> > index 0000000..59f52ad
> > --- /dev/null
> > +++ b/meta-tpm/recipes-tpm/hoth/libhoth_git.bb
> > @@ -0,0 +1,17 @@
> > +SUMMARY = "Google Hoth USB library"
> > +DESCRIPTION = "Libraries and example programs for interacting with a \
> > +               hoth-class root of trust."
> > +HOME_PAGE = https://github.com/google/libhoth
> > +
> > +LICENSE = "Apache-2.0"
> > +LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
> > +
> > +SRC_URI = "git://github.com/google/libhoth;protocol=https;branch=main"
> > +SRCREV = "b31307b7bf525efda0164e461fb1e0a5c302d306"
> > +
> > +DEPENDS += "libusb1"
> > +
> > +S = "${WORKDIR}/git"
> > +
> > +inherit pkgconfig meson
>
> Dont we want to package the examples too ? perhaps in a ${PN}-examples
> or something ?
>
> > +
> > --
> > 2.37.1.359.gd136c6c3e2-goog
> >
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > You automatically follow any topics you start or reply to.
> > View/Reply Online (#57610): https://lists.yoctoproject.org/g/yocto/message/57610
> > Mute This Topic: https://lists.yoctoproject.org/mt/92537492/1997914
> > Group Owner: yocto+owner@lists.yoctoproject.org
> > Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [raj.khem@gmail.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >
Khem Raj July 21, 2022, 11:27 p.m. UTC | #3
On Thu, Jul 21, 2022 at 7:11 PM John Broadbent <jebr@google.com> wrote:
>
> The examples are not separately buildable, and not installed. So there
> is currently no way to make a sperate ${PN}-examples.
> We don't need the examples now, but we are interested to know what you think.
>

I see, that should be ok. I do see a few issues with the patch see below.

> Thanks for the speedy review.
> Joh Broadbent
>
>
> On Thu, Jul 21, 2022 at 3:46 PM Khem Raj <raj.khem@gmail.com> wrote:
> >
> > On Thu, Jul 21, 2022 at 6:39 PM jebr via lists.yoctoproject.org
> > <jebr=google.com@lists.yoctoproject.org> wrote:
> > >
> > > From: John Edward Broadbent <jebr@google.com>
> > >
> > > Libhoth is usb protocol implementation which is required for hoth class
> > > devices
> > >
> > > Signed-off-by: John Edward Broadbent <jebr@google.com>
> > > ---
> > >  meta-tpm/recipes-tpm/hoth/libhoth_git.bb | 17 +++++++++++++++++
> > >  1 file changed, 17 insertions(+)
> > >  create mode 100644 meta-tpm/recipes-tpm/hoth/libhoth_git.bb
> > >
> > > diff --git a/meta-tpm/recipes-tpm/hoth/libhoth_git.bb b/meta-tpm/recipes-tpm/hoth/libhoth_git.bb
> > > new file mode 100644
> > > index 0000000..59f52ad
> > > --- /dev/null
> > > +++ b/meta-tpm/recipes-tpm/hoth/libhoth_git.bb
> > > @@ -0,0 +1,17 @@
> > > +SUMMARY = "Google Hoth USB library"
> > > +DESCRIPTION = "Libraries and example programs for interacting with a \
> > > +               hoth-class root of trust."
> > > +HOME_PAGE = https://github.com/google/libhoth

This should be

HOMEPAGE = "https://github.com/google/libhoth"

> > > +
> > > +LICENSE = "Apache-2.0"
> > > +LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
> > > +
> > > +SRC_URI = "git://github.com/google/libhoth;protocol=https;branch=main"
> > > +SRCREV = "b31307b7bf525efda0164e461fb1e0a5c302d306"

This revision does not build with musl/clang atleast since there is a
shadowing of a macro going on. You need to avoid that
I cooked a quick patch here

http://sprunge.us/LT8yuB

You might want to take a look.

> > > +
> > > +DEPENDS += "libusb1"
> > > +
> > > +S = "${WORKDIR}/git"
> > > +
> > > +inherit pkgconfig meson
> >
> > Dont we want to package the examples too ? perhaps in a ${PN}-examples
> > or something ?
> >
> > > +
> > > --
> > > 2.37.1.359.gd136c6c3e2-goog
> > >
> > >
> > > -=-=-=-=-=-=-=-=-=-=-=-
> > > Links: You receive all messages sent to this group.
> > > You automatically follow any topics you start or reply to.
> > > View/Reply Online (#57610): https://lists.yoctoproject.org/g/yocto/message/57610
> > > Mute This Topic: https://lists.yoctoproject.org/mt/92537492/1997914
> > > Group Owner: yocto+owner@lists.yoctoproject.org
> > > Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [raj.khem@gmail.com]
> > > -=-=-=-=-=-=-=-=-=-=-=-
> > >
diff mbox series

Patch

diff --git a/meta-tpm/recipes-tpm/hoth/libhoth_git.bb b/meta-tpm/recipes-tpm/hoth/libhoth_git.bb
new file mode 100644
index 0000000..59f52ad
--- /dev/null
+++ b/meta-tpm/recipes-tpm/hoth/libhoth_git.bb
@@ -0,0 +1,17 @@ 
+SUMMARY = "Google Hoth USB library"
+DESCRIPTION = "Libraries and example programs for interacting with a \
+               hoth-class root of trust."
+HOME_PAGE = https://github.com/google/libhoth
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
+
+SRC_URI = "git://github.com/google/libhoth;protocol=https;branch=main"
+SRCREV = "b31307b7bf525efda0164e461fb1e0a5c302d306"
+
+DEPENDS += "libusb1"
+
+S = "${WORKDIR}/git"
+
+inherit pkgconfig meson
+