commit:     885121cfa0e1704416f3a6490b47a372bb7f2dd0
Author:     Alon Bar-Lev <alonbl <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 15 22:18:02 2018 +0000
Commit:     Alon Bar-Lev <alonbl <AT> gentoo <DOT> org>
CommitDate: Sat Sep 15 22:21:01 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=885121cf

app-crypt/tpm-emulator: cleanup old

Package-Manager: Portage-2.3.40, Repoman-2.3.9

 app-crypt/tpm-emulator/Manifest                    |   1 -
 .../files/tpm-emulator-0.7.4-build.patch           | 100 ---------------------
 .../tpm-emulator/files/tpm-emulator.confd-0.7.4    |   2 -
 .../tpm-emulator/files/tpm-emulator.initd-0.7.4    |  59 ------------
 .../tpm-emulator/tpm-emulator-0.7.4-r1.ebuild      |  80 -----------------
 5 files changed, 242 deletions(-)

diff --git a/app-crypt/tpm-emulator/Manifest b/app-crypt/tpm-emulator/Manifest
index ee01c035b31..69569405245 100644
--- a/app-crypt/tpm-emulator/Manifest
+++ b/app-crypt/tpm-emulator/Manifest
@@ -1,2 +1 @@
 DIST tpm-emulator-0.7.5.tar.gz 222341 BLAKE2B 
c6dc7494800f4c6d1f5e622c6a47fdd5487e0f2cbc34173d9039d6eb5fd7541dd2c1f514efbf220c605424059844e18650b31ee9934eda6626427b915fd6bc53
 SHA512 
24c16ec36ca92c484d6e8dfa53c8ca00dbc5b58d78d7166041db1e9ae277d763f0fc0a6b0cbd7e62fcf4671f6ad2d8df1213256be0a4200b79b6ee61ab73b2ef
-DIST tpm_emulator-0.7.4.tar.gz 214145 BLAKE2B 
b8bbd53ecfb90e87f1306c03d2c65a472819d23d10bd63fa966bfadef4776c3876c2f6fc03cc878ece670bdfcd22c9f403ef4bc7f4593a0a6c7f8d17051ac3ba
 SHA512 
4928b5b82f57645be9408362706ff2c4d9baa635b21b0d41b1c82930e8c60a759b1ea4fa74d7e6c7cae1b7692d006aa5cb72df0c3b88bf049779aa2b566f9d35

