[Buildroot] [PATCH 1/1] package/tpm2-tss: needs host-acl

Fabrice Fontaine fontaine.fabrice at gmail.com
Tue Oct 19 21:28:23 UTC 2021


Le lun. 18 oct. 2021 à 22:35, Thomas Petazzoni
<thomas.petazzoni at bootlin.com> a écrit :
>
> On Wed, 13 Oct 2021 08:54:46 +0200
> Fabrice Fontaine <fontaine.fabrice at gmail.com> wrote:
>
> > Add host-acl mandatory dependency for setfacl to avoid the following
> > build failure since bump to version 3.1.0 in commit
> > 470e2e9bc5211184431fbc868359a9d695e624f4 and
> > https://github.com/tpm2-software/tpm2-tss/commit/9d42f4dbde6a94724e95d57c333cda7711dda57c:
>
> So this commit adds:
>
> # Check all tools used by make install
> AS_IF([test "$HOSTOS" = "Linux"],
>       [ERROR_IF_NO_PROG([groupadd])
>        ERROR_IF_NO_PROG([useradd])
>        ERROR_IF_NO_PROG([id])
>        ERROR_IF_NO_PROG([chown])
>        ERROR_IF_NO_PROG([chmod])
>        ERROR_IF_NO_PROG([mkdir])
>        ERROR_IF_NO_PROG([setfacl])])
>
> But in the context of Buildroot, using groupadd, useradd, chown, chmod,
> setfacl at install time cannot work, since we're not doing "make
> install" as root.
>
> So are we sure that adding host-acl as a dependency to get a host
> variant of setfacl is really the good solution?
>
> How is it handled for groupadd/useradd/chown/chmod today ?
groupadd/useradd/chown/chmod are called since version 3.0.0 and
https://github.com/tpm2-software/tpm2-tss/commit/d01c24e6cb095e18c5e29af4a3018010b3230a6d

setfacl is called since version 3.0.0 and
https://github.com/tpm2-software/tpm2-tss/commit/811e451c94254496338d36783cda44a7729b085a

But more importantly, all those functions are not even used on a
target without systemd and a host with
systemd-{sysusers,tmpfiles} because tpm2-tss try to install files in
$(TARGET_DIR)/etc/{sysusers,tmpfiles}.d which don't even exist if
BR2_INIT_SYSTEMD is not set.
Even if BR2_INIT_SYSTEMD is set, the path is wrong as it should be
installed in $(TARGET_DIR)/usr/lib/{sysusers,tmpfiles}.d

To conclude, I would say that install of tpm2-tss is partially broken
since at least bump to version 3.0.0 in commit
89f3d90e24bb24b70fc4a37bf8cff6186672475c.
>
> Thomas
> --
> Thomas Petazzoni, co-owner and CEO, Bootlin
> Embedded Linux and Kernel engineering and training
> https://bootlin.com
Best Regards,

Fabrice


More information about the buildroot mailing list