Do not vendor cookbooks using Berkshelf anymore

Instead, use the Berkshelf support in knife-solo and the
vagrant-berkshelf plugin on Vagrant
This commit is contained in:
Greg Karékinian
2019-04-11 18:16:28 +02:00
parent 87d7c721b1
commit ba6e4220a1
1436 changed files with 12 additions and 110987 deletions

View File

@@ -1,33 +0,0 @@
#
# Author:: Joshua Timberman (<joshua@chef.io>)
# Author:: Seth Chisamore (<schisamo@chef.io>)
# Cookbook:: php
# Recipe:: default
#
# Copyright:: 2009-2017, 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.
#
include_recipe "php::#{node['php']['install_method']}"
# update the main channels
php_pear_channel 'pear.php.net' do
action :update
end
php_pear_channel 'pecl.php.net' do
action :update
end
include_recipe 'php::ini'

View File

@@ -1,29 +0,0 @@
#
# Author:: Christo De Lange (<opscode@dldinternet.com>)
# Cookbook:: php
# Recipe:: ini
#
# Copyright:: 2011-2017, 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.
#
template "#{node['php']['conf_dir']}/php.ini" do
source node['php']['ini']['template']
cookbook node['php']['ini']['cookbook']
owner 'root'
group node['root_group']
mode '0644'
manage_symlink_source true
variables(directives: node['php']['directives'])
end

View File

@@ -1,32 +0,0 @@
#
# Author:: Joshua Timberman (<joshua@chef.io>)
# Author:: Seth Chisamore (<schisamo@chef.io>)
# Cookbook:: php
# Recipe:: module_apc
#
# Copyright:: 2009-2017, 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', 'amazon'
package %w(httpd-devel pcre pcre-devel)
php_pear 'APC' do
action :install
directives(shm_size: '128M', enable_cli: 0)
end
when 'debian'
package node['php']['apc']['package']
end

View File

@@ -1,32 +0,0 @@
#
# Author:: Joshua Timberman (<joshua@chef.io>)
# Author:: Seth Chisamore (<schisamo@chef.io>)
# Cookbook:: php
# Recipe:: module_apc
#
# Copyright:: 2009-2017, 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', 'amazon'
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,25 +0,0 @@
#
# Author:: Joshua Timberman (<joshua@chef.io>)
# Author:: Seth Chisamore (<schisamo@chef.io>)
# Cookbook:: php
# Recipe:: module_curl
#
# Copyright:: 2009-2017, 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.
#
package node['php']['curl']['package'] do
action :install
only_if { platform_family?('debian') } # centos php compiled with curl
end

View File

@@ -1,35 +0,0 @@
#
# Author:: Joshua Timberman (<joshua@chef.io>)
# Author:: Seth Chisamore (<schisamo@chef.io>)
# Cookbook:: php
# Recipe:: module_fpdf
#
# Copyright:: 2009-2017, 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', 'amazon'
pearhub_chan = php_pear_channel 'pearhub.org' do
action :discover
end
php_pear 'FPDF' do
channel pearhub_chan.channel_name
action :install
end
when 'debian'
package 'php-fpdf' do
action :install
end
end

View File

@@ -1,34 +0,0 @@
#
# Author:: Joshua Timberman (<joshua@chef.io>)
# Author:: Seth Chisamore (<schisamo@chef.io>)
# Cookbook:: php
# Recipe:: module_gd
#
# Copyright:: 2009-2017, 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.
#
pkg = value_for_platform(
%w(centos redhat scientific fedora amazon oracle) => {
'default' => 'php-gd',
},
'freebsd' => {
'default' => 'php56-gd',
},
'default' => node['php']['gd']['package']
)
package pkg do
action :install
end

View File

@@ -1,28 +0,0 @@
#
# 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) => {
'default' => 'php-imap',
},
'default' => 'php5-imap'
)
package pkg do
action :install
end

View File

@@ -1,31 +0,0 @@
#
# Author:: Joshua Timberman (<joshua@chef.io>)
# Author:: Seth Chisamore (<schisamo@chef.io>)
# Cookbook:: php
# Recipe:: module_ldap
#
# Copyright:: 2009-2017, 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.
#
pkg = value_for_platform(
%w(centos redhat scientific fedora amazon oracle) => {
'default' => 'php-ldap',
},
'default' => node['php']['ldap']['package']
)
package pkg do
action :install
end

View File

