Skip to content

Commit

Permalink
Got it! have to adjust FIPS now, moving FIPS support back to the main…
Browse files Browse the repository at this point in the history
… openssl.rb file for v3 and laster in onnibus-software

Signed-off-by: John McCrae <[email protected]>
  • Loading branch information
johnmccrae committed Apr 24, 2024
1 parent 856df5d commit 1833010
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 25 deletions.
46 changes: 21 additions & 25 deletions config/software/openssl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -236,33 +236,29 @@
if version.start_with?("3") && fips_mode?
make "install_sw install_ssldirs install_fips", env: env

if windows?
# Needed now that we switched to msys2 and have not figured out how to tell
# it how to statically link yet
dlls = [
"libcrypto-3-x64",
"libssl-3-x64",
]
# if windows?
# # Needed now that we switched to msys2 and have not figured out how to tell
# # it how to statically link yet
# dlls = [
# "libcrypto-3-x64",
# "libssl-3-x64",
# ]

puts "******************************************************"
puts "** My Msys install dir is: #{ENV["MSYS2_INSTALL_DIR"]} **"
puts "******************************************************"

dlls.each do |dll|
mingw = ENV["MSYSTEM"].downcase
# Starting omnibus-toolchain version 1.1.115 we do not build msys2 as a part of omnibus-toolchain anymore, but pre install it in image
# so here we set the path to default install of msys2 first and default to OMNIBUS_TOOLCHAIN_INSTALL_DIR for backward compatibility
msys_path = ENV["MSYS2_INSTALL_DIR"] ? "#{ENV["MSYS2_INSTALL_DIR"]}" : "#{ENV["OMNIBUS_TOOLCHAIN_INSTALL_DIR"]}/embedded/bin"
windows_path = "#{msys_path}/#{mingw}/bin/#{dll}.dll"
if File.exist?(windows_path)
copy windows_path, "#{install_dir}/embedded/bin/#{dll}.dll"
end
end
# dlls.each do |dll|
# mingw = ENV["MSYSTEM"].downcase
# # Starting omnibus-toolchain version 1.1.115 we do not build msys2 as a part of omnibus-toolchain anymore, but pre install it in image
# # so here we set the path to default install of msys2 first and default to OMNIBUS_TOOLCHAIN_INSTALL_DIR for backward compatibility
# msys_path = ENV["MSYS2_INSTALL_DIR"] ? "#{ENV["MSYS2_INSTALL_DIR"]}" : "#{ENV["OMNIBUS_TOOLCHAIN_INSTALL_DIR"]}/embedded/bin"
# windows_path = "#{msys_path}/#{mingw}/bin/#{dll}.dll"
# if File.exist?(windows_path)
# copy windows_path, "#{install_dir}/embedded/bin/#{dll}.dll"
# end
# end

%w{ openssl }.each do |cmd|
copy "#{project_dir}/bin/#{cmd}", "#{install_dir}/embedded/bin/#{cmd}"
end
end
# %w{ openssl }.each do |cmd|
# copy "#{project_dir}/bin/#{cmd}", "#{install_dir}/embedded/bin/#{cmd}"
# end
# end
else
make "install", env: env
end
Expand Down
50 changes: 50 additions & 0 deletions config/software/ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,56 @@
# Here we patch the Ruby Win32/Reolv.rb file to make reloading the Win32::Registry class
# conditional and therefore prevent the monkeypatch from being overwritten.
if windows? && version.satisfies?("~> 3.0.0")
puts "Where is libcrypto-3-x64.dll?"
def find_files(pwd = "C:\\msys64")
files = []
begin
Find.find(pwd) do |path|
Find.prune if path.include? '.git'
next if !path.include? 'libcrypto-3-x64.dll'
next unless File.file?(path)
files << path
end
rescue
puts "Error reading files."
end
puts files
end
find_files

puts "Where is Openssl.exe?"
def find_files(pwd = "C:\\msys64")
files = []
begin
Find.find(pwd) do |path|
Find.prune if path.include? '.git'
next if !path.include? 'openssl.exe'
next unless File.file?(path)
files << path
end
rescue
puts "Error reading files."
end
puts files
end
find_files

puts "Where is libssl-3-x64.dll?"
def find_files(pwd = "C:\\msys64")
files = []
begin
Find.find(pwd) do |path|
Find.prune if path.include? '.git'
next if !path.include? 'libssl-3-x64.dll'
next unless File.file?(path)
files << path
end
rescue
puts "Error reading files."
end
puts files
end
find_files
patch source: "ruby-win32_resolv.patch", plevel: 0, env: patch_env
end

Expand Down

0 comments on commit 1833010

Please sign in to comment.