Skip to content

Commit

Permalink
deprecated java_sun cookbook
Browse files Browse the repository at this point in the history
  • Loading branch information
schisamo committed Oct 29, 2010
1 parent 9a5e589 commit c7e5a7c
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 81 deletions.
8 changes: 4 additions & 4 deletions java_sun/README.rdoc
@@ -1,16 +1,16 @@
= DESCRIPTION:

Installs Sun Java.
THIS COOKBOOK HAS BEEN DEPRECATED. Please use the `java` cookbook with the proper `install_flavor` attribute set.

The default recipe in this cookbook simply points to the `java::default` recipe with the proper `node["java"]["install_flavor"]` attribute set to `sun`

= REQUIREMENTS:

Platform: Ubuntu, Debian.

Enable the 'multiverse' repository on Ubuntu, 'non-free' on Debian, 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.
Simply include the recipe where you want Sun Java installed.

= LICENSE and AUTHOR:

Expand Down
11 changes: 0 additions & 11 deletions java_sun/files/default/java.seed

This file was deleted.

69 changes: 36 additions & 33 deletions java_sun/metadata.json
@@ -1,36 +1,39 @@
{
"recommendations": {
},
"attributes": {
},
"maintainer": "Opscode, Inc.",
"suggestions": {
},
"dependencies": {
},
"maintainer_email": "cookbooks@opscode.com",
"conflicting": {
},
"platforms": {
"debian": [
"providing": {
},
"maintainer": "Opscode, Inc.",
"replacing": {
},
"description": "Installs Sun java",
"maintainer_email": "cookbooks@opscode.com",
"groupings": {
},
"attributes": {
},
"recommendations": {
},
"dependencies": {
"java": [

],
"ubuntu": [
]
},
"suggestions": {
},
"long_description": "= DESCRIPTION:\n\nTHIS COOKBOOK HAS BEEN DEPRECATED. Please use the `java` cookbook with the proper `install_flavor` attribute set.\n\nThe default recipe in this cookbook simply points to the `java::default` recipe with the proper `node[\"java\"][\"install_flavor\"]` attribute set to `sun`\n\n= REQUIREMENTS:\n\nPlatform: Ubuntu, Debian.\n\n= USAGE:\n\nSimply include the recipe where you want Sun Java installed.\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",
"platforms": {
"debian": [

]
},
"license": "Apache 2.0",
"version": "0.9.2",
"providing": {
},
"recipes": {
"java_sun": "Installs Sun Java using preseed to accept terms"
},
"replacing": {
},
"name": "java_sun",
"description": "Installs Sun java",
"groupings": {
},
"long_description": "= DESCRIPTION:\n\nInstalls Sun Java.\n\n= REQUIREMENTS:\n\nPlatform: Ubuntu, Debian.\n\nEnable the 'multiverse' repository on Ubuntu, 'non-free' on Debian, 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"
}
],
"ubuntu": [

]
},
"name": "java_sun",
"version": "0.9.2",
"conflicting": {
},
"license": "Apache 2.0",
"recipes": {
"java_sun": "Installs Sun Java using preseed to accept terms"
}
}
2 changes: 2 additions & 0 deletions java_sun/metadata.rb
Expand Up @@ -5,6 +5,8 @@
long_description IO.read(File.join(File.dirname(__FILE__), 'README.rdoc'))
version "0.9.2"

depends 'java'

recipe "java_sun", "Installs Sun Java using preseed to accept terms"

%w{ debian ubuntu }.each do |os|
Expand Down
34 changes: 3 additions & 31 deletions java_sun/recipes/default.rb
Expand Up @@ -17,36 +17,8 @@
# limitations under the License.
#

java_pkg = value_for_platform(
[ "ubuntu", "debian" ] => {
"default" => "sun-java6-jdk"
},
"default" => "sun-java6-jdk"
)
Chef::Log.warn("This recipe will be deprecated soon, please use java::default")

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
end
node["java"]["install_flavor"] = "sun"

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
include_recipe "java"
2 changes: 0 additions & 2 deletions java_sun/templates/default/canonical.com.list.erb

This file was deleted.

0 comments on commit c7e5a7c

Please sign in to comment.