omnibus 5.5.0 → 5.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/PULL_REQUEST_TEMPLATE.md +11 -0
- data/.travis.yml +2 -1
- data/CHANGELOG.md +37 -0
- data/Gemfile +5 -4
- data/MAINTAINERS.md +12 -17
- data/README.md +98 -107
- data/appveyor.yml +1 -1
- data/lib/omnibus.rb +4 -4
- data/lib/omnibus/builder.rb +42 -9
- data/lib/omnibus/cli.rb +5 -0
- data/lib/omnibus/cli/base.rb +1 -1
- data/lib/omnibus/cli/publish.rb +5 -3
- data/lib/omnibus/compressors/dmg.rb +2 -2
- data/lib/omnibus/config.rb +42 -5
- data/lib/omnibus/core_extensions/open_uri.rb +1 -0
- data/lib/omnibus/download_helpers.rb +4 -4
- data/lib/omnibus/fetchers/git_fetcher.rb +15 -5
- data/lib/omnibus/fetchers/net_fetcher.rb +1 -1
- data/lib/omnibus/fetchers/path_fetcher.rb +1 -1
- data/lib/omnibus/file_syncer.rb +2 -2
- data/lib/omnibus/generator_files/omnibus.rb.erb +1 -0
- data/lib/omnibus/git_cache.rb +31 -13
- data/lib/omnibus/health_check.rb +1 -173
- data/lib/omnibus/licensing.rb +48 -7
- data/lib/omnibus/manifest.rb +3 -5
- data/lib/omnibus/manifest_entry.rb +1 -1
- data/lib/omnibus/metadata.rb +2 -1
- data/lib/omnibus/packager.rb +3 -1
- data/lib/omnibus/packagers/appx.rb +3 -3
- data/lib/omnibus/packagers/base.rb +9 -0
- data/lib/omnibus/packagers/bff.rb +4 -6
- data/lib/omnibus/packagers/deb.rb +95 -1
- data/lib/omnibus/packagers/ips.rb +50 -4
- data/lib/omnibus/packagers/pkgsrc.rb +112 -0
- data/lib/omnibus/packagers/rpm.rb +72 -3
- data/lib/omnibus/packagers/solaris.rb +0 -4
- data/lib/omnibus/packagers/windows_base.rb +1 -1
- data/lib/omnibus/project.rb +13 -3
- data/lib/omnibus/publishers/artifactory_publisher.rb +4 -6
- data/lib/omnibus/publishers/s3_publisher.rb +8 -3
- data/lib/omnibus/reports.rb +1 -1
- data/lib/omnibus/s3_cache.rb +18 -5
- data/lib/omnibus/s3_helpers.rb +45 -8
- data/lib/omnibus/software.rb +55 -37
- data/lib/omnibus/sugarable.rb +4 -0
- data/lib/omnibus/templating.rb +29 -13
- data/lib/omnibus/util.rb +81 -2
- data/lib/omnibus/version.rb +1 -1
- data/lib/omnibus/whitelist.rb +228 -0
- data/omnibus.gemspec +9 -8
- data/resources/dmg/create_dmg.osascript.erb +33 -13
- data/resources/ips/doc-transform.erb +2 -0
- data/resources/rpm/spec.erb +1 -2
- data/spec/functional/builder_spec.rb +21 -21
- data/spec/functional/fetchers/git_fetcher_spec.rb +6 -6
- data/spec/functional/fetchers/net_fetcher_spec.rb +7 -7
- data/spec/functional/fetchers/path_fetcher_spec.rb +5 -5
- data/spec/functional/file_syncer_spec.rb +6 -6
- data/spec/functional/licensing_spec.rb +29 -16
- data/spec/functional/templating_spec.rb +23 -22
- data/spec/support/git_helpers.rb +30 -24
- data/spec/unit/build_version_spec.rb +1 -1
- data/spec/unit/builder_spec.rb +36 -24
- data/spec/unit/changelogprinter_spec.rb +10 -8
- data/spec/unit/cleanroom_spec.rb +6 -6
- data/spec/unit/compressors/dmg_spec.rb +23 -37
- data/spec/unit/compressors/null_spec.rb +2 -2
- data/spec/unit/compressors/tgz_spec.rb +2 -2
- data/spec/unit/config_spec.rb +2 -1
- data/spec/unit/digestable_spec.rb +2 -2
- data/spec/unit/fetchers/git_fetcher_spec.rb +5 -5
- data/spec/unit/fetchers/net_fetcher_spec.rb +46 -6
- data/spec/unit/fetchers/path_fetcher_spec.rb +5 -5
- data/spec/unit/file_syncer_spec.rb +19 -0
- data/spec/unit/git_cache_spec.rb +76 -22
- data/spec/unit/health_check_spec.rb +1 -1
- data/spec/unit/library_spec.rb +2 -2
- data/spec/unit/manifest_spec.rb +6 -6
- data/spec/unit/metadata_spec.rb +4 -4
- data/spec/unit/omnibus_spec.rb +4 -4
- data/spec/unit/package_spec.rb +6 -6
- data/spec/unit/packagers/appx_spec.rb +16 -12
- data/spec/unit/packagers/base_spec.rb +5 -5
- data/spec/unit/packagers/bff_spec.rb +45 -15
- data/spec/unit/packagers/deb_spec.rb +95 -17
- data/spec/unit/packagers/ips_spec.rb +61 -17
- data/spec/unit/packagers/makeself_spec.rb +5 -5
- data/spec/unit/packagers/msi_spec.rb +43 -43
- data/spec/unit/packagers/pkg_spec.rb +15 -15
- data/spec/unit/packagers/pkgsrc_spec.rb +77 -0
- data/spec/unit/packagers/rpm_spec.rb +94 -17
- data/spec/unit/packagers/solaris_spec.rb +11 -11
- data/spec/unit/project_spec.rb +53 -22
- data/spec/unit/publisher_spec.rb +2 -2
- data/spec/unit/publishers/artifactory_publisher_spec.rb +7 -3
- data/spec/unit/publishers/s3_publisher_spec.rb +1 -1
- data/spec/unit/s3_helpers_spec.rb +41 -3
- data/spec/unit/software_spec.rb +115 -37
- data/spec/unit/sugarable_spec.rb +23 -3
- data/spec/unit/util_spec.rb +42 -11
- metadata +49 -29
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c1743d10eeba568049429e83ffe6c49ee3d03af8
|
4
|
+
data.tar.gz: d3ddb3b93766faa83e19cf591c4324c9a6392797
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 834462aa9e01a2086d7058c51a595a2ece8ff28d64a7d4166952e950558e5657e9e5e191df2bdbe667c0edb6fbefa72dd5f216668e6d3502dbc64a1aa677b446
|
7
|
+
data.tar.gz: 106d58b1f31a951a25412caa752506fd39979e65f5a584190820ae72781e9c7a350a2f9b5a9acd5fb73c68ef62ac9b13eeef1a7566a609fcb8a4e4173f151294
|
@@ -4,3 +4,14 @@ Briefly describe the new feature or fix here
|
|
4
4
|
|
5
5
|
--------------------------------------------------
|
6
6
|
/cc @chef/omnibus-maintainers <- This ensures the Omnibus Maintainers team are notified to review this PR.
|
7
|
+
|
8
|
+
#### Maintainers
|
9
|
+
|
10
|
+
Please ensure that you check for:
|
11
|
+
|
12
|
+
- [] If this change impacts git cache validity, it bumps the git cache
|
13
|
+
serial number
|
14
|
+
- [] If this change impacts compatibility with omnibus-software, the
|
15
|
+
corresponding change is reviewed and there is a release plan
|
16
|
+
- [] If this change impacts compatibility with the omnibus cookbook, the
|
17
|
+
corresponding change is reviewed and there is a release plan
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,43 @@
|
|
1
1
|
Omnibus CHANGELOG
|
2
2
|
=================
|
3
3
|
|
4
|
+
v5.6.0 (June 20, 2017)
|
5
|
+
----------------------
|
6
|
+
### New Features
|
7
|
+
- Add AWS Shared Credentials support.(#781)
|
8
|
+
- Add option to build command to populate S3 cache. (#781)
|
9
|
+
- Add strip BuildCommand. (#775)
|
10
|
+
- Add support for building against omnibus-toolchain on Windows. (#759)
|
11
|
+
- Don't require build user to have a configured Git identity (#758)
|
12
|
+
- Added endpoint and S3 transfer acceleration as config options (#736)
|
13
|
+
- Only checkout from git_cache once (#747)
|
14
|
+
- IPS: Add version-lock facet at end of manifest (#745)
|
15
|
+
- Alpine Linux Support (#744)
|
16
|
+
- Add fips_mode flags (#742)
|
17
|
+
- SmartOS pkgsrc support (#733)
|
18
|
+
- Make DEB and RPM compression configurable (#738)
|
19
|
+
- Check for the transitive dependency licensing errors during post_build. (#729)
|
20
|
+
- Enable gcc 4.8 on suse/sles if available (#720)
|
21
|
+
- Allow manually specify transitive dependency license information (#712)
|
22
|
+
|
23
|
+
### Bug Fixes
|
24
|
+
- Various bugfixes for APPX support. (#752, #759)
|
25
|
+
- Expose overrides. (#780)
|
26
|
+
- Fixed documentation links and table in README (#769, #778)
|
27
|
+
- Fixed Travis CI Label (#777)
|
28
|
+
- git_cache fixes: Use `.join` on git commands lines to avoid mangle and set
|
29
|
+
`core.ingorecase=false` (#768)
|
30
|
+
- Ignore paths with braces in the BFF packager. (#771)
|
31
|
+
- Switch from single to double quotes in git config. (#767)
|
32
|
+
- Fixed Windows globbing. (#766)
|
33
|
+
- Update pedump to latest released. (#714)
|
34
|
+
- Retry git network operations by default (#753)
|
35
|
+
- Fix guard for non-caching projects (#751)
|
36
|
+
- DMG bug fixes (#748)
|
37
|
+
- IPS Package fixes (#718, #728, #740)
|
38
|
+
- Artifactory publisher fixes/improvements (#725)
|
39
|
+
- Do not autoload fetcher to avoid eace condition (#715)
|
40
|
+
|
4
41
|
v5.5.0 (August 16, 2016)
|
5
42
|
-----------------------
|
6
43
|
### New Features
|
data/Gemfile
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
source "https://rubygems.org"
|
2
2
|
gemspec
|
3
3
|
|
4
|
-
# Fork to allow for a recent version of multipart-post.
|
5
|
-
gem "pedump", git: "https://github.com/ksubrama/pedump", branch: "patch-1"
|
6
|
-
|
7
4
|
# Always use license_scout from master
|
8
|
-
gem "license_scout",
|
5
|
+
gem "license_scout", git: "https://github.com/chef/license_scout"
|
6
|
+
|
7
|
+
# net-ssh 4.x does not work with Ruby 2.2 on Windows. Chef and ChefDK
|
8
|
+
# are pinned to 3.2 so pinning that here. Only used by fauxhai in this project
|
9
|
+
gem "net-ssh", "3.2.0"
|
9
10
|
|
10
11
|
group :docs do
|
11
12
|
gem "yard", "~> 0.8"
|
data/MAINTAINERS.md
CHANGED
@@ -2,27 +2,22 @@
|
|
2
2
|
|
3
3
|
This file lists how the `omnibus` project is maintained.
|
4
4
|
|
5
|
-
When making changes to the system, you need two maintainers to provide a :+1: on
|
6
|
-
your pull request. Additionally, you need to not receive a veto from a
|
7
|
-
Lieutenant or the Project Lead.
|
5
|
+
When making changes to the system, you need two maintainers to provide a :+1: on your pull request. Additionally, you need to not receive a veto from a Lieutenant or the Project Lead.
|
8
6
|
|
9
|
-
Check out
|
10
|
-
[How Chef is Maintained](https://github.com/chef/chef-rfc/blob/master/rfc030-maintenance-policy.md#how-the-project-is-maintained)
|
11
|
-
for details on the process, how to become a maintainer, lieutenant, or the
|
12
|
-
project lead.
|
7
|
+
Check out [How Chef is Maintained](https://github.com/chef/chef-rfc/blob/master/rfc030-maintenance-policy.md#how-the-project-is-maintained) for details on the process, how to become a maintainer, lieutenant, or the project lead.
|
13
8
|
|
14
9
|
## Project Lead
|
15
10
|
|
16
|
-
|
11
|
+
- [Seth Chisamore](https://github.com/schisamo)
|
17
12
|
|
18
13
|
## Maintainers
|
19
14
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
15
|
+
- [Daniel DeLeo](https://github.com/danielsdeleo)
|
16
|
+
- [Jay Mundrawala](https://github.com/jaym)
|
17
|
+
- [Kartik Null Cating-Subramanian](https://github.com/ksubrama)
|
18
|
+
- [Lamont Granquist](https://github.com/lamont-granquist)
|
19
|
+
- [Scott Hain](https://github.com/scotthain)
|
20
|
+
- [Seth Vargo](http://github.com/sethvargo)
|
21
|
+
- [Steven Danna](https://github.com/stevendanna)
|
22
|
+
- [Thom May](https://github.com/thommay)
|
23
|
+
- [Yvonne Lam](http://github.com/yzl)
|
data/README.md
CHANGED
@@ -1,32 +1,27 @@
|
|
1
|
-
![Omnibus Icon](lib/omnibus/assets/README-logo.png) Omnibus
|
2
|
-
|
1
|
+
# ![Omnibus Icon](lib/omnibus/assets/README-logo.png) Omnibus
|
2
|
+
|
3
3
|
[![Gem Version](http://img.shields.io/gem/v/omnibus.svg)][gem]
|
4
|
-
[![Travis Build Status](http://img.shields.io/travis/chef/omnibus.svg?label=Travis
|
4
|
+
[![Travis Build Status](http://img.shields.io/travis/chef/omnibus.svg?label=Travis%20CI)][travis]
|
5
5
|
[![AppVeyor Build Status](http://img.shields.io/appveyor/ci/chef/omnibus.svg?label=AppVeyor)][appveyor]
|
6
6
|
|
7
|
-
[gem]: https://rubygems.org/gems/omnibus
|
8
|
-
[travis]: https://travis-ci.org/chef/omnibus
|
9
|
-
[appveyor]: https://ci.appveyor.com/project/chef/omnibus
|
10
|
-
|
11
7
|
Easily create full-stack installers for your project across a variety of platforms.
|
12
8
|
|
13
9
|
Seth Chisamore and Christopher Maier of CHEF gave an introductory talk on Omnibus at ChefConf 2013, entitled **Eat the Whole Bowl: Building a Full-Stack Installer with Omnibus**:
|
14
|
-
|
15
|
-
|
10
|
+
|
11
|
+
- [Video](http://www.youtube.com/watch?v=q8iJAntXCNY)
|
12
|
+
- [Slides](https://speakerdeck.com/schisamo/eat-the-whole-bowl-building-a-full-stack-installer-with-omnibus)
|
16
13
|
|
17
14
|
This project is managed by the CHEF Release Engineering team. For more information on the Release Engineering team's contribution, triage, and release process, please consult the [CHEF Release Engineering OSS Management Guide](https://docs.google.com/a/opscode.com/document/d/1oJB0vZb_3bl7_ZU2YMDBkMFdL-EWplW1BJv_FXTUOzg/edit).
|
18
15
|
|
16
|
+
## Prerequisites
|
19
17
|
|
20
|
-
Prerequisites
|
21
|
-
-------------
|
22
18
|
Omnibus is designed to run with a minimal set of prerequisites. You will need the following:
|
23
19
|
|
24
|
-
- Ruby 2.
|
20
|
+
- Ruby 2.2+
|
25
21
|
- Bundler
|
26
22
|
|
23
|
+
## Get Started
|
27
24
|
|
28
|
-
Get Started
|
29
|
-
-----------
|
30
25
|
Omnibus provides both a DSL for defining Omnibus projects for your software, as well as a command-line tool for generating installer artifacts from that definition.
|
31
26
|
|
32
27
|
To get started, install Omnibus locally on your workstation.
|
@@ -53,21 +48,20 @@ More details can be found in the generated project's README file.
|
|
53
48
|
|
54
49
|
Omnibus determines the platform for which to build an installer based on **the platform it is currently running on**. That is, you can only generate a `.deb` file on a Debian-based system. To alleviate this caveat, the generated project includes a [Test Kitchen](http://kitchen.ci) setup suitable for generating a series of Omnibus projects.
|
55
50
|
|
51
|
+
## More documentation
|
56
52
|
|
57
|
-
|
58
|
-
|
59
|
-
- [Building on
|
60
|
-
- [Building on
|
61
|
-
- [
|
62
|
-
- [Building on Windows](docs/Building on Windows.md)
|
63
|
-
- [Build Cache](docs/Build Cache.md)
|
53
|
+
- [Building on Debian](docs/Building%20on%20Debian.md)
|
54
|
+
- [Building on OSX](docs/Building%20on%20OSX.md)
|
55
|
+
- [Building on RHEL](docs/Building%20on%20RHEL.md)
|
56
|
+
- [Building on Windows](docs/Building%20on%20Windows.md)
|
57
|
+
- [Build Cache](docs/Build%20Cache.md)
|
64
58
|
|
59
|
+
## Configuration DSL
|
65
60
|
|
66
|
-
Configuration DSL
|
67
|
-
-----------------
|
68
61
|
Though the template project will build, it will not do anything exciting. For that, you need to use the Omnibus DSL to define the specifics of your application.
|
69
62
|
|
70
63
|
### Config
|
64
|
+
|
71
65
|
If present, Omnibus will use a top-level configuration file named `omnibus.rb` at the root of your repository. This file is loaded at runtime and includes a number of configuration tunables. Here is an example:
|
72
66
|
|
73
67
|
```ruby
|
@@ -84,6 +78,8 @@ use_git_caching false
|
|
84
78
|
use_s3_caching true
|
85
79
|
s3_access_key ENV['S3_ACCESS_KEY']
|
86
80
|
s3_secret_key ENV['S3_SECRET_KEY']
|
81
|
+
# You can use the Shared Credentials files in place of the s3_access_key and s3_secret_key.
|
82
|
+
#s3_profile ENV['S3_PROFILE']
|
87
83
|
s3_bucket ENV['S3_BUCKET']
|
88
84
|
```
|
89
85
|
|
@@ -102,6 +98,7 @@ $ bin/omnibus --override use_git_caching:false
|
|
102
98
|
```
|
103
99
|
|
104
100
|
### Projects
|
101
|
+
|
105
102
|
A Project DSL file defines your actual application; this is the thing you are creating a full-stack installer for in the first place. It provides a means to define the dependencies of the project (again, as specified in Software DSL definition files), as well as ways to set installer package metadata.
|
106
103
|
|
107
104
|
All project definitions must be in the `config/projects` directory of your Omnibus repository.
|
@@ -120,24 +117,22 @@ dependency "chef"
|
|
120
117
|
|
121
118
|
Some DSL methods available include:
|
122
119
|
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
By default a timestamp is appended to the build_version.
|
134
|
-
this behavior off by setting `append_timestamp` to `false` in your
|
135
|
-
configuration file or using `--override append_timestamp:false` at the
|
136
|
-
command line.
|
120
|
+
DSL Method | Description
|
121
|
+
:---------------- | ----------------------------------------------------------------
|
122
|
+
`name` | The name of the project
|
123
|
+
`install_dir` | The desired install location of the package
|
124
|
+
`build_version` | The package version
|
125
|
+
`build_iteration` | The package iteration number
|
126
|
+
`dependency` | An Omnibus software-defined component to include in this package
|
127
|
+
`package` | Invoke a packager-specific DSL
|
128
|
+
`compress` | Invoke a compressor-specific DSL
|
129
|
+
|
130
|
+
By default a timestamp is appended to the build_version. You can turn this behavior off by setting `append_timestamp` to `false` in your configuration file or using `--override append_timestamp:false` at the command line.
|
137
131
|
|
138
132
|
For more information, please see the [`Project` documentation](http://rubydoc.info/github/opscode/omnibus/Omnibus/Project).
|
139
133
|
|
140
134
|
### Software
|
135
|
+
|
141
136
|
Omnibus "software" files define individual software components that go into making your overall package. They are the building blocks of your application. The Software DSL provides a way to define where to retrieve the software sources, how to build them, and what dependencies they have. These dependencies are also defined in their own Software DSL files, thus forming the basis for a dependency-aware build ordering.
|
142
137
|
|
143
138
|
All Software definitions should go in the `config/software` directory of your Omnibus project repository.
|
@@ -165,41 +160,42 @@ end
|
|
165
160
|
|
166
161
|
Some of the DSL methods available include:
|
167
162
|
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
For more DSL methods, please consult the [`Software` documentation](http://rubydoc.info/github/
|
178
|
-
|
179
|
-
Additionally, there are a number of DSL methods
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
163
|
+
DSL Method | Description
|
164
|
+
:---------------- | -------------------------------------------------------------------
|
165
|
+
`name` | The name of the software component (this should come first)
|
166
|
+
`default_version` | The version of the software component
|
167
|
+
`source` | Directions to the location of the source
|
168
|
+
`dependency` | An Omnibus software-defined component that this software depends on
|
169
|
+
`relative_path` | The relative path of the extracted tarball
|
170
|
+
`build` | The build instructions
|
171
|
+
|
172
|
+
For more DSL methods, please consult the [`Software` documentation](http://rubydoc.info/github/chef/omnibus/Omnibus/Software).
|
173
|
+
|
174
|
+
Additionally, there are a number of DSL methods available inside the `build` block:
|
175
|
+
|
176
|
+
DSL Method | Description
|
177
|
+
:------------------ | -------------------------------------------------------------
|
178
|
+
`command` | Execute a single shell command
|
179
|
+
`make` | Run make (with or without args), using gmake when appropriate
|
180
|
+
`patch` | Apply a patch from disk
|
181
|
+
`workers` | The maximum number of builders
|
182
|
+
`windows_safe_path` | Format the path to be safe for shelling out on Windows
|
183
|
+
`ruby` | Execute the code as the embedded Ruby
|
184
|
+
`gem` | Execute the code as the embedded Rubygems
|
185
|
+
`bundle` | Execute the code as the embedded Bundler
|
186
|
+
`rake` | Execute the code as the embedded Rake gem
|
187
|
+
`block` | Execute Ruby block at build time
|
188
|
+
`erb` | Render the given ERB template
|
189
|
+
`mkdir` | Create the given directory
|
190
|
+
`touch` | Create the given empty file
|
191
|
+
`delete` | Remove the given file or directory
|
192
|
+
`strip` | Strip symbols from binaries on a given file or directory
|
193
|
+
`copy` | Copy a to b
|
194
|
+
`move` | Move a to b
|
195
|
+
`link` | Link a to b
|
196
|
+
`sync` | Copy all files from a to b, removing any union files
|
197
|
+
|
198
|
+
For more DSL methods, please consult the [`Builder` documentation](http://rubydoc.info/github/chef/omnibus/Omnibus/Builder).
|
203
199
|
|
204
200
|
You can support building multiple versions of the same software in the same software definition file using the `version` method and giving a block:
|
205
201
|
|
@@ -221,6 +217,7 @@ end
|
|
221
217
|
Since the software definitions are simply ruby code, you can conditionally execute anything by wrapping it with pure Ruby that tests for the version number.
|
222
218
|
|
223
219
|
#### Sharing software definitions
|
220
|
+
|
224
221
|
The easiest way to share organization-wide software is via bundler and Rubygems. For an example software repository, look at Chef's [omnibus-software](https://github.com/chef/omnibus-software). For more information, please see the [Rubygems documentation](http://guides.rubygems.org/publishing/).
|
225
222
|
|
226
223
|
It is recommended you use bundler to pull down these gems (as bundler also permits pulling software directly from GitHub):
|
@@ -244,7 +241,6 @@ local_software_dirs %w(/path/to/software /other/path/to/software)
|
|
244
241
|
|
245
242
|
For all of these paths, **order matters**, so it is possible to depend on local software version while still retaining a remote software repo. Given the above example, Omnibus will search for a software definition named `foo` in this order:
|
246
243
|
|
247
|
-
|
248
244
|
```text
|
249
245
|
$PWD/config/software/foo.rb
|
250
246
|
/path/to/software/config/software/foo.rb
|
@@ -255,62 +251,48 @@ $PWD/config/software/foo.rb
|
|
255
251
|
|
256
252
|
The first instance of `foo.rb` that is encountered will be used. Please note that **local** (vendored) softare definitions take precedence!
|
257
253
|
|
258
|
-
Version Manifest
|
259
|
-
----------------
|
254
|
+
## Version Manifest
|
260
255
|
|
261
|
-
Git-based software definitions may specify branches as their
|
262
|
-
default_version. In this case, the exact git revision to use will be
|
263
|
-
determined at build-time unless a project override (see below) or
|
264
|
-
external version manifest is used. To generate a version manifest use
|
265
|
-
the `omnibus manifest` command:
|
256
|
+
Git-based software definitions may specify branches as their default_version. In this case, the exact git revision to use will be determined at build-time unless a project override (see below) or external version manifest is used. To generate a version manifest use the `omnibus manifest` command:
|
266
257
|
|
267
258
|
```
|
268
259
|
omnibus manifest PROJECT -l warn
|
269
260
|
```
|
270
261
|
|
271
|
-
This will output a JSON-formatted manifest containing the resolved
|
272
|
-
version of every software definition.
|
262
|
+
This will output a JSON-formatted manifest containing the resolved version of every software definition.
|
273
263
|
|
274
|
-
Whitelisting Libraries
|
275
|
-
----------------------
|
264
|
+
## Whitelisting Libraries
|
276
265
|
|
277
|
-
Sometimes a platform has libraries that need to be whitelisted so the healthcheck
|
278
|
-
|
279
|
-
|
266
|
+
Sometimes a platform has libraries that need to be whitelisted so the healthcheck can pass. The whitelist found in the [healthcheck](https://github.com/chef/omnibus/blob/master/lib/omnibus/health_check.rb) code comprises the minimal required for successful builds on supported platforms.
|
267
|
+
|
268
|
+
To add your own whitelisted library, simply add the a regex to your software definition in your omnibus project as follows:
|
280
269
|
|
281
|
-
To add your own whitelisted library, simply add the a regex to your software
|
282
|
-
definition in your omnibus project as follows:
|
283
270
|
```
|
284
271
|
whitelist_file /libpcrecpp\.so\..+/
|
285
272
|
```
|
286
|
-
It is typically a good idea to add a conditional to whitelist based on the specific
|
287
|
-
platform that requires it.
|
288
273
|
|
289
|
-
|
290
|
-
|
291
|
-
you should instead build it into the package
|
274
|
+
It is typically a good idea to add a conditional to whitelist based on the specific platform that requires it.
|
275
|
+
|
276
|
+
_Warning: You should only add libraries to the whitelist that are guaranteed to be on the system you install to; if a library comes from a non-default package you should instead build it into the package._
|
277
|
+
|
278
|
+
## Changelog
|
292
279
|
|
293
|
-
|
294
|
-
---------
|
295
|
-
STATUS: *EXPERIMENTAL*
|
280
|
+
STATUS: _EXPERIMENTAL_
|
296
281
|
|
297
|
-
`omnibus changelog generate` will generate a changelog for an omnibus
|
298
|
-
project. This command currently assumes:
|
282
|
+
`omnibus changelog generate` will generate a changelog for an omnibus project. This command currently assumes:
|
299
283
|
|
300
284
|
- version-manifest.json is checked into the project root
|
301
285
|
- the project is a git repository
|
302
286
|
- each version is tagged with a SemVer compliant annotated tag
|
303
287
|
- Any git-based sources are checked out at ../COMPONENT_NAME
|
304
|
-
- Any commit message line prepended with ChangeLog-Entry: should be
|
305
|
-
added to the changelog.
|
288
|
+
- Any commit message line prepended with ChangeLog-Entry: should be added to the changelog.
|
306
289
|
|
307
|
-
These assumptions
|
308
|
-
number of our projects.
|
290
|
+
These assumptions _will_ change as we determine what works best for a number of our projects.
|
309
291
|
|
292
|
+
## Caveats
|
310
293
|
|
311
|
-
Caveats
|
312
|
-
-------
|
313
294
|
### Overrides
|
295
|
+
|
314
296
|
The project definitions can override specific software dependencies by passing in `override` to use the correct version:
|
315
297
|
|
316
298
|
```ruby
|
@@ -326,6 +308,7 @@ dependency "chef"
|
|
326
308
|
**The overridden version must be defined in the associated software!**
|
327
309
|
|
328
310
|
### Debugging
|
311
|
+
|
329
312
|
By default, Omnibus will log at the `warn` level. You can override this by passing the `--log-level` flag to your Omnibus call:
|
330
313
|
|
331
314
|
```shell
|
@@ -333,15 +316,19 @@ $ bin/omnibus build <project> --log-level info # or "debug"
|
|
333
316
|
```
|
334
317
|
|
335
318
|
### Git caching
|
319
|
+
|
336
320
|
by default, Omnibus caches compiled software definitions, so n+1 Omnibus project builds are much faster. This functionality can be disabled by adding the following to your `omnibus.rb`:
|
337
321
|
|
338
322
|
```ruby
|
339
323
|
use_git_caching false
|
340
324
|
```
|
341
325
|
|
326
|
+
## Contributing
|
327
|
+
|
328
|
+
For information on contributing to this project see <https://github.com/chef/chef/blob/master/CONTRIBUTING.md>
|
329
|
+
|
330
|
+
## License
|
342
331
|
|
343
|
-
License
|
344
|
-
-------
|
345
332
|
```text
|
346
333
|
Copyright 2012-2016 Chef Software, Inc.
|
347
334
|
|
@@ -357,3 +344,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
357
344
|
See the License for the specific language governing permissions and
|
358
345
|
limitations under the License.
|
359
346
|
```
|
347
|
+
|
348
|
+
[appveyor]: https://ci.appveyor.com/project/chef/omnibus
|
349
|
+
[gem]: https://rubygems.org/gems/omnibus
|
350
|
+
[travis]: https://travis-ci.org/chef/omnibus
|