* [PR PATCH] owncloudclient: update to 2.9.1, fix tests
@ 2021-11-18 12:51 tornaria
2021-11-18 14:16 ` tornaria
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: tornaria @ 2021-11-18 12:51 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 809 bytes --]
There is a new pull request by tornaria against master on the void-packages repository
https://github.com/tornaria/void-packages owncloud
https://github.com/void-linux/void-packages/pull/34131
owncloudclient: update to 2.9.1, fix tests
- I tested the changes in this PR: **YES** (I'm running it since yesterday, with my own files in two different accounts)
- I removed a patch that has been merged upstream
- I added a patch to skip two tests that were failing because xbps-src runs with root permission (the tests try to write to `/` and `/usr/bin` and expect to get a permission error). Now the check stage should succeed (I only tested in x86_64, let's see what CI says).
- Added `changelog=`
CC: @ndowens
A patch file from https://github.com/void-linux/void-packages/pull/34131.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-owncloud-34131.patch --]
[-- Type: text/x-diff, Size: 4197 bytes --]
From b7ca6d9a488f79a3557bf9644e5a4d030fd647bf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Wed, 17 Nov 2021 23:09:45 -0300
Subject: [PATCH] owncloudclient: update to 2.9.1.
---
...9a352063f372a1573d326a80bd79ff4d5c37.patch | 28 -------------------
.../patches/skip-root-test.patch | 16 +++++++++++
srcpkgs/owncloudclient/template | 5 ++--
3 files changed, 19 insertions(+), 30 deletions(-)
delete mode 100644 srcpkgs/owncloudclient/patches/89e59a352063f372a1573d326a80bd79ff4d5c37.patch
create mode 100644 srcpkgs/owncloudclient/patches/skip-root-test.patch
diff --git a/srcpkgs/owncloudclient/patches/89e59a352063f372a1573d326a80bd79ff4d5c37.patch b/srcpkgs/owncloudclient/patches/89e59a352063f372a1573d326a80bd79ff4d5c37.patch
deleted file mode 100644
index 536db5f230cd..000000000000
--- a/srcpkgs/owncloudclient/patches/89e59a352063f372a1573d326a80bd79ff4d5c37.patch
+++ /dev/null
@@ -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;
diff --git a/srcpkgs/owncloudclient/patches/skip-root-test.patch b/srcpkgs/owncloudclient/patches/skip-root-test.patch
new file mode 100644
index 000000000000..6a572c9e5607
--- /dev/null
+++ b/srcpkgs/owncloudclient/patches/skip-root-test.patch
@@ -0,0 +1,16 @@
+Skip a couple of tests that assume we don't have root permissions.
+
+--- a/test/testfolderman.cpp
++++ b/test/testfolderman.cpp
+@@ -102,9 +102,9 @@ 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());
++ //QVERIFY(!folderman->checkPathValidityForNewFolder("/").isNull());
++ //QVERIFY(!folderman->checkPathValidityForNewFolder("/usr/bin/somefolder").isNull());
+ #endif
+
+ #ifdef Q_OS_WIN // drive-letter tests
diff --git a/srcpkgs/owncloudclient/template b/srcpkgs/owncloudclient/template
index 2146b9110d17..6731ba6409da 100644
--- a/srcpkgs/owncloudclient/template
+++ b/srcpkgs/owncloudclient/template
@@ -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"
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: owncloudclient: update to 2.9.1, fix tests
2021-11-18 12:51 [PR PATCH] owncloudclient: update to 2.9.1, fix tests tornaria
@ 2021-11-18 14:16 ` tornaria
2021-11-18 14:25 ` [PR PATCH] [Updated] " tornaria
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: tornaria @ 2021-11-18 14:16 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1009 bytes --]
New comment by tornaria on void-packages repository
https://github.com/void-linux/void-packages/pull/34131#issuecomment-972905223
Comment:
TL;DR: don't merge now, I'll make CI pass.
What happened: there's another test that assumes non-root but for some reason passes on my local xbps-src so I didn't disable it, but I will so we can get CI to pass (I like green checkmarks, they make me salivate).
For reference: https://github.com/owncloud/client/commit/d987a7e7cb19367d708e21f9ef881afecffe35a3
That patch is merged in the development branch of owncloudclient. However, it tests for root with `getuid() == 0` which, at least on my local xbps-src, is false, so that patch alone is not enough to pass tests. What's the recommended way to change that so it works properly in xbps-src (the only thing that comes to my mind is to replace `getuid() == 0` by `1` and be done with it, but I don't think upstream will accept that change -- if only there was a way to fix it that was upstream-friendly...).
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PR PATCH] [Updated] owncloudclient: update to 2.9.1, fix tests
2021-11-18 12:51 [PR PATCH] owncloudclient: update to 2.9.1, fix tests tornaria
2021-11-18 14:16 ` tornaria
@ 2021-11-18 14:25 ` tornaria
2021-11-18 14:30 ` tornaria
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: tornaria @ 2021-11-18 14:25 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 814 bytes --]
There is an updated pull request by tornaria against master on the void-packages repository
https://github.com/tornaria/void-packages owncloud
https://github.com/void-linux/void-packages/pull/34131
owncloudclient: update to 2.9.1, fix tests
- I tested the changes in this PR: **YES** (I'm running it since yesterday, with my own files in two different accounts)
- I removed a patch that has been merged upstream
- I added a patch to skip two tests that were failing because xbps-src runs with root permission (the tests try to write to `/` and `/usr/bin` and expect to get a permission error). Now the check stage should succeed (I only tested in x86_64, let's see what CI says).
- Added `changelog=`
CC: @ndowens
A patch file from https://github.com/void-linux/void-packages/pull/34131.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-owncloud-34131.patch --]
[-- Type: text/x-diff, Size: 7354 bytes --]
From e0c935146a5e30bc506563a11794690aba6c8f40 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Wed, 17 Nov 2021 23:09:45 -0300
Subject: [PATCH] owncloudclient: update to 2.9.1.
---
...9a352063f372a1573d326a80bd79ff4d5c37.patch | 28 ------------
...a7e7cb19367d708e21f9ef881afecffe35a3.patch | 44 +++++++++++++++++++
.../patches/skip-root-test.patch | 36 +++++++++++++++
srcpkgs/owncloudclient/template | 5 ++-
4 files changed, 83 insertions(+), 30 deletions(-)
delete mode 100644 srcpkgs/owncloudclient/patches/89e59a352063f372a1573d326a80bd79ff4d5c37.patch
create mode 100644 srcpkgs/owncloudclient/patches/d987a7e7cb19367d708e21f9ef881afecffe35a3.patch
create mode 100644 srcpkgs/owncloudclient/patches/skip-root-test.patch
diff --git a/srcpkgs/owncloudclient/patches/89e59a352063f372a1573d326a80bd79ff4d5c37.patch b/srcpkgs/owncloudclient/patches/89e59a352063f372a1573d326a80bd79ff4d5c37.patch
deleted file mode 100644
index 536db5f230cd..000000000000
--- a/srcpkgs/owncloudclient/patches/89e59a352063f372a1573d326a80bd79ff4d5c37.patch
+++ /dev/null
@@ -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;
diff --git a/srcpkgs/owncloudclient/patches/d987a7e7cb19367d708e21f9ef881afecffe35a3.patch b/srcpkgs/owncloudclient/patches/d987a7e7cb19367d708e21f9ef881afecffe35a3.patch
new file mode 100644
index 000000000000..dab71a91e7c9
--- /dev/null
+++ b/srcpkgs/owncloudclient/patches/d987a7e7cb19367d708e21f9ef881afecffe35a3.patch
@@ -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
diff --git a/srcpkgs/owncloudclient/patches/skip-root-test.patch b/srcpkgs/owncloudclient/patches/skip-root-test.patch
new file mode 100644
index 000000000000..50aa32e2cd47
--- /dev/null
+++ b/srcpkgs/owncloudclient/patches/skip-root-test.patch
@@ -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
diff --git a/srcpkgs/owncloudclient/template b/srcpkgs/owncloudclient/template
index 2146b9110d17..6731ba6409da 100644
--- a/srcpkgs/owncloudclient/template
+++ b/srcpkgs/owncloudclient/template
@@ -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"
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: owncloudclient: update to 2.9.1, fix tests
2021-11-18 12:51 [PR PATCH] owncloudclient: update to 2.9.1, fix tests tornaria
2021-11-18 14:16 ` tornaria
2021-11-18 14:25 ` [PR PATCH] [Updated] " tornaria
@ 2021-11-18 14:30 ` tornaria
2021-11-18 22:52 ` tornaria
2021-11-21 18:26 ` [PR PATCH] [Merged]: " ericonr
4 siblings, 0 replies; 6+ messages in thread
From: tornaria @ 2021-11-18 14:30 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 476 bytes --]
New comment by tornaria on void-packages repository
https://github.com/void-linux/void-packages/pull/34131#issuecomment-972918081
Comment:
Hopefully it works now. I decided to include https://github.com/owncloud/client/commit/d987a7e7cb19367d708e21f9ef881afecffe35a3 as-is and add a patch on top which just replaces `getuid()` by `0` in two places so the logic is very clear.
When this commit makes it into a release, we can just drop that patch and keep the second one.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: owncloudclient: update to 2.9.1, fix tests
2021-11-18 12:51 [PR PATCH] owncloudclient: update to 2.9.1, fix tests tornaria
` (2 preceding siblings ...)
2021-11-18 14:30 ` tornaria
@ 2021-11-18 22:52 ` tornaria
2021-11-21 18:26 ` [PR PATCH] [Merged]: " ericonr
4 siblings, 0 replies; 6+ messages in thread
From: tornaria @ 2021-11-18 22:52 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1055 bytes --]
New comment by tornaria on void-packages repository
https://github.com/void-linux/void-packages/pull/34131#issuecomment-972905223
Comment:
~TL;DR: don't merge now, I'll make CI pass.~ [Edit: CI passes now, please merge :smile:]
What happened: there's another test that assumes non-root but for some reason passes on my local xbps-src so I didn't disable it, but I will so we can get CI to pass (I like green checkmarks, they make me salivate).
For reference: https://github.com/owncloud/client/commit/d987a7e7cb19367d708e21f9ef881afecffe35a3
That patch is merged in the development branch of owncloudclient. However, it tests for root with `getuid() == 0` which, at least on my local xbps-src, is false, so that patch alone is not enough to pass tests. What's the recommended way to change that so it works properly in xbps-src (the only thing that comes to my mind is to replace `getuid() == 0` by `1` and be done with it, but I don't think upstream will accept that change -- if only there was a way to fix it that was upstream-friendly...).
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PR PATCH] [Merged]: owncloudclient: update to 2.9.1, fix tests
2021-11-18 12:51 [PR PATCH] owncloudclient: update to 2.9.1, fix tests tornaria
` (3 preceding siblings ...)
2021-11-18 22:52 ` tornaria
@ 2021-11-21 18:26 ` ericonr
4 siblings, 0 replies; 6+ messages in thread
From: ericonr @ 2021-11-21 18:26 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 655 bytes --]
There's a merged pull request on the void-packages repository
owncloudclient: update to 2.9.1, fix tests
https://github.com/void-linux/void-packages/pull/34131
Description:
- I tested the changes in this PR: **YES** (I'm running it since yesterday, with my own files in two different accounts)
- I removed a patch that has been merged upstream
- I added a patch to skip two tests that were failing because xbps-src runs with root permission (the tests try to write to `/` and `/usr/bin` and expect to get a permission error). Now the check stage should succeed (I only tested in x86_64, let's see what CI says).
- Added `changelog=`
CC: @ndowens
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-11-21 18:26 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-18 12:51 [PR PATCH] owncloudclient: update to 2.9.1, fix tests tornaria
2021-11-18 14:16 ` tornaria
2021-11-18 14:25 ` [PR PATCH] [Updated] " tornaria
2021-11-18 14:30 ` tornaria
2021-11-18 22:52 ` tornaria
2021-11-21 18:26 ` [PR PATCH] [Merged]: " ericonr
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).