commit:     ac52bd092b79ddbbaa2be30822d27dc4eb563f0c
Author:     Salah Coronya <salah.coronya <AT> gmail <DOT> com>
AuthorDate: Sat Feb 27 02:36:28 2021 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Sat Mar  6 15:12:52 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ac52bd09

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 <AT> gmail.com>
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 dev-libs/libtpms/Manifest                          |  1 +
 .../files/libtpms-0.8.0-Remove-WError.patch        | 13 ++++++
 dev-libs/libtpms/libtpms-0.8.2.ebuild              | 48 ++++++++++++++++++++++
 3 files changed, 62 insertions(+)

diff --git a/dev-libs/libtpms/Manifest b/dev-libs/libtpms/Manifest
index 02b2cdfd1d8..ccefcd58721 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 00000000000..05988734f59
--- /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 00000000000..49098b44476
--- /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";
+}

Reply via email to