Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 714154 - www-apps/nextcloud with ldap doesn't work with php:7.4
Summary: www-apps/nextcloud with ldap doesn't work with php:7.4
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Bernard Cafarelli
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-24 09:24 UTC by Alex
Modified: 2020-03-26 16:33 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex 2020-03-24 09:24:43 UTC
Personally I would leave it to admin, which php version to install
for using with nextcloud effectively remove ANY dependence on PHP.

Currently
www-apps/nextcloud-18.0.2:18.0.2::gentoo depends on
dev-lang/php-7.4.3-r1:7.4::gentoo

The main issue, that LDAP component of nextcloud doesn't work correctly with
php-7.4, but works well with php-7.3 and below.

There is abosuletely NO issues if using nextcloud with php-7.3
Please either downgrade the dependency or remove it completely
and leave it to admin to decide what to do.

Any such a dependency is the soft one. There is no real dependency on php
in case of nextcloud. Likewise nextcloud possibly won't work without a web server, but it also doesn't have a web server as its dependency.

P.S. The fact is nextcloud will have to work with php-7.3 till nextcloud itself will be upgraded to use php-7.4 only features.

Reproducible: Always

Steps to Reproduce:
1. install nextcloud and php use occ for LDAP related things.
2. observe error messages because nextcloud use php functions, which are absent in php-7.4
3.
Comment 1 Tomáš Mózes 2020-03-24 12:01:12 UTC
Nextcloud depends on:

RDEPEND="dev-lang/php[curl?,filter,gd,hash(+),intl,json,mysql?,pdo,posix,postgres?,session,simplexml,sqlite?,truetype,xmlreader,xmlwriter,zip]
        imagemagick? ( dev-php/pecl-imagick )
        virtual/httpd-php"

And php 7.4 is the highest stable php version, that's why you have version 7.4.
Comment 2 Tomáš Mózes 2020-03-24 12:03:04 UTC
You can put >dev-lang/php-7.3.9999 in your package.mask and install php 7.3 if newer version is causing issues.
Comment 3 Bernard Cafarelli gentoo-dev 2020-03-24 20:57:56 UTC
Indeed, the dependency is just there to ensure minimal needed USE-flags are enabled correctly. And nextcloud supports php 7.4 (it is even marked as recommended):
https://docs.nextcloud.com/server/18/admin_manual/installation/system_requirements.html#server

Remember that you can have multiple versions of php installed and change active one with "eselect php". Myself I had php 7.4 installed for tests on my server for some time before switching.

As the error you mention is in a specific submodule, I encourage you to report the issue upstream:
https://github.com/nextcloud/server

Or if you want to try 7.4 support some bugs seem related, a quick search showed for example:
https://github.com/nextcloud/server/issues/19127
Comment 4 Alex 2020-03-25 08:57:29 UTC
(In reply to Tomáš Mózes from comment #1)
> Nextcloud depends on:

> And php 7.4 is the highest stable php version, that's why you have version
> 7.4.

Frankly, I don't need an explanation why it depends on 7.4
I am too able to open any ebuild and look in.

I try to bring over the thought, that NC should not depend on any
php version at all as a simplest solution, which will work forever.

The second best solution is using PHP_TARGETS, which I have set to
php-7.3. I can't see why NC should not respect that variable!

If there is a php dependence in any package it must respect PHP_TARGETS!

The idea to mask php-7.4 is NOT a solution it is a temporary workaround
in a special cases, where nothing else is available.
Comment 5 Tomáš Mózes 2020-03-25 09:00:47 UTC
Please install php 7.3 and report this upstream to get php 7.4 support.
Comment 6 Alex 2020-03-25 09:13:38 UTC
> Or if you want to try 7.4 support some bugs seem related, a quick search
> showed for example:
> https://github.com/nextcloud/server/issues/19127

Indeed that is the issue. It is not solved yet.
I simply don't wish to be pushed by newer php version or actually any version
of any package if previous works.

In many such cases removing a dependency is a solution.
NC is not a package will work automatically after emerge.
It requires many manual actions to make it work. Installing php could be one of them. I am simply against the dependency hell, which I am observing in
many other distros. To me it would make sense to keep only those, which
are strictly required. It will also reduce the number of issues for everyone.

If you disagree - it is OK, but please then make use of PHP_TARGETS in such ebuilds. It prevents pushing a newer version, which will be a danlging one.

Thanks a lot.
Comment 7 Alex 2020-03-25 12:13:31 UTC
(In reply to Tomáš Mózes from comment #5)
> Please install php 7.3 and report this upstream to get php 7.4 support.

Please, be aware that THIS is not a forum and I am not asking for help.
I am reporting the bug, please consier it as such! What you gonna do with that report is a different story, but giving advices here is offtopic.

Thanks for understanding.
Comment 8 Alessandro Barbieri 2020-03-26 03:48:50 UTC
I complained about PHP_TARGETS in the past
see: https://bugs.gentoo.org/694008
It doesn't seem nowhere near as funcional as the PYTHON_TARGETS
Comment 9 Alex 2020-03-26 15:37:47 UTC
(In reply to Alessandro Barbieri from comment #8)
> It doesn't seem nowhere near as funcional as the PYTHON_TARGETS

That is what I call wish/can problem. People wish do more and better,
but can't because of various reasons and the result is worse, than it could be.

Therefore removing dependency as suggested is the simplest and permanently working solution. There will be always issues with version compatibilities either php or python.

Regarding the python it would be much better to support only 1 version.
I can't see why any one might need the special version of it. Anyway most of related packages currently do not support anything but 3.6
Unfortunately few support only 2.7. Giving a choice for different python versions is looking for troubles. Why it is not obvious for developers I can't see.

Why no other packages have the same version madness like python? I wish python was never written. Sorry for oftopic.