RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2055422 - pecl upgrade fails unexpectedly
Summary: pecl upgrade fails unexpectedly
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: php-pear
Version: 8.5
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Remi Collet
QA Contact: Branislav Náter
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-02-16 21:40 UTC by Rajesh Dulhani
Modified: 2022-11-08 10:54 UTC (History)
1 user (show)

Fixed In Version: php-pear-1.10.13-1.module+el8.7.0+15127+a450a8db
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-11-08 09:52:22 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-112678 0 None None None 2022-02-16 21:44:03 UTC
Red Hat Product Errata RHSA-2022:7628 0 None None None 2022-11-08 09:52:51 UTC

Description Rajesh Dulhani 2022-02-16 21:40:53 UTC
Description of problem:

"pecl upgrade" should return "Nothing to upgrade" and exit with a status code of 0 when all PECL installed packages are the latest version. Currently, it fails with status code 1 and the unhelpful error message:

pear.php.net is using a unsupported protocol - This should never happen.
pear.php.net is using a unsupported protocol - This should never happen.
upgrade failed


Version-Release number of selected component (if applicable):

# rpm -qf /usr/bin/pecl
php-pear-1.10.12-1.module+el8.3.0+6678+b09f589e.noarch


How reproducible:

This is with a clean installation of RHEL 8.5 on AWS. Here is the complete command history.

# history
    1  dnf update
    2  shutdown -r now
    3  dnf module enable php:7.4
    4  dnf install -y php php-devel php-pear make
    5  pecl install redis-5.3.4
    6  pecl upgrade
    7  pecl upgrade

Note that command 6 updates the redis extension to version 5.3.6 successfully. Command 7 fails with:

# pecl upgrade
pear.php.net is using a unsupported protocol - This should never happen.
pear.php.net is using a unsupported protocol - This should never happen.
upgrade failed


This appears to be fixed upstream. The problem can be temporarily resolved with "pear upgrade --force", which rebuilds and overwrite the php-pear package from Red Hat. However, re-installing this package reverts to the broken behavior. This strongly indicates that future updates to this package will again break pear/pecl in this way if the bug isn't squashed.


Steps to Reproduce:

~~~
# cat /etc/redhat-release 
Red Hat Enterprise Linux release 8.5 (Ootpa)


# rpm -qf /usr/bin/pecl
php-pear-1.10.12-1.module+el8.3.0+6678+b09f589e.noarch


# dnf install -y php php-devel php-pear make
Updating Subscription Management repositories.
Last metadata expiration check: 0:56:34 ago on Wed 16 Feb 2022 10:53:12 PM IST.
Dependencies resolved.
================================================================================================================
 Package             Arch   Version                                      Repository                        Size
================================================================================================================
Installing:
 make                x86_64 1:4.2.1-10.el8                               rhel-8-for-x86_64-baseos-rpms    498 k
 php                 x86_64 7.4.19-1.module+el8.5.0+11143+cc873159       rhel-8-for-x86_64-appstream-rpms 1.5 M
 php-devel           x86_64 7.4.19-1.module+el8.5.0+11143+cc873159       rhel-8-for-x86_64-appstream-rpms 728 k
 php-pear            noarch 1:1.10.12-1.module+el8.3.0+6678+b09f589e     rhel-8-for-x86_64-appstream-rpms 361 k
