summaryrefslogtreecommitdiff
path: root/app-crypt
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-09-15 17:37:09 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-09-15 17:37:09 +0100
commit586819755b4dbfdffdc8a725ab7c0f86095b8489 (patch)
treed6790c838cfe9607c996e4913fdf11bad5fdd528 /app-crypt
parent3f71901f8c228f4de570abed1831ce3ee425343e (diff)
gentoo resync : 15.09.2018
Diffstat (limited to 'app-crypt')
-rw-r--r--app-crypt/Manifest.gzbin23828 -> 23647 bytes
-rw-r--r--app-crypt/acme-tiny/Manifest6
-rw-r--r--app-crypt/acme-tiny/acme-tiny-4.0.4.ebuild48
-rw-r--r--app-crypt/acme-tiny/acme-tiny-9999.ebuild4
-rw-r--r--app-crypt/acme-tiny/metadata.xml4
-rw-r--r--app-crypt/bestcrypt/Manifest5
-rw-r--r--app-crypt/bestcrypt/bestcrypt-2.0.11.ebuild2
-rw-r--r--app-crypt/bestcrypt/bestcrypt-2.0.14.ebuild81
-rw-r--r--app-crypt/bestcrypt/files/bestcrypt-2.0.14-build.patch522
-rw-r--r--app-crypt/gkeys-gen/Manifest4
-rw-r--r--app-crypt/gkeys-gen/gkeys-gen-0.2.ebuild39
-rw-r--r--app-crypt/gkeys-gen/gkeys-gen-9999.ebuild56
-rw-r--r--app-crypt/gkeys-gen/metadata.xml8
-rw-r--r--app-crypt/glep63-check/Manifest6
-rw-r--r--app-crypt/glep63-check/glep63-check-4.ebuild29
-rw-r--r--app-crypt/glep63-check/glep63-check-5.ebuild26
-rw-r--r--app-crypt/glep63-check/glep63-check-6.ebuild2
-rw-r--r--app-crypt/kencfs-plasma/Manifest3
-rw-r--r--app-crypt/kencfs-plasma/files/kencfs-plasma-2.0.1_alpha-qt-5.11.patch11
-rw-r--r--app-crypt/kencfs-plasma/kencfs-plasma-2.0.1_alpha.ebuild7
-rw-r--r--app-crypt/rhash/Manifest4
-rw-r--r--app-crypt/rhash/rhash-1.3.5.ebuild94
-rw-r--r--app-crypt/rhash/rhash-1.3.6-r1.ebuild2
-rw-r--r--app-crypt/tpm-emulator/Manifest9
-rw-r--r--app-crypt/tpm-emulator/files/tpm-emulator-0.7.4-build.patch100
-rw-r--r--app-crypt/tpm-emulator/files/tpm-emulator-0.7.4-cmake.patch120
-rw-r--r--app-crypt/tpm-emulator/files/tpm-emulator.confd-r21
-rw-r--r--app-crypt/tpm-emulator/files/tpm-emulator.initd-r246
-rw-r--r--app-crypt/tpm-emulator/metadata.xml3
-rw-r--r--app-crypt/tpm-emulator/tpm-emulator-0.7.4-r1.ebuild4
-rw-r--r--app-crypt/tpm-emulator/tpm-emulator-0.7.4-r2.ebuild85
-rw-r--r--app-crypt/tpm-tools/Manifest1
-rw-r--r--app-crypt/tpm-tools/files/tpm-tools-1.3.9-gold.patch10
33 files changed, 1054 insertions, 288 deletions
diff --git a/app-crypt/Manifest.gz b/app-crypt/Manifest.gz
index a70554c9b869..e5c20df5bb5a 100644
--- a/app-crypt/Manifest.gz
+++ b/app-crypt/Manifest.gz
Binary files differ
diff --git a/app-crypt/acme-tiny/Manifest b/app-crypt/acme-tiny/Manifest
index 0cfb5b9b03f6..4d74d1d7c786 100644
--- a/app-crypt/acme-tiny/Manifest
+++ b/app-crypt/acme-tiny/Manifest
@@ -1,4 +1,6 @@
DIST acme-tiny-4.0.3.tar.gz 12662 BLAKE2B 6a17d0597731a5c8c1b260fa47396cb5bf8a223f44c8e498532b6e90a2ded35c5fcae058a8682e59ab060c1eeb27e09c8db8588e1d72cfd75b65f867d3e94f9a SHA512 bd37d4f878f2851c8e88acb78699b855cfd306928e2d70ef1d35dc9883d44dae3c7622e2114b1d5c4e0c5865b61ad3958a776467ab45eaedb0cf612530ca5dc7
+DIST acme-tiny-4.0.4.tar.gz 12667 BLAKE2B 6177d639a2d65080f84ca93400405c01ef18cb3c8d18ef5e7e57af1eede9d6f1e105ca7f6f89014e79c5cb1d865d3c81f590abdb37e8caa6b9699ea20064f698 SHA512 e66befe8262b3396e5e55ea01fc47c668c527868832d2ccdc2786156ec52e698fd20cb6fa4fe861d97947d64f4b6c751be9c79bf546eaac34978c53b9e6f85e4
EBUILD acme-tiny-4.0.3.ebuild 1140 BLAKE2B cb18452f2f0c95e4b44e66cc78ffb0ede2f91c08b3a672bb3d58185c655c3e7f4e2e8f51c2e7a0e98baf2c5b4ebaf4872e978877fd54c84ec033d342f14e41b1 SHA512 8c1e7e5596061aea3fdf3a7ee875ba9d6ce9cd87d9f70c8f7b5d38b0bf6d83a58284ae21355d0f956743bad5c3408cc9f4ade13547969ba2067e174482f59f1a
-EBUILD acme-tiny-9999.ebuild 1140 BLAKE2B cb18452f2f0c95e4b44e66cc78ffb0ede2f91c08b3a672bb3d58185c655c3e7f4e2e8f51c2e7a0e98baf2c5b4ebaf4872e978877fd54c84ec033d342f14e41b1 SHA512 8c1e7e5596061aea3fdf3a7ee875ba9d6ce9cd87d9f70c8f7b5d38b0bf6d83a58284ae21355d0f956743bad5c3408cc9f4ade13547969ba2067e174482f59f1a
-MISC metadata.xml 429 BLAKE2B 101ebd6c130b6955951254d1c7e759dbf7d5dc08d899c2bf1793e3e73ad2aec4761782d9bcbd708a42a0217cda22255fb645cc6f88792aa0a5445c6b2df79289 SHA512 7c0ff5126424ad18a75bd73fdab208397aedf79df6c6a3fc776efe1000ac9f41e3cd056e65da68fbba507940328c0308074ce9335c4be38a8197f7545728d9da
+EBUILD acme-tiny-4.0.4.ebuild 1130 BLAKE2B 3b42c017f4f5b36ee9a08eadd072900d7ca17e9d08c6a416bef23b01dfbad2635f23c3a1c479a88295d43c77ff7501875b5c053e2f95c935ab1da97ce24390de SHA512 c06d08483d92882d6a471f56522983cdb1316bbbd62c27f9b777053a2f8afd57e53eb1c96481f018cbc68c365244f375ff142a5d8c18695c37182dbe42cfa0cd
+EBUILD acme-tiny-9999.ebuild 1130 BLAKE2B 3b42c017f4f5b36ee9a08eadd072900d7ca17e9d08c6a416bef23b01dfbad2635f23c3a1c479a88295d43c77ff7501875b5c053e2f95c935ab1da97ce24390de SHA512 c06d08483d92882d6a471f56522983cdb1316bbbd62c27f9b777053a2f8afd57e53eb1c96481f018cbc68c365244f375ff142a5d8c18695c37182dbe42cfa0cd
+MISC metadata.xml 537 BLAKE2B 4a0d07d4bc178878c177385619bca1c65b90cd41ce91084f5a5d5652735e2d714b86404049aeec4a6b79358d565ff8d9b8ed7fef87c6713c7afe388c41bd1b9d SHA512 d223702ebf46114ad3b12e03f5bbb9b56741cf67f3c3f7c0421f5c7e8bd66f26aeb3dda7f93730f9166e11d29240b4c0471e83043290b8da15e1fe7e5204e4c1
diff --git a/app-crypt/acme-tiny/acme-tiny-4.0.4.ebuild b/app-crypt/acme-tiny/acme-tiny-4.0.4.ebuild
new file mode 100644
index 000000000000..184d1bfb35b9
--- /dev/null
+++ b/app-crypt/acme-tiny/acme-tiny-4.0.4.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
+inherit distutils-r1
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/diafygi/${PN}.git"
+ KEYWORDS=""
+else
+ SRC_URI="https://github.com/diafygi/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="A tiny, auditable script for Let's Encrypt's ACME Protocol"
+HOMEPAGE="https://github.com/diafygi/acme-tiny"
+
+LICENSE="MIT"
+SLOT="0"
+IUSE=""
+
+DEPEND="dev-python/setuptools_scm[${PYTHON_USEDEP}]"
+RDEPEND="dev-libs/openssl:0"
+
+pkg_setup() {
+ if [[ ${PV} != 9999 ]]; then
+ export SETUPTOOLS_SCM_PRETEND_VERSION="${PV}"
+ fi
+}
+
+src_prepare() {
+ sed -i 's|#!/usr/bin/sh|#!/bin/sh|g' README.md || die
+
+ distutils-r1_src_prepare
+}
+
+pkg_postinst() {
+ for v in ${REPLACING_VERSIONS}; do
+ if ver_test "$v" "-lt" "4.0.3" || ver_test "$v" "-ge" "9999"; then
+ einfo "The --account-email flag has been changed to --contact and"
+ einfo "has different syntax."
+ einfo "Please update your scripts accordingly"
+ fi
+ done
+}
diff --git a/app-crypt/acme-tiny/acme-tiny-9999.ebuild b/app-crypt/acme-tiny/acme-tiny-9999.ebuild
index b9815c348094..184d1bfb35b9 100644
--- a/app-crypt/acme-tiny/acme-tiny-9999.ebuild
+++ b/app-crypt/acme-tiny/acme-tiny-9999.ebuild
@@ -1,10 +1,10 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
-inherit distutils-r1 eapi7-ver
+inherit distutils-r1
if [[ ${PV} == 9999 ]]; then
inherit git-r3
diff --git a/app-crypt/acme-tiny/metadata.xml b/app-crypt/acme-tiny/metadata.xml
index 1e492cbeec20..b009e2c6b3e2 100644
--- a/app-crypt/acme-tiny/metadata.xml
+++ b/app-crypt/acme-tiny/metadata.xml
@@ -5,6 +5,10 @@
<email>NP-Hardass@gentoo.org</email>
<name>NP-Hardass</name>
</maintainer>
+ <maintainer type="person">
+ <email>vdupras@gentoo.org</email>
+ <name>Virgil Dupras</name>
+ </maintainer>
<longdescription>
A tiny, auditable script for Let's Encrypt's ACME Protocol
</longdescription>
diff --git a/app-crypt/bestcrypt/Manifest b/app-crypt/bestcrypt/Manifest
index eaa6ef5a3fab..ac6643c8106e 100644
--- a/app-crypt/bestcrypt/Manifest
+++ b/app-crypt/bestcrypt/Manifest
@@ -1,5 +1,8 @@
AUX bcrypt3 3197 BLAKE2B 5e9d721a5b4213fcc0e5eb4325c009685dee5bd8dd61f8b47ee1ca29e52faa12b3c6f3c9ab1bc283d7944f4f4178dc831a95348971bde439a7ae77f213df20dc SHA512 370c28c7289d86a0fbf639c85cb755fef10780f86daa4c5ce6071f32d7e36dea8e21f496e09e145c8c091042a70f3666df068611258a16a05d217d5ed355290b
+AUX bestcrypt-2.0.14-build.patch 16326 BLAKE2B 233e2f896feb159807de1be4e07fad6e97889198709010c5256b93044f1a13559b0a64e59d712c3ddd632f90ea34cf6631c257eac48409c7e0323e5e14a7ad63 SHA512 3ff5d6b69844562f16c1024bb7b409fdcd6f9889e6ea5b58a4ba5f43d04174fa5c60bd73f20eddf2687fea18a01ce06672880602b4b2604e6f014344a3da2911
AUX bestcrypt-2.0.6-build.patch 10878 BLAKE2B e7ab526bb514a7a28415cb8e7f109d224ddddc10bd09e9539a2f289b5933abb3fc90378c0a10275113b47d90f18578b8285aacfeb087a5052afd34c9407a6180 SHA512 34e150087fadfcdba5c05c0a4e1d2bfadbc448fe3214663c86ef3a692ec924da011ba11da3fb8f26692c2a52a6ce8c5edd8f20549de42c8dedf965cf3b74d530
DIST BestCrypt-2.0.11.tar.gz 2191182 BLAKE2B 5fe6d18b0c89273491fbcdb9bf7c73332342fca77cdf457c83f106f5cca693532eea6668e04f7c93828b3d5dc4419872066eda22fb10c780a838ddd78cf79255 SHA512 f6848153fc68690c116796bd5feb80dc1776f344327de5ac485dddc5b60280b491e2e5c9f266d6f30b7095396cd06b5bdad5d322b4ac24ab612ec642dbc08fe2
-EBUILD bestcrypt-2.0.11.ebuild 1791 BLAKE2B eebcc1898f07df120ae5ae0fcbef08971ba7abd93e9ca79520717cecbaaba1f4c7dd20515706e28ec23e762eb34caddd7ee56f11a5be2986bc2b1bcd2adf8749 SHA512 c15210495dccb9d40117d74b80a6e1d991f88916c7293207fcf1c16879b9379a6d486feeee8f6663d0be40026834521070a90d9c8433394a89d4a4cc20f25b98
+DIST BestCrypt-2.0.14.tar.gz 2211286 BLAKE2B 1ff777a72528ec22ca168492c335ec54be924b653323670619049cc9dfbcd144c28702bf857517c5189c937f3712e749c47ef14006a8883c63419b866b8f48f9 SHA512 1e542f00886413f1519ca5667bb297cce25a46fb5ec90a7e1a61934df3cd34e0d680f32e0b111727865459ef7d89d2761b379b4a557ada6d7ee3e47e32bf762c
+EBUILD bestcrypt-2.0.11.ebuild 1791 BLAKE2B 8ddd87293287ca899a4748973f470edb9fd887b2025cd5eacc93a456fd51750035d8c12909c100c0f0369da04d47155e4350a31ac5404c7cd2c9fb0f27ab818f SHA512 7178e4aee4eb74702220e2d1bb77515b2eb42a1aa6473a9adad7fd7c002013db1f6b3d9f0b018d11e3cfd9cb4a83427df7e950da6c1269bf6be195260e06571e
+EBUILD bestcrypt-2.0.14.ebuild 1911 BLAKE2B fcf07882b0dda33bc7014e21d5d7e87747fbb5b86e23d6aba06e7eb31fea1002712510a6992b98f5d82259a2db7f198fee46586dfffa26158614007e3bfb315c SHA512 f60822af5f150726cebd87ca3120f45dafc4ba2b4af98b8ee1dac3ecaa10898907362385acb555a48a997ec6c4c62a7457679b79cc3df5e834a3677cba591bcc
MISC metadata.xml 236 BLAKE2B a7bb92e6d53f7252ee56a885bf098930e228a76a75bca119358ca860901ceeecccc43efe5279c54250ebda58f77ae9c97d2ae540d8b399283cb3aa348111fcd2 SHA512 5f6cd6a85527534d5de7118de5af212ee3044c8c5530a7f7087a28074a2d4ab7be1728325bd985adc063dc795d3cf2b1c4e58a4c4c4ec02d739bd4bbc544ef08
diff --git a/app-crypt/bestcrypt/bestcrypt-2.0.11.ebuild b/app-crypt/bestcrypt/bestcrypt-2.0.11.ebuild
index 4ab00f225f3f..86e153ad106c 100644
--- a/app-crypt/bestcrypt/bestcrypt-2.0.11.ebuild
+++ b/app-crypt/bestcrypt/bestcrypt-2.0.11.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
diff --git a/app-crypt/bestcrypt/bestcrypt-2.0.14.ebuild b/app-crypt/bestcrypt/bestcrypt-2.0.14.ebuild
new file mode 100644
index 000000000000..350edde96ef8
--- /dev/null
+++ b/app-crypt/bestcrypt/bestcrypt-2.0.14.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit linux-mod toolchain-funcs versionator
+
+MY_PN="BestCrypt"
+DESCRIPTION="commercially licensed transparent filesystem encryption"
+HOMEPAGE="http://www.jetico.com/"
+SRC_URI="http://www.jetico.com/linux/${MY_PN}-${PV}.tar.gz"
+
+LICENSE="bestcrypt"
+SLOT="0"
+IUSE=""
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="virtual/linux-sources
+ app-shells/bash"
+RDEPEND=""
+
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+DOCS=(
+ HIDDEN_PART README
+)
+
+PATCHES=(
+ "${FILESDIR}/${P}-build.patch"
+)
+
+pkg_setup() {
+ CONFIG_CHECK="MODULES"
+ linux-mod_pkg_setup
+
+ MODULE_NAMES="bestcrypt(block::kernel/kmod)
+ bc_3des(crypto::kernel/kmod/crypto/algs/3des)
+ bc_bf128(crypto::kernel/kmod/crypto/algs/bf128)
+ bc_bf448(crypto::kernel/kmod/crypto/algs/bf448)
+ bc_blowfish(crypto::kernel/kmod/crypto/algs/blowfish)
+ bc_cast(crypto::kernel/kmod/crypto/algs/cast)
+ bc_des(crypto::kernel/kmod/crypto/algs/des)
+ bc_gost(crypto::kernel/kmod/crypto/algs/gost)
+ bc_idea(crypto::kernel/kmod/crypto/algs/idea)
+ bc_rijn(crypto::kernel/kmod/crypto/algs/rijn)"
+ BUILD_TARGETS="module"
+ BUILD_PARAMS=" \
+ BC_KERNEL_DIR=\"${KERNEL_DIR}\""
+}
+
+src_compile() {
+ MAKEOPTS="-j1" linux-mod_src_compile \
+ CXX="$(tc-getCXX)"
+ MAKEOPTS="-j1" emake \
+ CC="$(tc-getCC)" \
+ CXX="$(tc-getCXX)" \
+ AR="$(tc-getAR)" \
+ CFLAGS="${CXXFLAGS}" \
+ LDFLAGS="${LDFLAGS}"
+}
+
+src_install() {
+ linux-mod_src_install
+
+ emake install PREFIX="${ED}" install
+
+ newinitd "${FILESDIR}/bcrypt3" bcrypt
+ sed -e '/\(bc_rc6\|bc_serpent\|bc_twofish\)/d' -i "${D}etc/init.d/bcrypt"
+}
+
+pkg_postinst() {
+ linux-mod_pkg_postinst
+
+ ewarn
+ ewarn "The BestCrypt drivers are not free - Please purchace a license from "
+ ewarn "http://www.jetico.com/"
+ ewarn
+ ewarn "Upstream do not support this package any more, it was patched to"
+ ewarn "make it built. Use at your own risk!"
+ ewarn
+}
diff --git a/app-crypt/bestcrypt/files/bestcrypt-2.0.14-build.patch b/app-crypt/bestcrypt/files/bestcrypt-2.0.14-build.patch
new file mode 100644
index 000000000000..c4ce215e975a
--- /dev/null
+++ b/app-crypt/bestcrypt/files/bestcrypt-2.0.14-build.patch
@@ -0,0 +1,522 @@
+From 71bd6e496af5990836c34e4dd2d9d0107467349a Mon Sep 17 00:00:00 2001
+From: Alon Bar-Lev <alon.barlev@gmail.com>
+Date: Tue, 11 Sep 2018 18:49:17 +0300
+Subject: [PATCH 1/6] build: do not auto build/install module
+
+Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
+---
+ Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index ec0fd7e..d52f509 100644
+--- a/Makefile
++++ b/Makefile
+@@ -98,7 +98,7 @@ TESTS_TARGET = $(TARGET_DIR)/tests/bctool-tests
+ #
+
+ # default target builds console tool with modules
+-all: Makefile helpers module console
++all: Makefile helpers console
+ true
+
+ rebuild: clean all
+@@ -233,7 +233,7 @@ module-clean:
+ #
+
+ # install for default target
+-install: module-install console-install helpers-install
++install: console-install helpers-install
+
+ # used by RPM creation script
+ build-install: module-put-files console-install helpers-install
+--
+2.16.4
+
+From 42816e0a4e47e77f290b46460e35a1666748f8b0 Mon Sep 17 00:00:00 2001
+From: Alon Bar-Lev <alon.barlev@gmail.com>
+Date: Tue, 11 Sep 2018 19:35:26 +0300
+Subject: [PATCH 2/6] build: remove useless log
+
+Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
+---
+ certificate/CertificateLib/symmetricAlgs/cAlgRIJN.cpp | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/certificate/CertificateLib/symmetricAlgs/cAlgRIJN.cpp b/certificate/CertificateLib/symmetricAlgs/cAlgRIJN.cpp
+index 3c6fad8..9821073 100644
+--- a/certificate/CertificateLib/symmetricAlgs/cAlgRIJN.cpp
++++ b/certificate/CertificateLib/symmetricAlgs/cAlgRIJN.cpp
+@@ -78,14 +78,12 @@ cSymAlg * cAlgRIJN::createAlg( BYTE *key, int keySize ) // keySize in bytes
+ return alg;
+ }
+
+-#include "../../../../fs-lib/log.h"
+ int cAlgRIJN::encryptECB(
+ const BYTE *inBf, // Input plaintext buffer.
+ BYTE *outBf, // Output encrypted buffer
+ int bfSize // In/out buffers' size.
+ )
+ {
+- LIBLOG_INFO("");
+ int i;
+
+ if ((bfSize % BC_BLOCK_SIZE) != 0) return sae_invalidBlockSize;
+--
+2.16.4
+
+From a0ffdc5a135b549b62e1421fcf75d627e0394529 Mon Sep 17 00:00:00 2001
+From: Alon Bar-Lev <alon.barlev@gmail.com>
+Date: Tue, 11 Sep 2018 19:41:17 +0300
+Subject: [PATCH 3/6] build: do not strip binaries
+
+---
+ Makefile | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index d52f509..a93b850 100644
+--- a/Makefile
++++ b/Makefile
+@@ -243,9 +243,9 @@ uninstall: before-uninstall module-uninstall console-uninstall helpers-uninstall
+
+ helpers-install:
+ install -o root -m 0755 -d $(PREFIX)/sbin
+- install -o root -m 4755 -s $(TARGET_DIR)/bcmount_helper $(PREFIX)/sbin
+- install -o root -m 4755 -s $(TARGET_DIR)/bcumount_helper $(PREFIX)/sbin
+- install -o root -m 4755 -s $(TARGET_DIR)/bcrrpart_helper $(PREFIX)/sbin
++ install -o root -m 4755 $(TARGET_DIR)/bcmount_helper $(PREFIX)/sbin
++ install -o root -m 4755 $(TARGET_DIR)/bcumount_helper $(PREFIX)/sbin
++ install -o root -m 4755 $(TARGET_DIR)/bcrrpart_helper $(PREFIX)/sbin
+
+ helpers-uninstall:
+ rm -f $(PREFIX)/sbin/bcmount_helper
+@@ -267,7 +267,7 @@ before-uninstall:
+ .PHONY: console-install
+ console-install:
+ install -o root -m 0755 -d $(PREFIX)/usr/bin
+- install -o root -m 0755 -s build/bctool $(PREFIX)/usr/bin/
++ install -o root -m 0755 build/bctool $(PREFIX)/usr/bin/
+ install -o root -m 0755 -d $(PREFIX)/$(MAN_PATH)/man8
+ install -m 644 bctool.8 $(PREFIX)/$(MAN_PATH)/man8/
+
+--
+2.16.4
+
+From 7947ac3e152da1ed590364b7c8948deb602a5b50 Mon Sep 17 00:00:00 2001
+From: Alon Bar-Lev <alon.barlev@gmail.com>
+Date: Tue, 11 Sep 2018 18:52:32 +0300
+Subject: [PATCH 4/6] build: allow override programs
+
+Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
+---
+ Makefile | 11 +++++++----
+ certificate/CertificateLib/Makefile | 4 +++-
+ disk/Makefile | 6 ++++--
+ fslib/Makefile | 16 +++++++++-------
+ kernel/Makefile | 5 +++--
+ keygens/kgghost/Makefile | 7 +++++--
+ keygens/kgsha/Makefile | 7 +++++--
+ mount/Makefile | 9 +++++----
+ spacemap/Makefile | 6 ++++--
+ tests/Makefile | 12 ++++++------
+ 10 files changed, 51 insertions(+), 32 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index a93b850..d57ee79 100644
+--- a/Makefile
++++ b/Makefile
+@@ -56,6 +56,9 @@ KGSHA_LIB = $(KGSHA_BUILD_DIR)/lib$(KGSHA_LIB_NAME).a
+ KGGHOST_LIB = $(KGGHOST_BUILD_DIR)/lib$(KGGHOST_LIB_NAME).a
+ SPACEMAP_LIB = $(SPACEMAP_BUILD_DIR)/lib$(SPACEMAP_LIB_NAME).a
+
++CC = gcc
++CXX = g++
++
+ BC_EXTRA_CFLAGS= $(CFLAGS) -D_LARGE_FILES -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
+ BC_EXTRA_LDFLAGS = $(LDFLAGS)
+
+@@ -125,7 +128,7 @@ helpers: create-dirs
+ console: spacemap-lib certificate-lib fs-lib kernel-lib keygen-libs $(TARGET)
+ true
+ $(TARGET): $(BCTOOL_OBJS)
+- g++ $(BCTOOL_OBJS) $(BCTOOL_CFLAGS) $(BCTOOL_LDFLAGS) -o $(TARGET)
++ $(CXX) $(BCTOOL_OBJS) $(BCTOOL_CFLAGS) $(BCTOOL_LDFLAGS) -o $(TARGET)
+
+ # GUI executable only (w/o console and helpers)
+ panel: certificate-lib kernel-lib keygen-libs fs-lib
+@@ -339,10 +342,10 @@ module-uninstall:
+ bash ./scripts/remove_mods
+
+ %.o:%.cpp
+- g++ -c $(BCTOOL_CFLAGS) $< -o $@
++ $(CXX) -c $(BCTOOL_CFLAGS) $< -o $@
+
+ %.o:%.cc
+- g++ -c $(BCTOOL_CFLAGS) $< -o $@
++ $(CXX) -c $(BCTOOL_CFLAGS) $< -o $@
+
+ %.o:%.c
+- gcc -c $(BCTOOL_CFLAGS) $< -o $@
++ $(CC) -c $(BCTOOL_CFLAGS) $< -o $@
+diff --git a/certificate/CertificateLib/Makefile b/certificate/CertificateLib/Makefile
+index 06353bc..19b772c 100644
+--- a/certificate/CertificateLib/Makefile
++++ b/certificate/CertificateLib/Makefile
+@@ -1,5 +1,7 @@
+
+-CP = cp
++CC = gcc
++CXX = g++
++AR = ar
+ CFLAGS += -Wall -fPIC -fno-strict-aliasing
+ CXXFLAGS = -Wall -fPIC
+ #-Werror
+diff --git a/disk/Makefile b/disk/Makefile
+index e3915b0..1a9ff01 100644
+--- a/disk/Makefile
++++ b/disk/Makefile
+@@ -1,14 +1,16 @@
+ DISKMON_OBJS = disk.o diskmon.o
++
++CXX = g++
+ CFLAGS += -Wall -I. -I../ -p -gdwarf-2 #-DBC_DEBUG
+ LDFLAGS += -ludev
+
+ all:diskmon Makefile
+
+ diskmon:$(DISKMON_OBJS)
+- g++ $(DISKMON_OBJS) $(LDFLAGS) -o diskmon
++ $(CXX) $(DISKMON_OBJS) $(LDFLAGS) -o diskmon
+
+ %.o:%.cc
+- g++ $(CFLAGS) -c $< -o $@
++ $(CXX) $(CFLAGS) -c $< -o $@
+
+ clean:
+ rm -rf diskmon *.o
+diff --git a/fslib/Makefile b/fslib/Makefile
+index 9b99e89..0075a9f 100644
+--- a/fslib/Makefile
++++ b/fslib/Makefile
+@@ -1,3 +1,5 @@
++CC = gcc
++AR = ar
+
+ FSLIB_CFLAGS = $(CFLAGS) -Wall -fPIC -O0 -DFSLIB_DEBUG -g # -O3
+ FSLIB_CFLAGS += -I. -D_LARGE_FILES -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 #-fvisibility=hidden
+@@ -17,25 +19,25 @@ FSLIB_TOOLS = file_hfs test_hfs test_info test_free_space diskinfo
+ all: Makefile $(FSLIB) $(FSLIB_TOOLS)
+
+ $(FSLIB): $(OBJS)
+- ar rcs $(FSLIB) $(OBJS)
++ $(AR) rcs $(FSLIB) $(OBJS)
+
+ test_hfs: $(FSLIB) test/test_hfs.o
+- gcc test/test_hfs.o $(OBJS) $(FSLIB_LDFLAGS) -o test_hfs
++ $(CC) test/test_hfs.o $(OBJS) $(FSLIB_LDFLAGS) -o test_hfs
+
+ file_hfs: $(FSLIB) test/file_hfs.o
+- gcc test/file_hfs.o $(OBJS) $(FSLIB_LDFLAGS) -o file_hfs
++ $(CC) test/file_hfs.o $(OBJS) $(FSLIB_LDFLAGS) -o file_hfs
+
+ test_info: $(FSLIB) test/test_info.o
+- gcc test/test_info.o $(OBJS) $(FSLIB_LDFLAGS) -o test_info
++ $(CC) test/test_info.o $(OBJS) $(FSLIB_LDFLAGS) -o test_info
+
+ test_free_space: $(FSLIB) test/test_free_space.o
+- gcc test/test_free_space.o $(FSLIB_CFLAGS) $(OBJS) $(FSLIB_LDFLAGS) -o test_free_space
++ $(CC) test/test_free_space.o $(FSLIB_CFLAGS) $(OBJS) $(FSLIB_LDFLAGS) -o test_free_space
+
+ diskinfo: $(FSLIB) test/diskinfo.o
+- gcc test/diskinfo.o $(OBJS) $(FSLIB_LDFLAGS) -g -o diskinfo
++ $(CC) test/diskinfo.o $(OBJS) $(FSLIB_LDFLAGS) -g -o diskinfo
+
+ .c.o:
+- gcc $(FSLIB_CFLAGS) -c $< -o $@
++ $(CC) $(FSLIB_CFLAGS) -c $< -o $@
+
+ clean:
+ rm -rf *~ *.o test/*.o $(OBJS) $(FSLIB) $(FSLIB_TOOLS)
+diff --git a/kernel/Makefile b/kernel/Makefile
+index 1a71617..4f9760d 100644
+--- a/kernel/Makefile
++++ b/kernel/Makefile
+@@ -3,6 +3,7 @@ OBJECTS = $(SOURCES:.cc=.o)
+ TARGET_DIR = ./build/
+ TARGET = $(TARGET_DIR)/libbckernel.a
+ BC_CFLAGS = $(BC_EXTRA_CFLAGS) -fPIC -c -Wall -ludev -L../build/ -lspacemap -I../ -fvisibility=hidden #-fvisibility-inlines-hidden
++CXX = g++
+
+
+ ### Build ###
+@@ -21,12 +22,12 @@ module: create-dirs force_look
+
+ kernel-lib: create-dirs $(TARGET)
+ $(TARGET): $(OBJECTS)
+- ar rcs $(TARGET) $(OBJECTS)
++ $(AR) rcs $(TARGET) $(OBJECTS)
+
+ $(OBJECTS): Makefile $(SOURCES) BCKernel.h
+ set -e; \
+ for i in $(SOURCES); do \
+- g++ -c $(BC_CFLAGS) $$i -o $${i%.cc}.o; \
++ $(CXX) -c $(BC_CFLAGS) $$i -o $${i%.cc}.o; \
+ done
+
+ create-dirs: $(TARGET_DIR)
+diff --git a/keygens/kgghost/Makefile b/keygens/kgghost/Makefile
+index 65c4bf6..a7b0af8 100644
+--- a/keygens/kgghost/Makefile
++++ b/keygens/kgghost/Makefile
+@@ -5,10 +5,13 @@ KGGHOST_OBJS = hash.o pbe.o keyblock.o datablock.o kgghost.o
+ KGGHOST_CFLAGS = -Wall -fPIC -p -ggdb -I. -I../../ -I../../certificate -DBC_LINUX
+ KGGHOST_CFLAGS += $(BC_EXTRA_CFLAGS)
+
++CXX = g++
++AR = ar
++
+ all: $(KGGHOST) Makefile
+
+ $(KGGHOST):$(KGGHOST_OBJS) $(CERTIFICATE_LIB)
+- ar rcs $(KGGHOST) $(KGGHOST_OBJS)
++ $(AR) rcs $(KGGHOST) $(KGGHOST_OBJS)
+
+ $(CERTIFICATE_LIB):
+ make -C ../../certificate/CertificateLib
+@@ -17,7 +20,7 @@ $(KERNEL_LIB):
+ make -C ../../kernel/build
+
+ %.o:%.cpp
+- g++ $(KGGHOST_CFLAGS) -c -o $@ $<
++ $(CXX) $(KGGHOST_CFLAGS) -c -o $@ $<
+
+ clean:
+ rm -f *.o *.ver *~ $(KGGHOST)
+diff --git a/keygens/kgsha/Makefile b/keygens/kgsha/Makefile
+index d3a33d0..9c8c688 100644
+--- a/keygens/kgsha/Makefile
++++ b/keygens/kgsha/Makefile
+@@ -10,10 +10,13 @@ KGSHA_OBJS = hash.o datablock.o kgsha.o
+ KGSHA_CFLAGS = -Wall -fPIC -p -gdwarf-2 -I. -I../../ -I../../certificate -DBC_LINUX
+ KGSHA_CFLAGS += $(EXTRA_CFLAGS)
+
++CXX = g++
++AR = ar
++
+ all: $(KGSHA) $(KGSHA_OBJS) Makefile hidden_sector.h defs.h datablock.h
+
+ $(KGSHA): $(KGSHA_OBJS) $(CERTIFICATE_LIB) $(KERN_LIB)
+- ar rcs $(KGSHA) $(KGSHA_OBJS)
++ $(AR) rcs $(KGSHA) $(KGSHA_OBJS)
+
+ $(CERT_LIB):
+ make -C ../../certificate/CertificateLib
+@@ -22,7 +25,7 @@ $(KERN_LIB):
+ make -C ../../kernel/
+
+ %.o:%.cpp
+- g++ $(KGSHA_CFLAGS) -c -o $@ $<
++ $(CXX) $(KGSHA_CFLAGS) -c -o $@ $<
+
+ clean:
+ rm -f *.o *.ver *~ $(KGSHA)
+diff --git a/mount/Makefile b/mount/Makefile
+index 7a3d66b..0e60095 100644
+--- a/mount/Makefile
++++ b/mount/Makefile
+@@ -1,22 +1,23 @@
+
+ HELPERS = bcrrpart_helper bcmount_helper bcumount_helper
+
++CC = gcc
+ OBJS = common.o
+ CFLAGS += -Wall -O3
+
+ all: $(HELPERS) Makefile
+
+ bcrrpart_helper: $(OBJS) rrpart.o
+- gcc $(OBJS) rrpart.o $(LDFLAGS) -o bcrrpart_helper
++ $(CC) $(OBJS) rrpart.o $(LDFLAGS) -o bcrrpart_helper
+
+ bcmount_helper: $(OBJS) mount.o
+- gcc $(OBJS) mount.o $(LDFLAGS) -o bcmount_helper
++ $(CC) $(OBJS) mount.o $(LDFLAGS) -o bcmount_helper
+
+ bcumount_helper: $(OBJS) umount.o
+- gcc $(OBJS) umount.o $(LDFLAGS) -o bcumount_helper
++ $(CC) $(OBJS) umount.o $(LDFLAGS) -o bcumount_helper
+
+ %.o:%.c
+- gcc $(CFLAGS) -c -o $@ $<
++ $(CC) $(CFLAGS) -c -o $@ $<
+
+ clean:
+ rm -f *.o *.ver *~ $(HELPERS)
+diff --git a/spacemap/Makefile b/spacemap/Makefile
+index 6dff240..7dd2ad9 100644
+--- a/spacemap/Makefile
++++ b/spacemap/Makefile
+@@ -5,17 +5,19 @@ LIB_NAME = spacemap
+ STATIC_TARGET = lib$(LIB_NAME).a
+ OBJECT_CFLAGS = -fPIC -g -c -Wall -ludev -fvisibility=hidden #-fvisibility-inlines-hidden
+
++CXX = g++
++AR = ar
+
+ all: static
+ true
+
+ static: $(OBJECTS)
+- ar rcs $(STATIC_TARGET) $(OBJECTS)
++ $(AR) rcs $(STATIC_TARGET) $(OBJECTS)
+
+ $(OBJECTS): $(SOURCES)
+ set -e; \
+ for i in $(SOURCES); do \
+- g++ $(OBJECT_CFLAGS) $$i -o $${i%.c}.o; \
++ $(CXX) $(OBJECT_CFLAGS) $$i -o $${i%.c}.o; \
+ done
+
+ clean:
+diff --git a/tests/Makefile b/tests/Makefile
+index c6d78f0..419020b 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -2,8 +2,8 @@ TESTS_PWD = ../build/tests/
+ TESTS_TARGET = $(TESTS_PWD)/bctool-tests
+ TESTS_SOURCES = tests-main.c ../container/cipher.cc ../keygens/kgsha/datablock.cpp ../keygens/kgsha/hash.cpp ../container/linux/file.cpp
+ TESTS_CFLAGS = -I../ -I../certificate/ -L../build/ -L../build/kernel/ -DBC_LINUX -ludev -g
+-CP = gcc
+-CPP = g++
++CC = gcc
++CXX = g++
+ CERT_LIB_NAME = certificate
+ KERN_LIB_NAME = bckernel
+ SPACEMAP_LIB_NAME = spacemap
+@@ -15,11 +15,11 @@ all: $(TESTS_TARGET)
+ cp insert-modules.sh remove-modules.sh bcmod-loaded.sh $(TESTS_PWD)
+
+ $(TESTS_TARGET): $(TESTS_SOURCES) Makefile
+- $(CPP) -o $(TESTS_TARGET) $(TESTS_CFLAGS) $(TESTS_SOURCES) -l$(CERT_LIB_NAME) -l$(KERN_LIB_NAME) -l$(SPACEMAP_LIB_NAME) -lcunit -ludev
++ $(CXX) -o $(TESTS_TARGET) $(TESTS_CFLAGS) $(TESTS_SOURCES) -l$(CERT_LIB_NAME) -l$(KERN_LIB_NAME) -l$(SPACEMAP_LIB_NAME) -lcunit -ludev
+ cp kernel/print-struct-size.c $(TESTS_PWD)
+- $(CP) -o $(TESTS_PWD)test-data-generator kernel/test-data-generator.c $(TESTS_CFLAGS) -l$(KERN_LIB_NAME) -l$(SPACEMAP_LIB_NAME)
+- $(CPP) -o $(TESTS_PWD)kgsha-key-generator kgsha/kgsha-data-generator.cpp ../keygens/kgsha/datablock.cpp ../keygens/kgsha/hash.cpp ../container/cipher.cc $(TESTS_CFLAGS) -l$(KERN_LIB_NAME) -l$(CERT_LIB_NAME) -l$(SPACEMAP_LIB_NAME)
+- $(CP) -o $(TESTS_PWD)/bcdevchecker bcdevchecker.c
++ $(CC) -o $(TESTS_PWD)test-data-generator kernel/test-data-generator.c $(TESTS_CFLAGS) -l$(KERN_LIB_NAME) -l$(SPACEMAP_LIB_NAME)
++ $(CXX) -o $(TESTS_PWD)kgsha-key-generator kgsha/kgsha-data-generator.cpp ../keygens/kgsha/datablock.cpp ../keygens/kgsha/hash.cpp ../container/cipher.cc $(TESTS_CFLAGS) -l$(KERN_LIB_NAME) -l$(CERT_LIB_NAME) -l$(SPACEMAP_LIB_NAME)
++ $(CC) -o $(TESTS_PWD)/bcdevchecker bcdevchecker.c
+
+ clean:
+ rm -rf $(TESTS_PWD)
+--
+2.16.4
+
+From a7e9a6048e443b0a592c56b1b48e66d20092cf76 Mon Sep 17 00:00:00 2001
+From: Alon Bar-Lev <alon.barlev@gmail.com>
+Date: Tue, 11 Sep 2018 19:34:59 +0300
+Subject: [PATCH 5/6] build: add missing sys/sysmacros.h
+
+Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
+---
+ mount/common.c | 1 +
+ mount/mount.c | 1 +
+ mount/rrpart.c | 1 +
+ 3 files changed, 3 insertions(+)
+
+diff --git a/mount/common.c b/mount/common.c
+index 0a14ea4..d88394e 100644
+--- a/mount/common.c
++++ b/mount/common.c
+@@ -9,6 +9,7 @@
+ #include <stdarg.h>
+ #include <errno.h>
+ #include <unistd.h>
++#include <sys/sysmacros.h>
+ #include <sys/types.h>
+ #include <sys/wait.h>
+ #include <sys/stat.h>
+diff --git a/mount/mount.c b/mount/mount.c
+index c57594f..7c802fe 100644
+--- a/mount/mount.c
++++ b/mount/mount.c
+@@ -10,6 +10,7 @@
+ #include <string.h>
+ #include <unistd.h>
+ #include <errno.h>
++#include <sys/sysmacros.h>
+ #include <sys/types.h>
+ #include <sys/wait.h>
+ #include <sys/stat.h>
+diff --git a/mount/rrpart.c b/mount/rrpart.c
+index f7ce125..7ba5692 100644
+--- a/mount/rrpart.c
++++ b/mount/rrpart.c
+@@ -13,6 +13,7 @@
+ #include <unistd.h>
+ #include <sys/ioctl.h>
+ #include <sys/stat.h>
++#include <sys/sysmacros.h>
+ #include <sys/types.h>
+ #include <linux/fs.h>
+
+--
+2.16.4
+
+From 9cb62cc4cbe9cb929aa1fca34d3d807a4e83bcca Mon Sep 17 00:00:00 2001
+From: Alon Bar-Lev <alon.barlev@gmail.com>
+Date: Tue, 11 Sep 2018 19:12:13 +0300
+Subject: [PATCH 6/6] modules: build for kernel-4.14
+
+Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
+---
+ kernel/kmod/bc_dev.c | 4 +++-
+ kernel/kmod/bc_mem.c | 1 +
+ spacemap/defs.h | 1 +
+ 3 files changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/kernel/kmod/bc_dev.c b/kernel/kmod/bc_dev.c
+index cddbf49..8b5657b 100644
+--- a/kernel/kmod/bc_dev.c
++++ b/kernel/kmod/bc_dev.c
+@@ -86,9 +86,11 @@ static void reject_bio(struct bio *bio)
+ {
+ #if (LINUX_VERSION_CODE < KERNEL_VERSION(4,3,0))
+ bio_endio(bio, -EIO);
+-#else
++#elif (LINUX_VERSION_CODE < KERNEL_VERSION(4,14,0))
+ bio->bi_error = -EIO;
+ bio_endio(bio);
++#else
++ bio_io_error(bio);
+ #endif
+ }
+
+diff --git a/kernel/kmod/bc_mem.c b/kernel/kmod/bc_mem.c
+index 0b516c8..69ec832 100644
+--- a/kernel/kmod/bc_mem.c
++++ b/kernel/kmod/bc_mem.c
+@@ -6,6 +6,7 @@
+ #include <linux/init.h>
+ #include <linux/slab.h>
+ #include <linux/kernel.h>
++#include <linux/sched.h>
+ #include <asm/uaccess.h>
+
+ #define BC_GET_CALLER_PTR __builtin_return_address(0)
+diff --git a/spacemap/defs.h b/spacemap/defs.h
+index f0c87ba..7de9052 100644
+--- a/spacemap/defs.h
++++ b/spacemap/defs.h
+@@ -17,6 +17,7 @@
+ #include <linux/kernel.h>
+ #include <linux/module.h>
+ #include <linux/slab.h>
++#include <linux/sched.h>
+ #include <asm/uaccess.h>
+
+ typedef int8_t bc_8;
+--
+2.16.4
+
diff --git a/app-crypt/gkeys-gen/Manifest b/app-crypt/gkeys-gen/Manifest
deleted file mode 100644
index aa46a0446a01..000000000000
--- a/app-crypt/gkeys-gen/Manifest
+++ /dev/null
@@ -1,4 +0,0 @@
-DIST gkeys-gen-0.2.tar.bz2 19160 BLAKE2B db8ab42b7001cc9189a34291bb22f36344dd1d5a74030269e4675cde83c511cf497f412e8194564c945e322adac421d79441a3914520ee0af39725f4162db65a SHA512 ca46d8cc32f80ac98dfafc0b6ab3e543dc0cb4ee6db2938917d4c6f4fada980996e1ddd48f3ffe563893b973b5763e7016a66f67d4a2f8eb57ee227b1e71a1c2
-EBUILD gkeys-gen-0.2.ebuild 1079 BLAKE2B c6c69e80abf52bcba0aa4e2a847469b71a77c88cc5922c9d8a183ffdf00e4a0d559efb36ad618bda2439d55b1eb0a3082d1a14870c0c9b2749832d083143fb2b SHA512 6d54c3cd59f2e6611560618a4c882f0f3ef8b0089ab177a333ebb3489b3232a673d9b5a71409c1e2812b7fb88dcb3ae7f5d5d994be867938402be326f000c3cc
-EBUILD gkeys-gen-9999.ebuild 1463 BLAKE2B 4e8e5dcaad669a3120fb00303b6b25fb3fe9b057cabba41c81e5cba32ab6fcf0dc926e6f484ac1389bf584af067417f711941d21d52f41c9cdf87f7129895afc SHA512 346dd2dff96e942a89ba549509465ace606421a427593075500f02cc3cf98b158cc1148dd6d919432c9a52931f910f82799f0c8b51cd23a22d9ee450e07ae6cb
-MISC metadata.xml 257 BLAKE2B cf62bcaddae6a9a234fa866aa93f3f8435bc640ded3947993321f8a85e622a2cc0d3df0290bec76b227a4286544314e6a31dc37026482541b4922d6dc11d174a SHA512 62e56bca988936416042bb794e7c8dad9930a46c1f81f51c60a22f3f43e2d0babaacdbef430a6f8ecc8ea7d949effa6136b6d066dabb0a80fde55c36ea3c080c
diff --git a/app-crypt/gkeys-gen/gkeys-gen-0.2.ebuild b/app-crypt/gkeys-gen/gkeys-gen-0.2.ebuild
deleted file mode 100644
index b6b52f863d31..000000000000
--- a/app-crypt/gkeys-gen/gkeys-gen-0.2.ebuild
+++ /dev/null
@@ -1,39 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-PYTHON_COMPAT=(python{2_7,3_4,3_5,3_6})
-
-inherit distutils-r1
-
-DESCRIPTION="Tool for generating OpenPGP/GPG keys using a specifications file"
-HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Gentoo-keys"
-SRC_URI="https://dev.gentoo.org/~dolsen/releases/${PN}/${P}.tar.bz2"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE=""
-
-KEYWORDS="~amd64 ~arm64 ~x86"
-
-DEPEND=""
-RDEPEND="${DEPEND}
- app-crypt/gnupg
- dev-python/snakeoil[${PYTHON_USEDEP}]
- dev-python/pygpgme[${PYTHON_USEDEP}]
- =app-crypt/gkeys-0.2*[${PYTHON_USEDEP}]
- "
-
-pkg_postinst() {
- einfo "This is experimental software."
- einfo "The API's it installs should be considered unstable"
- einfo "and are subject to change."
- einfo
- einfo "Please file any enhancement requests, or bugs"
- einfo "at https://bugs.gentoo.org"
- einfo "We are also on IRC @ #gentoo-keys of the Freenode network"
- einfo
- ewarn "There may be some Python 3 compatibility issues still."
- ewarn "Please help us debug, fix and report them in Bugzilla."
-}
diff --git a/app-crypt/gkeys-gen/gkeys-gen-9999.ebuild b/app-crypt/gkeys-gen/gkeys-gen-9999.ebuild
deleted file mode 100644
index e72ae2a0bd3a..000000000000
--- a/app-crypt/gkeys-gen/gkeys-gen-9999.ebuild
+++ /dev/null
@@ -1,56 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-PYTHON_COMPAT=(python{2_7,3_4,3_5,3_6})
-
-EGIT_BRANCH="master"
-#EGIT_BRANCH="gen-update"
-
-inherit distutils-r1 git-r3
-
-EGIT_REPO_URI="git://anongit.gentoo.org/proj/gentoo-keys.git"
-#EGIT_REPO_URI="https://github.com/gentoo/gentoo-keys.git"
-
-DESCRIPTION="Tool for generating OpenPGP/GPG keys using a specifications file"
-HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Gentoo-keys"
-SRC_URI=""
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE=""
-
-KEYWORDS=""
-
-DEPEND=""
-RDEPEND="${DEPEND}
- app-crypt/gnupg
- dev-python/snakeoil[${PYTHON_USEDEP}]
- dev-python/pygpgme[${PYTHON_USEDEP}]
- =app-crypt/gkeys-9999[${PYTHON_USEDEP}]
- "
-
-S="${WORKDIR}/$P/gkeys-gen"
-
-python_prepare_all() {
- distutils-r1_python_prepare_all
- # copy these 2 into our subdir from the master level
- cp ../LICENSE ./ || die "cp LICENSE failed"
- cp ../README.md ./ || die "cp README.me failed"
- cp -R ../py2man ./ || die "cp-R py2man failed"
-}
-
-pkg_postinst() {
- einfo
- einfo "This is experimental software."
- einfo "The API's it installs should be considered unstable"
- einfo "and are subject to change."
- einfo
- einfo "Please file any enhancement requests, or bugs"
- einfo "at https://bugs.gentoo.org"
- einfo "We are also on IRC @ #gentoo-keys of the freenode network"
- einfo
- ewarn "There may be some python 3 compatibility issues still."
- ewarn "Please help debug/fix/report them in bugzilla."
-}
diff --git a/app-crypt/gkeys-gen/metadata.xml b/app-crypt/gkeys-gen/metadata.xml
deleted file mode 100644
index 1937e8c82b4b..000000000000
--- a/app-crypt/gkeys-gen/metadata.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="project">
- <email>gkeys@gentoo.org</email>
- <name>Gentoo-keys Project Team</name>
- </maintainer>
-</pkgmetadata>
diff --git a/app-crypt/glep63-check/Manifest b/app-crypt/glep63-check/Manifest
index f992158e4f21..a7ba239f1222 100644
--- a/app-crypt/glep63-check/Manifest
+++ b/app-crypt/glep63-check/Manifest
@@ -1,7 +1,3 @@
-DIST glep63-check-4.tar.gz 5898 BLAKE2B b28dd0843138bb54c81142959a28b121b043b7da4e3dc797b8ad3ebabfde6f850a11c40e94e3d20b9cf152b2138165733ba36754859081eb59bbbd5e99f2b98e SHA512 65a40ce097937df0517f86d1b32fd47e23d39abc6a49fa45dfa9075e7f7a163c2c2e25f6e39538a5e47c295bfdb2390bc4909e14a06b21f2bf14edf8cf43f199
-DIST glep63-check-5.tar.gz 61234 BLAKE2B 15b2e38e00ec044c963f4aaea9be4bf0659441a94ba9958aa1e70ecd425cc9f3dada31ab194092abdf9953ca10d711aa0cdd615365a6e78761b07fb0739fadd5 SHA512 d79a2e2a92dc4f123fbfa73df501fb9a0829a879e0d3674e8d6a854b8a2b437698b77793d92c6862d646a58ef302638cb9e5d152f60e634c9ec06e804dea79b4
DIST glep63-check-6.tar.gz 61318 BLAKE2B 9310a70556deabf90003c154c326480e7a5fb58992bf79201100c21fbbeb17ebfdb560d861586d1c206a8d4ed3e64500a8eca4d99dacd072dce121736cdb2d3e SHA512 f0729683095222f60243923bcb7d9c1b984eb10cb0d8a0da2ec756b40a11c3f4f3de466fa533a66d4f645a2de09137a12a47eda5e80d7d5d562b0926a30b1a72
-EBUILD glep63-check-4.ebuild 603 BLAKE2B b062189a109fb0227031fba2c627065b8badf676f9b2db60d8e1b847dc59e3e801ea392a47c2d67e7eb801b44df689f3dc486cef33496c62baaeb387f4821e59 SHA512 65ec1371049758b84c7f50f3afc3042df99ead045cfeafd4e61beae02ba36bab4802b1ffce8ee94ccdf32bf7c993b4d1f9f1b872d631640549e0be449e64c72d
-EBUILD glep63-check-5.ebuild 643 BLAKE2B 72915256273a72d0f55c1a7b8ffa0cf778304ebcdeca731ecef29669f051193cf86927bd79bc3aea45d7382afaffe05e01f71cfcb008fb02f75b917cf81dbefd SHA512 24bbf7e9b7589c6cdd3de5c6bf4000d4464f539943e84398524331f26e873a3b04d722aae65bf528cf94a105fd4a8b3651c9f449af9c48810620507bd4411dce
-EBUILD glep63-check-6.ebuild 665 BLAKE2B bee30971b92dfd8f54b3ed5e97accaab4fd5b90f5ac6304c389e3b3279402042d13c9499e646d2b3f007121927edd9bc8a7e9eaf8e7eef2a1ef5ea58491507a5 SHA512 b9c90d5f74e37de3ffaf0c1da2d5b80c368aead33b7036fd6530e39b774ca8f801f04a08e9976fe9774214032d139a84fdfc9df2f7d88276ae7d4e5da5d97e2b
+EBUILD glep63-check-6.ebuild 663 BLAKE2B 542b4dcfd5756bb0b4afa6cd26d5b58a9eff9eb51c3a937716235111e0670ebb858550faf6ed4aa17bfb6db2383f72c908110ba9db52d55e260a6d32d9ffc2b8 SHA512 07d47d7bc0c08a32f383b3e5b679ee5bbe615f5b94473c60fc45be5a2a0a2bdc89acee0eeab5ecedb23af92d24af95ed0470e149dbd836fbc6ccec9ca5ed55f9
MISC metadata.xml 513 BLAKE2B dc5036a6556ebfefbbfc1ad01f436b9793c5c0c51e7cbda49ee896ff364a30761f92ec63531317b4bd55bb9cc018d6ee62d07776a61ba75d7d1245c3d0c1339a SHA512 44aac823dedeb848696d166e28d151449b59d30a7dd87a0c2c339c044e2704908a1882e3b818ad7007822b5fd2efc52ad81564fad953862851b44480d61642fe
diff --git a/app-crypt/glep63-check/glep63-check-4.ebuild b/app-crypt/glep63-check/glep63-check-4.ebuild
deleted file mode 100644
index 58a8418fc785..000000000000
--- a/app-crypt/glep63-check/glep63-check-4.ebuild
+++ /dev/null
@@ -1,29 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python3_{4,5,6,7} )
-
-inherit python-single-r1
-
-DESCRIPTION="GLEP 63 compliance checker for OpenPGP keys"
-HOMEPAGE="https://github.com/mgorny/glep63-check/"
-SRC_URI="https://github.com/mgorny/glep63-check/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="BSD-2"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE=""
-REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-
-RDEPEND="${PYTHON_DEPS}
- app-crypt/gnupg"
-
-src_compile() {
- python_fix_shebang glep63-check
-}
-
-src_install() {
- dobin glep63-check
-}
diff --git a/app-crypt/glep63-check/glep63-check-5.ebuild b/app-crypt/glep63-check/glep63-check-5.ebuild
deleted file mode 100644
index b1ee063dd914..000000000000
--- a/app-crypt/glep63-check/glep63-check-5.ebuild
+++ /dev/null
@@ -1,26 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python3_{4,5,6,7} pypy3 )
-
-inherit distutils-r1
-
-DESCRIPTION="GLEP 63 compliance checker for OpenPGP keys"
-HOMEPAGE="https://github.com/mgorny/glep63-check/"
-SRC_URI="https://github.com/mgorny/glep63-check/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="BSD-2"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="test"
-REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-RESTRICT="!test? ( test )"
-
-RDEPEND="app-crypt/gnupg"
-DEPEND="test? ( ${RDEPEND} )"
-
-python_test() {
- "${EPYTHON}" -m unittest -v || die "Tests fail with ${EPYTHON}"
-}
diff --git a/app-crypt/glep63-check/glep63-check-6.ebuild b/app-crypt/glep63-check/glep63-check-6.ebuild
index 0719917e3491..5ab0f5494960 100644
--- a/app-crypt/glep63-check/glep63-check-6.ebuild
+++ b/app-crypt/glep63-check/glep63-check-6.ebuild
@@ -13,7 +13,7 @@ SRC_URI="https://github.com/mgorny/glep63-check/archive/v${PV}.tar.gz -> ${P}.ta
LICENSE="BSD-2"
SLOT="0"
-KEYWORDS="~amd64 ~x86"
+KEYWORDS="amd64 x86"
IUSE="test"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
RESTRICT="!test? ( test )"
diff --git a/app-crypt/kencfs-plasma/Manifest b/app-crypt/kencfs-plasma/Manifest
index 687bd6e7f0c2..32345da1e065 100644
--- a/app-crypt/kencfs-plasma/Manifest
+++ b/app-crypt/kencfs-plasma/Manifest
@@ -1,4 +1,5 @@
AUX kencfs-plasma-2.0.1_alpha-include.patch 267 BLAKE2B 75755d4ce83b8146efd2a956b44a5f42d936d94189df2157d8be27abf35c252540fd27a7884290a1397b4b9b477a94cab146f3fe21d9e20740ebdc86d8142842 SHA512 74646bab28c76db89d441e7528ad288f44522dc20f53b5b12b8140d1a61c86d9ae0fb9f559d37fe1de912f176a366000d77b67a3fe3657a3428304a2ce2a29a1
+AUX kencfs-plasma-2.0.1_alpha-qt-5.11.patch 396 BLAKE2B 5bd9e8c3c4e93c263bb00e680d485818ece4667a8de3cbb1f69327571ac5187a7b7ab150b206f88636993042aa5f30bb181b762ff26ece18330f60e1eda6e741 SHA512 3b86d1dc9c92dfc8d0c323cedb2c4f34f34a4af0c136baa2d64a4ac3ff0aa35eb7a54e41c7381490f205fb045bf4a2f924fbfaed47009d10b8b114b1ad9b5bf1
DIST kencfs-plasma-2.0.1a.tar.gz 216580 BLAKE2B 7c8e77e3019d48d37437f2031c5c522b30c89a927ca3a51571e42decaa004a5cfb3c5b84d50ee1c775599943a23cc58a7b994e94e0e316a7539d793004d05035 SHA512 a9093680bb141c18e2d4ed8a966f7176c40c10fa0ee6e5cee25ae26ef3f94e6ffc7e3f0a7b55321640e4ba6e484d75755f901b53688dbfc5c22a1c0b1e01cfac
-EBUILD kencfs-plasma-2.0.1_alpha.ebuild 942 BLAKE2B 4ca9785f0e0def0703c03ce90e9154173b8c858c577c16df38de034f3ee416563d3f61048520d90411f680d8c40579b4a3c2e79c648b0234192baa159b02d66b SHA512 bdc8261ada220cf77dac4f95ccbb38354e2b4d67e8219367ae3a949b1724a53d2c32e8c9381010d1449d73f85087d2feea00ec87c88d13671825f7d6d420d17e
+EBUILD kencfs-plasma-2.0.1_alpha.ebuild 977 BLAKE2B 2880062dec1da7f43ecd416a408573c1c9932d50849024c217b52e3c16f3204624664ad78d5ea51e0b54661fcc05936e554b2504b3fe51007bccceda40fd2ad0 SHA512 d32e9d8a840803f4fad642be55d905ee135bbff2bf29a9ec5be932415b54b7747fbd3475b37ec4f24fb9db9bf932a5ec10f8fd0ab8d880ebbf8c0c87c9cbd5dd
MISC metadata.xml 249 BLAKE2B ad415db89e5dee1627aa77f44ded9d4e1e5b8217d06c7ca25bbaa3fe92ce67c2b1090957c45a821b407d7927e5af798498aa6a5b903895ee1af8ee20a446c7f7 SHA512 76a5a340b13f0053ca3c5e94ed24380ea8d29b45ac8655419e22eaadb1e4a827c04d2e7e36b65145c4964e6526f656618fc6ac144e277ef53cb7373e6239e3c3
diff --git a/app-crypt/kencfs-plasma/files/kencfs-plasma-2.0.1_alpha-qt-5.11.patch b/app-crypt/kencfs-plasma/files/kencfs-plasma-2.0.1_alpha-qt-5.11.patch
new file mode 100644
index 000000000000..3efc5e418383
--- /dev/null
+++ b/app-crypt/kencfs-plasma/files/kencfs-plasma-2.0.1_alpha-qt-5.11.patch
@@ -0,0 +1,11 @@
+--- a/kencfs-plasma.pro 2017-02-05 10:09:37.000000000 +0100
++++ b/kencfs-plasma.pro 2018-09-11 19:43:41.594198503 +0200
+@@ -15,7 +15,7 @@
+
+ TRANSLATIONS = kencfs_it_IT.ts kencfs_ro_RO.ts kencfs_cs_CZ.ts kencfs_ru_RU.ts
+
+-QT += widgets KWallet KConfigCore KNotifications
++QT += dbus widgets KWallet KConfigCore KNotifications
+ CONFIG += qtsingleapplication
+
+ include(singleapplication.pri)
diff --git a/app-crypt/kencfs-plasma/kencfs-plasma-2.0.1_alpha.ebuild b/app-crypt/kencfs-plasma/kencfs-plasma-2.0.1_alpha.ebuild
index 5b6df0f1ffd6..96a0de750d2a 100644
--- a/app-crypt/kencfs-plasma/kencfs-plasma-2.0.1_alpha.ebuild
+++ b/app-crypt/kencfs-plasma/kencfs-plasma-2.0.1_alpha.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -30,7 +30,10 @@ RDEPEND="${DEPEND}
S=${WORKDIR}/${MY_P}
-PATCHES=( "${FILESDIR}/${P}-include.patch" )
+PATCHES=(
+ "${FILESDIR}/${P}-include.patch"
+ "${FILESDIR}/${P}-qt-5.11.patch"
+)
src_prepare() {
default
diff --git a/app-crypt/rhash/Manifest b/app-crypt/rhash/Manifest
index bbda4da7497f..85dd3aaeabf2 100644
--- a/app-crypt/rhash/Manifest
+++ b/app-crypt/rhash/Manifest
@@ -2,8 +2,6 @@ AUX darwin-triplet.patch 657 BLAKE2B cb710ca481e9a45d593ab857dc10ff8baf6c3bc5fbd
AUX freebsd-triplet.patch 800 BLAKE2B 43f1f7e1fa43313e2f323a3e5031a463185c2388a3b59c75f1a3a216d6ce6e04be9cb584ffe3c44773c072408740c02354dec4969d42d6abd824a1fc633fa4dd SHA512 7f66e6ab4bdc21959e00b8ad21aaa13eab6d11552d92e8978ce5c501339a3ddf0b303f47ae5fce4056522ffea90cef3d25c5dc5d6469e7bbffa078526e1c7404
AUX rhash-1.3.6-no_echon.patch 1224 BLAKE2B 949b6aa839667a6fef3c3a668b6cadc451986ba837807b3d7a56b80f50c8248d734745f886d40d341a99fefaf439f95bdeb0382ee15ea9e4f8561f98703fba2d SHA512 3771077c64c28b1fcf310d7a449d3e1eb951d1669b2ad3ddffe76d98ac5821ea8af40013984c65f28c7fce3434b7173a74a77120847f557cab2dedefac0c8b58
AUX unquote-cc.patch 791 BLAKE2B a872b7a8e8d2e04f5cf3dda0b4f4aa5e0177878942f9836f8a431d950392dafb46be646048a0ab4dc4a31ac20b6676fa8627b39bbb30a990861cf8d3cfc742f8 SHA512 7a4c2bf019cbcde021bb79572abdbc9b42f995ada5bb9798fed127d79c44ed9d4b9544c1413952604b1dd45ed307acdacba6675419f6331d75ecf34c15b8f5ca
-DIST rhash-1.3.5-src.tar.gz 316867 BLAKE2B 3ffbf2ec5aef24ef63455e21c3efcae043a321a78be522a26bd25086111430071a496ab3775ff9b4956da7304df8d8e552a061f3306a7a683be5fc65ea3fd1c4 SHA512 e8450aab0c16bfb975bf4aeee218740fb4d86d5514e426b70c3edb84e4d63865cd4051939aa95c24a87a78baaedc49e40bb509b2610e89ca3745930808b3ef6c
DIST rhash-1.3.6-src.tar.gz 328097 BLAKE2B c74993d183f0f2e479f0bd5831a9f653b9bd17bbed4d1ba896f6e33db98b7141175cd3c688dc41dfd8ec4b98acb51255ae5b795435cbc9dfb5ab77573cb25543 SHA512 54f7f238ed1fdc01c29cc1338fa86be90b69beff0df8f20d24ce9cb3c48c7f4668b84a3fe0d4d8b04b54bc8145485d493435edf3219de3a637af0f9c007c85c6
-EBUILD rhash-1.3.5.ebuild 2696 BLAKE2B bcaedcbbf9641101617be2014b44a0ab0155f856f6382090e7195154e5a15a0709478eaf14ab1e79962da2ae2d9b5fbad7e9ceeee3f344293b678c6a032d7a05 SHA512 2c0553f10b23946c4edc61ef9db1b1f9fc99eed8dff2bbfaca85cf85929aec4c31df308cbafa94dd2c91f86a380933d79ffb5a4b46901dcdc4399272639f759f
-EBUILD rhash-1.3.6-r1.ebuild 1912 BLAKE2B c7e48f20c2d057a6988e74b8ecbe855371a0efe1424c8220a6e4fad185a36af4bcd5671c9dfb67a5f37ab9d54efe06296a4a6f169c3ec088df496a2a6f230060 SHA512 5a34204f9d95417c2ddd3769d6f893e051cbe3f651f93307c856044ea7ae82e39a08beb09a7fc148f33c25a41c60e062e4cdb173763fde64febe7bd47d4b0323
+EBUILD rhash-1.3.6-r1.ebuild 1911 BLAKE2B ebd95d432f02cc62a83a75468056b3f179bd53ffe2a12d00231429c2e5c90b6ac50460526c60f185c208044d51118f67c816008f9fb2664732b7f9a445f73bda SHA512 68a950a830dae095e6c5e21c2a2ed58525564b31399093e1ba001ca6e5cf9dcf9603e0afe75ae00d068d1c873c4a7565af8a2176d9a847d640e48dbd503baa91
MISC metadata.xml 753 BLAKE2B 09d65c4222a77b9cdab0e82e8b3a38a63762c9e691285f712e09e99ecf28937d70436ac0dc56a890ea1f6ca9981c7f02383ce92a0da6a0c5ca11af2b3598e77e SHA512 d9a8480839af7651eb09b1210b2b0f736d01018cd1863eb17f24f0f51024c234f6f5036745f2034e89bcbd85f396b194184fc987adba43d9d0bebfa0b65d635a
diff --git a/app-crypt/rhash/rhash-1.3.5.ebuild b/app-crypt/rhash/rhash-1.3.5.ebuild
deleted file mode 100644
index b086054c04a1..000000000000
--- a/app-crypt/rhash/rhash-1.3.5.ebuild
+++ /dev/null
@@ -1,94 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit toolchain-funcs multilib-minimal
-
-DESCRIPTION="Console utility and library for computing and verifying file hash sums"
-HOMEPAGE="http://rhash.anz.ru/"
-SRC_URI="mirror://sourceforge/${PN}/${P}-src.tar.gz"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-IUSE="debug nls libressl ssl static-libs"
-
-RDEPEND="
- ssl? (
- !libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
- libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
-)"
-
-DEPEND="${RDEPEND}
- nls? ( sys-devel/gettext )"
-
-S="${WORKDIR}/RHash-${PV}"
-
-src_prepare() {
- default
-
- # Install /etc stuff inside the Prefix
- sed -i -e 's:\$(DESTDIR)/etc:\$(DESTDIR)/$(SYSCONFDIR):g' Makefile || die
-
- if use elibc_Darwin ; then
- local ver_script='-Wl,--version-script,exports.sym,-soname,$(SONAME)'
- local install_name='-install_name $(LIBDIR)/$(SONAME)'
- sed -i -e '/^\(SONAME\|SHAREDLIB\)/s/\.so\.\([0-9]\+\)/.\1.dylib/' \
- -e '/^SOLINK/s/\.so/.dylib/' \
- -e "s:${ver_script}:${install_name}:" \
- librhash/Makefile \
- Makefile || die
- fi
-
- if use elibc_SunOS ; then
- # https://sourceware.org/bugzilla/show_bug.cgi?id=12548
- # skip the export.sym for now
- sed -i -e 's/,--version-script,exports.sym//' librhash/Makefile || die
- fi
-
- multilib_copy_sources
-}
-
-multilib_src_compile() {
- local ADDCFLAGS=(
- $(use debug || echo -DNDEBUG)
- $(use nls && echo -DUSE_GETTEXT)
- $(use ssl && echo -DOPENSSL_RUNTIME -rdynamic)
- )
-
- local ADDLDFLAGS=(
- $(use ssl && echo -ldl)
- )
-
- use elibc_Darwin || use elibc_DragonFly || use elibc_FreeBSD ||
- use elibc_NetBSD || use elibc_OpenBSD || use elibc_SunOS &&
- ADDLDFLAGS+=( $(use nls && echo -lintl) )
-
- emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC="$(tc-getCC)" \
- ADDCFLAGS="${ADDCFLAGS[*]}" ADDLDFLAGS="${ADDLDFLAGS[*]}" \
- PREFIX="${EPREFIX}"/usr LIBDIR='$(PREFIX)'/$(get_libdir) \
- build-shared $(use static-libs && echo lib-static)
-}
-
-myemake() {
- emake DESTDIR="${D}" PREFIX="${EPREFIX}"/usr \
- LIBDIR='$(PREFIX)'/$(get_libdir) SYSCONFDIR="${EPREFIX}"/etc "${@}"
-}
-
-multilib_src_install() {
- myemake -C librhash install-lib-shared install-so-link
- multilib_is_native_abi && myemake install-shared
- use static-libs && myemake install-lib-static
-}
-
-multilib_src_install_all() {
- myemake -C librhash install-headers
- use nls && myemake install-gmo
- einstalldocs
-}
-
-multilib_src_test() {
- cd tests || die
- LD_LIBRARY_PATH=$(pwd)/../librhash ./test_rhash.sh --full ../rhash_shared || die "tests failed"
-}
diff --git a/app-crypt/rhash/rhash-1.3.6-r1.ebuild b/app-crypt/rhash/rhash-1.3.6-r1.ebuild
index c3e0ea290ebb..96a05fea2520 100644
--- a/app-crypt/rhash/rhash-1.3.6-r1.ebuild
+++ b/app-crypt/rhash/rhash-1.3.6-r1.ebuild
@@ -11,7 +11,7 @@ SRC_URI="mirror://sourceforge/${PN}/${P}-src.tar.gz"
LICENSE="MIT"
SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ia64 ~mips ppc ppc64 s390 ~sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 arm arm64 ~hppa ia64 ~mips ppc ppc64 s390 ~sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
IUSE="debug nls libressl ssl static-libs"
RDEPEND="
diff --git a/app-crypt/tpm-emulator/Manifest b/app-crypt/tpm-emulator/Manifest
index 9c29df35b675..723e3eedd01d 100644
--- a/app-crypt/tpm-emulator/Manifest
+++ b/app-crypt/tpm-emulator/Manifest
@@ -1,5 +1,10 @@
+AUX tpm-emulator-0.7.4-build.patch 3995 BLAKE2B 23a0c34f3d34c3cf154b22a2cf6c79216e580d298a31657f2d247b58ebdeadd00923340656885931c86777385916cc5df3e55c05704d9c213a46673ca5999483 SHA512 852d7fc90c558c37dec6409e09cbe6e94494cba023d7de38702e475e698f9210ff2cb937f51751b25ea48015421c556d1fe71dafdcb6764d2e6fe938d61f4a4b
+AUX tpm-emulator-0.7.4-cmake.patch 3358 BLAKE2B 27c1fbe5cd55f5838f9010c2d38f2037492f562553c5ed99eb3bcbea41dc2d899d42fef73b7f86b7c1cac12a9a5a43273e97834d5c3b4b9436157e7292d876ef SHA512 3d46f18957ab569e927ade7c3b08aa94f01beeafbe80a2cf3601f07492355bb354f060b8e3f9aeb52de8aa2f2db7f26faec635191b00b9d5adc33c5d7caeada1
AUX tpm-emulator.confd-0.7.4 34 BLAKE2B 39d858219bf12309c361bd65070df3a941de10d073e3014e0196bc3f100c605a7be1700c1e25d46fa94a27778c453732e9102be3fe11260f6b3bf617c47bb5ec SHA512 61b5145d3fa5b778ba09e66a25ea183165fafbdafe54aa77d171aed2a87f6b5febc918d33603a9bf58320e9ff3f79e3ec58d03d4674562d31c1c90b942faf504
+AUX tpm-emulator.confd-r2 20 BLAKE2B 13dd9f09a0a4efb9a039bfeababb5f00b8b2c3c1777e60c531e874ef6f3b4d00319d7962bd321f8530289c797ea110f6cde91bc6af338e38be7d96f71f6474cb SHA512 824d35e037f1036d53353bd0e2bf9136cd94d07a71df9ebdf32a513ff53a47b25e38e3b760e58c18909559f1adbea2faae615c25f2cf9f1df03eef8582648bcc
AUX tpm-emulator.initd-0.7.4 1100 BLAKE2B 19736ff8ad067390adb951f4b3f30656bf7345f36cba51b5a96114f3acc069391f3c4e7ecbb563f2ad6fbb25263b950b907c130b5dd0a6523a607a264de61469 SHA512 5fab6f4c9b7057fa1bf23b179747d125ec77729a1a69b762735c429824ce6dfee3033012b027a44e5c731ec86a4e78b8b64c44d27b207867a26a9663382a84f9
+AUX tpm-emulator.initd-r2 776 BLAKE2B 0daa0247396d1b5f1c9542b28f825899a5cc45bd748b6b7e2328440fd466fd6b461e32487a955816a79827bf350cfb33bd71a6b197a8e67dbf5509750098cb59 SHA512 22d7b163dc6f567c1900a275ae545c4421b2d459ba535a24f48d7ad2609f5df36533849aa781d4dd704961db102eea08c99b79c01d0e3981fb46d2eb4e39d6fe
DIST tpm_emulator-0.7.4.tar.gz 214145 BLAKE2B b8bbd53ecfb90e87f1306c03d2c65a472819d23d10bd63fa966bfadef4776c3876c2f6fc03cc878ece670bdfcd22c9f403ef4bc7f4593a0a6c7f8d17051ac3ba SHA512 4928b5b82f57645be9408362706ff2c4d9baa635b21b0d41b1c82930e8c60a759b1ea4fa74d7e6c7cae1b7692d006aa5cb72df0c3b88bf049779aa2b566f9d35
-EBUILD tpm-emulator-0.7.4-r1.ebuild 1737 BLAKE2B a8ff1382b655c0ea570b6556cbd75b28861c134137cd445275fe2179267489f3a3d186147de12b9202cb7a1c2d739d41858a794c002a8ec85760d0f143ce1d0a SHA512 47949e2e597729de90b51559d554054d791b54cf4c7d50fd81e44f3e0c71cf79de6b690bf88616cc08c80c094add93849440f248327a0c4df8fe9a50c09164a8
-MISC metadata.xml 322 BLAKE2B c136948fea0130f683bd8ff1c52e03707b801a446859dd4e03ee34965ccf5babd69f28c437f5b568a6f9e308669b23c49127a3592ef702fa06323f368f1fd8fc SHA512 59ca2140630f6c408c51176a30ad8357ecaf8c1a3b37b495176b25cf2b1cb259882dded5072440cfbfe2d16741520a0b30b41384db89c794ec183b318419b578
+EBUILD tpm-emulator-0.7.4-r1.ebuild 1782 BLAKE2B 766796e9f5db7c701066ff52467e2b8449734ce31315425347771f9184bf28d2670b76f792467cfac0f4f222c50cdc708a11b9116ac0869696614e3d4a1798aa SHA512 ba22734b8c2f1fbe625b286c7fb2e08ebf2df3e201d5b9a2d30ea55a29284ecdf57f016e0b16b61f9d470021536cd5938da134f68380da458bbfc3bb7987f145
+EBUILD tpm-emulator-0.7.4-r2.ebuild 1920 BLAKE2B 415390b4a1f31e8b12fd9504afab57fd53890228862a5d0285a6519612b07e86001a0ad3f2c33d0754414bc2430fb8eafe04a5d6d3c2d4668a116c409ff2d748 SHA512 f1d93be8e078e8232f58e82ccc1da9ad3262982c930299484fd09d9fe059e616448ff459b10ea9aa76de1a41eb2d6ac466323548e3f7830b2458486a769cb889
+MISC metadata.xml 395 BLAKE2B 053fec93e12819e95abadca4f2e9f871589c21ce8a7369092cfb04cb593a4fa687956458dfc2c7249b6951bb3b7c45f6c38fac1448d9e5d250ed8256f92df327 SHA512 dd69f6a31ebaa3971c316d967bd643654d11465bb0de20059ea82a4851691b605c42deb4846614627ae9c8b2b30075e6c44e53f9810999839ceaf2e9ee9aada8
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
new file mode 100644
index 000000000000..ada748f7129a
--- /dev/null
+++ b/app-crypt/tpm-emulator/files/tpm-emulator-0.7.4-build.patch
@@ -0,0 +1,100 @@
+From ca99fe81c8aee204c1a8b7f3ca264130e54d9418 Mon Sep 17 00:00:00 2001
+From: Alon Bar-Lev <alon.barlev@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 <fl@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 <peterhuewe@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-0.7.4-cmake.patch b/app-crypt/tpm-emulator/files/tpm-emulator-0.7.4-cmake.patch
new file mode 100644
index 000000000000..7fd775139b2d
--- /dev/null
+++ b/app-crypt/tpm-emulator/files/tpm-emulator-0.7.4-cmake.patch
@@ -0,0 +1,120 @@
+
+Pull request:
+https://github.com/PeterHuewe/tpm-emulator/pull/37
+
+
+From 694b7c24ac09e0ec1e54ab71eb9c82a8d4f41d33 Mon Sep 17 00:00:00 2001
+From: Alon Bar-Lev <alon.barlev@gmail.com>
+Date: Tue, 11 Sep 2018 14:08:49 +0300
+Subject: [PATCH 1/3] build: use GNUInstallDirs to allow override install
+ directories
+
+Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
+---
+ CMakeLists.txt | 1 +
+ tddl/CMakeLists.txt | 6 +++---
+ tpmd/unix/CMakeLists.txt | 2 +-
+ 3 files changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f362298..d047ce3 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -6,6 +6,7 @@
+ project(TPM_Emulator C)
+
+ cmake_minimum_required(VERSION 2.4)
++include(GNUInstallDirs)
+ set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
+ if(COMMAND cmake_policy)
+ cmake_policy(SET CMP0003 NEW)
+diff --git a/tddl/CMakeLists.txt b/tddl/CMakeLists.txt
+index 0be3281..6cc63b3 100644
+--- a/tddl/CMakeLists.txt
++++ b/tddl/CMakeLists.txt
+@@ -15,9 +15,9 @@ elseif(WIN32)
+ set_target_properties(tddl PROPERTIES PREFIX "")
+ endif()
+
+-install(TARGETS tddl DESTINATION lib)
+-install(TARGETS tddl_static DESTINATION lib)
+-install(FILES "tddl.h" DESTINATION include)
++install(TARGETS tddl DESTINATION ${CMAKE_INSTALL_LIBDIR})
++install(TARGETS tddl_static DESTINATION ${CMAKE_INSTALL_LIBDIR})
++install(FILES "tddl.h" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
+
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR})
+ add_executable(test_tddl test_tddl.c)
+diff --git a/tpmd/unix/CMakeLists.txt b/tpmd/unix/CMakeLists.txt
+index 40c436b..c5c394a 100644
+--- a/tpmd/unix/CMakeLists.txt
++++ b/tpmd/unix/CMakeLists.txt
+@@ -13,5 +13,5 @@ target_link_libraries(tpmd mtm tpm tpm_crypto)
+ else()
+ target_link_libraries(tpmd tpm tpm_crypto)
+ endif()
+-install(TARGETS tpmd RUNTIME DESTINATION bin)
++install(TARGETS tpmd RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+
+--
+2.16.4
+
+From 89bf733368dda265040cf44ff8be69a15ab66712 Mon Sep 17 00:00:00 2001
+From: Alon Bar-Lev <alon.barlev@gmail.com>
+Date: Tue, 11 Sep 2018 16:36:12 +0300
+Subject: [PATCH 2/3] build: do not build mtm unless enabled
+
+Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
+---
+ CMakeLists.txt | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index d047ce3..b8b68a3 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -67,7 +67,9 @@ include_directories(${CMAKE_BINARY_DIR})
+
+ # add internal libraries
+ add_subdirectory(tpm)
+-add_subdirectory(mtm)
++if(MTM_EMULATOR)
++ add_subdirectory(mtm)
++endif()
+ add_subdirectory(crypto)
+
+ # add TDDL
+--
+2.16.4
+
+From 24bbf683de0b0b24f0ec81d093c03e1f6a9570f2 Mon Sep 17 00:00:00 2001
+From: Alon Bar-Lev <alon.barlev@gmail.com>
+Date: Tue, 11 Sep 2018 14:20:19 +0300
+Subject: [PATCH 3/3] build: support BUILD_DEV to disable device build
+
+Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
+---
+ CMakeLists.txt | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index b8b68a3..9ae6562 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -76,7 +76,12 @@ add_subdirectory(crypto)
+ add_subdirectory(tddl)
+
+ # add kernel modules
+-add_subdirectory(tpmd_dev)
++if(NOT DEFINED BUILD_DEV)
++ set(BUILD_DEV ON)
++endif()
++if(BUILD_DEV)
++ add_subdirectory(tpmd_dev)
++endif()
+
+ # add executables
+ add_subdirectory(tpmd)
+--
+2.16.4
+
diff --git a/app-crypt/tpm-emulator/files/tpm-emulator.confd-r2 b/app-crypt/tpm-emulator/files/tpm-emulator.confd-r2
new file mode 100644
index 000000000000..985fa4e774ca
--- /dev/null
+++ b/app-crypt/tpm-emulator/files/tpm-emulator.confd-r2
@@ -0,0 +1 @@
+STARTUP_MODE="save"
diff --git a/app-crypt/tpm-emulator/files/tpm-emulator.initd-r2 b/app-crypt/tpm-emulator/files/tpm-emulator.initd-r2
new file mode 100644
index 000000000000..abfbef900d00
--- /dev/null
+++ b/app-crypt/tpm-emulator/files/tpm-emulator.initd-r2
@@ -0,0 +1,46 @@
+#!/sbin/openrc-run
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+STARTUP_MODE="${STARTUP_MODE:-save}";
+
+extra_started_commands="clear save deactivated"
+description="TPM emulator"
+command="/usr/bin/tpmd"
+my_command_args="-f"
+command_background=1
+command_user="tss:tss"
+pidfile="/var/run/${RC_SVCNAME}.pid"
+
+depend() {
+ use logger
+ after coldplug
+}
+
+start_pre() {
+ checkpath -d -m 0775 -o tss /var/run/tpm
+ service_set_value STARTUP_MODE "${STARTUP_MODE}"
+}
+
+start() {
+ command_args="${my_command_args} $(service_get_value STARTUP_MODE)"
+ default_start
+}
+
+_doit() {
+ service_set_value STARTUP_MODE "$1"
+ stop
+ start
+}
+
+clear() {
+ _doit clear
+}
+
+save() {
+ _doit save
+}
+
+deactivated() {
+ _doit deactivated
+}
diff --git a/app-crypt/tpm-emulator/metadata.xml b/app-crypt/tpm-emulator/metadata.xml
index e3da96029705..401103a0692f 100644
--- a/app-crypt/tpm-emulator/metadata.xml
+++ b/app-crypt/tpm-emulator/metadata.xml
@@ -8,4 +8,7 @@
<upstream>
<remote-id type="sourceforge">tpm-emulator</remote-id>
</upstream>
+ <use>
+ <flag name="mtm-emulator">Build the MTM emulator</flag>
+ </use>
</pkgmetadata>
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
index 0192de92e2f6..6fc770390fcf 100644
--- a/app-crypt/tpm-emulator/tpm-emulator-0.7.4-r1.ebuild
+++ b/app-crypt/tpm-emulator/tpm-emulator-0.7.4-r1.ebuild
@@ -24,6 +24,10 @@ DEPEND="${RDEPEND}
S=${WORKDIR}/${P/-/_}
+PATCHES=(
+ "${FILESDIR}/${P}-build.patch"
+)
+
pkg_setup() {
enewgroup tss
enewuser tss -1 -1 /var/lib/tpm tss
diff --git a/app-crypt/tpm-emulator/tpm-emulator-0.7.4-r2.ebuild b/app-crypt/tpm-emulator/tpm-emulator-0.7.4-r2.ebuild
new file mode 100644
index 000000000000..9c7003c115f7
--- /dev/null
+++ b/app-crypt/tpm-emulator/tpm-emulator-0.7.4-r2.ebuild
@@ -0,0 +1,85 @@
+# 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 mtm-emulator 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"
+ "${FILESDIR}/${P}-cmake.patch"
+)
+
+pkg_setup() {
+ enewgroup tss
+ enewuser tss -1 -1 /var/lib/tpm tss
+ if use modules; then
+ CONFIG_CHECK="MODULES"
+ MODULE_NAMES="tpmd_dev(extra:tpmd_dev/linux:)"
+ BUILD_TARGETS="all tpmd_dev.rules"
+ BUILD_PARAMS="KERNEL_BUILD=${KERNEL_DIR}"
+ linux-mod_pkg_setup
+ fi
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DUSE_OPENSSL=$(usex ssl ON OFF)
+ -DMTM_EMULATOR=$(usex mtm-emulator ON OFF)
+ -DBUILD_DEV=OFF
+ )
+ cmake-utils_src_configure
+
+ use modules && ln -s "${BUILD_DIR}/config.h" tpmd_dev/linux
+}
+
+src_compile() {
+ cmake-utils_src_compile
+ use modules && linux-mod_src_compile
+}
+
+src_install() {
+ cmake-utils_src_install
+ if use modules; then
+ linux-mod_src_install
+ udev_newrules "tpmd_dev/linux/tpmd_dev.rules" 60-tpmd_dev.rules
+ fi
+
+ newinitd "${FILESDIR}/${PN}.initd-r2" "${PN}"
+ newconfd "${FILESDIR}/${PN}.confd-r2" "${PN}"
+
+ keepdir /var/log/tpm
+ fowners tss:tss /var/log/tpm
+}
+
+pkg_postinst() {
+ if use modules; then
+ linux-mod_pkg_postinst
+
+ ewarn ""
+ ewarn "The new init.d script does not load the tpmd_dev any more as it is optional."
+ ewarn "If you use the tpmd_dev, please load it explicitly in /etc/conf.d/modules"
+ ewarn ""
+ fi
+
+ einfo "tpmd socket is located at /var/run/tpm/tpmd_socket:0"
+}
diff --git a/app-crypt/tpm-tools/Manifest b/app-crypt/tpm-tools/Manifest
index 9f61e7a02a03..19cdf5c06f95 100644
--- a/app-crypt/tpm-tools/Manifest
+++ b/app-crypt/tpm-tools/Manifest
@@ -1,4 +1,3 @@
-AUX tpm-tools-1.3.9-gold.patch 451 BLAKE2B a322007af718189bd2a05da19c1b67ee0f630515233515569661e16b1a9f36c82c2b97a998ec526e0c9c617da3a4e5bf08b6c0eeb3642b16e65a47757ae59f36 SHA512 7f9473a456c5901c28ec0394158e43b3d8cc3a9a994e5be5d1a45b20f5360f2f0b7778eb93246964192e19fdd140ee5b50d1852500c9aface2824d83c6907c41
DIST tpm-tools-1.3.9.1.tar.gz 482859 BLAKE2B ee915679e23bead04672bf719ce59bb6f20b550be39855b5304caeff554bf54d3cfe9104d464af7762388995e51d2bed0f9bedad83e42146cb7457382d09f4b2 SHA512 63a9c0e761cd890cc0a218de79a9c0169e151aba7824c19bf6b7ec894cf41c4950de1f63bd849aa93a4bdff36cf0fe557bc17113912b6d77f57f2bf1190b6a08
EBUILD tpm-tools-1.3.9.1.ebuild 1019 BLAKE2B b349561812cc566a4a284bd31779576ad0cb4d15319576922bf413216084ba9082e8eb529596dca52a812c22cdfd5e530b7e6e7ee3dd685378c62297708f554f SHA512 c02b1c1973f03e7eeac2e7489fa7200fd97fb80ad544766bb03d18bdbf75bf6da4f6906966955c313be2414a2fea552c1d36c7c9a3bb4d5e16bc8eb62f2389ab
MISC metadata.xml 515 BLAKE2B 06991185c31f6e40b7cda3c9842339911e9806d024e1493ef674751b4d253f5f701a8386a8969f7124b29b2c984f109ec98cb767380b48781fb22bd266d7863a SHA512 5aea8cabd5ae0a00b4a49717efaf8ed6d6363131ff8bdc2a9167108297d32dee72c5419bbc84ae9ba1263d515dff2aa092b991c8411771a2b8c361bcf000258a
diff --git a/app-crypt/tpm-tools/files/tpm-tools-1.3.9-gold.patch b/app-crypt/tpm-tools/files/tpm-tools-1.3.9-gold.patch
deleted file mode 100644
index 1745c690e570..000000000000
--- a/app-crypt/tpm-tools/files/tpm-tools-1.3.9-gold.patch
+++ /dev/null
@@ -1,10 +0,0 @@
-diff --git a/lib/Makefile.am b/lib/Makefile.am
-index cef6a2f..d7092a7 100644
---- a/lib/Makefile.am
-+++ b/lib/Makefile.am
-@@ -80,4 +80,4 @@ endif
- # Unseal library - for addition to existing apps, counter part of seal cmd
- libtpm_unseal_la_SOURCES = tpm_unseal.c
- libtpm_unseal_la_LDFLAGS = -shared -version-info 1:0:0
--libtpm_unseal_la_LIBADD = -ltspi libtpm_tspi.la @INTLLIBS@
-+libtpm_unseal_la_LIBADD = -ltspi libtpm_tspi.la -lcrypto @INTLLIBS@