Update cookbooks for Ubuntu 16.04 TLS

This commit is contained in:
Greg Karékinian
2017-03-31 19:20:00 +02:00
parent 6430d71006
commit 8923d0d7ef
219 changed files with 2770 additions and 11511 deletions

View File

@@ -1,10 +1,10 @@
#
# Author:: Joshua Timberman (<joshua@getchef.com>)
# Author:: Seth Chisamore (<schisamo@getchef.com>)
# Cookbook Name:: php
# Author:: Joshua Timberman (<joshua@chef.io>)
# Author:: Seth Chisamore (<schisamo@chef.io>)
# Cookbook:: php
# Recipe:: default
#
# Copyright 2009-2014, Chef Software, Inc.
# Copyright:: 2009-2016, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.

View File

@@ -1,9 +1,9 @@
#
# Author:: Christo De Lange (<opscode@dldinternet.com>)
# Cookbook Name:: php
# Cookbook:: php
# Recipe:: ini
#
# Copyright 2011-2014, Chef Software, Inc.
# Copyright:: 2011-2016, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -26,5 +26,5 @@ template "#{node['php']['conf_dir']}/php.ini" do
group node['root_group']
mode '0644'
end
variables(:directives => node['php']['directives'])
variables(directives: node['php']['directives'])
end

View File

@@ -1,10 +1,10 @@
#
# Author:: Joshua Timberman (<joshua@getchef.com>)
# Author:: Seth Chisamore (<schisamo@getchef.com>)
# Cookbook Name:: php
# Author:: Joshua Timberman (<joshua@chef.io>)
# Author:: Seth Chisamore (<schisamo@chef.io>)
# Cookbook:: php
# Recipe:: module_apc
#
# Copyright 2009-2014, Chef Software, Inc.
# Copyright:: 2009-2016, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -21,17 +21,12 @@
case node['platform_family']
when 'rhel', 'fedora'
%w(httpd-devel pcre pcre-devel).each do |pkg|
package pkg do
action :install
end
end
package %w(httpd-devel pcre pcre-devel)
php_pear 'APC' do
action :install
directives(:shm_size => '128M', :enable_cli => 0)
directives(shm_size: '128M', enable_cli: 0)
end
when 'debian'
package 'php-apc' do
action :install
end
package node['php']['apc']['package']
end

View File

@@ -0,0 +1,32 @@
#
# Author:: Joshua Timberman (<joshua@chef.io>)
# Author:: Seth Chisamore (<schisamo@chef.io>)
# Cookbook:: php
# Recipe:: module_apc
#
# Copyright:: 2009-2016, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
case node['platform_family']
when 'rhel', 'fedora'
package %w(httpd-devel pcre pcre-devel)
php_pear 'APCu' do
action :install
directives(shm_size: '128M', enable_cli: 0)
end
when 'debian'
package node['php']['apcu']['package']
end

View File

@@ -1,10 +1,10 @@
#
# Author:: Joshua Timberman (<joshua@getchef.com>)
# Author:: Seth Chisamore (<schisamo@getchef.com>)
# Cookbook Name:: php
# Author:: Joshua Timberman (<joshua@chef.io>)
# Author:: Seth Chisamore (<schisamo@chef.io>)
# Cookbook:: php
# Recipe:: module_curl
#
# Copyright 2009-2014, Chef Software, Inc.
# Copyright:: 2009-2016, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -19,11 +19,7 @@
# limitations under the License.
#
case node['platform_family']
when 'rhel', 'fedora'
# centos php compiled with curl
when 'debian'
package 'php5-curl' do
action :upgrade
end
package node['php']['curl']['package'] do
action :install
only_if { platform_family?('debian') } # centos php compiled with curl
end

View File

@@ -1,10 +1,10 @@
#
# Author:: Joshua Timberman (<joshua@getchef.com>)
# Author:: Seth Chisamore (<schisamo@getchef.com>)
# Cookbook Name:: php
# Author:: Joshua Timberman (<joshua@chef.io>)
# Author:: Seth Chisamore (<schisamo@chef.io>)
# Cookbook:: php
# Recipe:: module_fpdf
#
# Copyright 2009-2014, Chef Software, Inc.
# Copyright:: 2009-2016, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.

View File

