beetboxvm / beetbox

Pre-provisioned L*MP stack
http://beetbox.rtfd.org
92 stars 19 forks source link

php_version: "7.1" leaves the PHP 7.2 CLI package installed #438

Closed christopher-hopper closed 7 years ago

christopher-hopper commented 7 years ago

Problem/Motivation

Not sure if this is related to beet/box or geerlingguy/ansible-role-php-versions, so raising here as a first to get some clarity.

Trying to use PHP 7.1, I end up with a box that has PHP 7.1 alongside the PHP 7.2-cli. Here's the beetbox config.yml:

---
# Vagrant settings.
vagrant_memory: 2048

# Beetbox settings.
beet_domain: foobar.local
beet_root: "{{ beet_base }}/docroot"
ssh_home: "{{ beet_base }}"

# Apache settings.
apache_vhosts:
  - servername: "{{ beet_domain }}"
    documentroot: "{{ beet_root }}"
    extra_parameters: "{{ apache_vhost_php_fpm_parameters }}"
apache_mods_enabled:
  - authn_core.load
  - expires.load
  - ldap.conf
  - ldap.load
  - proxy.load
  - proxy_fcgi.load
  - rewrite.load
  - ssl.load

# Databases.
mysql_databases:
  - name: "{{ beet_mysql_database }}"
    encoding: utf8
    collation: utf8_general_ci
  - name: "foobar"
    encoding: utf8
    collation: utf8_general_ci

# PHP settings.
php_version: "7.1"
php_memory_limit: "284M"
php_max_input_vars: 2500
php_apc_shm_size: "128M"
php_opcache_interned_strings_buffer: "32"
php_packages_state: "latest"
php_packages:
  - php7.1
  - php7.1-apcu
  - php7.1-cli
  - php7.1-common
  - php7.1-curl
  - php7.1-dev
  - php7.1-fpm
  - php7.1-gd
  - php7.1-intl
  - php7.1-json
  - php7.1-mcrypt
  - php7.1-mbstring
  - php7.1-mysql
  - php7.1-opcache
  - php7.1-phpdbg
  - php7.1-readline
  - php7.1-xml
  - php7.1-zip
  - php7.1-bcmath
  - php7.1-ldap

# MYSQL config.
mysql_max_allowed_packet: "100M"

# PhantomJS.
phantomjs_webdriver: yes
phantomjs_webdriver_port: 4444

Steps to reproduce

  1. Run a clean provision, from scratch with composer install then vagrant up
  2. SSH into the box with vagrant ssh
  3. Check the PHP CLI version php --version
  4. Check which PHP packages are installed with apt list --installed | grep php

Expected behaviour

Actual behaviour

# php --version
PHP 7.2.0RC1 (cli) (built: Aug 31 2017 12:25:23) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.2.0-dev, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.2.0RC1, Copyright (c) 1999-2017, by Zend Technologies

# which php
/usr/bin/php

# apt list --installed | grep php
php-apcu/xenial,now 5.1.8+4.0.11-1+deb.sury.org~xenial+1 amd64 [installed]
php-common/now 1:53~ubuntu16.04.1+deb.sury.org+1 all [installed,upgradable to: 1:54+ubuntu16.04.1+deb.sury.org+1]
php-igbinary/xenial,now 2.0.1-1+deb.sury.org~xenial+1 amd64 [installed,automatic]
php-memcached/xenial,now 3.0.3+2.2.0-1+deb.sury.org~xenial+1 amd64 [installed]
php-msgpack/xenial,now 2.0.2+0.5.7-1+deb.sury.org~xenial+2 amd64 [installed,automatic]
php-yaml/xenial,now 2.0.2+1.3.1-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.1/xenial,xenial,now 7.1.9-1+ubuntu16.04.1+deb.sury.org+1 all [installed]
php7.1-cli/xenial,now 7.1.9-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.1-common/xenial,now 7.1.9-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.1-curl/xenial,now 7.1.9-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.1-dev/xenial,now 7.1.9-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.1-fpm/xenial,now 7.1.9-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.1-gd/xenial,now 7.1.9-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.1-imap/xenial,now 7.1.9-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.1-json/xenial,now 7.1.9-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.1-mbstring/xenial,now 7.1.9-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.1-mcrypt/xenial,now 7.1.9-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.1-mysql/xenial,now 7.1.9-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.1-opcache/xenial,now 7.1.9-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.1-readline/xenial,now 7.1.9-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,automatic]
php7.1-sqlite3/xenial,now 7.1.9-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.1-xml/xenial,now 7.1.9-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.2-cli/xenial,now 7.2.0~rc1-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,automatic]
php7.2-common/xenial,now 7.2.0~rc1-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,automatic]
php7.2-json/xenial,now 7.2.0~rc1-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,automatic]
php7.2-opcache/xenial,now 7.2.0~rc1-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,automatic]
php7.2-phpdbg/xenial,now 7.2.0~rc1-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,automatic]
php7.2-readline/xenial,now 7.2.0~rc1-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,automatic]

Steps to reproduce

Use the .beetbox/config.yml above.

Proposed changes

(If you have a proposed change, workaround or fix, describe the rationale behind it)

The workaround for now is to run this on the box, after doing the provision:

sudo apt-get remove php7.2-common

This removes all the PHP 7.2 packages and updates alternatives to point to PHP 7.1. I'm going to add this to a Post provision task for now.

Related links

thom8 commented 7 years ago

Linking https://github.com/beetboxvm/beetbox/issues/432

@christopher-hopper have you tried using the latest version? currently 0.7.2

https://packagist.org/packages/beet/box

christopher-hopper commented 7 years ago

Looks like we're on beet/box:^0.6@dev. Will give an update to 0.7.2 a go later today.

I've added this .beetbox/tasks/post/php-72-remove.yml for now

---
- name: Remove php 7.2 packages.
  package:
    name: "php7.2-{{ package_name }}"
    state: absent
  with_items:
    - cli
    - common
  loop_control:
    loop_var: package_name
  when: php_version == "7.1"
christopher-hopper commented 7 years ago

Hooray hoorah!

Okay, this is fixed. I did the following:

  1. Updated our beet/box package with Composer
  2. Disable the custom post task above php-72-remove.yml
  3. Destroyed and reprovisioned the box, now at v0.7.2
  4. SSH'd in, and checked all installed PHP versions and packages

Result, fixed. Thanks @thom8 Hopefully anyone else who hits this will find the issue and can address it.

klonos commented 7 years ago

Same thing with php7.0:

apt list --installed | grep php

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

php-apcu/xenial,now 5.1.8+4.0.11-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed]
php-common/xenial,xenial,now 1:55+ubuntu16.04.1+deb.sury.org+1 all [installed]
php-igbinary/xenial,now 2.0.1-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed]
php-memcached/xenial,now 3.0.3+2.2.0-1+ubuntu16.04.1+deb.sury.org+3 amd64 [installed]
php-msgpack/xenial,now 2.0.2+0.5.7-1+ubuntu16.04.1+deb.sury.org+3 amd64 [installed]
php-yaml/xenial,now 2.0.2+1.3.1-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0/xenial,xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 all [installed]
php7.0-cli/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-common/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,automatic]
php7.0-curl/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-dev/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-fpm/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-gd/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-imap/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-json/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-mbstring/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-mcrypt/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-mysql/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-opcache/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-readline/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,automatic]
php7.0-sqlite3/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-xml/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-zip/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.2-cli/xenial,now 7.2.0~rc1-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,automatic]
php7.2-common/xenial,now 7.2.0~rc1-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,automatic]
php7.2-json/xenial,now 7.2.0~rc1-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,automatic]
php7.2-opcache/xenial,now 7.2.0~rc1-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,automatic]
php7.2-phpdbg/xenial,now 7.2.0~rc1-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,automatic]
php7.2-readline/xenial,now 7.2.0~rc1-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,automatic]

