1 |
commit: 30f93267c27a51c005669ee62c9f84fb767b60c5 |
2 |
Author: Salah Coronya <salah.coronya <AT> gmail <DOT> com> |
3 |
AuthorDate: Tue Apr 7 14:59:22 2020 +0000 |
4 |
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed May 13 13:16:47 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=30f93267 |
7 |
|
8 |
app-crypt/tpm2-tss: Bump to 2.4.0 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/720212 |
11 |
Package-Manager: Portage-2.3.89, Repoman-2.3.20 |
12 |
Signed-off-by: Salah Coronya <salah.coronya <AT> gmail.com> |
13 |
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org> |
14 |
|
15 |
app-crypt/tpm2-tss/Manifest | 1 + |
16 |
.../files/tpm2-tss-2.4.0-fix-tmpfiles-path.patch | 22 +++++++ |
17 |
app-crypt/tpm2-tss/metadata.xml | 1 + |
18 |
app-crypt/tpm2-tss/tpm2-tss-2.4.0.ebuild | 71 ++++++++++++++++++++++ |
19 |
4 files changed, 95 insertions(+) |
20 |
|
21 |
diff --git a/app-crypt/tpm2-tss/Manifest b/app-crypt/tpm2-tss/Manifest |
22 |
index b3e97a63921..16f1388cba1 100644 |
23 |
--- a/app-crypt/tpm2-tss/Manifest |
24 |
+++ b/app-crypt/tpm2-tss/Manifest |
25 |
@@ -1,2 +1,3 @@ |
26 |
DIST tpm2-tss-2.2.3.tar.gz 912179 BLAKE2B 36b2a462512822dccb3adab605ea9922132f027455a1d2895b6735f6200fe44f08288477c99afd0f6c06b4bff3090104b6412b12ea4a518888cf756fb8ee53c4 SHA512 68087cbf2b7acc33788e90b3825bf2c91faa65cfc04b576790634c88876a8a6930d6943f83b7cf0858e37e5e7307703d0c975b9fc0b0ad1d87f66c74b65bd411 |
27 |
DIST tpm2-tss-2.3.3.tar.gz 1171185 BLAKE2B de88d3301bf05239ac9644b4d0e8f257f483bd7a8196ba957a68da9f47cd88ca47422fded5fa8939ccb3bcdf4b39c1dd363c65b9e675f3e03021fb12ec723117 SHA512 df83908508fc8add8ca1aaf7144bcf369f13797f7e5d39fe29654d82e2de2cddf324cd06cb3154318ef767d706d863a7781d98c7b29a90945f081a54594128e5 |
28 |
+DIST tpm2-tss-2.4.0.tar.gz 1446509 BLAKE2B bb078719fa85d9ea07b9710b5ac5d2f9c2b842700ed5b26a30ab2708a227b4bd599563c76e648d6f0b9dfe7785a25c049826f953baffdd39113bd62e7b4563df SHA512 763370381584f2124f751f0736e6a8b34428fd52134fd9966f3581e128f3b74b3f1261992f5d6162d7c866e47f7e5519ea80c1d1d39b80d5ed6e067eb2cd35a0 |
29 |
|
30 |
diff --git a/app-crypt/tpm2-tss/files/tpm2-tss-2.4.0-fix-tmpfiles-path.patch b/app-crypt/tpm2-tss/files/tpm2-tss-2.4.0-fix-tmpfiles-path.patch |
31 |
new file mode 100644 |
32 |
index 00000000000..93a1fed8a87 |
33 |
--- /dev/null |
34 |
+++ b/app-crypt/tpm2-tss/files/tpm2-tss-2.4.0-fix-tmpfiles-path.patch |
35 |
@@ -0,0 +1,22 @@ |
36 |
+diff --git a/dist/fapi-config.json.in b/dist/fapi-config.json.in |
37 |
+index e32a3c36..4aa636e2 100644 |
38 |
+--- a/dist/fapi-config.json.in |
39 |
++++ b/dist/fapi-config.json.in |
40 |
+@@ -2,7 +2,7 @@ |
41 |
+ "profile_name": "P_RSA2048SHA256", |
42 |
+ "profile_dir": "@sysconfdir@/tpm2-tss/fapi-profiles/", |
43 |
+ "user_dir": "~/@userstatedir@/tpm2-tss/user/keystore", |
44 |
+- "system_dir": "@localstatedir@/lib/tpm2-tss/system/keystore", |
45 |
++ "system_dir": "@localstatedir@/tpm2-tss/system/keystore", |
46 |
+ "tcti": "", |
47 |
+ "system_pcrs" : [], |
48 |
+ "log_dir" : "@runstatedir@/tpm2-tss/eventlog/" |
49 |
+diff --git a/dist/tmpfiles.d/tpm2-tss-fapi.conf.in b/dist/tmpfiles.d/tpm2-tss-fapi.conf.in |
50 |
+index 1793c4d7..3f0c8380 100644 |
51 |
+--- a/dist/tmpfiles.d/tpm2-tss-fapi.conf.in |
52 |
++++ b/dist/tmpfiles.d/tpm2-tss-fapi.conf.in |
53 |
+@@ -1,3 +1,3 @@ |
54 |
+ #Type Path Mode User Group Age Argument |
55 |
+-d @localstatedir@/lib/tpm2-tss/system/keystore 775 tss tss - - |
56 |
++d @localstatedir@/tpm2-tss/system/keystore 775 tss tss - - |
57 |
+ d @runstatedir@/tpm2-tss/eventlog 775 tss tss - - |
58 |
|
59 |
diff --git a/app-crypt/tpm2-tss/metadata.xml b/app-crypt/tpm2-tss/metadata.xml |
60 |
index 227ecac5856..ca0c0ecca08 100644 |
61 |
--- a/app-crypt/tpm2-tss/metadata.xml |
62 |
+++ b/app-crypt/tpm2-tss/metadata.xml |
63 |
@@ -10,6 +10,7 @@ |
64 |
<name>Proxy Maintainers</name> |
65 |
</maintainer> |
66 |
<use> |
67 |
+ <flag name="fapi">Enable feature API (requires openssl as crypto backend)</flag> |
68 |
<flag name="gcrypt">Use <pkg>dev-libs/libgcrypt</pkg> as crypto engine</flag> |
69 |
<flag name="openssl">Use <pkg>dev-libs/openssl</pkg> as crypto engine</flag> |
70 |
</use> |
71 |
|
72 |
diff --git a/app-crypt/tpm2-tss/tpm2-tss-2.4.0.ebuild b/app-crypt/tpm2-tss/tpm2-tss-2.4.0.ebuild |
73 |
new file mode 100644 |
74 |
index 00000000000..f8986d88dc9 |
75 |
--- /dev/null |
76 |
+++ b/app-crypt/tpm2-tss/tpm2-tss-2.4.0.ebuild |
77 |
@@ -0,0 +1,71 @@ |
78 |
+# Copyright 1999-2020 Gentoo Authors |
79 |
+# Distributed under the terms of the GNU General Public License v2 |
80 |
+ |
81 |
+EAPI=7 |
82 |
+ |
83 |
+inherit linux-info tmpfiles udev |
84 |
+ |
85 |
+DESCRIPTION="TCG Trusted Platform Module 2.0 Software Stack" |
86 |
+HOMEPAGE="https://github.com/tpm2-software/tpm2-tss" |
87 |
+SRC_URI="https://github.com/tpm2-software/${PN}/releases/download/${PV}/${P}.tar.gz" |
88 |
+ |
89 |
+LICENSE="BSD-2" |
90 |
+SLOT="0" |
91 |
+KEYWORDS="~amd64 ~arm64 ~x86" |
92 |
+IUSE="doc +fapi gcrypt +openssl static-libs test" |
93 |
+ |
94 |
+RESTRICT="!test? ( test )" |
95 |
+ |
96 |
+REQUIRED_USE="^^ ( gcrypt openssl ) |
97 |
+ fapi ( !gcrypt )" |
98 |
+ |
99 |
+RDEPEND="acct-group/tss |
100 |
+ acct-user/tss |
101 |
+ fapi? ( |
102 |
+ dev-libs/json-c |
103 |
+ net-misc/curl |
104 |
+ ) |
105 |
+ gcrypt? ( dev-libs/libgcrypt:0= ) |
106 |
+ openssl? ( dev-libs/openssl:0= )" |
107 |
+DEPEND="${RDEPEND} |
108 |
+ test? ( dev-util/cmocka )" |
109 |
+BDEPEND="virtual/pkgconfig |
110 |
+ doc? ( app-doc/doxygen )" |
111 |
+ |
112 |
+PATCHES=( |
113 |
+ "${FILESDIR}/${PN}-2.4.0-fix-tmpfiles-path.patch" |
114 |
+) |
115 |
+ |
116 |
+pkg_setup() { |
117 |
+ local CONFIG_CHECK=" \ |
118 |
+ ~TCG_TPM |
119 |
+ " |
120 |
+ linux-info_pkg_setup |
121 |
+ kernel_is ge 4 12 0 || ewarn "At least kernel 4.12.0 is required" |
122 |
+} |
123 |
+ |
124 |
+src_configure() { |
125 |
+ econf \ |
126 |
+ $(use_enable doc doxygen-doc) \ |
127 |
+ $(use_enable fapi) \ |
128 |
+ $(use_enable static-libs static) \ |
129 |
+ $(use_enable test unit) \ |
130 |
+ --disable-tcti-mssim \ |
131 |
+ --disable-defaultflags \ |
132 |
+ --disable-weakcrypto \ |
133 |
+ --with-crypto="$(usex gcrypt gcrypt ossl)" \ |
134 |
+ --with-runstatedir=/run \ |
135 |
+ --with-udevrulesdir="$(get_udevdir)/rules.d" \ |
136 |
+ --with-udevrulesprefix=60- \ |
137 |
+ --with-sysusersdir="/usr/lib/sysusers.d" |
138 |
+ --with-tmpfilesdir="/usr/lib/tmpfiles.d" |
139 |
+} |
140 |
+ |
141 |
+src_install() { |
142 |
+ default |
143 |
+ find "${D}" -name '*.la' -delete || die |
144 |
+} |
145 |
+ |
146 |
+pkg_postinst() { |
147 |
+ tmpfiles_process tpm2-tss-fapi.conf |
148 |
+} |