Skip to content

[BUG] On Debian, does not work by default #217

Open

Description

@daks

Versions reports (master & minion)

Using salt-ssh 3001.1 installed in a virtualenv. Minion is Debian Buster, no master.

Pillar / config used

top.sls contains

base:
  '*':
    - php

No pillar.

Bug details

Describe the bug

This does not work out of the box

----------
          ID: php_install_php
    Function: pkg.installed
        Name: php
      Result: False
     Comment: The following packages failed to install/update: php7.0
     Started: 13:21:35.587509
    Duration: 578.336 ms
     Changes:

Steps to reproduce the bug

Expected behaviour

I expect the formula to work out of the box, with sane defaults so I can use it to simply install available PHP packages on Debian distribution.

Attempts to fix the bug

I still have not looked at how the formula exactly works, but it looks like without external repository I can't use it to use PHP packages from vanilla Debian repositories.

Additional context

Activity

  1. daks commented on Oct 30, 2020

    @daks
    MemberAuthor

    Solved using following pillar

    php:
      version: ''
    

    which lets the formula find all php-* packages available on Debian. Those names are always available and pull available versions (7.1 for oldstable, 7.3 for stable, 7.4 for actual testing)

  2. javierbertoli commented on Oct 30, 2020

    @javierbertoli
    Member

    I think we should make it default to just php, which is Debian's meta-package to latest version available for the distro, right?

    Though I checked the map.jinja and php.installed.jinja, and the value for php_version is hardcoded in both.

    I think this formula needs some major refactoring 🙄

  3. myii commented on Oct 30, 2020

    @myii
    Contributor

    This shares a common thread with #214, #215 and #216, in that this formula needs to go through the following steps:

    1. Add the map.jinja verifier (after finalising the PR in the openvpn-formula).
    2. Update to the latest map.jinja and YAML files (even if v3 rather than v4 -- although I'd prefer the latter).
    3. Ensure each specific issue is fixed.
  4. daks commented on Nov 7, 2020

    @daks
    MemberAuthor

    I think we should make it default to just php, which is Debian's meta-package to latest version available for the distro, right?

    Though I checked the map.jinja and php.installed.jinja, and the value for php_version is hardcoded in both.

    I think this formula needs some major refactoring roll_eyes

    Could work for simple setup (like stated in the description) but once you want php.fpm you need to have the correct version number because the service is named php<version>-fpm.

    Not easy to solve...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions