Initial Chef repository

This commit is contained in:
Greg Karékinian
2015-07-21 19:45:23 +02:00
parent 7e5401fc71
commit ee4079fa85
1151 changed files with 185163 additions and 0 deletions

View File

@@ -0,0 +1,73 @@
v1.2.13 (2014-02-18)
--------------------
- Reverting compile_time work
v1.2.12 (2014-02-18)
--------------------
- Fixing last patch to play nicely with Chef Sugar
v1.2.11 (2014-02-18)
--------------------
- Fixing chef_gem for Chef below 12.1.0
v1.2.10 (2014-02-17)
--------------------
- Being explicit about usage of the chef_gem's compile_time property.
- Eliminating future deprecation warnings in Chef 12.1.0.
v1.2.9 (2014-12-10)
-------------------
- Re-release with stove 3.2.2 to get a metadata.rb
v1.2.8 (2014-12-09)
-------------------
- [#11] Fix warning message from build-essential
- [#13] pin nokogiri to a working version
v1.2.6 (2014-06-17)
-------------------
- [COOK-4468] Only set ENV variable when needed
v1.2.4 (2014-03-27)
-------------------
- [COOK-4474] - Bump apt and yum versions in Berksfile, Lock to build-essentials 1.4
- [COOK-4468] - Set NOKOGIRI_USE_SYSTEM_LIBRARIES env variable
v1.2.2 (2014-02-27)
-------------------
[COOK-4382] - Fix xml cookbook spec test
[COOK-4304] - Set proper packages for SUSE 11
v1.2.1
------
### Improvement
- [COOK-4304](https://tickets.chef.io/browse/COOK-4304) - Now sets proper packages for SUSE 11
v1.2.0
------
### Improvement
- **[COOK-3462](https://tickets.chef.io/browse/COOK-3462)** - Allow installing packages during compile time
v1.1.2
------
- [COOK-2059] - missing dependency on build-essential
v1.1.0
------
- [COOK-1826] - support nokogiri chef_gem
- [COOK-1902] - add support for archlinux
v1.0.4
------
- [COOK-1232] - add xslt to xml cookbook
v1.0.2
------
- [COOK-953] - Add FreeBSD support
- [COOK-775] - Add Amazon Linux support

52
cookbooks/xml/README.md Normal file
View File

@@ -0,0 +1,52 @@
XML Cookbook
============
[![Build Status](https://secure.travis-ci.org/chef-cookbooks/xml.png?branch=master)](http://travis-ci.org/chef-cookbooks/xml)
Installs development package for libxml.
Requirements
------------
Debian, Ubuntu, CentOS, Red Hat, Scientific, Fedora, SUSE, ArchLinux
Attributes
----------
- `node['xml']['packages']` - Array of package names that should be installed
- `node['xml']['nokogiri']['use_system_libraries']` - Whether to use system libraries for nokogiri (defaults to `true`)
Recipes
-------
### default
Installs the development packages for libxml2 and libxslt.
For installing the packages during compile time:
```ruby
node.set['xml']['compiletime'] = true
include_recipe 'xml::default'
```
### ruby
Installs the nokogiri gem into Chef's Ruby environment so it can be used in recipes.
License & Authors
-----------------
- Author:: Joshua Timberman (<joshua@chef.io>)
```text
Copyright 2009-2013, 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.
```

View File

@@ -0,0 +1,35 @@
#
# Cookbook Name:: xml
# Recipe:: default
#
# Copyright 2010-2013, 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.
#
default['xml']['compiletime'] = false
case node['platform_family']
when 'rhel', 'fedora', 'suse'
default['xml']['packages'] = %w(libxml2-devel libxslt-devel)
when 'ubuntu', 'debian'
default['xml']['packages'] = %w(libxml2-dev libxslt-dev)
when 'freebsd', 'arch'
default['xml']['packages'] = %w(libxml2 libxslt)
end
default['xml']['nokogiri']['use_system_libraries'] = false
# Newest versions will not compile with system libraries
# https://github.com/sparklemotion/nokogiri/issues/1099
default['xml']['nokogiri']['version'] = '1.6.2.1'

View File

@@ -0,0 +1,42 @@
{
"name": "xml",
"version": "1.2.13",
"description": "Installs xml",
"long_description": "XML Cookbook\n============\n[![Build Status](https://secure.travis-ci.org/chef-cookbooks/xml.png?branch=master)](http://travis-ci.org/chef-cookbooks/xml)\n\nInstalls development package for libxml.\n\n\nRequirements\n------------\nDebian, Ubuntu, CentOS, Red Hat, Scientific, Fedora, SUSE, ArchLinux\n\nAttributes\n----------\n- `node['xml']['packages']` - Array of package names that should be installed\n- `node['xml']['nokogiri']['use_system_libraries']` - Whether to use system libraries for nokogiri (defaults to `true`)\n\n\nRecipes\n-------\n### default\nInstalls the development packages for libxml2 and libxslt.\n\nFor installing the packages during compile time:\n\n```ruby\nnode.set['xml']['compiletime'] = true\ninclude_recipe 'xml::default'\n```\n\n### ruby\nInstalls the nokogiri gem into Chef's Ruby environment so it can be used in recipes.\n\n\nLicense & Authors\n-----------------\n- Author:: Joshua Timberman (<joshua@chef.io>)\n\n```text\nCopyright 2009-2013, Chef Software, Inc.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n",
"maintainer": "Chef Software, Inc.",
"maintainer_email": "cookbooks@chef.io",
"license": "Apache 2.0",
"platforms": {
"amazon": ">= 0.0.0",
"arch": ">= 0.0.0",
"centos": ">= 0.0.0",
"debian": ">= 0.0.0",
"fedora": ">= 0.0.0",
"freebsd": ">= 0.0.0",
"redhat": ">= 0.0.0",
"scientific": ">= 0.0.0",
"suse": ">= 0.0.0",
"ubuntu": ">= 0.0.0"
},
"dependencies": {
"build-essential": ">= 0.0.0",
"chef-sugar": ">= 0.0.0"
},
"recommendations": {
},
"suggestions": {
},
"conflicting": {
},
"providing": {
},
"replacing": {
},
"attributes": {
},
"groupings": {
},
"recipes": {
"xml": "Installs libxml development packages"
}
}

View File

@@ -0,0 +1,25 @@
#
# Cookbook Name:: xml
# Recipe:: default
#
# Copyright 2010-2013, 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.
#
node['xml']['packages'].each do |pkg|
r = package pkg do
action(node['xml']['compiletime'] ? :nothing : :install)
end
r.run_action(:install) if node['xml']['compiletime']
end

View File

@@ -0,0 +1,46 @@
#
# Cookbook Name:: xml
# Recipe:: ruby
#
# Author:: Joseph Holsten (<joseph@josephholsten.com>)
#
# Copyright 2008-2013, 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 'chef-sugar'
execute 'apt-get update' do
ignore_failure true
action :nothing
end.run_action(:run) if 'debian' == node['platform_family']
node.default['build-essential']['compile_time'] = true
node.default['xml']['compiletime'] = true
include_recipe 'build-essential::default'
include_recipe 'xml::default'
if node['xml']['nokogiri']['use_system_libraries']
if node['xml']['nokogiri']['version'].nil? ||
version(node['xml']['nokogiri']['version']).satisfies?('> 1.6.1')
Chef::Application.fatal!("You must specify a version less than or equal to 1.6.1 of nokogiri to use system libraries. You set: #{node['xml']['nokogiri']['version']}.")
else
ENV['NOKOGIRI_USE_SYSTEM_LIBRARIES'] = node['xml']['nokogiri']['use_system_libraries'].to_s
end
end
chef_gem 'nokogiri' do
version node['xml']['nokogiri']['version']
action :install
end