"Instead I have to specify the full version, e.g. pkg_add php-7.4.14" - that's not needed, you can use "pkg_add php%7.4". This applies to other packages where multiple versions exist too but the exact version format varies - some use e.g. "stable" instead of a number - see pkg_info -z to check from installed packages.

A request to maintainers of PHP-based ports: I intend to switch the default MODPHP_VERSION to 7.4 but this may break some software. If you're aware that your ports require 7.3 please would you specifically set MODPHP_VERSION=7.3 for them.

--
 Sent from a phone, apologies for poor formatting.
On 8 January 2021 10:00:24 Paul de Weerd <we...@weirdnet.nl> wrote:

Hi Mike,

As I was looking into exactly this not too long ago, let me share the
answer I got from Stuart:

Ports can allow alternative versions with a default version
(e.g. "RUN_DEPENDS = php->=7.3,<7.5:lang/php/7.3") but it doesn't
have a way to say "php-7.3+php-pspell-7.3+php-zip-7.3 OR
php-7.4+php-pspell-7.4+php-zip-7.4" without allowing a broken
mixture (php-7.3+php-pspell-7.4+php-zip-7.4).

Unless ports infrastructure/package tools are changed the only
viable option is to pick some version or other and set that,

Short version: it's complicated.  I decided to let php-7.3 getting
installed not bother me :)

Cheers,

Paul

On Fri, Jan 08, 2021 at 10:15:25AM +0100, Mike Fischer wrote:
| Hi!
|
| I am posting this question to the list with CC to the relevant maintainers because it involves a number of packages.
|
| On a few of OpenBSD 6.8 amd64 instances using stable we are using php-7.4.x with apache-httpd and with the OpenBSD httpd as well as on the command line. Everything is kept up to date regularly.
|
| We are also using the following packages:
| dokuwiki-2020.07.29
| pear-utils-1.10.9
| phpMyAdmin-4.9.5
| wp-cli-2.4.0
|
| Each of these has a dependency on php-7.3.x which means the older version of PHP is also installed even though it is not used.
|
| # pkg_info -R php-7.3.26
| Information for inst:php-7.3.26
|
| Required by:
| dokuwiki-2020.07.29
| pear-utils-1.10.9
| php-gd-7.3.26
| php-mysqli-7.3.26
| phpMyAdmin-4.9.5
| wp-cli-2.4.0
|
|
| #
|
| A similar issue exists for php-gd-7.3.26:
| # pkg_info -R php-gd-7.3.26
| Information for inst:php-gd-7.3.26
|
| Required by:
| dokuwiki-2020.07.29
| phpMyAdmin-4.9.5
|
|
| #
|
| And for php-mysqli-7.3.26:
| # pkg_info -R php-mysqli-7.3.26
| Information for inst:php-mysqli-7.3.26
|
| Required by:
| phpMyAdmin-4.9.5
|
|
| #
|
| Using these packages with php-7.4.x seems to work fine. But pulling in the older PHP version just to satisfy the dependency seems somewhat wasteful. I’d love to be able get rid of the unnecessary php-7.3.x packages to save space and to save time during updates.
|
| Is there a way to make the dependencies more general so they will accept the php-7.4.x versions to satisfy the requirement?
|
| Maybe there is a way to specify a minimum required version in the packages?
|
|
| @Stuart:
| Possibly the basic issue is with the way the PHP packages are built. PHP generally makes major changes that might affect compatibility with a x.x version bump and reserves the x.x.x bumps to bug fixes. So should the PHP packages use a flavor mechanism to differentiate between x.x versions?
|
| A related issue I found is that with PHP, unlike other packages, I can’t just pkg_add php or pkg_add php-x.x to install the latest version. Instead I have to specify the full version, e.g. pkg_add php-7.4.14. This is somewhat cumbersome when wanting to just install the latest version because I would need to do a pkg_info -Q php first to figure out which exact version to get. Is this intentional or is there a better way to do a generic install?
|
|
| Note: I am a complete noob when it comes to the internals of the OpenBSD packaging system. So Im asking from the perspective of an admin using the system.
|
|
| Thanks!
| --
| Mike Fischer
|
|

--
++++++++[<++++++++++>-]<+++++++.>+++[<------>-]<.>+++[<+
+++++++++++>-]<.>++[<------------>-]<+.--------------.[-]
                http://www.weirdnet.nl/

Reply via email to