From e1bdacef3f8337114725b69bff02a92301d0933c Mon Sep 17 00:00:00 2001 From: dcole-inviqa Date: Mon, 28 Sep 2015 08:45:15 +0100 Subject: [PATCH 1/4] allow ius php55 --- recipes/module_dev.rb | 4 +++- recipes/module_gd.rb | 4 +++- recipes/module_imagick.rb | 5 ++++- recipes/module_intl.rb | 4 +++- recipes/module_mbstring.rb | 4 +++- recipes/module_mcrypt.rb | 12 +++++++++--- recipes/module_memcache.rb | 4 +++- recipes/module_mysql.rb | 4 +++- recipes/module_soap.rb | 4 +++- recipes/module_xml.rb | 4 +++- recipes/package.rb | 4 +++- 11 files changed, 40 insertions(+), 13 deletions(-) diff --git a/recipes/module_dev.rb b/recipes/module_dev.rb index d3e7609..31e746c 100755 --- a/recipes/module_dev.rb +++ b/recipes/module_dev.rb @@ -19,7 +19,9 @@ include_recipe "chef-php-extra" -if node['php']['ius'] == "5.4" +if node['php']['ius'] == "5.5" + packages = %w{ php55u-devel } +elsif node['php']['ius'] == "5.4" packages = %w{ php54-devel } elsif node['php']['ius'] == "5.3" packages = %w{ php53u-devel } diff --git a/recipes/module_gd.rb b/recipes/module_gd.rb index 8efd2cd..2be768a 100644 --- a/recipes/module_gd.rb +++ b/recipes/module_gd.rb @@ -19,7 +19,9 @@ include_recipe "chef-php-extra" -if node['php']['ius'] == "5.4" +if node['php']['ius'] == "5.5" + packages = %w{ php55u-gd } +elsif node['php']['ius'] == "5.4" packages = %w{ php54-gd } elsif node['php']['ius'] == "5.3" packages = %w{ php53u-gd } diff --git a/recipes/module_imagick.rb b/recipes/module_imagick.rb index 4a9551e..25eb2f6 100755 --- a/recipes/module_imagick.rb +++ b/recipes/module_imagick.rb @@ -18,7 +18,10 @@ # include_recipe "chef-php-extra" -if node['php']['ius'] == "5.4" + +if node['php']['ius'] == "5.5" + packages = %w{ php55u-pecl-imagick } +elsif node['php']['ius'] == "5.4" packages = %w{ php54-pecl-imagick } elsif node['php']['ius'] == "5.3" packages = %w{ php53u-pecl-imagick } diff --git a/recipes/module_intl.rb b/recipes/module_intl.rb index 926c354..d7e054f 100755 --- a/recipes/module_intl.rb +++ b/recipes/module_intl.rb @@ -19,7 +19,9 @@ include_recipe "chef-php-extra" -if node['php']['ius'] == "5.4" +if node['php']['ius'] == "5.5" + packages = %w{ php55u-intl } +elsif node['php']['ius'] == "5.4" packages = %w{ php54-intl } elsif node['php']['ius'] == "5.3" packages = %w{ php53u-intl } diff --git a/recipes/module_mbstring.rb b/recipes/module_mbstring.rb index 481af58..df1f2ea 100755 --- a/recipes/module_mbstring.rb +++ b/recipes/module_mbstring.rb @@ -19,7 +19,9 @@ include_recipe "chef-php-extra" -if node['php']['ius'] == "5.4" +if node['php']['ius'] == "5.5" + packages = %w{ php55u-mbstring } +elsif node['php']['ius'] == "5.4" packages = %w{ php54-mbstring } elsif node['php']['ius'] == "5.3" packages = %w{ php53u-mbstring } diff --git a/recipes/module_mcrypt.rb b/recipes/module_mcrypt.rb index e6a8ac8..4a308ce 100755 --- a/recipes/module_mcrypt.rb +++ b/recipes/module_mcrypt.rb @@ -17,9 +17,13 @@ # limitations under the License. # + + include_recipe "chef-php-extra" -if node['php']['ius'] == "5.4" +if node['php']['ius'] == "5.5" + packages = %w{ php55u-mcrypt } +elsif node['php']['ius'] == "5.4" packages = %w{ php54-mcrypt } elsif node['php']['ius'] == "5.3" packages = %w{ php53u-mcrypt } @@ -42,6 +46,8 @@ end end -template "#{node['php']['ext_conf_dir']}/mcrypt.ini" do - mode "0644" +if node['php']['ius'] != "5.5" + template "#{node['php']['ext_conf_dir']}/mcrypt.ini" do + mode "0644" + end end diff --git a/recipes/module_memcache.rb b/recipes/module_memcache.rb index 6c19cc7..47b6e96 100644 --- a/recipes/module_memcache.rb +++ b/recipes/module_memcache.rb @@ -19,7 +19,9 @@ include_recipe "chef-php-extra" -if node['php']['ius'] == "5.4" +if node['php']['ius'] == "5.5" + packages = %w{ php55u-pecl-memcache } +elsif node['php']['ius'] == "5.4" packages = %w{ php54-pecl-memcache } elsif node['php']['ius'] == "5.3" packages = %w{ php53u-pecl-memcache } diff --git a/recipes/module_mysql.rb b/recipes/module_mysql.rb index 32d36af..4564800 100644 --- a/recipes/module_mysql.rb +++ b/recipes/module_mysql.rb @@ -19,7 +19,9 @@ include_recipe "chef-php-extra" -if node['php']['ius'] == "5.4" +if node['php']['ius'] == "5.5" + packages = %w{ php55u-mysqlnd } +elsif node['php']['ius'] == "5.4" packages = %w{ php54-mysql } elsif node['php']['ius'] == "5.3" packages = %w{ php53u-mysql } diff --git a/recipes/module_soap.rb b/recipes/module_soap.rb index 936255e..701ef17 100755 --- a/recipes/module_soap.rb +++ b/recipes/module_soap.rb @@ -19,7 +19,9 @@ include_recipe "chef-php-extra" -if node['php']['ius'] == "5.4" +if node['php']['ius'] == "5.5" + packages = %w{ php55u-soap } +elsif node['php']['ius'] == "5.4" packages = %w{ php54-soap } elsif node['php']['ius'] == "5.3" packages = %w{ php53u-soap } diff --git a/recipes/module_xml.rb b/recipes/module_xml.rb index 8fd2568..bc4e12c 100755 --- a/recipes/module_xml.rb +++ b/recipes/module_xml.rb @@ -19,7 +19,9 @@ include_recipe "chef-php-extra" -if node['php']['ius'] == "5.4" +if node['php']['ius'] == "5.5" + packages = %w{ php55u-xml } +elsif node['php']['ius'] == "5.4" packages = %w{ php54-xml } elsif node['php']['ius'] == "5.3" packages = %w{ php53u-xml } diff --git a/recipes/package.rb b/recipes/package.rb index 8e2e92e..6245a8a 100644 --- a/recipes/package.rb +++ b/recipes/package.rb @@ -2,7 +2,9 @@ include_recipe "yum::ius" end -if node['php']['ius'] == "5.4" +if node['php']['ius'] == "5.5" + centos_packages = %w{ php55u php55u-devel php55u-cli php55u-pear } +elsif 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 } From 61948b007f466631c4a0d6dbfa0e562ca7853e45 Mon Sep 17 00:00:00 2001 From: dcole-inviqa Date: Mon, 26 Oct 2015 07:50:16 +0000 Subject: [PATCH 2/4] switch xdebug to package on php55 --- recipes/xdebug.rb | 44 ++++++++++++++++++++++++++++---------------- 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/recipes/xdebug.rb b/recipes/xdebug.rb index c75270a..1ffb1ea 100755 --- a/recipes/xdebug.rb +++ b/recipes/xdebug.rb @@ -17,24 +17,36 @@ # limitations under the License. # -# Needed for phpize, which pecl needs -include_recipe "chef-php-extra::module_dev" +use_pear = false -# php_pear "xdebug" do -# action :install -# end +case node['php']['ius'] + when '5.5' then package 'php55u-xdebug' + when '5.4' then use_pear = true + when '5.3' then use_pear = true + else + use_pear = true +end + +if use_pear + # Needed for phpize, which pecl needs + include_recipe "chef-php-extra::module_dev" + + # php_pear "xdebug" do + # action :install + # end -if platform?(%w{debian ubuntu}) - package "php5-xdebug" -elsif platform?(%w{centos redhat fedora amazon scientific}) - php_pear "xdebug" do - action :install + if platform?(%w{debian ubuntu}) + package "php5-xdebug" + elsif platform?(%w{centos redhat fedora amazon scientific}) + php_pear "xdebug" do + action :install + end end -end -template "#{node['php']['ext_conf_dir']}/xdebug.ini" do - mode "0644" - variables( - :params => node['xdebug'] - ) + template "#{node['php']['ext_conf_dir']}/xdebug.ini" do + mode "0644" + variables( + :params => node['xdebug'] + ) + end end From 43f0613bb1935eb4553ce6dee58835c228839696 Mon Sep 17 00:00:00 2001 From: James Halsall Date: Fri, 29 Jul 2016 11:52:21 +0100 Subject: [PATCH 3/4] Add support for php56 packages --- recipes/module_dev.rb | 4 +++- recipes/module_gd.rb | 4 +++- recipes/module_imagick.rb | 4 +++- recipes/module_intl.rb | 4 +++- recipes/module_mbstring.rb | 4 +++- recipes/module_mcrypt.rb | 6 ++++-- recipes/module_memcache.rb | 4 +++- recipes/module_mysql.rb | 4 +++- recipes/module_soap.rb | 4 +++- recipes/module_xml.rb | 4 +++- recipes/package.rb | 4 +++- recipes/xdebug.rb | 1 + 12 files changed, 35 insertions(+), 12 deletions(-) diff --git a/recipes/module_dev.rb b/recipes/module_dev.rb index 31e746c..da6b2a1 100755 --- a/recipes/module_dev.rb +++ b/recipes/module_dev.rb @@ -19,7 +19,9 @@ include_recipe "chef-php-extra" -if node['php']['ius'] == "5.5" +if node['php']['ius'] == "5.6" + packages = %s{ php56u-devel } +elsif node['php']['ius'] == "5.5" packages = %w{ php55u-devel } elsif node['php']['ius'] == "5.4" packages = %w{ php54-devel } diff --git a/recipes/module_gd.rb b/recipes/module_gd.rb index 2be768a..82f445f 100644 --- a/recipes/module_gd.rb +++ b/recipes/module_gd.rb @@ -19,7 +19,9 @@ include_recipe "chef-php-extra" -if node['php']['ius'] == "5.5" +if node['php']['ius'] == "5.6" + packages = %w{ php56u-gd } +elsif node['php']['ius'] == "5.5" packages = %w{ php55u-gd } elsif node['php']['ius'] == "5.4" packages = %w{ php54-gd } diff --git a/recipes/module_imagick.rb b/recipes/module_imagick.rb index 25eb2f6..677689c 100755 --- a/recipes/module_imagick.rb +++ b/recipes/module_imagick.rb @@ -19,7 +19,9 @@ include_recipe "chef-php-extra" -if node['php']['ius'] == "5.5" +if node['php']['ius'] == "5.6" + packages = %w{ php56u-pecl-imagick } +elsif node['php']['ius'] == "5.5" packages = %w{ php55u-pecl-imagick } elsif node['php']['ius'] == "5.4" packages = %w{ php54-pecl-imagick } diff --git a/recipes/module_intl.rb b/recipes/module_intl.rb index d7e054f..68b389b 100755 --- a/recipes/module_intl.rb +++ b/recipes/module_intl.rb @@ -19,7 +19,9 @@ include_recipe "chef-php-extra" -if node['php']['ius'] == "5.5" +if node['php']['ius'] == "5.6" + packages = %w{ php56u-intl } +elsif node['php']['ius'] == "5.5" packages = %w{ php55u-intl } elsif node['php']['ius'] == "5.4" packages = %w{ php54-intl } diff --git a/recipes/module_mbstring.rb b/recipes/module_mbstring.rb index df1f2ea..15aa3ec 100755 --- a/recipes/module_mbstring.rb +++ b/recipes/module_mbstring.rb @@ -19,7 +19,9 @@ include_recipe "chef-php-extra" -if node['php']['ius'] == "5.5" +if node['php']['ius'] == "5.6" + packages = %w{ php56u-mbstring } +elsif node['php']['ius'] == "5.5" packages = %w{ php55u-mbstring } elsif node['php']['ius'] == "5.4" packages = %w{ php54-mbstring } diff --git a/recipes/module_mcrypt.rb b/recipes/module_mcrypt.rb index 4a308ce..36e5474 100755 --- a/recipes/module_mcrypt.rb +++ b/recipes/module_mcrypt.rb @@ -21,7 +21,9 @@ include_recipe "chef-php-extra" -if node['php']['ius'] == "5.5" +if node['php']['ius'] == "5.6" + packages = %w{ php56u-mcrypt } +elsif node['php']['ius'] == "5.5" packages = %w{ php55u-mcrypt } elsif node['php']['ius'] == "5.4" packages = %w{ php54-mcrypt } @@ -46,7 +48,7 @@ end end -if node['php']['ius'] != "5.5" +if not ["5.5", "5.6"].include?(node['php']['ius']) template "#{node['php']['ext_conf_dir']}/mcrypt.ini" do mode "0644" end diff --git a/recipes/module_memcache.rb b/recipes/module_memcache.rb index 47b6e96..1671f02 100644 --- a/recipes/module_memcache.rb +++ b/recipes/module_memcache.rb @@ -19,7 +19,9 @@ include_recipe "chef-php-extra" -if node['php']['ius'] == "5.5" +if node['php']['ius'] == "5.6" + packages = %w{ php56u-pecl-memcache } +elsif node['php']['ius'] == "5.5" packages = %w{ php55u-pecl-memcache } elsif node['php']['ius'] == "5.4" packages = %w{ php54-pecl-memcache } diff --git a/recipes/module_mysql.rb b/recipes/module_mysql.rb index 4564800..bf49bd8 100644 --- a/recipes/module_mysql.rb +++ b/recipes/module_mysql.rb @@ -19,7 +19,9 @@ include_recipe "chef-php-extra" -if node['php']['ius'] == "5.5" +if node['php']['ius'] == "5.6" + packages = %w{ php56u-mysqlnd } +elsif node['php']['ius'] == "5.5" packages = %w{ php55u-mysqlnd } elsif node['php']['ius'] == "5.4" packages = %w{ php54-mysql } diff --git a/recipes/module_soap.rb b/recipes/module_soap.rb index 701ef17..0a33933 100755 --- a/recipes/module_soap.rb +++ b/recipes/module_soap.rb @@ -19,7 +19,9 @@ include_recipe "chef-php-extra" -if node['php']['ius'] == "5.5" +if node['php']['ius'] == "5.6" + packages = %w{ php56u-soap } +elsif node['php']['ius'] == "5.5" packages = %w{ php55u-soap } elsif node['php']['ius'] == "5.4" packages = %w{ php54-soap } diff --git a/recipes/module_xml.rb b/recipes/module_xml.rb index bc4e12c..8fbe1f1 100755 --- a/recipes/module_xml.rb +++ b/recipes/module_xml.rb @@ -19,7 +19,9 @@ include_recipe "chef-php-extra" -if node['php']['ius'] == "5.5" +if node['php']['ius'] == "5.6" + packages = %w{ php56u-xml } +elsif node['php']['ius'] == "5.5" packages = %w{ php55u-xml } elsif node['php']['ius'] == "5.4" packages = %w{ php54-xml } diff --git a/recipes/package.rb b/recipes/package.rb index 6245a8a..0e8882b 100644 --- a/recipes/package.rb +++ b/recipes/package.rb @@ -2,7 +2,9 @@ include_recipe "yum::ius" end -if node['php']['ius'] == "5.5" +if node['php']['ius'] == "5.6" + centos_packages = %w{ php56u php56u-devel php56u-cli php56u-pear } +elsif node['php']['ius'] == "5.5" centos_packages = %w{ php55u php55u-devel php55u-cli php55u-pear } elsif node['php']['ius'] == "5.4" centos_packages = %w{ php54 php54-devel php54-cli php54-pear } diff --git a/recipes/xdebug.rb b/recipes/xdebug.rb index 1ffb1ea..9b70a25 100755 --- a/recipes/xdebug.rb +++ b/recipes/xdebug.rb @@ -20,6 +20,7 @@ use_pear = false case node['php']['ius'] + when '5.6' then package 'php56u-xdebug' when '5.5' then package 'php55u-xdebug' when '5.4' then use_pear = true when '5.3' then use_pear = true From 0ed4d2ba39f13d252b2db8dec24ef0abcd00c81b Mon Sep 17 00:00:00 2001 From: James Halsall Date: Fri, 29 Jul 2016 12:39:21 +0100 Subject: [PATCH 4/4] Fix array write in module_dev.rb --- recipes/module_dev.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/module_dev.rb b/recipes/module_dev.rb index da6b2a1..95d2750 100755 --- a/recipes/module_dev.rb +++ b/recipes/module_dev.rb @@ -20,7 +20,7 @@ include_recipe "chef-php-extra" if node['php']['ius'] == "5.6" - packages = %s{ php56u-devel } + packages = %w{ php56u-devel } elsif node['php']['ius'] == "5.5" packages = %w{ php55u-devel } elsif node['php']['ius'] == "5.4"