Installing dependencies:
 annobin             x86_64 9.72-1.el8_5.2                               rhel-8-for-x86_64-appstream-rpms 111 k
 apr                 x86_64 1.6.3-12.el8                                 rhel-8-for-x86_64-appstream-rpms 130 k
 apr-util            x86_64 1.6.1-6.el8                                  rhel-8-for-x86_64-appstream-rpms 105 k
 autoconf            noarch 2.69-29.el8                                  rhel-8-for-x86_64-appstream-rpms 711 k
 automake            noarch 1.16.1-7.el8                                 rhel-8-for-x86_64-appstream-rpms 713 k
 cmake-filesystem    x86_64 3.20.2-4.el8                                 rhel-8-for-x86_64-appstream-rpms  45 k
 cpp                 x86_64 8.5.0-4.el8_5                                rhel-8-for-x86_64-appstream-rpms  10 M
 gcc                 x86_64 8.5.0-4.el8_5                                rhel-8-for-x86_64-appstream-rpms  23 M
 gcc-c++             x86_64 8.5.0-4.el8_5                                rhel-8-for-x86_64-appstream-rpms  12 M
 glibc-devel         x86_64 2.28-164.el8                                 rhel-8-for-x86_64-baseos-rpms    1.0 M
 glibc-headers       x86_64 2.28-164.el8                                 rhel-8-for-x86_64-baseos-rpms    480 k
 httpd               x86_64 2.4.37-43.module+el8.5.0+13806+b30d9eec.1    rhel-8-for-x86_64-appstream-rpms 1.4 M
 httpd-filesystem    noarch 2.4.37-43.module+el8.5.0+13806+b30d9eec.1    rhel-8-for-x86_64-appstream-rpms  40 k
 httpd-tools         x86_64 2.4.37-43.module+el8.5.0+13806+b30d9eec.1    rhel-8-for-x86_64-appstream-rpms 107 k
 isl                 x86_64 0.16.1-6.el8                                 rhel-8-for-x86_64-appstream-rpms 841 k
 kernel-headers      x86_64 4.18.0-348.12.2.el8_5                        rhel-8-for-x86_64-baseos-rpms    8.3 M
 keyutils-libs-devel x86_64 1.5.10-9.el8                                 rhel-8-for-x86_64-baseos-rpms     48 k
 krb5-devel          x86_64 1.18.2-14.el8                                rhel-8-for-x86_64-baseos-rpms    560 k
 libcom_err-devel    x86_64 1.45.6-2.el8                                 rhel-8-for-x86_64-baseos-rpms     38 k
 libkadm5            x86_64 1.18.2-14.el8                                rhel-8-for-x86_64-baseos-rpms    187 k
 libselinux-devel    x86_64 2.9-5.el8                                    rhel-8-for-x86_64-baseos-rpms    200 k
 libsepol-devel      x86_64 2.9-3.el8                                    rhel-8-for-x86_64-baseos-rpms     87 k
 libstdc++-devel     x86_64 8.5.0-4.el8_5                                rhel-8-for-x86_64-appstream-rpms 2.0 M
 libtool             x86_64 2.4.6-25.el8                                 rhel-8-for-x86_64-appstream-rpms 709 k
 libverto-devel      x86_64 0.3.0-5.el8                                  rhel-8-for-x86_64-baseos-rpms     18 k
 libxcrypt-devel     x86_64 4.1.1-6.el8                                  rhel-8-for-x86_64-baseos-rpms     25 k
 libxml2-devel       x86_64 2.9.7-9.el8_4.2                              rhel-8-for-x86_64-appstream-rpms 1.0 M
 m4                  x86_64 1.4.18-7.el8                                 rhel-8-for-x86_64-baseos-rpms    223 k
 mod_http2           x86_64 1.15.7-3.module+el8.4.0+8625+d397f3da        rhel-8-for-x86_64-appstream-rpms 154 k
 nginx-filesystem    noarch 1:1.14.1-9.module+el8.0.0+4108+af250afe      rhel-8-for-x86_64-appstream-rpms  24 k
 openssl-devel       x86_64 1:1.1.1k-5.el8_5                             rhel-8-for-x86_64-baseos-rpms    2.3 M
 pcre2-devel         x86_64 10.32-2.el8                                  rhel-8-for-x86_64-baseos-rpms    605 k
 pcre2-utf16         x86_64 10.32-2.el8                                  rhel-8-for-x86_64-baseos-rpms    229 k
 pcre2-utf32         x86_64 10.32-2.el8                                  rhel-8-for-x86_64-baseos-rpms    220 k
 perl-Thread-Queue   noarch 3.13-1.el8                                   rhel-8-for-x86_64-appstream-rpms  24 k
 php-cli             x86_64 7.4.19-1.module+el8.5.0+11143+cc873159       rhel-8-for-x86_64-appstream-rpms 3.1 M
 php-common          x86_64 7.4.19-1.module+el8.5.0+11143+cc873159       rhel-8-for-x86_64-appstream-rpms 702 k
 php-process         x86_64 7.4.19-1.module+el8.5.0+11143+cc873159       rhel-8-for-x86_64-appstream-rpms  85 k
 php-xml             x86_64 7.4.19-1.module+el8.5.0+11143+cc873159       rhel-8-for-x86_64-appstream-rpms 174 k
 redhat-logos-httpd  noarch 84.5-1.el8                                   rhel-8-for-x86_64-baseos-rpms     29 k
 xz-devel            x86_64 5.2.4-3.el8                                  rhel-8-for-x86_64-baseos-rpms     62 k
 zlib-devel          x86_64 1.2.11-17.el8                                rhel-8-for-x86_64-baseos-rpms     58 k
