summaryrefslogtreecommitdiff
path: root/app-crypt/tpm2-tss
diff options
context:
space:
mode:
Diffstat (limited to 'app-crypt/tpm2-tss')
-rw-r--r--app-crypt/tpm2-tss/Manifest5
-rw-r--r--app-crypt/tpm2-tss/files/tpm2-tss-4.0.2-Dont-install-files-into-run.patch26
-rw-r--r--app-crypt/tpm2-tss/tpm2-tss-4.0.2.ebuild109
-rw-r--r--app-crypt/tpm2-tss/tpm2-tss-4.1.0.ebuild107
4 files changed, 247 insertions, 0 deletions
diff --git a/app-crypt/tpm2-tss/Manifest b/app-crypt/tpm2-tss/Manifest
index a62b3cd1e086..9417d2283860 100644
--- a/app-crypt/tpm2-tss/Manifest
+++ b/app-crypt/tpm2-tss/Manifest
@@ -1,7 +1,12 @@
AUX tpm2-tss-4.0.0-Dont-install-files-into-run.patch 880 BLAKE2B 8ae9b55e853dcd117730eebc274252ea7afc4e3e415eafb21d3994690687cc9daa796a97536597da8cbfc4f54567cbb678fe61ba4eb4fdc1dee6d851d472efa3 SHA512 811dd1d2597557cf9fd08d7231cd5f48a8dd9dc76adf33bc4a0ee978dc8973fc5309bdc7386cbd9878b78dba1b4a8ecf9c2e2f856c887b141a423f0d94e3244e
AUX tpm2-tss-4.0.1-Do-not-consider-failures-to-write-files-in-sys-hard.patch 1493 BLAKE2B 4e22a79f54758295905625ce907ee1d718ec8ab34e1917f376c2e318beabbcd424588458bb0360757d8027b87ca7fb14279585fb35e29a7bd53d7eb3fdb43c99 SHA512 f4badedc611e9903daa034306c6cca3b0a3f3ed56350af18f48586c67ffba9f4b5cc8784e4d008b123b885c33b7a3fbfd1c5bc846aa35ab648cd48be3476deb1
AUX tpm2-tss-4.0.1-Make-sysusers-and-tmpfiles-optional.patch 1814 BLAKE2B 259a2b4618eeaf34228a07d6e9479658e04b7e36affa6d8d894563014a3f9ba571f1676623b744c1158ceb2fd738fe627fad76014b1893471a9467da41847f2e SHA512 78f1f6d5a448f29fd5dfbfadfb1913464d8e55eabebc9c0eca16c70031bcee9198742b1567eba2bae444cf11e32bea3c3663db155eb1e8da750ba8bb78d725c0
+AUX tpm2-tss-4.0.2-Dont-install-files-into-run.patch 878 BLAKE2B 8a3d248dcb89b08bf61834aa0cbde89e7086d561826da154104eb6cddd760fd42538f3c353ba1d3df072617bdfa9a2976f7c7ba6947600578e8aa398f3091bea SHA512 02a354429a3f1b803364c1277b4791f0a406b2510e320dff13dc4988efa443d06aec3fe325ec05439597ebf78beef2983e4dabfd557d4cdf6c43c4b7042a1797
DIST tpm2-tss-4.0.1.tar.gz 1787139 BLAKE2B 627cdefeff6c64148f9da1425922a0a7a72debcee4930ffab208a3b9b66127c2d4f923e3e105bfd45410cdb13c19cb40cc15a720e9a05dd32ff622dabf5fcc32 SHA512 ed6ddc52cb0e8c1082a4bb001e1225eb9905fd2380da88db5fd69ff5b5d9d43a93eb67b634e49d53eb5d586832da3aef2c4c7e5f18d51bb730481f8913319d7d
+DIST tpm2-tss-4.0.2.tar.gz 1833499 BLAKE2B 91e70bcc66099fe5d7d53cf98a2c46582e96f204fc7bcb89c46497cc811ca1eb39c752be077a6e8132fc980a6581a2df075fcc6670d646d1270e642c144f043c SHA512 e92038de985ac928bf87a707b0f9b190aaa936827923ea5e3cbdda216cbc6cf8590af650c59c2e1e420ad9914dc6c1f14232ab7930ffc1a50fb0c49fdef6d3f0
+DIST tpm2-tss-4.1.0.tar.gz 1902337 BLAKE2B 72e2b13d9d65cdf8db136dd9ee75b0f53f8d8482391c27c0a52d6aa4945d05d54334f9667b96aef78f92c7e2d6e4eb655568182ef3a79477c52937b0ccfa605d SHA512 b8fa5d093b188dbb5df9888da9ea893a7eea2b88f4a93f1e349eaa1718a4d87f6cd91f029ff49afce163252ab98f859728360491d6d2019f8342afb78f0018eb
EBUILD tpm2-tss-4.0.1-r1.ebuild 2588 BLAKE2B b9a58449aa540dd800e5453091c464edeba60987e0119044cf0caccfbb14ef7d15c7fc28ee27d45d80044f4b6d4df9c56cbead18fffd4819afd53dde921692f0 SHA512 bad17cc8511c05ff8295c1812ac78f48c097563efe2224d9bcf6d3f1cd131149571596f1fc47a7423ee10b88b7221ae8f52bbe05a01ab402369a66ba0a8e62d5
EBUILD tpm2-tss-4.0.1.ebuild 2492 BLAKE2B a31affba60e4b53ba69ba9bc3dece3bfca550cad98eb21d5cabb4b24e427b321fdb4104cabe6676e8128719d1e0dbf8992ad778df025f2709aefe078e01c3458 SHA512 502461ec7f03aba7d346ede6db2b0f365f16c5e37d4272f27467f62d84c09c12258994f22733f33e3869fa90fefe1fb2e3004e4ec38e5276a67f1ada32442749
+EBUILD tpm2-tss-4.0.2.ebuild 2588 BLAKE2B 5a6740620d1546b54e3b41338ba40c33841a16eb55a0a96fce1dbdeea11ebc599c37bc6664868420503ae197513a60aa7ed33a9c3a4710627e304446cff08651 SHA512 ced915ebeb436a665fe50967e87123267d848aa654deee218d13616a8b6b5e0eced0e4f6953acda89e46f219b37fbe5a13d0643c8b433c882a49e61e19f5ad83
+EBUILD tpm2-tss-4.1.0.ebuild 2434 BLAKE2B 6d9d66fa2e03c9a1933d14b7fe09f5146df232aa3b11cba4008ae5e1c1c7f247ab0bb38553f3a9bced5f3536fb2eb95b4c3bc8fe113a067c21b64481afb9ab05 SHA512 80bc38751bf15cbe7e65733f00af178e7cba5d66976fb87d39ed55108365997de41258fd3e0890fce34aec7521f31fdb6d0c1be6826585f8b99d1b45979866e2
MISC metadata.xml 835 BLAKE2B 58fcbb63b8fd77dd42f081e060cec1fc5593d13ad9237bd644462fd839a1fea9936342d5339a3ec8d339106ca6074c73ac31e7546feb0f1c5f0f212b21831d8a SHA512 941bfce986619b387410d49fe046218a388243c257a3164293033f8ebb4e2d64d7ff06d35dd4ef770a9e9194035839d68dcf1f00edbe439272c2e9c01ecb3c6b
diff --git a/app-crypt/tpm2-tss/files/tpm2-tss-4.0.2-Dont-install-files-into-run.patch b/app-crypt/tpm2-tss/files/tpm2-tss-4.0.2-Dont-install-files-into-run.patch
new file mode 100644
index 000000000000..022cd6145c18
--- /dev/null
+++ b/app-crypt/tpm2-tss/files/tpm2-tss-4.0.2-Dont-install-files-into-run.patch
@@ -0,0 +1,26 @@
+diff --git a/Makefile.am b/Makefile.am
+index 07b7a2bf..e478fc77 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -770,13 +770,11 @@ define set_tss_permissions
+ endef
+
+ define make_fapi_dirs
+- ($(call make_tss_dir,$(DESTDIR)$(runstatedir)/tpm2-tss/eventlog/) || true) && \
+ ($(call make_tss_dir,$(DESTDIR)$(localstatedir)/lib/tpm2-tss/system/keystore/))
+ endef
+
+ define set_fapi_permissions
+ if test -z "${DESTDIR}"; then \
+- ($(call set_tss_permissions,$(DESTDIR)$(runstatedir)/tpm2-tss)) && \
+ ($(call set_tss_permissions,$(DESTDIR)$(localstatedir)/lib/tpm2-tss)) \
+ fi
+ endef
+@@ -787,7 +785,6 @@ endef
+
+ define check_fapi_dirs
+ if test -z "${DESTDIR}"; then \
+- ($(call check_dir,$(DESTDIR)$(runstatedir)/tpm2-tss/eventlog/)) && \
+ ($(call check_dir,$(DESTDIR)$(localstatedir)/lib/tpm2-tss/system/keystore/)) \
+ fi;
+ endef
diff --git a/app-crypt/tpm2-tss/tpm2-tss-4.0.2.ebuild b/app-crypt/tpm2-tss/tpm2-tss-4.0.2.ebuild
new file mode 100644
index 000000000000..0c4f132f9e5c
--- /dev/null
+++ b/app-crypt/tpm2-tss/tpm2-tss-4.0.2.ebuild
@@ -0,0 +1,109 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+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/4"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86"
+IUSE="doc +fapi +openssl mbedtls +policy static-libs test"
+RESTRICT="!test? ( test )"
+
+REQUIRED_USE="
+ ^^ ( mbedtls openssl )
+ fapi? ( openssl !mbedtls )
+ policy? ( openssl !mbedtls )
+"
+
+RDEPEND="
+ acct-group/tss
+ acct-user/tss
+ sys-apps/util-linux:=[${MULTILIB_USEDEP}]
+ 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-text/doxygen )
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-4.0.2-Dont-install-files-into-run.patch"
+ "${FILESDIR}/${PN}-4.0.1-Make-sysusers-and-tmpfiles-optional.patch"
+ "${FILESDIR}/${PN}-4.0.1-Do-not-consider-failures-to-write-files-in-sys-hard.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
+}
+
+multilib_src_configure() {
+ # Fails with inlining
+ filter-flags -fno-semantic-interposition
+ # tests fail with LTO enabbled. See bug 865275 and 865279
+ filter-lto
+
+ local myconf=(
+ --localstatedir=/var
+ $(multilib_native_use_enable doc doxygen-doc)
+ $(use_enable fapi)
+ $(use_enable policy)
+ $(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-
+ --without-sysusersdir
+ --with-tmpfilesdir="/usr/lib/tmpfiles.d"
+ )
+
+ ECONF_SOURCE=${S} econf "${myconf[@]}"
+}
+
+multilib_src_install() {
+ default
+ keepdir /var/lib/tpm2-tss/system/keystore
+ find "${ED}" -name '*.la' -delete || die
+}
+
+pkg_postinst() {
+ tmpfiles_process tpm2-tss-fapi.conf
+ udev_reload
+}
+
+pkg_postrm() {
+ udev_reload
+}
diff --git a/app-crypt/tpm2-tss/tpm2-tss-4.1.0.ebuild b/app-crypt/tpm2-tss/tpm2-tss-4.1.0.ebuild
new file mode 100644
index 000000000000..7e6bf442977f
--- /dev/null
+++ b/app-crypt/tpm2-tss/tpm2-tss-4.1.0.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+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/4"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86"
+IUSE="doc +fapi +openssl mbedtls +policy static-libs test"
+RESTRICT="!test? ( test )"
+
+REQUIRED_USE="
+ ^^ ( mbedtls openssl )
+ fapi? ( openssl !mbedtls )
+ policy? ( openssl !mbedtls )
+"
+
+RDEPEND="
+ acct-group/tss
+ acct-user/tss
+ sys-apps/util-linux:=[${MULTILIB_USEDEP}]
+ 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-text/doxygen )
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-4.0.2-Dont-install-files-into-run.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
+}
+
+multilib_src_configure() {
+ # Fails with inlining
+ filter-flags -fno-semantic-interposition
+ # tests fail with LTO enabbled. See bug 865275 and 865279
+ filter-lto
+
+ local myconf=(
+ --localstatedir=/var
+ $(multilib_native_use_enable doc doxygen-doc)
+ $(use_enable fapi)
+ $(use_enable policy)
+ $(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-
+ --without-sysusersdir
+ --with-tmpfilesdir="/usr/lib/tmpfiles.d"
+ )
+
+ ECONF_SOURCE=${S} econf "${myconf[@]}"
+}
+
+multilib_src_install() {
+ default
+ keepdir /var/lib/tpm2-tss/system/keystore
+ find "${ED}" -name '*.la' -delete || die
+}
+
+pkg_postinst() {
+ tmpfiles_process tpm2-tss-fapi.conf
+ udev_reload
+}
+
+pkg_postrm() {
+ udev_reload
+}