diff mbox series

[meta-oe] softhsm: enable objectstore backend

Message ID 20230124131336.3877979-1-jlu@pengutronix.de
State Under Review
Headers show
Series [meta-oe] softhsm: enable objectstore backend | expand

Commit Message

Jan Lübbe Jan. 24, 2023, 1:13 p.m. UTC
We already depend on sqlite, but the objectstore backend using it is not
enabled by default. Add the necessary configure option.

The db backend is more robust when accessing the objectstore from many
parallel processes (such as during kernel module signing).

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
---
 meta-oe/recipes-security/softhsm/softhsm_2.6.1.bb | 1 +
 1 file changed, 1 insertion(+)

Comments

Khem Raj Jan. 25, 2023, 4:56 p.m. UTC | #1
seeing a build failure

https://autobuilder.yoctoproject.org/typhoon/#/builders/88/builds/2389/steps/15/logs/stdio

On Tue, Jan 24, 2023 at 5:13 AM Jan Luebbe <jlu@pengutronix.de> wrote:
>
> We already depend on sqlite, but the objectstore backend using it is not
> enabled by default. Add the necessary configure option.
>
> The db backend is more robust when accessing the objectstore from many
> parallel processes (such as during kernel module signing).
>
> Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
> ---
>  meta-oe/recipes-security/softhsm/softhsm_2.6.1.bb | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/meta-oe/recipes-security/softhsm/softhsm_2.6.1.bb b/meta-oe/recipes-security/softhsm/softhsm_2.6.1.bb
> index d7bcd4f03bb2..1fded8df3dbb 100644
> --- a/meta-oe/recipes-security/softhsm/softhsm_2.6.1.bb
> +++ b/meta-oe/recipes-security/softhsm/softhsm_2.6.1.bb
> @@ -11,6 +11,7 @@ SRC_URI[sha256sum] = "61249473054bcd1811519ef9a989a880a7bdcc36d317c9c25457fc614d
>  inherit autotools pkgconfig siteinfo
>
>  EXTRA_OECONF += " --with-sqlite3=${STAGING_DIR_HOST}/usr"
> +EXTRA_OECONF += " --with-objectstore-backend-db"
>  EXTRA_OECONF += "${@oe.utils.conditional('SITEINFO_BITS', '64', ' --enable-64bit', '', d)}"
>
>  PACKAGECONFIG ?= "ecc eddsa pk11 openssl"
> --
> 2.30.2
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#100721): https://lists.openembedded.org/g/openembedded-devel/message/100721
> Mute This Topic: https://lists.openembedded.org/mt/96496618/1997914
> Group Owner: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Jan Lübbe Jan. 26, 2023, 6:52 a.m. UTC | #2
On Wed, 2023-01-25 at 08:56 -0800, Khem Raj wrote:
> seeing a build failure
> 
> https://autobuilder.yoctoproject.org/typhoon/#/builders/88/builds/2389/steps/15/logs/stdio

It is looking for the sqlite3 binary during configure:
https://github.com/opendnssec/SoftHSMv2/blob/2.6.1/m4/acx_sqlite3.m4#L12
This worked for me, as sqlite3 was leaking in from the host.

It doesn't actually use the binary though, from a quick look at least. What's
the better fix? DEPEND on sqlite3-native or remove the AC_PATH_PROGS check?

Thanks,
Jan

> On Tue, Jan 24, 2023 at 5:13 AM Jan Luebbe <jlu@pengutronix.de> wrote:
> > 
> > We already depend on sqlite, but the objectstore backend using it is not
> > enabled by default. Add the necessary configure option.
> > 
> > The db backend is more robust when accessing the objectstore from many
> > parallel processes (such as during kernel module signing).
> > 
> > Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
> > ---
> >  meta-oe/recipes-security/softhsm/softhsm_2.6.1.bb | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/meta-oe/recipes-security/softhsm/softhsm_2.6.1.bb b/meta-oe/recipes-security/softhsm/softhsm_2.6.1.bb
> > index d7bcd4f03bb2..1fded8df3dbb 100644
> > --- a/meta-oe/recipes-security/softhsm/softhsm_2.6.1.bb
> > +++ b/meta-oe/recipes-security/softhsm/softhsm_2.6.1.bb
> > @@ -11,6 +11,7 @@ SRC_URI[sha256sum] = "61249473054bcd1811519ef9a989a880a7bdcc36d317c9c25457fc614d
> >  inherit autotools pkgconfig siteinfo
> > 
> >  EXTRA_OECONF += " --with-sqlite3=${STAGING_DIR_HOST}/usr"
> > +EXTRA_OECONF += " --with-objectstore-backend-db"
> >  EXTRA_OECONF += "${@oe.utils.conditional('SITEINFO_BITS', '64', ' --enable-64bit', '', d)}"
> > 
> >  PACKAGECONFIG ?= "ecc eddsa pk11 openssl"
> > --
> > 2.30.2
> > 
> > 
> > 
> > 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#100780): https://lists.openembedded.org/g/openembedded-devel/message/100780
> Mute This Topic: https://lists.openembedded.org/mt/96496618/2167243
> Group Owner: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [jlu@pengutronix.de]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Khem Raj Jan. 26, 2023, 7:08 a.m. UTC | #3
On Wed, Jan 25, 2023 at 10:52 PM Jan Lübbe <jlu@pengutronix.de> wrote:
>
> On Wed, 2023-01-25 at 08:56 -0800, Khem Raj wrote:
> > seeing a build failure
> >
> > https://autobuilder.yoctoproject.org/typhoon/#/builders/88/builds/2389/steps/15/logs/stdio
>
> It is looking for the sqlite3 binary during configure:
> https://github.com/opendnssec/SoftHSMv2/blob/2.6.1/m4/acx_sqlite3.m4#L12
> This worked for me, as sqlite3 was leaking in from the host.
>
> It doesn't actually use the binary though, from a quick look at least. What's
> the better fix? DEPEND on sqlite3-native or remove the AC_PATH_PROGS check?

