From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 279B7138334 for ; Sun, 7 Apr 2019 21:19:17 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 605D5E0903; Sun, 7 Apr 2019 21:19:16 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 1F4B9E0903 for ; Sun, 7 Apr 2019 21:19:16 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A109E335D45 for ; Sun, 7 Apr 2019 21:19:14 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 4AAD3565 for ; Sun, 7 Apr 2019 21:19:13 +0000 (UTC) From: "Stefan Strogin" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Stefan Strogin" Message-ID: <1554671702.19114816f2468b127302df95af1ba3ec1f577136.steils@gentoo> Subject: [gentoo-commits] repo/proj/libressl:master commit in: app-crypt/qca/files/, app-crypt/qca/ X-VCS-Repository: repo/proj/libressl X-VCS-Files: app-crypt/qca/Manifest app-crypt/qca/files/qca-2.2.0_pre20180606-libressl.patch app-crypt/qca/files/qca-disable-pgp-test.patch app-crypt/qca/metadata.xml app-crypt/qca/qca-2.2.0_pre20180606.ebuild X-VCS-Directories: app-crypt/qca/files/ app-crypt/qca/ X-VCS-Committer: steils X-VCS-Committer-Name: Stefan Strogin X-VCS-Revision: 19114816f2468b127302df95af1ba3ec1f577136 X-VCS-Branch: master Date: Sun, 7 Apr 2019 21:19:13 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: bec96621-4ff3-42ef-bd31-4f692b0709bc X-Archives-Hash: d8ac77e4bdc0ec33e0e70b49a61c8444 commit: 19114816f2468b127302df95af1ba3ec1f577136 Author: Stefan Strogin gmail com> AuthorDate: Sun Apr 7 21:15:02 2019 +0000 Commit: Stefan Strogin gmail com> CommitDate: Sun Apr 7 21:15:02 2019 +0000 URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=19114816 app-crypt/qca: add package from gentoo.git; patch for LibreSSL Bug: https://bugs.gentoo.org/657720 Package-Manager: Portage-2.3.62, Repoman-2.3.12 Signed-off-by: Stefan Strogin gmail.com> app-crypt/qca/Manifest | 1 + .../qca/files/qca-2.2.0_pre20180606-libressl.patch | 81 +++++++++++++++++++ app-crypt/qca/files/qca-disable-pgp-test.patch | 13 ++++ app-crypt/qca/metadata.xml | 26 +++++++ app-crypt/qca/qca-2.2.0_pre20180606.ebuild | 90 ++++++++++++++++++++++ 5 files changed, 211 insertions(+) diff --git a/app-crypt/qca/Manifest b/app-crypt/qca/Manifest new file mode 100644 index 0000000..f525059 --- /dev/null +++ b/app-crypt/qca/Manifest @@ -0,0 +1 @@ +DIST qca-2.2.0_pre20180606.tar.xz 700756 BLAKE2B 0204854a664f211e9289cd4609938fd21e62de5bec5d7f5a99843a12483c960b6f8cc7392dc84bcf0676220411106bf7f23c5059d4f7031791fe9a3259d21d2c SHA512 78f9f8ebc726e95768034c580d5ac30933f7c06e026b7daad04f11477dc623e4267895e409f7830c5149e620876dcc524278ef569956d03820b0864d629c4df8 diff --git a/app-crypt/qca/files/qca-2.2.0_pre20180606-libressl.patch b/app-crypt/qca/files/qca-2.2.0_pre20180606-libressl.patch new file mode 100644 index 0000000..2f6d461 --- /dev/null +++ b/app-crypt/qca/files/qca-2.2.0_pre20180606-libressl.patch @@ -0,0 +1,81 @@ +From 32e4f55732e42103cd7ba5e84ddd086bf8103948 Mon Sep 17 00:00:00 2001 +From: Stefan Strogin +Date: Fri, 5 Apr 2019 09:57:14 +0300 +Subject: [PATCH] Fix build with LibreSSL + +Provide RSA_meth_set_{sign,verify} for LibreSSL. +Do not redefine M_ASN1_IA5STRING_new and RSA_F_RSA_EAY_PRIVATE_DECRYPT. + +Upstream-Status: Submitted [https://phabricator.kde.org/D20259] +Signed-off-by: Stefan Strogin +--- + plugins/qca-ossl/ossl110-compat.h | 34 ++++++++++++++++--------------- + plugins/qca-ossl/qca-ossl.cpp | 2 +- + 2 files changed, 19 insertions(+), 17 deletions(-) + +diff --git a/plugins/qca-ossl/ossl110-compat.h b/plugins/qca-ossl/ossl110-compat.h +index ec15475..2d47835 100644 +--- a/plugins/qca-ossl/ossl110-compat.h ++++ b/plugins/qca-ossl/ossl110-compat.h +@@ -213,22 +213,6 @@ static int RSA_meth_set_priv_dec(RSA_METHOD *rsa, int (*priv_dec) (int flen, con + return 1; + } + +-static int RSA_meth_set_sign(RSA_METHOD *meth, int (*sign) (int type, const unsigned char *m, +- unsigned int m_length, unsigned char *sigret, unsigned int *siglen, const RSA *rsa)) +-{ +- if (!meth) return 0; +- meth->rsa_sign = sign; +- return 1; +-} +- +-static int RSA_meth_set_verify(RSA_METHOD *meth, int (*verify) (int dtype, const unsigned char *m, +- unsigned int m_length, const unsigned char *sigbuf, unsigned int siglen, const RSA *rsa)) +-{ +- if (!meth) return 0; +- meth->rsa_verify = verify; +- return 1; +-} +- + static int RSA_meth_set_finish(RSA_METHOD *meth, int (*finish) (RSA *rsa)) + { + if (!meth) return 0; +@@ -280,4 +264,22 @@ static void HMAC_CTX_free(HMAC_CTX *ctx) + + #endif // OPENSSL_VERSION_NUMBER < 0x10100000L + ++#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER) ++static int RSA_meth_set_sign(RSA_METHOD *meth, int (*sign) (int type, const unsigned char *m, ++ unsigned int m_length, unsigned char *sigret, unsigned int *siglen, const RSA *rsa)) ++{ ++ if (!meth) return 0; ++ meth->rsa_sign = sign; ++ return 1; ++} ++ ++static int RSA_meth_set_verify(RSA_METHOD *meth, int (*verify) (int dtype, const unsigned char *m, ++ unsigned int m_length, const unsigned char *sigbuf, unsigned int siglen, const RSA *rsa)) ++{ ++ if (!meth) return 0; ++ meth->rsa_verify = verify; ++ return 1; ++} ++#endif // (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER) ++ + #endif // OSSL110COMPAT_H +diff --git a/plugins/qca-ossl/qca-ossl.cpp b/plugins/qca-ossl/qca-ossl.cpp +index 39dbc2b..1216bef 100644 +--- a/plugins/qca-ossl/qca-ossl.cpp ++++ b/plugins/qca-ossl/qca-ossl.cpp +@@ -61,7 +61,7 @@ + #endif + + // OpenSSL 1.1.0 compatibility macros +-#ifdef OSSL_110 ++#if defined(OSSL_110) && !defined(LIBRESSL_VERSION_NUMBER) + #define M_ASN1_IA5STRING_new() ASN1_IA5STRING_new() + #define RSA_F_RSA_EAY_PRIVATE_DECRYPT RSA_F_RSA_OSSL_PRIVATE_DECRYPT + #endif +-- +2.21.0 + diff --git a/app-crypt/qca/files/qca-disable-pgp-test.patch b/app-crypt/qca/files/qca-disable-pgp-test.patch new file mode 100644 index 0000000..7944e3c --- /dev/null +++ b/app-crypt/qca/files/qca-disable-pgp-test.patch @@ -0,0 +1,13 @@ +diff --git a/unittest/CMakeLists.txt b/unittest/CMakeLists.txt +index f4d9eb9..67ef281 100644 +--- a/unittest/CMakeLists.txt ++++ b/unittest/CMakeLists.txt +@@ -23,7 +23,7 @@ add_subdirectory(keylengthunittest) + add_subdirectory(keystore) + add_subdirectory(macunittest) + add_subdirectory(metatype) +-add_subdirectory(pgpunittest) ++# add_subdirectory(pgpunittest) + add_subdirectory(pipeunittest) + add_subdirectory(pkits) + add_subdirectory(rsaunittest) diff --git a/app-crypt/qca/metadata.xml b/app-crypt/qca/metadata.xml new file mode 100644 index 0000000..dff1320 --- /dev/null +++ b/app-crypt/qca/metadata.xml @@ -0,0 +1,26 @@ + + + + + crypto@gentoo.org + Crypto + + + qt@gentoo.org + Gentoo Qt Project + + + kde@gentoo.org + Gentoo KDE Project + + + Enable botan plugin + Enable gcrypt plugin + Enable GnuPG plugin + Enable logger plugin + Enable NSS plugin + Enable PKCS#11 plugin + Enable SASL plugin + Enable softstore plugin + + diff --git a/app-crypt/qca/qca-2.2.0_pre20180606.ebuild b/app-crypt/qca/qca-2.2.0_pre20180606.ebuild new file mode 100644 index 0000000..9aaf988 --- /dev/null +++ b/app-crypt/qca/qca-2.2.0_pre20180606.ebuild @@ -0,0 +1,90 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake-utils qmake-utils + +DESCRIPTION="Qt Cryptographic Architecture (QCA)" +HOMEPAGE="https://userbase.kde.org/QCA" +SRC_URI="https://dev.gentoo.org/~asturm/distfiles/${P}.tar.xz" + +LICENSE="LGPL-2.1" +SLOT="2" +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris" + +IUSE="botan debug doc examples gcrypt gpg libressl logger nss pkcs11 sasl softstore +ssl test" + +BDEPEND=" + doc? ( app-doc/doxygen ) +" +RDEPEND=" + dev-qt/qtcore:5 + botan? ( dev-libs/botan:= ) + gcrypt? ( dev-libs/libgcrypt:= ) + gpg? ( app-crypt/gnupg ) + nss? ( dev-libs/nss ) + pkcs11? ( + !libressl? ( dev-libs/openssl:0 ) + libressl? ( dev-libs/libressl ) + dev-libs/pkcs11-helper + ) + sasl? ( dev-libs/cyrus-sasl:2 ) + ssl? ( + !libressl? ( >=dev-libs/openssl-1.0.1:0= ) + libressl? ( dev-libs/libressl:= ) + ) +" +DEPEND="${RDEPEND} + test? ( + dev-qt/qtnetwork:5 + dev-qt/qttest:5 + ) +" + +PATCHES=( + "${FILESDIR}/${PN}-disable-pgp-test.patch" + "${FILESDIR}/${P}-libressl.patch" +) + +qca_plugin_use() { + echo -DWITH_${2:-$1}_PLUGIN=$(usex "$1") +} + +src_configure() { + local mycmakeargs=( + -DQCA_FEATURE_INSTALL_DIR="${EPREFIX}$(qt5_get_mkspecsdir)/features" + -DQCA_PLUGINS_INSTALL_DIR="${EPREFIX}$(qt5_get_plugindir)" + $(qca_plugin_use botan) + $(qca_plugin_use gcrypt) + $(qca_plugin_use gpg gnupg) + $(qca_plugin_use logger) + $(qca_plugin_use nss) + $(qca_plugin_use pkcs11) + $(qca_plugin_use sasl cyrus-sasl) + $(qca_plugin_use softstore) + $(qca_plugin_use ssl ossl) + -DBUILD_TESTS=$(usex test) + ) + cmake-utils_src_configure +} + +src_test() { + local -x QCA_PLUGIN_PATH="${BUILD_DIR}/lib/qca" + cmake-utils_src_test +} + +src_install() { + cmake-utils_src_install + + if use doc; then + pushd "${BUILD_DIR}" >/dev/null || die + doxygen Doxyfile || die + dodoc -r apidocs/html + popd >/dev/null || die + fi + + if use examples; then + dodoc -r "${S}"/examples + fi +}