Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Adds support for selection of PHP version #8

Merged
merged 2 commits into from

2 participants

@blongden
Owner

No longer OS specific - installs PHP 5.3 from IUS by default -
optionally installs PHP 5.4 from IUS or the default version from the
repository in yum (yum based servers only)

@blongden blongden Adds support for selection of PHP version
No longer OS specific - installs PHP 5.3 from IUS by default -
optionally installs PHP 5.4 from IUS or the default version from the
repository in yum (yum based servers only)
3cf91f3
@alistairstead alistairstead merged commit d661d70 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 31, 2012
  1. @blongden

    Adds support for selection of PHP version

    blongden authored
    No longer OS specific - installs PHP 5.3 from IUS by default -
    optionally installs PHP 5.4 from IUS or the default version from the
    repository in yum (yum based servers only)
  2. @blongden

    Removes lock file

    blongden authored
This page is out of date. Refresh to see the latest.
View
104 Gemfile.lock
@@ -1,104 +0,0 @@
-GEM
- remote: http://rubygems.org/
- specs:
- bunny (0.8.0)
- chef (10.12.0)
- bunny (>= 0.6.0)
- erubis
- highline (>= 1.6.9)
- json (>= 1.4.4, <= 1.6.1)
- mixlib-authentication (>= 1.1.0)
- mixlib-cli (>= 1.1.0)
- mixlib-config (>= 1.1.2)
- mixlib-log (>= 1.3.0)
- mixlib-shellout
- moneta
- net-ssh (~> 2.2.2)
- net-ssh-multi (~> 1.1.0)
- ohai (>= 0.6.0)
- rest-client (>= 1.0.4, < 1.7.0)
- treetop (~> 1.4.9)
- uuidtools
- yajl-ruby (~> 1.1)
- chefspec (0.6.1)
- chef (>= 0.9.12)
- erubis
- rspec (~> 2.10.0)
- coderay (1.0.7)
- diff-lcs (1.1.3)
- erubis (2.7.0)
- fauxhai (0.0.2)
- chef
- net-ssh
- foodcritic (1.5.1)
- erubis
- gherkin (~> 2.11.1)
- gist (~> 3.1.0)
- nokogiri (= 1.5.0)
- pry (~> 0.9.8.4)
- rak (~> 1.4)
- treetop (~> 1.4.10)
- yajl-ruby (~> 1.1.0)
- gherkin (2.11.2)
- json (>= 1.4.6)
- gist (3.1.0)
- highline (1.6.13)
- ipaddress (0.8.0)
- json (1.6.1)
- method_source (0.7.1)
- mime-types (1.19)
- mixlib-authentication (1.3.0)
- mixlib-log
- mixlib-cli (1.2.2)
- mixlib-config (1.1.2)
- mixlib-log (1.4.1)
- mixlib-shellout (1.1.0)
- moneta (0.6.0)
- net-ssh (2.2.2)
- net-ssh-gateway (1.1.0)
- net-ssh (>= 1.99.1)
- net-ssh-multi (1.1)
- net-ssh (>= 2.1.4)
- net-ssh-gateway (>= 0.99.0)
- nokogiri (1.5.0)
- ohai (6.14.0)
- ipaddress
- mixlib-cli
- mixlib-config
- mixlib-log
- systemu
- yajl-ruby
- polyglot (0.3.3)
- pry (0.9.8.4)
- coderay (~> 1.0.5)
- method_source (~> 0.7.1)
- slop (>= 2.4.4, < 3)
- rak (1.4)
- rake (0.9.2.2)
- rest-client (1.6.7)
- mime-types (>= 1.16)
- rspec (2.10.0)
- rspec-core (~> 2.10.0)
- rspec-expectations (~> 2.10.0)
- rspec-mocks (~> 2.10.0)
- rspec-core (2.10.1)
- rspec-expectations (2.10.0)
- diff-lcs (~> 1.1.3)
- rspec-mocks (2.10.1)
- slop (2.4.4)
- systemu (2.5.2)
- treetop (1.4.10)
- polyglot
- polyglot (>= 0.3.1)
- uuidtools (2.1.3)
- yajl-ruby (1.1.0)
-
-PLATFORMS
- ruby
-
-DEPENDENCIES
- chef
- chefspec
- fauxhai
- foodcritic
- rake
View
9 README.md
@@ -37,6 +37,7 @@ The following Opscode cookbooks are dependencies:
* `['xdebug']['profiler_enable_trigger']` = Defaults to `0`.
* `['xdebug']['profiler_enable']` = Defaults to `0`.
* `['xdebug']['profiler_output_dir']` = Defaults to `/tmp/cachegrind`.
+* `['php']['ius']` = Defaults to `5.3`.
# Providers
@@ -60,6 +61,10 @@ Install the additional PHP modules not part of the Opscode cookbook.
Installs and configures a standard set of tools used in development of PHP projects. This will install the standard set of static code analysis tools for PHP as well as testing and quality assurance tools.
+## package
+
+Installs the php5 package. The version can be controlled on yum based systems using the `['php']['ius']` value. Possible vaulues are '5.4', '5.3' or false (to install the latest php package from the default repository).
+
## module_dev
Installs the php5_dev module that is required by xdebug.
@@ -149,7 +154,9 @@ If you are setting up a development environment you can use the single recipe th
# License and Author
-Author:: Alistair Stead (alistair@inviqa.com) Author:: Marcello Duarte (marcello@inviqa.com)
+Author:: Alistair Stead (alistair@inviqa.com)
+Author:: Marcello Duarte (marcello@inviqa.com)
+Author:: Ben Longden (blongden@inviqa.com)
Copyright 2012, Inviqa
View
3  attributes/default.rb
@@ -8,4 +8,5 @@
default['xdebug']['file_link_format'] = "txmt://open?url=file://%f&line=%1"
default['xdebug']['profiler_enable_trigger'] = 0
default['xdebug']['profiler_enable'] = 0
-default['xdebug']['profiler_output_dir'] = "/tmp/cachegrind"
+default['php']['ius'] = "5.3"
View
10 recipes/module_dev.rb
@@ -19,12 +19,10 @@
include_recipe "chef-php-extra"
-if node['platform_version'].to_f < 6.0
- if File.exists?("/etc/yum.repos.d/ius.repo")
- packages = %w{ php53u-devel }
- else
- packages = %w{ php53-devel }
- end
+if node['php']['ius'] == "5.4"
+ packages = %w{ php54-devel }
+elsif node['php']['ius'] == "5.3"
+ packages = %w{ php53u-devel }
else
packages = %w{ php-devel }
end
View
10 recipes/module_gd.rb
@@ -19,12 +19,10 @@
include_recipe "chef-php-extra"
-if node['platform_version'].to_f < 6.0
- if File.exists?("/etc/yum.repos.d/ius.repo")
- packages = %w{ php53u-gd }
- else
- packages = %w{ php53-gd }
- end
+if node['php']['ius'] == "5.4"
+ packages = %w{ php54-gd }
+elsif node['php']['ius'] == "5.3"
+ packages = %w{ php53u-gd }
else
packages = %w{ php-gd }
end
View
10 recipes/module_imagick.rb
@@ -19,12 +19,10 @@
include_recipe "chef-php-extra"
-if node['platform_version'].to_f < 6.0
- if File.exists?("/etc/yum.repos.d/ius.repo")
- packages = %w{ php53u-imagick }
- else
- packages = %w{ php53-imagick }
- end
+if node['php']['ius'] == "5.4"
+ packages = %w{ php54-imagick }
+elsif node['php']['ius'] == "5.3"
+ packages = %w{ php53u-imagick }
else
packages = %w{ php-imagick }
end
View
16 recipes/module_mcrypt.rb
@@ -19,18 +19,12 @@
include_recipe "chef-php-extra"
-if platform?("redhat", "centos", "fedora", "amazon", "scientific")
- include_recipe "yum::ius"
-end
-
-if node['platform_version'].to_f < 6.0
- if File.exists?("/etc/yum.repos.d/ius.repo")
+if node['php']['ius'] == "5.4"
+ packages = %w{ php54-mcrypt }
+elsif node['php']['ius'] == "5.3"
packages = %w{ php53u-mcrypt }
- else
- packages = %w{ php-mcrypt }
- end
else
- packages = %w{ php-mcrypt }
+ packages = %w{ php-mcrypt }
end
pkgs = value_for_platform(
@@ -50,4 +44,4 @@
template "#{node['php']['ext_conf_dir']}/mcrypt.ini" do
mode "0644"
-end
View
10 recipes/module_mysql.rb
@@ -19,14 +19,12 @@
include_recipe "chef-php-extra"
-if node['platform_version'].to_f < 6.0
- if File.exists?("/etc/yum.repos.d/ius.repo")
+if node['php']['ius'] == "5.4"
+ packages = %w{ php54-mysql }
+elsif node['php']['ius'] == "5.3"
packages = %w{ php53u-mysql }
- else
- packages = %w{ php53-mysql }
- end
else
- packages = %w{ php-mysql }
+ packages = %w{ php-mysql }
end
pkgs = value_for_platform(
View
10 recipes/module_soap.rb
@@ -19,14 +19,12 @@
include_recipe "chef-php-extra"
-if node['platform_version'].to_f < 6.0
- if File.exists?("/etc/yum.repos.d/ius.repo")
+if node['php']['ius'] == "5.4"
+ packages = %w{ php54-soap }
+elsif node['php']['ius'] == "5.3"
packages = %w{ php53u-soap }
- else
- packages = %w{ php53-soap }
- end
else
- packages = %w{ php-soap }
+ packages = %w{ php-soap }
end
pkgs = value_for_platform(
View
10 recipes/module_xml.rb
@@ -19,14 +19,12 @@
include_recipe "chef-php-extra"
-if node['platform_version'].to_f < 6.0
- if File.exists?("/etc/yum.repos.d/ius.repo")
+if node['php']['ius'] == "5.4"
+ packages = %w{ php54-xml }
+elsif node['php']['ius'] == "5.3"
packages = %w{ php53u-xml }
- else
- packages = %w{ php53-xml }
- end
else
- packages = %w{ php-xml }
+ packages = %w{ php-xml }
end
pkgs = value_for_platform(
View
10 recipes/package.rb
@@ -1,5 +1,11 @@
-if node['platform_version'].to_f < 6.0
- centos_packages = %w{ php53 php53-devel php53-cli php-pear }
+if node['php']['ius'] != false and platform?("redhat", "centos", "fedora", "amazon", "scientific")
+ include_recipe "yum::ius"
+end
+
+if node['php']['ius'] == "5.4"
+ centos_packages = %w{ php54 php54-devel php54-cli php54-pear }
+elsif node['php']['ius'] == "5.3"
+ centos_packages = %w{ php53u php53u-devel php53u-cli php53u-pear }
else
centos_packages = %w{ php php-devel php-cli php-pear }
end
View
2  recipes/xdebug.rb
@@ -25,7 +25,7 @@
# end
if platform?(%w{debian ubuntu})
- package "php5-xdebug"
+ package "php5-xdebug"
elsif platform?(%w{centos redhat fedora amazon scientific})
php_pear "xdebug" do
action :install
Something went wrong with that request. Please try again.