diff options
author | Salah Coronya <salah.coronya@gmail.com> | 2020-05-24 14:56:08 -0500 |
---|---|---|
committer | Joonas Niilola <juippis@gentoo.org> | 2020-06-17 20:00:24 +0300 |
commit | 2139c6d267a9e66da3fb7e477cb3233094a65475 (patch) | |
tree | 399f64bb3a8ad720454bc41fd3e64f84d0b922aa /app-crypt/tpm2-tss | |
parent | media-gfx/img2pdf: version bump to 0.3.6 (diff) | |
download | gentoo-2139c6d267a9e66da3fb7e477cb3233094a65475.tar.gz gentoo-2139c6d267a9e66da3fb7e477cb3233094a65475.tar.bz2 gentoo-2139c6d267a9e66da3fb7e477cb3233094a65475.zip |
app-crypt/tpm2-tss: Bump to version 2.4.1
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Salah Coronya <salah.coronya@gmail.com>
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'app-crypt/tpm2-tss')
4 files changed, 145 insertions, 0 deletions
diff --git a/app-crypt/tpm2-tss/Manifest b/app-crypt/tpm2-tss/Manifest index e25f40f7a50d..f810a2ffc5bc 100644 --- a/app-crypt/tpm2-tss/Manifest +++ b/app-crypt/tpm2-tss/Manifest @@ -1 +1,2 @@ DIST tpm2-tss-2.4.0.tar.gz 1446509 BLAKE2B bb078719fa85d9ea07b9710b5ac5d2f9c2b842700ed5b26a30ab2708a227b4bd599563c76e648d6f0b9dfe7785a25c049826f953baffdd39113bd62e7b4563df SHA512 763370381584f2124f751f0736e6a8b34428fd52134fd9966f3581e128f3b74b3f1261992f5d6162d7c866e47f7e5519ea80c1d1d39b80d5ed6e067eb2cd35a0 +DIST tpm2-tss-2.4.1.tar.gz 1445103 BLAKE2B c7be91b93d19b5afeddb6ec455db9ba06795f8dc76ee2a0c6cbabbd8f623930d7c9fdf6319497c70790445531d1e36fe3f904f4c1f4bc9254d833b6d19280f1f SHA512 51551d63fa404e23664aaad1b247bd4b1f93812ced1aed144c37f28cdb3adb4e696aa9e93a502c8fa0eb7e9b4376ac9377f0537eb4c717b68c0b014fee7a0643 diff --git a/app-crypt/tpm2-tss/files/tpm2-tss-2.4.1-Dont-run-systemd-sysusers-in-Makefile.patch b/app-crypt/tpm2-tss/files/tpm2-tss-2.4.1-Dont-run-systemd-sysusers-in-Makefile.patch new file mode 100644 index 000000000000..81c223df9576 --- /dev/null +++ b/app-crypt/tpm2-tss/files/tpm2-tss-2.4.1-Dont-run-systemd-sysusers-in-Makefile.patch @@ -0,0 +1,13 @@ +diff --git a/Makefile.am b/Makefile.am +index 85683f9b..986d4c8d 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -582,8 +582,6 @@ EXTRA_DIST += dist/tpm-udev.rules + + install-data-hook: + -mv $(DESTDIR)$(udevrulesdir)/tpm-udev.rules $(DESTDIR)$(udevrulesdir)/$(udevrulesprefix)tpm-udev.rules +- (systemd-sysusers && systemd-tmpfiles --create) || \ +- ($(call make_tss_user_and_group) && $(call make_fapi_dirs) && ($call set_fapi_permissions)) || true + + uninstall-local: + -rm $(DESTDIR)$(udevrulesdir)/$(udevrulesprefix)tpm-udev.rules diff --git a/app-crypt/tpm2-tss/files/tpm2-tss-2.4.1-configure.ac-wrap-PKG_CHECK_MODULES-in-braces.patch b/app-crypt/tpm2-tss/files/tpm2-tss-2.4.1-configure.ac-wrap-PKG_CHECK_MODULES-in-braces.patch new file mode 100644 index 000000000000..111c3d75c690 --- /dev/null +++ b/app-crypt/tpm2-tss/files/tpm2-tss-2.4.1-configure.ac-wrap-PKG_CHECK_MODULES-in-braces.patch @@ -0,0 +1,53 @@ +From 94cc338b0c5b97702e994ec628d684ee2c114547 Mon Sep 17 00:00:00 2001 +From: Tadeusz Struk <tadeusz.struk@intel.com> +Date: Tue, 24 Mar 2020 16:42:14 -0700 +Subject: [PATCH] configure.ac: wrap PKG_CHECK_MODULES in braces + +PKG_CHECK_MODULES needs to be wrapped inside squere +brackets when inside AS_IF, or it spit out errors: + +./configure: line 13054: JSONC_CFLAGS: command not found +./configure: line 13055: C: command not found +./configure: line 13056: JSONC_LIBS: command not found +./configure: line 13155: CURL_CFLAGS: command not found +./configure: line 13156: CURL_LIBS: command not found + +Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com> +--- + Makefile.am | 2 +- + configure.ac | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 85683f9b..9144a5ad 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -467,7 +467,7 @@ src_tss2_fapi_libtss2_fapi_la_LIBADD = $(libtss2_sys) $(libtss2_mu) $(libtss2_e + + src_tss2_fapi_libtss2_fapi_la_SOURCES = $(TSS2_FAPI_SRC) + src_tss2_fapi_libtss2_fapi_la_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/src/tss2-fapi +-src_tss2_fapi_libtss2_fapi_la_LDFLAGS = $(AM_LDFLAGS) $(LIBCRYPTO_LIBS) $(JSON_C_LIBS) $(CURL_LIBS) ++src_tss2_fapi_libtss2_fapi_la_LDFLAGS = $(AM_LDFLAGS) $(LIBCRYPTO_LIBS) $(JSONC_LIBS) $(CURL_LIBS) + if HAVE_LD_VERSION_SCRIPT + src_tss2_fapi_libtss2_fapi_la_LDFLAGS += -Wl,--version-script=$(srcdir)/lib/tss2-fapi.map + endif # HAVE_LD_VERSION_SCRIPT +diff --git a/configure.ac b/configure.ac +index a202d4a6..2edf609e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -165,10 +165,10 @@ AS_IF([test "x$enable_fapi" != xno -a "x$with_crypto" != "xossl"], + AC_MSG_ERROR([FAPI has to be compiled with OpenSSL])) + + AS_IF([test "x$enable_fapi" = xyes ], +- PKG_CHECK_MODULES([JSON_C], [json-c])) ++ [PKG_CHECK_MODULES([JSONC], [json-c])]) + + AS_IF([test "x$enable_fapi" = xyes ], +- PKG_CHECK_MODULES([CURL], [libcurl])) ++ [PKG_CHECK_MODULES([CURL], [libcurl])]) + + AC_ARG_WITH([tctidefaultmodule], + [AS_HELP_STRING([--with-tctidefaultmodule], +-- +2.26.2 + diff --git a/app-crypt/tpm2-tss/tpm2-tss-2.4.1.ebuild b/app-crypt/tpm2-tss/tpm2-tss-2.4.1.ebuild new file mode 100644 index 000000000000..88361331ec27 --- /dev/null +++ b/app-crypt/tpm2-tss/tpm2-tss-2.4.1.ebuild @@ -0,0 +1,78 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools linux-info 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" +KEYWORDS="~amd64 ~arm64 ~x86" +IUSE="doc +fapi gcrypt +openssl static-libs test" + +RESTRICT="!test? ( test )" + +REQUIRED_USE="^^ ( gcrypt openssl ) + fapi? ( openssl !gcrypt )" + +RDEPEND="acct-group/tss + acct-user/tss + fapi? ( + dev-libs/json-c + net-misc/curl + ) + gcrypt? ( dev-libs/libgcrypt:0= ) + openssl? ( dev-libs/openssl:0= )" +DEPEND="${RDEPEND} + test? ( dev-util/cmocka )" +BDEPEND="virtual/pkgconfig + doc? ( app-doc/doxygen )" + +PATCHES=( + "${FILESDIR}/${P}-Dont-run-systemd-sysusers-in-Makefile.patch" + "${FILESDIR}/${P}-configure.ac-wrap-PKG_CHECK_MODULES-in-braces.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() { + default + eautoreconf +} + +src_configure() { + econf \ + --localstatedir=/var \ + $(use_enable doc doxygen-doc) \ + $(use_enable fapi) \ + $(use_enable static-libs static) \ + $(use_enable test unit) \ + --disable-tcti-mssim \ + --disable-defaultflags \ + --disable-weakcrypto \ + --with-crypto="$(usex gcrypt gcrypt 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" +} + +src_install() { + default + find "${D}" -name '*.la' -delete || die +} + +pkg_postinst() { + tmpfiles_process tpm2-tss-fapi.conf +} |