Installing weak dependencies:
 apr-util-bdb        x86_64 1.6.1-6.el8                                  rhel-8-for-x86_64-appstream-rpms  25 k
 apr-util-openssl    x86_64 1.6.1-6.el8                                  rhel-8-for-x86_64-appstream-rpms  27 k
 php-fpm             x86_64 7.4.19-1.module+el8.5.0+11143+cc873159       rhel-8-for-x86_64-appstream-rpms 1.6 M
 php-json            x86_64 7.4.19-1.module+el8.5.0+11143+cc873159       rhel-8-for-x86_64-appstream-rpms  74 k
 php-mbstring        x86_64 7.4.19-1.module+el8.5.0+11143+cc873159       rhel-8-for-x86_64-appstream-rpms 484 k
 php-opcache         x86_64 7.4.19-1.module+el8.5.0+11143+cc873159       rhel-8-for-x86_64-appstream-rpms 267 k
 php-pdo             x86_64 7.4.19-1.module+el8.5.0+11143+cc873159       rhel-8-for-x86_64-appstream-rpms 123 k

Transaction Summary



# pecl install redis-5.3.4
WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update
downloading redis-5.3.4.tgz ...
Starting to download redis-5.3.4.tgz (268,154 bytes)
........................................................done: 268,154 bytes
29 source files, building
running: phpize
Configuring for:
PHP Api Version:         20190902
Zend Module Api No:      20190902
Zend Extension Api No:   320190902
enable igbinary serializer support? [no] : 
enable lzf compression support? [no] : 
enable zstd compression support? [no] : 
building in /var/tmp/pear-build-rootuUCvYJ/redis-5.3.4
running: /var/tmp/redis/configure --with-php-config=/usr/bin/php-config --enable-redis-igbinary=no --enable-redis-lzf=no --enable-redis-zstd=no
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu


# pecl upgrade
pear.php.net is using a unsupported protocol - This should never happen.
pear.php.net is using a unsupported protocol - This should never happen.
WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update
downloading redis-5.3.7.tgz ...
Starting to download redis-5.3.7.tgz (275,200 bytes)
.........................................................done: 275,200 bytes
31 source files, building
running: phpize
Configuring for:
PHP Api Version:         20190902
Zend Module Api No:      20190902
Zend Extension Api No:   320190902
enable igbinary serializer support? [no] : 
enable lzf compression support? [no] : 
enable zstd compression support? [no] : 
building in /var/tmp/pear-build-rootAnMPpi/redis-5.3.7
running: /var/tmp/redis/configure --with-php-config=/usr/bin/php-config --enable-redis-igbinary=no --enable-redis-lzf=no --enable-redis-zstd=no
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no



# pecl upgrade
pear.php.net is using a unsupported protocol - This should never happen.
pear.php.net is using a unsupported protocol - This should never happen.
upgrade failed

~~~


The problem can be temporarily resolved with "pear upgrade --force", which rebuilds and overwrite the php-pear package from Red Hat. However, re-installing this package reverts to the broken behavior. This strongly indicates that future updates to this package will again break pear/pecl in this way if the bug isn't squashed.

~~~