if it does not use it then right fix would be to remove the check as
it is useless.
however if it is needed during builld then perhaps depend on
sqlite3-native since we want
consistent builds.

>
> Thanks,
> Jan
>
> > On Tue, Jan 24, 2023 at 5:13 AM Jan Luebbe <jlu@pengutronix.de> wrote:
> > >
> > > We already depend on sqlite, but the objectstore backend using it is not
> > > enabled by default. Add the necessary configure option.
> > >
> > > The db backend is more robust when accessing the objectstore from many
> > > parallel processes (such as during kernel module signing).
> > >
> > > Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
> > > ---
> > >  meta-oe/recipes-security/softhsm/softhsm_2.6.1.bb | 1 +
> > >  1 file changed, 1 insertion(+)
> > >
> > > diff --git a/meta-oe/recipes-security/softhsm/softhsm_2.6.1.bb b/meta-oe/recipes-security/softhsm/softhsm_2.6.1.bb
> > > index d7bcd4f03bb2..1fded8df3dbb 100644
> > > --- a/meta-oe/recipes-security/softhsm/softhsm_2.6.1.bb
> > > +++ b/meta-oe/recipes-security/softhsm/softhsm_2.6.1.bb
> > > @@ -11,6 +11,7 @@ SRC_URI[sha256sum] = "61249473054bcd1811519ef9a989a880a7bdcc36d317c9c25457fc614d
> > >  inherit autotools pkgconfig siteinfo
> > >
> > >  EXTRA_OECONF += " --with-sqlite3=${STAGING_DIR_HOST}/usr"
> > > +EXTRA_OECONF += " --with-objectstore-backend-db"
> > >  EXTRA_OECONF += "${@oe.utils.conditional('SITEINFO_BITS', '64', ' --enable-64bit', '', d)}"
> > >
> > >  PACKAGECONFIG ?= "ecc eddsa pk11 openssl"
> > > --
> > > 2.30.2
> > >
> > >
> > >
> > >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#100780): https://lists.openembedded.org/g/openembedded-devel/message/100780
> > Mute This Topic: https://lists.openembedded.org/mt/96496618/2167243
> > Group Owner: openembedded-devel+owner@lists.openembedded.org
> > Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [jlu@pengutronix.de]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >
>
> --
> Pengutronix e.K.                           |                             |
> Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
> 31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
diff mbox series

Patch

diff --git a/meta-oe/recipes-security/softhsm/softhsm_2.6.1.bb b/meta-oe/recipes-security/softhsm/softhsm_2.6.1.bb
index d7bcd4f03bb2..1fded8df3dbb 100644
--- a/meta-oe/recipes-security/softhsm/softhsm_2.6.1.bb
+++ b/meta-oe/recipes-security/softhsm/softhsm_2.6.1.bb
@@ -11,6 +11,7 @@  SRC_URI[sha256sum] = "61249473054bcd1811519ef9a989a880a7bdcc36d317c9c25457fc614d
 inherit autotools pkgconfig siteinfo
 
 EXTRA_OECONF += " --with-sqlite3=${STAGING_DIR_HOST}/usr"
+EXTRA_OECONF += " --with-objectstore-backend-db"
 EXTRA_OECONF += "${@oe.utils.conditional('SITEINFO_BITS', '64', ' --enable-64bit', '', d)}"
 
 PACKAGECONFIG ?= "ecc eddsa pk11 openssl"