Skip to content

Commit

Permalink
Merge pull request #83 from basho/hc-test-kitchen-debian710
Browse files Browse the repository at this point in the history
Add support for Debian Wheezy
  • Loading branch information
Seth Thomas committed Aug 12, 2013
2 parents 14668bd + d738d2c commit cce327b
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 9 deletions.
9 changes: 9 additions & 0 deletions .kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@ platforms:
memory: 512
run_list:
- recipe[apt]
- name: debian-7.1.0
driver_config:
box: opscode-debian-7.1.0
box_url: https://opscode-vm-bento.s3.amazonaws.com/vagrant/opscode_debian-7.1.0_provisionerless.box
require_chef_omnibus: true
customize:
memory: 512
run_list:
- recipe[apt]
- name: centos-6.4
driver_config:
box: opscode-centos-6.4
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## v2.3.1:

* Fixed Debian support.
* Added Debian Wheezy to Test Kitchen.

## v2.3.0:

* Fixed package installation so that it respects version numbers.
Expand Down
10 changes: 4 additions & 6 deletions recipes/enterprise_package.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,9 @@
package package_name do
source "#{Chef::Config[:file_cache_path]}/#{package_file}"
action :install
case node['platform'] when "ubuntu","debian"
options "--force-confdef --force-confold"
end
provider value_for_platform(
[ "ubuntu", "debian" ] => {"default" => Chef::Provider::Package::Dpkg},
[ "redhat", "centos", "fedora" ] => {"default" => Chef::Provider::Package::Yum}
options "--force-confdef --force-confold" if node['platform_family'] == "debian"
provider value_for_platform_family(
[ "debian" ] => Chef::Provider::Package::Dpkg,
[ "rhel", "fedora" ] => Chef::Provider::Package::Rpm
)
end
13 changes: 10 additions & 3 deletions recipes/package.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@
when "ubuntu", "debian"
include_recipe "apt"

if node['platform'] == "ubuntu" && package_version == "1.3.2-1"
package_version = package_version.gsub(/-/, "~precise")
end

apt_repository "basho" do
uri "http://apt.basho.com"
distribution node['lsb']['codename']
Expand All @@ -59,7 +63,7 @@

package "riak" do
action :install
version (package_version == "1.3.2-1" ? package_version.gsub(/-/, "~precise") : package_version)
version package_version
end

when "centos", "redhat"
Expand All @@ -78,13 +82,16 @@
action :add
end

if platform_version >= 6
package_version = "#{package_version}.el#{platform_version}"
end

package "riak" do
action :install
version (platform_version < 6 ? package_version : "#{package_version}.el#{platform_version}")
version package_version
end

when "fedora"

remote_file "#{Chef::Config[:file_cache_path]}/#{package_file}" do
source package_uri
owner "root"
Expand Down

0 comments on commit cce327b

Please sign in to comment.