summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2018-03-26 18:43:07 -0700
committerGitHub <noreply@github.com>2018-03-26 18:43:07 -0700
commit9c0b576af2803ffcec616d031594c40643d81749 (patch)
tree9e71d8f3789298cdde1eeb12665770d6e4a0f667
parentc66045a875b4341bd1923ff869e01a6299701a28 (diff)
parent07a2873d37ea90bb6aa0b6c99f5d522e4ee4748d (diff)
downloadchef-9c0b576af2803ffcec616d031594c40643d81749.tar.gz
Merge pull request #7051 from chef/tm/inspec_2
Ship InSpec 2
-rw-r--r--Gemfile7
-rw-r--r--Gemfile.lock52
-rw-r--r--kitchen-tests/.kitchen.travis.yml14
-rw-r--r--omnibus/config/projects/chef.rb6
-rw-r--r--omnibus/config/software/unf_ext.rb23
5 files changed, 89 insertions, 13 deletions
diff --git a/Gemfile b/Gemfile
index 72d37d7984..527199f80f 100644
--- a/Gemfile
+++ b/Gemfile
@@ -11,9 +11,14 @@ gem "chef-config", path: File.expand_path("../chef-config", __FILE__) if File.ex
gem "cheffish", "~> 14"
group(:omnibus_package) do
+ # override for unf_ext for inspec 2 until
+ # https://github.com/knu/ruby-unf_ext/pull/39
+ # is merged and released
+ gem "unf_ext", "=0.0.7.6", :git => "https://github.com/jquick/ruby-unf_ext.git"
+
gem "appbundler"
gem "rb-readline"
- gem "inspec", "~> 1"
+ gem "inspec", "~> 2"
gem "chef-vault"
end
diff --git a/Gemfile.lock b/Gemfile.lock
index 4d6730c9a4..0955923e14 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -6,6 +6,12 @@ GIT
chefstyle (0.9.0)
rubocop (= 0.54.0)
+GIT
+ remote: https://github.com/jquick/ruby-unf_ext.git
+ revision: c0b3bd922214a172976f6f368c0b4e4fbf91ed78
+ specs:
+ unf_ext (0.0.7.6)
+
PATH
remote: .
specs:
@@ -99,6 +105,16 @@ GEM
mixlib-cli (~> 1.4)
mixlib-shellout (~> 2.0)
ast (2.4.0)
+ aws-sdk (2.11.21)
+ aws-sdk-resources (= 2.11.21)
+ aws-sdk-core (2.11.21)
+ aws-sigv4 (~> 1.0)
+ jmespath (~> 1.0)
+ aws-sdk-resources (2.11.21)
+ aws-sdk-core (= 2.11.21)
+ aws-sigv4 (1.0.2)
+ azure_mgmt_resources (0.16.0)
+ ms_rest_azure (~> 0.10.0)
backports (3.11.1)
binding_of_caller (0.8.0)
debug_inspector (>= 0.0.1)
@@ -115,6 +131,7 @@ GEM
chef-zero (~> 14.0)
net-ssh
coderay (1.1.2)
+ concurrent-ruby (1.0.5)
crack (0.4.3)
safe_yaml (~> 1.0.0)
debug_inspector (0.0.3)
@@ -123,12 +140,17 @@ GEM
docker-api (1.34.2)
excon (>= 0.47.0)
multi_json
+ domain_name (0.5.20170404)
+ unf (>= 0.0.5, < 1.0.0)
erubis (2.7.0)
ethon (0.11.0)
ffi (>= 1.3.0)
excon (0.61.0)
faraday (0.14.0)
multipart-post (>= 1.2, < 3)
+ faraday-cookie_jar (0.0.6)
+ faraday (>= 0.7.4)
+ http-cookie (~> 1.0.0)
faraday_middleware (0.12.2)
faraday (>= 0.7.4, < 1.0)
ffi (1.9.23)
@@ -154,9 +176,12 @@ GEM
hashie (3.5.7)
highline (1.7.10)
htmlentities (4.3.4)
+ http-cookie (1.0.3)
+ domain_name (~> 0.5)
httpclient (2.8.3)
+ inifile (3.0.0)
iniparse (1.4.4)
- inspec (1.51.21)
+ inspec (2.1.10)
addressable (~> 2.4)
faraday (>= 0.9.0)
hashie (~> 3.4)
@@ -172,11 +197,12 @@ GEM
rubyzip (~> 1.1)
semverse
sslshake (~> 1.2)
- thor (~> 0.19)
+ thor (~> 0.20)
tomlrb (~> 1.2)
- train (~> 0.32)
+ train (~> 1.2)
ipaddress (0.8.3)
iso8601 (0.9.1)
+ jmespath (1.3.1)
json (2.1.0)
launchy (2.4.3)
addressable (~> 2.3)
@@ -197,6 +223,15 @@ GEM
mixlib-shellout (2.3.2-universal-mingw32)
win32-process (~> 0.8.2)
wmi-lite (~> 1.0)
+ ms_rest (0.7.2)
+ concurrent-ruby (~> 1.0)
+ faraday (~> 0.9)
+ timeliness (~> 0.3)
+ ms_rest_azure (0.10.3)
+ concurrent-ruby (~> 1.0)
+ faraday (~> 0.9)
+ faraday-cookie_jar (~> 0.0.6)
+ ms_rest (~> 0.7.2)
multi_json (1.13.1)
multipart-post (2.0.0)
net-http-persistent (2.9.4)
@@ -311,9 +346,13 @@ GEM
syslog-logger (1.6.8)
systemu (2.6.5)
thor (0.20.0)
+ timeliness (0.3.8)
tomlrb (1.2.6)
- train (0.32.0)
+ train (1.2.0)
+ aws-sdk (~> 2)
+ azure_mgmt_resources (~> 0.15)
docker-api (~> 1.26)
+ inifile
json (>= 1.8, < 3.0)
mixlib-shellout (~> 2.0)
net-scp (~> 1.2)
@@ -331,6 +370,8 @@ GEM
typhoeus (~> 0.6, >= 0.6.8)
typhoeus (0.8.0)
ethon (>= 0.8.0)
+ unf (0.1.4)
+ unf_ext
unicode-display_width (1.3.0)
uuidtools (2.1.5)
webmock (3.3.0)
@@ -387,7 +428,7 @@ DEPENDENCIES
chef-vault
cheffish (~> 14)
chefstyle!
- inspec (~> 1)
+ inspec (~> 2)
netrc
octokit
pry
@@ -401,6 +442,7 @@ DEPENDENCIES
simplecov
tomlrb
travis
+ unf_ext (= 0.0.7.6)!
webmock
yard
diff --git a/kitchen-tests/.kitchen.travis.yml b/kitchen-tests/.kitchen.travis.yml
index fdf4f05f69..7f1cc94667 100644
--- a/kitchen-tests/.kitchen.travis.yml
+++ b/kitchen-tests/.kitchen.travis.yml
@@ -34,7 +34,8 @@ platforms:
image: dokken/amazonlinux
pid_one_command: /sbin/init
intermediate_instructions:
- - RUN yum -y install sudo
+ # TODO: inspec 2.0 requires gcc-c++, adding here until it can be added to appbundler-updater
+ - RUN yum -y install sudo gcc-c++
- RUN sed -i -e "s/Defaults.*requiretty.*/Defaults !requiretty/g" /etc/sudoers
- name: amazonlinux-2
@@ -42,10 +43,9 @@ platforms:
image: dokken/amazonlinux-2
pid_one_command: /usr/lib/systemd/systemd
intermediate_instructions:
- - RUN yum -y install sudo
+ - RUN yum -y install sudo gcc-c++
- RUN sed -i -e "s/Defaults.*requiretty.*/Defaults !requiretty/g" /etc/sudoers
-
- name: debian-8
driver:
image: dokken/debian-8
@@ -67,7 +67,7 @@ platforms:
image: dokken/centos-6
pid_one_command: /sbin/init
intermediate_instructions:
- - RUN yum -y install sudo
+ - RUN yum -y install sudo gcc-c++
- RUN sed -i -e "s/Defaults.*requiretty.*/Defaults !requiretty/g" /etc/sudoers
- name: centos-7
@@ -75,7 +75,7 @@ platforms:
image: dokken/centos-7
pid_one_command: /usr/lib/systemd/systemd
intermediate_instructions:
- - RUN yum -y install sudo
+ - RUN yum -y install sudo gcc-c++
- RUN sed -i -e "s/Defaults.*requiretty.*/Defaults !requiretty/g" /etc/sudoers
- name: fedora-latest
@@ -83,7 +83,7 @@ platforms:
image: dokken/fedora-latest
pid_one_command: /usr/lib/systemd/systemd
intermediate_instructions:
- - RUN dnf -y install sudo
+ - RUN dnf -y install sudo gcc-c++
- RUN sed -i -e "s/Defaults.*requiretty.*/Defaults !requiretty/g" /etc/sudoers
- name: ubuntu-14.04
@@ -115,7 +115,7 @@ platforms:
image: dokken/opensuse-leap
pid_one_command: /bin/systemd
intermediate_instructions:
- - RUN /usr/bin/zypper install -y sudo
+ - RUN /usr/bin/zypper install -y sudo gcc-c++
suites:
- name: base
diff --git a/omnibus/config/projects/chef.rb b/omnibus/config/projects/chef.rb
index f758893cbb..10032b44a4 100644
--- a/omnibus/config/projects/chef.rb
+++ b/omnibus/config/projects/chef.rb
@@ -46,6 +46,12 @@ overrides_path = File.expand_path("../../../../omnibus_overrides.rb", current_fi
instance_eval(IO.read(overrides_path), overrides_path)
dependency "preparation"
+
+# InSpec 2 depends on unf_ext, which doesn't currently build on solaris on aix. There exists a fork
+# of unf_ext which fixes this, so let's use that in Chef for now.
+# FIXME: must remove this ASAP.
+dependency "unf_ext"
+
dependency "chef"
#
diff --git a/omnibus/config/software/unf_ext.rb b/omnibus/config/software/unf_ext.rb
new file mode 100644
index 0000000000..269fa933b7
--- /dev/null
+++ b/omnibus/config/software/unf_ext.rb
@@ -0,0 +1,23 @@
+# encoding: utf-8
+# override for unf_ext until
+# https://github.com/knu/ruby-unf_ext/pull/39
+# is merged and released
+
+name "unf_ext"
+
+dependency "ruby"
+dependency "rubygems"
+dependency "bundler"
+dependency "appbundler"
+
+license :project_license
+default_version "c0b3bd922214a172976f6f368c0b4e4fbf91ed78"
+source git: "https://github.com/jquick/ruby-unf_ext.git"
+skip_transitive_dependency_licensing true
+
+build do
+ env = with_standard_compiler_flags(with_embedded_path)
+ delete "#{name}-*.gem"
+ gem "build #{name}.gemspec", env: env
+ gem "install #{name}-*.gem --no-document", env: env
+end