Skip to content

Commit 6168c05

Browse files
committed
Merge branch 'master' into dbalatero/chef-257
2 parents 7551a96 + 7ebaaa4 commit 6168c05

15 files changed

Lines changed: 218 additions & 28 deletions

File tree

CHANGELOG

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,58 @@
1+
Tue Apr 28 16:43:43 PDT 2009
2+
Release Notes - Chef - Version 0.6.0
3+
http://tickets.opscode.com
4+
5+
** Bug
6+
* [CHEF-134] - User IDs and GIDs with negative numbers cause a type exception
7+
* [CHEF-162] - delayed notifications should coalesce so they don't run multiple times
8+
* [CHEF-163] - remote_file not working on head, 404 due to missing route
9+
* [CHEF-164] - Slice routing changes break remote file provider
10+
* [CHEF-169] - Detect and use new view URL's for CouchDB 0.9.0 compatability
11+
* [CHEF-171] - Package name with a dash (-) in it is not recognised
12+
* [CHEF-173] - With debug logging level set long running commands do not show their output in real time
13+
* [CHEF-174] - directory mode not set correctly
14+
* [CHEF-182] - Chef::Exception masks ::Exception (see OHAI-79)
15+
* [CHEF-185] - file delete backs up links
16+
* [CHEF-186] - file delete fails if file does not exist
17+
* [CHEF-188] - Merb dependencies for both the server app and slice need to be updated to 1.0.10
18+
* [CHEF-190] - apt provider fails on non-English debian installations
19+
* [CHEF-195] - The backup attribute for File needlessly creates a backup then deletes it when set to 0
20+
* [CHEF-198] - chef-solo banner
21+
* [CHEF-206] - chef-server-slice rake install fails
22+
* [CHEF-207] - chef-server and chef-server-slice should require merb > 1.0, not specific versions
23+
* [CHEF-218] - Search indexes are broken due to missing route
24+
* [CHEF-222] - CouchDB 0.9 compat causes the client to attempt a connection to the CouchDB server (while instantiating a node object)
25+
* [CHEF-227] - Delete operation of Search Index is not working
26+
* [CHEF-228] - chef-server under passenger: Controller class not found for controller `registrations'
27+
* [CHEF-230] - remote_file with a url should include a type of hash option to verify the downloaded file is what we expected
28+
* [CHEF-237] - Apt provider won't install msttcorefonts
29+
* [CHEF-238] - Commands with over 4k of output will block forever
30+
* [CHEF-244] - Chef server no longer checks openid's against the authorized_openid_identifiers configuration
31+
32+
** Improvement
33+
* [CHEF-54] - chef-server should be a merb slice
34+
* [CHEF-129] - Implement pilu's web-app-theme for chef-server
35+
* [CHEF-148] - cookbook naming and routing
36+
* [CHEF-153] - Allow access to a list of OpenID's via configration.
37+
* [CHEF-159] - CookbookLoader#load_cascading_files uses Dir.glob(array) syntax, which is unavailable on RHEL and Centos
38+
* [CHEF-167] - chef-server-slice rake install requires sudo
39+
* [CHEF-172] - In FreeBSD package provider simplify source parameter "magic" by using PKGNAME in ports Makefile
40+
* [CHEF-177] - Where multiple ports have the same name allow path to ports to be given
41+
* [CHEF-192] - speed up yum provider
42+
* [CHEF-200] - fixes from centos packaging attempt
43+
* [CHEF-210] - enterprise linux init scripts and configs
44+
* [CHEF-213] - Fixing typos in the code
45+
* [CHEF-214] - On Gentoo, services always support the :status command, so enable it by default
46+
* [CHEF-246] - Should be clearer what tags are attached to a node
47+
* [CHEF-247] - Let chef-server and chef-client compare checksums in bulk rather than one at a time.
48+
49+
** New Feature
50+
* [CHEF-78] - Add a mixin for parsing a file and replacing lines
51+
* [CHEF-176] - Chef status page that displays basic info about each chef managed node
52+
* [CHEF-191] - Enable optional CouchDB storage for OpenID associations and nonces
53+
* [CHEF-216] - Allow execute/script resources to set umask
54+
55+
156
Thu Mar 5 19:51:02 PST 2009
257
Release Notes - Chef - Version 0.5.6
358
http://tickets.opscode.com

Rakefile

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,15 @@ gems = %w[chef chef-server-slice chef-server]
22
require 'rubygems'
33
require 'cucumber/rake/task'
44

5-
namespace :git do
6-
desc "Initialise and update the Git submodules"
7-
task :submodule_update do
8-
sh "git submodule update --init"
9-
end
10-
end
11-
125
desc "Build the chef gems"
13-
task :gem => "git:submodule_update" do
6+
task :gem do
147
gems.each do |dir|
158
Dir.chdir(dir) { sh "rake package" }
169
end
1710
end
1811

1912
desc "Install the chef gems"
20-
task :install => "git:submodule_update" do
13+
task :install do
2114
gems.each do |dir|
2215
Dir.chdir(dir) { sh "rake install" }
2316
end

chef-server-slice/Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ require 'merb-core'
55
require 'merb-core/tasks/merb'
66

77
GEM_NAME = "chef-server-slice"
8-
CHEF_SERVER_VERSION="0.5.7"
8+
CHEF_SERVER_VERSION="0.6.0"
99
AUTHOR = "Opscode"
1010
EMAIL = "chef@opscode.com"
1111
HOMEPAGE = "http://wiki.opscode.com/display/chef"

chef-server/Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ require 'chef' unless defined?(Chef)
1818
include FileUtils
1919

2020
GEM = "chef-server"
21-
CHEF_SERVER_VERSION = "0.5.7"
21+
CHEF_SERVER_VERSION = "0.6.0"
2222
AUTHOR = "Opscode"
2323
EMAIL = "chef@opscode.com"
2424
HOMEPAGE = "http://wiki.opscode.com/display/chef"

chef/Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ require 'rake/rdoctask'
44
require './tasks/rspec.rb'
55

66
GEM = "chef"
7-
CHEF_VERSION = "0.5.7"
7+
CHEF_VERSION = "0.6.0"
88
AUTHOR = "Adam Jacob"
99
EMAIL = "adam@opscode.com"
1010
HOMEPAGE = "http://wiki.opscode.com/display/chef"

chef/bin/chef-client

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,15 @@ Chef::Daemon.change_privilege
8585

8686
Chef::Log.init(Chef::Config[:log_location])
8787
Chef::Log.level(Chef::Config[:log_level])
88-
Chef::Config[:delay] = 0
88+
Chef::Config[:delay] = 0
8989

9090
if Chef::Config[:daemonize]
9191
# We want to set the interval to half an hour, if one is not set.
9292
Chef::Config[:interval] ||= 1800
9393
Chef::Daemon.daemonize("chef-client")
94+
end
95+
96+
if Chef::Config[:interval]
9497
Chef::Config[:delay] = Chef::Config[:interval].to_i + (Chef::Config[:splay] ? rand(Chef::Config[:splay]) : 0)
9598
end
9699

@@ -101,7 +104,7 @@ loop do
101104
c.validation_token = Chef::Config[:validation_token]
102105
c.node_name = Chef::Config[:node_name]
103106
c.run
104-
if Chef::Config[:daemonize]
107+
if Chef::Config[:interval]
105108
Chef::Log.debug("Sleeping for #{Chef::Config[:delay]} seconds")
106109
sleep Chef::Config[:delay]
107110
else
@@ -110,7 +113,7 @@ loop do
110113
rescue SystemExit => e
111114
raise
112115
rescue Exception => e
113-
if Chef::Config[:daemonize]
116+
if Chef::Config[:interval]
114117
Chef::Log.error("#{e.class}")
115118
Chef::Log.fatal("#{e}\n#{e.backtrace.join("\n")}")
116119
Chef::Log.fatal("Sleeping for #{Chef::Config[:delay]} seconds before trying again")

chef/lib/chef.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
Dir[File.join(File.dirname(__FILE__), 'chef/mixin/**/*.rb')].sort.each { |lib| require lib }
2828

2929
class Chef
30-
VERSION = '0.5.7'
30+
VERSION = '0.6.0'
3131

3232
class << self
3333
def fatal!(msg, err = -1)

chef/lib/chef/mixin/command.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,6 @@ def popen4(cmd, args={}, &b)
294294
stdout.fcntl(Fcntl::F_SETFL, pi[1].fcntl(Fcntl::F_GETFL) | Fcntl::O_NONBLOCK)
295295
stderr.fcntl(Fcntl::F_SETFL, pi[2].fcntl(Fcntl::F_GETFL) | Fcntl::O_NONBLOCK)
296296

297-
298297
stdout_finished = false
299298
stderr_finished = false
300299

chef/lib/chef/provider/package/rubygems.rb

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,19 @@ def gem_list_parse(line)
3434
nil
3535
end
3636
end
37+
38+
def gem_binary_path
39+
path = @new_resource.gem_binary
40+
path ? path : 'gem'
41+
end
3742

3843
def load_current_resource
3944
@current_resource = Chef::Resource::Package.new(@new_resource.name)
4045
@current_resource.package_name(@new_resource.package_name)
4146
@current_resource.version(nil)
4247

4348
# First, we need to look up whether we have the local gem installed or not
44-
status = popen4("gem list --local #{@new_resource.package_name}") do |pid, stdin, stdout, stderr|
49+
status = popen4("#{gem_binary_path} list --local #{@new_resource.package_name}") do |pid, stdin, stdout, stderr|
4550
stdout.each do |line|
4651
installed_versions = gem_list_parse(line)
4752
next unless installed_versions
@@ -60,10 +65,10 @@ def load_current_resource
6065
end
6166

6267
unless status.exitstatus == 0
63-
raise Chef::Exceptions::Package, "gem list --local failed - #{status.inspect}!"
68+
raise Chef::Exceptions::Package, "#{gem_binary_path} list --local failed - #{status.inspect}!"
6469
end
6570

66-
status = popen4("gem list --remote #{@new_resource.package_name}#{' --source=' + @new_resource.source if @new_resource.source}") do |pid, stdin, stdout, stderr|
71+
status = popen4("#{gem_binary_path} list --remote #{@new_resource.package_name}#{' --source=' + @new_resource.source if @new_resource.source}") do |pid, stdin, stdout, stderr|
6772
stdout.each do |line|
6873
installed_versions = gem_list_parse(line)
6974
next unless installed_versions
@@ -77,7 +82,7 @@ def load_current_resource
7782
end
7883

7984
unless status.exitstatus == 0
80-
raise Chef::Exceptions::Package, "gem list --remote failed - #{status.inspect}!"
85+
raise Chef::Exceptions::Package, "#{gem_binary_path} list --remote failed - #{status.inspect}!"
8186
end
8287

8388
@current_resource
@@ -89,7 +94,7 @@ def install_package(name, version)
8994
src = " --source=#{@new_resource.source} --source=http://gems.rubyforge.org"
9095
end
9196
run_command(
92-
:command => "gem install #{name} -q --no-rdoc --no-ri -v #{version}#{src}"
97+
:command => "#{gem_binary_path} install #{name} -q --no-rdoc --no-ri -v #{version}#{src}"
9398
)
9499
end
95100

@@ -100,11 +105,11 @@ def upgrade_package(name, version)
100105
def remove_package(name, version)
101106
if version
102107
run_command(
103-
:command => "gem uninstall #{name} -q -v #{version}"
108+
:command => "#{gem_binary_path} uninstall #{name} -q -v #{version}"
104109
)
105110
else
106111
run_command(
107-
:command => "gem uninstall #{name} -q -a"
112+
:command => "#{gem_binary_path} uninstall #{name} -q -a"
108113
)
109114
end
110115
end

chef/lib/chef/resource/gem_package.rb

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,15 @@ def initialize(name, collection=nil, node=nil)
2727
@resource_name = :gem_package
2828
@provider = Chef::Provider::Package::Rubygems
2929
end
30-
30+
31+
# Sets a custom gem_binary to run for gem commands.
32+
def gem_binary(arg=nil)
33+
set_or_return(
34+
:gem_binary,
35+
arg,
36+
:kind_of => [ String ]
37+
)
38+
end
3139
end
3240
end
33-
end
41+
end

0 commit comments

Comments
 (0)