Project

General

Profile

Bug #9119

PHP 5 CLI package gets purged when PHP 5 extensions are added

Added by Anonymous 11 months ago. Updated 8 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Package request
Target version:
Start date:
07/20/2018
Due date:
% Done:

100%

Estimated time:
Affected versions:
Security IDs:

Description

I've noticed a strange behaviour regarding PHP 5 packages:

On a freshly installed Alpine 3.8 instance I'm trying to install the PHP 5 CLI, adding some PHP extensions too. Whenever I'm adding an extension, PHP 5 CLI gets purged. Here's a log of this issue:

drubb:~# apk --update add php5-cli
fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/community/x86_64/APKINDEX.tar.gz
(1/8) Installing php5-common (5.6.36-r0)
(2/8) Installing pcre (8.42-r0)
(3/8) Installing ncurses-terminfo-base (6.1-r0)
(4/8) Installing ncurses-terminfo (6.1-r0)
(5/8) Installing ncurses-libs (6.1-r0)
(6/8) Installing readline (7.0.003-r0)
(7/8) Installing libxml2 (2.9.8-r0)
(8/8) Installing php5-cli (5.6.36-r0)
Executing busybox-1.28.4-r1.trigger
OK: 25 MiB in 26 packages
drubb:~# php5 -v
PHP 5.6.36 (cli) (built: May 18 2018 12:51:47) 
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
drubb:~# apk --update add php5-dom
(1/9) Purging php5-cli (5.6.36-r0)
(2/9) Purging php5-common (5.6.36-r0)
(3/9) Installing php5 (5.6.36-r0)
(4/9) Installing php5-dom (5.6.36-r0)
(5/9) Purging pcre (8.42-r0)
(6/9) Purging readline (7.0.003-r0)
(7/9) Purging ncurses-libs (6.1-r0)
(8/9) Purging ncurses-terminfo (6.1-r0)
(9/9) Purging ncurses-terminfo-base (6.1-r0)
Executing busybox-1.28.4-r1.trigger
OK: 8 MiB in 21 packages
drubb:~# php5 -v
-ash: php5: not found

I have no idea about what's happening here.

Thanks for taking a look!

Boris (aka drubb)


Related issues

Has duplicate Alpine Linux - Bug #9237: php5-cli only works if installed *before* php5Closed08/13/2018

Associated revisions

Revision 9d7cc418 (diff)
Added by Andy Postnikov 10 months ago

community/php5: fix dependency

Closes #9119

History

#1 Updated by Andy Postnikov 11 months ago

Sounds like issue in dependencies, will check this weekend

#2 Updated by Andy Postnikov 11 months ago

Confirm the bug

#4 Updated by Boris Böhne 11 months ago

This isn't limited to php5-dom, it's happening with other php5 extensions too, like e.g. php5-ftp.

#5 Updated by Andy Postnikov 11 months ago

Yes, all extensions affected - not sure how to fix it, maybe kinda "replaces" could work but I need help here cos can't make it work as expected

Btw for php7 we no longer build "cli" version cos having cli in php7 makes more sense

#6 Updated by Boris Böhne 11 months ago

Ok,is there any workaround? As far as I can see, the cli for php5 (/usr/bin/php5) is provided by this package only.

#7 Updated by Boris Böhne 11 months ago

Here's another observation, maybe it helps. I've compared the dependencies of the php5-dom package.

https://pkgs.alpinelinux.org/package/v3.7/community/x86_64/php5-dom

vs.

https://pkgs.alpinelinux.org/package/v3.8/community/x86_64/php5-dom

Dependencies (3.7): libxml2, musl, php5, php5-cli
Dependencies (3.8): libxml2, musl, php5, php5 (yes, twice)

While I'm not sure why the php5-dom package should depend on the php5-cli package, there's something weird in V3.8 for sure.

#8 Updated by Santosh Kumar Gupta 11 months ago

I confirm this is happening with me as well. The following module packages removes the php5-cli package:
=> php5-gd,
=> php5-pdo_pgsql,
=> php5-ctype,
=> php5-openssl

In v3.7 it working fine.

Anonymous wrote:

