Bug 22026 - Upgrade the nextcloud server in updates to prevent the mess we had in MGA5 with backports.
Summary: Upgrade the nextcloud server in updates to prevent the mess we had in MGA5 wi...
Status: ASSIGNED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 6
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard:
Keywords: feedback
Depends on:
Blocks:
 
Reported: 2017-11-15 08:40 CET by José Jorge
Modified: 2018-01-14 17:18 CET (History)
3 users (show)

See Also:
Source RPM:
CVE:
Status comment:


Attachments

Description José Jorge 2017-11-15 08:40:46 CET
I'd like to push an update upgrading the nextcloud server in Mageia.
- it will allow an easier upgrade to MGA7 without manual operations.
- it is better for security to have recent app in such a public server
- it allows to do a better packaging picking the problems in a slow pace, out of a whole system upgrade

The idea is to always have at least the version before the latest, which must be already in cauldron. So for now it is version 12.0.3 that is pushed to MGA6 updates testing.
José Jorge 2017-11-15 08:41:34 CET

CC: (none) => mageia
Assignee: bugsquad => lists.jjorge

Comment 1 José Jorge 2017-11-29 22:55:06 CET
First test on a production system :  unfortunately, we need some new lines in the config.php file, to manage better the apps directory. For now, they are in the rpmnew file. I think it will need an information.

