Permalink
Browse files

final tweaks for combined jdk cookbook

  • Loading branch information...
schisamo committed Oct 29, 2010
1 parent cbd222e commit 9a5e58948e846ecfcb7c41332170f3cdc0937ba7
Showing with 11 additions and 11 deletions.
  1. +1 −1 java/README.md
  2. +2 −2 java/attributes/default.rb
  3. +1 −1 java/metadata.json
  4. +1 −1 java/metadata.rb
  5. +3 −3 java/recipes/openjdk.rb
  6. +3 −3 java/recipes/sun.rb
View
@@ -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:
@@ -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
View
@@ -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 (<schisamo@opscode.com>)\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 (<schisamo@opscode.com>)\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": [
View
@@ -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"
View
@@ -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"]
)
View
@@ -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

0 comments on commit 9a5e589

Please sign in to comment.