@@ -160,7 +160,7 @@ namespace :vox do
160160 puts "Copy Bouncy Castle FIPS jars into ezbake resource location"
161161 dest = '/code/resources/ext/build-scripts/bc-fips-jars'
162162 run ( "mkdir -p #{ dest } " )
163- cmd = "cd /code && lein with-profile fips classpath"
163+ cmd = "cd /code && lein with-profile ezbake-fips, fips classpath"
164164 stdout , stderr , status = Open3 . capture3 ( "docker exec #{ @container } /bin/bash --login -c '#{ cmd } '" )
165165 unless status . success?
166166 puts "Failed to get classpath for FIPS build: #{ stderr } "
@@ -170,7 +170,14 @@ namespace :vox do
170170 paths = classpath . split ( ':' ) . select { |p | p =~ /bcpkix-fips|bc-fips|bctls-fips/ }
171171 paths . each { |p | run ( "cp #{ p } #{ dest } /" ) }
172172
173- run ( "cd /code && COW= MOCK=\" #{ @fips_rpms } \" GEM_SOURCE='https://rubygems.org' #{ ezbake_version_var } EZBAKE_ALLOW_UNREPRODUCIBLE_BUILDS=true EZBAKE_NODEPLOY=true LEIN_PROFILES=ezbake lein with-profile fips,user,ezbake,provided ezbake local-build" )
173+ # We also copy the non-FIPS jdk18on jars as well. This is only for the step where we install
174+ # vendored gems during the packaging step and they are not included in the final package.
175+ dest = '/code/resources/ext/build-scripts/bc-nonfips-jars'
176+ run ( "mkdir -p #{ dest } " )
177+ paths = classpath . split ( ':' ) . select { |p | p =~ /jdk18on/ }
178+ paths . each { |p | run ( "cp #{ p } #{ dest } /" ) }
179+
180+ run ( "cd /code && COW= MOCK=\" #{ @fips_rpms } \" GEM_SOURCE='https://rubygems.org' #{ ezbake_version_var } EZBAKE_ALLOW_UNREPRODUCIBLE_BUILDS=true EZBAKE_NODEPLOY=true LEIN_PROFILES=ezbake lein with-profile fips,user,ezbake-fips,provided ezbake local-build" )
174181 end
175182
176183 run_command ( "sudo chown -R $USER output" , print_command : true )
@@ -184,6 +191,7 @@ namespace :vox do
184191 ensure
185192 teardown
186193 FileUtils . rm_rf ( "#{ __dir__ } /../resources/ext/build-scripts/bc-fips-jars" ) unless @fips_rpms . empty?
194+ FileUtils . rm_rf ( "#{ __dir__ } /../resources/ext/build-scripts/bc-nonfips-jars" ) unless @fips_rpms . empty?
187195 end
188196 end
189197end
0 commit comments