app-crypt/tpm2-tss: add 3.2.1

Signed-off-by: Christopher Byrne <salah.coronya@gmail.com>
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Christopher Byrne
2022-12-21 23:35:41 +00:00
committed by Sam James
parent 7a09f02ad2
commit 3bdbc2eaa6
3 changed files with 152 additions and 0 deletions
+1
View File
@@ -1 +1,2 @@
DIST tpm2-tss-3.2.0.tar.gz 1629211 BLAKE2B a89aa4d89a50bdfb5a9652874d30e2138747bd022049f2be2d0b56e296329d0c41254033ec3a062dbd64fde54a62e952f54446c551e5788231827cd53fae045a SHA512 cabb411f074dfa94919ba914849aac77a0ac2f50622e28a1406cf575369148774748e0e2b7a7c566ec83561a96d4b883bac5a3b1763f4cf48668a0c5d68c0a23
DIST tpm2-tss-3.2.1.tar.gz 1638566 BLAKE2B bdf5eeca1e7269a639cefd8b4a38e16c5b7c08518411a22718dcd14bc9fe3b621eee77cdd98f9ece0f6d9a52319bce5e0a502ff9a6e4ba6716341bd01f5967a9 SHA512 dbe5e29349d78621fcd608d9c75fa58f5e6462264b9654ca85af9f9faafebe1107d9f735a1b6ad4956a089b0dd96cbda3f46364cabd846f9fb29a419b074c78f
@@ -0,0 +1,61 @@
diff --git a/Makefile.am b/Makefile.am
index 6242b19c..b30ec6e0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -492,7 +492,6 @@ fapi-config.json: dist/fapi-config.json.in
-e 's|[@]userstatedir@|$(userstatedir)|g' \
< "$<" > "$@"
-sysusers_DATA = dist/sysusers.d/tpm2-tss.conf
tmpfiles_DATA = tpm2-tss-fapi.conf
CLEANFILES += tpm2-tss-fapi.conf
@@ -516,7 +515,6 @@ EXTRA_DIST += \
dist/fapi-config.json.in \
dist/fapi-profiles/P_RSA2048SHA256.json \
dist/fapi-profiles/P_ECCP256SHA256.json \
- dist/sysusers.d/tpm2-tss.conf \
dist/tmpfiles.d/tpm2-tss-fapi.conf.in \
doc/fapi-config.md \
doc/fapi-profile.md \
@@ -726,13 +724,6 @@ EXTRA_DIST += dist/tpm-udev.rules
install-dirs:
if HOSTOS_LINUX
-if SYSD_SYSUSERS
- @echo "systemd-sysusers $(DESTDIR)$(sysconfdir)/sysusers.d/tpm2-tss.conf"
- @systemd-sysusers $(DESTDIR)$(sysconfdir)/sysusers.d/tpm2-tss.conf || echo "WARNING Failed to create the tss user and group"
-else
- @echo "call make_tss_user_and_group"
- @$(call make_tss_user_and_group) || echo "WARNING Failed to create the tss user and group"
-endif
if SYSD_TMPFILES
@echo "systemd-tmpfiles --create $(DESTDIR)$(sysconfdir)/tmpfiles.d/tpm2-tss-fapi.conf"
@systemd-tmpfiles --create $(DESTDIR)$(sysconfdir)/tmpfiles.d/tpm2-tss-fapi.conf|| echo "WARNING Failed to create the FAPI directories with the correct permissions"
diff --git a/configure.ac b/configure.ac
index 83554edd..c9599b93 100644
--- a/configure.ac
+++ b/configure.ac
@@ -483,22 +483,9 @@ AS_IF([test "x$enable_integration" = "xyes" && test "x$enable_self_generated_cer
[AC_MSG_WARN([Running integration tests without EK certificate verification, use --enable-self-generated-certificate for full test coverage])])
# Check for systemd helper tools used by make install
-AC_CHECK_PROG(systemd_sysusers, systemd-sysusers, yes)
-AM_CONDITIONAL(SYSD_SYSUSERS, test "x$systemd_sysusers" = "xyes")
AC_CHECK_PROG(systemd_tmpfiles, systemd-tmpfiles, yes)
AM_CONDITIONAL(SYSD_TMPFILES, test "x$systemd_tmpfiles" = "xyes")
-# Check all tools used by make install
-AS_IF([test "$HOSTOS" = "Linux"],
- [ AC_CHECK_PROG(useradd, useradd, yes)
- AC_CHECK_PROG(groupadd, groupadd, yes)
- AC_CHECK_PROG(adduser, adduser, yes)
- AC_CHECK_PROG(addgroup, addgroup, yes)
- AS_IF([test "x$addgroup" != "xyes" && test "x$groupadd" != "xyes" ],
- [AC_MSG_ERROR([addgroup or groupadd are needed.])])
- AS_IF([test "x$adduser" != "xyes" && test "x$useradd" != "xyes" ],
- [AC_MSG_ERROR([adduser or useradd are needed.])])])
-
AC_SUBST([PATH])
dnl --------- Doxy Gen -----------------------
+90
View File
@@ -0,0 +1,90 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit autotools flag-o-matic linux-info multilib-minimal tmpfiles udev
DESCRIPTION="TCG Trusted Platform Module 2.0 Software Stack"
HOMEPAGE="https://github.com/tpm2-software/tpm2-tss"
SRC_URI="https://github.com/tpm2-software/${PN}/releases/download/${PV}/${P}.tar.gz"
LICENSE="BSD-2"
SLOT="0/3"
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86"
IUSE="doc +fapi +openssl mbedtls static-libs test"
RESTRICT="!test? ( test )"
REQUIRED_USE="^^ ( mbedtls openssl )
fapi? ( openssl !mbedtls )"
RDEPEND="acct-group/tss
acct-user/tss
fapi? ( dev-libs/json-c:=[${MULTILIB_USEDEP}]
>=net-misc/curl-7.80.0[${MULTILIB_USEDEP}] )
mbedtls? ( net-libs/mbedtls:=[${MULTILIB_USEDEP}] )
openssl? ( dev-libs/openssl:=[${MULTILIB_USEDEP}] )"
DEPEND="${RDEPEND}
test? ( app-crypt/swtpm
dev-libs/uthash
dev-util/cmocka
fapi? ( >=net-misc/curl-7.80.0 ) )"
BDEPEND="sys-apps/acl
virtual/pkgconfig
doc? ( app-doc/doxygen )"
PATCHES=(
"${FILESDIR}/${PN}-3.2.1-Dont-run-systemd-sysusers-in-Makefile.patch"
)
pkg_setup() {
local CONFIG_CHECK=" \
~TCG_TPM
"
linux-info_pkg_setup
kernel_is ge 4 12 0 || ewarn "At least kernel 4.12.0 is required"
}
src_prepare() {
eautoreconf
default
}
multilib_src_configure() {
# tests fail with LTO enabbled. See bug 865275 and 865279
filter-lto
ECONF_SOURCE=${S} econf \
--localstatedir=/var \
$(multilib_native_use_enable doc doxygen-doc) \
$(use_enable fapi) \
$(use_enable static-libs static) \
$(multilib_native_use_enable test unit) \
$(multilib_native_use_enable test integration) \
$(multilib_native_use_enable test self-generated-certificate) \
--disable-tcti-libtpms \
--disable-defaultflags \
--disable-weakcrypto \
--with-crypto="$(usex mbedtls mbed ossl)" \
--with-runstatedir=/run \
--with-udevrulesdir="$(get_udevdir)/rules.d" \
--with-udevrulesprefix=60- \
--with-sysusersdir="/usr/lib/sysusers.d" \
--with-tmpfilesdir="/usr/lib/tmpfiles.d"
}
multilib_src_install() {
default
find "${D}" -name '*.la' -delete || die
}
pkg_postinst() {
tmpfiles_process tpm2-tss-fapi.conf
udev_reload
}
pkg_postrm() {
udev_reload
}