Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-crypt/tpm2-tss/
Date: Wed, 23 Feb 2022 01:16:52
Message-Id: 1645578973.aec95f5d31e5e85246f4532a882d8fc4213e4465.sam@gentoo
1 commit: aec95f5d31e5e85246f4532a882d8fc4213e4465
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Wed Feb 23 01:16:13 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Wed Feb 23 01:16:13 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aec95f5d
7
8 app-crypt/tpm2-tss: add safeguard for bad .pc file version
9
10 Bug: https://bugs.gentoo.org/833887
11 Bug: https://bugs.gentoo.org/833907
12 Bug: https://bugs.gentoo.org/833884
13 Bug: https://bugs.gentoo.org/833388
14 Signed-off-by: Sam James <sam <AT> gentoo.org>
15
16 app-crypt/tpm2-tss/tpm2-tss-3.2.0-r1.ebuild | 9 +++++++++
17 1 file changed, 9 insertions(+)
18
19 diff --git a/app-crypt/tpm2-tss/tpm2-tss-3.2.0-r1.ebuild b/app-crypt/tpm2-tss/tpm2-tss-3.2.0-r1.ebuild
20 index 4f8e544d9a79..bc7284c68a56 100644
21 --- a/app-crypt/tpm2-tss/tpm2-tss-3.2.0-r1.ebuild
22 +++ b/app-crypt/tpm2-tss/tpm2-tss-3.2.0-r1.ebuild
23 @@ -49,9 +49,12 @@ pkg_setup() {
24
25 src_prepare() {
26 default
27 +
28 + # See bug #833887 (and similar); eautoreconf means .pc file gets wrong version.
29 sed -i \
30 "s/m4_esyscmd_s(\[git describe --tags --always --dirty\])/${PV}/" \
31 "configure.ac" || die
32 +
33 eautoreconf
34 }
35
36 @@ -77,6 +80,12 @@ src_configure() {
37
38 src_install() {
39 default
40 +
41 + if [[ ${PV} != $(sed -n -e 's/^Version: //p' "${ED}/usr/$(get_libdir)/pkgconfig/tss2-sys.pc" || die) ]] ; then
42 + # Safeguard for bug #833887
43 + die "pkg-config file version doesn't match ${PV}! Please report a bug!"
44 + fi
45 +
46 find "${D}" -name '*.la' -delete || die
47 }