Topic: Problem upgrading from stock CentOS-7 php to Remi php >= 7.0

Hi,

I'm trying to package a recent version of nextcloud for CentOS-7.
I started from nextcloud-10.0.4 present in EPEL and was able to upgrade it to 10.0.6. Unfortunately this version is now obsolete and the desktop client is unable to connect to it.

As the EPEL ticket about newer versions is stalled I decided to give a try to create package from 11.0 to latest one so one can upgrade from 10 to 17 with all the migrations in between.
I have a package that builds for V11, but it requires a php version higher than stock CentOS-7. Hence my prence here.

My problem is that installing Remi's package won't upgrade all php packages (only core OS package; not EPEL ones) resulting with a system with updated php engine and left with old stuffs that are not in Remis's repo.
If I remove all old php package and nextcloud keeping all Remi's php packages and if I try to install my non working nextcloud package, it tries to install many EPEL-php packages that are linked with old stock centos-7 php libs:

Of cours if I do that, I get plenty of modules loading errors, lib mismatches , etc...

I'm far from being expert in php, and I was really happy to find Remi's repos that do system replacement instead of parallel install that often require specific adjustments in config and paths.

Though, I'm stuck as I don't know how to handle the lack of packages like php-symfony-* and many others.

Did I forgot to enable a Remi-epel repo for all EPEL php modules?

If not how can I handle the miss of all those packages?

