Bug 19662 - Owncloud 9.0 is backported to make easier MGA6 upgrade
Summary: Owncloud 9.0 is backported to make easier MGA6 upgrade
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: Backports (show other bugs)
Version: 5
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: MGA5-32-OK MGA5-64-OK
Keywords: Backport, validated_backport
Depends on:
Blocks:
 
Reported: 2016-10-26 22:51 CEST by José Jorge
Modified: 2017-05-28 10:31 CEST (History)
5 users (show)

See Also:
Source RPM: owncloud
CVE:
Status comment:


Attachments

Description José Jorge 2016-10-26 22:51:30 CEST
Following the 8.1.10 and 8.2.8 versions success, I have uploaded owncloud version 9.0.5 to backports testing.

The only rpm is a noarch owncloud-9.0.5-1.mga5
José Jorge 2016-10-26 22:54:53 CEST

Keywords: (none) => Backport

Comment 1 Morgan Leijström 2016-10-27 00:19:28 CEST
(  Initiated from https://bugs.mageia.org/show_bug.cgi?id=17279#c41 ,
   also ref https://wiki.mageia.org/en/OwnCloud#Upgrading    )

Tested mga5-64 upgrade from 8.2.8, seem to work, but complains:

This following is very strange.  I know i have not manually installed any apps/plugins, but at end of the upgrade initiated from web interface, it complained about the two apps and that it had disabled them:
  files_videoviewer (3rdparty), updater (3rdparty)

There is also a warning banner top of web page, and after logging in to admin page it say there were problems with integrity check.
Looks like https://doc.owncloud.org/server/9.0/admin_manual/issues/code_signing.html
Clicking a link in admin page i get:
-----------------8<------------------

The following list covers which files have failed the integrity check. Please read
the previous linked documentation to learn more about the errors and how to fix
them.

Results
=======
- core
	- INVALID_HASH
		- .htaccess
		- core/doc/admin/_sources/configuration_files/collaborative_documents_configuration.txt
		- core/doc/admin/_static/img/note_pencil.svg
		- core/doc/admin/_static/img/warning.svg
		- core/doc/admin/_static/style.css
		- core/fonts/LICENSE.txt
		- core/vendor/jquery-migrate/jquery-migrate.js
		- core/vendor/jsTimezoneDetect/jstz.js
		- resources/config/ca-bundle.crt
	- FILE_MISSING
		- .user.ini
		- AUTHORS
		- COPYING-AGPL
	- EXTRA_FILE
		- tools.php
- files_external
	- INVALID_HASH
		- 3rdparty/Dropbox/API.php

CC: (none) => fri

Comment 2 Morgan Leijström 2016-10-27 00:48:14 CEST
... and now i found these lines in log (newest top):

--------------------8<--------------------
Warning	files	Can't write upload limit to /var/tmp/oc_tmp_RI9B5v-folder/.user.ini. Please check the file permissions	2016-10-26T22:21:24+00:00

Error	PHP	copy(/usr/share/owncloud/.user.ini): failed to open stream: No such file or directory at /usr/share/owncloud/lib/private/integritycheck/checker.php#189	2016-10-26T22:21:24+00:00

Warning	files	Can't write upload limit to /var/tmp/oc_tmp_j5lXk6-folder/.user.ini. Please check the file permissions	2016-10-26T22:01:38+00:00

Error	PHP	copy(/usr/share/owncloud/.user.ini): failed to open stream: No such file or directory at /usr/share/owncloud/lib/private/integritycheck/checker.php#189	2016-10-26T22:01:38+00:00

Debug	core	No update found at the ownCloud appstore for app 166054	2016-10-26T22:01:33+00:00

Debug	core	starting upgrade from 8.2.8.2 to 9.0.5.2	2016-10-26T22:01:19+00:00
-------------------->8--------------------

I do have an old issue but i think it is unrelated: this log error poppes up now and then also before upgrading from 8.0.15:

--------------------8<--------------------
Fatal	index	Exception: {"Exception":"OC\\NeedsUpdateException","Message":"","Code":0,"Trace":"#0 \/usr\/share\/owncloud\/lib\/private\/app.php(98): OC_App::loadApp('files')\n#1 \/usr\/share\/owncloud\/lib\/private\/util.php(127): OC_App::loadApps(Array)\n#2 \/usr\/share\/owncloud\/lib\/base.php(876): OC_Util::setupFS()\n#3 \/usr\/share\/owncloud\/index.php(48): OC::handleRequest()\n#4 {main}","File":"\/usr\/share\/owncloud\/lib\/private\/app.php","Line":118}	2016-10-15T07:58:05+00:00
-------------------->8--------------------

I do no tknow what that is, and have not had interest to dig into it...

BTW, OOPS: i just realised that I earlier today on that machine have perforemd urpmi --auto-update, with all testing repos enabled, so it have quite a lot new php because of that i think, and some other stuff...  well, it works...
Comment 3 Morgan Leijström 2016-10-27 01:23:26 CEST
About file permissions in /var/tmp mentioned in log:
I have no problem creating files and folders there as normal user.
None of the subfolders mentioned in log exist there.
And not something similar either.
There exist an empty folder owncloud-oc<somenumbershere>cc with timestamp when i originally installed first version of owncloud on this system.

Also there exist no /usr/share/owncloud/.user.ini

I dont know what the in log mentioned upload limit is, but the quota at /owncloud/index.php/settings/users are same as before.


The apps for updates and video are activated and from ownCloud community - without me doing anything, so the old versions were simply replaced.  The "error" message could have said so... = no error!
Comment 4 José Jorge 2016-10-27 15:49:09 CEST
(In reply to Morgan Leijström from comment #3)
> About file permissions in /var/tmp mentioned in log:
> Also there exist no /usr/share/owncloud/.user.ini

This is the real reason for this warning.
I have fixed it locally with a :

touch /usr/share/owncloud/.user.ini
chown apache.apache /usr/share/owncloud/.user.ini

But I think we should not do it in the packaging : this upgrade is just intended to be a step towards nextcloud-10.1, so this kind of bugs should only be fixed if they affect this last package.

> I dont know what the in log mentioned upload limit is, but the quota at
> /owncloud/index.php/settings/users are same as before.

This is the uploaded file size limit, not the quota.

> The apps for updates and video are activated and from ownCloud community -
> without me doing anything, so the old versions were simply replaced.  The
> "error" message could have said so... = no error!

Yes, this is because owncloud removes apps that are bundled in previous versions. It is one of the points nextcloud tries to do better, I suggest we ignore this.

Status: NEW => ASSIGNED

Comment 5 Morgan Leijström 2016-10-27 17:40:33 CEST
(In reply to José Jorge from comment #4)
> But I think we should not do it in the packaging : this upgrade is just
> intended to be a step towards nextcloud-10.1, so this kind of bugs should
> only be fixed if they affect this last package.

Users of Mageia 5, and potentially new users of short to come 5.1, who wants to run owncloud of course want latest avaialble version, which is this.

So IMO, it must work to to a fresh new install of ownCloud 9.0.5 on mga5 now, and for a few months.

I dont think common users will swithc their SOHO or home servers to mga6 directly when it comes out either.

For the warnings, i can note them in the wiki. Possible i can also add instructions for manual work like you performed.  I think it cannot pe perfect anyway; 
https://github.com/owncloud/core/issues/25773 : ' Inability to automate/pre-configure user.ini prior to Owncloud's "1st run end-user setup" '

Do you have any good info on owncloud/.user.ini for OC9.0?  I tried https://doc.owncloud.org/server/9.0/admin_manual/configuration_files/big_file_upload_configuration.html#configuring-your-web-server but it makes me more confused, not less...
Comment 6 Brian Rockwell 2016-11-18 15:28:52 CET
$ uname -a
Linux localhost 4.4.30-desktop-2.mga5 #1 SMP Fri Nov 4 19:17:03 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux


I was originally on 8.0.15 (all updates from Mageia applied)

Did the update

The following package is going to be installed:

- owncloud-9.0.5-1.mga5.noarch

12MB of additional disk space will be used.


restarted the computer and pulled up owncloud.  Got the following

ownCloud will be updated to version 9.0.5
These apps will be updated:

    Activity (activity)
    Files (files)
    PDF Viewer (files_pdfviewer)
    Share Files (files_sharing)
    Text Editor (files_texteditor)
    Deleted files (files_trashbin)
    Versions (files_versions)
    Gallery (gallery)
    Provisioning API (provisioning_api)

Please make sure that the database, the config folder and the data folder have been backed up before proceeding. 





-------------

Updating ownCloud to version 9.0.5, this may take a while.

Preparing update
Set log level to debug
Turned on maintenance mode
Exception: Updates between multiple major versions and downgrades are unsupported.

--------------

From help page

Problem:

A "Updates between multiple major versions are unsupported" message is shown during an update/upgrade

Description:

As the message is telling you, you have done an unsupported upgrade path. For example:

Original version: 8.0.2
Upgraded version: 8.2.6

In this case you have skipped the 8.1.x major upgrade which is unsupported as stated within the documentation.

Solution:

You need to upgrade first to the latest available version of 8.1.x which is currently 8.1.8. For that specific scenario the following is recommended:

    Remove all files and folders of your oC installation folder except /data/ and /config/
    Download 8.0.13 from https://owncloud.org/changelog/
    Extract the content of the archive it into your oC installation folder
    Run the update via the webgui or the occ command line tool

Afterwards repeat those steps with 8.1.8 and 8.2.6



Looks like we need to do some inbetween updating of owncloud.

CC: (none) => brtians1

Comment 7 Morgan Leijström 2016-11-18 15:37:32 CET
(In reply to Brian Rockwell from comment #6)
> Looks like we need to do some inbetween updating of owncloud.

Exactly. see: https://wiki.mageia.org/en/OwnCloud#Upgrading

( It is planned to be a note in Mageia 6 errata with that link )
Comment 8 Brian Rockwell 2016-11-18 15:43:41 CET
Good it is documented, but when I loaded backports for MGA 5, 8.1.8 and 8.2.6 were not brought up as options for updates.

So, when I upgrade to MGA6 I suspect it'll be broken.
Comment 9 Brian Rockwell 2016-11-18 15:54:50 CET
second guessed myself and went back and confirmed backports was added to my repo list and refreshed.  Still missing mid-levels we need.

Can the 8.1 and 8.2 owncloud updates be pushed to updates testing.  I'll work with you to test the steps.
Comment 10 Thomas Backlund 2016-11-18 15:58:40 CET
No, they wont be pushed to updates_testing.

This is the only way to do the upgrade as owncloud needs to be ugraded in steps...

If you dont like it, complain upstream for not supporting skipping versions in upgrades...

As an owncloud users, you need to follow the documented path.
If you ignore that, you get to keep the pieces

CC: (none) => tmb

Comment 11 Brian Rockwell 2016-11-18 16:03:04 CET
That is a bummer as it will break Owncloud in MGA6.  Home users, like myself, follow the updates as received from Mageia.  If Mageia doesn't provide the increments between 8.0 and 9.0 then that just sucks for the users.

I can hack that and get through it, not sure others can.

just thoughts, 

Brian

p.s. I'll try a raw install of just owncloud 9 later and see how it goes..
Comment 12 Thomas Backlund 2016-11-18 16:15:28 CET
they are provided as increments in backports, so you can upgrade your owncloud bit by bit... by installing first incremental version, doing the needed maintenance/verification, and then next incremental and so on...

That's why it's written on wiki now, and will be referenced in release notes / errata...

as for mga6 there wont be any owncloud, it's been replaced by nextcloud
Comment 13 Morgan Leijström 2016-11-18 16:15:53 CET
If you have 9.x installed i guess that is the reason you do not see the lower versions.

So uninstall 9.x,  then install 8.1.8, and follow the wiki.

Yes it is a PITA but Thomas is correct (and i wrote most of that wiki...)

The reason we do not have ownCloud server upgrades in normal updates, is because the server cannot complete upgrade without user interaction, plus it have happened it have broken anyway, so user need be prepared - if critical data he should do backup forst.  Therefor we decided against automatic updates of the server.  Also client 1 to 2 need reconfiguration.

To illustrate further, my ISP had owncloud as a one-click install option, but have withdrawn new installs as they did not yet solve how to make it upgrade reliably. (they have put back backups for me three times)

Ah, heck, I know errata page is for the sta1, but i added the needed note there now anyway, hoping less people will get trapped...

https://wiki.mageia.org/en/Mageia_6_Errata
Comment 14 Brian Rockwell 2016-11-18 16:26:30 CET
That's fair.

I'm a bit daft at times, but understand now.

Thanks,
Brian
Comment 15 Morgan Leijström 2016-11-18 20:42:54 CET
No worries :)

BTW, I guess this bug is not closed because some confusion described in comment 4 and 5.  It would be great if a good explanation could be written into the wiki and this bug closed. Anyone is welcome to do it, myself is just confused.
Comment 16 Brian Rockwell 2016-11-19 01:48:23 CET
uname -a
Linux localhost 4.4.30-desktop-2.mga5 #1 SMP Fri Nov 4 20:17:55 UTC 2016 i686 i686 i686 GNU/Linux

Installed owncloud 9, ran through the set-up.

No issues to speak of.

I was able to go through setup, and test through local host on VM.

Seems good to me, just don't try to upgrade from 8.0.15  ;-)

------------------

Also noted backports for 8.1 and 8.2.  Do you want me to try those increments up to 9?
Comment 17 Morgan Leijström 2016-11-19 16:19:35 CET
Thank you Brian for testing and feedback - It is good you verified that 9.0 fresh install works (i dont know if it was tested)

The upgrades are already tested as in

https://bugs.mageia.org/show_bug.cgi?id=19574

https://bugs.mageia.org/show_bug.cgi?id=17279

https://bugs.mageia.org/show_bug.cgi?id=19634

I have personally done 8.0.? -> 8.0.15 -> 8.1.10 -> 8.2.8 -> 9.0.5 on my mga5 64 bit home server.



What really need be tested is upgrading mga5 with OC9 to mga6 with NC10, using the upcoming sta2 install DVD.

And test fresh install of NC10 on mga6 and adjust wiki if needed.

And if you find anything to improve in the wiki please do.

/Morgan
Comment 18 José Jorge 2016-11-19 17:22:50 CET
So we can push this backport, as it was tested successfully both ways : install and upgrade. I have written in the wiki the workaround for .user.ini file.

Whiteboard: (none) => MGA5-32-OK MGA5-64-OK

Comment 19 Morgan Leijström 2016-11-19 20:09:07 CET
Great, thanks :)
Dave Hodgins 2016-11-21 19:53:51 CET

Keywords: (none) => validated_backport
CC: (none) => davidwhodgins

Comment 20 Nicolas Lécureuil 2016-11-23 14:25:41 CET
moved

Status: ASSIGNED => RESOLVED
CC: (none) => mageia
Resolution: (none) => FIXED

Comment 21 Morgan Leijström 2017-05-28 10:31:03 CEST
Time have passed and we now need more versions to bridge the gap mga5 to 6, i issued a fresh Bug 20953 for continued work.

Note You need to log in before you can comment on or make changes to this bug.