summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Byrne <salah.coronya@gmail.com>2021-09-29 11:21:37 -0500
committerIonen Wolkens <ionen@gentoo.org>2021-10-06 06:56:18 -0400
commit93587254f82cffb914ee9cb4a32dfd9f57e5b323 (patch)
treeb8a2b6f7a5650c780065c4f3f1c5d4423c6e0971
parentapp-crypt/tpm2-tools: Fix broken test exposed in libtpms-0.9.0 (diff)
downloadgentoo-93587254f82cffb914ee9cb4a32dfd9f57e5b323.tar.gz
gentoo-93587254f82cffb914ee9cb4a32dfd9f57e5b323.tar.bz2
gentoo-93587254f82cffb914ee9cb4a32dfd9f57e5b323.zip
dev-libs/libtpms: Bump to 0.9.0
Package-Manager: Portage-3.0.20, Repoman-3.0.3 Signed-off-by: Christopher Byrne <salah.coronya@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/22442 Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
-rw-r--r--dev-libs/libtpms/Manifest1
-rw-r--r--dev-libs/libtpms/files/libtpms-0.9.0-Remove-WError.patch13
-rw-r--r--dev-libs/libtpms/libtpms-0.9.0.ebuild47
3 files changed, 61 insertions, 0 deletions
diff --git a/dev-libs/libtpms/Manifest b/dev-libs/libtpms/Manifest
index 356d8760a532..e634b5473961 100644
--- a/dev-libs/libtpms/Manifest
+++ b/dev-libs/libtpms/Manifest
@@ -1 +1,2 @@
DIST libtpms-0.8.7.tar.gz 1256807 BLAKE2B d3630ece39a78dcc99d15ad603eec5c3d858d1d0c928ae2d3ae5ad5e4d419e186fa23b25ad15824806838401aac33e7224d7cc7ce6fb79647500d4b3a3871223 SHA512 061ec66bbeee9838f12c6a9724ba953cd604981148d6f3a8ebe444e89e59b228b763d8f98c55d67b9477277ccbf9987f2e5632d1b518e78d182f5d7066020ed4
+DIST libtpms-0.9.0.tar.gz 1261212 BLAKE2B 06b065c47bd151cc0001bfffb8aa54aa6d7ef81340f244fb235958bf5801df0fe8cb8a62c51168284e40f34d1a467b4456862087f35f6ac256dcc5e2d12527c5 SHA512 8e9c9e3d1c0c2fb0de3a40b1a84e866e0de662cd00b3bf75dbe01c35d6558a0b325b9c91508d80eeb2bc5162b1413cc624a1f0de1876b9ebe4573cb6343c8287
diff --git a/dev-libs/libtpms/files/libtpms-0.9.0-Remove-WError.patch b/dev-libs/libtpms/files/libtpms-0.9.0-Remove-WError.patch
new file mode 100644
index 000000000000..14fe4c5a8788
--- /dev/null
+++ b/dev-libs/libtpms/files/libtpms-0.9.0-Remove-WError.patch
@@ -0,0 +1,13 @@
+diff --git a/configure.ac b/configure.ac
+index 5f995a8..957c461 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -321,7 +321,7 @@ if test "x$enable_hardening" != "xno"; then
+ AC_SUBST([HARDENING_LDFLAGS])
+ fi
+
+-AM_CFLAGS="$CFLAGS $COVERAGE_CFLAGS -Wall -Werror -Wreturn-type -Wsign-compare -Wno-self-assign -Wmissing-prototypes"
++AM_CFLAGS="$CFLAGS $COVERAGE_CFLAGS -Wall -Wreturn-type -Wsign-compare -Wno-self-assign -Wmissing-prototypes"
+ AM_CFLAGS="$AM_CFLAGS"
+ AM_LDFLAGS="$LDFLAGS $COVERAGE_LDFLAGS"
+
diff --git a/dev-libs/libtpms/libtpms-0.9.0.ebuild b/dev-libs/libtpms/libtpms-0.9.0.ebuild
new file mode 100644
index 000000000000..0eed7e6454dd
--- /dev/null
+++ b/dev-libs/libtpms/libtpms-0.9.0.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools
+
+DESCRIPTION="Library providing software emultion 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 ~ppc ~ppc64 ~x86"
+
+DEPEND="dev-libs/openssl:="
+RDEPEND="${DEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-0.9.0-Remove-WError.patch"
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --with-openssl
+}
+
+src_install() {
+ default
+ find "${ED}" -name '*.la' -delete || die
+}
+
+pkg_postinst() {
+ if [[ ${REPLACING_VERSIONS} ]] && ver_test ${REPLACING_VERSIONS} -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
+}