omnibus 2.0.1 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/.travis.yml CHANGED
@@ -5,6 +5,8 @@ bundler_args: --jobs 7 --without docs
5
5
 
6
6
  branches:
7
7
  only:
8
+ - 2.0-stable
9
+ - 3.0-stable
8
10
  - master
9
11
 
10
12
  script: bundle exec rake travis:ci
data/CHANGELOG.md CHANGED
@@ -1,6 +1,13 @@
1
1
  Omnibus Ruby CHANGELOG
2
2
  ======================
3
3
 
4
+ v2.0.2 (September 16, 2014)
5
+ -----------------------
6
+ - Ensure default package user and group are `root`.
7
+ - Fix S3 bucket retrieval.
8
+ - Add metadata to support modern publishers.
9
+ - Downgrade FPM to ~> 0.4
10
+
4
11
  v2.0.1 (March 18, 2014)
5
12
  -----------------------
6
13
  - Fix the name of the `pkg` artifact created on OSX
@@ -97,7 +97,9 @@ module Omnibus
97
97
  'version' => build_version,
98
98
  'basename' => File.basename(path),
99
99
  'md5' => md5,
100
+ 'sha1' => sha1,
100
101
  'sha256' => sha256,
102
+ 'sha512' => sha512,
101
103
  }
102
104
  end
103
105
 
@@ -129,11 +131,21 @@ module Omnibus
129
131
  @md5 ||= digest(Digest::MD5)
130
132
  end
131
133
 
132
- # @return [String] hex encoded SHA2-256 of the package
134
+ # @return [String] hex encoded SHA1 of the package
135
+ def sha1
136
+ @sha1 ||= digest(Digest::SHA1)
137
+ end
138
+
139
+ # @return [String] hex encoded SHA-256 of the package
133
140
  def sha256
134
141
  @sha256 ||= digest(Digest::SHA256)
135
142
  end
136
143
 
144
+ # @return [String] hex encoded SHA-512 of the package
145
+ def sha512
146
+ @sha512 ||= digest(Digest::SHA512)
147
+ end
148
+
137
149
  private
138
150
 
139
151
  def digest(digest_class)
@@ -249,13 +249,14 @@ module Omnibus
249
249
  @mac_pkg_identifier
250
250
  end
251
251
 
252
- # Set or retrieve the {deb/rpm/solaris}-user fpm argument.
252
+ # Set or retrieve the +{deb/rpm/solaris}-user+ fpm argument. Defaults
253
+ # to +root+ if not otherwise set.
253
254
  #
254
255
  # @param val [String]
255
256
  # @return [String]
256
257
  def package_user(val = NULL_ARG)
257
258
  @pkg_user = val unless val.equal?(NULL_ARG)
258
- @pkg_user
259
+ @pkg_user ||= 'root'
259
260
  end
260
261
 
261
262
  # Set or retrieve the full overrides hash for all software being overridden. Calling it as
@@ -278,13 +279,14 @@ module Omnibus
278
279
  @overrides[name]
279
280
  end
280
281
 
281
- # Set or retrieve the {deb/rpm/solaris}-group fpm argument.
282
+ # Set or retrieve the +{deb/rpm/solaris}-group+ fpm argument. Defaults
283
+ # to +root+ if not otherwise set.
282
284
  #
283
285
  # @param val [String]
284
286
  # @return [String]
285
287
  def package_group(val = NULL_ARG)
286
288
  @pkg_group = val unless val.equal?(NULL_ARG)
287
- @pkg_group
289
+ @pkg_group ||= 'root'
288
290
  end
289
291
 
290
292
  # Add an Omnibus software dependency.
@@ -561,6 +563,8 @@ module Omnibus
561
563
  pkg_path = "#{config.package_dir}/#{basename}"
562
564
  artifact = Artifact.new(pkg_path, [platform_tuple], version: build_version)
563
565
  metadata = artifact.flat_metadata
566
+ metadata['name'] = name
567
+ metadata['homepage'] = homepage
564
568
  File.open("#{pkg_path}.metadata.json", 'w+') do |f|
565
569
  f.print(JSON.pretty_generate(metadata))
566
570
  end
@@ -122,10 +122,13 @@ module Omnibus
122
122
 
123
123
  def bucket
124
124
  @bucket ||= begin
125
- b = UberS3::Bucket.new(@client, @client.bucket)
126
- # creating the bucket is idempotent, make sure it's created:
127
- @client.connection.put('/')
128
- b
125
+ if @client.exists?('/')
126
+ @client.bucket
127
+ else
128
+ b = UberS3::Bucket.new(@client, @client.bucket)
129
+ @client.connection.put('/')
130
+ b
131
+ end
129
132
  end
130
133
  end
131
134
  end
@@ -16,5 +16,5 @@
16
16
  #
17
17
 
18
18
  module Omnibus
19
- VERSION = '2.0.1'
19
+ VERSION = '2.0.2'
20
20
  end
data/omnibus.gemspec CHANGED
@@ -25,12 +25,12 @@ Gem::Specification.new do |gem|
25
25
  gem.add_dependency 'mixlib-config', '~> 2.1'
26
26
  gem.add_dependency 'ohai', '~> 6.12'
27
27
  gem.add_dependency 'rake'
28
- gem.add_dependency 'fpm', '~> 1.0.0'
28
+ gem.add_dependency 'fpm', '~> 0.4'
29
29
  gem.add_dependency 'uber-s3'
30
30
  gem.add_dependency 'thor', '>= 0.16.0'
31
31
 
32
- gem.add_development_dependency 'rspec', '~> 2.14'
33
- gem.add_development_dependency 'rubocop', '~> 0.18'
32
+ gem.add_development_dependency 'rspec', '~> 2.14.1'
33
+ gem.add_development_dependency 'rubocop', '~> 0.18.1'
34
34
 
35
35
  gem.add_development_dependency 'bundler'
36
36
  end
@@ -32,6 +32,8 @@ describe Omnibus::Artifact do
32
32
 
33
33
  let(:artifact) { Omnibus::Artifact.new(path, platforms, version: '11.4.0-1') }
34
34
 
35
+ let(:flat_metadata) { artifact.flat_metadata }
36
+
35
37
  it 'has the path to the package' do
36
38
  expect(artifact.path).to eq(path)
37
39
  end
@@ -51,8 +53,7 @@ describe Omnibus::Artifact do
51
53
  end
52
54
 
53
55
  it "generates 'flat' metadata" do
54
- expect(File).to receive(:open).twice.with(path).and_return(content)
55
- flat_metadata = artifact.flat_metadata
56
+ expect(File).to receive(:open).at_least(2).with(path).and_return(content)
56
57
  expect(flat_metadata['platform']).to eq('el')
57
58
  expect(flat_metadata['platform_version']).to eq('5')
58
59
  expect(flat_metadata['arch']).to eq('x86_64')
data/spec/project_spec.rb CHANGED
@@ -135,4 +135,18 @@ describe Omnibus::Project do
135
135
  expect(project.override(:thing)[:version]).to eq('6.6.6')
136
136
  end
137
137
  end
138
+
139
+ describe '#package_user' do
140
+ it 'returns root by default' do
141
+ subject.instance_variable_set(:@package_user, nil)
142
+ expect(subject.package_user).to eq('root')
143
+ end
144
+ end
145
+
146
+ describe '#package_group' do
147
+ it 'returns root by default' do
148
+ subject.instance_variable_set(:@package_group, nil)
149
+ expect(subject.package_group).to eq('root')
150
+ end
151
+ end
138
152
  end
metadata CHANGED
@@ -1,153 +1,174 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omnibus
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.2
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Chef Software, Inc.
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2014-03-18 00:00:00.000000000 Z
12
+ date: 2014-09-17 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: mixlib-shellout
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
- - - "~>"
19
+ - - ~>
18
20
  - !ruby/object:Gem::Version
19
21
  version: '1.3'
20
22
  type: :runtime
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
23
26
  requirements:
24
- - - "~>"
27
+ - - ~>
25
28
  - !ruby/object:Gem::Version
26
29
  version: '1.3'
27
30
  - !ruby/object:Gem::Dependency
28
31
  name: mixlib-config
29
32
  requirement: !ruby/object:Gem::Requirement
33
+ none: false
30
34
  requirements:
31
- - - "~>"
35
+ - - ~>
32
36
  - !ruby/object:Gem::Version
33
37
  version: '2.1'
34
38
  type: :runtime
35
39
  prerelease: false
36
40
  version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
37
42
  requirements:
38
- - - "~>"
43
+ - - ~>
39
44
  - !ruby/object:Gem::Version
40
45
  version: '2.1'
41
46
  - !ruby/object:Gem::Dependency
42
47
  name: ohai
43
48
  requirement: !ruby/object:Gem::Requirement
49
+ none: false
44
50
  requirements:
45
- - - "~>"
51
+ - - ~>
46
52
  - !ruby/object:Gem::Version
47
53
  version: '6.12'
48
54
  type: :runtime
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
51
58
  requirements:
52
- - - "~>"
59
+ - - ~>
53
60
  - !ruby/object:Gem::Version
54
61
  version: '6.12'
55
62
  - !ruby/object:Gem::Dependency
56
63
  name: rake
57
64
  requirement: !ruby/object:Gem::Requirement
65
+ none: false
58
66
  requirements:
59
- - - ">="
67
+ - - ! '>='
60
68
  - !ruby/object:Gem::Version
61
69
  version: '0'
62
70
  type: :runtime
63
71
  prerelease: false
64
72
  version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
65
74
  requirements:
66
- - - ">="
75
+ - - ! '>='
67
76
  - !ruby/object:Gem::Version
68
77
  version: '0'
69
78
  - !ruby/object:Gem::Dependency
70
79
  name: fpm
71
80
  requirement: !ruby/object:Gem::Requirement
81
+ none: false
72
82
  requirements:
73
- - - "~>"
83
+ - - ~>
74
84
  - !ruby/object:Gem::Version
75
- version: 1.0.0
85
+ version: '0.4'
76
86
  type: :runtime
77
87
  prerelease: false
78
88
  version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
79
90
  requirements:
80
- - - "~>"
91
+ - - ~>
81
92
  - !ruby/object:Gem::Version
82
- version: 1.0.0
93
+ version: '0.4'
83
94
  - !ruby/object:Gem::Dependency
84
95
  name: uber-s3
85
96
  requirement: !ruby/object:Gem::Requirement
97
+ none: false
86
98
  requirements:
87
- - - ">="
99
+ - - ! '>='
88
100
  - !ruby/object:Gem::Version
89
101
  version: '0'
90
102
  type: :runtime
91
103
  prerelease: false
92
104
  version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
93
106
  requirements:
94
- - - ">="
107
+ - - ! '>='
95
108
  - !ruby/object:Gem::Version
96
109
  version: '0'
97
110
  - !ruby/object:Gem::Dependency
98
111
  name: thor
99
112
  requirement: !ruby/object:Gem::Requirement
113
+ none: false
100
114
  requirements:
101
- - - ">="
115
+ - - ! '>='
102
116
  - !ruby/object:Gem::Version
103
117
  version: 0.16.0
104
118
  type: :runtime
105
119
  prerelease: false
106
120
  version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
107
122
  requirements:
108
- - - ">="
123
+ - - ! '>='
109
124
  - !ruby/object:Gem::Version
110
125
  version: 0.16.0
111
126
  - !ruby/object:Gem::Dependency
112
127
  name: rspec
113
128
  requirement: !ruby/object:Gem::Requirement
129
+ none: false
114
130
  requirements:
115
- - - "~>"
131
+ - - ~>
116
132
  - !ruby/object:Gem::Version
117
- version: '2.14'
133
+ version: 2.14.1
118
134
  type: :development
119
135
  prerelease: false
120
136
  version_requirements: !ruby/object:Gem::Requirement
137
+ none: false
121
138
  requirements:
122
- - - "~>"
139
+ - - ~>
123
140
  - !ruby/object:Gem::Version
124
- version: '2.14'
141
+ version: 2.14.1
125
142
  - !ruby/object:Gem::Dependency
126
143
  name: rubocop
127
144
  requirement: !ruby/object:Gem::Requirement
145
+ none: false
128
146
  requirements:
129
- - - "~>"
147
+ - - ~>
130
148
  - !ruby/object:Gem::Version
131
- version: '0.18'
149
+ version: 0.18.1
132
150
  type: :development
133
151
  prerelease: false
134
152
  version_requirements: !ruby/object:Gem::Requirement
153
+ none: false
135
154
  requirements:
136
- - - "~>"
155
+ - - ~>
137
156
  - !ruby/object:Gem::Version
138
- version: '0.18'
157
+ version: 0.18.1
139
158
  - !ruby/object:Gem::Dependency
140
159
  name: bundler
141
160
  requirement: !ruby/object:Gem::Requirement
161
+ none: false
142
162
  requirements:
143
- - - ">="
163
+ - - ! '>='
144
164
  - !ruby/object:Gem::Version
145
165
  version: '0'
146
166
  type: :development
147
167
  prerelease: false
148
168
  version_requirements: !ruby/object:Gem::Requirement
169
+ none: false
149
170
  requirements:
150
- - - ">="
171
+ - - ! '>='
151
172
  - !ruby/object:Gem::Version
152
173
  version: '0'
153
174
  description: Omnibus helps you build self-installing, full-stack software builds.
@@ -157,9 +178,9 @@ executables:
157
178
  extensions: []
158
179
  extra_rdoc_files: []
159
180
  files:
160
- - ".gitignore"
161
- - ".rubocop.yml"
162
- - ".travis.yml"
181
+ - .gitignore
182
+ - .rubocop.yml
183
+ - .travis.yml
163
184
  - CHANGELOG.md
164
185
  - Gemfile
165
186
  - LICENSE
@@ -245,26 +266,30 @@ files:
245
266
  homepage: https://github.com/opscode/omnibus-ruby
246
267
  licenses:
247
268
  - Apache 2.0
248
- metadata: {}
249
269
  post_install_message:
250
270
  rdoc_options: []
251
271
  require_paths:
252
272
  - lib
253
273
  required_ruby_version: !ruby/object:Gem::Requirement
274
+ none: false
254
275
  requirements:
255
- - - ">="
276
+ - - ! '>='
256
277
  - !ruby/object:Gem::Version
257
278
  version: 1.9.1
258
279
  required_rubygems_version: !ruby/object:Gem::Requirement
280
+ none: false
259
281
  requirements:
260
- - - ">="
282
+ - - ! '>='
261
283
  - !ruby/object:Gem::Version
262
284
  version: '0'
285
+ segments:
286
+ - 0
287
+ hash: 4053594469113083441
263
288
  requirements: []
264
289
  rubyforge_project:
265
- rubygems_version: 2.2.2
290
+ rubygems_version: 1.8.23
266
291
  signing_key:
267
- specification_version: 4
292
+ specification_version: 3
268
293
  summary: Omnibus helps you build self-installing, full-stack software builds.
269
294
  test_files:
270
295
  - spec/artifact_spec.rb
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: 9cb199e33038976c285414cab34ac29647f747d0
4
- data.tar.gz: 1a6b1c603430011d328ff2acee1efec31cc406a5
5
- SHA512:
6
- metadata.gz: 6f4b8cdec1c3027860afd61552649b39ff5b3b51a88f77e28696d7e5dfe76df3a5076413522aadd482ded167d07270febe3f25a7eaf3f2235a914eb53fd8be29
7
- data.tar.gz: 073cad03cc5dae6e817a725ad447d360028ed2e3864859b47d8aadb0d433a04526f07b46663102df8e657ba7d9e61b32aea771de13d1015bd2343e0f48431802