summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSalah Coronya <salah.coronya@gmail.com>2021-02-26 20:36:28 -0600
committerJoonas Niilola <juippis@gentoo.org>2021-03-06 17:12:52 +0200
commitac52bd092b79ddbbaa2be30822d27dc4eb563f0c (patch)
tree1108f62b0a5f28592781fe438cc84504819cc285 /dev-libs/libtpms
parentapp-laptop/i8kutils: update to 1.43 and adoption (diff)
downloadgentoo-ac52bd092b79ddbbaa2be30822d27dc4eb563f0c.tar.gz
gentoo-ac52bd092b79ddbbaa2be30822d27dc4eb563f0c.tar.bz2
gentoo-ac52bd092b79ddbbaa2be30822d27dc4eb563f0c.zip
dev-libs/libtpms: Bump to 0.8.2
Bug: https://bugs.gentoo.org/772410 Package-Manager: Portage-3.0.13, Repoman-3.0.2 Signed-off-by: Salah Coronya <salah.coronya@gmail.com> Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'dev-libs/libtpms')
-rw-r--r--dev-libs/libtpms/Manifest1
-rw-r--r--dev-libs/libtpms/files/libtpms-0.8.0-Remove-WError.patch13
-rw-r--r--dev-libs/libtpms/libtpms-0.8.2.ebuild48
3 files changed, 62 insertions, 0 deletions
diff --git a/dev-libs/libtpms/Manifest b/dev-libs/libtpms/Manifest
index 02b2cdfd1d89..ccefcd587211 100644
--- a/dev-libs/libtpms/Manifest
+++ b/dev-libs/libtpms/Manifest
@@ -1 +1,2 @@
DIST libtpms-0.7.4.tar.gz 1212986 BLAKE2B ff34a9c35167a251eb8ba222255f6be316503d67dde7fba46b6cbc32a1f4eb5ff5a2bb5f0c21963b8d879481f6f4b09646e8e0c5fcddb12cb73309c47505070f SHA512 5a396a7e8273bed1159b0c48d2bf9f02550fed06656240e336778587b7fbe53859dab8f2ba479683e02fedfde4260a9083641be161aec0cb38a605399300997a
+DIST libtpms-0.8.2.tar.gz 1253915 BLAKE2B 48281512f2611376f0f3a67a2646fdc406c2d28bfd560a07b23c122a1b4d68c2840c5cd23f41beae4a13eab419e722aed821cecd919ae6219da325724d55e3b3 SHA512 635f1b30265f1752602caefa1fa87f0032e4d38f1b7113137b7e25a85da10e34f89f9d928b960660e9451306807f111ed96c2a11cbb2de4fb4beb7e638f83727
diff --git a/dev-libs/libtpms/files/libtpms-0.8.0-Remove-WError.patch b/dev-libs/libtpms/files/libtpms-0.8.0-Remove-WError.patch
new file mode 100644
index 000000000000..05988734f59a
--- /dev/null
+++ b/dev-libs/libtpms/files/libtpms-0.8.0-Remove-WError.patch
@@ -0,0 +1,13 @@
+diff --git a/configure.ac b/configure.ac
+index 40d2c7f..809f8e0 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -304,7 +304,7 @@ if test "x$enable_hardening" != "xno"; then
+ AC_SUBST([HARDENING_LDFLAGS])
+ fi
+
+-CFLAGS="$CFLAGS $COVERAGE_CFLAGS -Wall -Werror -Wreturn-type -Wsign-compare -Wno-self-assign"
++CFLAGS="$CFLAGS $COVERAGE_CFLAGS -Wall -Wreturn-type -Wsign-compare -Wno-self-assign"
+ CFLAGS="$CFLAGS -Wmissing-prototypes"
+ LDFLAGS="$LDFLAGS $COVERAGE_LDFLAGS"
+
diff --git a/dev-libs/libtpms/libtpms-0.8.2.ebuild b/dev-libs/libtpms/libtpms-0.8.2.ebuild
new file mode 100644
index 000000000000..49098b44476e
--- /dev/null
+++ b/dev-libs/libtpms/libtpms-0.8.2.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+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"
+IUSE="libressl"
+
+DEPEND=" !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-0.8.0-Remove-WError.patch"
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --disable-static \
+ --with-openssl \
+ --with-tpm2
+}
+
+src_install() {
+ default
+ find "${D}" -name '*.la' -delete || die
+}
+
+pkg_postinst() {
+ 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"
+}