From e41cf6e609fef7706baf86dbab33a1b3d7af8deb Mon Sep 17 00:00:00 2001 From: yopito Date: Thu, 1 Oct 2020 19:47:32 +0200 Subject: [PATCH] nextcloud-client: update to 3.0.2, enable e2e encryption, enable testing close issue #25216 : EVP_PKEY_CTX_set_rsa_oaep_md, needed by e2e, is supported since LibreSSL 3.1 see https://github.com/libressl-portable/portable/issues/547 --- srcpkgs/nextcloud-client/INSTALL.msg | 2 -- .../patches/libressl-no-rsa_oaep_md.patch | 23 ------------------- .../patches/testfolderman-within-chroot.patch | 15 ++++++++++++ srcpkgs/nextcloud-client/template | 15 ++++++++++-- 4 files changed, 28 insertions(+), 27 deletions(-) delete mode 100644 srcpkgs/nextcloud-client/INSTALL.msg delete mode 100644 srcpkgs/nextcloud-client/patches/libressl-no-rsa_oaep_md.patch create mode 100644 srcpkgs/nextcloud-client/patches/testfolderman-within-chroot.patch diff --git a/srcpkgs/nextcloud-client/INSTALL.msg b/srcpkgs/nextcloud-client/INSTALL.msg deleted file mode 100644 index b3e877dc379..00000000000 --- a/srcpkgs/nextcloud-client/INSTALL.msg +++ /dev/null @@ -1,2 +0,0 @@ -NextCloud client end-to-end encryption (e2e) is currently unavailable -(LibreSSL 2.9.2 does not provide EVP_PKEY_CTX_set_rsa_oaep_md primitive) diff --git a/srcpkgs/nextcloud-client/patches/libressl-no-rsa_oaep_md.patch b/srcpkgs/nextcloud-client/patches/libressl-no-rsa_oaep_md.patch deleted file mode 100644 index 47c54fff778..00000000000 --- a/srcpkgs/nextcloud-client/patches/libressl-no-rsa_oaep_md.patch +++ /dev/null @@ -1,23 +0,0 @@ -source: https://github.com/nextcloud/desktop/issues/738 - ---- src/libsync/clientsideencryption.cpp.ORIG 2019-07-25 12:20:49.000000000 +0200 -+++ src/libsync/clientsideencryption.cpp 2019-07-28 12:56:18.813514323 +0200 -@@ -35,6 +35,18 @@ - - #include "wordlist.h" - -+/* libessl 2.92 does not provide EVP_PKEY_CTX_set_rsa_oaep_md -+ * So with LibreSSL EVP_PKEY_CTX_ctrl() should explicitly return an error -+ * "operation not supported" when you try to use e2e -+ */ -+#ifndef EVP_PKEY_CTX_set_rsa_oaep_md -+#define EVP_PKEY_CTRL_RSA_OAEP_MD (EVP_PKEY_ALG_CTRL + 9) -+#define EVP_PKEY_CTRL_GET_RSA_OAEP_MD (EVP_PKEY_ALG_CTRL + 11) -+#define EVP_PKEY_CTX_set_rsa_oaep_md(ctx, md) \ -+ EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA, EVP_PKEY_OP_TYPE_CRYPT, \ -+ EVP_PKEY_CTRL_RSA_OAEP_MD, 0, (void *)(md)) -+#endif -+ - QDebug operator<<(QDebug out, const std::string& str) - { - out << QString::fromStdString(str); diff --git a/srcpkgs/nextcloud-client/patches/testfolderman-within-chroot.patch b/srcpkgs/nextcloud-client/patches/testfolderman-within-chroot.patch new file mode 100644 index 00000000000..ab7feba8a3e --- /dev/null +++ b/srcpkgs/nextcloud-client/patches/testfolderman-within-chroot.patch @@ -0,0 +1,15 @@ +is wrong if running within a chroot + +--- test/testfolderman.cpp.ORIG 2020-09-24 14:51:48.000000000 +0200 ++++ test/testfolderman.cpp 2020-10-02 20:33:32.248359240 +0200 +@@ -119,10 +119,6 @@ + // Subfolder of links + QVERIFY(folderman->checkPathValidityForNewFolder(dirPath + "/link1/subfolder").isNull()); + QVERIFY(folderman->checkPathValidityForNewFolder(dirPath + "/link2/free/subfolder").isNull()); +- +- // Should not have the rights +- QVERIFY(!folderman->checkPathValidityForNewFolder("/").isNull()); +- QVERIFY(!folderman->checkPathValidityForNewFolder("/usr/bin/somefolder").isNull()); + #endif + + // Invalid paths diff --git a/srcpkgs/nextcloud-client/template b/srcpkgs/nextcloud-client/template index bc7eb323571..f6c365496b2 100644 --- a/srcpkgs/nextcloud-client/template +++ b/srcpkgs/nextcloud-client/template @@ -1,6 +1,6 @@ # Template file for 'nextcloud-client' pkgname=nextcloud-client -version=3.0.1 +version=3.0.2 revision=1 wrksrc="desktop-${version}" build_style=cmake @@ -13,13 +13,14 @@ makedepends="qt5-tools-devel qt5-declarative-devel qt5-webchannel-devel $(vopt_if dolphin 'extra-cmake-modules kio-devel') $(vopt_if shibboleth 'qt5-webkit-devel') $(vopt_if webengine 'qt5-webengine-devel')" +checkdepends="cmocka-devel" conf_files="/etc/Nextcloud/sync-exclude.lst" short_desc="NextCloud Desktop client" maintainer="yopito " license="GPL-2.0-or-later" homepage="https://nextcloud.com/clients/" distfiles="https://github.com/nextcloud/desktop/archive/v${version}.tar.gz" -checksum=5fa4d940e1eb423997d9acf6d8e088e84a59a015be4a9f1fdca552ff1680824b +checksum=07d8111e47c8b6351f7074355e091342363262f93d81ce3ce45dd1ef8e6a69bd build_options="dolphin shibboleth webengine" desc_option_dolphin="Build KDE dolphin support" @@ -41,6 +42,16 @@ fi subpackages="$(vopt_if dolphin 'nextcloud-client-dolphin') nextcloud-client-devel" +if [ "XBPS_CHECK_PKGS" ]; then + configure_args+=" -DUNIT_TESTING=1" + # argp.h is used only by testing and is not a requirement. + # since usable (linking fails), let's disable it instead + case "$XBPS_TARGET_MACHINE" in + #*-musl) export LDFLAGS=-largp;; + *-musl) configure_args+=" -DHAVE_ARGP_H=0";; + esac +fi + nextcloud-client-dolphin_package() { short_desc+=" - KDE dolphin integration" depends="nextcloud-client>=${version}_${revision}"