The horrible mess called PHP
Jan Rękorajski
baggins at pld-linux.org
Sun Jun 16 10:30:28 CEST 2024
On Sun, 16 Jun 2024, Arkadiusz Miśkiewicz via pld-devel-en wrote:
> On 15/06/2024 22:34, Jan Rękorajski wrote:
>
> > TL;DR Make PHP packaging sustainable or all versioned php packages will
> > be deleted and replaced by a single php package tracking head.
>
> I'm using almost all old PHPs, including old 4 one. DON'T delete these.
>
> (I'm using few pear packages, too)
>
> >
> > The current model of packaging PHP runtime is not sustainable. >
> > The dependencies are a complete mess, packages (build)require
> > php-something, but none of the versioned phpXY-something provides
> > this.
>
> Be more specific and I'll try to fix things related to php packages. Now
> I have to guess what are you talking about.
$ builder -bi -R php-pear-PEAR.spec
[...]
Install dependencies: php-pcre php-xml
Loading [pndir]th-test...
Loading [pndir]th-test...
Loading [pndir]th-ready...
Loading [pndir]th-ready...
Loading [pndir]th...
Loading [pndir]th...
34536 packages read
Removed 2036 duplicate packages from available set
error: php-pcre: no such package
error: php-xml: no such package
Because spec:
%define php_name php%{?php_suffix}
[...]
BuildRequires: %{php_name}-pcre
Basically you need to set %php_suffix manually. This should be automated
at the spec level. Maybe something akin to what I did for kernel
packages. Or maybe "pick the latest runtime if not overriden" at macro
definition level.
And to make it better, all php runtimes should be parallel-installable,
including devel, excluding /usr/bin/php link.
> > This leads to a lot of manual labor when rebuilding php-pecl
> > packages (run this magical command for managing installed deps
> > and pray it works).
> >
> > This also leades to even worse mess for PEAR packages. The dependency
> > generator needs /usr/bin/php and it gets a random one,
>
> Does output that it produces depend on php version? AFAIK any php is ok
> for it to produce the same output.
I have no idea, never used PHP. The script looks pretty generic, tho.
> > if it gets
> > anything at all.
>
> But you did disable dependency generator for PEAR
>
> Author: Jan Rękorajski <baggins at pld-linux.org>
> Date: Sat Oct 17 10:02:30 2020 +0200
> - disable php pear dependency generators - ver 1.753
>
> and that causes now that rebuilding pear packages produce new packages
> that do not provide things that existing packages want.
>
> If you disabled this to get rid of pear specific deps then all pear
> packages need to be rebuild.
Hah, good point. I might have disabled it because of dependency problems
seteaming from constant installs/removals of the php runtime.
I'm going to reenable that and test if it still works.
--
Jan Rękorajski | PLD/Linux
SysAdm | baggins<at>pld-linux.org | http://www.pld-linux.org/
More information about the pld-devel-en
mailing list