omnibus 4.0.0.beta.1 → 4.0.0.rc.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +29 -0
- data/docs/Building on RHEL.md +1 -0
- data/lib/omnibus/builder.rb +48 -1
- data/lib/omnibus/config.rb +13 -0
- data/lib/omnibus/digestable.rb +2 -2
- data/lib/omnibus/exceptions.rb +21 -0
- data/lib/omnibus/fetchers/git_fetcher.rb +75 -9
- data/lib/omnibus/fetchers/net_fetcher.rb +5 -3
- data/lib/omnibus/generator.rb +0 -13
- data/{resources/bff/postinstall.sh → lib/omnibus/generator_files/package_scripts/makeselfinst.erb} +0 -0
- data/lib/omnibus/packagers/base.rb +25 -1
- data/lib/omnibus/packagers/bff.rb +99 -12
- data/lib/omnibus/packagers/deb.rb +10 -8
- data/lib/omnibus/packagers/makeself.rb +24 -16
- data/lib/omnibus/packagers/msi.rb +6 -5
- data/lib/omnibus/packagers/pkg.rb +59 -10
- data/lib/omnibus/packagers/rpm.rb +42 -25
- data/lib/omnibus/packagers/solaris.rb +5 -5
- data/lib/omnibus/project.rb +54 -5
- data/lib/omnibus/software.rb +37 -39
- data/lib/omnibus/version.rb +1 -1
- data/omnibus.gemspec +1 -0
- data/resources/bff/gen.template.erb +3 -2
- data/resources/rpm/signing.erb +1 -1
- data/spec/functional/builder_spec.rb +75 -3
- data/spec/functional/fetchers/git_fetcher_spec.rb +31 -2
- data/spec/support/examples.rb +8 -2
- data/spec/support/git_helpers.rb +8 -0
- data/spec/unit/builder_spec.rb +6 -0
- data/spec/unit/config_spec.rb +1 -0
- data/spec/unit/generator_spec.rb +0 -12
- data/spec/unit/packagers/base_spec.rb +16 -0
- data/spec/unit/packagers/bff_spec.rb +58 -5
- data/spec/unit/packagers/deb_spec.rb +15 -3
- data/spec/unit/packagers/makeself_spec.rb +56 -9
- data/spec/unit/packagers/pkg_spec.rb +57 -4
- data/spec/unit/packagers/rpm_spec.rb +38 -23
- data/spec/unit/project_spec.rb +16 -5
- data/spec/unit/software_spec.rb +0 -1
- metadata +18 -6
- data/resources/bff/unpostinstall.sh +0 -0
- data/resources/makeself/post_extract.sh.erb +0 -27
data/spec/unit/project_spec.rb
CHANGED
@@ -23,6 +23,7 @@ module Omnibus
|
|
23
23
|
|
24
24
|
it_behaves_like 'a cleanroom setter', :name, %|name 'chef'|
|
25
25
|
it_behaves_like 'a cleanroom setter', :friendly_name, %|friendly_name 'Chef'|
|
26
|
+
it_behaves_like 'a cleanroom setter', :package_name, %|package_name 'chef.package'|
|
26
27
|
it_behaves_like 'a cleanroom setter', :maintainer, %|maintainer 'Chef Software, Inc'|
|
27
28
|
it_behaves_like 'a cleanroom setter', :homepage, %|homepage 'https://getchef.com'|
|
28
29
|
it_behaves_like 'a cleanroom setter', :description, %|description 'Installs the thing'|
|
@@ -41,6 +42,8 @@ module Omnibus
|
|
41
42
|
it_behaves_like 'a cleanroom setter', :config_file, %|config_file '/path/to/config.rb'|
|
42
43
|
it_behaves_like 'a cleanroom setter', :extra_package_file, %|extra_package_file '/path/to/asset'|
|
43
44
|
|
45
|
+
it_behaves_like 'a cleanroom getter', :files_path
|
46
|
+
|
44
47
|
describe 'basics' do
|
45
48
|
it 'returns a name' do
|
46
49
|
expect(subject.name).to eq('sample')
|
@@ -123,26 +126,34 @@ module Omnibus
|
|
123
126
|
end
|
124
127
|
|
125
128
|
describe '#dirty!' do
|
129
|
+
let(:software) { double(Omnibus::Software) }
|
130
|
+
|
126
131
|
it 'dirties the cache' do
|
127
|
-
subject.instance_variable_set(:@
|
128
|
-
subject.dirty!
|
132
|
+
subject.instance_variable_set(:@culprit, nil)
|
133
|
+
subject.dirty!(software)
|
129
134
|
expect(subject).to be_dirty
|
130
135
|
end
|
136
|
+
|
137
|
+
it 'sets the culprit' do
|
138
|
+
subject.instance_variable_set(:@culprit, nil)
|
139
|
+
subject.dirty!(software)
|
140
|
+
expect(subject.culprit).to be(software)
|
141
|
+
end
|
131
142
|
end
|
132
143
|
|
133
144
|
describe '#dirty?' do
|
134
145
|
it 'returns true by default' do
|
135
|
-
subject.instance_variable_set(:@
|
146
|
+
subject.instance_variable_set(:@culprit, nil)
|
136
147
|
expect(subject).to_not be_dirty
|
137
148
|
end
|
138
149
|
|
139
150
|
it 'returns true when the cache is dirty' do
|
140
|
-
subject.instance_variable_set(:@
|
151
|
+
subject.instance_variable_set(:@culprit, true)
|
141
152
|
expect(subject).to be_dirty
|
142
153
|
end
|
143
154
|
|
144
155
|
it 'returns false when the cache is not dirty' do
|
145
|
-
subject.instance_variable_set(:@
|
156
|
+
subject.instance_variable_set(:@culprit, false)
|
146
157
|
expect(subject).to_not be_dirty
|
147
158
|
end
|
148
159
|
end
|
data/spec/unit/software_spec.rb
CHANGED
@@ -22,7 +22,6 @@ module Omnibus
|
|
22
22
|
it_behaves_like 'a cleanroom getter', :project
|
23
23
|
it_behaves_like 'a cleanroom setter', :name, %|name 'libxml2'|
|
24
24
|
it_behaves_like 'a cleanroom setter', :description, %|description 'The XML magician'|
|
25
|
-
it_behaves_like 'a cleanroom setter', :always_build, %|always_build true|
|
26
25
|
it_behaves_like 'a cleanroom setter', :dependency, %|dependency 'libxslt'|
|
27
26
|
it_behaves_like 'a cleanroom setter', :source, %|source url: 'https://source.example.com'|
|
28
27
|
it_behaves_like 'a cleanroom setter', :default_version, %|default_version '1.2.3'|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omnibus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.0.
|
4
|
+
version: 4.0.0.rc.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chef Software, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-09-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chef-sugar
|
@@ -192,6 +192,20 @@ dependencies:
|
|
192
192
|
- - ">="
|
193
193
|
- !ruby/object:Gem::Version
|
194
194
|
version: '0'
|
195
|
+
- !ruby/object:Gem::Dependency
|
196
|
+
name: appbundler
|
197
|
+
requirement: !ruby/object:Gem::Requirement
|
198
|
+
requirements:
|
199
|
+
- - ">="
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
version: '0'
|
202
|
+
type: :development
|
203
|
+
prerelease: false
|
204
|
+
version_requirements: !ruby/object:Gem::Requirement
|
205
|
+
requirements:
|
206
|
+
- - ">="
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: '0'
|
195
209
|
description: Omnibus is a framework for building self-installing, full-stack software
|
196
210
|
builds.
|
197
211
|
email: releng@getchef.com
|
@@ -259,6 +273,7 @@ files:
|
|
259
273
|
- lib/omnibus/generator_files/config/software/zlib.rb.erb
|
260
274
|
- lib/omnibus/generator_files/gitignore.erb
|
261
275
|
- lib/omnibus/generator_files/omnibus.rb.erb
|
276
|
+
- lib/omnibus/generator_files/package_scripts/makeselfinst.erb
|
262
277
|
- lib/omnibus/generator_files/package_scripts/postinst.erb
|
263
278
|
- lib/omnibus/generator_files/package_scripts/postrm.erb
|
264
279
|
- lib/omnibus/generator_files/package_scripts/preinst.erb
|
@@ -297,8 +312,6 @@ files:
|
|
297
312
|
- lib/omnibus/version.rb
|
298
313
|
- omnibus.gemspec
|
299
314
|
- resources/bff/gen.template.erb
|
300
|
-
- resources/bff/postinstall.sh
|
301
|
-
- resources/bff/unpostinstall.sh
|
302
315
|
- resources/deb/conffiles.erb
|
303
316
|
- resources/deb/control.erb
|
304
317
|
- resources/deb/md5sums.erb
|
@@ -307,7 +320,6 @@ files:
|
|
307
320
|
- resources/dmg/icon.png
|
308
321
|
- resources/makeself/makeself-header.sh
|
309
322
|
- resources/makeself/makeself.sh
|
310
|
-
- resources/makeself/post_extract.sh.erb
|
311
323
|
- resources/msi/assets/LICENSE.rtf
|
312
324
|
- resources/msi/assets/banner_background.bmp
|
313
325
|
- resources/msi/assets/dialog_background.bmp
|
@@ -398,7 +410,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
398
410
|
version: 1.3.1
|
399
411
|
requirements: []
|
400
412
|
rubyforge_project:
|
401
|
-
rubygems_version: 2.
|
413
|
+
rubygems_version: 2.2.2
|
402
414
|
signing_key:
|
403
415
|
specification_version: 4
|
404
416
|
summary: Omnibus is a framework for building self-installing, full-stack software
|
File without changes
|
@@ -1,27 +0,0 @@
|
|
1
|
-
#!/bin/bash
|
2
|
-
#
|
3
|
-
# Installs <%= friendly_name %>
|
4
|
-
#
|
5
|
-
|
6
|
-
PROGNAME=`basename $0`
|
7
|
-
INSTALLER_DIR=`dirname $0`
|
8
|
-
DEST_DIR=<%= install_dir %>
|
9
|
-
CONFIG_DIR=/etc/<%= name %>
|
10
|
-
USAGE="usage: $0"
|
11
|
-
|
12
|
-
error_exit()
|
13
|
-
{
|
14
|
-
echo "${PROGNAME}: ${1:-"Unknown Error"}" 1>&2
|
15
|
-
exit 1
|
16
|
-
}
|
17
|
-
|
18
|
-
# move the actual files into place
|
19
|
-
rm -rf $DEST_DIR/* || error_exit "Cannot remove contents of $DEST_DIR"
|
20
|
-
mkdir -p $DEST_DIR || error_exit "Cannot create $DEST_DIR"
|
21
|
-
cp -R $INSTALLER_DIR $DEST_DIR || error_exit "Cannot install to $DEST_DIR"
|
22
|
-
rm -f $DEST_DIR/$PROGNAME
|
23
|
-
|
24
|
-
# You may want to symlink your packages bin files into /usr/bin
|
25
|
-
# ln -sf $DEST_DIR/bin/<%= name %> /usr/bin || error_exit "Cannot link <%= name %> to /usr/bin"
|
26
|
-
|
27
|
-
exit 0
|