Skip to content

Commit

Permalink
Remove duplicate gem cleanup + pull in smaller omnibus sofware defs
Browse files Browse the repository at this point in the history
Cleanup of the gem installs that is handled in omnibus-software has been removed
Add some new cleanup we're doing in chef/chef that shaves a few more files from the install
Bring in the new omnibus-software
  - libxml2 without debug support
  - libxslt without debug and profiler support

Signed-off-by: Tim Smith <tsmith@chef.io>
  • Loading branch information
tas50 committed Jul 31, 2020
1 parent 774633d commit 954ef70
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 32 deletions.
4 changes: 2 additions & 2 deletions omnibus/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GIT
remote: https://github.com/chef/omnibus-software.git
revision: 41ddd2e5d20a95fc9ee8344a9cdd57f85dfe47b1
revision: f1c903b899df38ff8e5445ae1cd6483fcbafdea7
branch: master
specs:
omnibus-software (4.0.0)
Expand Down Expand Up @@ -32,7 +32,7 @@ GEM
artifactory (3.0.15)
awesome_print (1.8.0)
aws-eventstream (1.1.0)
aws-partitions (1.348.0)
aws-partitions (1.349.0)
aws-sdk-core (3.104.3)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.239.0)
Expand Down
40 changes: 10 additions & 30 deletions omnibus/config/software/more-ruby-cleanup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,52 +45,32 @@
# find the embedded ruby gems dir and clean it up for globbing
target_dir = "#{install_dir}/embedded/lib/ruby/gems/*/gems".tr('\\', "/")
files = %w{
.rspec-tm
.sitearchdir.time
*-public_cert.pem
*.blurb
*Upgrade.md
.dockerignore
Appraisals
autotest
bench
benchmark
benchmarks
bootstrap.sh
ci
design_rationale.rb
doc
doc-api
Dockerfile*
docs
donate.png
ed25519.png
diagrams
example
examples
ext
features
frozen_old_spec
Gemfile.devtools
Gemfile.lock
Gemfile.travis
Gemfile.noed25519*
INSTALL.txt
logo.png
man
java
patches
playbooks
perf
rakelib
release-script.txt
sample
samples
samus.json
site
test
tests
travis_build_script.sh
unit
warning.txt
website
yard-template
}

Dir.glob(Dir.glob("#{target_dir}/*/{#{files.join(",")}}")).each do |f|
Dir.glob("#{target_dir}/*/{#{files.join(",")}}").each do |f|
puts "Deleting #{f}"
FileUtils.rm_rf(f)
end
Expand All @@ -106,7 +86,7 @@
tasks
}

Dir.glob(Dir.glob("#{target_dir}/*/{#{files.join(",")}}")).each do |f|
Dir.glob("#{target_dir}/*/{#{files.join(",")}}").each do |f|
# don't delete these files if there's a non-empty bin dir in the same dir
unless Dir.exist?(File.join(File.dirname(f), "bin")) && !Dir.empty?(File.join(File.dirname(f), "bin"))
puts "Deleting #{f}"
Expand All @@ -119,7 +99,7 @@
# find the embedded ruby gems dir and clean it up for globbing
target_dir = "#{install_dir}/embedded/lib/ruby/gems/*/gems".tr('\\', "/")

Dir.glob(Dir.glob("#{target_dir}/*/spec")).each do |f|
Dir.glob("#{target_dir}/*/spec").each do |f|

# don't delete these files if we use them in our verify tests
unless File.basename(File.expand_path("..", f)).match?(/^(berkshelf|test-kitchen|chef|chef-cli|chef-apply|chefspec)-\d/)
Expand Down

0 comments on commit 954ef70

Please sign in to comment.