summaryrefslogtreecommitdiff
path: root/dev-libs/libtpms
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2025-02-25 19:25:33 +0000
committerV3n3RiX <venerix@koprulu.sector>2025-02-25 19:25:33 +0000
commit67dbd3ba144944fbf4b466be1b5fa0569b774e6f (patch)
tree721c7f9085992578da57f71ea0c5becb6827cdb4 /dev-libs/libtpms
parentd4653056cc74d97f24bef0d56b4ebe11c53c8b76 (diff)
gentoo auto-resync : 25:02:2025 - 19:25:33
Diffstat (limited to 'dev-libs/libtpms')
-rw-r--r--dev-libs/libtpms/Manifest2
-rw-r--r--dev-libs/libtpms/files/libtpms-0.10.0-tpm2-Add-padding-to-OBJECT-for-32bit-targets.patch32
-rw-r--r--dev-libs/libtpms/libtpms-0.10.0-r1.ebuild52
3 files changed, 86 insertions, 0 deletions
diff --git a/dev-libs/libtpms/Manifest b/dev-libs/libtpms/Manifest
index 03c44168fcd7..fba3242b05a7 100644
--- a/dev-libs/libtpms/Manifest
+++ b/dev-libs/libtpms/Manifest
@@ -1,8 +1,10 @@
AUX libtpms-0.10.0-Remove-WError.patch 526 BLAKE2B 148b51efe3eff055cfe428f00cd6696e7e15eab764e468cf7478334eaaff63e215b123fed68557fa3497d098219d65bc98614b5ed6ab5c8680bf6873904e6d03 SHA512 05c16e30912ae83876a3fc7bc4837aaf22eef7028a75ede11ddbff53417af8f424604a43c3d3d321d0b173a01cb40638bed108c6e074395e68d9e784fa03eca7
+AUX libtpms-0.10.0-tpm2-Add-padding-to-OBJECT-for-32bit-targets.patch 1006 BLAKE2B f3a62c8ad158c59dd6acd968b911f953449a14a9212d98d3fc7695b2960d8ad2688be55a5c56668bd35e1e392f4d75f37e1828d7fb3aba877c5c72ef9b3478e1 SHA512 694a6762b4eb325a16fc525d6499018dd7e7a1bc538c3e0398611180c3a8517ad6bd9d35cbce246840e3aa32368f0725c15ab25ef2828d05b195291dde8fdb59
AUX libtpms-0.9.0-Remove-WError.patch 508 BLAKE2B 33178598a1fef1189039c30814996f00ec37215b3f10a0ff9df521a866147b2a6844d86c3b372e450f701e6e2ae3e587443765c39848076536861342e5b42d63 SHA512 e0d55045bcb667278dc1ae1c509b7be466f23421683f8b0b7c830d724f83b1923b09a61f2a8e649e08150d1d313f0456cfc5f5a1b5fe3bf168565e443595dd12
AUX libtpms-0.9.5-slibtool.patch 1981 BLAKE2B fa4adf1c063d24a2550f964dcaae1ea2e2d93f7d2704bc00e29ef22ceecaaf214860e82e668e1358854482fcf3ba1af89745422657763b7683a232f7e286ac7e SHA512 4b8eebc895ce6941a3ad5995ee0d5f1b1537861700878fa1ce0a95ec37ee1d51354782da4bb2feeedc1c5871aa62ec248484b409c6109bed95cf73962ff8b206
DIST libtpms-0.10.0.tar.gz 1397526 BLAKE2B 8d05023f5f0fc8dd20cbf5606fa7be391b7dfdc45710c76387c97cef6afb555bd5f0920f73e4578719bdad8e64ba239c14f8c63ed1232c4c3e1b4a80c247b8e0 SHA512 a728188c26447656f43298d1475ebccf0f074d9474780a71fc64baf1ac8b6f6569c90e5ad07098dddc711ba1080eef409c1ac5334d054e7f144e48fa21b66df9
DIST libtpms-0.9.6.tar.gz 1264338 BLAKE2B 7b127ef370a48214814bb9ad0e8461ed0af21f32ab84f243945980c5e36ba5e374b4de7a83bf9c67c29264609063d48eae2dae83832daed70170bb1ed39eafea SHA512 35f26e4849eb98cd73461aff439c19f77bbbcde9b7661402e3d419354c4dcddd057349c4f7178573f1ceea2e95326498eb9afea3bd48064bbff534fc7f6939c3
+EBUILD libtpms-0.10.0-r1.ebuild 1559 BLAKE2B 19300d4cd470c97e4537b1edafc6f65e162bd6388e835f3bf44936b2f08b7081cc57d6b8d7f6a3ef211b162c640b47e3cd4a8afb7cd5feca0dcad2c98d9abef3 SHA512 0d6b6b40a4f66450c887300e04583d498b6355370a74e29477678954143d9f32c2bd66bd7fc1d17a8d04fe837d561cccb32d1f55aead3c607a414c7b512917b6
EBUILD libtpms-0.10.0.ebuild 1475 BLAKE2B 715f3bec99a74ee3498b3b3ad6ff026643d520f8168369fc8c86b9398ddcb8bb9ddb2cd73c7dfb9cd1e49925c384d7641b7ecc5dd4488e83ac7fd77c220ee862 SHA512 63d815e44ac76e1f1e6ced535917fd6fa16c44a9e613af7c57082e6e059503da3ae0e4671bd5b62d31e13c2ec67c936c923b8fa9a3ceb7ae3f71ff6b8abe4578
EBUILD libtpms-0.9.6.ebuild 1358 BLAKE2B c7a648d78656c4df0d35fe10949c05bfa4ff04060dfda21ee4cfaaa3596e03e30075f7d0961e9a79b49b09c695b14a0e2689d6dc9c88472381f5075adc374879 SHA512 d7c987471c5229a34b86df19ef22a00c5ef3fbcab567427ca2c4b3a605a3b9ddffb796295d515280836db0be86b9f578b987dcfff6c111dae3cc380538af833d
MISC metadata.xml 621 BLAKE2B 5431a08a57b654746f41820560912e2bac4fc0c5cd2eb5f44c77e4eda65c1a160845205c3ae76392c4a6f9aa33562999576c055ee6d1b89579a9e2a49c59e4f6 SHA512 5e9fff7be647a2e9e8eb71dadcc6b8cc8577ade658fd4ab8ba20cfd64f1b5ba129fc7e5f8fcfb52e69a646681741079c0bc85b06a92f9086ce66a28770c1a9da
diff --git a/dev-libs/libtpms/files/libtpms-0.10.0-tpm2-Add-padding-to-OBJECT-for-32bit-targets.patch b/dev-libs/libtpms/files/libtpms-0.10.0-tpm2-Add-padding-to-OBJECT-for-32bit-targets.patch
new file mode 100644
index 000000000000..d9a3c17b57fb
--- /dev/null
+++ b/dev-libs/libtpms/files/libtpms-0.10.0-tpm2-Add-padding-to-OBJECT-for-32bit-targets.patch
@@ -0,0 +1,32 @@
+Bug: https://bugs.gentoo.org/948139
+
+From 095a085b6f447551110e09b2013c6a21c2a29f2d Mon Sep 17 00:00:00 2001
+From: Stefan Berger <stefanb@linux.ibm.com>
+Date: Fri, 15 Nov 2024 08:07:23 -0500
+Subject: [PATCH] tpm2: Add padding to OBJECT for 32bit targets
+
+The nvram_offsets test fails on 32bit targets due to an unexpected size
+of an OBJECT. This was due to missing padding.
+
+Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
+---
+ src/tpm2/Global.h | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/tpm2/Global.h b/src/tpm2/Global.h
+index 910b940..c4d7176 100644
+--- a/src/tpm2/Global.h
++++ b/src/tpm2/Global.h
+@@ -265,6 +265,9 @@ typedef struct OBJECT
+ // this field carries additional metadata
+ // needed to derive the proof value for
+ // the object.
++#if __LONG_WIDTH__ == 32
++ UINT8 _pad1[4]; /* 32 bit targets need padding */
++#endif
+
+ // libtpms added: SEED_COMPAT_LEVEL to use for deriving child keys
+ SEED_COMPAT_LEVEL seedCompatLevel;
+--
+2.45.3
+
diff --git a/dev-libs/libtpms/libtpms-0.10.0-r1.ebuild b/dev-libs/libtpms/libtpms-0.10.0-r1.ebuild
new file mode 100644
index 000000000000..6bb387ee03b5
--- /dev/null
+++ b/dev-libs/libtpms/libtpms-0.10.0-r1.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools eapi9-ver
+
+DESCRIPTION="Library providing software emulation of a TPM"
+HOMEPAGE="https://github.com/stefanberger/libtpms"
+SRC_URI="https://github.com/stefanberger/libtpms/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86"
+
+DEPEND="dev-libs/openssl:="
+RDEPEND="${DEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-0.10.0-Remove-WError.patch"
+ "${FILESDIR}/${PN}-0.10.0-tpm2-Add-padding-to-OBJECT-for-32bit-targets.patch"
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ # --disable-hardening because it just sets what our toolchain
+ # already does. If the user wants to disable that in their *FLAGS,
+ # or via USE on toolchain packages, honour that.
+ econf \
+ --with-openssl \
+ --disable-hardening
+}
+
+src_install() {
+ default
+ find "${ED}" -name '*.la' -delete || die
+}
+
+pkg_postinst() {
+ if ver_replacing -lt 0.8.0; then
+ elog "Versions of libtpms prior to 0.8.0 generate weaker than expected TPM 2.0 RSA"
+ elog "keys due to a flawed key creation algorithm. Because fixing this would render"
+ elog "existing sealed data inaccessible, to use the corrected algorithm, the old"
+ elog "TPM state file must be deleted and a new TPM state file created. Data still"
+ elog "sealed using the old state file will be permanently inaccessible. For the"
+ elog "details see https://github.com/stefanberger/libtpms/issues/183"
+ fi
+}