827bd376e3
tpm2-tss is looking for systemd_sysusers and systemd_tmpfiles, but those two are not mandatory. However, it might find those from the host. But that is not an issue in the end, because they are only used to instanciate the users and create the tmpfiles. At build time on the host, we do not need them, and on the target, if systemd is being used, then they will be instanciated/created at boot. If they are not found, then the fallback paths are taken, and those fallback paths are those using the setfacl and groupadd and useradd tools, which we already know are going to fail but that we do not care. So, we can safely force those two to =no to avoid the install trying to use the system-wide tools, or even the ones we build as part of host-systemd ourselves. Eventually, when systemd-tmpfiles of systemd-sysusers are missing, the fallback paths use useradd, and configure unconditionally checks for it, so as for groupadd and setfacl in commitsd9123dd799
(package/tpm2-tss: fix build on host without setfacl) andc8f847c4f4
(package/tpm2-tss: fix build on host without groupadd), we just fake the detection of groupadd. Fixes: - http://autobuild.buildroot.org/results//97bfa8f7dcb12e36bd63c9d06fb39418070d840b Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
45 lines
1.5 KiB
Makefile
45 lines
1.5 KiB
Makefile
################################################################################
|
|
#
|
|
# tpm2-tss
|
|
#
|
|
################################################################################
|
|
|
|
TPM2_TSS_VERSION = 3.1.0
|
|
TPM2_TSS_SITE = https://github.com/tpm2-software/tpm2-tss/releases/download/$(TPM2_TSS_VERSION)
|
|
TPM2_TSS_LICENSE = BSD-2-Clause
|
|
TPM2_TSS_LICENSE_FILES = LICENSE
|
|
TPM2_TSS_CPE_ID_VENDOR = tpm2_software_stack_project
|
|
TPM2_TSS_CPE_ID_PRODUCT = tpm2_software_stack
|
|
TPM2_TSS_INSTALL_STAGING = YES
|
|
TPM2_TSS_DEPENDENCIES = liburiparser openssl host-pkgconf
|
|
|
|
# 0001-configure-Only-use-CXX-when-fuzzing.patch
|
|
TPM2_TSS_AUTORECONF = YES
|
|
|
|
# systemd-sysusers and systemd-tmpfiles are only used at install time
|
|
# to trigger the creation of users adn tmpfiles, which we do not care
|
|
# about at build time. groupadd, useradd, and setfacl are used in the
|
|
# fallback path when systemd-sysusers or systemd-tmpfiles are missing
|
|
# and their failure is ignored anyway.
|
|
TPM2_TSS_CONF_OPTS = \
|
|
ac_cv_prog_result_groupadd=yes \
|
|
ac_cv_prog_result_setfacl=yes \
|
|
ac_cv_prog_systemd_sysusers=no \
|
|
ac_cv_prog_systemd_tmpfiles=no \
|
|
ac_cv_prog_result_useradd=yes \
|
|
--with-crypto=ossl \
|
|
--disable-doxygen-doc \
|
|
--disable-defaultflags
|
|
|
|
# uses C99 code but forgets to pass -std=c99 when --disable-defaultflags is used
|
|
TPM2_TSS_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -std=c99"
|
|
|
|
ifeq ($(BR2_PACKAGE_TPM2_TSS_FAPI),y)
|
|
TPM2_TSS_DEPENDENCIES += json-c libcurl
|
|
TPM2_TSS_CONF_OPTS += --enable-fapi
|
|
else
|
|
TPM2_TSS_CONF_OPTS += --disable-fapi
|
|
endif
|
|
|
|
$(eval $(autotools-package))
|