From 9eb90ae16169a9f8f61e0e6d68f28cccfc167f39 Mon Sep 17 00:00:00 2001 From: Adam Jacob Date: Sat, 17 Jan 2009 16:45:51 -0800 Subject: [PATCH 01/32] Adding opscode cookbooks --- cc.gemspec | 36 +++++++++++++++++++++++++++++++ files/default/java.seed | 11 ++++++++++ recipes/default.rb | 47 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 94 insertions(+) create mode 100644 cc.gemspec create mode 100644 files/default/java.seed create mode 100644 recipes/default.rb diff --git a/cc.gemspec b/cc.gemspec new file mode 100644 index 0000000..5f71531 --- /dev/null +++ b/cc.gemspec @@ -0,0 +1,36 @@ +# -*- encoding: utf-8 -*- +lib = File.expand_path('../',__FILE__) +lib_up = File.expand_path('../../', __FILE__) +$:.unshift lib unless $:.include?(lib) +$:.unshift lib_up unless $:.include?(lib_up) +require 'json' + +ENV['GEM_PATH']=ENV['BUNDLE_INSTALL_PATH'] if ENV['BUNDLE_INSTALL_PATH'] +ENV['GEM_HOME']=ENV['BUNDLE_INSTALL_PATH'] if ENV['BUNDLE_INSTALL_PATH'] + +name = File.split(lib)[-1]||"" +raise ArgumentError, '', caller if name.empty? +@name=name + +Gem.use_paths(ENV['BUNDLE_INSTALL_PATH'],[]) if ENV['BUNDLE_INSTALL_PATH'] + +Gem::Specification.new do |s| + + md = JSON.parse(File.read(File.expand_path('../metadata.json', __FILE__))) + + # Required attributes (gem build fails without these) + s.name = @name + s.version = md['version'] && !md['version'].empty? ? md['version'] : '0' + s.files = Dir.glob('**/*') #.map{|f| File.expand_path(f)} + s.summary = md['description'] ? md['description'] : "The Chef cookbook for #{s.name}" + + # Optional attributes (gem build warning raised without these) + s.author = md['maintainer'] ? md['maintainer'] : 'No acknowledged maintainer' + s.description = md['long_description'] ? md['long_description'] : s.summary + s.email = md['maintainer_email'] ? md['maintainer_email'] : 'No acknowledged maintainer email' + s.homepage = 'http://www.opscode.com' + md['dependencies'].each { |k,v| s.add_dependency(k,v) }; + + s.post_install_message = "Installed Chef Cookbook #{s.name}\n#{s.description}" + +end diff --git a/files/default/java.seed b/files/default/java.seed new file mode 100644 index 0000000..bf44093 --- /dev/null +++ b/files/default/java.seed @@ -0,0 +1,11 @@ +sun-java6-bin shared/accepted-sun-dlj-v1-1 boolean true +sun-java6-jdk shared/accepted-sun-dlj-v1-1 boolean true +sun-java6-jre shared/accepted-sun-dlj-v1-1 boolean true +sun-java6-jre sun-java6-jre/stopthread boolean true +sun-java6-jre sun-java6-jre/jcepolicy note +sun-java6-bin shared/error-sun-dlj-v1-1 error +sun-java6-jdk shared/error-sun-dlj-v1-1 error +sun-java6-jre shared/error-sun-dlj-v1-1 error +sun-java6-bin shared/present-sun-dlj-v1-1 note +sun-java6-jdk shared/present-sun-dlj-v1-1 note +sun-java6-jre shared/present-sun-dlj-v1-1 note \ No newline at end of file diff --git a/recipes/default.rb b/recipes/default.rb new file mode 100644 index 0000000..3182a2f --- /dev/null +++ b/recipes/default.rb @@ -0,0 +1,47 @@ +# +# Cookbook Name:: java +# Recipe:: default +# +# Copyright 2008, OpsCode, 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. +# + +java_pkg = value_for_platform( + "Ubuntu" => { + "default" => "sun-java6-jdk" + }, + "Debian" => { + "default" => "sun-java6-jdk" + }, + "default" => "sun-java6-jdk" +) + +execute "update-java-alternatives" do + command "update-java-alternatives -s java-6-sun" + only_if do platform?("Ubuntu", "Debian") end + ignore_failure true + returns 1 + action :nothing +end + +package java_pkg do + response_file "java.seed" + action :install + notifies :run, resources(:execute => "update-java-alternatives"), :immediately +end + +package "ant" + + + From 7933941645c2eef6577fa2563e77349dfbc19205 Mon Sep 17 00:00:00 2001 From: Adam Jacob Date: Sat, 17 Jan 2009 17:16:54 -0800 Subject: [PATCH 02/32] lowercasing platform names --- recipes/default.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/default.rb b/recipes/default.rb index 3182a2f..f97117e 100644 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -18,10 +18,10 @@ # java_pkg = value_for_platform( - "Ubuntu" => { + "ubuntu" => { "default" => "sun-java6-jdk" }, - "Debian" => { + "debian" => { "default" => "sun-java6-jdk" }, "default" => "sun-java6-jdk" From d63bcd0a24bb01639f344d04125257cd5fdd5bf6 Mon Sep 17 00:00:00 2001 From: Adam Jacob Date: Sat, 17 Jan 2009 17:19:15 -0800 Subject: [PATCH 03/32] Lots of fixes for platform names now being lower case --- recipes/default.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/default.rb b/recipes/default.rb index f97117e..20b2168 100644 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -29,7 +29,7 @@ execute "update-java-alternatives" do command "update-java-alternatives -s java-6-sun" - only_if do platform?("Ubuntu", "Debian") end + only_if do platform?("ubuntu", "debian") end ignore_failure true returns 1 action :nothing From 04e57c4d2d085ef4e74928fdf423d63caec52545 Mon Sep 17 00:00:00 2001 From: jtimberman Date: Tue, 2 Jun 2009 21:03:26 -0600 Subject: [PATCH 04/32] COOK-131, initial commit of skeleton metadata files. --- metadata.rb | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 metadata.rb diff --git a/metadata.rb b/metadata.rb new file mode 100644 index 0000000..6d51a95 --- /dev/null +++ b/metadata.rb @@ -0,0 +1,6 @@ +maintainer "Opscode, Inc." +maintainer_email "cookbooks@opscode.com" +license "Apache 2.0" +description "Configures java" +long_description "Configures#{cookbook.name}" +version "0.7" From 44f4f97ac6b0172f84202826b0b7da1e109db340 Mon Sep 17 00:00:00 2001 From: jtimberman Date: Wed, 3 Jun 2009 22:46:34 -0600 Subject: [PATCH 05/32] cook-131, flesh out more cookbook metadata --- metadata.rb | 7 +++++-- recipes/default.rb | 3 --- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/metadata.rb b/metadata.rb index 6d51a95..5f5b9f5 100644 --- a/metadata.rb +++ b/metadata.rb @@ -1,6 +1,9 @@ maintainer "Opscode, Inc." maintainer_email "cookbooks@opscode.com" license "Apache 2.0" -description "Configures java" -long_description "Configures#{cookbook.name}" +description "Installs java" version "0.7" + +%w{ debian ubuntu }.each do |os| + supports os +end diff --git a/recipes/default.rb b/recipes/default.rb index 20b2168..f46c9db 100644 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -42,6 +42,3 @@ end package "ant" - - - From 22d6a06720f032c98903527d08e0c3958f83d30c Mon Sep 17 00:00:00 2001 From: jtimberman Date: Thu, 3 Sep 2009 16:32:50 -0600 Subject: [PATCH 06/32] metadata task and json data The rakefile shouldn't delete the metadata task, since the ability to generate JSON metadata from the cookbooks directory is still useful. Lets also ship the metadata in JSON in the cookbooks, so others can make use of it without having to run any Ruby. --- metadata.json | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 metadata.json diff --git a/metadata.json b/metadata.json new file mode 100644 index 0000000..d1bf7ac --- /dev/null +++ b/metadata.json @@ -0,0 +1,43 @@ +{ + "maintainer": "Opscode, Inc.", + "description": "Installs java", + "recommendations": { + + }, + "maintainer_email": "cookbooks@opscode.com", + "suggestions": { + + }, + "platforms": { + "ubuntu": [ + + ], + "debian": [ + + ] + }, + "version": "0.7.0", + "recipes": { + "java": "" + }, + "name": "java", + "conflicting": { + + }, + "attributes": { + + }, + "providing": { + "java": [ + + ] + }, + "license": "Apache 2.0", + "long_description": "", + "replacing": { + + }, + "dependencies": { + + } +} \ No newline at end of file From 3cba404f70a190278a0021b2b89a8d8e4227d031 Mon Sep 17 00:00:00 2001 From: jtimberman Date: Sun, 27 Sep 2009 23:39:05 -0600 Subject: [PATCH 07/32] cook-188, update copyright notices, regen metadata too --- metadata.json | 32 ++++++++++++++++---------------- recipes/default.rb | 6 +++--- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/metadata.json b/metadata.json index d1bf7ac..8dbc0c5 100644 --- a/metadata.json +++ b/metadata.json @@ -1,12 +1,10 @@ { - "maintainer": "Opscode, Inc.", "description": "Installs java", - "recommendations": { + "replacing": { }, - "maintainer_email": "cookbooks@opscode.com", - "suggestions": { - + "recipes": { + "java": "" }, "platforms": { "ubuntu": [ @@ -16,28 +14,30 @@ ] }, + "maintainer": "Opscode, Inc.", "version": "0.7.0", - "recipes": { - "java": "" - }, - "name": "java", - "conflicting": { + "recommendations": { }, + "name": "java", + "maintainer_email": "cookbooks@opscode.com", "attributes": { }, - "providing": { - "java": [ + "suggestions": { - ] }, "license": "Apache 2.0", - "long_description": "", - "replacing": { + "conflicting": { }, "dependencies": { - } + }, + "providing": { + "java": [ + + ] + }, + "long_description": "" } \ No newline at end of file diff --git a/recipes/default.rb b/recipes/default.rb index f46c9db..0807792 100644 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -2,14 +2,14 @@ # Cookbook Name:: java # Recipe:: default # -# Copyright 2008, OpsCode, Inc. +# Copyright 2008-2009, Opscode, 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. From 2aff8f254511701c94549d952a64b572b8511bd0 Mon Sep 17 00:00:00 2001 From: jtimberman Date: Tue, 27 Oct 2009 15:39:52 -0600 Subject: [PATCH 08/32] supports platform metadata for all cookbooks that didn't have it --- metadata.json | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/metadata.json b/metadata.json index 8dbc0c5..0321b3b 100644 --- a/metadata.json +++ b/metadata.json @@ -1,10 +1,15 @@ { + "maintainer": "Opscode, Inc.", "description": "Installs java", - "replacing": { + "recommendations": { }, + "maintainer_email": "cookbooks@opscode.com", "recipes": { "java": "" + }, + "suggestions": { + }, "platforms": { "ubuntu": [ @@ -14,30 +19,25 @@ ] }, - "maintainer": "Opscode, Inc.", "version": "0.7.0", - "recommendations": { + "name": "java", + "conflicting": { }, - "name": "java", - "maintainer_email": "cookbooks@opscode.com", "attributes": { }, - "suggestions": { + "providing": { + "java": [ + ] }, "license": "Apache 2.0", - "conflicting": { + "long_description": "", + "replacing": { }, "dependencies": { - }, - "providing": { - "java": [ - - ] - }, - "long_description": "" + } } \ No newline at end of file From ceece806bc98d45f777dd48a817f78ed3c00c382 Mon Sep 17 00:00:00 2001 From: Dan DeLeo Date: Sat, 7 Nov 2009 15:48:02 -0700 Subject: [PATCH 09/32] tell ubuntu we're using the headless jre --- recipes/default.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/default.rb b/recipes/default.rb index 0807792..543cab5 100644 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -28,7 +28,7 @@ ) execute "update-java-alternatives" do - command "update-java-alternatives -s java-6-sun" + command "update-java-alternatives --jre-headless -s java-6-sun" only_if do platform?("ubuntu", "debian") end ignore_failure true returns 1 From 0018eb8da03adcab9e445b7d53afe16b6ea2a83c Mon Sep 17 00:00:00 2001 From: Dan DeLeo Date: Sat, 7 Nov 2009 15:50:03 -0700 Subject: [PATCH 10/32] update-java-alternatives returns 0 if you do it right --- recipes/default.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/default.rb b/recipes/default.rb index 543cab5..34f06ae 100644 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -31,7 +31,7 @@ command "update-java-alternatives --jre-headless -s java-6-sun" only_if do platform?("ubuntu", "debian") end ignore_failure true - returns 1 + returns 0 action :nothing end From 5415a27a4e3f911deb80139adbda9337de2aaeea Mon Sep 17 00:00:00 2001 From: jtimberman Date: Wed, 9 Dec 2009 12:13:09 -0700 Subject: [PATCH 11/32] only update alternatives for jre, ignore failures anyway, because the command is inconsistent when it works --- metadata.rb | 2 +- recipes/default.rb | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/metadata.rb b/metadata.rb index 5f5b9f5..bd15f7e 100644 --- a/metadata.rb +++ b/metadata.rb @@ -2,7 +2,7 @@ maintainer_email "cookbooks@opscode.com" license "Apache 2.0" description "Installs java" -version "0.7" +version "0.8" %w{ debian ubuntu }.each do |os| supports os diff --git a/recipes/default.rb b/recipes/default.rb index 0807792..dafcbf5 100644 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -28,10 +28,9 @@ ) execute "update-java-alternatives" do - command "update-java-alternatives -s java-6-sun" + command "update-java-alternatives -s java-6-sun --jre" only_if do platform?("ubuntu", "debian") end ignore_failure true - returns 1 action :nothing end From 5c9ddce591c48f75a490d07b2a4469a1cd83aca1 Mon Sep 17 00:00:00 2001 From: jtimberman Date: Tue, 2 Feb 2010 17:49:41 -0700 Subject: [PATCH 12/32] merge conflict artifact --- recipes/default.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/default.rb b/recipes/default.rb index 0807792..34f06ae 100644 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -28,10 +28,10 @@ ) execute "update-java-alternatives" do - command "update-java-alternatives -s java-6-sun" + command "update-java-alternatives --jre-headless -s java-6-sun" only_if do platform?("ubuntu", "debian") end ignore_failure true - returns 1 + returns 0 action :nothing end From 99eded2d020288c76b666487944bb171ba4b6606 Mon Sep 17 00:00:00 2001 From: jtimberman Date: Fri, 5 Feb 2010 14:41:11 -0700 Subject: [PATCH 13/32] support additional platforms, add readme, fixes COOK-250, COOK-234 --- README.rdoc | 29 +++++++++++++++++++++++++++++ metadata.rb | 3 ++- recipes/default.rb | 12 +++++++----- 3 files changed, 38 insertions(+), 6 deletions(-) create mode 100644 README.rdoc diff --git a/README.rdoc b/README.rdoc new file mode 100644 index 0000000..8e9d148 --- /dev/null +++ b/README.rdoc @@ -0,0 +1,29 @@ += DESCRIPTION: + +Installs Java and Ant. + += REQUIREMENTS: + +Platform: Ubuntu, Debian, Red Hat, CentOS, Fedora. + +Enable the 'multiverse' repository on Ubuntu, 'non-free' on Debian or EPEL on RH/Cent/Fedora to get the Java package, or edit the default recipe to point at the Java package for your platform. + += USAGE: + +Simply include the recipe where you want Java installed. Note the respository requirement above to get the right package. On Debian and Ubuntu systems, the recipe will preseed the package and update java alternaties. + += LICENSE and AUTHOR: + +Copyright 2008-2010, Opscode, 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. diff --git a/metadata.rb b/metadata.rb index bd15f7e..6e2ccd0 100644 --- a/metadata.rb +++ b/metadata.rb @@ -2,7 +2,8 @@ maintainer_email "cookbooks@opscode.com" license "Apache 2.0" description "Installs java" -version "0.8" +long_description IO.read(File.join(File.dirname(__FILE__), 'README.rdoc')) +version "0.9" %w{ debian ubuntu }.each do |os| supports os diff --git a/recipes/default.rb b/recipes/default.rb index 34f06ae..6f17eae 100644 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -18,11 +18,11 @@ # java_pkg = value_for_platform( - "ubuntu" => { + [ "ubuntu", "debian" ] => { "default" => "sun-java6-jdk" }, - "debian" => { - "default" => "sun-java6-jdk" + [ "redhat", "centos", "fedora" ] => { + "default" => "java-1.6.0-openjdk" }, "default" => "sun-java6-jdk" ) @@ -36,9 +36,11 @@ end package java_pkg do - response_file "java.seed" action :install - notifies :run, resources(:execute => "update-java-alternatives"), :immediately + if platform?("ubuntu", "debian") + response_file "java.seed" + notifies :run, resources(:execute => "update-java-alternatives"), :immediately + end end package "ant" From f99cab247c1134c18755881128c59a6c75b73097 Mon Sep 17 00:00:00 2001 From: jtimberman Date: Fri, 5 Feb 2010 14:41:11 -0700 Subject: [PATCH 14/32] support additional platforms, add readme, fixes COOK-250, COOK-234 --- README.rdoc | 29 +++++++++++++++++++++++++++++ metadata.rb | 3 ++- recipes/default.rb | 12 +++++++----- 3 files changed, 38 insertions(+), 6 deletions(-) create mode 100644 README.rdoc diff --git a/README.rdoc b/README.rdoc new file mode 100644 index 0000000..8e9d148 --- /dev/null +++ b/README.rdoc @@ -0,0 +1,29 @@ += DESCRIPTION: + +Installs Java and Ant. + += REQUIREMENTS: + +Platform: Ubuntu, Debian, Red Hat, CentOS, Fedora. + +Enable the 'multiverse' repository on Ubuntu, 'non-free' on Debian or EPEL on RH/Cent/Fedora to get the Java package, or edit the default recipe to point at the Java package for your platform. + += USAGE: + +Simply include the recipe where you want Java installed. Note the respository requirement above to get the right package. On Debian and Ubuntu systems, the recipe will preseed the package and update java alternaties. + += LICENSE and AUTHOR: + +Copyright 2008-2010, Opscode, 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. diff --git a/metadata.rb b/metadata.rb index bd15f7e..6e2ccd0 100644 --- a/metadata.rb +++ b/metadata.rb @@ -2,7 +2,8 @@ maintainer_email "cookbooks@opscode.com" license "Apache 2.0" description "Installs java" -version "0.8" +long_description IO.read(File.join(File.dirname(__FILE__), 'README.rdoc')) +version "0.9" %w{ debian ubuntu }.each do |os| supports os diff --git a/recipes/default.rb b/recipes/default.rb index dafcbf5..2b47eae 100644 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -18,11 +18,11 @@ # java_pkg = value_for_platform( - "ubuntu" => { + [ "ubuntu", "debian" ] => { "default" => "sun-java6-jdk" }, - "debian" => { - "default" => "sun-java6-jdk" + [ "redhat", "centos", "fedora" ] => { + "default" => "java-1.6.0-openjdk" }, "default" => "sun-java6-jdk" ) @@ -35,9 +35,11 @@ end package java_pkg do - response_file "java.seed" action :install - notifies :run, resources(:execute => "update-java-alternatives"), :immediately + if platform?("ubuntu", "debian") + response_file "java.seed" + notifies :run, resources(:execute => "update-java-alternatives"), :immediately + end end package "ant" From 805539c23fbfb3bdc50b3a419a98acdddbc87faa Mon Sep 17 00:00:00 2001 From: jtimberman Date: Sun, 28 Feb 2010 14:16:20 -0700 Subject: [PATCH 15/32] Updating metadata, versions and documentation for bootstrap, for 0.8.x release of Chef --- metadata.json | 76 +++++++++++++++++++++++---------------------------- 1 file changed, 34 insertions(+), 42 deletions(-) diff --git a/metadata.json b/metadata.json index 0321b3b..cd16baa 100644 --- a/metadata.json +++ b/metadata.json @@ -1,43 +1,35 @@ { - "maintainer": "Opscode, Inc.", - "description": "Installs java", - "recommendations": { - - }, - "maintainer_email": "cookbooks@opscode.com", - "recipes": { - "java": "" - }, - "suggestions": { - - }, - "platforms": { - "ubuntu": [ - - ], - "debian": [ - - ] - }, - "version": "0.7.0", - "name": "java", - "conflicting": { - - }, - "attributes": { - - }, - "providing": { - "java": [ - - ] - }, - "license": "Apache 2.0", - "long_description": "", - "replacing": { - - }, - "dependencies": { - - } -} \ No newline at end of file + "dependencies": { + }, + "replacing": { + }, + "description": "Installs java", + "groupings": { + }, + "platforms": { + "ubuntu": [ + + ], + "debian": [ + + ] + }, + "version": "0.9.0", + "recommendations": { + }, + "name": "java", + "maintainer": "Opscode, Inc.", + "long_description": "= DESCRIPTION:\n\nInstalls Java and Ant.\n\n= REQUIREMENTS:\n\nPlatform: Ubuntu, Debian, Red Hat, CentOS, Fedora.\n\nEnable the 'multiverse' repository on Ubuntu, 'non-free' on Debian or EPEL on RH/Cent/Fedora to get the Java package, or edit the default recipe to point at the Java package for your platform.\n\n= USAGE:\n\nSimply include the recipe where you want Java installed. Note the respository requirement above to get the right package. On Debian and Ubuntu systems, the recipe will preseed the package and update java alternaties.\n\n= LICENSE and AUTHOR:\n\nCopyright 2008-2010, Opscode, 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", + "recipes": { + }, + "suggestions": { + }, + "maintainer_email": "cookbooks@opscode.com", + "attributes": { + }, + "conflicting": { + }, + "license": "Apache 2.0", + "providing": { + } + } \ No newline at end of file From 0657cf6d1415c71edb6b5bdfc23a866a19bc3a53 Mon Sep 17 00:00:00 2001 From: jtimberman Date: Sun, 25 Apr 2010 12:51:37 -0600 Subject: [PATCH 16/32] Remove metadata.json and update application readme. * Metadata.json can be generated with the rake tasks. * Use 'metadata[cookbook]' and 'metadata_all' to generate .json. * Application readme needed a few more clarification points. --- metadata.json | 35 ----------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 metadata.json diff --git a/metadata.json b/metadata.json deleted file mode 100644 index cd16baa..0000000 --- a/metadata.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "dependencies": { - }, - "replacing": { - }, - "description": "Installs java", - "groupings": { - }, - "platforms": { - "ubuntu": [ - - ], - "debian": [ - - ] - }, - "version": "0.9.0", - "recommendations": { - }, - "name": "java", - "maintainer": "Opscode, Inc.", - "long_description": "= DESCRIPTION:\n\nInstalls Java and Ant.\n\n= REQUIREMENTS:\n\nPlatform: Ubuntu, Debian, Red Hat, CentOS, Fedora.\n\nEnable the 'multiverse' repository on Ubuntu, 'non-free' on Debian or EPEL on RH/Cent/Fedora to get the Java package, or edit the default recipe to point at the Java package for your platform.\n\n= USAGE:\n\nSimply include the recipe where you want Java installed. Note the respository requirement above to get the right package. On Debian and Ubuntu systems, the recipe will preseed the package and update java alternaties.\n\n= LICENSE and AUTHOR:\n\nCopyright 2008-2010, Opscode, 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", - "recipes": { - }, - "suggestions": { - }, - "maintainer_email": "cookbooks@opscode.com", - "attributes": { - }, - "conflicting": { - }, - "license": "Apache 2.0", - "providing": { - } - } \ No newline at end of file From 881bdc6823e86e3257e97681ac6ffb3b7e2c218f Mon Sep 17 00:00:00 2001 From: jtimberman Date: Sun, 25 Apr 2010 12:51:37 -0600 Subject: [PATCH 17/32] Remove metadata.json and update application readme. * Metadata.json can be generated with the rake tasks. * Use 'metadata[cookbook]' and 'metadata_all' to generate .json. * Application readme needed a few more clarification points. --- metadata.json | 35 ----------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 metadata.json diff --git a/metadata.json b/metadata.json deleted file mode 100644 index cd16baa..0000000 --- a/metadata.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "dependencies": { - }, - "replacing": { - }, - "description": "Installs java", - "groupings": { - }, - "platforms": { - "ubuntu": [ - - ], - "debian": [ - - ] - }, - "version": "0.9.0", - "recommendations": { - }, - "name": "java", - "maintainer": "Opscode, Inc.", - "long_description": "= DESCRIPTION:\n\nInstalls Java and Ant.\n\n= REQUIREMENTS:\n\nPlatform: Ubuntu, Debian, Red Hat, CentOS, Fedora.\n\nEnable the 'multiverse' repository on Ubuntu, 'non-free' on Debian or EPEL on RH/Cent/Fedora to get the Java package, or edit the default recipe to point at the Java package for your platform.\n\n= USAGE:\n\nSimply include the recipe where you want Java installed. Note the respository requirement above to get the right package. On Debian and Ubuntu systems, the recipe will preseed the package and update java alternaties.\n\n= LICENSE and AUTHOR:\n\nCopyright 2008-2010, Opscode, 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", - "recipes": { - }, - "suggestions": { - }, - "maintainer_email": "cookbooks@opscode.com", - "attributes": { - }, - "conflicting": { - }, - "license": "Apache 2.0", - "providing": { - } - } \ No newline at end of file From 725af217bb1c697330822688513b2767e5eb5021 Mon Sep 17 00:00:00 2001 From: jtimberman Date: Thu, 29 Apr 2010 15:22:48 -0700 Subject: [PATCH 18/32] regenerate latest metadata.json for consistency across cookbooks. --- metadata.json | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 metadata.json diff --git a/metadata.json b/metadata.json new file mode 100644 index 0000000..b4fba96 --- /dev/null +++ b/metadata.json @@ -0,0 +1,35 @@ +{ + "recipes": { + }, + "attributes": { + }, + "providing": { + }, + "platforms": { + "ubuntu": [ + + ], + "debian": [ + + ] + }, + "dependencies": { + }, + "replacing": { + }, + "version": "0.9.0", + "name": "java", + "groupings": { + }, + "long_description": "= DESCRIPTION:\n\nInstalls Java and Ant.\n\n= REQUIREMENTS:\n\nPlatform: Ubuntu, Debian, Red Hat, CentOS, Fedora.\n\nEnable the 'multiverse' repository on Ubuntu, 'non-free' on Debian or EPEL on RH/Cent/Fedora to get the Java package, or edit the default recipe to point at the Java package for your platform.\n\n= USAGE:\n\nSimply include the recipe where you want Java installed. Note the respository requirement above to get the right package. On Debian and Ubuntu systems, the recipe will preseed the package and update java alternaties.\n\n= LICENSE and AUTHOR:\n\nCopyright 2008-2010, Opscode, 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", + "recommendations": { + }, + "license": "Apache 2.0", + "maintainer": "Opscode, Inc.", + "suggestions": { + }, + "maintainer_email": "cookbooks@opscode.com", + "conflicting": { + }, + "description": "Installs java" + } \ No newline at end of file From c0b061a7a523c020f53bbfcff416f2ed8f7f7f9e Mon Sep 17 00:00:00 2001 From: jtimberman Date: Tue, 4 May 2010 17:57:12 -0600 Subject: [PATCH 19/32] Switch debian/ubuntu Java package to openjdk, preseed unnecessary, and don't install ant by default --- metadata.rb | 4 ++-- recipes/default.rb | 18 ++---------------- 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/metadata.rb b/metadata.rb index 6e2ccd0..0bf7e10 100644 --- a/metadata.rb +++ b/metadata.rb @@ -3,8 +3,8 @@ license "Apache 2.0" description "Installs java" long_description IO.read(File.join(File.dirname(__FILE__), 'README.rdoc')) -version "0.9" +version "0.10.0" -%w{ debian ubuntu }.each do |os| +%w{ debian ubuntu redhat centos fedora }.each do |os| supports os end diff --git a/recipes/default.rb b/recipes/default.rb index 6f17eae..66f5db0 100644 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -19,28 +19,14 @@ java_pkg = value_for_platform( [ "ubuntu", "debian" ] => { - "default" => "sun-java6-jdk" + "default" => "openjdk-6-jre-headless" }, [ "redhat", "centos", "fedora" ] => { "default" => "java-1.6.0-openjdk" }, - "default" => "sun-java6-jdk" + "default" => "openjdk-6-jre-headless" ) -execute "update-java-alternatives" do - command "update-java-alternatives --jre-headless -s java-6-sun" - only_if do platform?("ubuntu", "debian") end - ignore_failure true - returns 0 - action :nothing -end - package java_pkg do action :install - if platform?("ubuntu", "debian") - response_file "java.seed" - notifies :run, resources(:execute => "update-java-alternatives"), :immediately - end end - -package "ant" From 654a07fd09fde649741ec3cbdb83de66b5007f8d Mon Sep 17 00:00:00 2001 From: jtimberman Date: Tue, 4 May 2010 19:47:13 -0600 Subject: [PATCH 20/32] Update metadata across the board. --- metadata.json | 41 +++++++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/metadata.json b/metadata.json index cd16baa..5b82a5e 100644 --- a/metadata.json +++ b/metadata.json @@ -1,35 +1,44 @@ { - "dependencies": { - }, - "replacing": { + "maintainer": "Opscode, Inc.", + "attributes": { }, - "description": "Installs java", - "groupings": { + "suggestions": { }, "platforms": { "ubuntu": [ + ], + "fedora": [ + + ], + "centos": [ + + ], + "redhat": [ + ], "debian": [ ] }, - "version": "0.9.0", - "recommendations": { + "dependencies": { }, + "maintainer_email": "cookbooks@opscode.com", + "conflicting": { + }, + "version": "0.10.0", "name": "java", - "maintainer": "Opscode, Inc.", - "long_description": "= DESCRIPTION:\n\nInstalls Java and Ant.\n\n= REQUIREMENTS:\n\nPlatform: Ubuntu, Debian, Red Hat, CentOS, Fedora.\n\nEnable the 'multiverse' repository on Ubuntu, 'non-free' on Debian or EPEL on RH/Cent/Fedora to get the Java package, or edit the default recipe to point at the Java package for your platform.\n\n= USAGE:\n\nSimply include the recipe where you want Java installed. Note the respository requirement above to get the right package. On Debian and Ubuntu systems, the recipe will preseed the package and update java alternaties.\n\n= LICENSE and AUTHOR:\n\nCopyright 2008-2010, Opscode, 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", "recipes": { }, - "suggestions": { + "providing": { }, - "maintainer_email": "cookbooks@opscode.com", - "attributes": { + "license": "Apache 2.0", + "replacing": { }, - "conflicting": { + "groupings": { }, - "license": "Apache 2.0", - "providing": { - } + "long_description": "= DESCRIPTION:\n\nInstalls Java and Ant.\n\n= REQUIREMENTS:\n\nPlatform: Ubuntu, Debian, Red Hat, CentOS, Fedora.\n\nEnable the 'multiverse' repository on Ubuntu, 'non-free' on Debian or EPEL on RH/Cent/Fedora to get the Java package, or edit the default recipe to point at the Java package for your platform.\n\n= USAGE:\n\nSimply include the recipe where you want Java installed. Note the respository requirement above to get the right package. On Debian and Ubuntu systems, the recipe will preseed the package and update java alternaties.\n\n= LICENSE and AUTHOR:\n\nCopyright 2008-2010, Opscode, 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", + "recommendations": { + }, + "description": "Installs java" } \ No newline at end of file From 320c43629fbb09ebd66128463300533930dc3e37 Mon Sep 17 00:00:00 2001 From: jtimberman Date: Wed, 19 May 2010 16:50:31 -0600 Subject: [PATCH 21/32] readme update, notice of sun-java deprecation --- README.rdoc | 2 +- metadata.json | 4 ++-- metadata.rb | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.rdoc b/README.rdoc index 8e9d148..11834cb 100644 --- a/README.rdoc +++ b/README.rdoc @@ -1,6 +1,6 @@ = DESCRIPTION: -Installs Java and Ant. +Installs Java and Ant. Uses OpenJDK, Sun's Java is deprecated in Ubuntu and may not be available in the future. = REQUIREMENTS: diff --git a/metadata.json b/metadata.json index 5b82a5e..7e4bb7c 100644 --- a/metadata.json +++ b/metadata.json @@ -26,7 +26,7 @@ "maintainer_email": "cookbooks@opscode.com", "conflicting": { }, - "version": "0.10.0", + "version": "0.10.1", "name": "java", "recipes": { }, @@ -41,4 +41,4 @@ "recommendations": { }, "description": "Installs java" - } \ No newline at end of file + } diff --git a/metadata.rb b/metadata.rb index 0bf7e10..b4e719f 100644 --- a/metadata.rb +++ b/metadata.rb @@ -1,9 +1,9 @@ maintainer "Opscode, Inc." maintainer_email "cookbooks@opscode.com" license "Apache 2.0" -description "Installs java" +description "Installs java via openjdk." long_description IO.read(File.join(File.dirname(__FILE__), 'README.rdoc')) -version "0.10.0" +version "0.10.1" %w{ debian ubuntu redhat centos fedora }.each do |os| supports os From 5124434355d7df35a6d787c18729d92d1e119c87 Mon Sep 17 00:00:00 2001 From: Troy Davis Date: Thu, 13 May 2010 10:04:52 -0700 Subject: [PATCH 22/32] Fix tiny java typo I happened to notice --- README.rdoc | 2 +- metadata.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rdoc b/README.rdoc index 11834cb..cbc3ef6 100644 --- a/README.rdoc +++ b/README.rdoc @@ -10,7 +10,7 @@ Enable the 'multiverse' repository on Ubuntu, 'non-free' on Debian or EPEL on RH = USAGE: -Simply include the recipe where you want Java installed. Note the respository requirement above to get the right package. On Debian and Ubuntu systems, the recipe will preseed the package and update java alternaties. +Simply include the recipe where you want Java installed. Note the repository requirement above to get the right package. On Debian and Ubuntu systems, the recipe will preseed the package and update java alternaties. = LICENSE and AUTHOR: diff --git a/metadata.json b/metadata.json index 7e4bb7c..4b99528 100644 --- a/metadata.json +++ b/metadata.json @@ -37,7 +37,7 @@ }, "groupings": { }, - "long_description": "= DESCRIPTION:\n\nInstalls Java and Ant.\n\n= REQUIREMENTS:\n\nPlatform: Ubuntu, Debian, Red Hat, CentOS, Fedora.\n\nEnable the 'multiverse' repository on Ubuntu, 'non-free' on Debian or EPEL on RH/Cent/Fedora to get the Java package, or edit the default recipe to point at the Java package for your platform.\n\n= USAGE:\n\nSimply include the recipe where you want Java installed. Note the respository requirement above to get the right package. On Debian and Ubuntu systems, the recipe will preseed the package and update java alternaties.\n\n= LICENSE and AUTHOR:\n\nCopyright 2008-2010, Opscode, 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", + "long_description": "= DESCRIPTION:\n\nInstalls Java and Ant.\n\n= REQUIREMENTS:\n\nPlatform: Ubuntu, Debian, Red Hat, CentOS, Fedora.\n\nEnable the 'multiverse' repository on Ubuntu, 'non-free' on Debian or EPEL on RH/Cent/Fedora to get the Java package, or edit the default recipe to point at the Java package for your platform.\n\n= USAGE:\n\nSimply include the recipe where you want Java installed. Note the repository requirement above to get the right package. On Debian and Ubuntu systems, the recipe will preseed the package and update java alternaties.\n\n= LICENSE and AUTHOR:\n\nCopyright 2008-2010, Opscode, 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", "recommendations": { }, "description": "Installs java" From 932a4e99c8d8f9553e09114b7e69c8b903cf5edd Mon Sep 17 00:00:00 2001 From: jtimberman Date: Thu, 1 Jul 2010 21:27:59 -0600 Subject: [PATCH 23/32] COOK-316, add recipes to metadata for all cookbooks --- metadata.json | 37 +++++++++++++++++++------------------ metadata.rb | 4 +++- 2 files changed, 22 insertions(+), 19 deletions(-) diff --git a/metadata.json b/metadata.json index 4b99528..cd3654e 100644 --- a/metadata.json +++ b/metadata.json @@ -1,11 +1,18 @@ { - "maintainer": "Opscode, Inc.", + "recommendations": { + }, "attributes": { }, + "maintainer": "Opscode, Inc.", "suggestions": { }, + "dependencies": { + }, + "maintainer_email": "cookbooks@opscode.com", + "conflicting": { + }, "platforms": { - "ubuntu": [ + "debian": [ ], "fedora": [ @@ -14,31 +21,25 @@ "centos": [ ], - "redhat": [ + "ubuntu": [ ], - "debian": [ + "redhat": [ ] }, - "dependencies": { - }, - "maintainer_email": "cookbooks@opscode.com", - "conflicting": { + "license": "Apache 2.0", + "version": "0.10.2", + "providing": { }, - "version": "0.10.1", - "name": "java", "recipes": { + "java": "Installs openjdk to provide Java" }, - "providing": { - }, - "license": "Apache 2.0", "replacing": { }, + "name": "java", + "description": "Installs java via openjdk.", "groupings": { }, - "long_description": "= DESCRIPTION:\n\nInstalls Java and Ant.\n\n= REQUIREMENTS:\n\nPlatform: Ubuntu, Debian, Red Hat, CentOS, Fedora.\n\nEnable the 'multiverse' repository on Ubuntu, 'non-free' on Debian or EPEL on RH/Cent/Fedora to get the Java package, or edit the default recipe to point at the Java package for your platform.\n\n= USAGE:\n\nSimply include the recipe where you want Java installed. Note the repository requirement above to get the right package. On Debian and Ubuntu systems, the recipe will preseed the package and update java alternaties.\n\n= LICENSE and AUTHOR:\n\nCopyright 2008-2010, Opscode, 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", - "recommendations": { - }, - "description": "Installs java" - } + "long_description": "= DESCRIPTION:\n\nInstalls Java and Ant. Uses OpenJDK, Sun's Java is deprecated in Ubuntu and may not be available in the future.\n\n= REQUIREMENTS:\n\nPlatform: Ubuntu, Debian, Red Hat, CentOS, Fedora.\n\nEnable the 'multiverse' repository on Ubuntu, 'non-free' on Debian or EPEL on RH/Cent/Fedora to get the Java package, or edit the default recipe to point at the Java package for your platform.\n\n= USAGE:\n\nSimply include the recipe where you want Java installed. Note the repository requirement above to get the right package. On Debian and Ubuntu systems, the recipe will preseed the package and update java alternaties.\n\n= LICENSE and AUTHOR:\n\nCopyright 2008-2010, Opscode, 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" + } \ No newline at end of file diff --git a/metadata.rb b/metadata.rb index b4e719f..bc75699 100644 --- a/metadata.rb +++ b/metadata.rb @@ -3,7 +3,9 @@ license "Apache 2.0" description "Installs java via openjdk." long_description IO.read(File.join(File.dirname(__FILE__), 'README.rdoc')) -version "0.10.1" +version "0.10.2" + +recipe "java", "Installs openjdk to provide Java" %w{ debian ubuntu redhat centos fedora }.each do |os| supports os From 89b4a47f9a2094f0b9331fc5af70ac521cb3459d Mon Sep 17 00:00:00 2001 From: Seth Chisamore Date: Mon, 25 Oct 2010 23:49:31 -0400 Subject: [PATCH 24/32] first pass at a combined openjdk and sun java cookbook --- README.md | 67 ++++++++++++++++++++ README.rdoc | 29 --------- attributes/default.rb | 26 ++++++++ metadata.json | 81 +++++++++++++------------ metadata.rb | 7 +-- recipes/default.rb | 55 +++++++++++++---- recipes/openjdk.rb | 27 +++++++++ recipes/sun.rb | 37 +++++++++++ templates/ubuntu/canonical.com.list.erb | 2 + 9 files changed, 247 insertions(+), 84 deletions(-) create mode 100644 README.md delete mode 100644 README.rdoc create mode 100644 attributes/default.rb create mode 100644 recipes/openjdk.rb create mode 100644 recipes/sun.rb create mode 100644 templates/ubuntu/canonical.com.list.erb diff --git a/README.md b/README.md new file mode 100644 index 0000000..5c59e9e --- /dev/null +++ b/README.md @@ -0,0 +1,67 @@ +Description +=========== + +Installs a Java. Uses OpenJDK by default but supports installation of the Sun's Java (Debian and Ubuntu platforms only). + +Requirements +============ + +Platform: + +* Debian, Ubuntu (OpenJDK, Sun) +* Red Hat, CentOS, Fedora (OpenJDK) + +The following Opscode cookbooks are dependencies: + +* apt + +Attributes +========== + +* `node["java"]["install_flavor"]` - Type of JRE you would like installed ("sun" or "openjdk"), default "openjdk". + +Usage +===== + +Simply include the recipe where you want Java installed. + +If you would like to use the Sun flavor of Java, create a role and set the `java[install_flavor]` attribute to `'sun'`. + + % knife role show java + { + "name": "java", + "chef_type": "role", + "json_class": "Chef::Role", + "default_attributes": { + "java": { + "install_flavor":"sun" + } + }, + "description": "", + "run_list": [ + "recipe[java]" + ], + "override_attributes": { + } + } + +The Sun flavor of Java is only supported on Debian and Ubuntu systems, the recipe will preseed the package and update java alternatives. + +License and Author +================== + +Author:: Seth Chisamore () + +Copyright:: 2008-2010, Opscode, 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. diff --git a/README.rdoc b/README.rdoc deleted file mode 100644 index cbc3ef6..0000000 --- a/README.rdoc +++ /dev/null @@ -1,29 +0,0 @@ -= DESCRIPTION: - -Installs Java and Ant. Uses OpenJDK, Sun's Java is deprecated in Ubuntu and may not be available in the future. - -= REQUIREMENTS: - -Platform: Ubuntu, Debian, Red Hat, CentOS, Fedora. - -Enable the 'multiverse' repository on Ubuntu, 'non-free' on Debian or EPEL on RH/Cent/Fedora to get the Java package, or edit the default recipe to point at the Java package for your platform. - -= USAGE: - -Simply include the recipe where you want Java installed. Note the repository requirement above to get the right package. On Debian and Ubuntu systems, the recipe will preseed the package and update java alternaties. - -= LICENSE and AUTHOR: - -Copyright 2008-2010, Opscode, 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. diff --git a/attributes/default.rb b/attributes/default.rb new file mode 100644 index 0000000..a08f5e5 --- /dev/null +++ b/attributes/default.rb @@ -0,0 +1,26 @@ +# +# Cookbook Name:: java +# Attributes:: default +# +# Copyright 2010, Opscode, 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["java"]["install_flavor"] = "openjdk" + +case platform +when "redhat","centos","fedora" + set["java"]["java_home"] = "/usr/lib/jvm/default-java" +else + set["java"]["java_home"] = "/usr/lib/jvm/default-java" +end \ No newline at end of file diff --git a/metadata.json b/metadata.json index cd3654e..41292e4 100644 --- a/metadata.json +++ b/metadata.json @@ -1,45 +1,48 @@ { - "recommendations": { - }, - "attributes": { - }, - "maintainer": "Opscode, Inc.", - "suggestions": { - }, - "dependencies": { - }, - "maintainer_email": "cookbooks@opscode.com", - "conflicting": { - }, - "platforms": { - "debian": [ + "providing": { + }, + "maintainer": "Opscode, Inc.", + "replacing": { + }, + "description": "Installs java via openjdk.", + "maintainer_email": "cookbooks@opscode.com", + "groupings": { + }, + "attributes": { + }, + "recommendations": { + }, + "dependencies": { + "apt": [ - ], - "fedora": [ + ] + }, + "suggestions": { + }, + "long_description": "Description\n===========\n\nInstalls a Java. Uses OpenJDK by default but supports installation of the Sun's Java (Debian and Ubuntu platforms only).\n\nRequirements\n============\n\nPlatform: \n\n* Debian, Ubuntu (OpenJDK, Sun)\n* Red Hat, CentOS, Fedora (OpenJDK)\n\nThe following Opscode cookbooks are dependencies:\n\n* apt\n\nAttributes\n==========\n\n* `node[\"java\"][\"install_flavor\"]` - Type of JRE you would like installed (\"sun\" or \"openjdk\"), default \"openjdk\".\n\nUsage\n=====\n\nSimply include the recipe where you want Java installed.\n\nIf you would like to use the Sun flavor of Java, create a role and set the `java[install_flavor]` attribute to `'sun'`. \n\n % knife role show java\n {\n \"name\": \"java\",\n \"chef_type\": \"role\",\n \"json_class\": \"Chef::Role\",\n \"default_attributes\": {\n \"java\": {\n \"install_flavor\":\"sun\"\n }\n },\n \"description\": \"\",\n \"run_list\": [\n \"recipe[java]\"\n ],\n \"override_attributes\": {\n }\n }\n\nThe Sun flavor of Java is only supported on Debian and Ubuntu systems, the recipe will preseed the package and update java alternatives.\n\nLicense and Author\n==================\n\nAuthor:: Seth Chisamore ()\n\nCopyright:: 2008-2010, Opscode, 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", + "platforms": { + "debian": [ - ], - "centos": [ + ], + "fedora": [ - ], - "ubuntu": [ + ], + "centos": [ - ], - "redhat": [ + ], + "ubuntu": [ - ] - }, - "license": "Apache 2.0", - "version": "0.10.2", - "providing": { - }, - "recipes": { - "java": "Installs openjdk to provide Java" - }, - "replacing": { - }, - "name": "java", - "description": "Installs java via openjdk.", - "groupings": { - }, - "long_description": "= DESCRIPTION:\n\nInstalls Java and Ant. Uses OpenJDK, Sun's Java is deprecated in Ubuntu and may not be available in the future.\n\n= REQUIREMENTS:\n\nPlatform: Ubuntu, Debian, Red Hat, CentOS, Fedora.\n\nEnable the 'multiverse' repository on Ubuntu, 'non-free' on Debian or EPEL on RH/Cent/Fedora to get the Java package, or edit the default recipe to point at the Java package for your platform.\n\n= USAGE:\n\nSimply include the recipe where you want Java installed. Note the repository requirement above to get the right package. On Debian and Ubuntu systems, the recipe will preseed the package and update java alternaties.\n\n= LICENSE and AUTHOR:\n\nCopyright 2008-2010, Opscode, 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" - } \ No newline at end of file + ], + "redhat": [ + + ] + }, + "name": "java", + "version": "0.10.2", + "conflicting": { + }, + "license": "Apache 2.0", + "recipes": { + "java": "Installs openjdk to provide Java" + } +} \ No newline at end of file diff --git a/metadata.rb b/metadata.rb index bc75699..4d00ed3 100644 --- a/metadata.rb +++ b/metadata.rb @@ -2,11 +2,10 @@ maintainer_email "cookbooks@opscode.com" license "Apache 2.0" description "Installs java via openjdk." -long_description IO.read(File.join(File.dirname(__FILE__), 'README.rdoc')) +long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) version "0.10.2" - -recipe "java", "Installs openjdk to provide Java" - +depends "apt" %w{ debian ubuntu redhat centos fedora }.each do |os| supports os end +recipe "java", "Installs openjdk to provide Java" \ No newline at end of file diff --git a/recipes/default.rb b/recipes/default.rb index 66f5db0..132c1d4 100644 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -2,7 +2,7 @@ # Cookbook Name:: java # Recipe:: default # -# Copyright 2008-2009, Opscode, Inc. +# Copyright 2008-2010, Opscode, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,17 +16,48 @@ # See the License for the specific language governing permissions and # limitations under the License. # +include_recipe "java::#{node["java"]["install_flavor"]}" -java_pkg = value_for_platform( - [ "ubuntu", "debian" ] => { - "default" => "openjdk-6-jre-headless" - }, - [ "redhat", "centos", "fedora" ] => { - "default" => "java-1.6.0-openjdk" - }, - "default" => "openjdk-6-jre-headless" -) +current_java_version_pattern = (node.java.install_flavor == 'sun') ? /Java HotSpot\(TM\)/ : /^OpenJDK/ -package java_pkg do - action :install +# force ohai to run and pick up new languages.java data +ruby_block "reload_ohai" do + block do + o = Ohai::System.new + o.all_plugins + node.automatic_attrs.merge! o.data + end + action :nothing end + +execute "update-java-alternatives" do + command "update-java-alternatives --jre -s java-6-#{node["java"]["install_flavor"]}" + returns 0 + only_if do platform?("ubuntu", "debian") end + action :nothing + notifies :create, resources(:ruby_block => "reload_ohai") +end + +node.run_state[:java_pkgs].each do |pkg| + package pkg do + action :install + if platform?("ubuntu", "debian") + if node.java.install_flavor == "sun" + response_file "java.seed" + end + notifies :run, resources(:execute => "update-java-alternatives"), :delayed + end + end +end + +# re-run update-java-alternatives if our java flavor changes +if node.languages.attribute?("java") + unless node.languages.java.hotspot.name.match(current_java_version_pattern) + log "Java install_flavor has changed, re-running 'update-java-alternatives'" do + level :info + notifies :run, resources(:execute => "update-java-alternatives"), :delayed + end + end +end + +node.run_state.delete(:java_pkgs) diff --git a/recipes/openjdk.rb b/recipes/openjdk.rb new file mode 100644 index 0000000..f61402d --- /dev/null +++ b/recipes/openjdk.rb @@ -0,0 +1,27 @@ +# +# Cookbook Name:: java +# Recipe:: openjdk +# +# Copyright 2010, Opscode, 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.run_state[:java_pkgs] = value_for_platform( + [ "ubuntu", "debian" ] => { + "default" => ["openjdk-6-jre","default-jre","icedtea6-plugin"] # icedtea6-plugin included to make update-java-alternatives work correctly + }, + [ "redhat", "centos", "fedora" ] => { + "default" => ["java-1.6.0-openjdk"] + }, + "default" => ["openjdk-6-jre-headless","default-jre-headless","default-jre"] +) diff --git a/recipes/sun.rb b/recipes/sun.rb new file mode 100644 index 0000000..f26b3ff --- /dev/null +++ b/recipes/sun.rb @@ -0,0 +1,37 @@ +# +# Cookbook Name:: java +# Recipe:: sun +# +# Copyright 2010, Opscode, 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.run_state[:java_pkgs] = value_for_platform( + [ "ubuntu", "debian" ] => { + "default" => ["sun-java6-jre","default-jre-headless"] + }, + "default" => ["sun-java6-jre"] +) + +case node.platform +when "ubuntu" + include_recipe "apt" + + template "/etc/apt/sources.list.d/canonical.com.list" do + mode "0644" + source "canonical.com.list.erb" + notifies :run, resources(:execute => "apt-get update"), :immediately + end +else + Chef::Log.error("Installation of Sun Java packages are only supported on Ubuntu at this time.") +end \ No newline at end of file diff --git a/templates/ubuntu/canonical.com.list.erb b/templates/ubuntu/canonical.com.list.erb new file mode 100644 index 0000000..54b430a --- /dev/null +++ b/templates/ubuntu/canonical.com.list.erb @@ -0,0 +1,2 @@ +deb http://archive.canonical.com/ubuntu <%= node[:lsb][:codename] %> partner +deb-src http://archive.canonical.com/ubuntu <%= node[:lsb][:codename] %> partner \ No newline at end of file From 9b6faf5390771a4031979bf688ff2415ffd4f113 Mon Sep 17 00:00:00 2001 From: Seth Chisamore Date: Thu, 28 Oct 2010 20:48:05 -0400 Subject: [PATCH 25/32] final tweaks for combined jdk cookbook --- README.md | 2 +- attributes/default.rb | 4 ++-- metadata.json | 2 +- metadata.rb | 2 +- recipes/openjdk.rb | 6 +++--- recipes/sun.rb | 6 +++--- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 5c59e9e..b48bd3b 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Requirements Platform: * Debian, Ubuntu (OpenJDK, Sun) -* Red Hat, CentOS, Fedora (OpenJDK) +* CentOS, Red Hat, Fedora (OpenJDK) The following Opscode cookbooks are dependencies: diff --git a/attributes/default.rb b/attributes/default.rb index a08f5e5..0fd3aaa 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -19,8 +19,8 @@ default["java"]["install_flavor"] = "openjdk" case platform -when "redhat","centos","fedora" - set["java"]["java_home"] = "/usr/lib/jvm/default-java" +when "centos","redhat","fedora" + set["java"]["java_home"] = "/usr/lib/jvm/java" else set["java"]["java_home"] = "/usr/lib/jvm/default-java" end \ No newline at end of file diff --git a/metadata.json b/metadata.json index 41292e4..7faf0d1 100644 --- a/metadata.json +++ b/metadata.json @@ -19,7 +19,7 @@ }, "suggestions": { }, - "long_description": "Description\n===========\n\nInstalls a Java. Uses OpenJDK by default but supports installation of the Sun's Java (Debian and Ubuntu platforms only).\n\nRequirements\n============\n\nPlatform: \n\n* Debian, Ubuntu (OpenJDK, Sun)\n* Red Hat, CentOS, Fedora (OpenJDK)\n\nThe following Opscode cookbooks are dependencies:\n\n* apt\n\nAttributes\n==========\n\n* `node[\"java\"][\"install_flavor\"]` - Type of JRE you would like installed (\"sun\" or \"openjdk\"), default \"openjdk\".\n\nUsage\n=====\n\nSimply include the recipe where you want Java installed.\n\nIf you would like to use the Sun flavor of Java, create a role and set the `java[install_flavor]` attribute to `'sun'`. \n\n % knife role show java\n {\n \"name\": \"java\",\n \"chef_type\": \"role\",\n \"json_class\": \"Chef::Role\",\n \"default_attributes\": {\n \"java\": {\n \"install_flavor\":\"sun\"\n }\n },\n \"description\": \"\",\n \"run_list\": [\n \"recipe[java]\"\n ],\n \"override_attributes\": {\n }\n }\n\nThe Sun flavor of Java is only supported on Debian and Ubuntu systems, the recipe will preseed the package and update java alternatives.\n\nLicense and Author\n==================\n\nAuthor:: Seth Chisamore ()\n\nCopyright:: 2008-2010, Opscode, 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", + "long_description": "Description\n===========\n\nInstalls a Java. Uses OpenJDK by default but supports installation of the Sun's Java (Debian and Ubuntu platforms only).\n\nRequirements\n============\n\nPlatform: \n\n* Debian, Ubuntu (OpenJDK, Sun)\n* CentOS, Red Hat, Fedora (OpenJDK)\n\nThe following Opscode cookbooks are dependencies:\n\n* apt\n\nAttributes\n==========\n\n* `node[\"java\"][\"install_flavor\"]` - Type of JRE you would like installed (\"sun\" or \"openjdk\"), default \"openjdk\".\n\nUsage\n=====\n\nSimply include the recipe where you want Java installed.\n\nIf you would like to use the Sun flavor of Java, create a role and set the `java[install_flavor]` attribute to `'sun'`. \n\n % knife role show java\n {\n \"name\": \"java\",\n \"chef_type\": \"role\",\n \"json_class\": \"Chef::Role\",\n \"default_attributes\": {\n \"java\": {\n \"install_flavor\":\"sun\"\n }\n },\n \"description\": \"\",\n \"run_list\": [\n \"recipe[java]\"\n ],\n \"override_attributes\": {\n }\n }\n\nThe Sun flavor of Java is only supported on Debian and Ubuntu systems, the recipe will preseed the package and update java alternatives.\n\nLicense and Author\n==================\n\nAuthor:: Seth Chisamore ()\n\nCopyright:: 2008-2010, Opscode, 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", "platforms": { "debian": [ diff --git a/metadata.rb b/metadata.rb index 4d00ed3..99927ce 100644 --- a/metadata.rb +++ b/metadata.rb @@ -5,7 +5,7 @@ long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) version "0.10.2" depends "apt" -%w{ debian ubuntu redhat centos fedora }.each do |os| +%w{ debian ubuntu centos redhat fedora }.each do |os| supports os end recipe "java", "Installs openjdk to provide Java" \ No newline at end of file diff --git a/recipes/openjdk.rb b/recipes/openjdk.rb index f61402d..5a3700b 100644 --- a/recipes/openjdk.rb +++ b/recipes/openjdk.rb @@ -17,11 +17,11 @@ # limitations under the License. node.run_state[:java_pkgs] = value_for_platform( - [ "ubuntu", "debian" ] => { + ["debian","ubuntu"] => { "default" => ["openjdk-6-jre","default-jre","icedtea6-plugin"] # icedtea6-plugin included to make update-java-alternatives work correctly }, - [ "redhat", "centos", "fedora" ] => { - "default" => ["java-1.6.0-openjdk"] + ["centos","redhat","fedora"] => { + "default" => ["java-1.6.0-openjdk","java-1.6.0-openjdk-devel"] }, "default" => ["openjdk-6-jre-headless","default-jre-headless","default-jre"] ) diff --git a/recipes/sun.rb b/recipes/sun.rb index f26b3ff..0d43839 100644 --- a/recipes/sun.rb +++ b/recipes/sun.rb @@ -17,14 +17,14 @@ # limitations under the License. node.run_state[:java_pkgs] = value_for_platform( - [ "ubuntu", "debian" ] => { + ["debian","ubuntu"] => { "default" => ["sun-java6-jre","default-jre-headless"] }, "default" => ["sun-java6-jre"] ) case node.platform -when "ubuntu" +when "debian","ubuntu" include_recipe "apt" template "/etc/apt/sources.list.d/canonical.com.list" do @@ -33,5 +33,5 @@ notifies :run, resources(:execute => "apt-get update"), :immediately end else - Chef::Log.error("Installation of Sun Java packages are only supported on Ubuntu at this time.") + Chef::Log.error("Installation of Sun Java packages are only supported on Debian/Ubuntu at this time.") end \ No newline at end of file From f4941e671999cbcdad7b4f89f02fb7c68282a60d Mon Sep 17 00:00:00 2001 From: Hedgehog Date: Mon, 6 Dec 2010 15:47:22 +1100 Subject: [PATCH 26/32] Merge branch 'master' of git://github.com/opscode/cookbooks From 9ebb42c180390500292915da2ea3d50b5da4e1e0 Mon Sep 17 00:00:00 2001 From: Hedgehog Date: Mon, 6 Dec 2010 15:47:22 +1100 Subject: [PATCH 27/32] Merge branch 'master' of git://github.com/opscode/cookbooks From a20f38047799a6f61e34463948b8de70432a4a17 Mon Sep 17 00:00:00 2001 From: Seth Chisamore Date: Fri, 10 Dec 2010 12:31:58 -0500 Subject: [PATCH 28/32] force alternative update and ohai reload immediately --- recipes/default.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/default.rb b/recipes/default.rb index 132c1d4..08d423a 100644 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -35,7 +35,7 @@ returns 0 only_if do platform?("ubuntu", "debian") end action :nothing - notifies :create, resources(:ruby_block => "reload_ohai") + notifies :create, resources(:ruby_block => "reload_ohai"), :immediately end node.run_state[:java_pkgs].each do |pkg| @@ -55,7 +55,7 @@ unless node.languages.java.hotspot.name.match(current_java_version_pattern) log "Java install_flavor has changed, re-running 'update-java-alternatives'" do level :info - notifies :run, resources(:execute => "update-java-alternatives"), :delayed + notifies :run, resources(:execute => "update-java-alternatives"), :immediately end end end From f8e67c4a8e2b58f440e48acbe1ffb881a83b6a5c Mon Sep 17 00:00:00 2001 From: Seth Chisamore Date: Fri, 10 Dec 2010 12:34:29 -0500 Subject: [PATCH 29/32] bumped versions and generated metadata for release --- metadata.json | 2 +- metadata.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/metadata.json b/metadata.json index 7faf0d1..f4c6d2e 100644 --- a/metadata.json +++ b/metadata.json @@ -38,7 +38,7 @@ ] }, "name": "java", - "version": "0.10.2", + "version": "0.10.3", "conflicting": { }, "license": "Apache 2.0", diff --git a/metadata.rb b/metadata.rb index 99927ce..03de338 100644 --- a/metadata.rb +++ b/metadata.rb @@ -3,7 +3,7 @@ license "Apache 2.0" description "Installs java via openjdk." long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) -version "0.10.2" +version "0.10.3" depends "apt" %w{ debian ubuntu centos redhat fedora }.each do |os| supports os From 882235f26bd2a1fd04031403451d7388c57e908e Mon Sep 17 00:00:00 2001 From: Seth Chisamore Date: Fri, 10 Dec 2010 12:31:58 -0500 Subject: [PATCH 30/32] force alternative update and ohai reload immediately --- recipes/default.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/default.rb b/recipes/default.rb index 132c1d4..08d423a 100644 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -35,7 +35,7 @@ returns 0 only_if do platform?("ubuntu", "debian") end action :nothing - notifies :create, resources(:ruby_block => "reload_ohai") + notifies :create, resources(:ruby_block => "reload_ohai"), :immediately end node.run_state[:java_pkgs].each do |pkg| @@ -55,7 +55,7 @@ unless node.languages.java.hotspot.name.match(current_java_version_pattern) log "Java install_flavor has changed, re-running 'update-java-alternatives'" do level :info - notifies :run, resources(:execute => "update-java-alternatives"), :delayed + notifies :run, resources(:execute => "update-java-alternatives"), :immediately end end end From bd556bb587851f008cbd7f33ccca518a3dceb198 Mon Sep 17 00:00:00 2001 From: Seth Chisamore Date: Fri, 10 Dec 2010 12:34:29 -0500 Subject: [PATCH 31/32] bumped versions and generated metadata for release --- metadata.json | 2 +- metadata.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/metadata.json b/metadata.json index 7faf0d1..f4c6d2e 100644 --- a/metadata.json +++ b/metadata.json @@ -38,7 +38,7 @@ ] }, "name": "java", - "version": "0.10.2", + "version": "0.10.3", "conflicting": { }, "license": "Apache 2.0", diff --git a/metadata.rb b/metadata.rb index 99927ce..03de338 100644 --- a/metadata.rb +++ b/metadata.rb @@ -3,7 +3,7 @@ license "Apache 2.0" description "Installs java via openjdk." long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) -version "0.10.2" +version "0.10.3" depends "apt" %w{ debian ubuntu centos redhat fedora }.each do |os| supports os From 7adb6b86d5744dbf84c4462d2aab96fe60d85198 Mon Sep 17 00:00:00 2001 From: Hedgehog Date: Mon, 7 Feb 2011 23:03:25 +1100 Subject: [PATCH 32/32] Initial commit