Skip to content
This repository has been archived by the owner on Dec 2, 2020. It is now read-only.

Commit

Permalink
Merge pull request #31 from boxen/5.5.0
Browse files Browse the repository at this point in the history
Add PHP 5.5.0 --> 5.5.10
  • Loading branch information
mattheath committed Mar 21, 2014
2 parents 4ff53a4 + f8b284a commit e71e385
Show file tree
Hide file tree
Showing 49 changed files with 461 additions and 2 deletions.
18 changes: 18 additions & 0 deletions files/brews/bison26.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
require 'formula'

class Bisonphp26 < Formula
homepage 'http://www.gnu.org/software/bison/'
url 'http://ftpmirror.gnu.org/bison/bison-2.6.5.tar.gz'
mirror 'http://ftp.gnu.org/gnu/bison/bison-2.6.5.tar.gz'
sha1 '2cea0ea4a41dcfc05332613060026de0af1458cc'

version '2.6.5-boxen1'

keg_only :provided_by_osx, 'Some formulae require a newer version of bison.'

def install
system "./configure", "--disable-dependency-tracking",
"--prefix=#{prefix}"
system "make install"
end
end
13 changes: 11 additions & 2 deletions lib/puppet/provider/php_version/php_source.rb
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,17 @@ def configure(version)
args = args.join(" ")

# Right, the hard part - configure for our system
puts "Configuring PHP #{version}: #{args}"
puts %x( cd #{@resource[:phpenv_root]}/php-src/ && export ac_cv_exeext='' && ./configure #{args} )

# Some env variables are needed for configuration
env = "export ac_cv_exeext=''"

# PHP 5.5+ requires a later version of Bison than OSX provides (2.6 vs 2.3)
env << " && export PATH=/opt/boxen/homebrew/opt/bisonphp26/bin:$PATH" unless @resource[:version].match(/\A5\.[34]/)

# Construct and run configure command
configure_command = "cd #{@resource[:phpenv_root]}/php-src/ && #{env} && ./configure #{args}"
puts "Configuring PHP #{version}: #{configure_command}"
puts %x( #{configure_command} )
exit_code = $?

# Ensure Configure exited successfully
Expand Down
15 changes: 15 additions & 0 deletions manifests/5_5.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Installs php 5.5.0 and symlinks it as 5.5
#
# Usage:
#
# include php::5-5
class php::5_5 {
require php
require php::5_5_0

file { "${php::config::root}/versions/5.5":
ensure => symlink,
force => true,
target => "${php::root}/versions/5.5.0"
}
}
8 changes: 8 additions & 0 deletions manifests/5_5_0.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Installs php 5.5.0
#
# Usage:
#
# include php::5_5_0
class php::5_5_0 {
php::version { '5.5.0': }
}
8 changes: 8 additions & 0 deletions manifests/5_5_1.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Installs php 5.5.1
#
# Usage:
#
# include php::5_5_1
class php::5_5_1 {
php::version { '5.5.1': }
}
8 changes: 8 additions & 0 deletions manifests/5_5_10.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Installs php 5.5.10
#
# Usage:
#
# include php::5_5_10
class php::5_5_10 {
php::version { '5.5.10': }
}
8 changes: 8 additions & 0 deletions manifests/5_5_2.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Installs php 5.5.2
#
# Usage:
#
# include php::5_5_2
class php::5_5_2 {
php::version { '5.5.2': }
}
8 changes: 8 additions & 0 deletions manifests/5_5_3.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Installs php 5.5.3
#
# Usage:
#
# include php::5_5_3
class php::5_5_3 {
php::version { '5.5.3': }
}
8 changes: 8 additions & 0 deletions manifests/5_5_4.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Installs php 5.5.4
#
# Usage:
#
# include php::5_5_4
class php::5_5_4 {
php::version { '5.5.4': }
}
8 changes: 8 additions & 0 deletions manifests/5_5_5.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Installs php 5.5.5
#
# Usage:
#
# include php::5_5_5
class php::5_5_5 {
php::version { '5.5.5': }
}
8 changes: 8 additions & 0 deletions manifests/5_5_6.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Installs php 5.5.6
#
# Usage:
#
# include php::5_5_6
class php::5_5_6 {
php::version { '5.5.6': }
}
8 changes: 8 additions & 0 deletions manifests/5_5_7.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Installs php 5.5.7
#
# Usage:
#
# include php::5_5_7
class php::5_5_7 {
php::version { '5.5.7': }
}
8 changes: 8 additions & 0 deletions manifests/5_5_8.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Installs php 5.5.8
#
# Usage:
#
# include php::5_5_8
class php::5_5_8 {
php::version { '5.5.8': }
}
8 changes: 8 additions & 0 deletions manifests/5_5_9.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Installs php 5.5.9
#
# Usage:
#
# include php::5_5_9
class php::5_5_9 {
php::version { '5.5.9': }
}
10 changes: 10 additions & 0 deletions manifests/fpm/5_5_0.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Launches a PHP FPM service running PHP 5.5.0
# Installs PHP 5.5.0 if it doesn't already exist
#
# Usage:
#
# include php::fpm::5_5_0
#
class php::fpm::5_5_0 {
php::fpm { '5.5.0': }
}
10 changes: 10 additions & 0 deletions manifests/fpm/5_5_1.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Launches a PHP FPM service running PHP 5.5.1
# Installs PHP 5.5.1 if it doesn't already exist
#
# Usage:
#
# include php::fpm::5_5_1
#
class php::fpm::5_5_1 {
php::fpm { '5.5.1': }
}
10 changes: 10 additions & 0 deletions manifests/fpm/5_5_10.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Launches a PHP FPM service running PHP 5.5.10
# Installs PHP 5.5.10 if it doesn't already exist
#
# Usage:
#
# include php::fpm::5_5_10
#
class php::fpm::5_5_10 {
php::fpm { '5.5.10': }
}
10 changes: 10 additions & 0 deletions manifests/fpm/5_5_2.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Launches a PHP FPM service running PHP 5.5.2
# Installs PHP 5.5.2 if it doesn't already exist
#
# Usage:
#
# include php::fpm::5_5_2
#
class php::fpm::5_5_2 {
php::fpm { '5.5.2': }
}
10 changes: 10 additions & 0 deletions manifests/fpm/5_5_3.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Launches a PHP FPM service running PHP 5.5.3
# Installs PHP 5.5.3 if it doesn't already exist
#
# Usage:
#
# include php::fpm::5_5_3
#
class php::fpm::5_5_3 {
php::fpm { '5.5.3': }
}
10 changes: 10 additions & 0 deletions manifests/fpm/5_5_4.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Launches a PHP FPM service running PHP 5.5.4
# Installs PHP 5.5.4 if it doesn't already exist
#
# Usage:
#
# include php::fpm::5_5_4
#
class php::fpm::5_5_4 {
php::fpm { '5.5.4': }
}
10 changes: 10 additions & 0 deletions manifests/fpm/5_5_5.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Launches a PHP FPM service running PHP 5.5.5
# Installs PHP 5.5.5 if it doesn't already exist
#
# Usage:
#
# include php::fpm::5_5_5
#
class php::fpm::5_5_5 {
php::fpm { '5.5.5': }
}
10 changes: 10 additions & 0 deletions manifests/fpm/5_5_6.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Launches a PHP FPM service running PHP 5.5.6
# Installs PHP 5.5.6 if it doesn't already exist
#
# Usage:
#
# include php::fpm::5_5_6
#
class php::fpm::5_5_6 {
php::fpm { '5.5.6': }
}
10 changes: 10 additions & 0 deletions manifests/fpm/5_5_7.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Launches a PHP FPM service running PHP 5.5.7
# Installs PHP 5.5.7 if it doesn't already exist
#
# Usage:
#
# include php::fpm::5_5_7
#
class php::fpm::5_5_7 {
php::fpm { '5.5.7': }
}
10 changes: 10 additions & 0 deletions manifests/fpm/5_5_8.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Launches a PHP FPM service running PHP 5.5.8
# Installs PHP 5.5.8 if it doesn't already exist
#
# Usage:
#
# include php::fpm::5_5_8
#
class php::fpm::5_5_8 {
php::fpm { '5.5.8': }
}
10 changes: 10 additions & 0 deletions manifests/fpm/5_5_9.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Launches a PHP FPM service running PHP 5.5.9
# Installs PHP 5.5.9 if it doesn't already exist
#
# Usage:
#
# include php::fpm::5_5_9
#
class php::fpm::5_5_9 {
php::fpm { '5.5.9': }
}
12 changes: 12 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,18 @@
ensure => '2.13-boxen1',
}

# PHP 5.5 drops support for Bison 2.3 which is shipped with OSX
# Therefore need a later version, which we'll again sandbox just for this

homebrew::formula { 'bisonphp26':
source => 'puppet:///modules/php/brews/bison26.rb',
before => Package['boxen/brews/bisonphp26'],
}

package { 'boxen/brews/bisonphp26':
ensure => '2.6.5-boxen1',
}

# Install dupe version of zlib as tapping homebrew dupes appears to have
# broken. I've also tried to build a specific zlib module, but this also
# will not currently install via brew within boxen
Expand Down
9 changes: 9 additions & 0 deletions spec/classes/fpm/php_fpm_5_5_0_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
require 'spec_helper'

describe "php::fpm::5_5_0" do
let(:facts) { default_test_facts }

it do
should contain_php__fpm("5.5.0")
end
end
9 changes: 9 additions & 0 deletions spec/classes/fpm/php_fpm_5_5_10_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
require 'spec_helper'

describe "php::fpm::5_5_10" do
let(:facts) { default_test_facts }

it do
should contain_php__fpm("5.5.10")
end
end
9 changes: 9 additions & 0 deletions spec/classes/fpm/php_fpm_5_5_1_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
require 'spec_helper'

describe "php::fpm::5_5_1" do
let(:facts) { default_test_facts }

it do
should contain_php__fpm("5.5.1")
end
end
9 changes: 9 additions & 0 deletions spec/classes/fpm/php_fpm_5_5_2_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
require 'spec_helper'

describe "php::fpm::5_5_2" do
let(:facts) { default_test_facts }

it do
should contain_php__fpm("5.5.2")
end
end
9 changes: 9 additions & 0 deletions spec/classes/fpm/php_fpm_5_5_3_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
require 'spec_helper'

describe "php::fpm::5_5_3" do
let(:facts) { default_test_facts }

it do
should contain_php__fpm("5.5.3")
end
end
9 changes: 9 additions & 0 deletions spec/classes/fpm/php_fpm_5_5_4_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
require 'spec_helper'

describe "php::fpm::5_5_4" do
let(:facts) { default_test_facts }

it do
should contain_php__fpm("5.5.4")
end
end
9 changes: 9 additions & 0 deletions spec/classes/fpm/php_fpm_5_5_5_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
require 'spec_helper'

describe "php::fpm::5_5_5" do
let(:facts) { default_test_facts }

it do
should contain_php__fpm("5.5.5")
end
end
9 changes: 9 additions & 0 deletions spec/classes/fpm/php_fpm_5_5_6_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
require 'spec_helper'

describe "php::fpm::5_5_6" do
let(:facts) { default_test_facts }

it do
should contain_php__fpm("5.5.6")
end
end
9 changes: 9 additions & 0 deletions spec/classes/fpm/php_fpm_5_5_7_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
require 'spec_helper'

describe "php::fpm::5_5_7" do
let(:facts) { default_test_facts }

it do
should contain_php__fpm("5.5.7")
end
end
9 changes: 9 additions & 0 deletions spec/classes/fpm/php_fpm_5_5_8_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
require 'spec_helper'

describe "php::fpm::5_5_8" do
let(:facts) { default_test_facts }

it do
should contain_php__fpm("5.5.8")
end
end
Loading

0 comments on commit e71e385

Please sign in to comment.