Go to file
Yann E. MORIN d9123dd799 package/tpm2-tss: fix build on host without setfacl
Fixes:
http://autobuild.buildroot.org/results/eab44622f8d8ff4fbf464b5a98856382f019c2cb/

Since the bump to 3.1.0 in commit 470e2e9bc5 (package/tpm2-tss: bump
version to 3.1.0), the install is borked because it is looking for
programs at configure time, so it finds those on the host if they exist,
or do not find any at all, which can very well differ from what will be
present on the target.

But this is not totally unreasonable: there is no way, at cross-configure
time, for a package to find the tools that will be present at runtime.

All that can be done in such a case is to force the path to such tools.

However, in this case, tpm2-tss only uses setfacl if systemd-tmpfiles is
not available. If the call to setfacl fails, the install does not fail
(split on two lines for readability):

    @-$(call make_fapi_dirs) && $(call set_fapi_permissions) \
    || echo "WARNING Failed to create the FAPI directories with the correct permissions"

set_fapi_permissions is a macro that eventually expands to:

    (chown -R tss:tss "$1") && \
    (chmod -R 2775 "$1") && \
    (setfacl -m default:group:tss:rwx "$1")

So the call to setfacl will not even be ever attempted, because the
chown will fail first. Furthermore, it would look for the 'tss' username
and groupname from the host, which could differ from those on the
target.

So we can just fake the fact that setfacl is available.

As for the permissions, they are to be set on a directory that is in
${runstatedir}, i.e. /run, which is a tmpfs, so there is no way we can
prepare them at build time. We'd need a startup script or systemd unit,
or proper systemd-tmpfiles support, either of which can be done in a
followup patch by an interested party...

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Yair Ben-Avraham <yairba@protonmail.com>
Cc: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2021-11-07 09:42:36 +01:00
arch arch/config: Make RISC-V 64-bits MMU optional 2021-10-27 14:39:01 +02:00
board configs/qemu: update defconfigs to Linux 5.15 2021-11-06 11:52:01 +01:00
boot boot/optee-os: bump to version 3.15.0 2021-10-27 22:28:03 +02:00
configs configs/qemu: update defconfigs to Linux 5.15 2021-11-06 11:52:01 +01:00
docs docs/manual/contribute.txt: rewrite the section dedicated to runtime tests 2021-10-27 21:44:51 +02:00
fs fs/ext2: fir (again) namespace for variables 2021-10-13 18:01:34 +02:00
linux {linux, linux-headers}: bump 4.{4, 9, 14, 19}.x / 5.{4, 10, 14}.x series 2021-11-03 22:56:44 +01:00
package package/tpm2-tss: fix build on host without setfacl 2021-11-07 09:42:36 +01:00
support support/testing: test_jffs2.py: update logical eraseblock size for qemu >= 2.9 2021-11-05 22:30:36 +01:00
system system: support br2-external init systems 2020-10-14 22:48:42 +02:00
toolchain {linux, linux-headers}: add version 5.15 2021-11-03 22:12:36 +01:00
utils utils/getdeveloperlib.py: call Developer.hasfile() with relative path 2021-11-02 23:20:11 +01:00
.defconfig arch: remove support for sh64 2016-09-08 22:15:15 +02:00
.flake8 Revert ".flake8: fix check for 80/132 columns" 2021-01-02 17:38:20 +01:00
.gitignore update gitignore 2013-05-04 12:41:55 +02:00
.gitlab-ci.yml .gitlab-ci.yml: use the Docker image from gitlab registry 2021-10-24 16:12:43 +02:00
CHANGES CHANGES: expand for 2021.11-rc1 2021-11-06 11:19:53 +01:00
Config.in Config.in: disable Fortify Source for microblaze 2021-08-23 23:08:05 +02:00
Config.in.legacy package/openjdk{-bin}: bump version to 17.0.1+12 2021-11-05 15:48:11 +01:00
COPYING COPYING: add exception about patch licensing 2016-02-26 19:50:13 +01:00
DEVELOPERS package/libteam: new package 2021-11-05 21:59:05 +01:00
Makefile Revert "make: support: use command -v' instead of which'" 2021-10-01 20:09:58 +02:00
Makefile.legacy Remove BR2_DEPRECATED 2016-10-15 23:14:45 +02:00
README docs: move the IRC channel away from Freenode 2021-05-29 22:16:23 +02:00

Buildroot is a simple, efficient and easy-to-use tool to generate embedded
Linux systems through cross-compilation.

The documentation can be found in docs/manual. You can generate a text
document with 'make manual-text' and read output/docs/manual/manual.text.
Online documentation can be found at http://buildroot.org/docs.html

To build and use the buildroot stuff, do the following:

1) run 'make menuconfig'
2) select the target architecture and the packages you wish to compile
3) run 'make'
4) wait while it compiles
5) find the kernel, bootloader, root filesystem, etc. in output/images

You do not need to be root to build or run buildroot.  Have fun!

Buildroot comes with a basic configuration for a number of boards. Run
'make list-defconfigs' to view the list of provided configurations.

Please feed suggestions, bug reports, insults, and bribes back to the
buildroot mailing list: buildroot@buildroot.org
You can also find us on #buildroot on OFTC IRC.

If you would like to contribute patches, please read
https://buildroot.org/manual.html#submitting-patches