This repository has been archived by the owner on Dec 2, 2020. It is now read-only.
forked from mattheath/puppet-php
-
Notifications
You must be signed in to change notification settings - Fork 29
Add runkit #64
Open
alexmace
wants to merge
10
commits into
boxen:master
Choose a base branch
from
namesco:add-runkit
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add runkit #64
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
e16b408
Added the runkit extension
alexmace a9bc444
Updated to turn in from mailparse to runkit
alexmace a903ff9
Updated based on the couchbase extension, which comes from github too
alexmace ff38eaf
Fixed a typo
alexmace d10aaa1
Switched to a Namesco fork, so I could apply a recent tag
alexmace 65be642
It seems that runkit should not be installed as a zend extension
alexmace 30a8d80
Runkit specific ini file so that internal_override can be enabled
alexmace 5b02ed1
Updates based on what other extensions are doing, and fixing a lart e…
alexmace 0876dc4
A spec file added for the runkit extension
alexmace eeb73b0
Updated the comment to remove the reference to v1 syntax
alexmace File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# Installs a php extension for a specific version of php. | ||
# | ||
# Usage: | ||
# | ||
# php::extension::runkit { 'runkit for 5.4.10': | ||
# php => '5.4.10', | ||
# version => '1.0.3' | ||
# } | ||
# | ||
define php::extension::runkit( | ||
$php, | ||
$version = '1.0.3' | ||
) { | ||
include boxen::config | ||
|
||
require php::config | ||
|
||
# Ensure that the specified version of PHP is installed. | ||
php_require($php) | ||
|
||
$extension = 'runkit' | ||
|
||
# Final module install path | ||
$module_path = "${php::config::root}/versions/${php}/modules/${extension}.so" | ||
|
||
# Clone the source respository | ||
repository { "${php::config::extensioncachedir}/runkit": | ||
source => 'namesco/runkit' | ||
} | ||
|
||
|
||
# Additional options | ||
$configure_params = '' | ||
|
||
php_extension { $name: | ||
provider => 'git', | ||
|
||
extension => $extension, | ||
version => $version, | ||
|
||
homebrew_path => $boxen::config::homebrewdir, | ||
phpenv_root => $php::config::root, | ||
php_version => $php, | ||
|
||
cache_dir => $php::config::extensioncachedir, | ||
require => Repository["${php::config::extensioncachedir}/runkit"], | ||
|
||
configure_params => $configure_params, | ||
} | ||
|
||
# Add config file once extension is installed | ||
|
||
file { "${php::config::configdir}/${php}/conf.d/${extension}.ini": | ||
content => template('php/extensions/runkit.ini.erb'), | ||
require => Php_extension[$name], | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
require 'spec_helper' | ||
|
||
describe "php::extension::runkit" do | ||
let(:facts) { default_test_facts } | ||
let(:title) { "runkit for 5.4.17" } | ||
let(:params) do | ||
{ | ||
:php => "5.4.17", | ||
:version => "1.0.3" | ||
} | ||
end | ||
|
||
it do | ||
should contain_class("php::config") | ||
should contain_php__version("5.4.17") | ||
|
||
should contain_repository("/test/boxen/data/php/cache/extensions/runkit").with({ | ||
:source => "namesco/runkit" | ||
}) | ||
|
||
should contain_php_extension("runkit for 5.4.17").with({ | ||
:provider => "git", | ||
:extension => "runkit", | ||
:version => "1.0.3", | ||
:homebrew_path => "/test/boxen/homebrew", | ||
:phpenv_root => "/test/boxen/phpenv", | ||
:php_version => "5.4.17", | ||
:cache_dir => "/test/boxen/data/php/cache/extensions", | ||
:require => "Repository[/test/boxen/data/php/cache/extensions/runkit]", | ||
}) | ||
|
||
should contain_file("/test/boxen/config/php/5.4.17/conf.d/runkit.ini").with({ | ||
:content => File.read("spec/fixtures/runkit.ini"), | ||
:require => "Php_extension[runkit for 5.4.17]" | ||
}) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
extension=/test/boxen/phpenv/versions/5.4.17/modules/runkit.so | ||
|
||
runkit.internal_override=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
extension=<%= @module_path %> | ||
|
||
runkit.internal_override=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
zend_extension=<%= @module_path %> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not a fan of using non-canonical source. Can you get the upstream tagged by the original author?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "canonical" source for runkit is... complicated.
The PECL extension hasn't had a release for 8 years: https://pecl.php.net/package/runkit
Even compiling from source for PECL isn't compatible with PHP 5.3+: http://git.php.net/?p=pecl/php/runkit.git;a=summary
There is a fork on GitHub which works up to PHP 5.5: https://github.com/zenovich/runkit
There is then another fork of that works on PHP 5.6: https://github.com/padraic/runkit
Basically it's a mess, I can request any of these upstreams to create a tag, but none are the canonical source.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think even getting those to make a tag would be better than forking and tagging your own. I don't know. It makes me wonder if this is really appropriate for inclusion in the first place if it is that poorly supported.