1 |
commit: df00d09363e7669dc47f0e6ab0cc68aa41f2b8e2 |
2 |
Author: Alon Bar-Lev <alonbl <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu May 30 23:11:29 2019 +0000 |
4 |
Commit: Alon Bar-Lev <alonbl <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu May 30 23:46:17 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=df00d093 |
7 |
|
8 |
app-crypt/tpm2-totp: initial add |
9 |
|
10 |
Signed-off-by: Alon Bar-Lev <alonbl <AT> gentoo.org> |
11 |
Package-Manager: Portage-2.3.66, Repoman-2.3.11 |
12 |
|
13 |
app-crypt/tpm2-totp/Manifest | 1 + |
14 |
.../tpm2-totp/files/tpm2-totp-0.1.1-build.patch | 70 ++++++++++++++++++++++ |
15 |
app-crypt/tpm2-totp/metadata.xml | 11 ++++ |
16 |
app-crypt/tpm2-totp/tpm2-totp-0.1.1.ebuild | 38 ++++++++++++ |
17 |
4 files changed, 120 insertions(+) |
18 |
|
19 |
diff --git a/app-crypt/tpm2-totp/Manifest b/app-crypt/tpm2-totp/Manifest |
20 |
new file mode 100644 |
21 |
index 00000000000..4c6b8deaba8 |
22 |
--- /dev/null |
23 |
+++ b/app-crypt/tpm2-totp/Manifest |
24 |
@@ -0,0 +1 @@ |
25 |
+DIST tpm2-totp-0.1.1.tar.gz 357787 BLAKE2B c7a24b30c155cfd5387180a2c8584497327eadd701068aa5eb3c385bbadf26f448f88c238849fbf68c4e7265f01d3783b3aa50a912070df1c2fd4485310f2299 SHA512 33a4af16a292ddd674a399bf12ce0b355d95de7014e8be11816a1d88edfd36ae222a8b7508f3aa1be3b46c7e04bf2712ee4839cf9f4f83fc308cb4f639ec5b9f |
26 |
|
27 |
diff --git a/app-crypt/tpm2-totp/files/tpm2-totp-0.1.1-build.patch b/app-crypt/tpm2-totp/files/tpm2-totp-0.1.1-build.patch |
28 |
new file mode 100644 |
29 |
index 00000000000..232b4f9e868 |
30 |
--- /dev/null |
31 |
+++ b/app-crypt/tpm2-totp/files/tpm2-totp-0.1.1-build.patch |
32 |
@@ -0,0 +1,70 @@ |
33 |
+From 2652497a15572d2484f57fee8be252d0d5fe4f8c Mon Sep 17 00:00:00 2001 |
34 |
+From: Alon Bar-Lev <alon.barlev@×××××.com> |
35 |
+Date: Fri, 31 May 2019 01:39:29 +0300 |
36 |
+Subject: [PATCH] build: add --disable-defaultflags |
37 |
+ |
38 |
+Align with tpm2-tss to allow downstream to provide flags. |
39 |
+ |
40 |
+Signed-off-by: Alon Bar-Lev <alon.barlev@×××××.com> |
41 |
+--- |
42 |
+ configure.ac | 42 +++++++++++++++++++++++++----------------- |
43 |
+ 1 file changed, 25 insertions(+), 17 deletions(-) |
44 |
+ |
45 |
+https://github.com/tpm2-software/tpm2-totp/pull/39 |
46 |
+ |
47 |
+diff --git a/configure.ac b/configure.ac |
48 |
+index baf596b..ac11e1e 100644 |
49 |
+--- a/configure.ac |
50 |
++++ b/configure.ac |
51 |
+@@ -47,23 +47,31 @@ AC_SUBST([LIBEXECDIR]) |
52 |
+ |
53 |
+ AC_CONFIG_FILES([Makefile dist/tpm2-totp.pc dist/dracut/module-setup.sh dist/initcpio/install/plymouth-tpm2-totp]) |
54 |
+ |
55 |
+-AX_ADD_COMPILER_FLAG([-std=c99]) |
56 |
+-AX_ADD_COMPILER_FLAG([-Wall]) |
57 |
+-AX_ADD_COMPILER_FLAG([-Wextra]) |
58 |
+-AX_ADD_COMPILER_FLAG([-Wformat-security]) |
59 |
+-AX_ADD_COMPILER_FLAG([-Werror]) |
60 |
+-AX_ADD_COMPILER_FLAG([-fstack-protector-all]) |
61 |
+-AX_ADD_COMPILER_FLAG([-fpic]) |
62 |
+-AX_ADD_COMPILER_FLAG([-fPIC]) |
63 |
+- |
64 |
+-# work around GCC bug #53119 |
65 |
+-# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53119 |
66 |
+-AX_ADD_COMPILER_FLAG([-Wno-missing-braces]) |
67 |
+- |
68 |
+-AX_ADD_LINK_FLAG([-Wl,--no-undefined]) |
69 |
+-AX_ADD_LINK_FLAG([-Wl,-z,noexecstack]) |
70 |
+-AX_ADD_LINK_FLAG([-Wl,-z,now]) |
71 |
+-AX_ADD_LINK_FLAG([-Wl,-z,relro]) |
72 |
++AC_ARG_ENABLE([defaultflags], |
73 |
++ [AS_HELP_STRING([--disable-defaultflags], |
74 |
++ [Disable default preprocessor, compiler, and linker flags.])], |
75 |
++ [enable_defaultflags=$enableval], |
76 |
++ [enable_defaultflags=yes]) |
77 |
++AS_IF([test "x$enable_defaultflags" = "xyes"], |
78 |
++ [ |
79 |
++ AX_ADD_COMPILER_FLAG([-std=c99]) |
80 |
++ AX_ADD_COMPILER_FLAG([-Wall]) |
81 |
++ AX_ADD_COMPILER_FLAG([-Wextra]) |
82 |
++ AX_ADD_COMPILER_FLAG([-Wformat-security]) |
83 |
++ AX_ADD_COMPILER_FLAG([-Werror]) |
84 |
++ AX_ADD_COMPILER_FLAG([-fstack-protector-all]) |
85 |
++ AX_ADD_COMPILER_FLAG([-fpic]) |
86 |
++ AX_ADD_COMPILER_FLAG([-fPIC]) |
87 |
++ |
88 |
++ # work around GCC bug #53119 |
89 |
++ # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53119 |
90 |
++ AX_ADD_COMPILER_FLAG([-Wno-missing-braces]) |
91 |
++ |
92 |
++ AX_ADD_LINK_FLAG([-Wl,--no-undefined]) |
93 |
++ AX_ADD_LINK_FLAG([-Wl,-z,noexecstack]) |
94 |
++ AX_ADD_LINK_FLAG([-Wl,-z,now]) |
95 |
++ AX_ADD_LINK_FLAG([-Wl,-z,relro]) |
96 |
++ ]) |
97 |
+ |
98 |
+ AX_CODE_COVERAGE |
99 |
+ m4_ifdef([_AX_CODE_COVERAGE_RULES], |
100 |
+-- |
101 |
+2.21.0 |
102 |
+ |
103 |
|
104 |
diff --git a/app-crypt/tpm2-totp/metadata.xml b/app-crypt/tpm2-totp/metadata.xml |
105 |
new file mode 100644 |
106 |
index 00000000000..0509d466372 |
107 |
--- /dev/null |
108 |
+++ b/app-crypt/tpm2-totp/metadata.xml |
109 |
@@ -0,0 +1,11 @@ |
110 |
+<?xml version="1.0" encoding="UTF-8"?> |
111 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
112 |
+<pkgmetadata> |
113 |
+ <maintainer type="project"> |
114 |
+ <email>crypto@g.o</email> |
115 |
+ <name>Crypto</name> |
116 |
+ </maintainer> |
117 |
+ <upstream> |
118 |
+ <remote-id type="github">tpm2-software/tpm2-totp</remote-id> |
119 |
+ </upstream> |
120 |
+</pkgmetadata> |
121 |
|
122 |
diff --git a/app-crypt/tpm2-totp/tpm2-totp-0.1.1.ebuild b/app-crypt/tpm2-totp/tpm2-totp-0.1.1.ebuild |
123 |
new file mode 100644 |
124 |
index 00000000000..8b2622c2586 |
125 |
--- /dev/null |
126 |
+++ b/app-crypt/tpm2-totp/tpm2-totp-0.1.1.ebuild |
127 |
@@ -0,0 +1,38 @@ |
128 |
+# Copyright 1999-2019 Gentoo Authors |
129 |
+# Distributed under the terms of the GNU General Public License v2 |
130 |
+ |
131 |
+EAPI=7 |
132 |
+ |
133 |
+inherit autotools |
134 |
+ |
135 |
+DESCRIPTION="Attest the trustworthiness of a device against a human using time-based OTP" |
136 |
+HOMEPAGE="https://github.com/tpm2-software/tpm2-totp" |
137 |
+SRC_URI="https://github.com/tpm2-software/${PN}/releases/download/v${PV}/${P}.tar.gz" |
138 |
+ |
139 |
+LICENSE="BSD" |
140 |
+SLOT="0" |
141 |
+KEYWORDS="~amd64" |
142 |
+ |
143 |
+RDEPEND=">=app-crypt/tpm2-tss-2.0:= |
144 |
+ media-gfx/qrencode:=" |
145 |
+DEPEND="${RDEPEND}" |
146 |
+BDEPEND="virtual/pkgconfig" |
147 |
+ |
148 |
+PATCHES=( |
149 |
+ "${FILESDIR}/${P}-build.patch" |
150 |
+) |
151 |
+ |
152 |
+src_prepare() { |
153 |
+ default |
154 |
+ eautoreconf |
155 |
+} |
156 |
+ |
157 |
+src_configure() { |
158 |
+ econf \ |
159 |
+ --disable-defaultflags |
160 |
+} |
161 |
+ |
162 |
+src_install() { |
163 |
+ default |
164 |
+ find "${D}" -name '*.la' -delete || die |
165 |
+} |