diff --git a/app-crypt/tpm-emulator/files/tpm-emulator-0.7.4-build.patch 
b/app-crypt/tpm-emulator/files/tpm-emulator-0.7.4-build.patch
deleted file mode 100644
index ada748f7129..00000000000
--- a/app-crypt/tpm-emulator/files/tpm-emulator-0.7.4-build.patch
+++ /dev/null
@@ -1,100 +0,0 @@
-From ca99fe81c8aee204c1a8b7f3ca264130e54d9418 Mon Sep 17 00:00:00 2001
-From: Alon Bar-Lev <alon.bar...@gmail.com>
-Date: Sat, 1 Sep 2018 21:32:07 +0300
-Subject: [PATCH] tpm: tpm_deprecated.c fix compare
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-tpm/tpm_deprecated.c:437:7: error: ‘__builtin_memcmp_eq’ reading 20 bytes from 
a region of size 8 [-Werror=stringop-overflow=]
-   if (memcmp(&b1, &newAuthLink, sizeof(TPM_HMAC))) {
-       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-cc1: all warnings being treated as errors
-
-Bug: https://bugs.gentoo.org/show_bug.cgi?id=664198
----
- tpm/tpm_deprecated.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/tpm/tpm_deprecated.c b/tpm/tpm_deprecated.c
-index c362b56..4c49f54 100644
---- a/tpm/tpm_deprecated.c
-+++ b/tpm/tpm_deprecated.c
-@@ -434,7 +434,7 @@ TPM_RESULT TPM_ChangeAuthAsymFinish(TPM_KEY_HANDLE 
parentHandle,
-   tpm_hmac_final(&hmac_ctx, b1.digest);
-   /* 6. The TPM SHALL compare b1 with newAuthLink. The TPM SHALL
-         indicate a failure if the values do not match. */
--  if (memcmp(&b1, &newAuthLink, sizeof(TPM_HMAC))) {
-+  if (memcmp(&b1, newAuthLink, sizeof(TPM_HMAC))) {
-     debug("TPM_ChangeAuthAsymFinish(): newAuthLink value does not match.");
-     return TPM_FAIL;
-   }
-From 035af1df2b18afd695150c6f9e426133b775c0a1 Mon Sep 17 00:00:00 2001
-From: Florian Larysch <f...@n621.de>
-Date: Tue, 24 Oct 2017 19:33:00 +0200
-Subject: [PATCH] tpm_command_handler: fix switch fallthrough
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Compiling with a recent GCC fails as follows:
-
-  tpm-emulator/tpm/tpm_cmd_handler.c: In function ‘tpm_setup_rsp_auth’:
-  tpm-emulator/tpm/tpm_cmd_handler.c:3332:7: error: this statement may fall 
through [-Werror=implicit-fallthrough=]
-         tpm_hmac_final(&hmac, rsp->auth2->auth);
-         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-  tpm-emulator/tpm/tpm_cmd_handler.c:3333:5: note: here
-       case TPM_TAG_RSP_AUTH1_COMMAND:
-
-Looking at the code, this does indeed seem unintentional. Add a break
-state in the appropriate place.
----
- tpm/tpm_cmd_handler.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/tpm/tpm_cmd_handler.c b/tpm/tpm_cmd_handler.c
-index 288d1ce..5aea4e7 100644
---- a/tpm/tpm_cmd_handler.c
-+++ b/tpm/tpm_cmd_handler.c
-@@ -3330,6 +3330,7 @@ static void tpm_setup_rsp_auth(TPM_COMMAND_CODE ordinal, 
TPM_RESPONSE *rsp)
-                   sizeof(rsp->auth2->nonceOdd.nonce));
-       tpm_hmac_update(&hmac, (BYTE*)&rsp->auth2->continueAuthSession, 1);
-       tpm_hmac_final(&hmac, rsp->auth2->auth);
-+      break;
-     case TPM_TAG_RSP_AUTH1_COMMAND:
-       tpm_hmac_init(&hmac, rsp->auth1->secret, sizeof(rsp->auth1->secret));
-       tpm_hmac_update(&hmac, rsp->auth1->digest, sizeof(rsp->auth1->digest));
--- 
-2.16.4
-
-From 0f4579e913aeb3a893631a3caee420a0e9803683 Mon Sep 17 00:00:00 2001
-From: Peter Huewe <peterhu...@gmx.de>
-Date: Mon, 26 Jun 2017 00:25:43 +0200
-Subject: [PATCH] Workaround wrong fallthrough case by returning TPM_FAIL
-
-The spec says that the number of verified PCRs should be returned - which it 
currently does not and breaks compilation with gcc7
-See #26
-Since this code is probably unused anyway, we now simply return TPM_FAIL until 
someone comes up with a solution.
-
-Spec:
-https://www.trustedcomputinggroup.org/wp-content/uploads/Revision_7.02-_29April2010-tcg-mobile-trusted-module-1.0.pdf
----
- mtm/mtm_capability.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/mtm/mtm_capability.c b/mtm/mtm_capability.c
-index a09b116..4046de5 100644
---- a/mtm/mtm_capability.c
-+++ b/mtm/mtm_capability.c
-@@ -87,6 +87,8 @@ static TPM_RESULT cap_mtm_permanent_data(UINT32 subCapSize, 
BYTE *subCap,
-         tpm_free(*resp);
-         return TPM_FAIL;
-       }
-+      error("[TPM_CAP_MTM_PERMANENT_DATA] SubCap 2 not Implemented");
-+      return TPM_FAIL; // TODO not implemented.
- 
-     case 3:
-       return return_UINT32(respSize, resp,
--- 
-2.16.4
-

diff --git a/app-crypt/tpm-emulator/files/tpm-emulator.confd-0.7.4 
b/app-crypt/tpm-emulator/files/tpm-emulator.confd-0.7.4
deleted file mode 100644
index da24e57840b..00000000000
--- a/app-crypt/tpm-emulator/files/tpm-emulator.confd-0.7.4
+++ /dev/null
@@ -1,2 +0,0 @@
-STARTUP_MODE="save"
-#DEBUG="true"

diff --git a/app-crypt/tpm-emulator/files/tpm-emulator.initd-0.7.4 
b/app-crypt/tpm-emulator/files/tpm-emulator.initd-0.7.4
deleted file mode 100644
index 8d5b9be561b..00000000000
--- a/app-crypt/tpm-emulator/files/tpm-emulator.initd-0.7.4
+++ /dev/null
@@ -1,59 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License, v2 or later
-
-STARTUP_MODE='save';
-
-extra_started_commands="clear save deactivated"
-command="/usr/bin/tpmd"
-command_args="-o tss -g tss"
-
-depend() {
-       use logger
-       after coldplug
-}
-
-checkconfig() {
-       lsmod | grep -q "^tpmd_dev\b" \
-               || modprobe tpmd_dev &>/dev/null \
-               || eerror "Failed to load module tpmd_dev";
-
-       if [ ! -c /dev/tpm ] && [ ! -c /dev/tpm0 ] ; then
-               eerror "No TPM device found!"
-               return 1
-       fi
-       return 0
-}
-
-start() {
-       ebegin "Starting tpm-emulator daemon with mode '$STARTUP_MODE' (tpmd)"
-       checkconfig || eend $?
-       checkpath -d -m 0775 -o tss /var/run/tpm
-       start-stop-daemon --start --exec "${command}" -- ${command_args} 
$STARTUP_MODE > /dev/null
-       eend $?
-}
-
-stop() {
-       ebegin "Stopping tpm-emulator daemon (tpmd)"
-       start-stop-daemon --stop --exec "${command}" -- ${command_args} > 
/dev/null
-       eend $?
-}
-
-clear() {
-       STARTUP_MODE='clear';
-       stop
-       start
-}
-
-save() {
-       STARTUP_MODE='save';
-       stop
-       start
-}
-
-deactivated() {
-       STARTUP_MODE='deactivated';
-       stop
-       start
-}
-

diff --git a/app-crypt/tpm-emulator/tpm-emulator-0.7.4-r1.ebuild 
b/app-crypt/tpm-emulator/tpm-emulator-0.7.4-r1.ebuild
deleted file mode 100644
index 6fc770390fc..00000000000
--- a/app-crypt/tpm-emulator/tpm-emulator-0.7.4-r1.ebuild
+++ /dev/null
@@ -1,80 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-MODULES_OPTIONAL_USE="modules"
-inherit flag-o-matic user linux-mod cmake-utils udev
-
-MY_P=${P/-/_}
-DESCRIPTION="Emulator driver for tpm"
-HOMEPAGE="https://sourceforge.net/projects/tpm-emulator.berlios/";
-SRC_URI="mirror://sourceforge/tpm-emulator/${MY_P}.tar.gz"
-LICENSE="GPL-2"
-
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-
-IUSE="libressl ssl"
-RDEPEND="ssl? (
-               !libressl? ( dev-libs/openssl:0= )
-               libressl? ( dev-libs/libressl:0= )
-       )"
-DEPEND="${RDEPEND}
-       !ssl? ( dev-libs/gmp )"
-
-S=${WORKDIR}/${P/-/_}
-
-PATCHES=(
-       "${FILESDIR}/${P}-build.patch"
-)
-
-pkg_setup() {
-       enewgroup tss
-       enewuser tss -1 -1 /var/lib/tpm tss
-       if use modules; then
-               CONFIG_CHECK="MODULES"
-               linux-mod_pkg_setup
-               BUILD_TARGETS="all"
-               BUILD_PARAMS="KERNEL_BUILD=${KERNEL_DIR}"
-       fi
-}
-
-src_prepare() {
-       cmake-utils_src_prepare
-
-       # do not build and install the kernel module
-       sed -i 's/COMMAND ${tpmd_dev_BUILD_CMD}//' tpmd_dev/CMakeLists.txt || 
die
-       sed -i 's/install(CODE.*//' tpmd_dev/CMakeLists.txt || die
-}
-
-src_configure() {
-       local mycmakeargs=(
-               -DUSE_OPENSSL=$(usex ssl)
-       )
-       append-cflags -Wno-implicit-fallthrough
-       cmake-utils_src_configure
-
-       # only here we have BUILD_DIR
-       MODULE_NAMES="tpmd_dev(misc:${BUILD_DIR}/tpmd_dev/linux)"
-}
-
-src_compile() {
-       cmake-utils_src_compile
-       use modules && linux-mod_src_compile
-       emake -C "${BUILD_DIR}/tpmd_dev/linux" tpmd_dev.rules
-}
-
-src_install() {
-       cmake-utils_src_install
-       use modules && linux-mod_src_install
-
-       dodoc README
-
-       udev_newrules "${BUILD_DIR}/tpmd_dev/linux/tpmd_dev.rules" 
60-tpmd_dev.rules
-
-       newinitd "${FILESDIR}"/${PN}.initd-0.7.4 ${PN}
-       newconfd "${FILESDIR}"/${PN}.confd-0.7.4 ${PN}
-
-       keepdir /var/log/tpm
-       fowners tss:tss /var/log/tpm
-}

Reply via email to