voxpupuli / voxpupuli/puppet-php
[feature request] Account for provider binaries in SCL PHP paths
Nobody has claimed this yet.
- Dominant language
- Puppet
- Stars
- 86
- Forks
- 264
- Avg merge
- 29m
- Merged PRs (30d)
- 1
Description
Affected Puppet, Ruby, OS and module versions/distributions
- Puppet: 4.10.7
- Ruby: ruby 2.0.0p648 (2015-12-16) [x86_64-linux]
- Distribution: CentOS Linux release 7.2.1511 (Core)
- Module version: 96e89d6b239701a596ef597f6ec78a59313ea0b5
How to reproduce (e.g Puppet code you use)
- Install PHP from SCL
- Configure module similar to:
php::globals::php_version: '7.1'
php::globals::config_root: '/etc/opt/rh/rh-php71'
php::package_prefix: 'rh-php71-php-'
php::extensions:
yaml:
provider: 'pecl'
header_packages:
- 'libyaml-devel'
What are you seeing
Pecl/pear providers will fail since their binaries are in non standard paths. For example, binaries are located in /opt/rh/rh-php71/root/usr/bin/pear for SCL PHP 7.1 on CentOS/RedHat 7.
What behaviour did you expect instead
It'd great if the pecl/pear providers could account for pear/pecl SCL binaries.
Output log
Error: /Package[yaml]: Provider pecl is not functional on this host
Debug: Php::Extension::Install[yaml]: Resource is being skipped, unscheduling all events
Debug: Php::Extension::Config[yaml]: Resource is being skipped, unscheduling all events
Debug: Php::Config[yaml]: Resource is being skipped, unscheduling all events
Debug: Php::Config::Setting[/etc/opt/rh/rh-php71/php.d/yaml.ini: extension]: Resource is being skipped, unscheduling all events
Notice: /Stage[main]/Php/Php::Extension[yaml]/Php::Extension::Config[yaml]/Php::Config[yaml]/Php::Config::Setting[/etc/opt/rh/rh-php71/php.d/yaml.ini: extension]/Ini_setting[/etc/opt/rh/rh-php71/php.d/yaml.ini: extension]: Dependency Package[yaml] has failures: true
Warning: /Stage[main]/Php/Php::Extension[yaml]/Php::Extension::Config[yaml]/Php::Config[yaml]/Php::Config::Setting[/etc/opt/rh/rh-php71/php.d/yaml.ini: extension]/Ini_setting[/etc/opt/rh/rh-php71/php.d/yaml.ini: extension]: Skipping because of failed dependencies
Debug: /Stage[main]/Php/Php::Extension[yaml]/Php::Extension::Config[yaml]/Php::Config[yaml]/Php::Config::Setting[/etc/opt/rh/rh-php71/php.d/yaml.ini: extension]/Ini_setting[/etc/opt/rh/rh-php71/php.d/yaml.ini: extension]: Resource is being skipped, unscheduling all events
Debug: Php::Config::Setting[/etc/opt/rh/rh-php71/php.d/yaml.ini: extension]: Resource is being skipped, unscheduling all events
Debug: Php::Config[yaml]: Resource is being skipped, unscheduling all events
Debug: Php::Extension::Config[yaml]: Resource is being skipped, unscheduling all events
Debug: Php::Extension[yaml]: Resource is being skipped, unscheduling all events
Any additional information you'd like to impart
I'm using this module to install SCL PHP 7.1. I also need yaml module. Since there is no package for it, pecl is being used to install it.
As a workaround I'm creating symlinks to the pecl/pear binaries:
file {
default: ensure => link ;
'/usr/bin/pear': target => '/opt/rh/rh-php71/root/usr/bin/pear' ;
'/usr/bin/pecl': target => '/opt/rh/rh-php71/root/usr/bin/pecl' ;
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the PECL and PEAR provider entry points and reproduce the issue with the supplied SCL PHP 7.1 configuration on CentOS. Trace how provider binaries are located and verify the provider becomes functional for the yaml extension without creating /usr/bin/pear or /usr/bin/pecl symlinks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- centos, php
- Domain
- devops
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100