diff --git a/config/software/metasploit-framework.rb b/config/software/metasploit-framework.rb index 438c2f5..a15c5f2 100644 --- a/config/software/metasploit-framework.rb +++ b/config/software/metasploit-framework.rb @@ -1,8 +1,17 @@ name "metasploit-framework" + +# Detect a local checkout of metasploit-framework at '../metasploit-framework' - i.e. for the scenario of: +# - c:/temp/metasploit-omnibus +# - c:/temp/metasploit-framework (A local checkout of framework to use during the build process) +# but try and use 'C:/metasploit-framework' - as that's the metasploit-omnibus artifacts output directory +def has_windows_metasploit_framework_repo? + windows? && File.exist?('../metasploit-framework') && File.expand_path(File.join(Dir.pwd, "..", "metasploit-framework")) != "c:/metasploit-framework" +end + if linux? && File.exist?("/metasploit-framework") # supply current version of metasploit-framework at root of filesystem source path: "/metasploit-framework" -elsif windows? && File.exist?('../metasploit-framework') +elsif has_windows_metasploit_framework_repo? # supply current version of metasploit-framework relative to the current directory source path: "../metasploit-framework" else @@ -154,4 +163,12 @@ end end end + + # Workaround for a Windows bug with chef r7_9.0.23_custom that allows the `.git` folders through + # into the final build result, leading to the .exe being an extra 1gb in size + block do + self.project.exclusions.each do |exclusion| + Pathname(install_dir).glob(exclusion).each(&:rmtree) + end + end end diff --git a/config/software/rubygems.rb b/config/software/rubygems.rb index 68f5acf..30dcf6b 100644 --- a/config/software/rubygems.rb +++ b/config/software/rubygems.rb @@ -28,7 +28,7 @@ dependency "ruby" end -default_version "3.2.22" +default_version "3.5.10" if version && !source # NOTE: 2.1.11 is the last version of rubygems before the 2.2.x change to native gem install location @@ -41,6 +41,7 @@ known_tarballs = { "3.1.4" => "d117187a8f016cbe8f52011ae02e858b", "3.2.22"=> "b128d5493da2ec7a1da49a7189c04b35", + "3.5.10" => "70f46c096b4e11c42b0190cc3e3375e2" } known_tarballs.each do |vsn, md5| version vsn do diff --git a/local/cache b/local/cache index 984fcfb..9dc4af6 160000 --- a/local/cache +++ b/local/cache @@ -1 +1 @@ -Subproject commit 984fcfb697151a942583ba831102c584d13773ad +Subproject commit 9dc4af6026a0e62071cc8ed8130bc76c4e1235b0