Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some PHP packages from packages.sury.org have changed their policy #40

Open
zerodeux opened this issue Jan 18, 2021 · 4 comments
Open
Assignees

Comments

@zerodeux
Copy link
Contributor

In packages.sury.org : previously a package like 'php-memcached' would come from Debian official repository and pull the default version (ex. memcached module for PHP 7.3 in Buster). If you used Sury's repo to grab a non-Debian version like 7.2, you would install php7.2-memcached.

Now in packages.sury.org (since early dec. 2020, coinciding with PHP 8.0 release) 'php-memcached' is a meta-package which installs ALL versions of the memcached modules from its repository (5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0). Thus if you upgrade you get a vast inflation of unused packages.

The fix is to add some APT pinning information :

cat >/etc/apt/preferences.d/php
Package: *
Pin: origin packages.sury.org
Pin-Priority: 100
EOF
@athoune athoune mentioned this issue Jan 18, 2021
@athoune
Copy link
Contributor

athoune commented Jan 18, 2021

it fails with php 7.1.

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 php7.1-cli : Depends: libpcre3 (>= 2:8.41) but 2:8.39-3 is to be installed
              Depends: php7.1-common (= 7.1.33-25+0~20210112.45+debian9~1.gbp1a89bf) but it is not going to be installed
              Depends: php7.1-json but it is not going to be installed
              Depends: php7.1-opcache but it is not going to be installed
              Depends: php7.1-readline but it is not going to be installed
 php7.1-curl : Depends: php-common (>= 1:73) but 1:49 is to be installed
               Depends: php7.1-common (= 7.1.33-25+0~20210112.45+debian9~1.gbp1a89bf) but it is not going to be installed
 php7.1-gd : Depends: php-common (>= 1:73) but 1:49 is to be installed
             Depends: php7.1-common (= 7.1.33-25+0~20210112.45+debian9~1.gbp1a89bf) but it is not going to be installed
 php7.1-mbstring : Depends: php-common (>= 1:73) but 1:49 is to be installed
                   Depends: php7.1-common (= 7.1.33-25+0~20210112.45+debian9~1.gbp1a89bf) but it is not going to be installed
 php7.1-mysql : Depends: php-common (>= 1:73) but 1:49 is to be installed
                Depends: php7.1-common (= 7.1.33-25+0~20210112.45+debian9~1.gbp1a89bf) but it is not going to be installed
 php7.1-xml : Depends: php-common (>= 1:73) but 1:49 is to be installed
              Depends: php7.1-common (= 7.1.33-25+0~20210112.45+debian9~1.gbp1a89bf) but it is not going to be installed
 php7.1-zip : Depends: php-common (>= 1:73) but 1:49 is to be installed
              Depends: php7.1-common (= 7.1.33-25+0~20210112.45+debian9~1.gbp1a89bf) but it is not going to be installed

@athoune athoune self-assigned this Jan 18, 2021
@athoune
Copy link
Contributor

athoune commented Jan 18, 2021

Same trouble with 7.2

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 php7.2-cli : Depends: libpcre3 (>= 2:8.41) but 2:8.39-3 is to be installed
              Depends: php7.2-json but it is not going to be installed
              Depends: php7.2-opcache but it is not going to be installed
              Depends: php7.2-readline but it is not going to be installed
 php7.2-common : Depends: php-common (>= 1:73) but 1:49 is to be installed
 php7.2-curl : Depends: php-common (>= 1:73) but 1:49 is to be installed
 php7.2-gd : Depends: php-common (>= 1:73) but 1:49 is to be installed
 php7.2-mbstring : Depends: php-common (>= 1:73) but 1:49 is to be installed
 php7.2-mysql : Depends: php-common (>= 1:73) but 1:49 is to be installed
 php7.2-xml : Depends: php-common (>= 1:73) but 1:49 is to be installed
 php7.2-zip : Depends: php-common (>= 1:73) but 1:49 is to be installed
              Depends: libzip4 (>= 1.3.2) but 1.1.2-1.1+b1 is to be installed
E: Unable to correct problems, you have held broken packages.

Any suggestion, @zerodeux ?

@zerodeux
Copy link
Contributor Author

What are the steps to reproduce the pb ? I tried a "make 7.2" and it succeeded. /assign @athoune

@zerodeux
Copy link
Contributor Author

I just realized that the APT pinning will not work for Docker containers since we don't upgrade in situ. We only build the container from scratch. Give it up.

Thus the original problem should only be solved by making sure that the Sury-based builds are using version-prefixed names while installing packages.

Here is the list of packages that should be checked (occurence "php-xxx" means : please replace with "install php7.x-xxx" when targeting Sury pacakges) :

php-amqp      
php-apcu       
php-ast        
php-bz2        
php-cgi        
php-cli        
php-common     
php-curl       
php-gd         
php-igbinary   
php-imagick    
php-intl       
php-mbstring   
php-memcache   
php-memcached  
php-mongodb    
php-msgpack    
php-oauth      
php-opcache    
php-readline   
php-redis      
php-rrd        
php-smbclient  
php-soap       
php-uuid       
php-xdebug     
php-xml        
php-xsl        
php-zip        
php-zmq        

In order to realize it's tricky, here is an example. If you want to install the Redis or Memcached extensions which are very popular, you would :

  • apt-get install php-redis php-memcached on all Debian releases (including future Bullseye)
  • apt-get install php7.x-redis php7.x-memcached while using Sury's PHP repo

Note that I did not found any occurences of those in the Dockerfile7.x* files, thus I think this ticket can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants