puppet 3.3.1 → 3.3.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of puppet might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ee9d3b6d97827d31437f89eddf9f9ebe7bdba1c8
4
- data.tar.gz: aa84cc4a207e01010674f784720f9dba747dd7d6
3
+ metadata.gz: a2d87f415f2d5c4d6c42e63ff26236626b2d99a4
4
+ data.tar.gz: c8d13e9583a907081e8f498b82676a8740a0adf4
5
5
  SHA512:
6
- metadata.gz: d43b4ec3e3857c62ce765f57d12508ff11a4a9728f06449d4abb231b80fa7c142e36f913e7ddf439956212388e459d083e23f2ea68c7e82bfe600c1aa1b30a7e
7
- data.tar.gz: 8e12c44a4422f68e9c06b814d88f29c199668d40db3f8a9e366a5de1142a908e27699d01159847fa7dde52b3abe8879b18c2aad0a0b9c188701476db2ab32dd5
6
+ metadata.gz: df7b5edc26a97b652f61f338c596aed36fec7bb5ef3baa73a02df507a3d3b6553b160a208f9bf5c3eb80423f9b313c457f09a521debdc5277558b2310c9f278d
7
+ data.tar.gz: 789d4cf034c461fd1f2482686dcca9099e54dd6b723922c05b82119c29a9f9a0079174a4e0bc92bcf1e514320cd0342806f700d2fc1896eed02146f5ede11852
data/Gemfile CHANGED
@@ -15,7 +15,7 @@ platforms :ruby do
15
15
  gem 'pry', :group => :development
16
16
  gem 'yard', :group => :development
17
17
  gem 'redcarpet', '~> 2.0', :group => :development
18
- gem "racc", "~> 1.4", :group => :development
18
+ gem "racc", "1.4.9", :group => :development
19
19
  end
20
20
 
21
21
  gem "puppet", :path => File.dirname(__FILE__), :require => false
@@ -51,18 +51,19 @@ group(:extra) do
51
51
  end
52
52
 
53
53
  platforms :mswin, :mingw do
54
- gem "sys-admin", "~> 1.5.6", :require => false
55
- gem "win32-api", "~> 1.4.8", :require => false
56
- gem "win32-dir", "~> 0.3.7", :require => false
57
- gem "win32-eventlog", "~> 0.5.3", :require => false
58
- gem "win32-process", "~> 0.6.5", :require => false
59
- gem "win32-security", "~> 0.1.4", :require => false
60
- gem "win32-service", "~> 0.7.2", :require => false
61
- gem "win32-taskscheduler", "~> 0.2.2", :require => false
62
- gem "win32console", "~> 1.3.2", :require => false
63
- gem "windows-api", "~> 0.4.2", :require => false
64
- gem "windows-pr", "~> 1.2.1", :require => false
65
- gem "minitar", "~> 0.5.4", :require => false
54
+ gem "ffi", "1.9.0", :require => false
55
+ gem "sys-admin", "1.5.6", :require => false
56
+ gem "win32-api", "1.4.8", :require => false
57
+ gem "win32-dir", "0.4.3", :require => false
58
+ gem "win32-eventlog", "0.5.3", :require => false
59
+ gem "win32-process", "0.6.5", :require => false
60
+ gem "win32-security", "0.1.4", :require => false
61
+ gem "win32-service", "0.7.2", :require => false
62
+ gem "win32-taskscheduler", "0.2.2", :require => false
63
+ gem "win32console", "1.3.2", :require => false
64
+ gem "windows-api", "0.4.2", :require => false
65
+ gem "windows-pr", "1.2.2", :require => false
66
+ gem "minitar", "0.5.4", :require => false
66
67
  end
67
68
 
68
69
  if File.exists? "#{__FILE__}.local"
data/Rakefile CHANGED
@@ -66,14 +66,3 @@ end
66
66
  task :spec do
67
67
  sh %{rspec -fd spec}
68
68
  end
69
-
70
- namespace "ci" do
71
- task :spec do
72
- ENV["LOG_SPEC_ORDER"] = "true"
73
- sh %{rspec -r yarjuf -f JUnit -o result.xml -fd spec}
74
- end
75
-
76
- task :el6tests do
77
- sh "cd acceptance/config/el6; rm -f el6.tar.gz; tar -czvf el6.tar.gz *"
78
- end
79
- end
@@ -2,7 +2,7 @@
2
2
  packaging_url: 'git://github.com/puppetlabs/packaging.git --branch=master'
3
3
  packaging_repo: 'packaging'
4
4
  default_cow: 'base-squeeze-i386.cow'
5
- cows: 'base-lucid-i386.cow base-precise-i386.cow base-quantal-i386.cow base-raring-i386.cow base-sid-i386.cow base-squeeze-i386.cow base-stable-i386.cow base-testing-i386.cow base-unstable-i386.cow base-wheezy-i386.cow'
5
+ cows: 'base-lucid-i386.cow base-precise-i386.cow base-quantal-i386.cow base-raring-i386.cow base-sid-i386.cow base-squeeze-i386.cow base-stable-i386.cow base-testing-i386.cow base-unstable-i386.cow base-wheezy-i386.cow base-saucy-i386.cow'
6
6
  pbuild_conf: '/etc/pbuilderrc'
7
7
  packager: 'puppetlabs'
8
8
  gpg_name: 'info@puppetlabs.com'
@@ -118,7 +118,7 @@ module PSON
118
118
  else
119
119
  raise TypeError, "#{source.inspect} is not like a string"
120
120
  end
121
- if defined?(::Encoding)
121
+ if supports_encodings?(source)
122
122
  if source.encoding == ::Encoding::ASCII_8BIT
123
123
  b = source[0, 4].bytes.to_a
124
124
  source =
@@ -157,6 +157,14 @@ module PSON
157
157
  source
158
158
  end
159
159
 
160
+ def supports_encodings?(string)
161
+ # Some modules, such as REXML on 1.8.7 (see #22804) can actually create
162
+ # a top-level Encoding constant when they are misused. Therefore
163
+ # checking for just that constant is not enough, so we'll be a bit more
164
+ # robust about if we can actually support encoding transformations.
165
+ string.respond_to?(:encoding) && defined?(::Encoding)
166
+ end
167
+
160
168
  # Unescape characters in strings.
161
169
  UNESCAPE_MAP = Hash.new { |h, k| h[k] = k.chr }
162
170
 
@@ -11,7 +11,7 @@ Puppet::Type.type(:package).provide :rpm, :source => :rpm, :parent => Puppet::Pr
11
11
  # eventually become this Puppet:Type::Package::ProviderRpm class.
12
12
  self::RPM_DESCRIPTION_DELIMITER = ':DESC:'
13
13
  # The query format by which we identify installed packages
14
- self::NEVRA_FORMAT = %Q{'%{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH} #{self::RPM_DESCRIPTION_DELIMITER} %{SUMMARY}\\n'}
14
+ self::NEVRA_FORMAT = %Q{%{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH} #{self::RPM_DESCRIPTION_DELIMITER} %{SUMMARY}\\n}
15
15
  self::NEVRA_REGEX = %r{^(\S+) (\S+) (\S+) (\S+) (\S+)(?: #{self::RPM_DESCRIPTION_DELIMITER} ?(.*))?$}
16
16
  self::RPM_PACKAGE_NOT_FOUND_REGEX = /package .+ is not installed/
17
17
  self::NEVRA_FIELDS = [:name, :epoch, :version, :release, :arch, :description]
@@ -49,7 +49,7 @@ Puppet::Type.type(:package).provide :rpm, :source => :rpm, :parent => Puppet::Pr
49
49
 
50
50
  # list out all of the packages
51
51
  begin
52
- execpipe("#{command(:rpm)} -qa #{nosignature} #{nodigest} --qf #{self::NEVRA_FORMAT}") { |process|
52
+ execpipe("#{command(:rpm)} -qa #{nosignature} #{nodigest} --qf '#{self::NEVRA_FORMAT}'") { |process|
53
53
  # now turn each returned line into a package object
54
54
  process.each_line { |line|
55
55
  hash = nevra_to_hash(line)
@@ -124,8 +124,9 @@ module Puppet
124
124
  newproperty(:gid) do
125
125
  desc "The user's primary group. Can be specified numerically or by name.
126
126
 
127
- Note that users on Windows systems do not have a primary group; manage groups
128
- with the `groups` attribute instead."
127
+ This attribute is not supported on Windows systems; use the `groups`
128
+ attribute instead. (On Windows, designating a primary group is only
129
+ meaningful for domain accounts, which Puppet does not currently manage.)"
129
130
 
130
131
  munge do |value|
131
132
  if value.is_a?(String) and value =~ /^[-0-9]+$/
@@ -175,7 +175,7 @@ module Puppet::Util::ADSI
175
175
  end
176
176
 
177
177
  def self.each(&block)
178
- wql = Puppet::Util::ADSI.execquery("select name from win32_useraccount")
178
+ wql = Puppet::Util::ADSI.execquery('select name from win32_useraccount where localaccount = "TRUE"')
179
179
 
180
180
  users = []
181
181
  wql.each do |u|
@@ -283,7 +283,7 @@ module Puppet::Util::ADSI
283
283
  end
284
284
 
285
285
  def self.each(&block)
286
- wql = Puppet::Util::ADSI.execquery( "select name from win32_group" )
286
+ wql = Puppet::Util::ADSI.execquery( 'select name from win32_group where localaccount = "TRUE"' )
287
287
 
288
288
  groups = []
289
289
  wql.each do |g|
@@ -147,8 +147,8 @@ module Util::Execution
147
147
  begin
148
148
  exit_status = Puppet::Util::Windows::Process.wait_process(process_info.process_handle)
149
149
  ensure
150
- Process.CloseHandle(process_info.process_handle)
151
- Process.CloseHandle(process_info.thread_handle)
150
+ Puppet::Util::Windows::Process.CloseHandle(process_info.process_handle)
151
+ Puppet::Util::Windows::Process.CloseHandle(process_info.thread_handle)
152
152
  end
153
153
  end
154
154
 
@@ -7,7 +7,7 @@
7
7
 
8
8
 
9
9
  module Puppet
10
- PUPPETVERSION = '3.3.1'
10
+ PUPPETVERSION = '3.3.2'
11
11
 
12
12
  ##
13
13
  # version is a public API method intended to always provide a fast and
@@ -24,7 +24,7 @@ describe Puppet::Type.type(:group).provider(:windows_adsi) do
24
24
  names = ['group1', 'group2', 'group3']
25
25
  stub_groups = names.map{|n| stub(:name => n)}
26
26
 
27
- connection.stubs(:execquery).with("select name from win32_group").returns stub_groups
27
+ connection.stubs(:execquery).with('select name from win32_group where localaccount = "TRUE"').returns stub_groups
28
28
 
29
29
  described_class.instances.map(&:name).should =~ names
30
30
  end
@@ -19,7 +19,7 @@ describe Puppet::Type.type(:package).provider(:aptrpm) do
19
19
  def rpm
20
20
  pkg.provider.expects(:rpm).
21
21
  with('-q', 'faff', '--nosignature', '--nodigest', '--qf',
22
- "'%{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH} :DESC: %{SUMMARY}\\n'")
22
+ "%{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH} :DESC: %{SUMMARY}\\n")
23
23
  end
24
24
 
25
25
  it "should report absent packages" do
@@ -30,7 +30,7 @@ describe provider_class do
30
30
  provider
31
31
  end
32
32
 
33
- let(:nevra_format) { %Q{'%{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH} :DESC: %{SUMMARY}\\n'} }
33
+ let(:nevra_format) { %Q{%{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH} :DESC: %{SUMMARY}\\n} }
34
34
  let(:execute_options) do
35
35
  {:failonfail => true, :combine => true, :custom_environment => {}}
36
36
  end
@@ -47,7 +47,7 @@ describe provider_class do
47
47
  describe "self.instances" do
48
48
  describe "with a modern version of RPM" do
49
49
  it "should include all the modern flags" do
50
- Puppet::Util::Execution.expects(:execpipe).with("/bin/rpm -qa --nosignature --nodigest --qf #{nevra_format}").yields(packages)
50
+ Puppet::Util::Execution.expects(:execpipe).with("/bin/rpm -qa --nosignature --nodigest --qf '#{nevra_format}'").yields(packages)
51
51
 
52
52
  installed_packages = subject.instances
53
53
  end
@@ -56,7 +56,7 @@ describe provider_class do
56
56
  describe "with a version of RPM < 4.1" do
57
57
  let(:rpm_version) { "RPM version 4.0.2\n" }
58
58
  it "should exclude the --nosignature flag" do
59
- Puppet::Util::Execution.expects(:execpipe).with("/bin/rpm -qa --nodigest --qf #{nevra_format}").yields(packages)
59
+ Puppet::Util::Execution.expects(:execpipe).with("/bin/rpm -qa --nodigest --qf '#{nevra_format}'").yields(packages)
60
60
 
61
61
  installed_packages = subject.instances
62
62
  end
@@ -65,14 +65,14 @@ describe provider_class do
65
65
  describe "with a version of RPM < 4.0.2" do
66
66
  let(:rpm_version) { "RPM version 3.0.5\n" }
67
67
  it "should exclude the --nodigest flag" do
68
- Puppet::Util::Execution.expects(:execpipe).with("/bin/rpm -qa --qf #{nevra_format}").yields(packages)
68
+ Puppet::Util::Execution.expects(:execpipe).with("/bin/rpm -qa --qf '#{nevra_format}'").yields(packages)
69
69
 
70
70
  installed_packages = subject.instances
71
71
  end
72
72
  end
73
73
 
74
74
  it "returns an array of packages" do
75
- Puppet::Util::Execution.expects(:execpipe).with("/bin/rpm -qa --nosignature --nodigest --qf #{nevra_format}").yields(packages)
75
+ Puppet::Util::Execution.expects(:execpipe).with("/bin/rpm -qa --nosignature --nodigest --qf '#{nevra_format}'").yields(packages)
76
76
 
77
77
  installed_packages = subject.instances
78
78
 
@@ -153,7 +153,7 @@ _pkg mysummaryless 0 1.2.3.4 5.el4 noarch
153
153
  end
154
154
 
155
155
  def expect_execpipe_to_provide_package_info_for_an_rpm_query
156
- Puppet::Util::Execution.expects(:execpipe).with("/bin/rpm -qa --nosignature --nodigest --qf #{nevra_format}").yields(packages)
156
+ Puppet::Util::Execution.expects(:execpipe).with("/bin/rpm -qa --nosignature --nodigest --qf '#{nevra_format}'").yields(packages)
157
157
  end
158
158
 
159
159
  def expect_python_yumhelper_call_to_return_latest_info
@@ -24,7 +24,7 @@ describe Puppet::Type.type(:user).provider(:windows_adsi) do
24
24
  it "should enumerate all users" do
25
25
  names = ['user1', 'user2', 'user3']
26
26
  stub_users = names.map{|n| stub(:name => n)}
27
- connection.stubs(:execquery).with("select name from win32_useraccount").returns(stub_users)
27
+ connection.stubs(:execquery).with('select name from win32_useraccount where localaccount = "TRUE"').returns(stub_users)
28
28
 
29
29
  described_class.instances.map(&:name).should =~ names
30
30
  end
@@ -85,7 +85,7 @@ describe Puppet::Util::ADSI do
85
85
  it "should return an enumeration of IADsUser wrapped objects" do
86
86
  name = 'Administrator'
87
87
  wmi_users = [stub('WMI', :name => name)]
88
- Puppet::Util::ADSI.expects(:execquery).with("select name from win32_useraccount").returns(wmi_users)
88
+ Puppet::Util::ADSI.expects(:execquery).with('select name from win32_useraccount where localaccount = "TRUE"').returns(wmi_users)
89
89
 
90
90
  native_user = stub('IADsUser')
91
91
  homedir = "C:\\Users\\#{name}"
@@ -248,7 +248,7 @@ describe Puppet::Util::ADSI do
248
248
  it "should return an enumeration of IADsGroup wrapped objects" do
249
249
  name = 'Administrators'
250
250
  wmi_groups = [stub('WMI', :name => name)]
251
- Puppet::Util::ADSI.expects(:execquery).with("select name from win32_group").returns(wmi_groups)
251
+ Puppet::Util::ADSI.expects(:execquery).with('select name from win32_group where localaccount = "TRUE"').returns(wmi_groups)
252
252
 
253
253
  native_group = stub('IADsGroup')
254
254
  native_group.expects(:Members).returns([stub(:Name => 'Administrator')])
@@ -306,8 +306,8 @@ describe Puppet::Util::Execution do
306
306
  Puppet::Util::Execution.stubs(:execute_windows).returns(proc_info_stub)
307
307
 
308
308
  Puppet::Util::Windows::Process.expects(:wait_process).with(process_handle).raises('whatever')
309
- Process.expects(:CloseHandle).with(thread_handle)
310
- Process.expects(:CloseHandle).with(process_handle)
309
+ Puppet::Util::Windows::Process.expects(:CloseHandle).with(thread_handle)
310
+ Puppet::Util::Windows::Process.expects(:CloseHandle).with(process_handle)
311
311
 
312
312
  expect { Puppet::Util::Execution.execute('test command') }.to raise_error(RuntimeError)
313
313
  end
@@ -0,0 +1,48 @@
1
+ namespace "ci" do
2
+ task :spec do
3
+ ENV["LOG_SPEC_ORDER"] = "true"
4
+ sh %{rspec -r yarjuf -f JUnit -o result.xml -fd spec}
5
+ end
6
+
7
+ def get_parameter_value_from_actions(actions, parameter)
8
+ parameters = actions.select { |h| h.key?('parameters') }.first["parameters"]
9
+ parameters.select { |h| h['name'] == parameter }.first['value']
10
+ end
11
+
12
+ desc <<-EOS
13
+ Check to see if the job at the url given in DOWNSTREAM_JOB has begun a build including the given BUILD_SELECTOR parameter.
14
+ An example `rake ci:check_for_downstream DOWNSTREAM_JOB='http://jenkins-foss.delivery.puppetlabs.net/job/Puppet-Package-Acceptance-master' BUILD_SELECTOR=123`
15
+ You may optionally set TIMEOUT_MIN, which defaults to 20 min.
16
+ EOS
17
+ task :check_for_downstream do
18
+ downstream_url = ENV['DOWNSTREAM_JOB'] || raise('No ENV DOWNSTREAM_JOB set!')
19
+ downstream_url += '/api/json?depth=1'
20
+ expected_selector = ENV['BUILD_SELECTOR'] || raise('No ENV BUILD_SELECTOR set!')
21
+ timeout = (ENV['TIMEOUT_MIN'] || 20) * 60
22
+ puts "Waiting for a downstream job calling for BUILD_SELECTOR #{expected_selector}"
23
+ success = false
24
+ require 'json'
25
+ require 'timeout'
26
+ require 'net/http'
27
+ Timeout.timeout(timeout) do
28
+ loop do
29
+ uri = URI(downstream_url)
30
+ status = Net::HTTP.get(uri)
31
+ json = JSON.parse(status)
32
+ build_selector = get_parameter_value_from_actions(json['builds'].first['actions'], 'BUILD_SELECTOR')
33
+ if build_selector < expected_selector && json['queueItem']
34
+ queued_actions = json['queueItem']['actions']
35
+ build_selector = get_parameter_value_from_actions(queued_actions, 'BUILD_SELECTOR') if queued_actions
36
+ end
37
+ puts " * downstream job's last build selector: #{build_selector}"
38
+ break if build_selector >= expected_selector
39
+ sleep 60
40
+ end
41
+ end
42
+ end
43
+
44
+ desc "Tar up the acceptance/ directory so that package test runs have tests to run against."
45
+ task :acceptance_artifacts do
46
+ sh "cd acceptance; rm -f acceptance-artifacts.tar.gz; tar -czv --exclude .bundle -f acceptance-artifacts.tar.gz *"
47
+ end
48
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puppet
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.1
4
+ version: 3.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppet Labs
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-07 00:00:00.000000000 Z
11
+ date: 2013-11-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: facter
@@ -1200,6 +1200,7 @@ files:
1200
1200
  - ext/windows/service/daemon.bat
1201
1201
  - ext/windows/service/daemon.rb
1202
1202
  - ext/yaml_nodes.rb
1203
+ - tasks/ci.rake
1203
1204
  - tasks/manpages.rake
1204
1205
  - tasks/parser.rake
1205
1206
  - spec/fixtures/faulty_face/puppet/face/syntax.rb