summaryrefslogtreecommitdiff
path: root/dev-libs/libtpms
diff options
context:
space:
mode:
authorroot <root@alpha.trunkmasters.com>2026-06-04 05:48:38 -0500
committerroot <root@alpha.trunkmasters.com>2026-06-04 05:48:38 -0500
commitbfd9c39e4712ebdb442d4ca0673061faed1e70e1 (patch)
tree0d7a74b4463ee387f9cf9368ceb1b757f694f72a /dev-libs/libtpms
parentf716a9fe6455d39eef01e718aae68dae61c19704 (diff)
downloadbaldeagleos-repo-bfd9c39e4712ebdb442d4ca0673061faed1e70e1.tar.gz
baldeagleos-repo-bfd9c39e4712ebdb442d4ca0673061faed1e70e1.tar.xz
baldeagleos-repo-bfd9c39e4712ebdb442d4ca0673061faed1e70e1.zip
Revert "Adding metadata"
This reverts commit f716a9fe6455d39eef01e718aae68dae61c19704.
Diffstat (limited to 'dev-libs/libtpms')
-rw-r--r--dev-libs/libtpms/Manifest2
-rw-r--r--dev-libs/libtpms/files/libtpms-0.10.0-Remove-WError.patch13
-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.1-r1.ebuild54
-rw-r--r--dev-libs/libtpms/libtpms-0.10.2.ebuild54
-rw-r--r--dev-libs/libtpms/metadata.xml20
6 files changed, 175 insertions, 0 deletions
diff --git a/dev-libs/libtpms/Manifest b/dev-libs/libtpms/Manifest
new file mode 100644
index 000000000000..adf60f3122a8
--- /dev/null
+++ b/dev-libs/libtpms/Manifest
@@ -0,0 +1,2 @@
+DIST libtpms-0.10.1.tar.gz 1399253 BLAKE2B 39feead951a84b715e8e4db8cd6eab7f19728c00423df16150c99004230061691cde90fcf7aafc6a5748647ac58cb696b89a709368da4b8f0c684b22321ff1ea SHA512 a1087fb404d199755e38c0c45bd39d3b18686076ec12326e118a0d5c493339ef2a6e4092f451869aa468ff1b69ee024dfdbff9d5c4e0f874c70af3f36d293fe4
+DIST libtpms-0.10.2.tar.gz 1399529 BLAKE2B 19c881d60f8124b6ffe1622731cf73593a38a683cd0a593445ca93033e927c94e1ba75cd30e2847da2137155934f17f785e7dfb96731596361b7a77476cc5a94 SHA512 e30297289a03d4fefb2cdf44654d6f77719a021deb9b721f08d4a23e20706b903ef5e979ba05ad333d052cf35681ba5e143fb883bed0dc37626eca2807d0c01f
diff --git a/dev-libs/libtpms/files/libtpms-0.10.0-Remove-WError.patch b/dev-libs/libtpms/files/libtpms-0.10.0-Remove-WError.patch
new file mode 100644
index 000000000000..1516dbe48bcc
--- /dev/null
+++ b/dev-libs/libtpms/files/libtpms-0.10.0-Remove-WError.patch
@@ -0,0 +1,13 @@
+diff --git a/configure.ac b/configure.ac
+index 6fe0b21..5c0ca29 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -349,7 +349,7 @@ if test "x$enable_hardening" != "xno"; then
+ AC_SUBST([HARDENING_LDFLAGS])
+ fi
+
+-AM_CFLAGS="$CFLAGS $COVERAGE_CFLAGS -Wall -Werror -Wshadow -Wreturn-type -Wsign-compare -Wno-self-assign -Wmissing-prototypes"
++AM_CFLAGS="$CFLAGS $COVERAGE_CFLAGS -Wall -Wshadow -Wreturn-type -Wsign-compare -Wno-self-assign -Wmissing-prototypes"
+ AM_CFLAGS="$AM_CFLAGS"
+ AM_LDFLAGS="$LDFLAGS $COVERAGE_LDFLAGS"
+
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.1-r1.ebuild b/dev-libs/libtpms/libtpms-0.10.1-r1.ebuild
new file mode 100644
index 000000000000..afaaa212374b
--- /dev/null
+++ b/dev-libs/libtpms/libtpms-0.10.1-r1.ebuild
@@ -0,0 +1,54 @@
+# Copyright 2021-2025 Liguros 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"
+IUSE=""
+
+DEPEND="
+ dev-libs/openssl:0=
+
+"
+RDEPEND="${DEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-0.10.0-Remove-WError.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
+}
diff --git a/dev-libs/libtpms/libtpms-0.10.2.ebuild b/dev-libs/libtpms/libtpms-0.10.2.ebuild
new file mode 100644
index 000000000000..a948325ed0d8
--- /dev/null
+++ b/dev-libs/libtpms/libtpms-0.10.2.ebuild
@@ -0,0 +1,54 @@
+# Copyright 2021-2026 Liguros 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"
+IUSE=""
+
+DEPEND="
+ dev-libs/openssl:0=
+
+"
+RDEPEND="${DEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-0.10.0-Remove-WError.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
+}
diff --git a/dev-libs/libtpms/metadata.xml b/dev-libs/libtpms/metadata.xml
new file mode 100644
index 000000000000..65ad08e7d80d
--- /dev/null
+++ b/dev-libs/libtpms/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://liguros.gitlab.io/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>dev@liguros.net</email>
+ <name>Development</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>salah.coronya@gmail.com</email>
+ <name>Salah Coronya</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="cpe">cpe:/a:libtpms_project:libtpms</remote-id>
+ </upstream>
+ <origin>ports</origin>
+</pkgmetadata> \ No newline at end of file