melissadata 0.0.1 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +2 -0
- data/Gemfile.lock +46 -16
- data/README.md +50 -2
- data/Rakefile +58 -23
- data/Vagrantfile +12 -12
- data/bin/md_tcp_server +5 -0
- data/bin/md_unix_server +5 -0
- data/chef/cookbooks/apt/README.md +109 -0
- data/chef/cookbooks/apt/files/default/apt-cacher +9 -0
- data/chef/cookbooks/apt/files/default/apt-cacher.conf +144 -0
- data/chef/cookbooks/apt/files/default/apt-proxy-v2.conf +50 -0
- data/chef/cookbooks/apt/metadata.json +34 -0
- data/chef/cookbooks/apt/metadata.rb +13 -0
- data/chef/cookbooks/apt/providers/repository.rb +72 -0
- data/chef/cookbooks/apt/recipes/cacher-client.rb +37 -0
- data/chef/cookbooks/apt/recipes/cacher.rb +45 -0
- data/chef/cookbooks/apt/recipes/default.rb +33 -0
- data/chef/cookbooks/apt/resources/repository.rb +30 -0
- data/chef/cookbooks/build-essential/README.md +24 -0
- data/chef/cookbooks/build-essential/metadata.json +35 -0
- data/chef/cookbooks/build-essential/metadata.rb +10 -0
- data/chef/cookbooks/build-essential/recipes/default.rb +45 -0
- data/chef/cookbooks/melissadata/attributes/default.rb +5 -0
- data/chef/cookbooks/melissadata/metadata.rb +8 -0
- data/chef/cookbooks/melissadata/recipes/default.rb +37 -0
- data/chef/cookbooks/melissadata/templates/default/Makefile.erb +39 -0
- data/chef/cookbooks/melissadata/templates/default/md_tcp_server.init.erb +82 -0
- data/chef/cookbooks/melissadata/templates/default/md_unix_server.init.erb +81 -0
- data/chef/cookbooks/rvm/recipes/default.rb +1 -0
- data/chef/cookbooks/rvm/recipes/r187.rb +6 -0
- data/chef/cookbooks/rvm/recipes/r192.rb +6 -0
- data/chef/cookbooks/rvm/recipes/system.rb +28 -0
- data/chef/cookbooks/ubuntu/attributes/default.rb +24 -0
- data/chef/cookbooks/ubuntu/metadata.json +36 -0
- data/chef/cookbooks/ubuntu/metadata.rb +8 -0
- data/chef/cookbooks/ubuntu/recipes/default.rb +27 -0
- data/chef/cookbooks/ubuntu/templates/default/sources.list.erb +15 -0
- data/lib/melissadata.rb +1 -2
- data/lib/melissadata/client.rb +8 -0
- data/lib/melissadata/client/base.rb +56 -0
- data/lib/melissadata/client/tcp.rb +28 -0
- data/lib/melissadata/client/unix.rb +22 -0
- data/lib/melissadata/client/vagrant.rb +9 -0
- data/lib/melissadata/command.rb +1 -0
- data/lib/melissadata/command/base.rb +0 -1
- data/lib/melissadata/command/compile.rb +37 -0
- data/lib/melissadata/command/package.rb +32 -73
- data/lib/melissadata/constants.rb +6 -5
- data/lib/melissadata/melissadata.rb +26 -91
- data/lib/melissadata/native_object.rb +0 -8
- data/lib/melissadata/native_object/address.rb +2 -0
- data/lib/melissadata/native_object/base.rb +18 -5
- data/lib/melissadata/native_object/email.rb +2 -0
- data/lib/melissadata/native_object/geo.rb +2 -0
- data/lib/melissadata/native_object/ip_locator.rb +2 -0
- data/lib/melissadata/native_object/name.rb +2 -0
- data/lib/melissadata/native_object/phone.rb +2 -0
- data/lib/melissadata/server.rb +10 -0
- data/lib/melissadata/server/base.rb +145 -0
- data/lib/melissadata/server/tcp.rb +22 -0
- data/lib/melissadata/server/unix.rb +24 -0
- data/lib/melissadata/vagrant_plugin.rb +23 -0
- data/lib/melissadata/vagrant_plugin/actions.rb +9 -0
- data/lib/melissadata/vagrant_plugin/actions/base.rb +60 -0
- data/lib/melissadata/vagrant_plugin/actions/install.rb +78 -0
- data/lib/melissadata/vagrant_plugin/actions/update.rb +22 -0
- data/lib/melissadata/vagrant_plugin/command.rb +21 -0
- data/lib/melissadata/vagrant_plugin/config.rb +18 -0
- data/lib/melissadata/version.rb +1 -1
- data/locales/en.yml +16 -0
- data/melissadata.gemspec +11 -12
- data/pkg/melissadata-0.0.1.gem +0 -0
- data/spec/helpers/vagrant_helpers.rb +17 -0
- data/spec/melissadata/command/package_spec.rb +1 -1
- data/spec/melissadata/vagrant_plugin/actions/install_spec.rb +40 -0
- data/spec/melissadata/vagrant_plugin/config_spec.rb +17 -0
- data/spec/spec_helper.rb +12 -7
- metadata +201 -228
- data/bin/md +0 -4
- data/bin/md-rpc +0 -9
- data/bin/md-server +0 -18
- data/bin/melissadata +0 -4
- data/lib/melissadata/native_object/client.rb +0 -33
- data/lib/melissadata/prev/command_old.rb +0 -80
- data/lib/melissadata/prev/shared_objects.rb +0 -54
- data/lib/melissadata/rpc.rb +0 -39
- data/pkg/melissa-data-0.0.1.gem +0 -0
- data/pkg/melissa-data-0.0.2.gem +0 -0
- data/pkg/melissa-data-0.0.3.gem +0 -0
- data/templates/config.rb +0 -20
- data/templates/locales/en.yml +0 -4
@@ -0,0 +1,50 @@
|
|
1
|
+
[DEFAULT]
|
2
|
+
;; All times are in seconds, but you can add a suffix
|
3
|
+
;; for minutes(m), hours(h) or days(d)
|
4
|
+
|
5
|
+
;; commented out address so apt-proxy will listen on all IPs
|
6
|
+
;; address = 127.0.0.1
|
7
|
+
port = 9999
|
8
|
+
cache_dir = /var/cache/apt-proxy
|
9
|
+
|
10
|
+
;; Control files (Packages/Sources/Contents) refresh rate
|
11
|
+
min_refresh_delay = 1s
|
12
|
+
complete_clientless_downloads = 1
|
13
|
+
|
14
|
+
;; Debugging settings.
|
15
|
+
debug = all:4 db:0
|
16
|
+
|
17
|
+
time = 30
|
18
|
+
passive_ftp = on
|
19
|
+
|
20
|
+
;;--------------------------------------------------------------
|
21
|
+
;; Cache housekeeping
|
22
|
+
|
23
|
+
cleanup_freq = 1d
|
24
|
+
max_age = 120d
|
25
|
+
max_versions = 3
|
26
|
+
|
27
|
+
;;---------------------------------------------------------------
|
28
|
+
;; Backend servers
|
29
|
+
;;
|
30
|
+
;; Place each server in its own [section]
|
31
|
+
|
32
|
+
[ubuntu]
|
33
|
+
; Ubuntu archive
|
34
|
+
backends =
|
35
|
+
http://us.archive.ubuntu.com/ubuntu
|
36
|
+
|
37
|
+
[ubuntu-security]
|
38
|
+
; Ubuntu security updates
|
39
|
+
backends = http://security.ubuntu.com/ubuntu
|
40
|
+
|
41
|
+
[debian]
|
42
|
+
;; Backend servers, in order of preference
|
43
|
+
backends =
|
44
|
+
http://debian.osuosl.org/debian/
|
45
|
+
|
46
|
+
[security]
|
47
|
+
;; Debian security archive
|
48
|
+
backends =
|
49
|
+
http://security.debian.org/debian-security
|
50
|
+
http://ftp2.de.debian.org/debian-security
|
@@ -0,0 +1,34 @@
|
|
1
|
+
{
|
2
|
+
"name": "apt",
|
3
|
+
"description": "Configures apt and apt services and an LWRP for managing apt repositories",
|
4
|
+
"long_description": "Description\n===========\n\nConfigures various APT components on Debian-like systems. Also includes a LWRP.\n\nRecipes\n=======\n\ndefault\n-------\nThe default recipe runs apt-get update during the Compile Phase of the Chef run to ensure that the system's package cache is updated with the latest. It is recommended that this recipe appear first in a node's run list (directly or through a role) to ensure that when installing packages, Chef will be able to download the latest version available on the remote APT repository.\n\nThis recipe also sets up a local cache directory for preseeding packages.\n\ncacher\n------\nInstalls the apt-cacher package and service so the system can provide APT caching. You can check the usage report at http://{hostname}:3142/report. The cacher recipe includes the `cacher-client` recipe, so it helps seed itself.\n\ncacher-client\n-------------\nConfigures the node to use the apt-cacher server as a client.\n\nResources/Providers\n===================\n\nThis LWRP provides an easy way to manage additional APT repositories.\n\n# Actions\n\n- :add: creates a repository file and builds the repository listing\n- :remove: removes the repository file\n\n# Attribute Parameters\n\n- repo_name: name attribute. The name of the channel to discover\n- uri: the base of the Debian distribution\n- distribution: this is usually your release's codename...ie something like `karmic`, `lucid` or `maverick`\n- components: package groupings..when it doubt use `main`\n- deb_src: whether or not to add the repository as a source repo as well\n- key_server: the GPG keyserver where the key for the repo should be retrieved\n- key: if a `key_server` is provided, this is assumed to be the fingerprint, otherwise it is the URI to the GPG key for the repo\n\n# Example\n\n # add the Zenoss repo\n apt_repository \"zenoss\" do\n uri \"http://dev.zenoss.org/deb\"\n components [\"main\",\"stable\"]\n action :add\n end\n \n # add the Nginx PPA; grab key from keyserver\n apt_repository \"nginx-php\" do\n uri \"http://ppa.launchpad.net/nginx/php5/ubuntu\"\n distribution node['lsb']['codename']\n components [\"main\"]\n keyserver \"keyserver.ubuntu.com\"\n key \"C300EE8C\"\n action :add\n end\n \n # add the Cloudkick Repo\n apt_repository \"cloudkick\" do\n uri \"http://packages.cloudkick.com/ubuntu\"\n distribution node['lsb']['codename']\n components [\"main\"]\n key \"http://packages.cloudkick.com/cloudkick.packages.key\"\n action :add\n end\n \n # remove Zenoss repo\n apt_repository \"zenoss\" do\n action :remove\n end\n \nUsage\n=====\n\nPut `recipe[apt]` first in the run list. If you have other recipes that you want to use to configure how apt behaves, like new sources, notify the execute resource to run, e.g.:\n\n template \"/etc/apt/sources.list.d/my_apt_sources.list\" do\n notifies :run, resources(:execute => \"apt-get update\"), :immediately\n end\n\nThe above will run during execution phase since it is a normal template resource, and should appear before other package resources that need the sources in the template.\n\nPut `recipe[apt::cacher]` in the run_list for a server to provide APT caching and add `recipe[apt::cacher-client]` on the rest of the Debian-based nodes to take advantage of the caching server.\n\nLicense and Author\n==================\n\nAuthor:: Joshua Timberman (<joshua@opscode.com>)\nAuthor:: Matt Ray (<matt@opscode.com>)\nAuthor:: Seth Chisamore (<schisamo@opscode.com>)\n\nCopyright 2009-2011 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",
|
5
|
+
"maintainer": "Opscode, Inc.",
|
6
|
+
"maintainer_email": "cookbooks@opscode.com",
|
7
|
+
"license": "Apache 2.0",
|
8
|
+
"platforms": {
|
9
|
+
"ubuntu": ">= 0.0.0",
|
10
|
+
"debian": ">= 0.0.0"
|
11
|
+
},
|
12
|
+
"dependencies": {
|
13
|
+
},
|
14
|
+
"recommendations": {
|
15
|
+
},
|
16
|
+
"suggestions": {
|
17
|
+
},
|
18
|
+
"conflicting": {
|
19
|
+
},
|
20
|
+
"providing": {
|
21
|
+
},
|
22
|
+
"replacing": {
|
23
|
+
},
|
24
|
+
"attributes": {
|
25
|
+
},
|
26
|
+
"groupings": {
|
27
|
+
},
|
28
|
+
"recipes": {
|
29
|
+
"apt": "Runs apt-get update during compile phase and sets up preseed directories",
|
30
|
+
"apt::cacher": "Set up an APT cache",
|
31
|
+
"apt::cacher-client": "Client for the apt::cacher server"
|
32
|
+
},
|
33
|
+
"version": "1.1.1"
|
34
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
maintainer "Opscode, Inc."
|
2
|
+
maintainer_email "cookbooks@opscode.com"
|
3
|
+
license "Apache 2.0"
|
4
|
+
description "Configures apt and apt services and an LWRP for managing apt repositories"
|
5
|
+
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
|
6
|
+
version "1.1.1"
|
7
|
+
recipe "apt", "Runs apt-get update during compile phase and sets up preseed directories"
|
8
|
+
recipe "apt::cacher", "Set up an APT cache"
|
9
|
+
recipe "apt::cacher-client", "Client for the apt::cacher server"
|
10
|
+
|
11
|
+
%w{ ubuntu debian }.each do |os|
|
12
|
+
supports os
|
13
|
+
end
|
@@ -0,0 +1,72 @@
|
|
1
|
+
#
|
2
|
+
# Cookbook Name:: apt
|
3
|
+
# Provider:: repository
|
4
|
+
#
|
5
|
+
# Copyright 2010-2011, Opscode, Inc.
|
6
|
+
#
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
# you may not use this file except in compliance with the License.
|
9
|
+
# You may obtain a copy of the License at
|
10
|
+
#
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
# See the License for the specific language governing permissions and
|
17
|
+
# limitations under the License.
|
18
|
+
#
|
19
|
+
|
20
|
+
action :add do
|
21
|
+
unless ::File.exists?("/etc/apt/sources.list.d/#{new_resource.repo_name}-source.list")
|
22
|
+
Chef::Log.info "Adding #{new_resource.repo_name} repository to /etc/apt/sources.list.d/#{new_resource.repo_name}-source.list"
|
23
|
+
# add key
|
24
|
+
if new_resource.keyserver && new_resource.key
|
25
|
+
execute "install-key #{new_resource.key}" do
|
26
|
+
command "apt-key adv --keyserver #{new_resource.keyserver} --recv #{new_resource.key}"
|
27
|
+
action :nothing
|
28
|
+
end.run_action(:run)
|
29
|
+
elsif new_resource.key && (new_resource.key =~ /http/)
|
30
|
+
key_name = new_resource.key.split(/\//).last
|
31
|
+
remote_file "#{Chef::Config[:file_cache_path]}/#{key_name}" do
|
32
|
+
source new_resource.key
|
33
|
+
mode "0644"
|
34
|
+
action :nothing
|
35
|
+
end.run_action(:create_if_missing)
|
36
|
+
execute "install-key #{key_name}" do
|
37
|
+
command "apt-key add #{Chef::Config[:file_cache_path]}/#{key_name}"
|
38
|
+
action :nothing
|
39
|
+
end.run_action(:run)
|
40
|
+
end
|
41
|
+
# build our listing
|
42
|
+
repository = "deb"
|
43
|
+
repository = "deb-src" if new_resource.deb_src
|
44
|
+
repository = "# Created by the Chef apt_repository LWRP\n" + repository
|
45
|
+
repository += " #{new_resource.uri}"
|
46
|
+
repository += " #{new_resource.distribution}"
|
47
|
+
new_resource.components.each {|component| repository += " #{component}"}
|
48
|
+
# write out the file, replace it if it already exists
|
49
|
+
file "/etc/apt/sources.list.d/#{new_resource.repo_name}-source.list" do
|
50
|
+
owner "root"
|
51
|
+
group "root"
|
52
|
+
mode 0644
|
53
|
+
content repository + "\n"
|
54
|
+
action :nothing
|
55
|
+
end.run_action(:create)
|
56
|
+
execute "update package index" do
|
57
|
+
command "apt-get update"
|
58
|
+
action :nothing
|
59
|
+
end.run_action(:run)
|
60
|
+
new_resource.updated_by_last_action(true)
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
action :remove do
|
65
|
+
if ::File.exists?("/etc/apt/sources.list.d/#{new_resource.repo_name}-source.list")
|
66
|
+
Chef::Log.info "Removing #{new_resource.repo_name} repository from /etc/apt/sources.list.d/"
|
67
|
+
file "/etc/apt/sources.list.d/#{new_resource.repo_name}-source.list" do
|
68
|
+
action :delete
|
69
|
+
end
|
70
|
+
new_resource.updated_by_last_action(true)
|
71
|
+
end
|
72
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
#
|
2
|
+
# Cookbook Name:: apt
|
3
|
+
# Recipe:: cacher-client
|
4
|
+
#
|
5
|
+
# Copyright 2011, Opscode, Inc.
|
6
|
+
#
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
# you may not use this file except in compliance with the License.
|
9
|
+
# You may obtain a copy of the License at
|
10
|
+
#
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
# See the License for the specific language governing permissions and
|
17
|
+
# limitations under the License.
|
18
|
+
#
|
19
|
+
|
20
|
+
servers = search(:node, 'recipes:apt\:\:cacher') || []
|
21
|
+
if servers.length > 0
|
22
|
+
Chef::Log.info("apt-cacher server found on #{servers[0]}.")
|
23
|
+
proxy = "Acquire::http::Proxy \"http://#{servers[0].ipaddress}:3142\";"
|
24
|
+
file "/etc/apt/apt.conf.d/01proxy" do
|
25
|
+
owner "root"
|
26
|
+
group "root"
|
27
|
+
mode "0644"
|
28
|
+
content proxy
|
29
|
+
action :create
|
30
|
+
end
|
31
|
+
else
|
32
|
+
Chef::Log.info("No apt-cacher server found.")
|
33
|
+
file "/etc/apt/apt.conf.d/01proxy" do
|
34
|
+
action :delete
|
35
|
+
only_if {File.exists?("/etc/apt/apt.conf.d/01proxy")}
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
#
|
2
|
+
# Cookbook Name:: apt
|
3
|
+
# Recipe:: cacher
|
4
|
+
#
|
5
|
+
# Copyright 2008-2011, Opscode, Inc.
|
6
|
+
#
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
# you may not use this file except in compliance with the License.
|
9
|
+
# You may obtain a copy of the License at
|
10
|
+
#
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
# See the License for the specific language governing permissions and
|
17
|
+
# limitations under the License.
|
18
|
+
#
|
19
|
+
package "apt-cacher" do
|
20
|
+
action :install
|
21
|
+
end
|
22
|
+
|
23
|
+
service "apt-cacher" do
|
24
|
+
supports :restart => true, :status => false
|
25
|
+
action [ :enable, :start ]
|
26
|
+
end
|
27
|
+
|
28
|
+
cookbook_file "/etc/apt-cacher/apt-cacher.conf" do
|
29
|
+
source "apt-cacher.conf"
|
30
|
+
owner "root"
|
31
|
+
group "root"
|
32
|
+
mode 0644
|
33
|
+
notifies :restart, resources(:service => "apt-cacher")
|
34
|
+
end
|
35
|
+
|
36
|
+
cookbook_file "/etc/default/apt-cacher" do
|
37
|
+
source "apt-cacher"
|
38
|
+
owner "root"
|
39
|
+
group "root"
|
40
|
+
mode 0644
|
41
|
+
notifies :restart, resources(:service => "apt-cacher")
|
42
|
+
end
|
43
|
+
|
44
|
+
#this will help seed the proxy
|
45
|
+
include_recipe "apt::cacher-client"
|
@@ -0,0 +1,33 @@
|
|
1
|
+
#
|
2
|
+
# Cookbook Name:: apt
|
3
|
+
# Recipe:: default
|
4
|
+
#
|
5
|
+
# Copyright 2008-2009, Opscode, Inc.
|
6
|
+
#
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
# you may not use this file except in compliance with the License.
|
9
|
+
# You may obtain a copy of the License at
|
10
|
+
#
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
# See the License for the specific language governing permissions and
|
17
|
+
# limitations under the License.
|
18
|
+
#
|
19
|
+
|
20
|
+
e = execute "apt-get update" do
|
21
|
+
action :nothing
|
22
|
+
end
|
23
|
+
|
24
|
+
e.run_action(:run)
|
25
|
+
|
26
|
+
%w{/var/cache/local /var/cache/local/preseeding}.each do |dirname|
|
27
|
+
directory dirname do
|
28
|
+
owner "root"
|
29
|
+
group "root"
|
30
|
+
mode 0755
|
31
|
+
action :create
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
#
|
2
|
+
# Cookbook Name:: apt
|
3
|
+
# Resource:: repository
|
4
|
+
#
|
5
|
+
# Copyright 2010-2011, Opscode, Inc.
|
6
|
+
#
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
# you may not use this file except in compliance with the License.
|
9
|
+
# You may obtain a copy of the License at
|
10
|
+
#
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
# See the License for the specific language governing permissions and
|
17
|
+
# limitations under the License.
|
18
|
+
#
|
19
|
+
|
20
|
+
actions :add, :remove
|
21
|
+
|
22
|
+
#name of the repo, used for source.list filename
|
23
|
+
attribute :repo_name, :kind_of => String, :name_attribute => true
|
24
|
+
attribute :uri, :kind_of => String
|
25
|
+
attribute :distribution, :kind_of => String
|
26
|
+
attribute :components, :kind_of => Array, :default => []
|
27
|
+
#whether or not to add the repository as a source repo as well
|
28
|
+
attribute :deb_src, :default => false
|
29
|
+
attribute :keyserver, :kind_of => String, :default => nil
|
30
|
+
attribute :key, :kind_of => String, :default => nil
|
@@ -0,0 +1,24 @@
|
|
1
|
+
DESCRIPTION
|
2
|
+
===========
|
3
|
+
|
4
|
+
Installs packages required for compiling C software from source.
|
5
|
+
|
6
|
+
LICENSE AND AUTHOR
|
7
|
+
==================
|
8
|
+
|
9
|
+
Author:: Joshua Timberman (<joshua@opscode.com>)
|
10
|
+
Author:: Seth Chisamore (<schisamo@opscode.com>)
|
11
|
+
|
12
|
+
Copyright 2009-2011, Opscode, Inc.
|
13
|
+
|
14
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
15
|
+
you may not use this file except in compliance with the License.
|
16
|
+
You may obtain a copy of the License at
|
17
|
+
|
18
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
19
|
+
|
20
|
+
Unless required by applicable law or agreed to in writing, software
|
21
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
22
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
23
|
+
See the License for the specific language governing permissions and
|
24
|
+
limitations under the License.
|
@@ -0,0 +1,35 @@
|
|
1
|
+
{
|
2
|
+
"name": "build-essential",
|
3
|
+
"description": "Installs C compiler / build tools",
|
4
|
+
"long_description": "",
|
5
|
+
"maintainer": "Opscode, Inc.",
|
6
|
+
"maintainer_email": "cookbooks@opscode.com",
|
7
|
+
"license": "Apache 2.0",
|
8
|
+
"platforms": {
|
9
|
+
"fedora": ">= 0.0.0",
|
10
|
+
"redhat": ">= 0.0.0",
|
11
|
+
"centos": ">= 0.0.0",
|
12
|
+
"ubuntu": ">= 0.0.0",
|
13
|
+
"debian": ">= 0.0.0"
|
14
|
+
},
|
15
|
+
"dependencies": {
|
16
|
+
},
|
17
|
+
"recommendations": {
|
18
|
+
},
|
19
|
+
"suggestions": {
|
20
|
+
},
|
21
|
+
"conflicting": {
|
22
|
+
},
|
23
|
+
"providing": {
|
24
|
+
},
|
25
|
+
"replacing": {
|
26
|
+
},
|
27
|
+
"attributes": {
|
28
|
+
},
|
29
|
+
"groupings": {
|
30
|
+
},
|
31
|
+
"recipes": {
|
32
|
+
"build-essential": "Installs C compiler and build tools on Linux"
|
33
|
+
},
|
34
|
+
"version": "1.0.0"
|
35
|
+
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
maintainer "Opscode, Inc."
|
2
|
+
maintainer_email "cookbooks@opscode.com"
|
3
|
+
license "Apache 2.0"
|
4
|
+
description "Installs C compiler / build tools"
|
5
|
+
version "1.0.0"
|
6
|
+
recipe "build-essential", "Installs C compiler and build tools on Linux"
|
7
|
+
|
8
|
+
%w{ fedora redhat centos ubuntu debian }.each do |os|
|
9
|
+
supports os
|
10
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
#
|
2
|
+
# Cookbook Name:: build-essential
|
3
|
+
# Recipe:: default
|
4
|
+
#
|
5
|
+
# Copyright 2008-2009, Opscode, Inc.
|
6
|
+
#
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
# you may not use this file except in compliance with the License.
|
9
|
+
# You may obtain a copy of the License at
|
10
|
+
#
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
# See the License for the specific language governing permissions and
|
17
|
+
# limitations under the License.
|
18
|
+
#
|
19
|
+
|
20
|
+
case node['platform']
|
21
|
+
when "ubuntu","debian"
|
22
|
+
%w{build-essential binutils-doc}.each do |pkg|
|
23
|
+
package pkg do
|
24
|
+
action :install
|
25
|
+
end
|
26
|
+
end
|
27
|
+
when "centos","redhat","fedora"
|
28
|
+
%w{gcc gcc-c++ kernel-devel make}.each do |pkg|
|
29
|
+
package pkg do
|
30
|
+
action :install
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
package "autoconf" do
|
36
|
+
action :install
|
37
|
+
end
|
38
|
+
|
39
|
+
package "flex" do
|
40
|
+
action :install
|
41
|
+
end
|
42
|
+
|
43
|
+
package "bison" do
|
44
|
+
action :install
|
45
|
+
end
|