Skip to content

Commit 5dcda46

Browse files
committed
final tweaks for combined jdk cookbook
1 parent 86df17f commit 5dcda46

6 files changed

Lines changed: 11 additions & 11 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Requirements
99
Platform:
1010

1111
* Debian, Ubuntu (OpenJDK, Sun)
12-
* Red Hat, CentOS, Fedora (OpenJDK)
12+
* CentOS, Red Hat, Fedora (OpenJDK)
1313

1414
The following Opscode cookbooks are dependencies:
1515

attributes/default.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
default["java"]["install_flavor"] = "openjdk"
2020

2121
case platform
22-
when "redhat","centos","fedora"
23-
set["java"]["java_home"] = "/usr/lib/jvm/default-java"
22+
when "centos","redhat","fedora"
23+
set["java"]["java_home"] = "/usr/lib/jvm/java"
2424
else
2525
set["java"]["java_home"] = "/usr/lib/jvm/default-java"
2626
end

metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
},
2020
"suggestions": {
2121
},
22-
"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 (<[email protected]>)\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",
22+
"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 (<[email protected]>)\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",
2323
"platforms": {
2424
"debian": [
2525

metadata.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
66
version "0.10.2"
77
depends "apt"
8-
%w{ debian ubuntu redhat centos fedora }.each do |os|
8+
%w{ debian ubuntu centos redhat fedora }.each do |os|
99
supports os
1010
end
1111
recipe "java", "Installs openjdk to provide Java"

recipes/openjdk.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
# limitations under the License.
1818

1919
node.run_state[:java_pkgs] = value_for_platform(
20-
[ "ubuntu", "debian" ] => {
20+
["debian","ubuntu"] => {
2121
"default" => ["openjdk-6-jre","default-jre","icedtea6-plugin"] # icedtea6-plugin included to make update-java-alternatives work correctly
2222
},
23-
[ "redhat", "centos", "fedora" ] => {
24-
"default" => ["java-1.6.0-openjdk"]
23+
["centos","redhat","fedora"] => {
24+
"default" => ["java-1.6.0-openjdk","java-1.6.0-openjdk-devel"]
2525
},
2626
"default" => ["openjdk-6-jre-headless","default-jre-headless","default-jre"]
2727
)

recipes/sun.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
1717
# limitations under the License.
1818

1919
node.run_state[:java_pkgs] = value_for_platform(
20-
[ "ubuntu", "debian" ] => {
20+
["debian","ubuntu"] => {
2121
"default" => ["sun-java6-jre","default-jre-headless"]
2222
},
2323
"default" => ["sun-java6-jre"]
2424
)
2525

2626
case node.platform
27-
when "ubuntu"
27+
when "debian","ubuntu"
2828
include_recipe "apt"
2929

3030
template "/etc/apt/sources.list.d/canonical.com.list" do
@@ -33,5 +33,5 @@
3333
notifies :run, resources(:execute => "apt-get update"), :immediately
3434
end
3535
else
36-
Chef::Log.error("Installation of Sun Java packages are only supported on Ubuntu at this time.")
36+
Chef::Log.error("Installation of Sun Java packages are only supported on Debian/Ubuntu at this time.")
3737
end

0 commit comments

Comments
 (0)