summaryrefslogtreecommitdiff
path: root/omnibus
diff options
context:
space:
mode:
Diffstat (limited to 'omnibus')
-rw-r--r--omnibus/.gitignore11
-rw-r--r--omnibus/.kitchen.vmware.yml6
-rw-r--r--omnibus/.kitchen.yml137
-rw-r--r--omnibus/Berksfile12
-rw-r--r--omnibus/Gemfile24
-rw-r--r--omnibus/Gemfile.lock270
-rw-r--r--omnibus/README.md152
-rw-r--r--omnibus/config/projects/angrychef.rb42
-rw-r--r--omnibus/config/projects/chef.rb79
-rw-r--r--omnibus/config/software/chef-appbundle.rb18
-rw-r--r--omnibus/config/software/chef-cleanup.rb30
-rw-r--r--omnibus/config/software/chef-complete.rb20
-rw-r--r--omnibus/config/software/chef-gem-bcrypt_pbkdf-ruby.rb10
-rw-r--r--omnibus/config/software/chef-gem-binding_of_caller.rb10
-rw-r--r--omnibus/config/software/chef-gem-byebug.rb10
-rw-r--r--omnibus/config/software/chef-gem-debug_inspector.rb10
-rw-r--r--omnibus/config/software/chef-gem-ffi-yajl.rb12
-rw-r--r--omnibus/config/software/chef-gem-ffi.rb12
-rw-r--r--omnibus/config/software/chef-gem-json.rb11
-rw-r--r--omnibus/config/software/chef-gem-libyajl2.rb10
-rw-r--r--omnibus/config/software/chef-gem-mini_portile2.rb10
-rw-r--r--omnibus/config/software/chef-gem-nokogiri.rb13
-rw-r--r--omnibus/config/software/chef-gem-pkg-config.rb10
-rw-r--r--omnibus/config/software/chef-gem-rbnacl-libsodium.rb10
-rw-r--r--omnibus/config/software/chef-gem-ruby-prof.rb10
-rw-r--r--omnibus/config/software/chef-gem-ruby-shadow.rb11
-rw-r--r--omnibus/config/software/chef.rb87
-rw-r--r--omnibus/files/chef-appbundle/build-chef-appbundle.rb93
-rw-r--r--omnibus/files/chef-gem/build-chef-gem.rb123
-rw-r--r--omnibus/files/chef-gem/build-chef-gem/gem-install-software-def.rb118
-rw-r--r--omnibus/files/chef/build-chef.rb127
-rw-r--r--omnibus/files/openssl-customization/windows/ssl_env_hack.rb34
-rw-r--r--omnibus/omnibus.rb55
-rwxr-xr-xomnibus/package-scripts/angrychef/postinst111
-rwxr-xr-xomnibus/package-scripts/angrychef/postrm42
-rwxr-xr-xomnibus/package-scripts/chef-fips/postinst111
-rwxr-xr-xomnibus/package-scripts/chef-fips/postrm42
-rwxr-xr-xomnibus/package-scripts/chef/postinst111
-rwxr-xr-xomnibus/package-scripts/chef/postrm42
-rw-r--r--omnibus/resources/chef/dmg/background.pngbin0 -> 44066 bytes
-rw-r--r--omnibus/resources/chef/dmg/icon.pngbin0 -> 245378 bytes
-rw-r--r--omnibus/resources/chef/ips/symlinks.erb6
-rw-r--r--omnibus/resources/chef/msi/assets/LICENSE.rtf197
-rw-r--r--omnibus/resources/chef/msi/assets/banner_background.bmpbin0 -> 114432 bytes
-rw-r--r--omnibus/resources/chef/msi/assets/dialog_background.bmpbin0 -> 615320 bytes
-rw-r--r--omnibus/resources/chef/msi/assets/oc.icobin0 -> 41880 bytes
-rw-r--r--omnibus/resources/chef/msi/assets/oc_16x16.icobin0 -> 1286 bytes
-rw-r--r--omnibus/resources/chef/msi/assets/oc_32x32.icobin0 -> 4682 bytes
-rw-r--r--omnibus/resources/chef/msi/localization-en-us.wxl.erb42
-rw-r--r--omnibus/resources/chef/msi/parameters.wxi.erb9
-rw-r--r--omnibus/resources/chef/msi/source.wxs.erb333
-rw-r--r--omnibus/resources/chef/pkg/background.pngbin0 -> 55731 bytes
-rw-r--r--omnibus/resources/chef/pkg/license.html.erb202
-rw-r--r--omnibus/resources/chef/pkg/welcome.html.erb5
54 files changed, 2840 insertions, 0 deletions
diff --git a/omnibus/.gitignore b/omnibus/.gitignore
new file mode 100644
index 0000000000..1a2c556f8d
--- /dev/null
+++ b/omnibus/.gitignore
@@ -0,0 +1,11 @@
+vendor/bundle
+pkg/*
+.kitchen.local.yml
+bin/*
+files/chef-server-cookbooks/cache/
+files/msi/ChefClient-Config.wxi
+cookbooks
+vendor/cookbooks
+build_timestamp
+ldd.out
+Berksfile.lock
diff --git a/omnibus/.kitchen.vmware.yml b/omnibus/.kitchen.vmware.yml
new file mode 100644
index 0000000000..69f001ef97
--- /dev/null
+++ b/omnibus/.kitchen.vmware.yml
@@ -0,0 +1,6 @@
+driver:
+ name: vagrant
+ provider: vmware_fusion
+ customize:
+ numvcpus: 4
+ memsize: 4096
diff --git a/omnibus/.kitchen.yml b/omnibus/.kitchen.yml
new file mode 100644
index 0000000000..a14d3498de
--- /dev/null
+++ b/omnibus/.kitchen.yml
@@ -0,0 +1,137 @@
+#
+# NOTE: this runs the omnibus cookbook, but does not actually run Omnibus. Use
+# 'kichen converge' to setup the virtual machine and then `kitchen login` to
+# SSH into the machine and run Omnibus.
+#
+
+driver:
+ name: vagrant
+ forward_agent: yes
+ customize:
+ cpus: 4
+ memory: 4096
+ synced_folders:
+ - ['../..', '/vagrant/code']
+ - ['../../omnibus', '/home/vagrant/omnibus']
+ - ['../../omnibus-software', '/home/vagrant/omnibus-software']
+
+provisioner:
+ name: chef_zero
+ # Always install the latest version of Chef.
+ # This is not the version of chef that we're building - this is the version
+ # of chef that omnibus needs to build chef/chef.
+ require_chef_omnibus: true
+ attributes:
+ vagrant:
+ this_key_exists_so_we_have_a_vagrant_key: true
+ omnibus:
+ build_user: vagrant
+ build_user_group: vagrant
+ build_user_password: vagrant
+ product_name: angrychef
+ product_version: latest
+ chef_omnibus_root: /opt/angrychef
+
+platforms:
+ - name: centos-5.11
+ run_list: yum-epel::default
+ - name: centos-6.7
+ run_list: yum-epel::default
+ - name: centos-7.2
+ run_list: yum-epel::default
+ - name: debian-6.0.8
+ run_list: apt::default
+ - name: debian-7.9
+ run_list: apt::default
+ - name: debian-8.2
+ run_list: apt::default
+ - name: freebsd-9.3
+ run_list:
+ - freebsd::portsnap
+ - freebsd::pkgng
+ - name: freebsd-10.2
+ run_list: freebsd::portsnap
+ - name: ubuntu-10.04
+ run_list: apt::default
+ - name: ubuntu-12.04
+ run_list: apt::default
+ - name: ubuntu-14.04
+ run_list: apt::default
+ # The following (private) boxes are shared via Atlas and are only
+ # available to users working for Chef. Sorry, it's about software licensing.
+ #
+ # Chef-internal users, you will need to:
+ # 1. Create an Atlas account: https://atlas.hashicorp.com/
+ # 2. Ping #eng-services-support with your Atlas account name
+ # to be added to the relevant team in Atlas,
+ # 3. Do `vagrant login` with your Atlas creds so that you can download
+ # the private boxes.
+ #
+ # The Mac OS X boxes are VMware only also. You can enable VMware Fusion
+ # by activating the `.kitchen.vmware.yml` file with the `KITCHEN_LOCAL_YAML`
+ # environment variable:
+ #
+ # KITCHEN_LOCAL_YAML=.kitchen.vmware.yml kitchen converge chefdk-macosx-109
+ #
+ <% %w(
+ 10.9
+ 10.10
+ 10.11
+ ).each do |mac_version| %>
+ - name: macosx-<%= mac_version %>
+ driver:
+ box: chef/macosx-<%= mac_version %> # private
+ synced_folders:
+ - ['..', '/Users/vagrant/chef']
+ - ['../../omnibus', '/Users/vagrant/omnibus']
+ - ['../../omnibus-software', '/Users/vagrant/omnibus-software']
+ <% end %>
+ - name: windows-2012r2-standard
+ driver:
+ box: chef/windows-server-2012r2-standard # private
+ synced_folders:
+ # We have to mount this repos enclosing folder as the Omnibus build
+ # gets cranky if the mounted Chef source folder is a symlink. This
+ # mounts at `C:\vagrant\code` and the Chef source folder is available
+ # at `C:\vagrant\code\chef`
+ - ['../..', '/vagrant/code']
+ provisioner:
+ attributes:
+ omnibus:
+ build_user: vagrant
+ build_user_group: Administrators
+ build_user_password: vagrant
+ chef_omnibus_root: /opscode/angrychef
+ # By adding an `i386` to the name the Omnibus cookbook's `load-omnibus-toolchain.bat`
+ # will load the 32-bit version of the MinGW toolchain.
+ - name: windows-2012r2-standard-i386
+ driver:
+ box: chef/windows-server-2012r2-standard # private
+ synced_folders:
+ # We have to mount this repos enclosing folder as the Omnibus build
+ # gets cranky if the mounted ChefDK source folder is a symlink. This
+ # mounts at `C:\vagrant\code` and the ChefDK source folder is available
+ # at `C:\vagrant\code\chef-dk`
+ - ['../..', '/vagrant/code']
+ provisioner:
+ attributes:
+ omnibus:
+ build_user: vagrant
+ build_user_group: Administrators
+ build_user_password: vagrant
+ chef_omnibus_root: /opscode/angrychef
+
+suites:
+ # - name: angrychef
+ # attributes:
+ # omnibus:
+ # <<: *attribute_defaults
+ # install_dir: /opt/angrychef
+ # run_list:
+ # - omnibus::default
+ - name: chef
+ attributes:
+ omnibus:
+ install_dir: /opt/chef
+ run_list:
+ - omnibus::default
diff --git a/omnibus/Berksfile b/omnibus/Berksfile
new file mode 100644
index 0000000000..614c6da643
--- /dev/null
+++ b/omnibus/Berksfile
@@ -0,0 +1,12 @@
+source "https://supermarket.chef.io"
+
+cookbook "omnibus"
+
+# Uncomment to use the latest version of the Omnibus cookbook from GitHub
+# cookbook 'omnibus', github: 'opscode-cookbooks/omnibus'
+
+group :integration do
+ cookbook "apt", "~> 2.3"
+ cookbook "freebsd", "~> 0.1"
+ cookbook "yum-epel", "~> 0.3"
+end
diff --git a/omnibus/Gemfile b/omnibus/Gemfile
new file mode 100644
index 0000000000..735b371c62
--- /dev/null
+++ b/omnibus/Gemfile
@@ -0,0 +1,24 @@
+source "https://rubygems.org"
+
+gem "omnibus", github: "chef/omnibus", branch: "rhass/COOL-502_with_gcc_investigate"
+gem "omnibus-software", github: "chef/omnibus-software", branch: "shain/ruby_windows_monster"
+gem "license_scout", github: "chef/license_scout"
+
+gem "pedump"
+
+# This development group is installed by default when you run `bundle install`,
+# but if you are using Omnibus in a CI-based infrastructure, you do not need
+# the Test Kitchen-based build lab. You can skip these unnecessary dependencies
+# by running `bundle install --without development` to speed up build times.
+group :development do
+ # Use Berkshelf for resolving cookbook dependencies
+ gem "berkshelf", "~> 4.0"
+
+ # Use Test Kitchen with Vagrant for converging the build environment
+ gem "test-kitchen", "~> 1.13"
+ gem "kitchen-vagrant", "~> 0.19.0"
+ gem "winrm-fs", "~> 1.0"
+ gem "pry"
+ gem "pry-byebug"
+ gem "pry-stack_explorer"
+end
diff --git a/omnibus/Gemfile.lock b/omnibus/Gemfile.lock
new file mode 100644
index 0000000000..ceb322bf20
--- /dev/null
+++ b/omnibus/Gemfile.lock
@@ -0,0 +1,270 @@
+GIT
+ remote: git://github.com/chef/license_scout.git
+ revision: f90293a9753652fb64994a14de4108e503c06632
+ specs:
+ license_scout (0.1.2)
+ ffi-yajl (~> 2.2)
+ mixlib-shellout (~> 2.2)
+
+GIT
+ remote: git://github.com/chef/omnibus-software.git
+ revision: 086710002ec0054b3d240d14ca04d11163f528aa
+ branch: shain/ruby_windows_monster
+ specs:
+ omnibus-software (4.0.0)
+ chef-sugar (>= 3.4.0)
+ omnibus (>= 5.5.0)
+
+GIT
+ remote: git://github.com/chef/omnibus.git
+ revision: dce5283a85a44484a66a8a84991beba92e46fd12
+ branch: rhass/COOL-502_with_gcc_investigate
+ specs:
+ omnibus (5.5.0)
+ aws-sdk (~> 2)
+ chef-sugar (~> 3.3)
+ cleanroom (~> 1.0)
+ ffi-yajl (~> 2.2)
+ license_scout
+ mixlib-shellout (~> 2.0)
+ mixlib-versioning
+ ohai (~> 8.0)
+ ruby-progressbar (~> 1.7)
+ thor (~> 0.18)
+
+GEM
+ remote: https://rubygems.org/
+ specs:
+ addressable (2.5.0)
+ public_suffix (~> 2.0, >= 2.0.2)
+ artifactory (2.6.0)
+ awesome_print (1.7.0)
+ aws-sdk (2.7.5)
+ aws-sdk-resources (= 2.7.5)
+ aws-sdk-core (2.7.5)
+ aws-sigv4 (~> 1.0)
+ jmespath (~> 1.0)
+ aws-sdk-resources (2.7.5)
+ aws-sdk-core (= 2.7.5)
+ aws-sigv4 (1.0.0)
+ berkshelf (4.3.5)
+ addressable (~> 2.3, >= 2.3.4)
+ berkshelf-api-client (~> 2.0, >= 2.0.2)
+ buff-config (~> 1.0)
+ buff-extensions (~> 1.0)
+ buff-shell_out (~> 0.1)
+ celluloid (= 0.16.0)
+ celluloid-io (~> 0.16.1)
+ cleanroom (~> 1.0)
+ faraday (~> 0.9)
+ httpclient (~> 2.7)
+ minitar (~> 0.5, >= 0.5.4)
+ mixlib-archive (~> 0.1)
+ octokit (~> 4.0)
+ retryable (~> 2.0)
+ ridley (~> 4.5)
+ solve (~> 2.0)
+ thor (~> 0.19)
+ berkshelf-api-client (2.0.2)
+ faraday (~> 0.9.1)
+ httpclient (~> 2.7.0)
+ ridley (~> 4.5)
+ binding_of_caller (0.7.2)
+ debug_inspector (>= 0.0.1)
+ buff-config (1.0.1)
+ buff-extensions (~> 1.0)
+ varia_model (~> 0.4)
+ buff-extensions (1.0.0)
+ buff-ignore (1.1.1)
+ buff-ruby_engine (0.1.0)
+ buff-shell_out (0.2.0)
+ buff-ruby_engine (~> 0.1.0)
+ builder (3.2.3)
+ byebug (9.0.6)
+ celluloid (0.16.0)
+ timers (~> 4.0.0)
+ celluloid-io (0.16.2)
+ celluloid (>= 0.16.0)
+ nio4r (>= 1.1.0)
+ chef-config (12.18.31)
+ addressable
+ fuzzyurl
+ mixlib-config (~> 2.0)
+ mixlib-shellout (~> 2.0)
+ chef-sugar (3.4.0)
+ cleanroom (1.0.0)
+ coderay (1.1.1)
+ debug_inspector (0.0.2)
+ erubis (2.7.0)
+ faraday (0.9.2)
+ multipart-post (>= 1.2, < 3)
+ ffi (1.9.17)
+ ffi (1.9.17-x86-mingw32)
+ ffi-yajl (2.3.0)
+ libyajl2 (~> 1.2)
+ fuzzyurl (0.9.0)
+ gssapi (1.2.0)
+ ffi (>= 1.0.1)
+ gyoku (1.3.1)
+ builder (>= 2.1.2)
+ hashie (3.5.1)
+ hitimes (1.2.4)
+ hitimes (1.2.4-x86-mingw32)
+ httpclient (2.7.2)
+ iostruct (0.0.4)
+ ipaddress (0.8.3)
+ jmespath (1.3.1)
+ json (2.0.3)
+ kitchen-vagrant (0.19.0)
+ test-kitchen (~> 1.4)
+ libyajl2 (1.2.0)
+ little-plugger (1.1.4)
+ logging (2.1.0)
+ little-plugger (~> 1.1)
+ multi_json (~> 1.10)
+ method_source (0.8.2)
+ minitar (0.6.1)
+ mixlib-archive (0.4.1)
+ mixlib-log
+ mixlib-authentication (1.4.1)
+ mixlib-log
+ mixlib-cli (1.7.0)
+ mixlib-config (2.2.4)
+ mixlib-install (2.1.12)
+ artifactory
+ mixlib-shellout
+ mixlib-versioning
+ thor
+ mixlib-log (1.7.1)
+ mixlib-shellout (2.2.7)
+ mixlib-shellout (2.2.7-universal-mingw32)
+ win32-process (~> 0.8.2)
+ wmi-lite (~> 1.0)
+ mixlib-versioning (1.1.0)
+ molinillo (0.4.5)
+ multi_json (1.12.1)
+ multipart-post (2.0.0)
+ net-scp (1.2.1)
+ net-ssh (>= 2.6.5)
+ net-ssh (4.0.1)
+ net-ssh-gateway (1.3.0)
+ net-ssh (>= 2.6.5)
+ nio4r (2.0.0)
+ nori (2.6.0)
+ octokit (4.6.2)
+ sawyer (~> 0.8.0, >= 0.5.3)
+ ohai (8.23.0)
+ chef-config (>= 12.5.0.alpha.1, < 13)
+ ffi (~> 1.9)
+ ffi-yajl (~> 2.2)
+ ipaddress
+ mixlib-cli
+ mixlib-config (~> 2.0)
+ mixlib-log (>= 1.7.1, < 2.0)
+ mixlib-shellout (~> 2.0)
+ plist (~> 3.1)
+ systemu (~> 2.6.4)
+ wmi-lite (~> 1.0)
+ pedump (0.5.2)
+ awesome_print
+ iostruct (>= 0.0.4)
+ multipart-post (~> 2.0.0)
+ progressbar
+ zhexdump (>= 0.0.2)
+ plist (3.2.0)
+ progressbar (1.8.2)
+ pry (0.10.4)
+ coderay (~> 1.1.0)
+ method_source (~> 0.8.1)
+ slop (~> 3.4)
+ pry-byebug (3.4.2)
+ byebug (~> 9.0)
+ pry (~> 0.10)
+ pry-stack_explorer (0.4.9.2)
+ binding_of_caller (>= 0.7)
+ pry (>= 0.9.11)
+ public_suffix (2.0.5)
+ retryable (2.0.4)
+ ridley (4.6.1)
+ addressable
+ buff-config (~> 1.0)
+ buff-extensions (~> 1.0)
+ buff-ignore (~> 1.1.1)
+ buff-shell_out (~> 0.1)
+ celluloid (~> 0.16.0)
+ celluloid-io (~> 0.16.1)
+ chef-config (>= 12.5.0)
+ erubis
+ faraday (~> 0.9.0)
+ hashie (>= 2.0.2, < 4.0.0)
+ httpclient (~> 2.7)
+ json (>= 1.7.7)
+ mixlib-authentication (>= 1.3.0)
+ retryable (~> 2.0)
+ semverse (~> 1.1)
+ varia_model (~> 0.4.0)
+ ruby-progressbar (1.8.1)
+ rubyntlm (0.6.1)
+ rubyzip (1.2.1)
+ safe_yaml (1.0.4)
+ sawyer (0.8.1)
+ addressable (>= 2.3.5, < 2.6)
+ faraday (~> 0.8, < 1.0)
+ semverse (1.2.1)
+ slop (3.6.0)
+ solve (2.0.3)
+ molinillo (~> 0.4.2)
+ semverse (~> 1.1)
+ systemu (2.6.5)
+ test-kitchen (1.15.0)
+ mixlib-install (>= 1.2, < 3.0)
+ mixlib-shellout (>= 1.2, < 3.0)
+ net-scp (~> 1.1)
+ net-ssh (>= 2.9, < 5.0)
+ net-ssh-gateway (~> 1.2)
+ safe_yaml (~> 1.0)
+ thor (~> 0.18)
+ thor (0.19.4)
+ timers (4.0.4)
+ hitimes
+ varia_model (0.4.1)
+ buff-extensions (~> 1.0)
+ hashie (>= 2.0.2, < 4.0.0)
+ win32-process (0.8.3)
+ ffi (>= 1.0.0)
+ winrm (2.1.2)
+ builder (>= 2.1.2)
+ erubis (~> 2.7)
+ gssapi (~> 1.2)
+ gyoku (~> 1.0)
+ httpclient (~> 2.2, >= 2.2.0.2)
+ logging (>= 1.6.1, < 3.0)
+ nori (~> 2.0)
+ rubyntlm (~> 0.6.0, >= 0.6.1)
+ winrm-fs (1.0.1)
+ erubis (~> 2.7)
+ logging (>= 1.6.1, < 3.0)
+ rubyzip (~> 1.1)
+ winrm (~> 2.0)
+ wmi-lite (1.0.0)
+ zhexdump (0.0.2)
+
+PLATFORMS
+ ruby
+ x86-mingw32
+
+DEPENDENCIES
+ berkshelf (~> 4.0)
+ kitchen-vagrant (~> 0.19.0)
+ license_scout!
+ omnibus!
+ omnibus-software!
+ pedump
+ pry
+ pry-byebug
+ pry-stack_explorer
+ test-kitchen (~> 1.13)
+ winrm-fs (~> 1.0)
+
+BUNDLED WITH
+ 1.12.5
diff --git a/omnibus/README.md b/omnibus/README.md
new file mode 100644
index 0000000000..5f325aa164
--- /dev/null
+++ b/omnibus/README.md
@@ -0,0 +1,152 @@
+Client Tools Omnibus project
+============================
+This project creates full-stack platform-specific packages for the following projects:
+
+* AngryChef
+* Chef
+* Chef with FIPS enabled
+
+Installation
+------------
+You must have a sane Ruby 1.9+ environment with Bundler installed. Ensure all
+the required gems are installed:
+
+```shell
+$ bundle install --without development
+```
+
+Usage
+-----
+### Build
+
+You create a platform-specific package using the `build project` command:
+
+```shell
+$ bundle exec omnibus build <PROJECT>
+```
+
+The platform/architecture type of the package created will match the platform
+where the `build project` command is invoked. For example, running this command
+on a MacBook Pro will generate a Mac OS X package. After the build completes
+packages will be available in the `pkg/` folder.
+
+### Clean
+
+You can clean up all temporary files generated during the build process with
+the `clean` command:
+
+```shell
+$ bundle exec omnibus clean <PROJECT>
+```
+
+Adding the `--purge` purge option removes __ALL__ files generated during the
+build including the project install directory (`/opt/chef`) and
+the package cache directory (`/var/cache/omnibus/pkg`):
+
+```shell
+$ bundle exec omnibus clean <PROJECT> --purge
+```
+
+### Publish
+
+Omnibus has a built-in mechanism for releasing to a variety of "backends", such
+as Amazon S3 and Artifactory. You must set the proper credentials in your `omnibus.rb`
+config file or specify them via the command line.
+
+```shell
+$ bundle exec omnibus publish path/to/*.deb --backend s3
+```
+
+### Help
+
+Full help for the Omnibus command line interface can be accessed with the
+`help` command:
+
+```shell
+$ bundle exec omnibus help
+```
+
+Kitchen-based Build Environment
+-------------------------------
+Every Omnibus project ships will a project-specific
+[Berksfile](http://berkshelf.com/) that will allow you to build your omnibus projects on all of the projects listed
+in the `.kitchen.yml`. You can add/remove additional platforms as needed by
+changing the list found in the `.kitchen.yml` `platforms` YAML stanza.
+
+This build environment is designed to get you up-and-running quickly. However,
+there is nothing that restricts you to building on other platforms. Simply use
+the [omnibus cookbook](https://github.com/chef-cookbooks/omnibus) to setup
+your desired platform and execute the build steps listed above.
+
+The default build environment requires Test Kitchen and VirtualBox for local
+development. Test Kitchen also exposes the ability to provision instances using
+various cloud providers like AWS, DigitalOcean, or OpenStack. For more
+information, please see the [Test Kitchen documentation](http://kitchen.ci).
+
+Once you have tweaked your `.kitchen.yml` (or `.kitchen.local.yml`) to your
+liking, you can bring up an individual build environment using the `kitchen`
+command.
+
+```shell
+$ bundle exec kitchen converge chef-ubuntu-1404
+```
+
+Then login to the instance and build the project as described in the Usage
+section:
+
+```shell
+$ bundle exec kitchen login <PROJECT>-ubuntu-1204
+[vagrant@ubuntu...] $ cd chef/omnibus
+[vagrant@ubuntu...] $ bundle install --without development # Don't install dev tools!
+[vagrant@ubuntu...] $ ...
+[vagrant@ubuntu...] $ bundle exec omnibus build <PROJECT> -l internal
+```
+```shell
+$ kitchen login chef-ubuntu-1404
+[vagrant@ubuntu...] $ source load-omnibus-toolchain.sh
+[vagrant@ubuntu...] $ cd chef/omnibus
+[vagrant@ubuntu...] $ bundle install --without development # Don't install dev tools!
+[vagrant@ubuntu...] $ ...
+[vagrant@ubuntu...] $ bundle exec omnibus build chef -l internal
+```
+
+You can also login to Windows instances but will have to manually call the
+`load-omnibus-toolchain.bat` script which initializes the build environment.
+Please note the mounted code directory is also at `C:\home\vagrant\chef\omnibus`
+as opposed to `C:\Users\vagrant\chef\omnibus`.
+
+```shell
+$ bundle exec kitchen login <PROJECT>-windows-81-professional
+Last login: Sat Sep 13 10:19:04 2014 from 172.16.27.1
+Microsoft Windows [Version 6.3.9600]
+(c) 2013 Microsoft Corporation. All rights reserved.
+
+C:\>C:\vagrant\load-omnibus-toolchain.bat
+
+C:\>cd C:\vagrant\code\chef\omnibus
+
+C:\vagrant\code\chef\omnibus>bundle install --without development
+
+C:\vagrant\code\chef\omnibus>bundle exec omnibus build chef -l internal
+```
+
+For a complete list of all commands and platforms, run `kitchen list` or
+`kitchen help`.
+
+License
+-------
+```text
+Copyright 2012-2016, Chef Software, Inc.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+```
diff --git a/omnibus/config/projects/angrychef.rb b/omnibus/config/projects/angrychef.rb
new file mode 100644
index 0000000000..ff83f41327
--- /dev/null
+++ b/omnibus/config/projects/angrychef.rb
@@ -0,0 +1,42 @@
+#
+# Copyright 2012-2016, Chef Software, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+#
+# This is a clone of the Chef project that we can install on the Chef build and
+# test machines. As such this project definition is just a thin wrapper around
+# `config/project/chef.rb`.
+#
+current_file = __FILE__
+chef_project_contents = IO.read(File.expand_path("../chef.rb", __FILE__))
+instance_eval chef_project_contents
+
+name "angrychef"
+friendly_name "Angry Chef Client"
+
+if windows?
+ # NOTE: Ruby DevKit fundamentally CANNOT be installed into "Program Files"
+ # Native gems will use gcc which will barf on files with spaces,
+ # which is only fixable if everyone in the world fixes their Makefiles
+ install_dir "#{default_root}/opscode/#{name}"
+ package_name "angrychef"
+else
+ install_dir "#{default_root}/#{name}"
+end
+
+resources_path "#{resources_path}/../chef"
+
+msi_upgrade_code = "D7FDDC1A-7668-404E-AD2F-61F875632A9C"
+project_location_dir = "angrychef"
diff --git a/omnibus/config/projects/chef.rb b/omnibus/config/projects/chef.rb
new file mode 100644
index 0000000000..a0e490ceab
--- /dev/null
+++ b/omnibus/config/projects/chef.rb
@@ -0,0 +1,79 @@
+#
+# Copyright 2012-2016, Chef Software, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+name "chef"
+friendly_name "Chef Client"
+maintainer "Chef Software, Inc. <maintainers@chef.io>"
+homepage "https://www.chef.io"
+license "Apache-2.0"
+license_file "../LICENSE"
+
+build_iteration 1
+# Do not use __FILE__ after this point, use current_file. If you use __FILE__
+# after this point, any dependent defs (ex: angrychef) that use instance_eval
+# will fail to work correctly.
+current_file ||= __FILE__
+version_file = File.expand_path("../../../../VERSION", current_file)
+build_version IO.read(version_file).strip
+
+if windows?
+ # NOTE: Ruby DevKit fundamentally CANNOT be installed into "Program Files"
+ # Native gems will use gcc which will barf on files with spaces,
+ # which is only fixable if everyone in the world fixes their Makefiles
+ install_dir "#{default_root}/opscode/#{name}"
+ package_name "chef-client"
+else
+ install_dir "#{default_root}/#{name}"
+end
+
+# Load dynamically updated overrides
+overrides_path = File.expand_path("../../../../omnibus_overrides.rb", current_file)
+instance_eval(IO.read(overrides_path), overrides_path)
+
+override :"ruby-windows-devkit", version: "4.5.2-20111229-1559" if windows? && windows_arch_i386?
+
+dependency "preparation"
+
+# All actual dependencies are in chef-complete, so that the addition
+# or removal of a dependency doesn't dirty the entire project file
+dependency "chef-complete"
+
+package :rpm do
+ signing_passphrase ENV["OMNIBUS_RPM_SIGNING_PASSPHRASE"]
+end
+
+proj_to_work_around_cleanroom = self
+package :pkg do
+ identifier "com.getchef.pkg.#{proj_to_work_around_cleanroom.name}"
+ signing_identity "Developer ID Installer: Chef Software, Inc. (EU3VF8YLX2)"
+end
+compress :dmg
+
+msi_upgrade_code = "D607A85C-BDFA-4F08-83ED-2ECB4DCD6BC5"
+project_location_dir = name
+package :msi do
+ fast_msi true
+ upgrade_code msi_upgrade_code
+ wix_candle_extension "WixUtilExtension"
+ wix_light_extension "WixUtilExtension"
+ signing_identity "F74E1A68005E8A9C465C3D2FF7B41F3988F0EA09", machine_store: true
+ parameters ChefLogDllPath: windows_safe_path(gem_path("chef-[0-9]*-mingw32/ext/win32-eventlog/chef-log.dll")),
+ ProjectLocationDir: project_location_dir
+end
+
+package :appx do
+ signing_identity "F74E1A68005E8A9C465C3D2FF7B41F3988F0EA09", machine_store: true
+end
diff --git a/omnibus/config/software/chef-appbundle.rb b/omnibus/config/software/chef-appbundle.rb
new file mode 100644
index 0000000000..8ea21103fb
--- /dev/null
+++ b/omnibus/config/software/chef-appbundle.rb
@@ -0,0 +1,18 @@
+name "chef-appbundle"
+default_version "local_source"
+
+license :project_license
+skip_transitive_dependency_licensing true
+
+source path: project.files_path
+
+dependency "chef"
+
+build do
+ # This is where we get the definitions below
+ require_relative "../../files/chef-appbundle/build-chef-appbundle"
+ extend BuildChefAppbundle
+
+ appbundle_gem "chef"
+ appbundle_gem "ohai"
+end
diff --git a/omnibus/config/software/chef-cleanup.rb b/omnibus/config/software/chef-cleanup.rb
new file mode 100644
index 0000000000..302e841699
--- /dev/null
+++ b/omnibus/config/software/chef-cleanup.rb
@@ -0,0 +1,30 @@
+name "chef-cleanup"
+default_version "local_source"
+
+license :project_license
+skip_transitive_dependency_licensing true
+
+source path: project.files_path
+
+dependency "chef"
+
+build do
+ # This is where we get the definitions below
+ require_relative "../../files/chef/build-chef"
+ extend BuildChef
+
+ # Clear the now-unnecessary git caches, cached gems, and git-checked-out gems
+ block "Delete bundler git cache and git installs" do
+ gemdir = shellout!("#{gem_bin} environment gemdir", env: env).stdout.chomp
+ remove_directory "#{gemdir}/cache"
+ remove_directory "#{gemdir}/bundler"
+ end
+
+ delete "#{install_dir}/embedded/docs"
+ delete "#{install_dir}/embedded/share/man"
+ delete "#{install_dir}/embedded/share/doc"
+ delete "#{install_dir}/embedded/share/gtk-doc"
+ delete "#{install_dir}/embedded/ssl/man"
+ delete "#{install_dir}/embedded/man"
+ delete "#{install_dir}/embedded/info"
+end
diff --git a/omnibus/config/software/chef-complete.rb b/omnibus/config/software/chef-complete.rb
new file mode 100644
index 0000000000..4e2b9f6ec2
--- /dev/null
+++ b/omnibus/config/software/chef-complete.rb
@@ -0,0 +1,20 @@
+name "chef-complete"
+
+license :project_license
+skip_transitive_dependency_licensing true
+
+dependency "chef"
+dependency "chef-appbundle"
+dependency "chef-cleanup"
+
+dependency "gem-permissions"
+dependency "shebang-cleanup"
+dependency "version-manifest"
+dependency "openssl-customization"
+
+if windows?
+ # TODO can this be safely moved to before the chef?
+ # It would make caching better ...
+ dependency "ruby-windows-devkit"
+ dependency "ruby-windows-devkit-bash"
+end
diff --git a/omnibus/config/software/chef-gem-bcrypt_pbkdf-ruby.rb b/omnibus/config/software/chef-gem-bcrypt_pbkdf-ruby.rb
new file mode 100644
index 0000000000..1f7f4d3207
--- /dev/null
+++ b/omnibus/config/software/chef-gem-bcrypt_pbkdf-ruby.rb
@@ -0,0 +1,10 @@
+# gem installs this gem from the version specified in chef's Gemfile.lock
+# so we can take advantage of omnibus's caching. Just duplicate this file and
+# add the new software def to chef software def if you want to separate
+# another gem's installation.
+require_relative "../../files/chef-gem/build-chef-gem/gem-install-software-def"
+BuildChefGem::GemInstallSoftwareDef.define(self, __FILE__)
+
+license "MIT"
+license_file "https://raw.githubusercontent.com/mfazekas/bcrypt_pbkdf-ruby/master/COPYING"
+skip_transitive_dependency_licensing true
diff --git a/omnibus/config/software/chef-gem-binding_of_caller.rb b/omnibus/config/software/chef-gem-binding_of_caller.rb
new file mode 100644
index 0000000000..3e7a9f9c70
--- /dev/null
+++ b/omnibus/config/software/chef-gem-binding_of_caller.rb
@@ -0,0 +1,10 @@
+# gem installs this gem from the version specified in chef's Gemfile.lock
+# so we can take advantage of omnibus's caching. Just duplicate this file and
+# add the new software def to chef software def if you want to separate
+# another gem's installation.
+require_relative "../../files/chef-gem/build-chef-gem/gem-install-software-def"
+BuildChefGem::GemInstallSoftwareDef.define(self, __FILE__)
+
+license "MIT"
+license_file "https://github.com/banister/binding_of_caller/blob/master/LICENSE"
+skip_transitive_dependency_licensing true
diff --git a/omnibus/config/software/chef-gem-byebug.rb b/omnibus/config/software/chef-gem-byebug.rb
new file mode 100644
index 0000000000..3aef706e82
--- /dev/null
+++ b/omnibus/config/software/chef-gem-byebug.rb
@@ -0,0 +1,10 @@
+# gem installs this gem from the version specified in chef's Gemfile.lock
+# so we can take advantage of omnibus's caching. Just duplicate this file and
+# add the new software def to chef software def if you want to separate
+# another gem's installation.
+require_relative "../../files/chef-gem/build-chef-gem/gem-install-software-def"
+BuildChefGem::GemInstallSoftwareDef.define(self, __FILE__)
+
+license "MIT"
+license_file "https://github.com/deivid-rodriguez/byebug/blob/master/LICENSE"
+skip_transitive_dependency_licensing true
diff --git a/omnibus/config/software/chef-gem-debug_inspector.rb b/omnibus/config/software/chef-gem-debug_inspector.rb
new file mode 100644
index 0000000000..ab818768ea
--- /dev/null
+++ b/omnibus/config/software/chef-gem-debug_inspector.rb
@@ -0,0 +1,10 @@
+# gem installs this gem from the version specified in chef's Gemfile.lock
+# so we can take advantage of omnibus's caching. Just duplicate this file and
+# add the new software def to chef software def if you want to separate
+# another gem's installation.
+require_relative "../../files/chef-gem/build-chef-gem/gem-install-software-def"
+BuildChefGem::GemInstallSoftwareDef.define(self, __FILE__)
+
+license "MIT"
+license_file "https://github.com/banister/debug_inspector/blob/master/README.md"
+skip_transitive_dependency_licensing true
diff --git a/omnibus/config/software/chef-gem-ffi-yajl.rb b/omnibus/config/software/chef-gem-ffi-yajl.rb
new file mode 100644
index 0000000000..44f98446bd
--- /dev/null
+++ b/omnibus/config/software/chef-gem-ffi-yajl.rb
@@ -0,0 +1,12 @@
+# gem installs this gem from the version specified in chef's Gemfile.lock
+# so we can take advantage of omnibus's caching. Just duplicate this file and
+# add the new software def to chef software def if you want to separate
+# another gem's installation.
+require_relative "../../files/chef-gem/build-chef-gem/gem-install-software-def"
+BuildChefGem::GemInstallSoftwareDef.define(self, __FILE__)
+
+license "MIT"
+license_file "https://github.com/chef/ffi-yajl/blob/master/LICENSE"
+skip_transitive_dependency_licensing true
+
+dependency "chef-gem-libyajl2"
diff --git a/omnibus/config/software/chef-gem-ffi.rb b/omnibus/config/software/chef-gem-ffi.rb
new file mode 100644
index 0000000000..ea8879c2ac
--- /dev/null
+++ b/omnibus/config/software/chef-gem-ffi.rb
@@ -0,0 +1,12 @@
+# gem installs this gem from the version specified in chef's Gemfile.lock
+# so we can take advantage of omnibus's caching. Just duplicate this file and
+# add the new software def to chef software def if you want to separate
+# another gem's installation.
+require_relative "../../files/chef-gem/build-chef-gem/gem-install-software-def"
+BuildChefGem::GemInstallSoftwareDef.define(self, __FILE__)
+
+license "BSD-3-Clause"
+license_file "https://github.com/ffi/ffi/blob/master/LICENSE"
+license_file "https://github.com/ffi/ffi/blob/master/COPYING"
+license_file "https://github.com/ffi/ffi/blob/master/LICENSE.SPECS"
+skip_transitive_dependency_licensing true
diff --git a/omnibus/config/software/chef-gem-json.rb b/omnibus/config/software/chef-gem-json.rb
new file mode 100644
index 0000000000..9217359ba2
--- /dev/null
+++ b/omnibus/config/software/chef-gem-json.rb
@@ -0,0 +1,11 @@
+# gem installs this gem from the version specified in chef's Gemfile.lock
+# so we can take advantage of omnibus's caching. Just duplicate this file and
+# add the new software def to chef software def if you want to separate
+# another gem's installation.
+require_relative "../../files/chef-gem/build-chef-gem/gem-install-software-def"
+BuildChefGem::GemInstallSoftwareDef.define(self, __FILE__)
+
+license "Ruby"
+license_file "https://github.com/flori/json/blob/master/README.md"
+license_file "https://www.ruby-lang.org/en/about/license.txt"
+skip_transitive_dependency_licensing true
diff --git a/omnibus/config/software/chef-gem-libyajl2.rb b/omnibus/config/software/chef-gem-libyajl2.rb
new file mode 100644
index 0000000000..47ef42e1cf
--- /dev/null
+++ b/omnibus/config/software/chef-gem-libyajl2.rb
@@ -0,0 +1,10 @@
+# gem installs this gem from the version specified in chef's Gemfile.lock
+# so we can take advantage of omnibus's caching. Just duplicate this file and
+# add the new software def to chef software def if you want to separate
+# another gem's installation.
+require_relative "../../files/chef-gem/build-chef-gem/gem-install-software-def"
+BuildChefGem::GemInstallSoftwareDef.define(self, __FILE__)
+
+license "Apache-2.0"
+license_file "https://github.com/chef/libyajl2-gem/blob/master/LICENSE"
+skip_transitive_dependency_licensing true
diff --git a/omnibus/config/software/chef-gem-mini_portile2.rb b/omnibus/config/software/chef-gem-mini_portile2.rb
new file mode 100644
index 0000000000..36a2b833dd
--- /dev/null
+++ b/omnibus/config/software/chef-gem-mini_portile2.rb
@@ -0,0 +1,10 @@
+# gem installs this gem from the version specified in chef's Gemfile.lock
+# so we can take advantage of omnibus's caching. Just duplicate this file and
+# add the new software def to chef software def if you want to separate
+# another gem's installation.
+require_relative "../../files/chef-gem/build-chef-gem/gem-install-software-def"
+BuildChefGem::GemInstallSoftwareDef.define(self, __FILE__)
+
+license "MIT"
+license_file "https://github.com/flavorjones/mini_portile/blob/master/LICENSE.txt"
+skip_transitive_dependency_licensing true
diff --git a/omnibus/config/software/chef-gem-nokogiri.rb b/omnibus/config/software/chef-gem-nokogiri.rb
new file mode 100644
index 0000000000..c6b8d03822
--- /dev/null
+++ b/omnibus/config/software/chef-gem-nokogiri.rb
@@ -0,0 +1,13 @@
+# gem installs this gem from the version specified in chef's Gemfile.lock
+# so we can take advantage of omnibus's caching. Just duplicate this file and
+# add the new software def to chef software def if you want to separate
+# another gem's installation.
+require_relative "../../files/chef-gem/build-chef-gem/gem-install-software-def"
+BuildChefGem::GemInstallSoftwareDef.define(self, __FILE__)
+
+license "MIT"
+license_file "https://github.com/ruby-prof/ruby-prof/blob/master/LICENSE"
+skip_transitive_dependency_licensing true
+
+dependency "chef-gem-pkg-config"
+dependency "chef-gem-mini_portile2"
diff --git a/omnibus/config/software/chef-gem-pkg-config.rb b/omnibus/config/software/chef-gem-pkg-config.rb
new file mode 100644
index 0000000000..051091b73f
--- /dev/null
+++ b/omnibus/config/software/chef-gem-pkg-config.rb
@@ -0,0 +1,10 @@
+# gem installs this gem from the version specified in chef's Gemfile.lock
+# so we can take advantage of omnibus's caching. Just duplicate this file and
+# add the new software def to chef software def if you want to separate
+# another gem's installation.
+require_relative "../../files/chef-gem/build-chef-gem/gem-install-software-def"
+BuildChefGem::GemInstallSoftwareDef.define(self, __FILE__)
+
+license "LGPL-2.1"
+license_file "https://github.com/ruby-gnome2/pkg-config/blob/master/LGPL-2.1"
+skip_transitive_dependency_licensing true
diff --git a/omnibus/config/software/chef-gem-rbnacl-libsodium.rb b/omnibus/config/software/chef-gem-rbnacl-libsodium.rb
new file mode 100644
index 0000000000..90bbc69dfb
--- /dev/null
+++ b/omnibus/config/software/chef-gem-rbnacl-libsodium.rb
@@ -0,0 +1,10 @@
+# gem installs this gem from the version specified in chef's Gemfile.lock
+# so we can take advantage of omnibus's caching. Just duplicate this file and
+# add the new software def to chef software def if you want to separate
+# another gem's installation.
+require_relative "../../files/chef-gem/build-chef-gem/gem-install-software-def"
+BuildChefGem::GemInstallSoftwareDef.define(self, __FILE__)
+
+license "MIT"
+license_file "https://raw.githubusercontent.com/cryptosphere/rbnacl-libsodium/master/LICENSE"
+skip_transitive_dependency_licensing true
diff --git a/omnibus/config/software/chef-gem-ruby-prof.rb b/omnibus/config/software/chef-gem-ruby-prof.rb
new file mode 100644
index 0000000000..af90212d23
--- /dev/null
+++ b/omnibus/config/software/chef-gem-ruby-prof.rb
@@ -0,0 +1,10 @@
+# gem installs this gem from the version specified in chef's Gemfile.lock
+# so we can take advantage of omnibus's caching. Just duplicate this file and
+# add the new software def to chef software def if you want to separate
+# another gem's installation.
+require_relative "../../files/chef-gem/build-chef-gem/gem-install-software-def"
+BuildChefGem::GemInstallSoftwareDef.define(self, __FILE__)
+
+license "BSD-2-Clause"
+license_file "https://github.com/ruby-prof/ruby-prof/blob/master/LICENSE"
+skip_transitive_dependency_licensing true
diff --git a/omnibus/config/software/chef-gem-ruby-shadow.rb b/omnibus/config/software/chef-gem-ruby-shadow.rb
new file mode 100644
index 0000000000..02fc906d9d
--- /dev/null
+++ b/omnibus/config/software/chef-gem-ruby-shadow.rb
@@ -0,0 +1,11 @@
+# gem installs this gem from the version specified in chef's Gemfile.lock
+# so we can take advantage of omnibus's caching. Just duplicate this file and
+# add the new software def to chef software def if you want to separate
+# another gem's installation.
+require_relative "../../files/chef-gem/build-chef-gem/gem-install-software-def"
+BuildChefGem::GemInstallSoftwareDef.define(self, __FILE__)
+
+license "Public-Domain"
+license_file "https://github.com/apalmblad/ruby-shadow/blob/master/LICENSE"
+license_file "http://creativecommons.org/licenses/publicdomain/"
+skip_transitive_dependency_licensing true
diff --git a/omnibus/config/software/chef.rb b/omnibus/config/software/chef.rb
new file mode 100644
index 0000000000..c53a2339ae
--- /dev/null
+++ b/omnibus/config/software/chef.rb
@@ -0,0 +1,87 @@
+name "chef"
+default_version "local_source"
+
+license :project_license
+
+# For the specific super-special version "local_source", build the source from
+# the local git checkout. This is what you'd want to occur by default if you
+# just ran omnibus build locally.
+version("local_source") do
+ source path: File.expand_path("../..", project.files_path),
+ # Since we are using the local repo, we try to not copy any files
+ # that are generated in the process of bundle installing omnibus.
+ # If the install steps are well-behaved, this should not matter
+ # since we only perform bundle and gem installs from the
+ # omnibus cache source directory, but we do this regardless
+ # to maintain consistency between what a local build sees and
+ # what a github based build will see.
+ options: { exclude: [ "omnibus/vendor" ] }
+end
+
+# For any version other than "local_source", fetch from github.
+if version != "local_source"
+ source git: "git://github.com/chef/chef.git"
+end
+
+# For nokogiri
+dependency "libxml2"
+dependency "libxslt"
+dependency "libiconv"
+dependency "liblzma"
+dependency "zlib"
+
+# ruby and bundler and friends
+dependency "ruby"
+dependency "rubygems"
+dependency "bundler"
+
+# Install all the native gems separately
+# Worst offenders first to take best advantage of cache:
+dependency "chef-gem-ffi-yajl"
+dependency "chef-gem-nokogiri"
+dependency "chef-gem-libyajl2"
+dependency "chef-gem-ruby-prof"
+dependency "chef-gem-byebug"
+dependency "chef-gem-debug_inspector"
+dependency "chef-gem-binding_of_caller"
+unless ios_xr? || solaris?
+ dependency "chef-gem-rbnacl-libsodium"
+ dependency "chef-gem-bcrypt_pbkdf-ruby"
+end
+
+# Now everyone else, in alphabetical order because we don't care THAT much
+Dir.entries(File.dirname(__FILE__)).sort.each do |gem_software|
+ if gem_software =~ /^(chef-gem-.+)\.rb$/
+ dependency $1
+ end
+end
+
+build do
+ # This is where we get the definitions below
+ require_relative "../../files/chef/build-chef"
+ extend BuildChef
+
+ project_env = env.dup
+ project_env["BUNDLE_GEMFILE"] = project_gemfile
+
+ # Prepare to install: build config, retries, job, frozen=true
+ # TODO Windows install seems to sometimes install already-installed gems such
+ # as gherkin (and fail as a result) if you use jobs > 1.
+ create_bundle_config(project_gemfile, retries: 4, jobs: windows? ? 1 : 7, frozen: true)
+
+ # Install all the things. Arguments are specified in .bundle/config (see create_bundle_config)
+ block { log.info(log_key) { "" } }
+ bundle "install --verbose", env: project_env
+
+ # Check that it worked
+ block { log.info(log_key) { "" } }
+ bundle "check", env: project_env
+
+ # fix up git-sourced gems
+ properly_reinstall_git_and_path_sourced_gems
+ install_shared_gemfile
+
+ # Check that the final gemfile worked
+ block { log.info(log_key) { "" } }
+ bundle "check", env: env, cwd: File.dirname(shared_gemfile)
+end
diff --git a/omnibus/files/chef-appbundle/build-chef-appbundle.rb b/omnibus/files/chef-appbundle/build-chef-appbundle.rb
new file mode 100644
index 0000000000..eaf4904501
--- /dev/null
+++ b/omnibus/files/chef-appbundle/build-chef-appbundle.rb
@@ -0,0 +1,93 @@
+require_relative "../chef-gem/build-chef-gem"
+
+module BuildChefAppbundle
+ include BuildChefGem
+
+ def lockdown_gem(gem_name)
+ shared_gemfile = self.shared_gemfile
+
+ # Update the Gemfile to restrict to built versions so that bundle installs
+ # will do the right thing
+ block "Lock down the #{gem_name} gem" do
+ installed_path = shellout!("#{bundle_bin} show #{gem_name}", env: env, cwd: install_dir).stdout.chomp
+ installed_gemfile = File.join(installed_path, "Gemfile")
+
+ #
+ # Include the main distribution Gemfile in the gem's Gemfile
+ #
+ # NOTE: if this fails and the build retries, you will see this multiple
+ # times in the file.
+ #
+ distribution_gemfile = Pathname(shared_gemfile).relative_path_from(Pathname(installed_gemfile)).to_s
+ gemfile_text = <<-EOM.gsub(/^\s+/, "")
+ # Lock gems that are part of the distribution
+ distribution_gemfile = File.expand_path(#{distribution_gemfile.inspect}, __FILE__)
+ instance_eval(IO.read(distribution_gemfile), distribution_gemfile)
+ EOM
+ gemfile_text << IO.read(installed_gemfile)
+ create_file(installed_gemfile) { gemfile_text }
+
+ # Remove the gemfile.lock
+ remove_file("#{installed_gemfile}.lock") if File.exist?("#{installed_gemfile}.lock")
+
+ # If it's frozen, make it not be.
+ shellout!("#{bundle_bin} config --delete frozen")
+
+ # This could be changed to `bundle install` if we wanted to actually
+ # install extra deps out of their gemfile ...
+ shellout!("#{bundle_bin} lock", env: env, cwd: installed_path)
+ # bundle lock doesn't always tell us when it fails, so we have to check :/
+ unless File.exist?("#{installed_gemfile}.lock")
+ raise "bundle lock failed: no #{installed_gemfile}.lock created!"
+ end
+
+ # Ensure all the gems we need are actually installed (if the bundle adds
+ # something, we need to know about it so we can include it in the main
+ # solve).
+ # Save bundle config and modify to use --without development before checking
+ bundle_config = File.expand_path("../.bundle/config", installed_gemfile)
+ orig_config = IO.read(bundle_config) if File.exist?(bundle_config)
+ # "test", "changelog" and "guard" come from berkshelf, "maintenance" comes from chef
+ # "tools" and "integration" come from inspec
+ shellout!("#{bundle_bin} config --local without #{without_groups.join(":")}", env: env, cwd: installed_path)
+ shellout!("#{bundle_bin} config --local frozen 1")
+
+ shellout!("#{bundle_bin} check", env: env, cwd: installed_path)
+
+ # Restore bundle config
+ if orig_config
+ create_file(bundle_config) { orig_config }
+ else
+ remove_file bundle_config
+ end
+ end
+ end
+
+ # appbundle the gem, making /opt/chef/bin/<binary> do the superfast pinning
+ # thing.
+ #
+ # To protect the app from loading the wrong versions of things, it uses
+ # appbundler against the resulting file.
+ #
+ # Relocks the Gemfiles inside the specified gems (e.g. berkshelf, test-kitchen,
+ # chef) to use the distribution's chosen gems.
+ def appbundle_gem(gem_name)
+ # First lock the gemfile down.
+ lockdown_gem(gem_name)
+
+ shared_gemfile = self.shared_gemfile
+
+ # Ensure the main bin dir exists
+ bin_dir = File.join(install_dir, "bin")
+ mkdir(bin_dir)
+
+ block "Lock down the #{gem_name} gem" do
+ installed_path = shellout!("#{bundle_bin} show #{gem_name}", env: env, cwd: install_dir).stdout.chomp
+
+ # appbundle the gem
+ appbundler_args = [ installed_path, bin_dir, gem_name ]
+ appbundler_args = appbundler_args.map { |a| ::Shellwords.escape(a) }
+ shellout!("#{appbundler_bin} #{appbundler_args.join(" ")}", env: env, cwd: installed_path)
+ end
+ end
+end
diff --git a/omnibus/files/chef-gem/build-chef-gem.rb b/omnibus/files/chef-gem/build-chef-gem.rb
new file mode 100644
index 0000000000..701461b01e
--- /dev/null
+++ b/omnibus/files/chef-gem/build-chef-gem.rb
@@ -0,0 +1,123 @@
+require "shellwords"
+require "pathname"
+require "bundler"
+require_relative "../../../version_policy"
+
+# Common definitions and helpers (like compile environment and binary
+# locations) for all software definitions.
+module BuildChefGem
+ PLATFORM_FAMILY_FAMILIES = {
+ "linux" => %w{wrlinux debian fedora rhel suse gentoo slackware arch exherbo alpine},
+ "bsd" => %w{dragonflybsd freebsd netbsd openbsd},
+ "solaris" => %w{smartos omnios openindiana opensolaris solaris2 nextentacore},
+ "aix" => %w{aix},
+ "windows" => %w{windows},
+ "mac_os_x" => %w{mac_os_x},
+ }
+ def platform_family_families
+ PLATFORM_FAMILY_FAMILIES.keys
+ end
+
+ def platform_family_family
+ PLATFORM_FAMILY_FAMILIES.
+ select { |key, families| families.include?(Omnibus::Ohai["platform_family"]) }.
+ first[0]
+ end
+
+ def embedded_bin(binary)
+ windows_safe_path("#{install_dir}/embedded/bin/#{binary}")
+ end
+
+ def appbundler_bin
+ embedded_bin("appbundler")
+ end
+
+ def bundle_bin
+ embedded_bin("bundle")
+ end
+
+ def gem_bin
+ embedded_bin("gem")
+ end
+
+ def rake_bin
+ embedded_bin("rake")
+ end
+
+ def without_groups
+ # Add --without for every known OS except the one we're in.
+ exclude_os_groups = platform_family_families - [ platform_family_family ]
+ (INSTALL_WITHOUT_GROUPS + exclude_os_groups).map { |g| g.to_sym }
+ end
+
+ #
+ # Get the path to the top level shared Gemfile included by all individual
+ # Gemfiles
+ #
+ def shared_gemfile
+ File.join(install_dir, "Gemfile")
+ end
+
+ # A common env for building everything including nokogiri and dep-selector-libgecode
+ def env
+ env = with_standard_compiler_flags(with_embedded_path, bfd_flags: true)
+
+ # From dep-selector-libgecode
+ # On some RHEL-based systems, the default GCC that's installed is 4.1. We
+ # need to use 4.4, which is provided by the gcc44 and gcc44-c++ packages.
+ # These do not use the gcc binaries so we set the flags to point to the
+ # correct version here.
+ if File.exist?("/usr/bin/gcc44")
+ env["CC"] = "gcc44"
+ env["CXX"] = "g++44"
+ end
+
+ # From dep-selector-libgecode
+ # Ruby DevKit ships with BSD Tar
+ env["PROG_TAR"] = "bsdtar" if windows?
+ env["ARFLAGS"] = "rv #{env["ARFLAGS"]}" if env["ARFLAGS"]
+
+ # Set up nokogiri environment and args
+ env["NOKOGIRI_USE_SYSTEM_LIBRARIES"] = "true"
+ env
+ end
+
+ #
+ # Install arguments for various gems (to be passed to `gem install` or set in
+ # `bundle config build.<gemname>`).
+ #
+ def all_install_args
+ @all_install_args = {
+ "nokogiri" => %W{
+ --use-system-libraries
+ --with-xml2-lib=#{Shellwords.escape("#{install_dir}/embedded/lib")}
+ --with-xml2-include=#{Shellwords.escape("#{install_dir}/embedded/include/libxml2")}
+ --with-xslt-lib=#{Shellwords.escape("#{install_dir}/embedded/lib")}
+ --with-xslt-include=#{Shellwords.escape("#{install_dir}/embedded/include/libxslt")}
+ --with-iconv-dir=#{Shellwords.escape("#{install_dir}/embedded")}
+ --with-zlib-dir=#{Shellwords.escape("#{install_dir}/embedded")}
+ }.join(" "),
+ }
+ end
+
+ # gem install arguments for a particular gem. "" if no special args.
+ def install_args_for(gem_name)
+ all_install_args[gem_name] || ""
+ end
+
+ # Give block all the variables
+ def block(*args, &block)
+ super do
+ extend BuildChefGem
+ instance_eval(&block)
+ end
+ end
+
+ # Give build all the variables
+ def build(*args, &block)
+ super do
+ extend BuildChefGem
+ instance_eval(&block)
+ end
+ end
+end
diff --git a/omnibus/files/chef-gem/build-chef-gem/gem-install-software-def.rb b/omnibus/files/chef-gem/build-chef-gem/gem-install-software-def.rb
new file mode 100644
index 0000000000..3022bf448e
--- /dev/null
+++ b/omnibus/files/chef-gem/build-chef-gem/gem-install-software-def.rb
@@ -0,0 +1,118 @@
+require "bundler"
+require "omnibus"
+require_relative "../build-chef-gem"
+require_relative "../../../../tasks/gemfile_util"
+
+module BuildChefGem
+ class GemInstallSoftwareDef
+ def self.define(software, software_filename)
+ new(software, software_filename).send(:define)
+ end
+
+ include BuildChefGem
+ include Omnibus::Logging
+
+ protected
+
+ def initialize(software, software_filename)
+ @software = software
+ @software_filename = software_filename
+ end
+
+ attr_reader :software, :software_filename
+
+ def define
+ software.name "#{File.basename(software_filename)[0..-4]}"
+ software.default_version gem_version
+
+ # If the source directory for building stuff changes, tell omnibus to
+ # de-cache us
+ software.source path: File.expand_path("../..", __FILE__)
+
+ # ruby and bundler and friends
+ software.dependency "ruby"
+ software.dependency "rubygems"
+
+ gem_name = self.gem_name
+ gem_version = self.gem_version
+ gem_metadata = self.gem_metadata
+ lockfile_path = self.lockfile_path
+
+ software.build do
+ extend BuildChefGem
+
+ if gem_version == "<skip>"
+ if gem_metadata
+ block do
+ log.info(log_key) { "#{gem_name} has source #{gem_metadata} in #{lockfile_path}. We only cache rubygems.org installs in omnibus to keep things simple. The chef step will build #{gem_name} ..." }
+ end
+ else
+ block do
+ log.info(log_key) { "#{gem_name} is not in the #{lockfile_path}. This can happen if your OS doesn't build it, or if chef no longer depends on it. Skipping ..." }
+ end
+ end
+ else
+ block do
+ log.info(log_key) { "Found version #{gem_version} of #{gem_name} in #{lockfile_path}. Building early to take advantage of omnibus caching ..." }
+ end
+ gem "install #{gem_name} -v #{gem_version} --no-doc --no-ri --ignore-dependencies --verbose -- #{install_args_for(gem_name)}", env: env
+ end
+ end
+ end
+
+ # Path above omnibus (where Gemfile is)
+ def root_path
+ File.expand_path("../../../../..", __FILE__)
+ end
+
+ def gemfile_path
+ File.join(root_path, "Gemfile")
+ end
+
+ def lockfile_path
+ "#{gemfile_path}.lock"
+ end
+
+ def gem_name
+ @gem_name ||= begin
+ # File must be named chef-<gemname>.rb
+ # Will look at chef/Gemfile.lock and install that version of the gem using "gem install"
+ # (and only that version)
+ if File.basename(software_filename) =~ /^chef-gem-(.+)\.rb$/
+ $1
+ else
+ raise "#{software_filename} must be named chef-<gemname>.rb to build a gem automatically"
+ end
+ end
+ end
+
+ def gem_metadata
+ @gem_metadata ||= begin
+ bundle = GemfileUtil::Bundle.parse(gemfile_path, lockfile_path)
+ result = bundle.gems[gem_name]
+ if result
+ if bundle.select_gems(without_groups: without_groups).include?(gem_name)
+ log.info(software.name) { "Using #{gem_name} version #{result[:version]} from #{gemfile_path}" }
+ result
+ else
+ log.info(software.name) { "#{gem_name} not loaded from #{gemfile_path} because it was only in groups #{without_groups.join(", ")}. Skipping ..." }
+ nil
+ end
+ else
+ log.info(software.name) { "#{gem_name} was not found in #{lockfile_path}. Skipping ..." }
+ nil
+ end
+ end
+ end
+
+ def gem_version
+ @gem_version ||= begin
+ if gem_metadata && URI(gem_metadata[:source]) == URI("https://rubygems.org/")
+ gem_metadata[:version]
+ else
+ "<skip>"
+ end
+ end
+ end
+ end
+end
diff --git a/omnibus/files/chef/build-chef.rb b/omnibus/files/chef/build-chef.rb
new file mode 100644
index 0000000000..4b8ec78054
--- /dev/null
+++ b/omnibus/files/chef/build-chef.rb
@@ -0,0 +1,127 @@
+require "shellwords"
+require "pathname"
+require "bundler"
+require_relative "../chef-gem/build-chef-gem"
+require_relative "../../../version_policy"
+
+# We use this to break up the `build` method into readable parts
+module BuildChef
+ include BuildChefGem
+
+ def create_bundle_config(gemfile, without: without_groups, retries: nil, jobs: nil, frozen: nil)
+ bundle_config = File.expand_path("../.bundle/config", gemfile)
+
+ block "Put build config into #{bundle_config}: #{{ without: without, retries: retries, jobs: jobs, frozen: frozen }}" do
+ # bundle config build.nokogiri #{nokogiri_build_config} messes up the line,
+ # so we write it directly ourselves.
+ new_bundle_config = "---\n"
+ new_bundle_config << "BUNDLE_WITHOUT: #{Array(without).join(":")}\n" if without
+ new_bundle_config << "BUNDLE_RETRY: #{retries}\n" if retries
+ new_bundle_config << "BUNDLE_JOBS: #{jobs}\n" if jobs
+ new_bundle_config << "BUNDLE_FROZEN: '1'\n" if frozen
+ all_install_args.each do |gem_name, install_args|
+ new_bundle_config << "BUNDLE_BUILD__#{gem_name.upcase}: #{install_args}\n"
+ end
+ create_file(bundle_config) { new_bundle_config }
+ end
+ end
+
+ #
+ # Get the (possibly platform-specific) path to the Gemfile.
+ #
+ def project_gemfile
+ File.join(project_dir, "Gemfile")
+ end
+
+ #
+ # Some gems we installed don't end up in the `gem list` due to the fact that
+ # they have git sources (`gem 'chef', github: 'chef/chef'`) or paths (`gemspec`
+ # or `gem 'chef-config', path: 'chef-config'`). To get them in there, we need
+ # to go through these gems, run `rake install` from their top level, and
+ # then delete the git cached versions.
+ #
+ # Once we finish with all this, we update the Gemfile that will end up in the
+ # top-level install so that it doesn't have git or path references anymore.
+ #
+ def properly_reinstall_git_and_path_sourced_gems
+ # Emit blank line to separate different tasks
+ block { log.info(log_key) { "" } }
+ project_env = env.dup.merge("BUNDLE_GEMFILE" => project_gemfile)
+
+ # Reinstall git-sourced or path-sourced gems, and delete the originals
+ block "Reinstall git-sourced gems properly" do
+ # Grab info about the gem environment so we can make decisions
+ gemdir = shellout!("#{gem_bin} environment gemdir", env: env).stdout.chomp
+ gem_install_dir = File.join(gemdir, "gems")
+
+ # bundle list --paths gets us the list of gem install paths. Get the ones
+ # that are installed local (git and path sources like `gem :x, github: 'chef/x'`
+ # or `gem :x, path: '.'` or `gemspec`). To do this, we just detect which ones
+ # have properly-installed paths (in the `gems` directory that shows up when
+ # you run `gem list`).
+ locally_installed_gems = shellout!("#{bundle_bin} list --paths", env: project_env, cwd: project_dir).
+ stdout.lines.select { |gem_path| !gem_path.start_with?(gem_install_dir) }
+
+ # Install the gems for real using `rake install` in their directories
+ locally_installed_gems.each do |gem_path|
+ gem_path = gem_path.chomp
+ # We use the already-installed bundle to rake install, because (hopefully)
+ # just rake installing doesn't require anything special.
+ # Emit blank line to separate different tasks
+ log.info(log_key) { "" }
+ log.info(log_key) { "Properly installing git or path sourced gem #{gem_path} using rake install" }
+ shellout!("#{bundle_bin} exec #{rake_bin} install", env: project_env, cwd: gem_path)
+ end
+ end
+ end
+
+ def install_shared_gemfile
+ # Emit blank line to separate different tasks
+ block { log.info(log_key) { "" } }
+
+ shared_gemfile = self.shared_gemfile
+ project_env = env.dup.merge("BUNDLE_GEMFILE" => project_gemfile)
+
+ # Show the config for good measure
+ bundle "config", env: project_env
+
+ # Make `Gemfile` point to these by removing path and git sources and pinning versions.
+ block "Rewrite Gemfile using all properly-installed gems" do
+ gem_pins = ""
+ result = []
+ shellout!("#{bundle_bin} list", env: project_env).stdout.lines.map do |line|
+ if line =~ /^\s*\*\s*(\S+)\s+\((\S+).*\)\s*$/
+ name, version = $1, $2
+ # rubocop is an exception, since different projects disagree
+ next if GEMS_ALLOWED_TO_FLOAT.include?(name)
+ gem_pins << "gem #{name.inspect}, #{version.inspect}, override: true\n"
+ end
+ end
+
+ # Find the installed chef gem by looking for lib/chef.rb
+ chef_gem = File.expand_path("../..", shellout!("#{gem_bin} which chef", env: project_env).stdout.chomp)
+ # Figure out the path to gemfile_util from there
+ gemfile_util = Pathname.new(File.join(chef_gem, "tasks", "gemfile_util"))
+ gemfile_util = gemfile_util.relative_path_from(Pathname.new(shared_gemfile).dirname)
+
+ create_file(shared_gemfile) { <<-EOM }
+ # Meant to be included in component Gemfiles at the beginning with:
+ #
+ # instance_eval(IO.read("#{install_dir}/Gemfile"), "#{install_dir}/Gemfile")
+ #
+ # Override any existing gems with our own.
+ require_relative "#{gemfile_util}"
+ extend GemfileUtil
+ #{gem_pins}
+ EOM
+ end
+
+ shared_gemfile_env = env.dup.merge("BUNDLE_GEMFILE" => shared_gemfile)
+
+ # Create a `Gemfile.lock` at the final location
+ bundle "lock", env: shared_gemfile_env
+
+ # Freeze the location's Gemfile.lock.
+ create_bundle_config(shared_gemfile, frozen: true)
+ end
+end
diff --git a/omnibus/files/openssl-customization/windows/ssl_env_hack.rb b/omnibus/files/openssl-customization/windows/ssl_env_hack.rb
new file mode 100644
index 0000000000..26b68e4191
--- /dev/null
+++ b/omnibus/files/openssl-customization/windows/ssl_env_hack.rb
@@ -0,0 +1,34 @@
+#
+# Copyright:: Copyright 2014-2016, Chef Software, Inc.
+# License:: Apache License, Version 2.0
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# This script sets the SSL_CERT_FILE environment variable to the CA cert bundle
+# that ships with omnibus packages of Chef and Chef DK. If this environment
+# variable is already configured, this script is a no-op.
+#
+# This is required to make Chef tools use https URLs out of the box.
+
+unless ENV.key?("SSL_CERT_FILE")
+ base_dirs = File.dirname(__FILE__).split(File::SEPARATOR)
+
+ (base_dirs.length - 1).downto(0) do |i|
+ candidate_ca_bundle = File.join(base_dirs[0..i] + [ "ssl/certs/cacert.pem" ])
+ if File.exist?(candidate_ca_bundle)
+ ENV["SSL_CERT_FILE"] = candidate_ca_bundle
+ break
+ end
+ end
+end
diff --git a/omnibus/omnibus.rb b/omnibus/omnibus.rb
new file mode 100644
index 0000000000..dfbd2bc338
--- /dev/null
+++ b/omnibus/omnibus.rb
@@ -0,0 +1,55 @@
+#
+# This file is used to configure the Omnibus projects in this repo. It contains
+# some minimal configuration examples for working with Omnibus. For a full list
+# of configurable options, please see the documentation for +omnibus/config.rb+.
+#
+
+# Build internally
+# ------------------------------
+# By default, Omnibus uses system folders (like +/var+ and +/opt+) to build and
+# cache components. If you would to build everything internally, you can
+# uncomment the following options. This will prevent the need for root
+# permissions in most cases.
+#
+# Uncomment this line to change the default base directory to "local"
+# -------------------------------------------------------------------
+# base_dir './local'
+#
+# Alternatively you can tune the individual values
+# ------------------------------------------------
+# cache_dir './local/omnibus/cache'
+# git_cache_dir './local/omnibus/cache/git_cache'
+# source_dir './local/omnibus/src'
+# build_dir './local/omnibus/build'
+# package_dir './local/omnibus/pkg'
+# package_tmp './local/omnibus/pkg-tmp'
+
+# Windows architecture defaults - set to x86 unless otherwise specified.
+# ------------------------------
+env_omnibus_windows_arch = (ENV["OMNIBUS_WINDOWS_ARCH"] || "").downcase
+env_omnibus_windows_arch = :x86 unless %w{x86 x64}.include?(env_omnibus_windows_arch)
+
+windows_arch env_omnibus_windows_arch
+
+# Disable git caching
+# ------------------------------
+# use_git_caching false
+
+# Enable S3 asset caching
+# ------------------------------
+use_s3_caching true
+s3_access_key ENV["AWS_ACCESS_KEY_ID"]
+s3_secret_key ENV["AWS_SECRET_ACCESS_KEY"]
+s3_bucket "opscode-omnibus-cache"
+
+build_retries 3
+fetcher_retries 3
+fetcher_read_timeout 120
+
+# Load additional software
+# ------------------------------
+# software_gems ['omnibus-software', 'my-company-software']
+# local_software_dirs ['/path/to/local/software']
+
+fatal_transitive_dependency_licensing_warnings true
+fips_mode (ENV["OMNIBUS_FIPS_MODE"] || "").casecmp("true") >= 0
diff --git a/omnibus/package-scripts/angrychef/postinst b/omnibus/package-scripts/angrychef/postinst
new file mode 100755
index 0000000000..a173efeaef
--- /dev/null
+++ b/omnibus/package-scripts/angrychef/postinst
@@ -0,0 +1,111 @@
+#!/bin/sh
+# WARNING: REQUIRES /bin/sh
+#
+# - must run on /bin/sh on solaris 9
+# - must run on /bin/sh on AIX 6.x
+# - if you think you are a bash wizard, you probably do not understand
+# this programming language. do not touch.
+# - if you are under 40, get peer review from your elders.
+#
+# Install a full Opscode Client
+#
+
+PROGNAME=`basename $0`
+INSTALLER_DIR=/opt/angrychef
+CONFIG_DIR=/etc/chef
+USAGE="usage: $0 [-v validation_key] ([-o organization] || [-u url])"
+
+error_exit()
+{
+ echo "${PROGNAME}: ${1:-"Unknown Error"}" 1>&2
+ exit 1
+}
+
+is_darwin()
+{
+ uname -v | grep "^Darwin" 2>&1 >/dev/null
+}
+
+is_smartos()
+{
+ uname -v | grep "^joyent" 2>&1 >/dev/null
+}
+
+if is_smartos; then
+ PREFIX="/opt/local"
+elif is_darwin; then
+ PREFIX="/usr/local"
+ mkdir -p "$PREFIX/bin"
+else
+ PREFIX="/usr"
+fi
+
+validation_key=
+organization=
+chef_url=
+
+while getopts o:u:v: opt
+do
+ case "$opt" in
+ v) validation_key="${OPTARG}";;
+ o) organization="${OPTARG}"; chef_url="https://api.opscode.com/organizations/${OPTARG}";;
+ u) chef_url="${OPTARG}";;
+ \?) # unknown flag
+ echo >&2 ${USAGE}
+ exit 1;;
+ esac
+done
+shift `expr ${OPTIND} - 1`
+
+if [ "" != "$chef_url" ]; then
+ mkdir -p ${CONFIG_DIR} || error_exit "Cannot create ${CONFIG_DIR}!"
+ (
+ cat <<'EOP'
+log_level :info
+log_location STDOUT
+EOP
+ ) > ${CONFIG_DIR}/client.rb
+ if [ "" != "$chef_url" ]; then
+ echo "chef_server_url '${chef_url}'" >> ${CONFIG_DIR}/client.rb
+ fi
+ if [ "" != "$organization" ]; then
+ echo "validation_client_name '${organization}-validator'" >> ${CONFIG_DIR}/client.rb
+ fi
+ chmod 644 ${CONFIG_DIR}/client.rb
+fi
+
+if [ "" != "$validation_key" ]; then
+ cp ${validation_key} ${CONFIG_DIR}/validation.pem || error_exit "Cannot copy the validation key!"
+ chmod 600 ${CONFIG_DIR}/validation.pem
+fi
+
+# rm -f before ln -sf is required for solaris 9
+rm -f $PREFIX/bin/chef-client
+rm -f $PREFIX/bin/chef-solo
+rm -f $PREFIX/bin/chef-apply
+rm -f $PREFIX/bin/chef-shell
+rm -f $PREFIX/bin/knife
+rm -f $PREFIX/bin/ohai
+
+ln -sf $INSTALLER_DIR/bin/chef-solo $PREFIX/bin || error_exit "Cannot link chef-solo to $PREFIX/bin"
+if [ -f "$INSTALLER_DIR/bin/chef-apply" ]; then
+ ln -sf $INSTALLER_DIR/bin/chef-apply $PREFIX/bin || error_exit "Cannot link chef-apply to $PREFIX/bin"
+fi
+if [ -f "$INSTALLER_DIR/bin/chef-shell" ]; then
+ ln -sf $INSTALLER_DIR/bin/chef-shell $PREFIX/bin || error_exit "Cannot link chef-shell to $PREFIX/bin"
+fi
+ln -sf $INSTALLER_DIR/bin/knife $PREFIX/bin || error_exit "Cannot link knife to $PREFIX/bin"
+ln -sf $INSTALLER_DIR/bin/ohai $PREFIX/bin || error_exit "Cannot link ohai to $PREFIX/bin"
+
+# We test for the presence of /usr/bin/chef-client to know if this script succeeds, so this
+# must appear as the last real action in the script
+ln -sf $INSTALLER_DIR/bin/chef-client $PREFIX/bin || error_exit "Cannot link chef-client to $PREFIX/bin"
+
+# Ensure all files/directories in $INSTALLER_DIR are owned by root. This
+# has been fixed on new installs but upgrades from old installs need to
+# be manually fixed.
+chown -Rh 0:0 $INSTALLER_DIR
+
+echo "Thank you for installing Chef!"
+
+exit 0
diff --git a/omnibus/package-scripts/angrychef/postrm b/omnibus/package-scripts/angrychef/postrm
new file mode 100755
index 0000000000..247688074e
--- /dev/null
+++ b/omnibus/package-scripts/angrychef/postrm
@@ -0,0 +1,42 @@
+#!/bin/sh
+# WARNING: REQUIRES /bin/sh
+#
+# - must run on /bin/sh on solaris 9
+# - must run on /bin/sh on AIX 6.x
+# - if you think you are a bash wizard, you probably do not understand
+# this programming language. do not touch.
+# - if you are under 40, get peer review from your elders.
+
+is_smartos() {
+ uname -v | grep "^joyent" 2>&1 >/dev/null
+}
+
+is_darwin()
+{
+ uname -v | grep "^Darwin" 2>&1 >/dev/null
+}
+
+if is_smartos; then
+ PREFIX="/opt/local"
+elif is_darwin; then
+ PREFIX="/usr/local"
+else
+ PREFIX="/usr"
+fi
+
+cleanup_symlinks() {
+ binaries="chef-client chef-solo chef-apply chef-shell knife ohai"
+ for binary in $binaries; do
+ rm -f $PREFIX/bin/$binary
+ done
+}
+
+# Clean up binary symlinks if they exist
+# see: http://tickets.opscode.com/browse/CHEF-3022
+if [ ! -f /etc/redhat-release -a ! -f /etc/fedora-release -a ! -f /etc/system-release -a ! -f /etc/SuSE-release ]; then
+ # not a redhat-ish RPM-based system
+ cleanup_symlinks
+elif [ "x$1" = "x0" ]; then
+ # RPM-based system and we're deinstalling rather than upgrading
+ cleanup_symlinks
+fi
diff --git a/omnibus/package-scripts/chef-fips/postinst b/omnibus/package-scripts/chef-fips/postinst
new file mode 100755
index 0000000000..8aa6f19ec1
--- /dev/null
+++ b/omnibus/package-scripts/chef-fips/postinst
@@ -0,0 +1,111 @@
+#!/bin/sh
+# WARNING: REQUIRES /bin/sh
+#
+# - must run on /bin/sh on solaris 9
+# - must run on /bin/sh on AIX 6.x
+# - if you think you are a bash wizard, you probably do not understand
+# this programming language. do not touch.
+# - if you are under 40, get peer review from your elders.
+#
+# Install a full Opscode Client
+#
+
+PROGNAME=`basename $0`
+INSTALLER_DIR=/opt/chef-fips
+CONFIG_DIR=/etc/chef
+USAGE="usage: $0 [-v validation_key] ([-o organization] || [-u url])"
+
+error_exit()
+{
+ echo "${PROGNAME}: ${1:-"Unknown Error"}" 1>&2
+ exit 1
+}
+
+is_darwin()
+{
+ uname -v | grep "^Darwin" 2>&1 >/dev/null
+}
+
+is_smartos()
+{
+ uname -v | grep "^joyent" 2>&1 >/dev/null
+}
+
+if is_smartos; then
+ PREFIX="/opt/local"
+elif is_darwin; then
+ PREFIX="/usr/local"
+ mkdir -p "$PREFIX/bin"
+else
+ PREFIX="/usr"
+fi
+
+validation_key=
+organization=
+chef_url=
+
+while getopts o:u:v: opt
+do
+ case "$opt" in
+ v) validation_key="${OPTARG}";;
+ o) organization="${OPTARG}"; chef_url="https://api.opscode.com/organizations/${OPTARG}";;
+ u) chef_url="${OPTARG}";;
+ \?) # unknown flag
+ echo >&2 ${USAGE}
+ exit 1;;
+ esac
+done
+shift `expr ${OPTIND} - 1`
+
+if [ "" != "$chef_url" ]; then
+ mkdir -p ${CONFIG_DIR} || error_exit "Cannot create ${CONFIG_DIR}!"
+ (
+ cat <<'EOP'
+log_level :info
+log_location STDOUT
+EOP
+ ) > ${CONFIG_DIR}/client.rb
+ if [ "" != "$chef_url" ]; then
+ echo "chef_server_url '${chef_url}'" >> ${CONFIG_DIR}/client.rb
+ fi
+ if [ "" != "$organization" ]; then
+ echo "validation_client_name '${organization}-validator'" >> ${CONFIG_DIR}/client.rb
+ fi
+ chmod 644 ${CONFIG_DIR}/client.rb
+fi
+
+if [ "" != "$validation_key" ]; then
+ cp ${validation_key} ${CONFIG_DIR}/validation.pem || error_exit "Cannot copy the validation key!"
+ chmod 600 ${CONFIG_DIR}/validation.pem
+fi
+
+# rm -f before ln -sf is required for solaris 9
+rm -f $PREFIX/bin/chef-client
+rm -f $PREFIX/bin/chef-solo
+rm -f $PREFIX/bin/chef-apply
+rm -f $PREFIX/bin/chef-shell
+rm -f $PREFIX/bin/knife
+rm -f $PREFIX/bin/ohai
+
+ln -sf $INSTALLER_DIR/bin/chef-solo $PREFIX/bin || error_exit "Cannot link chef-solo to $PREFIX/bin"
+if [ -f "$INSTALLER_DIR/bin/chef-apply" ]; then
+ ln -sf $INSTALLER_DIR/bin/chef-apply $PREFIX/bin || error_exit "Cannot link chef-apply to $PREFIX/bin"
+fi
+if [ -f "$INSTALLER_DIR/bin/chef-shell" ]; then
+ ln -sf $INSTALLER_DIR/bin/chef-shell $PREFIX/bin || error_exit "Cannot link chef-shell to $PREFIX/bin"
+fi
+ln -sf $INSTALLER_DIR/bin/knife $PREFIX/bin || error_exit "Cannot link knife to $PREFIX/bin"
+ln -sf $INSTALLER_DIR/bin/ohai $PREFIX/bin || error_exit "Cannot link ohai to $PREFIX/bin"
+
+# We test for the presence of /usr/bin/chef-client to know if this script succeeds, so this
+# must appear as the last real action in the script
+ln -sf $INSTALLER_DIR/bin/chef-client $PREFIX/bin || error_exit "Cannot link chef-client to $PREFIX/bin"
+
+# Ensure all files/directories in $INSTALLER_DIR are owned by root. This
+# has been fixed on new installs but upgrades from old installs need to
+# be manually fixed.
+chown -Rh 0:0 $INSTALLER_DIR
+
+echo "Thank you for installing Chef!"
+
+exit 0
diff --git a/omnibus/package-scripts/chef-fips/postrm b/omnibus/package-scripts/chef-fips/postrm
new file mode 100755
index 0000000000..247688074e
--- /dev/null
+++ b/omnibus/package-scripts/chef-fips/postrm
@@ -0,0 +1,42 @@
+#!/bin/sh
+# WARNING: REQUIRES /bin/sh
+#
+# - must run on /bin/sh on solaris 9
+# - must run on /bin/sh on AIX 6.x
+# - if you think you are a bash wizard, you probably do not understand
+# this programming language. do not touch.
+# - if you are under 40, get peer review from your elders.
+
+is_smartos() {
+ uname -v | grep "^joyent" 2>&1 >/dev/null
+}
+
+is_darwin()
+{
+ uname -v | grep "^Darwin" 2>&1 >/dev/null
+}
+
+if is_smartos; then
+ PREFIX="/opt/local"
+elif is_darwin; then
+ PREFIX="/usr/local"
+else
+ PREFIX="/usr"
+fi
+
+cleanup_symlinks() {
+ binaries="chef-client chef-solo chef-apply chef-shell knife ohai"
+ for binary in $binaries; do
+ rm -f $PREFIX/bin/$binary
+ done
+}
+
+# Clean up binary symlinks if they exist
+# see: http://tickets.opscode.com/browse/CHEF-3022
+if [ ! -f /etc/redhat-release -a ! -f /etc/fedora-release -a ! -f /etc/system-release -a ! -f /etc/SuSE-release ]; then
+ # not a redhat-ish RPM-based system
+ cleanup_symlinks
+elif [ "x$1" = "x0" ]; then
+ # RPM-based system and we're deinstalling rather than upgrading
+ cleanup_symlinks
+fi
diff --git a/omnibus/package-scripts/chef/postinst b/omnibus/package-scripts/chef/postinst
new file mode 100755
index 0000000000..45893241b3
--- /dev/null
+++ b/omnibus/package-scripts/chef/postinst
@@ -0,0 +1,111 @@
+#!/bin/sh
+# WARNING: REQUIRES /bin/sh
+#
+# - must run on /bin/sh on solaris 9
+# - must run on /bin/sh on AIX 6.x
+# - if you think you are a bash wizard, you probably do not understand
+# this programming language. do not touch.
+# - if you are under 40, get peer review from your elders.
+#
+# Install a full Opscode Client
+#
+
+PROGNAME=`basename $0`
+INSTALLER_DIR=/opt/chef
+CONFIG_DIR=/etc/chef
+USAGE="usage: $0 [-v validation_key] ([-o organization] || [-u url])"
+
+error_exit()
+{
+ echo "${PROGNAME}: ${1:-"Unknown Error"}" 1>&2
+ exit 1
+}
+
+is_darwin()
+{
+ uname -v | grep "^Darwin" 2>&1 >/dev/null
+}
+
+is_smartos()
+{
+ uname -v | grep "^joyent" 2>&1 >/dev/null
+}
+
+if is_smartos; then
+ PREFIX="/opt/local"
+elif is_darwin; then
+ PREFIX="/usr/local"
+ mkdir -p "$PREFIX/bin"
+else
+ PREFIX="/usr"
+fi
+
+validation_key=
+organization=
+chef_url=
+
+while getopts o:u:v: opt
+do
+ case "$opt" in
+ v) validation_key="${OPTARG}";;
+ o) organization="${OPTARG}"; chef_url="https://api.opscode.com/organizations/${OPTARG}";;
+ u) chef_url="${OPTARG}";;
+ \?) # unknown flag
+ echo >&2 ${USAGE}
+ exit 1;;
+ esac
+done
+shift `expr ${OPTIND} - 1`
+
+if [ "" != "$chef_url" ]; then
+ mkdir -p ${CONFIG_DIR} || error_exit "Cannot create ${CONFIG_DIR}!"
+ (
+ cat <<'EOP'
+log_level :info
+log_location STDOUT
+EOP
+ ) > ${CONFIG_DIR}/client.rb
+ if [ "" != "$chef_url" ]; then
+ echo "chef_server_url '${chef_url}'" >> ${CONFIG_DIR}/client.rb
+ fi
+ if [ "" != "$organization" ]; then
+ echo "validation_client_name '${organization}-validator'" >> ${CONFIG_DIR}/client.rb
+ fi
+ chmod 644 ${CONFIG_DIR}/client.rb
+fi
+
+if [ "" != "$validation_key" ]; then
+ cp ${validation_key} ${CONFIG_DIR}/validation.pem || error_exit "Cannot copy the validation key!"
+ chmod 600 ${CONFIG_DIR}/validation.pem
+fi
+
+# rm -f before ln -sf is required for solaris 9
+rm -f $PREFIX/bin/chef-client
+rm -f $PREFIX/bin/chef-solo
+rm -f $PREFIX/bin/chef-apply
+rm -f $PREFIX/bin/chef-shell
+rm -f $PREFIX/bin/knife
+rm -f $PREFIX/bin/ohai
+
+ln -sf $INSTALLER_DIR/bin/chef-solo $PREFIX/bin || error_exit "Cannot link chef-solo to $PREFIX/bin"
+if [ -f "$INSTALLER_DIR/bin/chef-apply" ]; then
+ ln -sf $INSTALLER_DIR/bin/chef-apply $PREFIX/bin || error_exit "Cannot link chef-apply to $PREFIX/bin"
+fi
+if [ -f "$INSTALLER_DIR/bin/chef-shell" ]; then
+ ln -sf $INSTALLER_DIR/bin/chef-shell $PREFIX/bin || error_exit "Cannot link chef-shell to $PREFIX/bin"
+fi
+ln -sf $INSTALLER_DIR/bin/knife $PREFIX/bin || error_exit "Cannot link knife to $PREFIX/bin"
+ln -sf $INSTALLER_DIR/bin/ohai $PREFIX/bin || error_exit "Cannot link ohai to $PREFIX/bin"
+
+# We test for the presence of /usr/bin/chef-client to know if this script succeeds, so this
+# must appear as the last real action in the script
+ln -sf $INSTALLER_DIR/bin/chef-client $PREFIX/bin || error_exit "Cannot link chef-client to $PREFIX/bin"
+
+# Ensure all files/directories in $INSTALLER_DIR are owned by root. This
+# has been fixed on new installs but upgrades from old installs need to
+# be manually fixed.
+chown -Rh 0:0 $INSTALLER_DIR
+
+echo "Thank you for installing Chef!"
+
+exit 0
diff --git a/omnibus/package-scripts/chef/postrm b/omnibus/package-scripts/chef/postrm
new file mode 100755
index 0000000000..247688074e
--- /dev/null
+++ b/omnibus/package-scripts/chef/postrm
@@ -0,0 +1,42 @@
+#!/bin/sh
+# WARNING: REQUIRES /bin/sh
+#
+# - must run on /bin/sh on solaris 9
+# - must run on /bin/sh on AIX 6.x
+# - if you think you are a bash wizard, you probably do not understand
+# this programming language. do not touch.
+# - if you are under 40, get peer review from your elders.
+
+is_smartos() {
+ uname -v | grep "^joyent" 2>&1 >/dev/null
+}
+
+is_darwin()
+{
+ uname -v | grep "^Darwin" 2>&1 >/dev/null
+}
+
+if is_smartos; then
+ PREFIX="/opt/local"
+elif is_darwin; then
+ PREFIX="/usr/local"
+else
+ PREFIX="/usr"
+fi
+
+cleanup_symlinks() {
+ binaries="chef-client chef-solo chef-apply chef-shell knife ohai"
+ for binary in $binaries; do
+ rm -f $PREFIX/bin/$binary
+ done
+}
+
+# Clean up binary symlinks if they exist
+# see: http://tickets.opscode.com/browse/CHEF-3022
+if [ ! -f /etc/redhat-release -a ! -f /etc/fedora-release -a ! -f /etc/system-release -a ! -f /etc/SuSE-release ]; then
+ # not a redhat-ish RPM-based system
+ cleanup_symlinks
+elif [ "x$1" = "x0" ]; then
+ # RPM-based system and we're deinstalling rather than upgrading
+ cleanup_symlinks
+fi
diff --git a/omnibus/resources/chef/dmg/background.png b/omnibus/resources/chef/dmg/background.png
new file mode 100644
index 0000000000..82c605ae51
--- /dev/null
+++ b/omnibus/resources/chef/dmg/background.png
Binary files differ
diff --git a/omnibus/resources/chef/dmg/icon.png b/omnibus/resources/chef/dmg/icon.png
new file mode 100644
index 0000000000..2195d7c82a
--- /dev/null
+++ b/omnibus/resources/chef/dmg/icon.png
Binary files differ
diff --git a/omnibus/resources/chef/ips/symlinks.erb b/omnibus/resources/chef/ips/symlinks.erb
new file mode 100644
index 0000000000..419d52ddf7
--- /dev/null
+++ b/omnibus/resources/chef/ips/symlinks.erb
@@ -0,0 +1,6 @@
+link path=usr/bin/chef-solo target=<%= projectdir %>/bin/chef-solo
+link path=usr/bin/chef-client target=<%= projectdir %>/bin/chef-client
+link path=usr/bin/chef-apply target=<%= projectdir %>/bin/chef-apply
+link path=usr/bin/chef-shell target=<%= projectdir %>/bin/chef-shell
+link path=usr/bin/knife target=<%= projectdir %>/bin/knife
+link path=usr/bin/ohai target=<%= projectdir %>/bin/ohai
diff --git a/omnibus/resources/chef/msi/assets/LICENSE.rtf b/omnibus/resources/chef/msi/assets/LICENSE.rtf
new file mode 100644
index 0000000000..b18e6f59b8
--- /dev/null
+++ b/omnibus/resources/chef/msi/assets/LICENSE.rtf
@@ -0,0 +1,197 @@
+{\rtf1\ansi\deff0{\fonttbl{\f0\fnil\fcharset0 Courier New;}}
+
+{\*\generator Msftedit 5.41.21.2500;}\viewkind4\uc1\pard\qc\lang1033\f0\fs20 Apache License\par
+
+Version 2.0, January 2004\par
+
+http://www.apache.org/licenses/\par
+
+\pard\par
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\par
+
+\par
+
+1. Definitions.\par
+
+\par
+
+"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.\par
+
+\par
+
+"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.\par
+
+\par
+
+"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.\par
+
+\par
+
+"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.\par
+
+\par
+
+"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation, source, and configuration files.\par
+
+\par
+
+"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.\par
+
+\par
+
+"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).\par
+
+\par
+
+"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.\par
+
+\par
+
+"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."\par
+
+\par
+
+"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.\par
+
+\par
+
+2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.\par
+
+\par
+
+3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license plies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.\par
+
+\par
+
+4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:\par
+
+\par
+
+ (a) You must give any other recipients of the Work or\par
+
+ Derivative Works a copy of this License; and\par
+
+\par
+
+ (b) You must cause any modified files to carry prominent notices\par
+
+ stating that You changed the files; and\par
+
+\par
+
+ (c) You must retain, in the Source form of any Derivative Works\par
+
+ that You distribute, all copyright, patent, trademark, and\par
+
+ attribution notices from the Source form of the Work,\par
+
+ excluding those notices that do not pertain to any part of\par
+
+ the Derivative Works; and\par
+
+\par
+
+ (d) If the Work includes a "NOTICE" text file as part of its\par
+
+ distribution, then any Derivative Works that You distribute\par
+
+ must include a readable copy of the attribution notices\par
+
+ contained within such NOTICE file, excluding those notices\par
+
+ that do not pertain to any part of the Derivative Works, in\par
+
+ at least one of the following places: within a NOTICE text\par
+
+ file distributed as part of the Derivative Works; within the\par
+
+ Source form or documentation, if provided along with the\par
+
+ Derivative Works; or, within a display generated by the\par
+
+ Derivative Works, if and wherever such third-party notices\par
+
+ normally appear. The contents of the NOTICE file are for\par
+
+ informational purposes only and do not modify the License.\par
+
+ You may add Your own attribution notices within Derivative\par
+
+ Works that You distribute, alongside or as an addendum to the\par
+
+ NOTICE text from the Work, provided that such additional\par
+
+ attribution notices cannot be construed as modifying the\par
+
+ License.\par
+
+\par
+
+You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.\par
+
+\par
+
+5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.\par
+
+\par
+
+6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.\par
+
+\par
+
+7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.\par
+
+\par
+
+8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.\par
+
+\par
+
+9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.\par
+
+\par
+
+END OF TERMS AND CONDITIONS\par
+
+\par
+
+APPENDIX: How to apply the Apache License to your work.\par
+
+\par
+
+To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.\par
+
+\par
+
+ Copyright [yyyy] [name of copyright owner]\par
+
+\par
+
+ Licensed under the Apache License, Version 2.0 (the "License");\par
+
+ you may not use this file except in compliance with the License.\par
+
+ You may obtain a copy of the License at\par
+
+\par
+
+ http://www.apache.org/licenses/LICENSE-2.0\par
+
+\par
+
+ Unless required by applicable law or agreed to in writing, software\par
+
+ distributed under the License is distributed on an "AS IS" BASIS,\par
+
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\par
+
+ implied. See the License for the specific language governing\par
+
+ permissions and limitations under the License.\par
+
+\par
+
+}
+
+
diff --git a/omnibus/resources/chef/msi/assets/banner_background.bmp b/omnibus/resources/chef/msi/assets/banner_background.bmp
new file mode 100644
index 0000000000..5769a883c3
--- /dev/null
+++ b/omnibus/resources/chef/msi/assets/banner_background.bmp
Binary files differ
diff --git a/omnibus/resources/chef/msi/assets/dialog_background.bmp b/omnibus/resources/chef/msi/assets/dialog_background.bmp
new file mode 100644
index 0000000000..4dbe489e9c
--- /dev/null
+++ b/omnibus/resources/chef/msi/assets/dialog_background.bmp
Binary files differ
diff --git a/omnibus/resources/chef/msi/assets/oc.ico b/omnibus/resources/chef/msi/assets/oc.ico
new file mode 100644
index 0000000000..c4cee7bd75
--- /dev/null
+++ b/omnibus/resources/chef/msi/assets/oc.ico
Binary files differ
diff --git a/omnibus/resources/chef/msi/assets/oc_16x16.ico b/omnibus/resources/chef/msi/assets/oc_16x16.ico
new file mode 100644
index 0000000000..d3bd065a6a
--- /dev/null
+++ b/omnibus/resources/chef/msi/assets/oc_16x16.ico
Binary files differ
diff --git a/omnibus/resources/chef/msi/assets/oc_32x32.ico b/omnibus/resources/chef/msi/assets/oc_32x32.ico
new file mode 100644
index 0000000000..5eee0042c3
--- /dev/null
+++ b/omnibus/resources/chef/msi/assets/oc_32x32.ico
Binary files differ
diff --git a/omnibus/resources/chef/msi/localization-en-us.wxl.erb b/omnibus/resources/chef/msi/localization-en-us.wxl.erb
new file mode 100644
index 0000000000..c5e8e5ddab
--- /dev/null
+++ b/omnibus/resources/chef/msi/localization-en-us.wxl.erb
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<WixLocalization Culture="en-us" xmlns="http://schemas.microsoft.com/wix/2006/localization">
+ <!-- http://wix.codeplex.com/SourceControl/changeset/view/792e101c5cf7#src%2fext%2fUIExtension%2fwixlib%2fWixUI_en-us.wxl -->
+ <String Id="LANG">1033</String>
+ <String Id="ProductName"><%= friendly_name %></String>
+ <String Id="ManufacturerName">Chef Software, Inc.</String>
+ <String Id="WelcomeDlgTitle">{\WixUI_Font_Bigger}Welcome to the [ProductName] Setup Wizard</String>
+
+ <String Id="LicenseAgreementDlgTitle">{\WixUI_Font_Title_White}End-User License Agreement</String>
+ <String Id="LicenseAgreementDlgDescription">{\WixUI_Font_Normal_White}Please read the following license agreement carefully</String>
+
+ <String Id="InstallDirDlgTitle">{\WixUI_Font_Title_White}Destination Folder</String>
+ <String Id="InstallDirDlgDescription">{\WixUI_Font_Normal_White}Click Next to install to the default folder or click Change to choose another.</String>
+
+ <String Id="ProgressDlgTitleInstalling">{\WixUI_Font_Title_White}Installing [ProductName]</String>
+
+ <String Id="VerifyReadyDlgInstallTitle">{\WixUI_Font_Title_White}Ready to install [ProductName]</String>
+
+ <!-- Scheduled Task -->
+ <String Id="SchTaskDisplayName"><%= friendly_name %> Scheduled Task</String>
+ <String Id="SchTaskDescription">Schedule <%= friendly_name %> to run at a pre-defined time intervals.</String>
+ <!-- Service -->
+ <!-- Keep these in sync with the name and description in chef-service-manager -->
+ <String Id="ServiceDisplayName"><%= friendly_name %> Service</String>
+ <String Id="ServiceDescription">Runs <%= friendly_name %> on regular, configurable intervals.</String>
+ <String Id="FeatureMainName"><%= friendly_name %></String>
+ <String Id="FeatureSchTaskName"><%= friendly_name %> Scheduled Task</String>
+ <String Id="FeatureServiceName"><%= friendly_name %> Service</String>
+ <String Id="FeaturePSModuleName"><%= friendly_name %> PowerShell wrappers</String>
+
+ <String Id="MinimumOSVersionMessage">This package requires minimum OS version: Windows 7/Windows Server 2008 R2 or greater.</String>
+ <String Id="DowngradeErrorMessage">A newer version of [ProductName] is already installed.</String>
+ <String Id="FileExtractionProgress">Extracting files, please wait...</String>
+
+ <String Id="CustomizeDlgTextMsg">Select an option to change between the Chef's unattended execution options.</String>
+ <String Id="CustomizeDlgTextTitle">Chef Unattended Execution Options</String>
+ <String Id="CustomizeDlgFirstRadioButtonText">Chef Client Scheduled Task</String>
+ <String Id="CustomizeDlgSecondRadioButtonText">Chef Client Service</String>
+ <String Id="CustomizeDlgThirdRadioButtonText">None</String>
+
+ <String Id="CustomizeDlgOptionsMsg">The installer can configure the Chef Client to run periodically as either a scheduled task or a service. Using a scheduled task is recommended. For more information, see https://docs.chef.io/windows.html.</String>
+</WixLocalization>
diff --git a/omnibus/resources/chef/msi/parameters.wxi.erb b/omnibus/resources/chef/msi/parameters.wxi.erb
new file mode 100644
index 0000000000..febd1738e2
--- /dev/null
+++ b/omnibus/resources/chef/msi/parameters.wxi.erb
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Include>
+ <?define VersionNumber="<%= version %>" ?>
+ <?define DisplayVersionNumber="<%= display_version %>" ?>
+ <?define UpgradeCode="<%= upgrade_code %>" ?>
+<% parameters.each do |key, value| -%>
+ <?define <%= key %>="<%= value %>" ?>
+<% end -%>
+</Include>
diff --git a/omnibus/resources/chef/msi/source.wxs.erb b/omnibus/resources/chef/msi/source.wxs.erb
new file mode 100644
index 0000000000..c49a8324f9
--- /dev/null
+++ b/omnibus/resources/chef/msi/source.wxs.erb
@@ -0,0 +1,333 @@
+<?xml version='1.0'?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
+
+ <!-- This is how we include wxi files -->
+ <?include "parameters.wxi" ?>
+
+ <!--
+ Id="*" is to enable upgrading. * means that the product ID will be autogenerated on each build.
+ Name is made of localized product name and version number.
+ -->
+ <Product Id="*" Name="!(loc.ProductName) v$(var.DisplayVersionNumber)" Language="!(loc.LANG)"
+ Version="$(var.VersionNumber)" Manufacturer="!(loc.ManufacturerName)" UpgradeCode="$(var.UpgradeCode)">
+
+ <!--
+ Define the minimum supported installer version (2.0).
+ The install should be done for the whole machine not just the current user
+ -->
+ <Package InstallerVersion="200" InstallPrivileges="elevated"
+ Compressed="yes" InstallScope="perMachine" />
+
+ <!--
+ Create property references for the well known SIDs of the
+ accounts we want to restrict for the project location folder
+ -->
+ <PropertyRef Id="WIX_ACCOUNT_LOCALSYSTEM" />
+ <PropertyRef Id="WIX_ACCOUNT_ADMINISTRATORS" />
+ <PropertyRef Id="WIX_ACCOUNT_USERS" />
+
+ <Media Id="1" Cabinet="ChefClient.cab" EmbedCab="yes" CompressionLevel="high" />
+
+ <Property Id="CHEF_SERVICE_OPTIONS_RADIO_BUTTON_GROUP" Value="None" />
+
+ <!--
+ Uncomment launch condition below to check for minimum OS
+ 601 = Windows 7/Server 2008R2.
+ -->
+ <!-- Condition Message="!(loc.MinimumOSVersionMessage)">
+ <![CDATA[Installed OR VersionNT >= 601]]>
+ </Condition -->
+
+ <!-- We always do Major upgrades -->
+ <MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeErrorMessage)" />
+
+
+ <!--
+ If fastmsi is set, custom actions will be invoked during install to unzip
+ project files, and during uninstall to remove the project folder
+ -->
+ <% if fastmsi %>
+ <SetProperty Id="FastUnzip"
+ Value="FASTZIPDIR=[INSTALLLOCATION];FASTZIPAPPNAME=$(var.ProjectLocationDir)"
+ Sequence="execute"
+ Before="FastUnzip" />
+
+ <CustomAction Id="FastUnzip"
+ BinaryKey="CustomActionFastMsiDLL"
+ DllEntry="FastUnzip"
+ Execute="deferred"
+ Impersonate="no"
+ Return="check" />
+
+ <Binary Id="CustomActionFastMsiDLL"
+ SourceFile="CustomActionFastMsi.CA.dll" />
+
+ <CustomAction Id="Cleanup"
+ Directory="INSTALLLOCATION"
+ ExeCommand="cmd /C &quot;rd /S /Q $(var.ProjectLocationDir)&quot;"
+ Execute="deferred"
+ Impersonate="no"
+ Return="ignore" />
+
+ <CustomAction Id="CreateChefClientScheduledTask"
+ Directory="TARGETDIR"
+ ExeCommand="&quot;[SystemFolder]SCHTASKS.EXE&quot; /CREATE /TN &quot;chef-client&quot; /SC &quot;MINUTE&quot; /MO &quot;30&quot; /F /TR &quot;cmd /c \&quot;[EMBEDDEDBIN]ruby.exe [PROJECTLOCATIONBIN]chef-client -L [CONFIGLOCATION]chef-client.log -c [CONFIGLOCATION]client.rb\&quot;&quot; /RU &quot;NT Authority\System&quot; /RP /RL &quot;HIGHEST&quot;"
+ Execute="deferred"
+ Impersonate="no"
+ Return="check" />
+
+ <CustomAction Id="RemoveChefClientScheduledTask"
+ Directory="TARGETDIR"
+ ExeCommand="&quot;[SystemFolder]SCHTASKS.EXE&quot; /DELETE /TN &quot;chef-client&quot; /F"
+ Execute="deferred"
+ Impersonate="no"
+ Return="ignore" />
+
+ <CustomAction Id="RemoveChefClientService"
+ Directory="TARGETDIR"
+ ExeCommand="&quot;[SystemFolder]SC.EXE&quot; DELETE &quot;chef-client&quot;"
+ Execute="deferred"
+ Impersonate="no"
+ Return="ignore" />
+
+ <InstallExecuteSequence>
+ <Custom Action="FastUnzip" After="InstallFiles">NOT Installed</Custom>
+ <Custom Action="Cleanup" After="RemoveFiles">REMOVE~="ALL"</Custom>
+
+ <Custom Action="CreateChefClientScheduledTask" After="InstallFiles">
+ <![CDATA[&ChefSchTaskFeature=3]]>
+ </Custom>
+
+ <Custom Action="RemoveChefClientScheduledTask" Before="RemoveFiles">
+ <![CDATA[(Installed AND (&NoneFeature=3 OR &ChefServiceFeature=3)) OR (REMOVE="ALL")]]>
+ </Custom>
+
+ <Custom Action="RemoveChefClientService" Before="RemoveFiles">
+ <![CDATA[Installed AND (&NoneFeature=3 OR &ChefSchTaskFeature=3) OR (REMOVE="ALL")]]>
+ </Custom>
+ </InstallExecuteSequence>
+
+ <UI>
+ <ProgressText Action="FastUnzip">!(loc.FileExtractionProgress)</ProgressText>
+ </UI>
+ <% end %>
+
+ <Directory Id="TARGETDIR" Name="SourceDir">
+ <Directory Id="WindowsVolume">
+ <!-- Service needs chef directory to be present. -->
+ <Directory Id="CONFIGLOCATION" Name="chef">
+ <Component Id="CONFIGLOCATIONDIR" Guid="{F66F6394-51A4-4C5D-908B-E55584473436}" >
+ <CreateFolder Directory="CONFIGLOCATION" />
+ </Component>
+ </Directory>
+ <Directory Id="INSTALLLOCATION" Name="opscode">
+ <Directory Id="PROJECTLOCATION" Name="$(var.ProjectLocationDir)" >
+ <Component Id="ProjectLocationPermissions" Guid="{75f50556-efae-4ede-beb2-a2c9b1a4d43f}" >
+ <!--
+ Windows client SKUs give the Authenticated Users group modify rights
+ to new folders created. We ONLY want the local system account and any administrator to have that right to protect non admin users from injecting code that could be executed by a service running as SYSTEM
+ -->
+ <CreateFolder>
+ <Permission User="[WIX_ACCOUNT_LOCALSYSTEM]" GenericAll="yes"/>
+ <Permission User="[WIX_ACCOUNT_ADMINISTRATORS]" GenericAll="yes"/>
+ <Permission User="[WIX_ACCOUNT_USERS]" GenericRead="yes" GenericExecute="yes"/>
+ </CreateFolder>
+ </Component>
+ <Directory Id="PROJECTLOCATIONBIN" Name="bin" >
+ <Component Id="ChefClientPath" Guid="{7F663F88-55A2-4E20-82BF-8BD2E60BB83A}" >
+ <Environment Id="ClientPathEnvironment"
+ Name="PATH" Action="set" Part="last" System="yes" Value="[PROJECTLOCATIONBIN]" />
+ </Component>
+ </Directory>
+ <Directory Id="PSMODULES" Name="modules" >
+ <Component Id="ChefPSModulePath" Guid="{357DA654-F02E-430A-9EA6-A10554E3EF38}" >
+ <Environment Id="ChefPSModulePathEnvironment"
+ Name="PSModulePath" Action="set" Part="last" System="yes" Value="[PSMODULES]" />
+ </Component>
+ </Directory>
+ <Directory Id="EMBEDDED" Name="embedded" >
+ <Directory Id="EMBEDDEDBIN" Name="bin" >
+ <Component Id="ChefClientService" Guid="{69B2D8BE-4A47-4BE3-AEE8-83FAEB6E2FAF}" >
+ <File Id="RubyExecutable" Source="$(var.ProjectSourceDir)\embedded\bin\ruby.exe" KeyPath="yes" />
+ <ServiceInstall Name="chef-client" Type="ownProcess"
+ Start="auto" Vital="yes" ErrorControl="ignore"
+ Arguments="[PROJECTLOCATION]bin\chef-windows-service"
+ DisplayName="!(loc.ServiceDisplayName)"
+ Description="!(loc.ServiceDescription)">
+ <ServiceDependency Id="Winmgmt" />
+ <ServiceConfig DelayedAutoStart="yes" OnInstall="yes" />
+ </ServiceInstall>
+ <ServiceControl Id="ControlChefClientService" Name="chef-client"
+ Remove="both" Stop="both" Wait="yes" />
+ </Component>
+ <Component Id="ChefClientLog" Guid="{8e492d59-3a0c-43fd-b889-e35dfa33da91}">
+ <util:EventSource xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"
+ Name="Chef" Log="Application"
+ EventMessageFile="[PROJECTLOCATION]$(var.ChefLogDllPath)"
+ />
+ </Component>
+ </Directory>
+ </Directory>
+ </Directory>
+ </Directory>
+ <Directory Id="ChefSchTaskFeatureTempDir">
+ <Component Id="ChefSchTask" Guid="{7f9f917a-952c-41d8-baa1-037269eecb50}">
+ <CreateFolder />
+ </Component>
+ </Directory>
+ <Directory Id="NoneFeatureTempDir">
+ <Component Id="None" Guid="{d8f3eba5-cecb-436c-a4ef-540dba3c5ccf}">
+ <CreateFolder />
+ </Component>
+ </Directory>
+ </Directory>
+ </Directory>
+
+ <!-- Set the components defined in our fragment files that will be used for our feature -->
+ <Feature Id="ChefClientFeature" Title="!(loc.FeatureMainName)" Absent="disallow" AllowAdvertise="no" Level="1" ConfigurableDirectory="INSTALLLOCATION">
+ <ComponentGroupRef Id="ProjectDir" />
+ <ComponentRef Id="ProjectLocationPermissions" />
+ <ComponentRef Id="ChefClientPath" />
+ <ComponentRef Id="CONFIGLOCATIONDIR" />
+ <ComponentRef Id="ChefClientLog" />
+ </Feature>
+
+ <Feature Id="ChefPSModuleFeature" Title="!(loc.FeaturePSModuleName)" Level="1000" AllowAdvertise="no">
+ <ComponentRef Id="ChefPSModulePath" />
+ </Feature>
+
+ <Feature Id="ChefUnattendedExecutionOptions" Title="Chef Unattended Execution Options" Level="1000" AllowAdvertise="no">
+ <Feature Id="ChefSchTaskFeature" Title="!(loc.FeatureSchTaskName)" Level="1000" AllowAdvertise="no" Display="hidden">
+ <!-- Here, CustomAction will get executed and scheduled task for chef-client will get created -->
+
+ <!-- This is an empty component to keep track of the feature -->
+ <ComponentRef Id="ChefSchTask" />
+ </Feature>
+
+ <Feature Id="ChefServiceFeature" Title="!(loc.FeatureServiceName)" Level="1000" AllowAdvertise="no" Display="hidden">
+ <ComponentRef Id="ChefClientService" />
+ </Feature>
+
+ <Feature Id="NoneFeature" Title="None" Level="1000" AllowAdvertise="no" Display="hidden">
+ <!-- Do Nothing -->
+
+ <!-- This is an empty component to keep track of the feature -->
+ <ComponentRef Id="None" />
+ </Feature>
+ </Feature>
+
+ <!--
+ TODO:
+
+ * create initial Client config? ie C:\chef\client.rb?
+ * optionally install extra tools? ie git?
+
+ -->
+
+ <!--
+ UI Stuff
+ -->
+ <Icon Id="oc.ico" SourceFile="Resources\assets\oc_16x16.ico"/>
+ <Property Id="ARPPRODUCTICON" Value="oc.ico" />
+ <Property Id="ARPHELPLINK" Value="http://www.getchef.com/support/" />
+ <Property Id="WIXUI_INSTALLDIR" Value="INSTALLLOCATION" />
+
+ <UIRef Id="ChefClientUI_InstallDir"/>
+ <UI Id="ChefClientUI_InstallDir">
+ <!-- WixUI_FeatureTree module's code embedded and modified here as per the requirement -->
+ <TextStyle Id="WixUI_Font_Normal_White" FaceName="Tahoma" Size="8" Red="255" Green="255" Blue="255" />
+ <TextStyle Id="WixUI_Font_Bigger_White" FaceName="Tahoma" Size="12" Red="255" Green="255" Blue="255" />
+ <TextStyle Id="WixUI_Font_Title_White" FaceName="Tahoma" Size="9" Bold="yes" Red="255" Green="255" Blue="255" />
+ <TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8" />
+ <TextStyle Id="WixUI_Font_Bigger" FaceName="Tahoma" Size="12" />
+ <TextStyle Id="WixUI_Font_Title" FaceName="Tahoma" Size="9" Bold="yes" />
+ <TextStyle Id="WixUI_Font_Msg" FaceName="Tahoma" Size="9" />
+
+ <Property Id="DefaultUIFont" Value="WixUI_Font_Normal" />
+ <Property Id="WixUI_Mode" Value="FeatureTree" />
+
+ <DialogRef Id="ErrorDlg" />
+ <DialogRef Id="FatalError" />
+ <DialogRef Id="FilesInUse" />
+ <DialogRef Id="MsiRMFilesInUse" />
+ <DialogRef Id="PrepareDlg" />
+ <DialogRef Id="ProgressDlg" />
+ <DialogRef Id="ResumeDlg" />
+ <DialogRef Id="UserExit" />
+
+ <Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999">1</Publish>
+
+ <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="LicenseAgreementDlg">NOT Installed</Publish>
+ <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg">Installed AND PATCH</Publish>
+
+ <Publish Dialog="LicenseAgreementDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg">1</Publish>
+ <Publish Dialog="LicenseAgreementDlg" Control="Next" Event="NewDialog" Value="CustomizeDlg">LicenseAccepted = "1"</Publish>
+
+ <Publish Dialog="CustomizeDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="1">Installed</Publish>
+ <Publish Dialog="CustomizeDlg" Control="Back" Event="NewDialog" Value="LicenseAgreementDlg" Order="2">NOT Installed</Publish>
+
+ <Publish Dialog="CustomizeDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg"><![CDATA[((NOT &ChefUnattendedExecutionOptions=3) AND NOT ((?ChefSchTask=3) OR (?ChefClientService=3) OR (?None=3)))]]></Publish>
+
+ <Publish Dialog="CustomizeDlg" Control="Next" Event="NewDialog" Value="ChefUnattendedExecutionOptionsSelectionDlg"><![CDATA[((&ChefUnattendedExecutionOptions=3) OR (?ChefSchTask=3 OR ?ChefClientService=3 OR ?None=3))]]></Publish>
+
+ <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="CustomizeDlg" Order="1"><![CDATA[NOT &ChefUnattendedExecutionOptions=3]]> AND (NOT Installed OR WixUI_InstallMode = "Change")</Publish>
+ <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="ChefUnattendedExecutionOptionsSelectionDlg" Order="1"><![CDATA[&ChefUnattendedExecutionOptions=3]]> AND (NOT Installed OR WixUI_InstallMode = "Change")</Publish>
+ <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="2">Installed AND NOT PATCH</Publish>
+ <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Order="3">Installed AND PATCH</Publish>
+
+ <Publish Dialog="MaintenanceWelcomeDlg" Control="Next" Event="NewDialog" Value="MaintenanceTypeDlg">1</Publish>
+
+ <Publish Dialog="MaintenanceTypeDlg" Control="ChangeButton" Event="NewDialog" Value="CustomizeDlg">1</Publish>
+ <Publish Dialog="MaintenanceTypeDlg" Control="RepairButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
+ <Publish Dialog="MaintenanceTypeDlg" Control="RemoveButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
+ <Publish Dialog="MaintenanceTypeDlg" Control="Back" Event="NewDialog" Value="MaintenanceWelcomeDlg">1</Publish>
+
+ <Dialog Id ="ChefUnattendedExecutionOptionsSelectionDlg" Width ="370" Height ="270" Title ="!(loc.ProductName) v$(var.DisplayVersionNumber) Setup" NoMinimize ="no">
+ <Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" TabSkip="no" Text="!(loc.CustomizeDlgBannerBitmap)" />
+ <Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" Height="0" />
+ <Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
+ <Control Id="Title" Type="Text" X="15" Y="6" Width="210" Height="15" Transparent="yes" NoPrefix="yes" Text="!(loc.CustomizeDlgTitle)" />
+ <Control Id="Description" Type="Text" X="25" Y="23" Width="280" Height="15" Transparent="yes" NoPrefix="yes" Text="!(loc.CustomizeDlgDescription)" />
+ <Control Id="TextMsg" Type="Text" X="25" Y="55" Width="320" Height="20" Text="!(loc.CustomizeDlgTextMsg)" />
+
+ <Control Id="LeftBox" Type="GroupBox" X="25" Y="81" Width="175" Height="118" />
+ <Control Id="TextTitle" Type="Text" X="30" Y="100" Width="169" Height="20" Text="{\WixUI_Font_Title}!(loc.CustomizeDlgTextTitle)" />
+ <Control Id="OptionsRadioGroup" Type="RadioButtonGroup" Property="CHEF_SERVICE_OPTIONS_RADIO_BUTTON_GROUP" Height="80" Width="140" X="35" Y="110">
+ <RadioButtonGroup Property="CHEF_SERVICE_OPTIONS_RADIO_BUTTON_GROUP">
+ <RadioButton Value="SchTask" Text="!(loc.CustomizeDlgFirstRadioButtonText)" Height="17" Width="140" X="0" Y="10" />
+ <RadioButton Value="Service" Text="!(loc.CustomizeDlgSecondRadioButtonText)" Height="17" Width="140" X="0" Y="35" />
+ <RadioButton Value="None" Text="!(loc.CustomizeDlgThirdRadioButtonText)" Height="17" Width="140" X="0" Y="60" />
+ </RadioButtonGroup>
+ </Control>
+
+ <Control Id="RightBox" Type="GroupBox" X="210" Y="81" Width="150" Height="118" />
+ <Control Id="OptionsMsg" Type="Text" X="214" Y="100" Width="146" Height="80" Text="{\WixUI_Font_Msg}!(loc.CustomizeDlgOptionsMsg)" />
+
+ <Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Default="no" Text="Back">
+ <Publish Event="NewDialog" Value="CustomizeDlg">1</Publish>
+ </Control>
+ <Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="Next">
+ <Publish Event="AddLocal" Value="ChefSchTaskFeature">CHEF_SERVICE_OPTIONS_RADIO_BUTTON_GROUP = "SchTask"</Publish>
+ <Publish Event="AddLocal" Value="ChefServiceFeature">CHEF_SERVICE_OPTIONS_RADIO_BUTTON_GROUP = "Service"</Publish>
+ <Publish Event="AddLocal" Value="NoneFeature">CHEF_SERVICE_OPTIONS_RADIO_BUTTON_GROUP = "None"</Publish>
+ <Publish Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
+ </Control>
+ <Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Default="no" Text="Cancel" Cancel="yes">
+ <Publish Event="SpawnDialog" Value="CancelDlg">1</Publish>
+ </Control>
+ </Dialog>
+ </UI>
+
+ <UIRef Id="WixUI_Common" />
+
+ <WixVariable Id="WixUILicenseRtf" Value="Resources\assets\LICENSE.rtf" />
+ <WixVariable Id="WixUIDialogBmp" Value="Resources\assets\dialog_background.bmp" />
+ <WixVariable Id="WixUIBannerBmp" Value="Resources\assets\banner_background.bmp" />
+
+ <WixVariable Id="WixUIExclamationIco" Value="Resources\assets\oc_32x32.ico" />
+ <WixVariable Id="WixUIInfoIco" Value="Resources\assets\oc_32x32.ico" />
+ <WixVariable Id="WixUINewIco" Value="Resources\assets\oc_16x16.ico" />
+ <WixVariable Id="WixUIUpIco" Value="Resources\assets\oc_16x16.ico" />
+
+ </Product>
+</Wix>
diff --git a/omnibus/resources/chef/pkg/background.png b/omnibus/resources/chef/pkg/background.png
new file mode 100644
index 0000000000..027453ab8c
--- /dev/null
+++ b/omnibus/resources/chef/pkg/background.png
Binary files differ
diff --git a/omnibus/resources/chef/pkg/license.html.erb b/omnibus/resources/chef/pkg/license.html.erb
new file mode 100644
index 0000000000..21b7991abf
--- /dev/null
+++ b/omnibus/resources/chef/pkg/license.html.erb
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright <%= Time.new.year %> Chef Software Inc.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/omnibus/resources/chef/pkg/welcome.html.erb b/omnibus/resources/chef/pkg/welcome.html.erb
new file mode 100644
index 0000000000..04a02fb225
--- /dev/null
+++ b/omnibus/resources/chef/pkg/welcome.html.erb
@@ -0,0 +1,5 @@
+
+ This installer will help you install <%= friendly_name %> version <%= build_version %>.
+
+
+ You will be guided through the steps necessary to install this software.