@@ -1,31 +0,0 @@
#
# Author:: Joshua Timberman (<joshua@chef.io>)
# Author:: Seth Chisamore (<schisamo@chef.io>)
# Cookbook:: php
# Recipe:: module_memcache
#
# Copyright:: 2009-2017, 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', 'amazon'
package 'zlib-devel'
php_pear 'memcache' do
action :install
end
when 'debian'
package 'php5-memcache'
end

View File

@@ -1,24 +0,0 @@
#
# Author:: Joshua Timberman (<joshua@chef.io>)
# Author:: Seth Chisamore (<schisamo@chef.io>)
# Cookbook:: php
# Recipe:: module_mysql
#
# Copyright:: 2009-2017, 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.
#
package node['php']['mysql']['package'] do
action :install
end

View File

@@ -1,31 +0,0 @@
#
# Author:: Joshua Timberman (<joshua@chef.io>)
# Author:: Seth Chisamore (<schisamo@chef.io>)
# Cookbook:: php
# Recipe:: module_pgsql
#
# Copyright:: 2009-2017, 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.
#
pkg = value_for_platform(
%w(centos redhat scientific fedora amazon oracle) => {
'default' => 'php-pgsql',
},
'default' => node['php']['pgsql']['package']
)
package pkg do
action :install
end

View File

@@ -1,25 +0,0 @@
#
# Author:: Joshua Timberman (<joshua@chef.io>)
# Author:: Seth Chisamore (<schisamo@chef.io>)
# Cookbook:: php
# Recipe:: module_sqlite3
#
# Copyright:: 2009-2017, 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.
#
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,34 +0,0 @@
#
# Author:: Seth Chisamore (<schisamo@chef.io>)
# Author:: Lucas Hansen (<lucash@chef.io>)
# Cookbook:: php
# Recipe:: package
#
# Copyright:: 2013-2017, 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.
#
if platform_family?('rhel', 'debian', 'amazon', 'suse')
package node['php']['packages'] do
options node['php']['package_options']
end
else
node['php']['packages'].each do |pkg|
package pkg do
options node['php']['package_options']
end
end
end
include_recipe 'php::ini'

View File

@@ -1,51 +0,0 @@
#
# Author:: David Kinzer (<dtkinzer@gmail.com>)
# Cookbook:: php
# Recipe:: recompile
#
# Copyright:: 2014-2017, David Kinzer
#
# 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.
#
version = node['php']['version']
configure_options = node['php']['configure_options'].join(' ')
ext_dir_prefix = node['php']['ext_dir'] ? "EXTENSION_DIR=#{node['php']['ext_dir']}" : ''
node['php']['src_deps'].each do |pkg|
package pkg do
action 'install'
end
end
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'
action 'create_if_missing'
end
bash 'un-pack php' do
cwd Chef::Config[:file_cache_path]
code "tar -zxf php-#{version}.tar.gz"
creates "#{Chef::Config[:file_cache_path]}/php-#{version}"
end
bash 're-build php' do
cwd "#{Chef::Config[:file_cache_path]}/php-#{version}"
code <<-EOF
(make clean)
(#{ext_dir_prefix} ./configure #{configure_options})
(make -j #{node['cpu']['total']} && make install)
EOF
end

View File

@@ -1,86 +0,0 @@
#
# Author:: Seth Chisamore (<schisamo@chef.io>)
# Cookbook:: php
# Recipe:: source
#
# Copyright:: 2011-2017, 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.
#
configure_options = node['php']['configure_options'].join(' ')
include_recipe 'build-essential'
include_recipe 'xml'
include_recipe 'yum-epel' if node['platform_family'] == 'rhel'
mysql_client 'default' do
action :create
only_if { configure_options =~ /mysql/ }
end
package node['php']['src_deps']
version = node['php']['version']
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']}) --version | grep #{version}"
end
if node['php']['ext_dir']
directory node['php']['ext_dir'] do
owner 'root'
group 'root'
mode '0755'
recursive true
end
ext_dir_prefix = "EXTENSION_DIR=#{node['php']['ext_dir']}"
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 -j #{node['cpu']['total']} && make install)
EOF
not_if "$(which #{node['php']['bin']}) --version | grep #{version}"
end
directory node['php']['conf_dir'] do
owner 'root'
group 'root'
mode '0755'
recursive true
end
directory node['php']['ext_conf_dir'] do
owner 'root'
group 'root'
mode '0755'
recursive true
end
include_recipe 'php::ini'