Page MenuHomeSolus

Update owncloud-client to 2.7.6
Closed, ResolvedPublic

Description

Hi, I'm using owncloud-client on a daily basis and it keeps notifying me that a new version is available.
I see that major improvements are still to come but maybe it's still worth doing an upgrade in between major steps.
https://github.com/owncloud/client/archive/refs/tags/v2.7.6.tar.gz
Thanks for all your work, I'm a very happy Solus (Budgie) user :)

Event Timeline

Hey there,

Personally I've moved onto Nextcloud and use the respective nextcloud-client. So if someone such as yourself happens to use owncloud and wants to start maintaining the package, that is certainly welcome.

That being said, I would appreciate it if you could update your task with the information at https://getsol.us/articles/packaging/request-a-package-update/en/

monbosapin renamed this task from Update owncloud-client to Update owncloud-client to 2.7.6.May 3 2021, 7:47 AM
monbosapin updated the task description. (Show Details)
monbosapin added a project: Software.
JoshStrobl triaged this task as Normal priority.May 3 2021, 7:47 AM
JoshStrobl moved this task from Backlog to Update Requested on the Software board.
JoshStrobl removed a project: Package Requests.
JoshStrobl updated the task description. (Show Details)
monbosapin added a comment.EditedMay 3 2021, 7:48 AM

Thanks for the quick reply.
I wouldn't know where to start if I were to maintain a package... yet I'd be willing to learn ;)
Updated the task
-edit- you found the tarball

@monbosapin the tldr is:

  1. Install the necessary tooling and dependencies. See https://getsol.us/articles/packaging/building-a-package/en/
  2. Clone the respective source repository. This is done via git. Clone URLs available at https://dev.getsol.us/source/owncloud-client/
  3. Follow https://getsol.us/articles/packaging/updating-an-existing-package/en/ for updating the package
  4. Build it (see 1), install it (just sudo eopkg install file.eopkg), and test it.
  5. Submit the update. See https://getsol.us/articles/packaging/submitting-a-package/en/
monbosapin added a comment.EditedMay 3 2021, 9:20 AM

Got it all right until step 3.
Then can't seem to build it..

make build
make[1] : on entre dans le répertoire « /home/pollux/Solus Package Builds Wam/owncloud-client »
sudo solbuild build pspec.xml -p unstable-x86_64;
Failed to load package: open pspec.xml: no such file or directory
make[1] : on quitte le répertoire « /home/pollux/Solus Package Builds Wam/owncloud-client »
make abireport
make[1] : on entre dans le répertoire « /home/pollux/Solus Package Builds Wam/owncloud-client »
"../."/common/Go/yabi/yabi *.eopkg
 ⮞  Scanning '*.eopkg'...
 🕱  Failed to open package '*.eopkg', reason: open *.eopkg: no such file or directory
make[1]: *** [../Makefile.common:15 : abireport] Erreur 1
make[1] : on quitte le répertoire « /home/pollux/Solus Package Builds Wam/owncloud-client »
make: *** [../Makefile.common:12 : complete] Erreur 2

Just fire make without build. It should work.

Yes that's the command I run: make. make build only returns one line Failed to load package: open pspec.xml: no such file or directory

Thanks for the link @algent! I watched it carefully and eventually figured out I was one folder too deep. I cleaned it up and here's what I get now:

$ make
make build
make[1] : on entre dans le répertoire « /home/pollux/Solus Package Builds Wam/owncloud-client »
sudo solbuild build package.yml -p unstable-x86_64;
Mot de passe : 
Profile is not installed: Did you forget to init?
make[1] : on quitte le répertoire « /home/pollux/Solus Package Builds Wam/owncloud-client »
make abireport
make[1] : on entre dans le répertoire « /home/pollux/Solus Package Builds Wam/owncloud-client »
"../."/common/Go/yabi/yabi *.eopkg
 ⮞  Scanning '*.eopkg'...
 🕱  Failed to open package '*.eopkg', reason: open *.eopkg: no such file or directory
make[1]: *** [../Makefile.common:15 : abireport] Erreur 1
make[1] : on quitte le répertoire « /home/pollux/Solus Package Builds Wam/owncloud-client »
make: *** [../Makefile.common:12 : complete] Erreur 2

What Profile should I install? And I made sure I did run sudo solbuild initbeforehand.

@monbosapin From your log I take it you didn't install the solbuild-config-unstable package. When you just run make it runs it against the unstable profile (you can see this in your log). So to fix this do the following:

sudo eopkg it solbuild-config-unstable
sudo solbuild init --profile unstable-x86_64
sudo solbuild update --profile unstable-x86_64

And you should then be able to run make in your package directory.

algent added a comment.EditedMay 4 2021, 2:06 AM

Hi @monbosapin!

I assume that you have already created .solus folder with the packager file in your $HOME.

To start correctly you have to follow these commands:

sudo eopkg ar Solus https://mirrors.rit.edu/solus/packages/unstable/eopkg-index.xml.xz
sudo eopkg up
sudo eopkg it -c system.devel
sudo eopkg it solbuild solbuild-config-unstable
sudo solbuild init
sudo solbuild update

Then make the Repository folder in $HOME

cd Repository
git clone https://dev.getsol.us/source/common.git 
ln -sv common/Makefile.common .
ln -sv common/Makefile.toplevel Makefile
ln -sv common/Makefile.iso .

Then test building a package (make sure you are in ~/Repository)

make nano.clone
cd nano
make bump
make

Note: I needed to update this due to our glibc rebuilds. Do keep in mind that this will become outdated again if someone doesn't become the maintainer for it. The maintainer should be using it against their ownCloud client, if you use nextcloud then you need not be concerned and should be using the nextcloud-client, which I am the maintainer of (and use).

Thanks @JoshStrobl for that update.
Finally found the time to get back to it and try and update it to 2.9.0. I'd really like to get it working...
Starting again from the beginning (thanks for summarizing the commands, @algent!) I eventually managed to run make. But it suddenly stops.
(the suggested test with nano worked fine)
Any clues? What am I doing wrong?

INFO[11:03:31] Now starting build of package                 package=owncloud-client
[HISTORY] Release not consistent
[HISTORY] Version not consistent..
[Info] Building owncloud-client-2.9.0
[Build] Building native package
[Source] Extracting source
[Build] Running step: setup
[Build] Enabling ccache
+ cd /home/build/YPKG/root/owncloud-client/build/client-2.9.0
+ export 'CFLAGS=-mtune=generic -march=x86-64 -g2 -O2 -pipe -fPIC -Wformat -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=32 -fasynchronous-unwind-tables -ftree-vectorize -feliminate-unused-debug-types -Wall -Wno-error -Wp,-D_REENTRANT'
+ CFLAGS='-mtune=generic -march=x86-64 -g2 -O2 -pipe -fPIC -Wformat -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=32 -fasynchronous-unwind-tables -ftree-vectorize -feliminate-unused-debug-types -Wall -Wno-error -Wp,-D_REENTRANT'
+ export 'CXXFLAGS=-mtune=generic -march=x86-64 -g2 -O2 -pipe -fPIC -D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=32 -fasynchronous-unwind-tables -ftree-vectorize -feliminate-unused-debug-types -Wall -Wno-error -Wp,-D_REENTRANT'
+ CXXFLAGS='-mtune=generic -march=x86-64 -g2 -O2 -pipe -fPIC -D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=32 -fasynchronous-unwind-tables -ftree-vectorize -feliminate-unused-debug-types -Wall -Wno-error -Wp,-D_REENTRANT'
+ export 'LDFLAGS=-Wl,--copy-dt-needed-entries -Wl,-O1 -Wl,-z,relro -Wl,-z,now -Wl,-z,max-page-size=0x1000 -Wl,-Bsymbolic-functions -Wl,--sort-common'
+ LDFLAGS='-Wl,--copy-dt-needed-entries -Wl,-O1 -Wl,-z,relro -Wl,-z,now -Wl,-z,max-page-size=0x1000 -Wl,-Bsymbolic-functions -Wl,--sort-common'
+ export 'FFLAGS=-mtune=generic -march=x86-64 -g2 -O2 -pipe -fPIC -D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=32 -fasynchronous-unwind-tables -ftree-vectorize -feliminate-unused-debug-types -Wall -Wno-error -Wp,-D_REENTRANT'
+ FFLAGS='-mtune=generic -march=x86-64 -g2 -O2 -pipe -fPIC -D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=32 -fasynchronous-unwind-tables -ftree-vectorize -feliminate-unused-debug-types -Wall -Wno-error -Wp,-D_REENTRANT'
+ export 'FCFLAGS=-mtune=generic -march=x86-64 -g2 -O2 -pipe -fPIC -D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=32 -fasynchronous-unwind-tables -ftree-vectorize -feliminate-unused-debug-types -Wall -Wno-error -Wp,-D_REENTRANT'
+ FCFLAGS='-mtune=generic -march=x86-64 -g2 -O2 -pipe -fPIC -D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=32 -fasynchronous-unwind-tables -ftree-vectorize -feliminate-unused-debug-types -Wall -Wno-error -Wp,-D_REENTRANT'
+ export PATH=/usr/lib64/ccache/bin:/usr/bin:/bin:/usr/sbin:/sbin
+ PATH=/usr/lib64/ccache/bin:/usr/bin:/bin:/usr/sbin:/sbin
+ export workdir=/home/build/YPKG/root/owncloud-client/build/client-2.9.0
+ workdir=/home/build/YPKG/root/owncloud-client/build/client-2.9.0
+ export package=owncloud-client
+ package=owncloud-client
+ export release=33
+ release=33
+ export version=2.9.0
+ version=2.9.0
+ export sources=/home/build/YPKG/sources
+ sources=/home/build/YPKG/sources
+ export pkgfiles=/home/build/work/files
+ pkgfiles=/home/build/work/files
+ export installdir=/home/build/YPKG/root/owncloud-client/install
+ installdir=/home/build/YPKG/root/owncloud-client/install
+ export PKG_ROOT_DIR=/home/build/YPKG/root/owncloud-client
+ PKG_ROOT_DIR=/home/build/YPKG/root/owncloud-client
+ export PKG_BUILD_DIR=/home/build/YPKG/root/owncloud-client/build
+ PKG_BUILD_DIR=/home/build/YPKG/root/owncloud-client/build
+ export LT_SYS_LIBRARY_PATH=/usr/lib64
+ LT_SYS_LIBRARY_PATH=/usr/lib64
+ export CC=x86_64-solus-linux-gcc
+ CC=x86_64-solus-linux-gcc
+ export CXX=x86_64-solus-linux-g++
+ CXX=x86_64-solus-linux-g++
+ export LD_AS_NEEDED=1
+ LD_AS_NEEDED=1
+ export SOURCE_DATA_EPOCH=1624797256
+ SOURCE_DATA_EPOCH=1624797256
+ unset DISPLAY SUDO_USER SUDO_GID SUDO_UID SUDO_COMMAND CDPATH
+ patch -t -E --no-backup-if-mismatch -f -p1
patching file src/gui/libcloudproviders/libcloudproviders.cpp
+ patch -t -E --no-backup-if-mismatch -f -p1
patching file src/csync/csync_exclude.cpp
Hunk #1 FAILED at 488.
1 out of 1 hunk FAILED -- saving rejects to file src/csync/csync_exclude.cpp.rej
Command '['/bin/bash', '--norc', '--noprofile', '/tmp/ypkg-setupjHBkwU']' returned non-zero exit status 1
[Build] setup failed
ERRO[11:03:32] Failed to build package                       error="exit status 1"
ERRO[11:03:34] Failed to build packages