Used the .beetbox/tasks/post/php-72-remove.yml hack and it fixed things for me (had to change to when: php_version == "7.0"). Thank you @christopher-hopper 👍

klonos commented 7 years ago

...actually, same deal with php5.6:

apt list --installed | grep php

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

php-apcu/xenial,now 5.1.8+4.0.11-1+deb.sury.org~xenial+1 amd64 [installed]
php-common/xenial,xenial,now 1:55+ubuntu16.04.1+deb.sury.org+1 all [installed]
php-igbinary/xenial,now 2.0.1-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed]
php-memcached/xenial,now 3.0.3+2.2.0-1+deb.sury.org~xenial+1 amd64 [installed]
php-msgpack/xenial,now 2.0.2+0.5.7-1+deb.sury.org~xenial+2 amd64 [installed,automatic]
php-yaml/xenial,now 2.0.2+1.3.1-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php5.6/xenial,xenial,now 5.6.31-4+ubuntu16.04.1+deb.sury.org+4 all [installed]
php5.6-cli/xenial,now 5.6.31-4+ubuntu16.04.1+deb.sury.org+4 amd64 [installed]
php5.6-common/xenial,now 5.6.31-4+ubuntu16.04.1+deb.sury.org+4 amd64 [installed]
php5.6-curl/xenial,now 5.6.31-4+ubuntu16.04.1+deb.sury.org+4 amd64 [installed]
php5.6-dev/xenial,now 5.6.31-4+ubuntu16.04.1+deb.sury.org+4 amd64 [installed]
php5.6-fpm/xenial,now 5.6.31-4+ubuntu16.04.1+deb.sury.org+4 amd64 [installed]
php5.6-gd/xenial,now 5.6.31-4+ubuntu16.04.1+deb.sury.org+4 amd64 [installed]
php5.6-imap/xenial,now 5.6.31-4+ubuntu16.04.1+deb.sury.org+4 amd64 [installed]
php5.6-json/xenial,now 5.6.31-4+ubuntu16.04.1+deb.sury.org+4 amd64 [installed]
php5.6-mbstring/xenial,now 5.6.31-4+ubuntu16.04.1+deb.sury.org+4 amd64 [installed]
php5.6-mcrypt/xenial,now 5.6.31-4+ubuntu16.04.1+deb.sury.org+4 amd64 [installed]
php5.6-mysql/xenial,now 5.6.31-4+ubuntu16.04.1+deb.sury.org+4 amd64 [installed]
php5.6-opcache/xenial,now 5.6.31-4+ubuntu16.04.1+deb.sury.org+4 amd64 [installed]
php5.6-readline/xenial,now 5.6.31-4+ubuntu16.04.1+deb.sury.org+4 amd64 [installed,automatic]
php5.6-sqlite3/xenial,now 5.6.31-4+ubuntu16.04.1+deb.sury.org+4 amd64 [installed]
php5.6-xml/xenial,now 5.6.31-4+ubuntu16.04.1+deb.sury.org+4 amd64 [installed]
php7.2-cli/xenial,now 7.2.0~rc1-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,automatic]
php7.2-common/xenial,now 7.2.0~rc1-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,automatic]
php7.2-json/xenial,now 7.2.0~rc1-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,automatic]
php7.2-opcache/xenial,now 7.2.0~rc1-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,automatic]
php7.2-phpdbg/xenial,now 7.2.0~rc1-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,automatic]
php7.2-readline/xenial,now 7.2.0~rc1-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,automatic]
klonos commented 7 years ago

This keeps happening in fresh instances of the latest version of beetbox (0.7.3). Basically, this makes it so that the php_version: "x.y" is not respected.

Should this issue be reopened?

oxyc commented 7 years ago

Could you post the full log output from provisioning a box?

oxyc commented 7 years ago

Did some debugging. During the purge task a bunch of 7.2 packages are installed

apt list --installed | grep php

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

php-apcu/xenial,now 5.1.8+4.0.11-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed]
php-common/xenial,xenial,now 1:55+ubuntu16.04.1+deb.sury.org+1 all [installed]
php-igbinary/xenial,now 2.0.1-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed]
php-memcached/xenial,now 3.0.3+2.2.0-1+ubuntu16.04.1+deb.sury.org+3 amd64 [installed]
php-msgpack/xenial,now 2.0.2+0.5.7-1+ubuntu16.04.1+deb.sury.org+3 amd64 [installed]
php-yaml/xenial,now 2.0.2+1.3.1-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.2-cli/xenial,now 7.2.0~rc1-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,automatic]
php7.2-common/xenial,now 7.2.0~rc1-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,automatic]
php7.2-json/xenial,now 7.2.0~rc1-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,automatic]
php7.2-opcache/xenial,now 7.2.0~rc1-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,automatic]
php7.2-phpdbg/xenial,now 7.2.0~rc1-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,automatic]
php7.2-readline/xenial,now 7.2.0~rc1-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,automatic]
oxyc commented 7 years ago

This is on beetbox:

# php_packages which doesnt include all packages.
sudo apt purge php7.1 php7.1-{apcu,cli,common,curl,dev,fpm,gd,imap,json,mbstring,mcrypt,opcache,sqlite3,xml,yaml}
Reading package lists... Done
Building dependency tree... Done
Note, selecting 'php-apcu' instead of 'php7.1-apcu'
Note, selecting 'php-yaml' instead of 'php7.1-yaml'
The following additional packages will be installed:
  libargon2-0 libsodium18 php-apcu php-igbinary php-memcached php-msgpack php7.2-cli php7.2-common php7.2-json php7.2-opcache php7.2-phpdbg php7.2-readline
Suggested packages:
  php-gd php-pear
Recommended packages:
  php-apcu-bc
The following packages will be REMOVED:
  php7.1* php7.1-cli* php7.1-common* php7.1-curl* php7.1-dev* php7.1-fpm* php7.1-gd* php7.1-imap* php7.1-json* php7.1-mbstring* php7.1-mcrypt* php7.1-mysql* php7.1-opcache* php7.1-readline* php7.1-sqlite3* php7.1-xml*
The following NEW packages will be installed:
  libargon2-0 libsodium18 php7.2-cli php7.2-common php7.2-json php7.2-opcache php7.2-phpdbg php7.2-readline
The following packages will be upgraded:
  php-apcu php-igbinary php-memcached php-msgpack
4 upgraded, 8 newly installed, 16 to remove and 20 not upgraded.
Need to get 6,094 kB of archives.
After this operation, 3,103 kB disk space will be freed.
Do you want to continue? [Y/n]
# speciying all packages including apcu, msgpack, igbinary
sudo apt purge php7.1 php7.1-{apcu,cli,common,curl,dev,fpm,gd,imap,json,mbstring,mcrypt,opcache,sqlite3,xml,yaml} php-{apcu,msgpack,igbinary}
Reading package lists... Done
Building dependency tree... Done
Note, selecting 'php-apcu' instead of 'php7.1-apcu'
Note, selecting 'php-yaml' instead of 'php7.1-yaml'
The following packages will be REMOVED:
  php-apcu* php-igbinary* php-memcached* php-msgpack* php-yaml* php7.1* php7.1-cli* php7.1-common* php7.1-curl* php7.1-dev* php7.1-fpm* php7.1-gd* php7.1-imap* php7.1-json* php7.1-mbstring* php7.1-mcrypt* php7.1-mysql* php7.1-opcache* php7.1-readline*
  php7.1-sqlite3* php7.1-xml*
