omnibus 5.5.0 → 5.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. checksums.yaml +4 -4
  2. data/.github/PULL_REQUEST_TEMPLATE.md +11 -0
  3. data/.travis.yml +2 -1
  4. data/CHANGELOG.md +37 -0
  5. data/Gemfile +5 -4
  6. data/MAINTAINERS.md +12 -17
  7. data/README.md +98 -107
  8. data/appveyor.yml +1 -1
  9. data/lib/omnibus.rb +4 -4
  10. data/lib/omnibus/builder.rb +42 -9
  11. data/lib/omnibus/cli.rb +5 -0
  12. data/lib/omnibus/cli/base.rb +1 -1
  13. data/lib/omnibus/cli/publish.rb +5 -3
  14. data/lib/omnibus/compressors/dmg.rb +2 -2
  15. data/lib/omnibus/config.rb +42 -5
  16. data/lib/omnibus/core_extensions/open_uri.rb +1 -0
  17. data/lib/omnibus/download_helpers.rb +4 -4
  18. data/lib/omnibus/fetchers/git_fetcher.rb +15 -5
  19. data/lib/omnibus/fetchers/net_fetcher.rb +1 -1
  20. data/lib/omnibus/fetchers/path_fetcher.rb +1 -1
  21. data/lib/omnibus/file_syncer.rb +2 -2
  22. data/lib/omnibus/generator_files/omnibus.rb.erb +1 -0
  23. data/lib/omnibus/git_cache.rb +31 -13
  24. data/lib/omnibus/health_check.rb +1 -173
  25. data/lib/omnibus/licensing.rb +48 -7
  26. data/lib/omnibus/manifest.rb +3 -5
  27. data/lib/omnibus/manifest_entry.rb +1 -1
  28. data/lib/omnibus/metadata.rb +2 -1
  29. data/lib/omnibus/packager.rb +3 -1
  30. data/lib/omnibus/packagers/appx.rb +3 -3
  31. data/lib/omnibus/packagers/base.rb +9 -0
  32. data/lib/omnibus/packagers/bff.rb +4 -6
  33. data/lib/omnibus/packagers/deb.rb +95 -1
  34. data/lib/omnibus/packagers/ips.rb +50 -4
  35. data/lib/omnibus/packagers/pkgsrc.rb +112 -0
  36. data/lib/omnibus/packagers/rpm.rb +72 -3
  37. data/lib/omnibus/packagers/solaris.rb +0 -4
  38. data/lib/omnibus/packagers/windows_base.rb +1 -1
  39. data/lib/omnibus/project.rb +13 -3
  40. data/lib/omnibus/publishers/artifactory_publisher.rb +4 -6
  41. data/lib/omnibus/publishers/s3_publisher.rb +8 -3
  42. data/lib/omnibus/reports.rb +1 -1
  43. data/lib/omnibus/s3_cache.rb +18 -5
  44. data/lib/omnibus/s3_helpers.rb +45 -8
  45. data/lib/omnibus/software.rb +55 -37
  46. data/lib/omnibus/sugarable.rb +4 -0
  47. data/lib/omnibus/templating.rb +29 -13
  48. data/lib/omnibus/util.rb +81 -2
  49. data/lib/omnibus/version.rb +1 -1
  50. data/lib/omnibus/whitelist.rb +228 -0
  51. data/omnibus.gemspec +9 -8
  52. data/resources/dmg/create_dmg.osascript.erb +33 -13
  53. data/resources/ips/doc-transform.erb +2 -0
  54. data/resources/rpm/spec.erb +1 -2
  55. data/spec/functional/builder_spec.rb +21 -21
  56. data/spec/functional/fetchers/git_fetcher_spec.rb +6 -6
  57. data/spec/functional/fetchers/net_fetcher_spec.rb +7 -7
  58. data/spec/functional/fetchers/path_fetcher_spec.rb +5 -5
  59. data/spec/functional/file_syncer_spec.rb +6 -6
  60. data/spec/functional/licensing_spec.rb +29 -16
  61. data/spec/functional/templating_spec.rb +23 -22
  62. data/spec/support/git_helpers.rb +30 -24
  63. data/spec/unit/build_version_spec.rb +1 -1
  64. data/spec/unit/builder_spec.rb +36 -24
  65. data/spec/unit/changelogprinter_spec.rb +10 -8
  66. data/spec/unit/cleanroom_spec.rb +6 -6
  67. data/spec/unit/compressors/dmg_spec.rb +23 -37
  68. data/spec/unit/compressors/null_spec.rb +2 -2
  69. data/spec/unit/compressors/tgz_spec.rb +2 -2
  70. data/spec/unit/config_spec.rb +2 -1
  71. data/spec/unit/digestable_spec.rb +2 -2
  72. data/spec/unit/fetchers/git_fetcher_spec.rb +5 -5
  73. data/spec/unit/fetchers/net_fetcher_spec.rb +46 -6
  74. data/spec/unit/fetchers/path_fetcher_spec.rb +5 -5
  75. data/spec/unit/file_syncer_spec.rb +19 -0
  76. data/spec/unit/git_cache_spec.rb +76 -22
  77. data/spec/unit/health_check_spec.rb +1 -1
  78. data/spec/unit/library_spec.rb +2 -2
  79. data/spec/unit/manifest_spec.rb +6 -6
  80. data/spec/unit/metadata_spec.rb +4 -4
  81. data/spec/unit/omnibus_spec.rb +4 -4
  82. data/spec/unit/package_spec.rb +6 -6
  83. data/spec/unit/packagers/appx_spec.rb +16 -12
  84. data/spec/unit/packagers/base_spec.rb +5 -5
  85. data/spec/unit/packagers/bff_spec.rb +45 -15
  86. data/spec/unit/packagers/deb_spec.rb +95 -17
  87. data/spec/unit/packagers/ips_spec.rb +61 -17
  88. data/spec/unit/packagers/makeself_spec.rb +5 -5
  89. data/spec/unit/packagers/msi_spec.rb +43 -43
  90. data/spec/unit/packagers/pkg_spec.rb +15 -15
  91. data/spec/unit/packagers/pkgsrc_spec.rb +77 -0
  92. data/spec/unit/packagers/rpm_spec.rb +94 -17
  93. data/spec/unit/packagers/solaris_spec.rb +11 -11
  94. data/spec/unit/project_spec.rb +53 -22
  95. data/spec/unit/publisher_spec.rb +2 -2
  96. data/spec/unit/publishers/artifactory_publisher_spec.rb +7 -3
  97. data/spec/unit/publishers/s3_publisher_spec.rb +1 -1
  98. data/spec/unit/s3_helpers_spec.rb +41 -3
  99. data/spec/unit/software_spec.rb +115 -37
  100. data/spec/unit/sugarable_spec.rb +23 -3
  101. data/spec/unit/util_spec.rb +42 -11
  102. metadata +49 -29
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: df89be1587ea0dd7f53b9d049fd0b98e59303696
4
- data.tar.gz: 3dbf3e7857bfd275f4d35e04d1b2522259a82f01
3
+ metadata.gz: c1743d10eeba568049429e83ffe6c49ee3d03af8
4
+ data.tar.gz: d3ddb3b93766faa83e19cf591c4324c9a6392797
5
5
  SHA512:
6
- metadata.gz: 73d9cf647ab0734f4e13797ae98f7baff5d1f03011bcd826c291cab03f8fd4c7448fc8328d903211a675b1b023034b84d84a2bd85f304c901e9cc47b6f88fcba
7
- data.tar.gz: 895ab544f10c0cd284965c21c586c30b439ba679f1898b14d1f72671d91c21de43eca176141cdb681f9e8c18de8b93ea9b4e7d62eeb316fa4175fb0f50bbefbf
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
@@ -1,7 +1,8 @@
1
1
  sudo: false
2
2
  rvm:
3
- - 2.1.9
4
3
  - 2.2.5
4
+ - 2.3.1
5
+ - 2.4.1
5
6
  bundler_args: "--jobs 7 --without docs local"
6
7
  branches:
7
8
  only:
@@ -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", github: "chef/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"
@@ -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
- * [Seth Chisamore](https://github.com/schisamo)
11
+ - [Seth Chisamore](https://github.com/schisamo)
17
12
 
18
13
  ## Maintainers
19
14
 
20
- * [Daniel DeLeo](https://github.com/danielsdeleo)
21
- * [Jay Mundrawala](https://github.com/jaym)
22
- * [Kartik Null Cating-Subramanian](https://github.com/ksubrama)
23
- * [Lamont Granquist](https://github.com/lamont-granquist)
24
- * [Scott Hain](https://github.com/scotthain)
25
- * [Seth Vargo](http://github.com/sethvargo)
26
- * [Steven Danna](https://github.com/stevendanna)
27
- * [Thom May](https://github.com/thommay)
28
- * [Yvonne Lam](http://github.com/yzl)
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 CI)][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
- - [Video](http://www.youtube.com/watch?v=q8iJAntXCNY)
15
- - [Slides](https://speakerdeck.com/schisamo/eat-the-whole-bowl-building-a-full-stack-installer-with-omnibus)
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.0.0+
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
- More documentation
58
- ------------------
59
- - [Building on Debian](docs/Building on Debian.md)
60
- - [Building on OSX](docs/Building on OSX.md)
61
- - [Building on RHEL](docs/Building on RHEL.md)
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
- | DSL Method | Description |
124
- | :---------------: | --------------------------------------------|
125
- | `name` | The name of the project |
126
- | `install_dir` | The desired install location of the package |
127
- | `build_version` | The package version |
128
- | `build_iteration` | The package iteration number |
129
- | `dependency` | An Omnibus software-defined component to include in this package |
130
- | `package` | Invoke a packager-specific DSL |
131
- | `compress` | Invoke a compressor-specific DSL |
132
-
133
- By default a timestamp is appended to the build_version. You can turn
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
- | DSL Method | Description |
169
- | :---------------: | -------------------------------------------|
170
- | `name` | The name of the software component (this should come first) |
171
- | `default_version` | The version of the software component |
172
- | `source` | Directions to the location of the source |
173
- | `dependency` | An Omnibus software-defined component that this software depends on |
174
- | `relative_path` | The relative path of the extracted tarball |
175
- | `build` | The build instructions |
176
-
177
- For more DSL methods, please consult the [`Software` documentation](http://rubydoc.info/github/opscode/omnibus/Omnibus/Software).
178
-
179
- Additionally, there are a number of DSL methods avaiable inside the `build` block:
180
-
181
- | DSL Method | Description |
182
- | :-----------------: | -------------------------------------------|
183
- | `command` | Execute a single shell command |
184
- | `make` | Run make (with or without args), using gmake when appropriate |
185
- | `patch` | Apply a patch from disk |
186
- | `workers` | The maximum number of builders |
187
- | `windows_safe_path` | Format the path to be safe for shelling out on Windows |
188
- | `ruby` | Execute the code as the embedded Ruby |
189
- | `gem` | Execute the code as the embedded Rubygems |
190
- | `bundle` | Execute the code as the embedded Bundler |
191
- | `rake` | Execute the code as the embedded Rake gem |
192
- | `block` | Execute Ruby block at build time |
193
- | `erb` | Render the given ERB template |
194
- | `mkdir` | Create the given directory |
195
- | `touch` | Create the given empty file |
196
- | `delete` | Remove the given file or directory |
197
- | `copy` | Copy a to b |
198
- | `move` | Move a to b |
199
- | `link` | Link a to b |
200
- | `sync` | Copy all files from a to b, removing any union files |
201
-
202
- For more DSL methods, please consult the [`Builder` documentation](http://rubydoc.info/github/opscode/omnibus/Omnibus/Builder).
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
- can pass. The whitelist found in the [healthcheck](https://github.com/chef/omnibus/blob/master/lib/omnibus/health_check.rb)
279
- code comprises the minimal required for successful builds on supported platforms.
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
- *Warning: You should only add libraries to the whitelist that are guaranteed to
290
- be on the system you install to; if a library comes from a non-default package
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
- Changelog
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 *will* change as we determine what works best for a
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