Yes, it's failing to apply the patches. You need to assess if they are still valid, if the patches have been merged in, or if they need to be rebased.

algent added a comment.EditedThu, Oct 7, 12:09 PM

@monbosapin Those two patches aren't needed anymore, but they should be replaced with two others:
patch1: https://github.com/owncloud/client/commit/608c1434.patch
patch2: https://github.com/owncloud/client/commit/a004a91c.patch

Updated locally version 2.9.0.5150
source: https://download.owncloud.com/desktop/ownCloud/stable/2.9.0.5150/source/ownCloud-2.9.0.5150.tar.xz

I replaced the two existing .patch files in owncloud-client/files dir by the two you mention.
Here's what I get:

+ patch -t -E --no-backup-if-mismatch -f -p1
/tmp/ypkg-setupYhKKNE: line 29: /home/build/work/files/fix-build-glib2.patch: No such file or directory
Command '['/bin/bash', '--norc', '--noprofile', '/tmp/ypkg-setupYhKKNE']' returned non-zero exit status 1
[Build] setup failed
ERRO[14:22:12] Failed to build package                       error="exit status 1"

Seems like it's not the way it should be done!

fix-build-glib2.patch is the old patch. You should insert the names of the patches in package.yml file.
Currentcly it is:

%patch -p1 < $pkgfiles/fix-build-glib2.patch
%patch -p1 < $pkgfiles/Fix-use-of-deleted-function.patch

I saved patch1 with name Fix-build-with-libcloudproviders.patch
and patch2 with Fix-build-of-the-tests-if-libcloudproviders-is-available.patch

This two files should be placed to files folder.

And then edit package.yml file as:

%patch -p1 < $pkgfiles/Fix-build-with-libcloudproviders.patch
%patch -p1 < $pkgfiles/Fix-build-of-the-tests-if-libcloudproviders-is-available.patch

old patch files in files folder should be deleted. And those are:

fix-build-glib2.patch
Fix-use-of-deleted-function.patch

It worked out all right, thanks for walking me through!
One question now: assuming it happens again in a future update, how do I know which patches to replace? And where would I find them?
If I can be autonomous on this I'd be happy to maintain it in the future..

algent added a comment.Thu, Oct 7, 2:13 PM

@monbosapin I found those patches from Arch. I saw they were using latest version, so I thought they should had found a solution to update this package.
It is expected that those patches aren't needed in next release and if you have again trouble with this package don't hesitate to ask again for help. #solus-dev on IRC channel is a good place to communicate with other people about this stuff.
It is not easy at first time and with more practice, you can be autonomous.
You can try to update other packages too (those that don't have a MAINTAINERS.md file), to learn more about packaging.