0 upgraded, 0 newly installed, 21 to remove and 20 not upgraded.
After this operation, 24.6 MB disk space will be freed.
Do you want to continue? [Y/n]

And on an older Drupal VM box. I'll try and rebuild the latest with memcached to see what happens (edit: same thing, it works):

apt list --installed | grep php
grep: warning: GREP_OPTIONS is deprecated; please use an alias or script

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

php-apcu/xenial,now 5.1.8+4.0.11-1+deb.sury.org~xenial+1 amd64 [installed]
php-common/xenial,xenial,now 1:52+deb.sury.org~xenial+1 all [installed,automatic]
php-igbinary/xenial,now 2.0.1-1+deb.sury.org~xenial+1 amd64 [installed,automatic]
php-redis/xenial,now 3.1.2-1+deb.sury.org~xenial+1 amd64 [installed]
php-yaml/xenial,now 2.0.0+1.3.0-2+deb.sury.org~xenial+1 amd64 [installed]
php7.1/xenial,xenial,now 7.1.4-1+deb.sury.org~xenial+1 all [installed]
php7.1-cli/xenial,now 7.1.4-1+deb.sury.org~xenial+1 amd64 [installed]
php7.1-common/xenial,now 7.1.4-1+deb.sury.org~xenial+1 amd64 [installed]
php7.1-curl/xenial,now 7.1.4-1+deb.sury.org~xenial+1 amd64 [installed]
php7.1-dev/xenial,now 7.1.4-1+deb.sury.org~xenial+1 amd64 [installed]
php7.1-fpm/xenial,now 7.1.4-1+deb.sury.org~xenial+1 amd64 [installed]
php7.1-gd/xenial,now 7.1.4-1+deb.sury.org~xenial+1 amd64 [installed]
php7.1-imap/xenial,now 7.1.4-1+deb.sury.org~xenial+1 amd64 [installed]
php7.1-json/xenial,now 7.1.4-1+deb.sury.org~xenial+1 amd64 [installed]
php7.1-mbstring/xenial,now 7.1.4-1+deb.sury.org~xenial+1 amd64 [installed]
php7.1-mcrypt/xenial,now 7.1.4-1+deb.sury.org~xenial+1 amd64 [installed]
php7.1-mysql/xenial,now 7.1.4-1+deb.sury.org~xenial+1 amd64 [installed]
php7.1-opcache/xenial,now 7.1.4-1+deb.sury.org~xenial+1 amd64 [installed]
php7.1-readline/xenial,now 7.1.4-1+deb.sury.org~xenial+1 amd64 [installed,automatic]
php7.1-sqlite3/xenial,now 7.1.4-1+deb.sury.org~xenial+1 amd64 [installed]
php7.1-xml/xenial,now 7.1.4-1+deb.sury.org~xenial+1 amd64 [installed]
php7.1-zip/xenial,now 7.1.4-1+deb.sury.org~xenial+1 amd64 [installed]

~ ssh:vagrant@mush: sudo apt purge php7.1 php7.1-{apcu,cli,common,curl,dev,fpm,gd,imap,json,mbstring,mcrypt,opcache,sqlite3,xml,yaml}
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'php-apcu' instead of 'php7.1-apcu'
Note, selecting 'php-yaml' instead of 'php7.1-yaml'
The following packages were automatically installed and are no longer required:
  libc-client2007e libcurl3 libmcrypt4 libpcre16-3 libpcre3-dev libpcre32-3 libpcrecpp0v5 libssl-dev libssl1.0.2 libxslt1.1 libyaml-0-2 libzip4 mlock php-common python-crypto python-ecdsa python-httplib2 python-jinja2 python-markupsafe python-paramiko
  python-pkg-resources python-setuptools python-six python-yaml shtool sshpass zlib1g-dev
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  php-apcu* php-igbinary* php-redis* php-yaml* php7.1* php7.1-cli* php7.1-common* php7.1-curl* php7.1-dev* php7.1-fpm* php7.1-gd* php7.1-imap* php7.1-json* php7.1-mbstring* php7.1-mcrypt* php7.1-mysql* php7.1-opcache* php7.1-readline* php7.1-sqlite3*
  php7.1-xml* php7.1-zip*
0 upgraded, 0 newly installed, 21 to remove and 8 not upgraded.
After this operation, 25.4 MB disk space will be freed.
Do you want to continue? [Y/n]
oxyc commented 7 years ago

@thom8 If I run apt-get upgrade to install the available updates for the php packages before purging it works.

These are the outdated packages after installing a fresh Beet box:

php-apcu/now 5.1.8+4.0.11-1+deb.sury.org~xenial+1 amd64 [installed,upgradable to: 5.1.8+4.0.11-1+ubuntu16.04.1+deb.sury.org+2]
php-common/xenial,xenial,now 1:55+ubuntu16.04.1+deb.sury.org+1 all [installed]
php-igbinary/now 2.0.1-1+deb.sury.org~xenial+1 amd64 [installed,upgradable to: 2.0.1-1+ubuntu16.04.1+deb.sury.org+2]
php-memcached/now 3.0.3+2.2.0-1+deb.sury.org~xenial+1 amd64 [installed,upgradable to: 3.0.3+2.2.0-1+ubuntu16.04.1+deb.sury.org+3]
php-msgpack/now 2.0.2+0.5.7-1+deb.sury.org~xenial+2 amd64 [installed,upgradable to: 2.0.2+0.5.7-1+ubuntu16.04.1+deb.sury.org+3]
sudo apt-get upgrade
sudo apt purge php7.1 php7.1-{apcu,cli,common,curl,dev,fpm,gd,imap,json,mbstring,mcrypt,opcache,sqlite3,xml,yaml}
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'php-apcu' instead of 'php7.1-apcu'
Note, selecting 'php-yaml' instead of 'php7.1-yaml'
The following packages will be REMOVED:
  php-apcu* php-igbinary* php-memcached* php-msgpack* php-yaml* php7.1* php7.1-cli* php7.1-common* php7.1-curl* php7.1-dev* php7.1-fpm* php7.1-gd* php7.1-imap* php7.1-json* php7.1-mbstring* php7.1-mcrypt* php7.1-mysql* php7.1-opcache* php7.1-readline*
  php7.1-sqlite3* php7.1-xml*
0 upgraded, 0 newly installed, 21 to remove and 3 not upgraded.
After this operation, 25.0 MB disk space will be freed.
Do you want to continue? [Y/n]

That's is why this is only reproducible with Beetbox

oxyc commented 7 years ago

geerlingguy.php-versions used to have the following task which would also fix the issue:

- name: Purge PHP packages installed by default.
  apt:
    name: "{{ item }}"
    state: absent
    purge: yes
    force: yes
  when: >
    php_purge.changed or
    php_ondrej_ubuntu_repo.changed or
    php_ondrej_debian_repo.changed
  with_items:
    - php-common

Not sure this is the correct approach though? It's more bulletproof at least. Ping @geerlingguy I know how you love Ubuntu.

This is how the process looks when purging php-common as well:

# 1. Purge old PHP packages (current behavior)
$ sudo apt purge php7.1 php7.1-{apcu,cli,common,curl,dev,fpm,gd,imap,json,mbstring,mcrypt,opcache,sqlite3,xml,yaml}
Reading package lists... Done
Building dependency tree... Done
Note, selecting 'php-apcu' instead of 'php7.1-apcu'
Note, selecting 'php-yaml' instead of 'php7.1-yaml'
The following additional packages will be installed:
  libargon2-0 libsodium18 php-apcu php-igbinary php-memcached php-msgpack php7.2-cli php7.2-common php7.2-json php7.2-opcache php7.2-phpdbg php7.2-readline
Suggested packages:
  php-gd php-pear
Recommended packages:
  php-apcu-bc
The following packages will be REMOVED:
  php7.1* php7.1-cli* php7.1-common* php7.1-curl* php7.1-dev* php7.1-fpm* php7.1-gd* php7.1-imap* php7.1-json* php7.1-mbstring* php7.1-mcrypt* php7.1-mysql* php7.1-opcache* php7.1-readline* php7.1-sqlite3* php7.1-xml*
The following NEW packages will be installed:
  libargon2-0 libsodium18 php7.2-cli php7.2-common php7.2-json php7.2-opcache php7.2-phpdbg php7.2-readline
The following packages will be upgraded:
  php-apcu php-igbinary php-memcached php-msgpack
4 upgraded, 8 newly installed, 16 to remove and 20 not upgraded.
Need to get 6,094 kB of archives.
After this operation, 3,103 kB disk space will be freed.
Do you want to continue? [Y/n]

# 2. Packages left after purging (current behavior)
$ apt list --installed | grep php

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

php-apcu/xenial,now 5.1.8+4.0.11-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed]
php-common/xenial,xenial,now 1:55+ubuntu16.04.1+deb.sury.org+1 all [installed]
php-igbinary/xenial,now 2.0.1-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed]
php-memcached/xenial,now 3.0.3+2.2.0-1+ubuntu16.04.1+deb.sury.org+3 amd64 [installed]
php-msgpack/xenial,now 2.0.2+0.5.7-1+ubuntu16.04.1+deb.sury.org+3 amd64 [installed]
php-yaml/xenial,now 2.0.2+1.3.1-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.2-cli/xenial,now 7.2.0~rc1-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,automatic]
php7.2-common/xenial,now 7.2.0~rc1-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,automatic]
php7.2-json/xenial,now 7.2.0~rc1-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,automatic]
php7.2-opcache/xenial,now 7.2.0~rc1-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,automatic]
php7.2-phpdbg/xenial,now 7.2.0~rc1-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,automatic]
php7.2-readline/xenial,now 7.2.0~rc1-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,automatic]

# 3. Purge php-common (custom behavior)
$ sudo apt purge php-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libargon2-0 libsodium18
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  php-apcu* php-common* php-igbinary* php-memcached* php-msgpack* php-yaml* php7.2-cli* php7.2-common* php7.2-json* php7.2-opcache* php7.2-phpdbg* php7.2-readline*
0 upgraded, 0 newly installed, 12 to remove and 20 not upgraded.
After this operation, 21.0 MB disk space will be freed.
Do you want to continue?

# 4. Packages left after purging php-common (custom behavior)
$ apt list --installed | grep php

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

# 5. Install PHP 7.0 packages (current behavior)
$ sudo apt install php7.0 php7.0-{apcu,cli,common,curl,dev,fpm,gd,imap,json,mbstring,mcrypt,opcache,sqlite3,xml,yaml}
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'php-apcu' instead of 'php7.0-apcu'
Note, selecting 'php-yaml' instead of 'php7.0-yaml'
The following packages were automatically installed and are no longer required:
  libargon2-0 libsodium18
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  debhelper dh-php dh-strip-nondeterminism gettext intltool-debian libarchive-zip-perl libasprintf-dev libexporter-tiny-perl libfile-stripnondeterminism-perl libgettextpo-dev libgettextpo0 liblist-moreutils-perl libmail-sendmail-perl
  libsys-hostname-long-perl libunistring0 php-apcu-bc php-common php-pear php7.0-readline pkg-php-tools po-debconf xml2
Suggested packages:
  dh-make gettext-doc autopoint libmail-box-perl
The following NEW packages will be installed:
  debhelper dh-php dh-strip-nondeterminism gettext intltool-debian libarchive-zip-perl libasprintf-dev libexporter-tiny-perl libfile-stripnondeterminism-perl libgettextpo-dev libgettextpo0 liblist-moreutils-perl libmail-sendmail-perl
  libsys-hostname-long-perl libunistring0 php-apcu php-apcu-bc php-common php-pear php-yaml php7.0 php7.0-cli php7.0-common php7.0-curl php7.0-dev php7.0-fpm php7.0-gd php7.0-imap php7.0-json php7.0-mbstring php7.0-mcrypt php7.0-opcache php7.0-readline
  php7.0-sqlite3 php7.0-xml pkg-php-tools po-debconf xml2
0 upgraded, 38 newly installed, 0 to remove and 20 not upgraded.
Need to get 8,192 kB of archives.
After this operation, 34.5 MB of additional disk space will be used.
Do you want to continue?

# 6. Packages installed when installing php7.0 packages. (fixed behavior)
$ apt list --installed | grep php

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

dh-php/xenial,xenial,now 0.28+ubuntu16.04.1+deb.sury.org+1 all [installed,automatic]
php-apcu/xenial,now 5.1.8+4.0.11-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed]
php-apcu-bc/xenial,now 1.0.3-5+ubuntu16.04.1+deb.sury.org+3 amd64 [installed,automatic]
php-common/xenial,xenial,now 1:55+ubuntu16.04.1+deb.sury.org+1 all [installed,automatic]
php-pear/xenial,xenial,now 1:1.10.5+submodules+notgz-1+ubuntu16.04.1+deb.sury.org+1 all [installed,automatic]
php-yaml/xenial,now 2.0.2+1.3.1-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0/xenial,xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 all [installed]
php7.0-cli/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-common/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-curl/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-dev/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-fpm/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-gd/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-imap/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-json/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-mbstring/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-mcrypt/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-opcache/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-readline/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,automatic]
php7.0-sqlite3/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-xml/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
pkg-php-tools/xenial,xenial,now 1.33+deb.sury.org~xenial+1 all [installed,automatic]
thom8 commented 7 years ago

@oxyc thanks so much for the thorough debug!

Still not able to reproduce this in the latest DEV version so its probably something I'm doing.. But need to be able to replicate it here to confirm a fix.

I'm using beet/dev (virtualbox, 0.7.713) and the default project -- https://github.com/beetboxvm/beetbox/blob/master/.beetbox/config.yml#L3-L23

Confirmed steps. Build default project -- PHP 7.1 Add php_version: "5.6" and vagrant provision -- PHP 5.6 Add php_version: "7.0" and vagrant provision -- PHP 7.0

Do I need to provision multiple times with the same version?

*Note this could be something that has been fixed upstream in APT repos as this box was build a couple of days ago -- https://app.vagrantup.com/beet/boxes/dev

oxyc commented 7 years ago

I was actually using v0.7.3 of beet box, not the development build.

Steps to reproduce were:

  1. composer create-project drupal-composer/drupal-project:8.x-dev drupal8 --stability dev --no-interaction; cd drupal8
  2. composer require --dev beet/box
  3. vagrant up
  4. vagrant ssh and run apt list --installed | grep php, noting that some packages are outdated.
  5. Change php_version: "7.0"
  6. vagrant provision
  7. Just as the Purge task from geerlingguy.php-versions completed (before the new packages were installed), I aborted the provision process and checked the packages again, noting that php7.2 was now installed.

I have no idea why apt chooses to upgrade the packages rather than purging when php7.1-common is purged. Seems apt priorities upgrades? ~I'll rebuild and check if apt purge --no-upgrade is evaluated.~

thom8 commented 7 years ago

Thanks @oxyc I've managed to replicate it! Now need to see why I can't in the latest version.

oxyc commented 7 years ago

Wonder if geerlingguy.php-versions could just uninstall php{{ php_version }}-common rather than all the packages? They should all depend on phpX-common anyways, so maybe let the resolver figure it out as it seems to choke when we're too (but not entirely) specific.

$ sudo apt remove php7.1 php7.1-{apcu,cli,common,curl,dev,fpm,gd,imap,json,mbstring,mcrypt,opcache,sqlite3,xml,yaml}
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'php-apcu' instead of 'php7.1-apcu'
Note, selecting 'php-yaml' instead of 'php7.1-yaml'
The following additional packages will be installed:
  libargon2-0 libsodium18 php-igbinary php-memcached php-msgpack php7.2-cli php7.2-common php7.2-json php7.2-opcache php7.2-phpdbg php7.2-readline
Suggested packages:
  php-pear
The following packages will be REMOVED:
  php7.1 php7.1-cli php7.1-common php7.1-curl php7.1-dev php7.1-fpm php7.1-gd php7.1-imap php7.1-json php7.1-mbstring php7.1-mcrypt php7.1-mysql php7.1-opcache php7.1-readline php7.1-sqlite3 php7.1-xml
The following NEW packages will be installed:
  libargon2-0 libsodium18 php7.2-cli php7.2-common php7.2-json php7.2-opcache php7.2-phpdbg php7.2-readline
The following packages will be upgraded:
  php-igbinary php-memcached php-msgpack
3 upgraded, 8 newly installed, 16 to remove and 20 not upgraded.
Need to get 6,007 kB of archives.
After this operation, 3,280 kB disk space will be freed.
Do you want to continue? [Y/n]
$ sudo apt-get remove php7.1-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  php-igbinary php-memcached php-msgpack php-yaml php7.1 php7.1-cli php7.1-common php7.1-curl php7.1-dev php7.1-fpm php7.1-gd php7.1-imap php7.1-json php7.1-mbstring php7.1-mcrypt php7.1-mysql php7.1-opcache php7.1-readline php7.1-sqlite3 php7.1-xml
0 upgraded, 0 newly installed, 20 to remove and 20 not upgraded.
After this operation, 24.0 MB disk space will be freed.
Do you want to continue? [Y/n]
oxyc commented 7 years ago

What chokes the removal is specifying php7.1-fpm. If I remove it from the list it works, and all PHP related packages are removed.

$ sudo apt-get remove php7.1 php7.1-{apcu,cli,common,curl,dev,gd,imap,json,mbstring,mcrypt,opcache,sqlite3,xml,yaml}
oxyc commented 7 years ago

@geerlingguy do you know if replacing the current purge with:

- name: Purge PHP version packages.
  apt:
    name: "{{ item }}"
    state: absent
    purge: yes
    force: yes
  when: "'php' + php_version not in item"
  with_items:
    - "php5.6-common"
    - "php7.0-common"
    - "php7.1-common"

would work? It would be way nicer now that 7.2 is coming as well. That loop is becoming rather big. Limited testing suggests it works.

On Drupal VM with memcached and upload-progress:

# After the new purge
$ apt list --installed | grep php
php-common/xenial,xenial,now 1:55+ubuntu16.04.1+deb.sury.org+1 all [installed,auto-removable]

# After switch from 7.1 to 7.0
$ apt list --installed | grep php
php-apcu/xenial,now 5.1.8+4.0.11-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed]
php-common/xenial,xenial,now 1:55+ubuntu16.04.1+deb.sury.org+1 all [installed,automatic]
php-igbinary/xenial,now 2.0.1-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,automatic]
php-memcached/xenial,now 3.0.3+2.2.0-1+ubuntu16.04.1+deb.sury.org+3 amd64 [installed]
php-msgpack/xenial,now 2.0.2+0.5.7-1+ubuntu16.04.1+deb.sury.org+3 amd64 [installed,automatic]
php-yaml/xenial,now 2.0.2+1.3.1-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0/xenial,xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 all [installed]
php7.0-cli/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-common/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-curl/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-dev/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-fpm/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-gd/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-imap/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-json/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-mbstring/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-mcrypt/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-mysql/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-opcache/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-readline/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,automatic]
php7.0-sqlite3/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-xml/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
thom8 commented 7 years ago

@oxyc that would be much cleaner, I guess the only issue is a package which doesn't have php-common as a dependency, however IMO that would be a problem in the package.

thom8 commented 7 years ago

@oxyc still can't seem to replicate on the latest build so have pushed a new release -- https://github.com/beetboxvm/beetbox/releases/tag/0.7.4

It now forces an apt-update -- https://github.com/beetboxvm/beetbox/compare/0.7.3...0.7.4 on each build so playbooks will be working with the latest versions.

thom8 commented 7 years ago

0.7.4 fixes the issue described in https://github.com/beetboxvm/beetbox/issues/438#issuecomment-330107159

Can anyone else confirm the latest version fixes this issue?

klonos commented 7 years ago

Hello @thom8, @oxyc this is on an existing, freshly-installed (yesterday) 0.7.3 instance, with php_version: "7.0" specified in its local.config.yml:

apt list --installed | grep php

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

php-apcu/xenial,now 5.1.8+4.0.11-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed]
php-common/xenial,xenial,now 1:55+ubuntu16.04.1+deb.sury.org+1 all [installed]
php-igbinary/xenial,now 2.0.1-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed]
php-memcached/xenial,now 3.0.3+2.2.0-1+ubuntu16.04.1+deb.sury.org+3 amd64 [installed]
php-msgpack/xenial,now 2.0.2+0.5.7-1+ubuntu16.04.1+deb.sury.org+3 amd64 [installed]
php-yaml/xenial,now 2.0.2+1.3.1-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0/xenial,xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 all [installed]
php7.0-cli/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-common/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,automatic]
php7.0-curl/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-dev/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-fpm/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-gd/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-imap/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-json/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-mbstring/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-mcrypt/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-mysql/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-opcache/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-readline/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,automatic]
php7.0-sqlite3/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-xml/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-zip/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.2-cli/xenial,now 7.2.0~rc1-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,automatic]
php7.2-common/xenial,now 7.2.0~rc1-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,automatic]
php7.2-json/xenial,now 7.2.0~rc1-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,automatic]
php7.2-opcache/xenial,now 7.2.0~rc1-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,automatic]
php7.2-phpdbg/xenial,now 7.2.0~rc1-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,automatic]
php7.2-readline/xenial,now 7.2.0~rc1-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,automatic]

I did vagrant box update to get to 0.7.4, then vagrant provision (notice the upgrade of all 7.2.0 from RC1 to RC2):

apt list --installed | grep php

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

php-apcu/xenial,now 5.1.8+4.0.11-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed]
php-common/xenial,xenial,now 1:55+ubuntu16.04.1+deb.sury.org+1 all [installed]
php-igbinary/xenial,now 2.0.1-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed]
php-memcached/xenial,now 3.0.3+2.2.0-1+ubuntu16.04.1+deb.sury.org+3 amd64 [installed]
php-msgpack/xenial,now 2.0.2+0.5.7-1+ubuntu16.04.1+deb.sury.org+3 amd64 [installed]
php-yaml/xenial,now 2.0.2+1.3.1-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0/xenial,xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 all [installed]
php7.0-cli/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-common/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,automatic]
php7.0-curl/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-dev/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-fpm/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-gd/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-imap/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-json/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-mbstring/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-mcrypt/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-mysql/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-opcache/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-readline/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,automatic]
php7.0-sqlite3/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-xml/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-zip/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.2-cli/now 7.2.0~rc1-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,upgradable to: 7.2.0~rc2-1+ubuntu16.04.1+deb.sury.org+1]
php7.2-common/now 7.2.0~rc1-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,upgradable to: 7.2.0~rc2-1+ubuntu16.04.1+deb.sury.org+1]
php7.2-json/now 7.2.0~rc1-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,upgradable to: 7.2.0~rc2-1+ubuntu16.04.1+deb.sury.org+1]
php7.2-opcache/now 7.2.0~rc1-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,upgradable to: 7.2.0~rc2-1+ubuntu16.04.1+deb.sury.org+1]
php7.2-phpdbg/now 7.2.0~rc1-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,upgradable to: 7.2.0~rc2-1+ubuntu16.04.1+deb.sury.org+1]
php7.2-readline/now 7.2.0~rc1-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,upgradable to: 7.2.0~rc2-1+ubuntu16.04.1+deb.sury.org+1]

I will try on a fresh 0.7.4 instance and report back shortly...

PS: @thom8 do you still need the full logs after provisioning?

klonos commented 7 years ago

...as I'm waiting for the 0.7.4 instance to fire up, I believe that it might worth mentioning that I noticed these 2 warnings in the log about not being able to find pre/post tasks in expected paths:

==> beetbox: TASK [Check pre tasks directory exists.] ***************************************
==> beetbox: ok: [localhost]
==> beetbox: 
==> beetbox: TASK [include] *****************************************************************
==> beetbox:  [WARNING]: Unable to find '/var/beetbox/.beetbox/tasks/pre' in expected paths.
==> beetbox: 
==> beetbox: 
==> beetbox: TASK [beetbox-init : Set hostname.] ********************************************
==> beetbox: ok: [localhost]

...

==> beetbox: TASK [Check post tasks directory exists.] **************************************
==> beetbox: ok: [localhost]
==> beetbox: 
==> beetbox: TASK [include] *****************************************************************
==> beetbox:  [WARNING]: Unable to find '/var/beetbox/.beetbox/tasks/post' in expected
==> beetbox: paths.
==> beetbox: 
==> beetbox: 
==> beetbox: TASK [Create welcome message.] *************************************************
==> beetbox: ok: [localhost]
klonos commented 7 years ago

OK, git clone'd my project, cd'd to the project dir, run composer require --dev beet/box, run vagrant up. Once the instance fired up (everything went fine btw, didn't even get the dcr installation failure form #440, but this might be because php 5.6 got installed instead of 7.x):

apt list --installed | grep php

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

php-apcu/xenial,now 5.1.8+4.0.11-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed]
php-common/xenial,xenial,now 1:55+ubuntu16.04.1+deb.sury.org+1 all [installed]
php-igbinary/xenial,now 2.0.1-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,automatic]
php-memcached/xenial,now 3.0.3+2.2.0-1+ubuntu16.04.1+deb.sury.org+3 amd64 [installed]
php-msgpack/xenial,now 2.0.2+0.5.7-1+ubuntu16.04.1+deb.sury.org+3 amd64 [installed,automatic]
php-yaml/xenial,now 2.0.2+1.3.1-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php5.6/xenial,xenial,now 5.6.31-4+ubuntu16.04.1+deb.sury.org+4 all [installed]
php5.6-cli/xenial,now 5.6.31-4+ubuntu16.04.1+deb.sury.org+4 amd64 [installed]
php5.6-common/xenial,now 5.6.31-4+ubuntu16.04.1+deb.sury.org+4 amd64 [installed,automatic]
php5.6-curl/xenial,now 5.6.31-4+ubuntu16.04.1+deb.sury.org+4 amd64 [installed]
php5.6-dev/xenial,now 5.6.31-4+ubuntu16.04.1+deb.sury.org+4 amd64 [installed]
php5.6-fpm/xenial,now 5.6.31-4+ubuntu16.04.1+deb.sury.org+4 amd64 [installed]
php5.6-gd/xenial,now 5.6.31-4+ubuntu16.04.1+deb.sury.org+4 amd64 [installed]
php5.6-imap/xenial,now 5.6.31-4+ubuntu16.04.1+deb.sury.org+4 amd64 [installed]
php5.6-json/xenial,now 5.6.31-4+ubuntu16.04.1+deb.sury.org+4 amd64 [installed]
php5.6-mbstring/xenial,now 5.6.31-4+ubuntu16.04.1+deb.sury.org+4 amd64 [installed]
php5.6-mcrypt/xenial,now 5.6.31-4+ubuntu16.04.1+deb.sury.org+4 amd64 [installed]
php5.6-mysql/xenial,now 5.6.31-4+ubuntu16.04.1+deb.sury.org+4 amd64 [installed]
php5.6-opcache/xenial,now 5.6.31-4+ubuntu16.04.1+deb.sury.org+4 amd64 [installed]
php5.6-readline/xenial,now 5.6.31-4+ubuntu16.04.1+deb.sury.org+4 amd64 [installed,automatic]
php5.6-sqlite3/xenial,now 5.6.31-4+ubuntu16.04.1+deb.sury.org+4 amd64 [installed]
php5.6-xml/xenial,now 5.6.31-4+ubuntu16.04.1+deb.sury.org+4 amd64 [installed]
php5.6-zip/xenial,now 5.6.31-4+ubuntu16.04.1+deb.sury.org+4 amd64 [installed]

Trying to set php to 7.0 and provision next. Will report back shortly...

klonos commented 7 years ago

...set the php version to 7.0 in my local.config.yml, then run vagrant provision. No dcr installation failures or any other errors (besides the 2 warnings about the pre/post tasks paths):

apt list --installed | grep php

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

php-apcu/xenial,now 5.1.8+4.0.11-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed]
php-common/xenial,xenial,now 1:55+ubuntu16.04.1+deb.sury.org+1 all [installed]
php-igbinary/xenial,now 2.0.1-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,automatic]
php-memcached/xenial,now 3.0.3+2.2.0-1+ubuntu16.04.1+deb.sury.org+3 amd64 [installed]
php-msgpack/xenial,now 2.0.2+0.5.7-1+ubuntu16.04.1+deb.sury.org+3 amd64 [installed,automatic]
php-yaml/xenial,now 2.0.2+1.3.1-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0/xenial,xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 all [installed]
php7.0-cli/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-common/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,automatic]
php7.0-curl/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-dev/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-fpm/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-gd/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-imap/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-json/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-mbstring/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-mcrypt/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-mysql/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-opcache/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-readline/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,automatic]
php7.0-sqlite3/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-xml/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-zip/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]

Perfect 👍

klonos commented 7 years ago

...setting php to 7.1 and re-provisioning:

apt list --installed | grep php

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

php-apcu/xenial,now 5.1.8+4.0.11-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed]
php-common/xenial,xenial,now 1:55+ubuntu16.04.1+deb.sury.org+1 all [installed]
php-igbinary/xenial,now 2.0.1-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,automatic]
php-memcached/xenial,now 3.0.3+2.2.0-1+ubuntu16.04.1+deb.sury.org+3 amd64 [installed]
php-msgpack/xenial,now 2.0.2+0.5.7-1+ubuntu16.04.1+deb.sury.org+3 amd64 [installed,automatic]
php-yaml/xenial,now 2.0.2+1.3.1-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.1/xenial,xenial,now 7.1.9-1+ubuntu16.04.1+deb.sury.org+1 all [installed]
php7.1-cli/xenial,now 7.1.9-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.1-common/xenial,now 7.1.9-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,automatic]
php7.1-curl/xenial,now 7.1.9-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.1-dev/xenial,now 7.1.9-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.1-fpm/xenial,now 7.1.9-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.1-gd/xenial,now 7.1.9-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.1-imap/xenial,now 7.1.9-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.1-json/xenial,now 7.1.9-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.1-mbstring/xenial,now 7.1.9-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.1-mcrypt/xenial,now 7.1.9-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.1-mysql/xenial,now 7.1.9-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.1-opcache/xenial,now 7.1.9-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.1-readline/xenial,now 7.1.9-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,automatic]
php7.1-sqlite3/xenial,now 7.1.9-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.1-xml/xenial,now 7.1.9-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.1-zip/xenial,now 7.1.9-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]

👍

klonos commented 7 years ago

...setting to php 7.2 and re-provisioning:

==> beetbox: TASK [geerlingguy.php : Update apt cache.] *************************************
==> beetbox: ok: [localhost]
==> beetbox: 
==> beetbox: TASK [geerlingguy.php : Ensure PHP packages are installed.] ********************
==> beetbox: failed: [localhost] (item=[u'php7.2', u'php7.2-apcu', u'php7.2-cli', u'php7.2-common', u'php7.2-curl', u'php7.2-dev', u'php7.2-fpm', u'php7.2-gd', u'php7.2-imap', u'php7.2-json', u'php7.2-mbstring', u'php7.2-mcrypt', u'php7.2-opcache', u'php7.2-sqlite3', u'php7.2-xml', u'php7.2-yaml']) => {"failed": true, "item": ["php7.2", "php7.2-apcu", "php7.2-cli", "php7.2-common", "php7.2-curl", "php7.2-dev", "php7.2-fpm", "php7.2-gd", "php7.2-imap", "php7.2-json", "php7.2-mbstring", "php7.2-mcrypt", "php7.2-opcache", "php7.2-sqlite3", "php7.2-xml", "php7.2-yaml"], "msg": "No package matching 'php7.2-mcrypt' is available"}
==> beetbox: 
==> beetbox: PLAY RECAP *********************************************************************
==> beetbox: localhost                  : ok=88   changed=4    unreachable=0    failed=1   
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.

...which leaves the box with:

apt list --installed | grep php

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

php-common/xenial,xenial,now 1:55+ubuntu16.04.1+deb.sury.org+1 all [installed]
php7.2-common/xenial,now 7.2.0~rc2-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,automatic]
php7.2-zip/xenial,now 7.2.0~rc2-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]

👎

oxyc commented 7 years ago

PHP 7.2 is not supported by geerlingguy.php-versions yet. Feel free to open up an issue in the issue queue. When I scanned ondrej's issue queue yesterday it seemed all packages had 7.2 versions except php-solr and php-ast. php-mbcrypt needs a fix as it's now deprecated.

klonos commented 7 years ago

Yeah, I'm not using 7.2. Just tried it for troubleshooting purposes. For the record, once one attempts to switch to 7.2, then fails and tries to revert back to either 5.6 or 7.0, half-installed 7.2 packages are left behind:

apt list --installed | grep php

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

php-apcu/xenial,now 5.1.8+4.0.11-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed]
php-common/xenial,xenial,now 1:55+ubuntu16.04.1+deb.sury.org+1 all [installed]
php-igbinary/xenial,now 2.0.1-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,automatic]
php-memcached/xenial,now 3.0.3+2.2.0-1+ubuntu16.04.1+deb.sury.org+3 amd64 [installed]
php-msgpack/xenial,now 2.0.2+0.5.7-1+ubuntu16.04.1+deb.sury.org+3 amd64 [installed,automatic]
php-yaml/xenial,now 2.0.2+1.3.1-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php5.6/xenial,xenial,now 5.6.31-4+ubuntu16.04.1+deb.sury.org+4 all [installed]
php5.6-cli/xenial,now 5.6.31-4+ubuntu16.04.1+deb.sury.org+4 amd64 [installed]
php5.6-common/xenial,now 5.6.31-4+ubuntu16.04.1+deb.sury.org+4 amd64 [installed,automatic]
php5.6-curl/xenial,now 5.6.31-4+ubuntu16.04.1+deb.sury.org+4 amd64 [installed]
php5.6-dev/xenial,now 5.6.31-4+ubuntu16.04.1+deb.sury.org+4 amd64 [installed]
php5.6-fpm/xenial,now 5.6.31-4+ubuntu16.04.1+deb.sury.org+4 amd64 [installed]
php5.6-gd/xenial,now 5.6.31-4+ubuntu16.04.1+deb.sury.org+4 amd64 [installed]
php5.6-imap/xenial,now 5.6.31-4+ubuntu16.04.1+deb.sury.org+4 amd64 [installed]
php5.6-json/xenial,now 5.6.31-4+ubuntu16.04.1+deb.sury.org+4 amd64 [installed]
php5.6-mbstring/xenial,now 5.6.31-4+ubuntu16.04.1+deb.sury.org+4 amd64 [installed]
php5.6-mcrypt/xenial,now 5.6.31-4+ubuntu16.04.1+deb.sury.org+4 amd64 [installed]
php5.6-mysql/xenial,now 5.6.31-4+ubuntu16.04.1+deb.sury.org+4 amd64 [installed]
php5.6-opcache/xenial,now 5.6.31-4+ubuntu16.04.1+deb.sury.org+4 amd64 [installed]
php5.6-readline/xenial,now 5.6.31-4+ubuntu16.04.1+deb.sury.org+4 amd64 [installed,automatic]
php5.6-sqlite3/xenial,now 5.6.31-4+ubuntu16.04.1+deb.sury.org+4 amd64 [installed]
php5.6-xml/xenial,now 5.6.31-4+ubuntu16.04.1+deb.sury.org+4 amd64 [installed]
php5.6-zip/xenial,now 5.6.31-4+ubuntu16.04.1+deb.sury.org+4 amd64 [installed]
php7.2-common/xenial,now 7.2.0~rc2-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,automatic]
php7.2-zip/xenial,now 7.2.0~rc2-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
apt list --installed | grep php

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