@@ -1,10 +1,10 @@
#
# Author:: Joshua Timberman (<joshua@getchef.com>)
# Author:: Seth Chisamore (<schisamo@getchef.com>)
# Cookbook Name:: php
# Author:: Joshua Timberman (<joshua@chef.io>)
# Author:: Seth Chisamore (<schisamo@chef.io>)
# Cookbook:: php
# Recipe:: module_gd
#
# Copyright 2009-2014, Chef Software, Inc.
# Copyright:: 2009-2016, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -22,12 +22,12 @@
pkg = value_for_platform(
%w(centos redhat scientific fedora amazon oracle) => {
el5_range => 'php53-gd',
'default' => 'php-gd'
'default' => 'php-gd',
},
'freebsd' => {
'default' => 'php56-gd'
'default' => 'php56-gd',
},
'default' => 'php5-gd'
'default' => node['php']['gd']['package']
)
package pkg do

View File

@@ -0,0 +1,29 @@
#
# Author:: Artur Melo (<artur.melo@beubi.com>)
# Cookbook:: php
# Recipe:: module_imap
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
pkg = value_for_platform(
%w(centos redhat scientific fedora amazon oracle) => {
el5_range => 'php53-imap',
'default' => 'php-imap',
},
'default' => 'php5-imap'
)
package pkg do
action :install
end

View File

@@ -1,10 +1,10 @@
#
# Author:: Joshua Timberman (<joshua@getchef.com>)
# Author:: Seth Chisamore (<schisamo@getchef.com>)
# Cookbook Name:: php
# Author:: Joshua Timberman (<joshua@chef.io>)
# Author:: Seth Chisamore (<schisamo@chef.io>)
# Cookbook:: php
# Recipe:: module_ldap
#
# Copyright 2009-2014, Chef Software, Inc.
# Copyright:: 2009-2016, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -22,9 +22,9 @@
pkg = value_for_platform(
%w(centos redhat scientific fedora amazon oracle) => {
el5_range => 'php53-ldap',
'default' => 'php-ldap'
'default' => 'php-ldap',
},
'default' => 'php5-ldap'
'default' => node['php']['ldap']['package']
)
package pkg do

View File

@@ -1,10 +1,10 @@
#
# Author:: Joshua Timberman (<joshua@getchef.com>)
# Author:: Seth Chisamore (<schisamo@getchef.com>)
# Cookbook Name:: php
# Author:: Joshua Timberman (<joshua@chef.io>)
# Author:: Seth Chisamore (<schisamo@chef.io>)
# Cookbook:: php
# Recipe:: module_memcache
#
# Copyright 2009-2014, Chef Software, Inc.
# Copyright:: 2009-2016, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -21,17 +21,11 @@
case node['platform_family']
when 'rhel', 'fedora'
%w(zlib-devel).each do |pkg|
package pkg do
action :install
end
end
package 'zlib-devel'
php_pear 'memcache' do
action :install
# directives(:shm_size => "128M", :enable_cli => 0)
end
when 'debian'
package 'php5-memcache' do
action :install
end
package 'php5-memcache'
end

View File

@@ -1,10 +1,10 @@
#
# Author:: Joshua Timberman (<joshua@getchef.com>)
# Author:: Seth Chisamore (<schisamo@getchef.com>)
# Cookbook Name:: php
# Author:: Joshua Timberman (<joshua@chef.io>)
# Author:: Seth Chisamore (<schisamo@chef.io>)
# Cookbook:: php
# Recipe:: module_mysql
#
# Copyright 2009-2014, Chef Software, Inc.
# Copyright:: 2009-2016, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.

View File

@@ -1,10 +1,10 @@
#
# Author:: Joshua Timberman (<joshua@getchef.com>)
# Author:: Seth Chisamore (<schisamo@getchef.com>)
# Cookbook Name:: php
# Author:: Joshua Timberman (<joshua@chef.io>)
# Author:: Seth Chisamore (<schisamo@chef.io>)
# Cookbook:: php
# Recipe:: module_pgsql
#
# Copyright 2009-2014, Chef Software, Inc.
# Copyright:: 2009-2016, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -22,9 +22,9 @@
pkg = value_for_platform(
%w(centos redhat scientific fedora amazon oracle) => {
el5_range => 'php53-pgsql',
'default' => 'php-pgsql'
'default' => 'php-pgsql',
},
'default' => 'php5-pgsql'
'default' => node['php']['pgsql']['package']
)
package pkg do

View File

