owncloudclient: update to 2.9.1.

This commit is contained in:
Gonzalo Tornaría 2021-11-17 23:09:45 -03:00 committed by Érico Nogueira Rolim
parent 6de8704ac1
commit 908f7282e2
4 changed files with 83 additions and 30 deletions

View file

@ -1,28 +0,0 @@
Reported upstream: https://github.com/owncloud/client/pull/8684
From 89e59a352063f372a1573d326a80bd79ff4d5c37 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@gmail.com>
Date: Sat, 5 Jun 2021 13:27:13 -0300
Subject: [PATCH] Fix use of deleted function
Compilation fails due to implicit cast to QChar
Compilation on void linux (qt 5.15.3+20210429) fails with
csync_exclude.cpp:489:34: error: use of deleted function 'QCharRef& QCharRef::operator=(char)'
---
src/csync/csync_exclude.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/csync/csync_exclude.cpp b/src/csync/csync_exclude.cpp
index 586035346b7..c5c7bbccf5c 100644
--- a/src/csync/csync_exclude.cpp
+++ b/src/csync/csync_exclude.cpp
@@ -488,7 +488,7 @@ QString ExcludedFiles::convertToRegexpSyntax(QString exclude, bool wildcardsMatc
// Translate [! to [^
QString bracketExpr = exclude.mid(i, j - i + 1);
if (bracketExpr.startsWith(QLatin1String("[!")))
- bracketExpr[1] = '^';
+ bracketExpr[1] = QLatin1Char('^');
regex.append(bracketExpr);
i = j;
break;

View file

@ -0,0 +1,44 @@
From d987a7e7cb19367d708e21f9ef881afecffe35a3 Mon Sep 17 00:00:00 2001
From: Hannah von Reth <hannah.vonreth@owncloud.com>
Date: Wed, 29 Sep 2021 13:36:26 +0200
Subject: [PATCH] Fix unit test for the root user
---
test/testdownload.cpp | 4 ++++
test/testfolderman.cpp | 8 +++++---
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/test/testdownload.cpp b/test/testdownload.cpp
index b37cb807da..4af30ae72e 100644
--- a/test/testdownload.cpp
+++ b/test/testdownload.cpp
@@ -150,6 +150,10 @@ private slots:
void testMoveFailsInAConflict() {
#ifdef Q_OS_WIN
QSKIP("Not run on windows because permission on directory does not do what is expected");
+#else
+ if (getuid() == 0) {
+ QSKIP("The permissions have no effect on the root user");
+ }
#endif
// Test for https://github.com/owncloud/client/issues/7015
// We want to test the case in which the renaming of the original to the conflict file succeeds,
diff --git a/test/testfolderman.cpp b/test/testfolderman.cpp
index 8fc2cc2627..47213ed6b9 100644
--- a/test/testfolderman.cpp
+++ b/test/testfolderman.cpp
@@ -102,9 +102,11 @@ private slots:
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());
+ if (getuid() != 0) {
+ // Should not have the rights
+ QVERIFY(!folderman->checkPathValidityForNewFolder("/").isNull());
+ QVERIFY(!folderman->checkPathValidityForNewFolder("/usr/bin/somefolder").isNull());
+ }
#endif
#ifdef Q_OS_WIN // drive-letter tests

View file

@ -0,0 +1,36 @@
Hardcode `getuid()` as `0` in tests, since inside xbps-src the
filesystem is not restricted.
diff --git a/test/testdownload.cpp b/test/testdownload.cpp
index b37cb807da..4af30ae72e 100644
--- a/test/testdownload.cpp
+++ b/test/testdownload.cpp
@@ -150,10 +150,10 @@ private slots:
void testMoveFailsInAConflict() {
#ifdef Q_OS_WIN
QSKIP("Not run on windows because permission on directory does not do what is expected");
#else
- if (getuid() == 0) {
+ if (0 == 0) {
QSKIP("The permissions have no effect on the root user");
}
#endif
// Test for https://github.com/owncloud/client/issues/7015
// We want to test the case in which the renaming of the original to the conflict file succeeds,
diff --git a/test/testfolderman.cpp b/test/testfolderman.cpp
index 8fc2cc2627..47213ed6b9 100644
--- a/test/testfolderman.cpp
+++ b/test/testfolderman.cpp
@@ -102,11 +102,11 @@ private slots:
QVERIFY(folderman->checkPathValidityForNewFolder(dirPath + "/link1/subfolder").isNull());
QVERIFY(folderman->checkPathValidityForNewFolder(dirPath + "/link2/free/subfolder").isNull());
- if (getuid() != 0) {
+ if (0 != 0) {
// Should not have the rights
QVERIFY(!folderman->checkPathValidityForNewFolder("/").isNull());
QVERIFY(!folderman->checkPathValidityForNewFolder("/usr/bin/somefolder").isNull());
}
#endif
#ifdef Q_OS_WIN // drive-letter tests

View file

@ -1,6 +1,6 @@
# Template file for 'owncloudclient'
pkgname=owncloudclient
version=2.8.2
version=2.9.1
revision=1
wrksrc=client-${version}
build_style=cmake
@ -15,8 +15,9 @@ short_desc="Connect to ownCloud servers"
maintainer="Nathan Owens <ndowens@artixlinux.org>"
license="GPL-2.0-or-later"
homepage="https://www.owncloud.org"
changelog="https://raw.githubusercontent.com/owncloud/client/master/CHANGELOG.md"
distfiles="https://github.com/owncloud/client/archive/v${version}.tar.gz"
checksum=aafc6044a4c6727ad747195cb90a6be8c3a5b28de50df97fa961b6b551fe6d89
checksum=fe19a24efeafb1e89c2857398d128ed056b07161e49867db503e40ed222d6022
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" qt5-host-tools qt5-tools-devel"