# pear upgrade --force
WARNING: channel "pear.php.net" has updated its protocols, use "pear channel-update pear.php.net" to update
WARNING: "pear/Console_Getopt" is deprecated in favor of "pear/Console_GetoptPlus"
WARNING: channel "pecl.php.net" has updated its protocols, use "pear channel-update pecl.php.net" to update
warning: pear/PEAR dependency package "pear/Archive_Tar" downloaded version 1.4.14 is not the recommended version 1.4.4
downloading Archive_Tar-1.4.14.tgz ...
Starting to download Archive_Tar-1.4.14.tgz (21,992 bytes)
........done: 21,992 bytes
downloading Console_Getopt-1.4.3.tgz ...
Starting to download Console_Getopt-1.4.3.tgz (5,789 bytes)
...done: 5,789 bytes
downloading PEAR-1.10.13.tgz ...
Starting to download PEAR-1.10.13.tgz (293,384 bytes)
...done: 293,384 bytes
downloading PEAR_Manpages-1.10.0.tgz ...
Starting to download PEAR_Manpages-1.10.0.tgz (3,260 bytes)
...done: 3,260 bytes
downloading Structures_Graph-1.1.1.tgz ...
Starting to download Structures_Graph-1.1.1.tgz (12,579 bytes)
...done: 12,579 bytes
downloading XML_Util-1.4.5.tgz ...
Starting to download XML_Util-1.4.5.tgz (19,191 bytes)
...done: 19,191 bytes
downloading redis-5.3.7.tgz ...
Starting to download redis-5.3.7.tgz (275,200 bytes)
...done: 275,200 bytes
upgrade ok: channel://pear.php.net/Archive_Tar-1.4.14
upgrade ok: channel://pear.php.net/Console_Getopt-1.4.3
upgrade ok: channel://pear.php.net/PEAR_Manpages-1.10.0
upgrade ok: channel://pear.php.net/Structures_Graph-1.1.1
upgrade ok: channel://pear.php.net/XML_Util-1.4.5
31 source files, building
running: phpize
Configuring for:
PHP Api Version:         20190902
Zend Module Api No:      20190902
Zend Extension Api No:   320190902

~~~


Expected results:

1. "pecl list-upgrades" works and correctly informs the sysadmin of which specific extensions have available updates.
2. "pecl upgrade extension" works as expected.

The combination of these means that it is possible to identify and update extensions that are not on their most recent version. However, this complicates the automation of PHP extension updates.


Additional info:

Comment 2 Remi Collet 2022-02-25 15:10:47 UTC
> WARNING: channel "pear.php.net" has updated its protocols, use "pecl channel-update pear.php.net" to update

This is only a warning

So only issue I see is 

   # pecl upgrade
   pear.php.net is using a unsupported protocol - This should never happen.
   pear.php.net is using a unsupported protocol - This should never happen.
   upgrade failed

instead of 

   # pecl upgrade
   Nothing to upgrade


This is fixed in pear 1.10.13 (so php:8.0/devel is not affected, only php:7.4/devel)

Comment 3 Alan Hicks 2022-03-14 19:50:13 UTC
Greetings Remi!

I must respectfully disagree with you on "This is only a warning" as the command exits with a failure status code.

  # pecl upgrade
  pear.php.net is using a unsupported protocol - This should never happen.
  pear.php.net is using a unsupported protocol - This should never happen.
  upgrade failed
  # echo $?
  1

After forcibly recompiling to the latest upstream pear with "pear upgrade --force", this now works as expected and returns a success.

  # pecl upgrade
  Nothing to upgrade
  # echo $?
  0

On a single individual server, this isn't much of an issue, but when trying to maintain fleets of thousands of servers via automation, failures like this matter. For instance, upstream may release a new version of the redis plugin which fixes a critical bug or security vulnerability and we need to apply it everywhere. In an environment with thousands of servers, some may have the latest version of the extension installed, some may have older versions, and some may not have it installed at all. Unexpected errors like this really wreck havoc with automation in those situations.

Comment 5 Remi Collet 2022-05-03 13:00:02 UTC
Plan to rebase

Comment 15 errata-xmlrpc 2022-11-08 09:52:22 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: php:7.4 security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:7628


Note You need to log in before you can comment on or make changes to this bug.