sous-chefs/php

package recipes not use version attribute

Closed this issue · 4 comments

Cookbook version

2.1.1

Chef-client version

12.10.24

Platform Details

Ubuntu 14.04

Scenario:

"run_list": [
	"recipe[apt]",
	"recipe[php]"

],
"php": {
	"install_method": "package",
	"version": "5.6.25",
	"fpm_package": "php5.6-fpm",
	"fpm_service": "php5.6-fpm",
	"fpm_socket": "/run/php/php5.6-fpm.sock",
	"fpm_pooldir": "/etc/php/5.6/fpm/pool.d",
	"fpm_default_conf": "/etc/php/5.6/fpm/pool.d/www.conf",
	"conf_dir": "/etc/php/5.6/cli",
	"ext_conf_dir": "/etc/php/5.6/mods-available",
	"enable_mod": "/usr/sbin/phpenmod",
	"disable_mod": "/usr/sbin/phpdismod",
	"curl": {
		"package": "php5.6-curl"
	},
	"gd": {
		"package": "php5.6-gd"
	},
	"ldap": {
		"package": "php5.6-ldap"
	},
	"pgsql": {
		"package": "php5.6-pgsql"
	},
	"sqlite3": {
		"package": "php5.6-sqlite3"
	},
	"packages": [
		"php5.6-common",
		"php5.6-dev",
		"php5.6-fpm",
		"php5.6-cli",
		"php-pear"
	]
},

Steps to Reproduce:

Run chef-solo

Expected Result:

Chef installed php5.6.25

Actual Result:

Chef installed last package in repo

Why not use version attribute for package install ( https://docs.chef.io/resource_package.html ) ?
Actually problem for newer cookbook.

Because each distro has wildly different support so we merely install latest - if you want a custom version installing from source is the best way or writing your own custom recipe to do the installation part.

tas50 commented

I'm closing this out as a won't fix. The version attribute is for the source installs. As @cheeseplus mentioned this introduced a level of complexity due to distro mess that we just don't want to touch. If you need something to control particular package installs I'd suggest a simple cookbook that handles exactly what you need on just the distro you need.

lock commented

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.