Permalink
Browse files

add jpackage cookbook

  • Loading branch information...
1 parent 7325fa1 commit 421a3bd3b9c7f5e09df596234c3ff88aaea6b884 @schisamo schisamo committed Oct 29, 2010
View
@@ -0,0 +1,50 @@
+Description
+===========
+
+Configures and installs JPackage. Used to install Java-related packages on Red Hat flavored linuxes
+
+The JPackage Project has two primary goals:
+
+* To provide a coherent set of Java software packages for Linux, satisfying all quality requirements of other applications.
+* To establish an efficient and robust policy for Java software packaging and installation.
+
+Requirements
+============
+
+Platform:
+
+* CentOS, Red Hat, Fedora
+
+The following Opscode cookbooks are dependencies:
+
+* java
+
+Attributes
+==========
+
+* `node["jpackage"]["version"]` - The JPackage version to install, default "5.0".
+
+Usage
+=====
+
+Simply include the recipe where you want JPackage installed.
+
+License and Author
+==================
+
+Author:: Seth Chisamore (<schisamo@opscode.com>)
+
+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.
+
@@ -0,0 +1,20 @@
+#
+# Cookbook Name:: jpackage
+# 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[:jpackage][:version] = "5.0"
View
@@ -0,0 +1,41 @@
+{
+ "providing": {
+ },
+ "maintainer": "Opscode, Inc.",
+ "replacing": {
+ },
+ "description": "Installs/Configures jpackage",
+ "maintainer_email": "cookbooks@opscode.com",
+ "groupings": {
+ },
+ "attributes": {
+ },
+ "recommendations": {
+ },
+ "dependencies": {
+ "java": [
+
+ ]
+ },
+ "suggestions": {
+ },
+ "long_description": "Description\n===========\n\nConfigures and installs JPackage. Used to install Java-related packages on Red Hat flavored linuxes\n\nThe JPackage Project has two primary goals:\n\n* To provide a coherent set of Java software packages for Linux, satisfying all quality requirements of other applications.\n* To establish an efficient and robust policy for Java software packaging and installation.\n\nRequirements\n============\n\nPlatform: \n\n* CentOS, Red Hat, Fedora\n\nThe following Opscode cookbooks are dependencies:\n\n* java\n\nAttributes\n==========\n\n* `node[\"jpackage\"][\"version\"]` - The JPackage version to install, default \"5.0\".\n\nUsage\n=====\n\nSimply include the recipe where you want JPackage installed.\n\nLicense and Author\n==================\n\nAuthor:: Seth Chisamore (<schisamo@opscode.com>)\n\nCopyright 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\n",
+ "platforms": {
+ "fedora": [
+
+ ],
+ "centos": [
+
+ ],
+ "redhat": [
+
+ ]
+ },
+ "name": "jpackage",
+ "version": "0.0.1",
+ "conflicting": {
+ },
+ "license": "Apache 2.0",
+ "recipes": {
+ }
+}
View
@@ -0,0 +1,12 @@
+maintainer "Opscode, Inc."
+maintainer_email "cookbooks@opscode.com"
+license "Apache 2.0"
+description "Installs/Configures jpackage"
+long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
+version "0.0.1"
+
+depends "java"
+
+%w{ centos redhat fedora }.each do |os|
+ supports os
+end
@@ -0,0 +1,58 @@
+#
+# Cookbook Name:: jpackage
+# Recipe:: 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.
+#
+
+include_recipe "java"
+
+case node[:platform]
+when "redhat","centos","fedora"
+
+ package "yum-priorities" do
+ action :install
+ end
+
+ execute "yum clean all" do
+ action :nothing
+ end
+
+ template "/etc/yum.repos.d/jpackage#{node[:jpackage][:version].sub(/\./,'')}.repo" do
+ mode "0644"
+ source "jpackage.repo.erb"
+ notifies :run, resources(:execute => "yum clean all"), :immediately
+ end
+
+ # fix the jpackage-utils issue
+ # https://bugzilla.redhat.com/show_bug.cgi?id=497213
+ # http://plone.lucidsolutions.co.nz/linux/centos/jpackage-jpackage-utils-compatibility-for-centos-5.x
+ remote_file "#{Chef::Config[:file_cache_path]}/jpackage-utils-compat-el5-0.0.1-1.noarch.rpm" do
+ checksum "c61f2a97e4cda0781635310a6a595e978a2e48e64cf869df7d339f0db6a28093"
+ source "http://plone.lucidsolutions.co.nz/linux/centos/images/jpackage-utils-compat-el5-0.0.1-1.noarch.rpm"
+ mode "0644"
+ end
+
+ package "jpackage-utils-compat-el5" do
+ source "#{Chef::Config[:file_cache_path]}/jpackage-utils-compat-el5-0.0.1-1.noarch.rpm"
+ options "--nogpgcheck"
+ version "0.0.1"
+ action :install
+ end
+
+ package "jpackage-utils" do
+ action :install
+ end
+end
@@ -0,0 +1,49 @@
+[jpackage-generic-<%= node["jpackage"]["version"] %>]
+name=JPackage (free), generic
+mirrorlist=http://www.jpackage.org/mirrorlist.php?dist=generic&type=free&release=<%= node["jpackage"]["version"] %>
+failovermethod=priority
+gpgcheck=1
+gpgkey=http://www.jpackage.org/jpackage.asc
+enabled=1
+
+[jpackage-rhel-<%= node["jpackage"]["version"] %>]
+name=JPackage (free) for Red Hat Enterprise Linux $releasever
+mirrorlist=http://www.jpackage.org/mirrorlist.php?dist=redhat-el-$releasever&type=free&release=<%= node["jpackage"]["version"] %>
+failovermethod=priority
+gpgcheck=1
+gpgkey=http://www.jpackage.org/jpackage.asc
+enabled=1
+
+[jpackage-generic-<%= node["jpackage"]["version"] %>-nonfree]
+name=JPackage (non-free), generic
+mirrorlist=http://www.jpackage.org/jpackage_generic_nonfree_<%= node["jpackage"]["version"] %>.txt
+failovermethod=priority
+gpgcheck=1
+gpgkey=http://www.jpackage.org/jpackage.asc
+enabled=1
+
+# Updates
+
+[jpackage-generic-<%= node["jpackage"]["version"] %>-updates]
+name=JPackage (free), generic
+mirrorlist=http://www.jpackage.org/mirrorlist.php?dist=generic&type=free&release=<%= node["jpackage"]["version"] %>-updates
+failovermethod=priority
+gpgcheck=1
+gpgkey=http://www.jpackage.org/jpackage.asc
+enabled=1
+
+[jpackage-rhel-<%= node["jpackage"]["version"] %>-updates]
+name=JPackage (free) for Red Hat Enterprise Linux $releasever
+mirrorlist=http://www.jpackage.org/mirrorlist.php?dist=redhat-el-$releasever&type=free&release=<%= node["jpackage"]["version"] %>-updates
+failovermethod=priority
+gpgcheck=1
+gpgkey=http://www.jpackage.org/jpackage.asc
+enabled=1
+
+[jpackage-generic-<%= node["jpackage"]["version"] %>-nonfree-updates]
+name=JPackage (non-free), generic
+mirrorlist=http://www.jpackage.org/jpackage_generic_nonfree_<%= node["jpackage"]["version"] %>-updates.txt
+failovermethod=priority
+gpgcheck=1
+gpgkey=http://www.jpackage.org/jpackage.asc
+enabled=1
@@ -0,0 +1,49 @@
+[jpackage-generic-<%= node["jpackage"]["version"] %>]
+name=JPackage (free), generic
+mirrorlist=http://www.jpackage.org/mirrorlist.php?dist=generic&type=free&release=<%= node["jpackage"]["version"] %>
+failovermethod=priority
+gpgcheck=1
+gpgkey=http://www.jpackage.org/jpackage.asc
+enabled=1
+
+[jpackage-fc-<%= node["jpackage"]["version"] %>]
+name=JPackage (free) for Fedora Core $releasever
+mirrorlist=http://www.jpackage.org/mirrorlist.php?dist=fedora-$releasever&type=free&release=<%= node["jpackage"]["version"] %>
+failovermethod=priority
+gpgcheck=1
+gpgkey=http://www.jpackage.org/jpackage.asc
+enabled=1
+
+[jpackage-generic-<%= node["jpackage"]["version"] %>-nonfree]
+name=JPackage (non-free), generic
+mirrorlist=http://www.jpackage.org/jpackage_generic_nonfree_<%= node["jpackage"]["version"] %>.txt
+failovermethod=priority
+gpgcheck=1
+gpgkey=http://www.jpackage.org/jpackage.asc
+enabled=1
+
+# Updates
+
+[jpackage-generic-<%= node["jpackage"]["version"] %>-updates]
+name=JPackage (free), generic
+mirrorlist=http://www.jpackage.org/mirrorlist.php?dist=generic&type=free&release=<%= node["jpackage"]["version"] %>-updates
+failovermethod=priority
+gpgcheck=1
+gpgkey=http://www.jpackage.org/jpackage.asc
+enabled=1
+
+[jpackage-fc-<%= node["jpackage"]["version"] %>-updates]
+name=JPackage (free) for Fedora Core $releasever
+mirrorlist=http://www.jpackage.org/mirrorlist.php?dist=fedora-$releasever&type=free&release=<%= node["jpackage"]["version"] %>-updates
+failovermethod=priority
+gpgcheck=1
+gpgkey=http://www.jpackage.org/jpackage.asc
+enabled=1
+
+[jpackage-generic-<%= node["jpackage"]["version"] %>-nonfree-updates]
+name=JPackage (non-free), generic
+mirrorlist=http://www.jpackage.org/jpackage_generic_nonfree_<%= node["jpackage"]["version"] %>-updates.txt
+failovermethod=priority
+gpgcheck=1
+gpgkey=http://www.jpackage.org/jpackage.asc
+enabled=1

0 comments on commit 421a3bd

Please sign in to comment.