I've noticed a strange behaviour regarding PHP 5 packages:

On a freshly installed Alpine 3.8 instance I'm trying to install the PHP 5 CLI, adding some PHP extensions too. Whenever I'm adding an extension, PHP 5 CLI gets purged. Here's a log of this issue:

[...]
I have no idea about what's happening here.

Thanks for taking a look!

Boris (aka drubb)

#9 Updated by Andy Postnikov 10 months ago

  • Has duplicate Bug #9237: php5-cli only works if installed *before* php5 added

#10 Updated by André Hänsel 10 months ago

Isn't this simply because php5 is set to "provides php5-cli" (https://git.alpinelinux.org/cgit/aports/tree/community/php5/APKBUILD?h=3.8-stable#n15) which is not true?

#12 Updated by Natanael Copa 10 months ago

  • Target version set to 3.8.1

#13 Updated by Andy Postnikov 10 months ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

#14 Updated by Andy Postnikov 10 months ago

  • Status changed from Resolved to Closed

Tested and it works fine

/mnt/community/php5 $ sudo apk add php5-cli
(1/3) Installing php5-common (5.6.37-r1)
(2/3) Installing readline (7.0.003-r0)
(3/3) Installing php5-cli (5.6.37-r1)
Executing busybox-1.28.4-r2.trigger
OK: 266 MiB in 73 packages
/mnt/community/php5 $ sudo apk add php5-dom
(1/1) Installing php5-dom (5.6.37-r1)
OK: 267 MiB in 74 packages

#15 Updated by Andy Postnikov 10 months ago

fpm still depends on -cli but that's fine

/mnt/community/php5 $ sudo apk add php5-fpm
(1/2) Installing php5-common (5.6.37-r1)
(2/2) Installing php5-fpm (5.6.37-r1)
Executing busybox-1.28.4-r2.trigger
OK: 281 MiB in 72 packages
/mnt/community/php5 $ sudo apk add php5-dom
(1/3) Installing readline (7.0.003-r0)
(2/3) Installing php5-cli (5.6.37-r1)
(3/3) Installing php5-dom (5.6.37-r1)
Executing busybox-1.28.4-r2.trigger
OK: 290 MiB in 75 packages

#17 Updated by Santosh Kumar Gupta 10 months ago

Problem still exist. Installing following packages purge the php5-cli package:
php5-gd
php5-pdo_pgsql
php5-ctype
php5-openssl
php5-curl

Tested it on alpine:3.8 docker image.

#18 Updated by Andy Postnikov 10 months ago

This changes not yet backported to 3.8 please test edge

#19 Updated by Shing Lau 8 months ago

/ # cat /proc/version
Linux version 3.10.102 (root@build3) (gcc version 4.9.3 20150311 (prerelease) (crosstool-NG 1.20.0) ) #15217 SMP Fri Nov 3 04:40:52 CST 2017
/ # apk add php5-cli
(1/4) Installing php5-common (5.6.37-r0)
(2/4) Installing pcre (8.42-r0)
(3/4) Installing libxml2 (2.9.8-r1)
(4/4) Installing php5-cli (5.6.37-r0)
Executing busybox-1.28.4-r1.trigger
OK: 149 MiB in 80 packages
/ # apk add php5-zip
(1/6) Purging php5-cli (5.6.37-r0)
(2/6) Purging php5-common (5.6.37-r0)
(3/6) Installing php5 (5.6.37-r0)
(4/6) Installing php5-zip (5.6.37-r0)
(5/6) Purging pcre (8.42-r0)
(6/6) Purging libxml2 (2.9.8-r1)
Executing busybox-1.28.4-r1.trigger
OK: 139 MiB in 78 packages
/ #

The problem still not fix.

#20 Updated by Andy Postnikov 8 months ago

@Shing Lau are you using 3.8 or edge?

#22 Updated by Andy Postnikov 8 months ago

btw laste security update also not ported to 3.8 https://github.com/alpinelinux/aports/pull/5167

#23 Updated by Santosh Kumar Gupta 8 months ago

It's not yet fixed in 3.8.

Also available in: Atom PDF