@@ -1,10 +1,10 @@
#
# Author:: Joshua Timberman (<joshua@getchef.com>)
# Author:: Seth Chisamore (<schisamo@getchef.com>)
# Cookbook Name:: php
# Author:: Joshua Timberman (<joshua@chef.io>)
# Author:: Seth Chisamore (<schisamo@chef.io>)
# Cookbook:: php
# Recipe:: module_sqlite3
#
# Copyright 2009-2014, Chef Software, Inc.
# Copyright:: 2009-2016, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -19,11 +19,7 @@
# limitations under the License.
#
case node['platform_family']
when 'rhel', 'fedora'
# already there in centos, --with-pdo-sqlite=shared
when 'debian'
package 'php5-sqlite' do
action :install
end
package node['php']['sqlite']['package'] do
action :install
only_if { platform_family?('debian') } # already there in centos, --with-pdo-sqlite=shared
end

View File

@@ -1,10 +1,10 @@
#
# Author:: Seth Chisamore (<schisamo@getchef.com>)
# Author:: Lucas Hansen (<lucash@getchef.com>)
# Cookbook Name:: php
# Author:: Seth Chisamore (<schisamo@chef.io>)
# Author:: Lucas Hansen (<lucash@chef.io>)
# Cookbook:: php
# Recipe:: package
#
# Copyright 2013-2014, Chef Software, Inc.
# Copyright:: 2013-2016, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -23,7 +23,7 @@ if platform?('windows')
include_recipe 'iis::mod_cgi'
install_dir = File.expand_path(node['php']['conf_dir']).gsub('/', '\\')
install_dir = File.expand_path(node['php']['conf_dir']).tr('/', '\\')
windows_package node['php']['windows']['msi_name'] do
source node['php']['windows']['msi_source']
installer_type :msi

View File

@@ -1,9 +1,9 @@
#
# Author:: David Kinzer (<dtkinzer@gmail.com>)
# Cookbook Name:: php
# Cookbook:: php
# Recipe:: recompile
#
# Copyright 2014, David Kinzer
# Copyright:: 2014-2016, David Kinzer
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -38,7 +38,7 @@ end
bash 'un-pack php' do
cwd Chef::Config[:file_cache_path]
code "tar -zxf php-#{version}.tar.gz"
creates "#{node['php']['url']}/php-#{version}"
creates "#{Chef::Config[:file_cache_path]}/php-#{version}"
end
bash 're-build php' do
@@ -46,6 +46,6 @@ bash 're-build php' do
code <<-EOF
(make clean)
(#{ext_dir_prefix} ./configure #{configure_options})
(make && make install)
(make -j #{node['cpu']['total']} && make install)
EOF
end

View File

@@ -1,9 +1,9 @@
#
# Author:: Seth Chisamore (<schisamo@getchef.com>)
# Cookbook Name:: php
# Recipe:: package
# Author:: Seth Chisamore (<schisamo@chef.io>)
# Cookbook:: php
# Recipe:: source
#
# Copyright 2011-2014, Chef Software, Inc.
# Copyright:: 2011-2016, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -29,11 +29,7 @@ mysql_client 'default' do
only_if { configure_options =~ /mysql/ }
end
node['php']['src_deps'].each do |pkg|
package pkg do
action :install
end
end
package node['php']['src_deps']
version = node['php']['version']
@@ -41,7 +37,7 @@ remote_file "#{Chef::Config[:file_cache_path]}/php-#{version}.tar.gz" do
source "#{node['php']['url']}/php-#{version}.tar.gz/from/this/mirror"
checksum node['php']['checksum']
mode '0644'
not_if "which #{node['php']['bin']}"
not_if "$(which #{node['php']['bin']}) --version | grep #{version}"
end
if node['php']['ext_dir']
@@ -56,14 +52,21 @@ else
ext_dir_prefix = ''
end
# PHP is unable to find the GMP library in 16.04. The symlink brings the file
# inside of the include libraries.
link '/usr/include/gmp.h' do
to '/usr/include/x86_64-linux-gnu/gmp.h'
only_if { node['platform_family'] == 'debian' && node['platform_version'].to_f >= 14.04 }
end
bash 'build php' do
cwd Chef::Config[:file_cache_path]
code <<-EOF
tar -zxf php-#{version}.tar.gz
(cd php-#{version} && #{ext_dir_prefix} ./configure #{configure_options})
(cd php-#{version} && make && make install)
(cd php-#{version} && make -j #{node['cpu']['total']} && make install)
EOF
not_if "which #{node['php']['bin']}"
not_if "$(which #{node['php']['bin']}) --version | grep #{version}"
end
directory node['php']['conf_dir'] do