1 |
commit: bafea1d5f8c2e86f310eb3e227577156e2a2cfd8 |
2 |
Author: Christopher Byrne <salah.coronya <AT> gmail <DOT> com> |
3 |
AuthorDate: Wed Sep 8 02:53:11 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Sep 8 06:46:02 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bafea1d5 |
7 |
|
8 |
app-crypt/tpm2-tools: Fix automagic dependency on sys-libs/efivar |
9 |
|
10 |
Closes: https://bugs.gentoo.org/812047 |
11 |
Package-Manager: Portage-3.0.20, Repoman-3.0.3 |
12 |
Signed-off-by: Christopher Byrne <salah.coronya <AT> gmail.com> |
13 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
14 |
|
15 |
.../tpm2-tools-5.1.1-no-efivar-automagic.patch | 34 ++++++++++ |
16 |
app-crypt/tpm2-tools/tpm2-tools-5.1.1-r2.ebuild | 72 ++++++++++++++++++++++ |
17 |
2 files changed, 106 insertions(+) |
18 |
|
19 |
diff --git a/app-crypt/tpm2-tools/files/tpm2-tools-5.1.1-no-efivar-automagic.patch b/app-crypt/tpm2-tools/files/tpm2-tools-5.1.1-no-efivar-automagic.patch |
20 |
new file mode 100644 |
21 |
index 00000000000..25f3ef43fe3 |
22 |
--- /dev/null |
23 |
+++ b/app-crypt/tpm2-tools/files/tpm2-tools-5.1.1-no-efivar-automagic.patch |
24 |
@@ -0,0 +1,34 @@ |
25 |
+https://bugs.gentoo.org/812047 |
26 |
+ |
27 |
+From 0cea7f0f78f1a9e8dca789eb5f2ece052e026bed Mon Sep 17 00:00:00 2001 |
28 |
+From: Christopher Byrne <salah.coronya@×××××.com> |
29 |
+Date: Tue, 7 Sep 2021 20:22:27 -0500 |
30 |
+Subject: [PATCH] configure.ac: Fix automagic depency on libefivar |
31 |
+ |
32 |
+Signed-off-by: Christopher Byrne <salah.coronya@×××××.com> |
33 |
+--- |
34 |
+ configure.ac | 8 ++++++-- |
35 |
+ 1 file changed, 6 insertions(+), 2 deletions(-) |
36 |
+ |
37 |
+diff --git a/configure.ac b/configure.ac |
38 |
+index f1c17116..bdb4abda 100644 |
39 |
+--- a/configure.ac |
40 |
++++ b/configure.ac |
41 |
+@@ -62,8 +62,12 @@ PKG_CHECK_MODULES([CRYPTO], [libcrypto >= 1.1.0]) |
42 |
+ PKG_CHECK_MODULES([CURL], [libcurl]) |
43 |
+ |
44 |
+ # pretty print of devicepath if efivar library is present |
45 |
+-PKG_CHECK_MODULES([EFIVAR], [efivar],,[true]) |
46 |
+-AC_CHECK_HEADERS([efivar/efivar.h]) |
47 |
++AC_ARG_WITH([efivar], AS_HELP_STRING([--without-efivar], [Build without efivar library (default: test)])) |
48 |
++ |
49 |
++AS_IF([test "x$with_efivar" != "xno"], [ |
50 |
++ PKG_CHECK_MODULES([EFIVAR], [efivar]) |
51 |
++ AC_CHECK_HEADERS([efivar/efivar.h]) |
52 |
++]) |
53 |
+ |
54 |
+ # backwards compat with older pkg-config |
55 |
+ # - pull in AC_DEFUN from pkg.m4 |
56 |
+-- |
57 |
+2.32.0 |
58 |
+ |
59 |
|
60 |
diff --git a/app-crypt/tpm2-tools/tpm2-tools-5.1.1-r2.ebuild b/app-crypt/tpm2-tools/tpm2-tools-5.1.1-r2.ebuild |
61 |
new file mode 100644 |
62 |
index 00000000000..6fe96e4e93f |
63 |
--- /dev/null |
64 |
+++ b/app-crypt/tpm2-tools/tpm2-tools-5.1.1-r2.ebuild |
65 |
@@ -0,0 +1,72 @@ |
66 |
+# Copyright 1999-2021 Gentoo Authors |
67 |
+# Distributed under the terms of the GNU General Public License v2 |
68 |
+ |
69 |
+EAPI=7 |
70 |
+ |
71 |
+PYTHON_COMPAT=( python3_{8,9} ) |
72 |
+inherit autotools bash-completion-r1 python-single-r1 |
73 |
+ |
74 |
+DESCRIPTION="Tools for the TPM 2.0 TSS" |
75 |
+HOMEPAGE="https://github.com/tpm2-software/tpm2-tools" |
76 |
+SRC_URI="https://github.com/tpm2-software/${PN}/releases/download/${PV}/${P}.tar.gz" |
77 |
+ |
78 |
+LICENSE="BSD" |
79 |
+SLOT="0" |
80 |
+KEYWORDS="~amd64" |
81 |
+IUSE="+fapi test" |
82 |
+ |
83 |
+RDEPEND=">=app-crypt/tpm2-tss-3.0.1:=[fapi?] |
84 |
+ dev-libs/openssl:= |
85 |
+ net-misc/curl:= |
86 |
+ sys-libs/efivar:= |
87 |
+ ${PYTHON_DEPS}" |
88 |
+DEPEND="${RDEPEND} |
89 |
+ test? ( |
90 |
+ app-crypt/swtpm |
91 |
+ app-crypt/tpm2-abrmd |
92 |
+ app-editors/vim-core |
93 |
+ dev-tcltk/expect |
94 |
+ dev-util/cmocka |
95 |
+ dev-python/pyyaml |
96 |
+ )" |
97 |
+BDEPEND="virtual/pkgconfig |
98 |
+ sys-devel/autoconf-archive" |
99 |
+ |
100 |
+RESTRICT="!test? ( test )" |
101 |
+REQUIRED_USE=" ${PYTHON_REQUIRED_USE} " |
102 |
+ |
103 |
+# One of the tests fails without this patch. See |
104 |
+# https://github.com/tpm2-software/tpm2-tools/issues/2767 |
105 |
+PATCHES=( |
106 |
+ "${FILESDIR}/${PN}-5.1.1-fix-tpm-checkquote.patch" |
107 |
+ "${FILESDIR}/${PN}-5.1.1-no-efivar-automagic.patch" |
108 |
+) |
109 |
+ |
110 |
+src_prepare() { |
111 |
+ sed -i \ |
112 |
+ "s/m4_esyscmd_s(\[git describe --tags --always --dirty\])/${PV}/" \ |
113 |
+ "${S}/configure.ac" || die |
114 |
+ "${S}/scripts/utils/man_to_bashcompletion.sh" |
115 |
+ default |
116 |
+ eautoreconf |
117 |
+} |
118 |
+ |
119 |
+src_configure() { |
120 |
+ econf \ |
121 |
+ $(use_enable fapi) \ |
122 |
+ $(use_enable test unit) \ |
123 |
+ --with-bashcompdir=$(get_bashcompdir) \ |
124 |
+ --enable-hardening |
125 |
+} |
126 |
+ |
127 |
+src_install() { |
128 |
+ default |
129 |
+ |
130 |
+ mv "${D}/$(get_bashcompdir)/tpm2_completion.bash" \ |
131 |
+ "${D}/$(get_bashcompdir)/tpm2" || die |
132 |
+ for B in "${D}"/usr/bin/tpm2_* |
133 |
+ do |
134 |
+ TPM2_UTILS="${TPM2_UTILS} $(basename ${B})" |
135 |
+ done |
136 |
+ bashcomp_alias tpm2 ${TPM2_UTILS} |
137 |
+} |