summaryrefslogtreecommitdiff
path: root/omnibus
diff options
context:
space:
mode:
Diffstat (limited to 'omnibus')
-rw-r--r--omnibus/config/projects/chef.rb26
-rw-r--r--omnibus/config/software/chef-local-source.rb12
-rwxr-xr-xomnibus/omnibus-test.sh15
3 files changed, 26 insertions, 27 deletions
diff --git a/omnibus/config/projects/chef.rb b/omnibus/config/projects/chef.rb
index 10f7f25b15..27e420e92a 100644
--- a/omnibus/config/projects/chef.rb
+++ b/omnibus/config/projects/chef.rb
@@ -41,34 +41,10 @@ end
override :chef, version: "local_source"
-# Load dynamically updated overrides
-overrides_path = File.expand_path("../../../../omnibus_overrides.rb", current_file)
-instance_eval(IO.read(overrides_path), overrides_path)
-
-dependency "preparation"
-# dependency "chef-local-source"
-
-dependency "chef"
-
-#
-# addons which require omnibus software defns (not direct deps of chef itself - RFC-063)
-#
-dependency "nokogiri" # (nokogiri cannot go in the Gemfile, see wall of text in the software defn)
-
-# FIXME?: might make sense to move dependencies below into the omnibus-software chef
-# definition or into a chef-complete definition added to omnibus-software.
-dependency "gem-permissions"
+dependency "chef-local-source"
dependency "shebang-cleanup"
-dependency "version-manifest"
-dependency "openssl-customization"
-
-# devkit needs to come dead last these days so we do not use it to compile any gems
-dependency "ruby-msys2-devkit" if windows?
-
-dependency "ruby-cleanup"
# further gem cleanup other projects might not yet want to use
-
dependency "more-ruby-cleanup"
package :rpm do
diff --git a/omnibus/config/software/chef-local-source.rb b/omnibus/config/software/chef-local-source.rb
index 528354422d..49a2bfda59 100644
--- a/omnibus/config/software/chef-local-source.rb
+++ b/omnibus/config/software/chef-local-source.rb
@@ -25,6 +25,8 @@ license_file "LICENSE"
# So that Open4/deep_merge/diff-lcs disclaimers are present in Omnibus LICENSES tree.
license_file "NOTICE"
+skip_transitive_dependency_licensing false
+
# 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.
@@ -47,6 +49,16 @@ if version != "local_source"
source git: "https://github.com/chef/chef.git"
end
+# In order to pass notarization we need to sign any binaries and libraries included in the package.
+# This makes sure we include and bins and libs that are brought in by gems.
+ruby_version = "3.1.2"
+ruby_version = ruby_version.split(".")[0..1].join(".")
+ruby_mmv = "#{ruby_version}.0"
+ruby_dir = "#{install_dir}/embedded/lib/ruby/#{ruby_mmv}"
+gem_dir = "#{install_dir}/embedded/lib/ruby/gems/#{ruby_mmv}"
+bin_dirs bin_dirs.concat ["#{gem_dir}/gems/*/bin/**"]
+lib_dirs ["#{ruby_dir}/**", "#{gem_dir}/extensions/**", "#{gem_dir}/bundler/gems/extensions/**", "#{gem_dir}/bundler/gems/*", "#{gem_dir}/bundler/gems/*/lib/**", "#{gem_dir}/gems/*", "#{gem_dir}/gems/*/lib/**", "#{gem_dir}/gems/*/ext/**"]
+
dependency "chef-foundation"
relative_path "chef"
diff --git a/omnibus/omnibus-test.sh b/omnibus/omnibus-test.sh
index 9bdaa7cdc5..83c64ff2a6 100755
--- a/omnibus/omnibus-test.sh
+++ b/omnibus/omnibus-test.sh
@@ -120,5 +120,16 @@ export CHEF_LICENSE=accept-no-persist
cd "$chef_gem"
-sudo -E bundle install --jobs=3 --retry=3
-sudo -E bundle exec rspec --profile -f progress \ No newline at end of file
+# only add -E if not on centos 6
+sudo_path="$(command -v sudo)"
+# cspell:disable-next-line
+rhel_sudo="/opt/rh/devtoolset-7/root/usr/bin/sudo"
+sudo_args=""
+if [[ "$sudo_path" != "$rhel_sudo" ]]; then
+ echo "HERE"
+ sudo -E bundle install --jobs=3 --retry=3
+ sudo -E bundle exec rspec --profile -f progress
+else
+ sudo bundle install --jobs=3 --retry=3
+ sudo bundle exec rspec --profile -f progress
+fi