I had to add the following lines manually :

  'integrity.check.disabled' => true,
  'log_type' => 'syslog',
  'updatechecker' => false,
  'check_for_working_htaccess' => false,
  'asset-pipeline.enabled' => false,
  'assetdirectory' => '/var/lib/nextcloud',
  'preview_libreoffice_path' => '/usr/bin/libreoffice',
  'apps_paths' =>
  array (
    0 =>
    array (
      'path' => '/usr/share/nextcloud/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 =>
    array (
      'path' => '/var/lib/nextcloud/apps',
      'url' => '/apps-appstore',
      'writable' => true,
    ),
  ),
Comment 2 José Jorge 2017-12-25 10:49:51 CET
A README.urpmi file was added to explain the changes in config.file.

Please QA, test this update and decide if such manual operations are acceptable with an update.

SRPM :

nextcloud-12.0.3-2.mga6.srpm

RPMS :

nextcloud-12.0.3-2.mga6.noarch.rpm
nextcloud-mysql-12.0.3-2.mga6.noarch.rpm
nextcloud-postgresql-12.0.3-2.mga6.noarch.rpm
nextcloud-sqlite-12.0.3-2.mga6.noarch.rpm

CC: (none) => lists.jjorge
Status: NEW => ASSIGNED
Assignee: lists.jjorge => qa-bugs

Comment 3 Brian Rockwell 2018-01-04 16:58:38 CET
do you need me to pull in an old version of nextcloud and then upgrade or is a fresh install acceptable?

CC: (none) => brtians1
Keywords: (none) => feedback

Comment 4 David Walser 2018-01-04 21:40:47 CET
Upgrades are actually the point of this update, and it's updating to a new stable branch, so testing updating from the release version is very important.

Keywords: feedback => (none)

Comment 5 Brian Rockwell 2018-01-05 17:26:11 CET
Installing Base

The following 43 packages are going to be installed:

- apache-2.4.27-1.1.mga6.x86_64
- apache-mod_php-5.6.32-1.mga6.x86_64
- lib64apr-util1_0-1.5.4-8.mga6.x86_64
- lib64apr1_0-1.5.2-2.1.mga6.x86_64
- lib64json2-0.12.1-1.mga6.x86_64
- lib64mbfl1-1.3.2-1.mga6.x86_64
- lib64onig2-5.9.6-2.mga6.x86_64
- lib64php5_common5-5.6.32-1.mga6.x86_64
- lib64t1lib5-5.1.2-19.mga6.x86_64
- lib64zip4-1.1.3-1.1.mga6.x86_64
- nextcloud-11.0.3-1.mga6.noarch
- php-ctype-5.6.32-1.mga6.x86_64
- php-curl-5.6.32-1.mga6.x86_64
- php-dom-5.6.32-1.mga6.x86_64
- php-fileinfo-5.6.32-1.mga6.x86_64
- php-filter-5.6.32-1.mga6.x86_64
- php-ftp-5.6.32-1.mga6.x86_64
- php-gd-5.6.32-1.mga6.x86_64
- php-gettext-5.6.32-1.mga6.x86_64
- php-hash-5.6.32-1.mga6.x86_64
- php-iconv-5.6.32-1.mga6.x86_64
- php-ini-5.6.32-1.mga6.x86_64
- php-json-5.6.32-1.mga6.x86_64
- php-mbstring-5.6.32-1.mga6.x86_64
- php-opcache-5.6.32-1.mga6.x86_64
- php-openssl-5.6.32-1.mga6.x86_64
- php-pdo-5.6.32-1.mga6.x86_64
- php-pdo_sqlite-5.6.32-1.mga6.x86_64
- php-posix-5.6.32-1.mga6.x86_64
- php-session-5.6.32-1.mga6.x86_64
- php-sqlite3-5.6.32-1.mga6.x86_64
- php-suhosin-0.9.38-1.mga6.x86_64
- php-sysvsem-5.6.32-1.mga6.x86_64
- php-sysvshm-5.6.32-1.mga6.x86_64
- php-timezonedb-2017.2-1.mga6.x86_64
- php-tokenizer-5.6.32-1.mga6.x86_64
- php-xml-5.6.32-1.mga6.x86_64
- php-xmlreader-5.6.32-1.mga6.x86_64
- php-xmlwriter-5.6.32-1.mga6.x86_64
- php-zip-5.6.32-1.mga6.x86_64
- php-zlib-5.6.32-1.mga6.x86_64
- t1lib-config-5.1.2-19.mga6.x86_64
- webserver-base-2.0-10.mga6.noarch

144MB of additional disk space will be used.

38MB of packages will be retrieved.

Is it ok to continue?

I’ve configured it with a custom data folder /home/apache and using sqlite.

Created a new user, besides admin, and posted some new documents in the repo.

Seems to be working as designed.


Now for upgrade

Upgrading to 12.03

The following 9 packages are going to be installed:

- lib64php5_common5-5.6.33-1.mga6.x86_64
- nextcloud-12.0.3-2.mga6.noarch
- nextcloud-mysql-12.0.3-2.mga6.noarch
- php-exif-5.6.33-1.mga6.x86_64
- php-ldap-5.6.33-1.mga6.x86_64
- php-mbstring-5.6.33-1.mga6.x86_64
- php-mysqlnd-5.6.33-1.mga6.x86_64
- php-pdo-5.6.33-1.mga6.x86_64
- php-pdo_mysql-5.6.33-1.mga6.x86_64

8.2MB of additional disk space will be used.

37MB of packages will be retrieved.

Is it ok to continue?



The configuration changes – I didn’t find the README.urpmi.  I did click on update notes, but they just pointed to the /etc/nextcloud/config.php.rpmnew file.

I looked at it.  This isn’t clear what needs to be changed at all.

I’m lost.  

Did I miss the README file somewhere?

Keywords: (none) => feedback

Comment 6 José Jorge 2018-01-05 22:37:05 CET
(In reply to Brian Rockwell from comment #5)
 > The configuration changes – I didn’t find the README.urpmi.  I did click on
> update notes, but they just pointed to the /etc/nextcloud/config.php.rpmnew
> file.
> 
> I looked at it.  This isn’t clear what needs to be changed at all.
> 
> I’m lost.  
> 
> Did I miss the README file somewhere?

Thanks for testing. The README file is the updates notes. It is in /usr/share/doc/nextcloud. The problem is that configuration changes a lot. End users should probably just copy database and path from /etc/nextcloud/config.php to /etc/nextcloud/config.php.rpmnew and then replace the first with that last.

I don't see a clean way to do this automaticaly...
Comment 7 Brian Rockwell 2018-01-05 23:43:19 CET
ok - updated the config.php and was able to get it set up.

With sqllite is lost my users and required me to reset them up.  As long as I named them the same I got my document directories back.  that could be convenient or quite frightening pending how you think about it.

Jose did you run into the same thing?

Keywords: feedback => (none)

Comment 8 José Jorge 2018-01-06 09:18:36 CET
(In reply to Brian Rockwell from comment #7)
> ok - updated the config.php and was able to get it set up.
> 
> With sqllite is lost my users and required me to reset them up.  As long as
> I named them the same I got my document directories back.  that could be
> convenient or quite frightening pending how you think about it.
> 
> Jose did you run into the same thing?

No. You should not lose you sqlite database. I have just tested with MariaDB database, but it should be the same. Can you ensure you choosed the same path for sqlite database?
Comment 9 Brian Rockwell 2018-01-06 21:16:55 CET
When I started nextcloud, the application started as if new not upgraded, so it must of overlaid the database.   I didn't have an option for choosing the directory.

I suspect this is part of the "cost" of using sqlite.

The rest of the application has worked fine, but I do see that risk.
Comment 10 José Jorge 2018-01-06 23:16:53 CET
(In reply to Brian Rockwell from comment #9)
> When I started nextcloud, the application started as if new not upgraded, so
> it must of overlaid the database.   I didn't have an option for choosing the
> directory.
> 

Got it : as data has moved, you have to move your data directory when upgrading, or keep the old path in the config file :

BEFORE:
"datadirectory" => "/usr/share/nextcloud/data",

AFTER:
"datadirectory" => "/var/lib/nextcloud/data",

As /usr/share/nextcloud/data was a symlink to /var/lib/nextcloud, it means one has to move /var/lib/nextcloud/* to /var/lib/nextcloud/data except data and apps directories.

This upgrade is hard for those who have kept the default config!
Comment 11 Brian Rockwell 2018-01-06 23:43:16 CET
As mentioned earlier, I retained the data directory, the old data was there, but not the database of users.

So, there is something else in the database, I'll try another tomorrow and see if I emulate the same thing or can get it to work.  If I can and I suspect it has to do with the hashes, I suspect we need to document carefully the configuration updates.
Comment 12 José Jorge 2018-01-06 23:45:22 CET
(In reply to Brian Rockwell from comment #9)
> I suspect this is part of the "cost" of using sqlite.

Forget my comment 10. You are right, I could reproduce the problem : nextcloud replaces existing sqlite file if you remove the installed => true line in config file.

So this is a end user bug, where I can just say sys admin have to add this at the end of config file, just before closing) :

'log_type' => 'syslog',
  'datadirectory' => '/var/lib/nextcloud/data',
  'updatechecker' => false,
  'check_for_working_htaccess' => false,
  'asset-pipeline.enabled' => false,
  'assetdirectory' => '/var/lib/nextcloud',
  'preview_libreoffice_path' => '/usr/bin/libreoffice',
  'apps_paths' =>
  array (
    0 =>
    array (
      'path' => '/usr/share/nextcloud/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 =>
    array (
      'path' => '/var/lib/nextcloud/apps',
      'url' => '/apps-appstore',
      'writable' => true,
    ),
  ),
Comment 13 Brian Rockwell 2018-01-07 21:35:17 CET
Hi - did a fresh build of 11.03.   Built it and a user.

Then installed 12.03, indicating as such as "installed" => true

the system then tried to do the upgrade then flagged back that it cannot do upgrades between major versions.

changed "installed" => false, this triggered a replace of the users, but data was retained.

-----

It works, but no luck with the upgrade.

Keywords: (none) => feedback

Comment 14 Brian Rockwell 2018-01-14 17:18:15 CET
fyi - on a straight install of Nextcloud 12.03 it ends up failing for me.  Apparently in that version SQLite is not a standard part of the install and thus the system is looking for mysql/mariadb.

While those are certainly more powerful, they also create a whole new set of configuration challenges.  In my case, mariadb was not installed yet NextCloud assumed it was.  I ended up in this broken situation with no path to install that was in anyway easy.

What did I do?

I went back to Nextcloud 11.03 and built that.

Is this upstream that they are dropping sqlite or is it our choice?  If it is ours, please add that as part of the build for 12.03.

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