Many thanks for any tips. (If I succeed to build and upgrade nextcloud, of course I'll share my packages and src.rpm)

Cheers,

Olivier.

Re: Problem upgrading from stock CentOS-7 php to Remi php >= 7.0

> My problem is that installing Remi's package won't upgrade all php packages (only core OS package; not EPEL ones

Nearly all extension in EPEL are also in my repo, and much more, see the list
https://blog.remirepo.net/pages/PECL-ex … RPM-status

> Of cours if I do that, I get plenty of modules loading errors, lib mismatches , etc...

Example ?

> Though, I'm stuck as I don't know how to handle the lack of packages like php-symfony-* and many others.

Noarch packages are in "remi"

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: Problem upgrading from stock CentOS-7 php to Remi php >= 7.0

Also see https://copr.fedorainfracloud.org/coprs … ud/builds/ where there is already some WIP with nextcloud

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: Problem upgrading from stock CentOS-7 php to Remi php >= 7.0

Remi wrote:

> My problem is that installing Remi's package won't upgrade all php packages (only core OS package; not EPEL ones

Nearly all extension in EPEL are also in my repo, and much more, see the list
https://blog.remirepo.net/pages/PECL-ex … RPM-status

Remi, you're doing awesome work. and the fact that you have ability to replace stock package is really a top feature.
I'll try to find what repo I need to enable so yum sees the replacement version for all my stock packages like php-symfony-dom-crawler.noarch 0:2.8.12-2.el7 (can't cite all packages as forum prevent this).

Re: Problem upgrading from stock CentOS-7 php to Remi php >= 7.0

Remi wrote:

Also see https://copr.fedorainfracloud.org/coprs … ud/builds/ where there is already some WIP with nextcloud

So cool news, I'll give a close look at it. I just hope I can fast upgrade from 10.0.6 to this version without having to upgrade to 11 then 12 then 13 ... up to 16.

6 (edited by olahaye74 2020-01-16 15:17:08)

Re: Problem upgrading from stock CentOS-7 php to Remi php >= 7.0

I had a look at the nextcloud-16 work in progress package and it requires php version between 71 and 7.3 so I was planning to go for 7.3 so I'm safer for upcoming version.
the work is pretty similar to work I did on v11. I still need to figure out if I can upgrade from 10 to 16 or if I need to upgrade from 10 to 11 to 12 and so on up to 17.

I've just figured out where were all missing packages.
I missed the point that I need to enable 2 of your repos: Remi-php73 AND remi.

Now almost all packages do upgrade except 4 of them:
php channel dropbox php 1.3
php dropbox php Dropbox 1.0.0
php guzzle Guzzle 3.9.3
php pear MDB2 2.5.0

Are they unavailable or did I missed to unable a 3rd repo?

Re: Problem upgrading from stock CentOS-7 php to Remi php >= 7.0

> What am I missing?

to enable both remi-php73 (binary packages) and remi (noarch packages) repositories.

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

8 (edited by olahaye74 2020-01-16 15:21:35)

Re: Problem upgrading from stock CentOS-7 php to Remi php >= 7.0

Remi wrote:

> What am I missing?

to enable both remi-php73 (binary packages) and remi (noarch packages) repositories.

I've just seen that thus the edit of my previous message :-).

Still 4 package missing:
php channel dropbox php 1.3
php dropbox php Dropbox 1.0.0
php guzzle Guzzle 3.9.3
php pear MDB2 2.5.0

Re: Problem upgrading from stock CentOS-7 php to Remi php >= 7.0

If not updated, this means same version still work (or not wink no update since EL-7 was released, probably dead projects)

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: Problem upgrading from stock CentOS-7 php to Remi php >= 7.0

Lets hope those will work then :-)
Note: I hade many errors when I did upgrade, but all vanished when I did a yum reinstall 'php-*' (this is understandable as during the upgrade, there are old packages still there mixed with new ones.

Thnaks a lot for your repos and thanks a lot for your excellent support.

Re: Problem upgrading from stock CentOS-7 php to Remi php >= 7.0

To understand how it works for "most" packages

- created in "remi" repo
- pushed in Fedora / EPEL

For some (I don't own)

- maintained in Fedora
- pull for remi repo

Remi repo is usually in sync with Fedora rawhide, so include more recent versions and patches for latest PHP (so for 7.4)

But, sometime I can't update "remi" (for EL < 8) because for now I want to maintain compat with 5.6

But this will change shortly (see https://github.com/remicollet/remirepo/issues/130)


P.S. so if no change in rawhide, no change in "remi", which can then be same version / code / sources than EPEL one

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

12 (edited by olahaye74 2020-01-17 18:03:58)

Re: Problem upgrading from stock CentOS-7 php to Remi php >= 7.0

Wonderfull, it works PERFECTLY, I was able to build a rpm for nextcloud-v17.0.2 from my previous v11 rpm and the work in progress on v16 stated above.
The result is here: http://olivier.lahaye1.free.fr/SRPMS/ne … l7.src.rpm
To build the package: very easy:
Download the package using wget or curl
rpmbuild --rebuild nextcloud-17.0.2-1.el7.src.rpm
if a package is missing: yum install --enablerepo remi --enablerepo remi-php73 install packages-to-install
to install: yum install --enablerepo remi --enablerepo remi-php73 install ~/rpmbuild/RPMS/noarch/nextcloud*17.0.2*rpm
this will install nextcloud ans setup everything correctly including optional packages for svg favicon support.

My nextcloud v17 is in production mode and works like a charm.

WARNING you can't upgrade from v10.0.4 to v17.0.2. In order to do so you need to upgrade from v10 to v17 by hand and from stock php to php71 then to php72 and 73 (sudo -u apache php /usr/share/nextcloud/occ status) will tell when php is to be upgraded

- Upgrade process for nextcloud v10.0.4 rpm to v17.0.2 rpm on CentOS-7.7 is:

=> backup database and /etc/httpd and /etc/nextcloud
=> put nextcloud in maintenance mode: sudo -u apache php /usr/share/nextcloud/occ maintenance:mode --on
=> stop https (systemctl stop httpd)
=> yum remove all nextcloud packages
=> download all latest nextcloud releases for each major version
=> cp /etc/nextcloud/config.php.rpmsave /etc/nextcloud/config.php
=> update php to 7.1 (yum --enablerepi remi --enablerepo remi-71 update) # maybe 7.0 (look at lib/checkversion.php in v11 to see the supported php versions for a specific major release)
Then go for 11 to 17
=> (cd /usr/share/; tar xpvfj nextcloud-<release>.tar.bz2; ln -sf /etc/nextcloud ./nextcloud/config)
=> sudo -u apache php /usr/share/nextcloud/occ status
    if php is too low upgrade to next version: yum --enablerepo remi --enablerepo remi-phpXY update (where XY is 71 72 or 73 (never go for 74: nextcloud is not ready yet for this php release)
    if it is asked (v14 if I'm correct) update some php settings 128K => 1G as stated
=> sudo -u apache php /usr/share/nextcloud/occ upgrade
It will migrate the database (V12 to V13 is verry long)
Do this for all major version util you reach v17
=> Then remove softlink /usr/share/nextcloud/config
=> Then install the rpms you've built using:
   yum --enablerepo remi --enablerepo remi-php73 ~/rpmbuild/RPMS/noarch/nextcloud-*17.0.2*rpm
=> systemctl start httpd
=> check that your site is up stating maintenance mode
=> turn off maintenance mode.
You're running nextcloud v17.0.2 installed as RPMS and no garbage (unowned files) should be left on /usr/share (except if you themed nextcloud)

Re: Problem upgrading from stock CentOS-7 php to Remi php >= 7.0

smile

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi