Skip to content

How to handle inconsistencies in PHP packaging #40

@ganto

Description

@ganto

I'm currently migrating the debops-contrib.roundcube role from debops.php5 to debops.php (see debops-contrib/ansible-roundcube#24). As even the latest version of Travis-CI (using Ubuntu Trusty 14.04) has a rather antique version of PHP, the packaging seems a bit different from newer releases. Feeding the following variable to the role works perfectly fine on Debian Stretch:

php__dependent_packages:
  - mbstring
  - json
  - pspell
  - zip
  - sqlite3

On Travis-CI (and probably also Debian Jessie) it will result in the following error:

TASK [debops.php : Install PHP packages] ***************************************

failed: [testing-gce-2c8b58ef-e44b-4026-a9cb-c22e444a17a0] (item=[u'php5-cli', u'php5-fpm', u'php5', u'php5-curl', u'php5-gd', u'php5-mcrypt', u'mbstring', u'php5-json', u'php5-pspell', u'zip', u'sqlite3', u'php5-pspell', u'zip']) => {
  failed: true
  item:
    - php5-cli
    - php5-fpm
    - php5
    - php5-curl
    - php5-gd
    - php5-mcrypt
    - mbstring
    - php5-json
    - php5-pspell
    - zip
    - sqlite3
    - php5-pspell
    - zip
  msg: "No package matching 'mbstring' is available"
}

As you can see, mbstring and zip are not available as a separate PHP package and sqlite3 is packaged as php-sqlite.

My question is now, does a consumer of the debops.php role has to care for such packaging issues or should this be solved in the PHP role? The current interface currently makes me think that the user of the role shouldn't need to think of the exact packaging implementation as the php-/php5- prefix is already nicely hidden.

Do you think it would be possible to make this transparent to a consumer and filter out respectively map package names for individual distributions? My idea would be, that I simply can give a list of modules that my application requires and, as long as there is a proper package for it, the role would decide itself what to install. What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions