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

Commit 476a6b4

Browse files
committed
Merge pull request #56 from sambauers/master
Update PHP versions, use Hiera for configs, allow configure params on PHP builds, add PThreads extension, update tests.
2 parents 6639ee1 + 584d6f2 commit 476a6b4

File tree

93 files changed

+825
-199
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+825
-199
lines changed

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
source "https://rubygems.org"
22

3-
gem "cardboard", "~> 1.0"
3+
gem "cardboard", "~> 2.1"

Gemfile.lock

Lines changed: 58 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,80 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
addressable (2.3.5)
4+
CFPropertyList (2.2.8)
5+
addressable (2.3.6)
56
ansi (1.4.3)
6-
boxen (1.5.2)
7+
boxen (2.7.0)
78
ansi (~> 1.4)
89
hiera (~> 1.0)
910
highline (~> 1.6)
1011
json_pure (>= 1.7.7, < 2.0)
11-
librarian-puppet (~> 0.9.9)
12-
octokit (~> 1.15)
13-
puppet (~> 3.0)
14-
cardboard (1.0.4)
15-
boxen (~> 1.0)
12+
librarian-puppet (~> 1.0.0)
13+
octokit (~> 2.7, >= 2.7.1)
14+
puppet (~> 3.7)
15+
cardboard (2.1.0)
16+
boxen (~> 2.1)
1617
puppet-lint (~> 0.3)
1718
puppetlabs_spec_helper (~> 0.4)
18-
rspec-puppet (~> 0.1)
19-
diff-lcs (1.2.4)
20-
facter (1.7.2)
21-
faraday (0.8.8)
22-
multipart-post (~> 1.2.0)
23-
faraday_middleware (0.9.0)
24-
faraday (>= 0.7.4, < 0.9)
25-
hashie (2.0.5)
26-
hiera (1.2.1)
19+
rspec-puppet (~> 1.0)
20+
diff-lcs (1.2.5)
21+
facter (2.3.0)
22+
CFPropertyList (~> 2.2.6)
23+
faraday (0.9.0)
24+
multipart-post (>= 1.2, < 3)
25+
hiera (1.3.4)
2726
json_pure
28-
highline (1.6.19)
29-
json (1.8.0)
30-
json_pure (1.8.0)
31-
librarian-puppet (0.9.10)
32-
json
27+
highline (1.6.21)
28+
json (1.8.1)
29+
json_pure (1.8.1)
30+
librarian (0.1.2)
31+
highline
3332
thor (~> 0.15)
34-
metaclass (0.0.1)
35-
mocha (0.14.0)
33+
librarian-puppet (1.0.9)
34+
json
35+
librarian (>= 0.1.2)
36+
metaclass (0.0.4)
37+
mocha (1.1.0)
3638
metaclass (~> 0.0.1)
37-
multi_json (1.7.9)
38-
multipart-post (1.2.0)
39-
netrc (0.7.7)
40-
octokit (1.25.0)
41-
addressable (~> 2.2)
42-
faraday (~> 0.8)
43-
faraday_middleware (~> 0.9)
44-
hashie (~> 2.0)
45-
multi_json (~> 1.3)
46-
netrc (~> 0.7.7)
47-
puppet (3.2.4)
48-
facter (~> 1.6)
39+
multipart-post (2.0.0)
40+
octokit (2.7.2)
41+
sawyer (~> 0.5.2)
42+
puppet (3.7.3)
43+
facter (> 1.6, < 3)
4944
hiera (~> 1.0)
50-
rgen (~> 0.6.5)
45+
json_pure
5146
puppet-lint (0.3.2)
52-
puppetlabs_spec_helper (0.4.1)
53-
mocha (>= 0.10.5)
47+
puppet-syntax (1.3.0)
5448
rake
55-
rspec (>= 2.9.0)
56-
rspec-puppet (>= 0.1.1)
57-
rake (10.1.0)
58-
rgen (0.6.5)
59-
rspec (2.14.1)
60-
rspec-core (~> 2.14.0)
61-
rspec-expectations (~> 2.14.0)
62-
rspec-mocks (~> 2.14.0)
63-
rspec-core (2.14.5)
64-
rspec-expectations (2.14.2)
65-
diff-lcs (>= 1.1.3, < 2.0)
66-
rspec-mocks (2.14.3)
67-
rspec-puppet (0.1.6)
49+
puppetlabs_spec_helper (0.8.2)
50+
mocha
51+
puppet-lint
52+
puppet-syntax
53+
rake
54+
rspec
55+
rspec-puppet
56+
rake (10.3.2)
57+
rspec (3.1.0)
58+
rspec-core (~> 3.1.0)
59+
rspec-expectations (~> 3.1.0)
60+
rspec-mocks (~> 3.1.0)
61+
rspec-core (3.1.7)
62+
rspec-support (~> 3.1.0)
63+
rspec-expectations (3.1.2)
64+
diff-lcs (>= 1.2.0, < 2.0)
65+
rspec-support (~> 3.1.0)
66+
rspec-mocks (3.1.3)
67+
rspec-support (~> 3.1.0)
68+
rspec-puppet (1.0.1)
6869
rspec
69-
thor (0.18.1)
70+
rspec-support (3.1.2)
71+
sawyer (0.5.5)
72+
addressable (~> 2.3.5)
73+
faraday (~> 0.8, < 0.10)
74+
thor (0.19.1)
7075

7176
PLATFORMS
7277
ruby
7378

7479
DEPENDENCIES
75-
cardboard (~> 1.0)
80+
cardboard (~> 2.1)

data/common.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
php::config::root: "%{::boxen::config::home}/phpenv"
3+
php::config::logdir: "%{::boxen::config::logdir}/php"
4+
php::config::configdir: "%{::boxen::config::configdir}/php"
5+
php::config::datadir: "%{::boxen::config::datadir}/php"
6+
php::config::pluginsdir: "%{php::config::root}/plugins"
7+
php::config::cachedir: "%{php::config::datadir}/cache"
8+
php::config::extensioncachedir: "%{php::config::datadir}/cache/extensions"
9+
php::config::configure_params: {}
10+
php::config::composer:
11+
version: '1.0.0-alpha9'
12+
checksum: '05df355b5277c8c9012470e699fa5494'
13+
php::config::phpenv:
14+
revision: '6499bb6c7b645af3f4e67f7e17708d5ee208453f'

data/hiera.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
:hierarchy:
3+
- common

lib/puppet/provider/php_version/php_source.rb

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,6 @@ def get_configure_args(version, install_path, config_path)
253253
"--with-zlib=#{@resource[:homebrew_path]}/opt/zlibphp",
254254
"--with-snmp=/usr",
255255
"--with-libedit",
256-
"--with-libevent-dir=#{@resource[:homebrew_path]}/opt/libevent",
257256
"--with-mhash",
258257
"--with-curl",
259258
"--with-openssl=/usr",
@@ -267,7 +266,17 @@ def get_configure_args(version, install_path, config_path)
267266
]
268267

269268
# PHP-FPM isn't available until 5.3.3
270-
args << "--enable-fpm" unless @resource[:version].match(/\A5\.3\.[12]\z/)
269+
if Gem::Version.new(@resource[:version]) > Gem::Version.new('5.3.2')
270+
args << "--enable-fpm"
271+
end
272+
273+
# libevent was removed in 5.3.8
274+
if Gem::Version.new(@resource[:version]) < Gem::Version.new('5.3.8')
275+
args << "--with-libevent-dir=#{@resource[:homebrew_path]}/opt/libevent"
276+
end
277+
278+
# User specified configure params
279+
args << @resource[:configure_params]
271280

272281
args
273282
end

lib/puppet/type/php_version.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,8 @@
3434

3535
newparam(:user_home) do
3636
end
37+
38+
newparam(:configure_params) do
39+
defaultto ''
40+
end
3741
end

manifests/5_4_35.pp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Installs php 5.4.35
2+
#
3+
# Usage:
4+
#
5+
# include php::5_4_35
6+
#
7+
class php::5_4_35 {
8+
php::version { '5.4.35': }
9+
}

manifests/5_4_36.pp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Installs php 5.4.36
2+
#
3+
# Usage:
4+
#
5+
# include php::5_4_36
6+
#
7+
class php::5_4_36 {
8+
php::version { '5.4.36': }
9+
}

manifests/5_5.pp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@
22
#
33
# Usage:
44
#
5-
# include php::5-5
5+
# include php::5_5
6+
#
67
class php::5_5 {
78
require php
89
require php::5_5_0
910

1011
file { "${php::config::root}/versions/5.5":
1112
ensure => symlink,
1213
force => true,
13-
target => "${php::root}/versions/5.5.0"
14+
target => "${php::config::root}/versions/5.5.0"
1415
}
1516
}

manifests/5_5_18.pp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Installs php 5.5.18
2+
#
3+
# Usage:
4+
#
5+
# include php::5_5_18
6+
class php::5_5_18 {
7+
php::version { '5.5.18': }
8+
}

0 commit comments

Comments
 (0)