Gentoo Archives: gentoo-commits

From: Alon Bar-Lev <alonbl@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-crypt/tpm2-abrmd/, app-crypt/tpm2-abrmd/files/
Date: Mon, 31 Dec 2018 22:10:38
Message-Id: 1546294135.7a8bbaf6fbcd80d4ed98e6fa85ca47a29e163526.alonbl@gentoo
1 commit: 7a8bbaf6fbcd80d4ed98e6fa85ca47a29e163526
2 Author: Alon Bar-Lev <alonbl <AT> gentoo <DOT> org>
3 AuthorDate: Mon Dec 31 22:02:18 2018 +0000
4 Commit: Alon Bar-Lev <alonbl <AT> gentoo <DOT> org>
5 CommitDate: Mon Dec 31 22:08:55 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7a8bbaf6
7
8 app-crypt/tpm2-abrmd: initial add
9
10 Signed-off-by: Alon Bar-Lev <alonbl <AT> gentoo.org>
11 Package-Manager: Portage-2.3.51, Repoman-2.3.11
12
13 app-crypt/tpm2-abrmd/Manifest | 1 +
14 .../tpm2-abrmd/files/tpm2-abrmd-2.0.3-build.patch | 32 +++++++++++++
15 app-crypt/tpm2-abrmd/files/tpm2-abrmd.confd | 1 +
16 app-crypt/tpm2-abrmd/files/tpm2-abrmd.initd | 15 ++++++
17 app-crypt/tpm2-abrmd/metadata.xml | 11 +++++
18 app-crypt/tpm2-abrmd/tpm2-abrmd-2.0.3.ebuild | 55 ++++++++++++++++++++++
19 6 files changed, 115 insertions(+)
20
21 diff --git a/app-crypt/tpm2-abrmd/Manifest b/app-crypt/tpm2-abrmd/Manifest
22 new file mode 100644
23 index 00000000000..cee50e66439
24 --- /dev/null
25 +++ b/app-crypt/tpm2-abrmd/Manifest
26 @@ -0,0 +1 @@
27 +DIST tpm2-abrmd-2.0.3.tar.gz 563029 BLAKE2B 89c20066b05818825a2addacaf123568ec095d021e9811b78d11c336af9a9e97fe280a08b4478331663efd1da9b2db54207ca53728398aefe4407bfe4b0c7efd SHA512 70b431b9d09e1c1db819aabf6ca8e40a7553573339f43a6c872ad685b7822e5046bd8ede25dcd0608ce2d8fa32257f6c1dd7f234aa7d6a447ac795625d4e0fac
28
29 diff --git a/app-crypt/tpm2-abrmd/files/tpm2-abrmd-2.0.3-build.patch b/app-crypt/tpm2-abrmd/files/tpm2-abrmd-2.0.3-build.patch
30 new file mode 100644
31 index 00000000000..72e823405e9
32 --- /dev/null
33 +++ b/app-crypt/tpm2-abrmd/files/tpm2-abrmd-2.0.3-build.patch
34 @@ -0,0 +1,32 @@
35 +diff --git a/configure.ac b/configure.ac
36 +index ecbc3bb..5973ff5 100644
37 +--- a/configure.ac
38 ++++ b/configure.ac
39 +@@ -135,7 +135,6 @@ AM_CONDITIONAL([ENABLE_INTEGRATION],[test "x$enable_integration" = "xyes"])
40 + # these macros are defined in m4/flags.m4
41 + AX_ADD_COMPILER_FLAG([-Wall])
42 + AX_ADD_COMPILER_FLAG([-Wextra])
43 +-AX_ADD_COMPILER_FLAG([-Werror])
44 + AX_ADD_COMPILER_FLAG([-std=gnu99])
45 + AX_ADD_COMPILER_FLAG([-Wformat])
46 + AX_ADD_COMPILER_FLAG([-Wformat-security])
47 +@@ -143,19 +142,9 @@ AX_ADD_COMPILER_FLAG([-Wno-missing-braces])
48 + # work around for Glib usage of function pointers type casting
49 + # https://bugzilla.gnome.org/show_bug.cgi?id=793272
50 + AX_ADD_COMPILER_FLAG([-Wno-cast-function-type])
51 +-AX_ADD_COMPILER_FLAG([-fdata-sections])
52 +-AX_ADD_COMPILER_FLAG([-ffunction-sections])
53 +-AX_ADD_COMPILER_FLAG([-fstack-protector-all])
54 +-AX_ADD_COMPILER_FLAG([-fpic])
55 +-AX_ADD_COMPILER_FLAG([-fPIC])
56 + AX_ADD_PREPROC_FLAG([-D_GNU_SOURCE])
57 + AX_ADD_PREPROC_FLAG([-U_FORTIFY_SOURCE])
58 + AX_ADD_PREPROC_FLAG([-D_FORTIFY_SOURCE=2])
59 +-AX_ADD_LINK_FLAG([-Wl,--gc-sections])
60 +-AX_ADD_LINK_FLAG([-Wl,--no-undefined])
61 +-AX_ADD_LINK_FLAG([-Wl,-z,noexecstack])
62 +-AX_ADD_LINK_FLAG([-Wl,-z,now])
63 +-AX_ADD_LINK_FLAG([-Wl,-z,relro])
64 +
65 + AC_SUBST([PATH])
66 +
67
68 diff --git a/app-crypt/tpm2-abrmd/files/tpm2-abrmd.confd b/app-crypt/tpm2-abrmd/files/tpm2-abrmd.confd
69 new file mode 100644
70 index 00000000000..619e3dfde77
71 --- /dev/null
72 +++ b/app-crypt/tpm2-abrmd/files/tpm2-abrmd.confd
73 @@ -0,0 +1 @@
74 +TPM2_ABRMD_ARGS=
75
76 diff --git a/app-crypt/tpm2-abrmd/files/tpm2-abrmd.initd b/app-crypt/tpm2-abrmd/files/tpm2-abrmd.initd
77 new file mode 100644
78 index 00000000000..0272921dcbd
79 --- /dev/null
80 +++ b/app-crypt/tpm2-abrmd/files/tpm2-abrmd.initd
81 @@ -0,0 +1,15 @@
82 +#!/sbin/openrc-run
83 +# Copyright 1999-2018 Gentoo Authors
84 +# Distributed under the terms of the GNU General Public License, v2 or later
85 +
86 +description="TPM2 Access Broker & Resource Manager"
87 +command="/usr/sbin/tpm2-abrmd"
88 +command_args="${TPM2_ABRMD_ARGS} --logger=syslog"
89 +command_background=1
90 +command_user="tss:tss"
91 +pidfile="/var/run/${RC_SVCNAME}.pid"
92 +
93 +depend() {
94 + use logger
95 + after coldplug
96 +}
97
98 diff --git a/app-crypt/tpm2-abrmd/metadata.xml b/app-crypt/tpm2-abrmd/metadata.xml
99 new file mode 100644
100 index 00000000000..81a49e4dc59
101 --- /dev/null
102 +++ b/app-crypt/tpm2-abrmd/metadata.xml
103 @@ -0,0 +1,11 @@
104 +<?xml version="1.0" encoding="UTF-8"?>
105 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
106 +<pkgmetadata>
107 + <maintainer type="project">
108 + <email>crypto@g.o</email>
109 + <name>Crypto</name>
110 + </maintainer>
111 + <upstream>
112 + <remote-id type="github">tpm2-software/tpm2-abrmd</remote-id>
113 + </upstream>
114 +</pkgmetadata>
115
116 diff --git a/app-crypt/tpm2-abrmd/tpm2-abrmd-2.0.3.ebuild b/app-crypt/tpm2-abrmd/tpm2-abrmd-2.0.3.ebuild
117 new file mode 100644
118 index 00000000000..8a2bb55ac65
119 --- /dev/null
120 +++ b/app-crypt/tpm2-abrmd/tpm2-abrmd-2.0.3.ebuild
121 @@ -0,0 +1,55 @@
122 +# Copyright 1999-2018 Gentoo Authors
123 +# Distributed under the terms of the GNU General Public License v2
124 +
125 +EAPI=7
126 +
127 +inherit autotools systemd user
128 +
129 +DESCRIPTION="TPM2 Access Broker & Resource Manager"
130 +HOMEPAGE="https://github.com/tpm2-software/tpm2-abrmd"
131 +SRC_URI="https://github.com/tpm2-software/${PN}/releases/download/${PV}/${P}.tar.gz"
132 +
133 +LICENSE="BSD"
134 +SLOT="0"
135 +KEYWORDS="~amd64"
136 +IUSE="static-libs test"
137 +
138 +RDEPEND="sys-apps/dbus:=
139 + dev-libs/glib:=
140 + app-crypt/tpm2-tss:="
141 +DEPEND="${RDEPEND}
142 + test? ( dev-util/cmocka )"
143 +BDEPEND="virtual/pkgconfig
144 + dev-util/gdbus-codegen"
145 +
146 +PATCHES=(
147 + "${FILESDIR}/${P}-build.patch"
148 +)
149 +
150 +pkg_setup() {
151 + enewgroup tss
152 + enewuser tss -1 -1 / tss
153 +}
154 +
155 +src_prepare() {
156 + default
157 + eautoreconf
158 +}
159 +
160 +src_configure() {
161 + econf \
162 + $(use_enable static-libs static) \
163 + $(use_enable test unit) \
164 + --with-dbuspolicydir="${EPREFIX}/etc/dbus-1/system.d" \
165 + --with-systemdpresetdir="$(systemd_get_systemunitdir)/../system-preset" \
166 + --with-systemdpresetdisable \
167 + --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
168 +}
169 +
170 +src_install() {
171 + default
172 + find "${D}" -name '*.la' -delete || die
173 +
174 + newinitd "${FILESDIR}"/${PN}.initd ${PN}
175 + newconfd "${FILESDIR}"/${PN}.confd ${PN}
176 +}