php-apcu/xenial,now 5.1.8+4.0.11-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed]
php-common/xenial,xenial,now 1:55+ubuntu16.04.1+deb.sury.org+1 all [installed]
php-igbinary/xenial,now 2.0.1-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed]
php-memcached/xenial,now 3.0.3+2.2.0-1+ubuntu16.04.1+deb.sury.org+3 amd64 [installed]
php-msgpack/xenial,now 2.0.2+0.5.7-1+ubuntu16.04.1+deb.sury.org+3 amd64 [installed]
php-yaml/xenial,now 2.0.2+1.3.1-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0/xenial,xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 all [installed]
php7.0-cli/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-common/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,automatic]
php7.0-curl/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-dev/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-fpm/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-gd/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-imap/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-json/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-mbstring/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-mcrypt/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-mysql/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-opcache/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-readline/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,automatic]
php7.0-sqlite3/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-xml/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.0-zip/xenial,now 7.0.23-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.2-cli/now 7.2.0~rc1-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,upgradable to: 7.2.0~rc2-1+ubuntu16.04.1+deb.sury.org+1]
php7.2-common/now 7.2.0~rc1-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,upgradable to: 7.2.0~rc2-1+ubuntu16.04.1+deb.sury.org+1]
php7.2-json/now 7.2.0~rc1-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,upgradable to: 7.2.0~rc2-1+ubuntu16.04.1+deb.sury.org+1]
php7.2-opcache/now 7.2.0~rc1-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,upgradable to: 7.2.0~rc2-1+ubuntu16.04.1+deb.sury.org+1]
php7.2-phpdbg/now 7.2.0~rc1-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,upgradable to: 7.2.0~rc2-1+ubuntu16.04.1+deb.sury.org+1]
php7.2-readline/now 7.2.0~rc1-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed,upgradable to: 7.2.0~rc2-1+ubuntu16.04.1+deb.sury.org+1]

Adding a post task to cleanup as per @christopher-hopper's comment fixes things of course (thanks).

oxyc commented 7 years ago

Opened a PR for the purge task at https://github.com/geerlingguy/ansible-role-php-versions/pull/8 and for PHP 7.2 at https://github.com/geerlingguy/ansible-role-php-versions/pull/10

thom8 commented 7 years ago

@klonos as @oxyc mentioned 7.2 is not supported so it doesn't cleanup, yet.

In this case I'd recommend rebuilding rather that cleaning up, one of the main benefits of this project is the fast provisioning time so there's not much point in ever doing clean up.

I use a bash alias -- alias vreset='vagrant destroy -f && time vagrant up'

oxyc commented 7 years ago

@thom8 geerlingguy.php-version now uses the fixed purge task and supports PHP 7.2 as well. Drupal and XDebug do not support it yet though.

thom8 commented 7 years ago

@oxyc cheers -- composer role-update --> https://github.com/beetboxvm/beetbox/commit/2c89a1a6c5c7b461f8867b6672bd9f3bfb51941f

thom8 commented 7 years ago

need to look into automating that..

thom8 commented 7 years ago

Could chuck it into the nightly build before the CI run but couldn't get git running properly on lambda via https://serverless.com/.

thom8 commented 7 years ago

Got composer updates automated -- https://github.com/beetboxvm/beetbox/pulls

Now just role updates, I've got a plan ;)

rwitchell commented 6 years ago

i'm still getting this issue on beetbox v0.8.0

.beetbox/config.yml

beet_domain: "symfony.local"
beet_web: "{{ beet_root }}/{{ symfony_project_name }}/web"
role_path: "{{ beet_home }}/provisioning/ansible/roles/beetboxvm.symfony"

beet_project: symfony
symfony_project_create: yes
symfony_project_name: beetbox
php_version: "5.6"

ssh on box

vagrant@symfony:/var/beetbox/beetbox$ php --version
PHP 7.2.0RC3 (cli) (built: Sep 28 2017 16:28:14) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.2.0-dev, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.2.0RC3, Copyright (c) 1999-2017, by Zend Technologies
vagrant@symfony:/var/beetbox/beetbox$ apt list --installed | grep php

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

php-apcu/xenial,now 5.1.8+4.0.11-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed]
php-common/xenial,xenial,now 1:55+ubuntu16.04.1+deb.sury.org+1 all [installed]
php-igbinary/xenial,now 2.0.1-1+ubuntu16.04.1+deb.sury.org+2 amd64 [installed]
php-memcached/xenial,now 3.0.3+2.2.0-1+ubuntu16.04.1+deb.sury.org+3 amd64 [installed]
php-msgpack/xenial,now 2.0.2+0.5.7-1+ubuntu16.04.1+deb.sury.org+3 amd64 [installed]
php-yaml/xenial,now 2.0.2+1.3.1-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php5.6/xenial,xenial,now 5.6.31-6+ubuntu16.04.1+deb.sury.org+1 all [installed]
php5.6-cli/xenial,now 5.6.31-6+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php5.6-common/xenial,now 5.6.31-6+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php5.6-curl/xenial,now 5.6.31-6+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php5.6-dev/xenial,now 5.6.31-6+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php5.6-fpm/xenial,now 5.6.31-6+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php5.6-gd/xenial,now 5.6.31-6+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php5.6-imap/xenial,now 5.6.31-6+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php5.6-json/xenial,now 5.6.31-6+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php5.6-mbstring/xenial,now 5.6.31-6+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php5.6-mcrypt/xenial,now 5.6.31-6+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php5.6-mysql/xenial,now 5.6.31-6+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php5.6-opcache/xenial,now 5.6.31-6+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php5.6-readline/xenial,now 5.6.31-6+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,automatic]
php5.6-sqlite3/xenial,now 5.6.31-6+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php5.6-xml/xenial,now 5.6.31-6+ubuntu16.04.1+deb.sury.org+1 amd64 [installed]
php7.2-cli/now 7.2.0~rc3-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,upgradable to: 7.2.0~rc4-1+ubuntu16.04.1+deb.sury.org+1]
php7.2-common/now 7.2.0~rc3-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,upgradable to: 7.2.0~rc4-1+ubuntu16.04.1+deb.sury.org+1]
php7.2-json/now 7.2.0~rc3-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,upgradable to: 7.2.0~rc4-1+ubuntu16.04.1+deb.sury.org+1]
php7.2-opcache/now 7.2.0~rc3-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,upgradable to: 7.2.0~rc4-1+ubuntu16.04.1+deb.sury.org+1]
php7.2-phpdbg/now 7.2.0~rc3-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,upgradable to: 7.2.0~rc4-1+ubuntu16.04.1+deb.sury.org+1]
php7.2-readline/now 7.2.0~rc3-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installed,upgradable to: 7.2.0~rc4-1+ubuntu16.04.1+deb.sury.org+1]
klonos commented 6 years ago

Yep, still having problems with 0.8.6, 0.8.7, and 0.8.8 :(

klonos commented 6 years ago

https://github.com/geerlingguy/ansible-role-php-versions/issues/14

klonos commented 6 years ago

Just FTR, I have upgraded from 0.8.10 to 0.8.12 and the issue seems to be sorted. No need to have a /tasks/post file added to clean up any traces of php7.2 any more 🎉 👏 Thanks @thom8!

thom8 commented 6 years ago

Thanks for confirming @klonos :)

klonos commented 6 years ago

...aaaaaand, broken again with the new release :(

...I have to return to having to use the /tasks/post/php-72-remove.yml file again:

- name: Remove php 7.2 packages.
  package:
    name: "php7.2-{{ package_name }}"
    state: absent
  with_items:
    - cli
    - common
  loop_control:
    loop_var: package_name
  when: php_version == "5.6"

(I have set php5.6 as the default in my ~/.beetbox/config.yml)