From 8bb24fc7e3e279713c14a09295f93a8f24a9e482 Mon Sep 17 00:00:00 2001 From: John McCrae Date: Thu, 25 Apr 2024 13:06:10 -0700 Subject: [PATCH] Got it! have to adjust FIPS now, moving FIPS support back to the main openssl.rb file for v3 and laster in onnibus-software Signed-off-by: John McCrae --- config/software/openssl.rb | 9 +++++++-- config/software/ruby.rb | 37 ++----------------------------------- 2 files changed, 9 insertions(+), 37 deletions(-) diff --git a/config/software/openssl.rb b/config/software/openssl.rb index 0cf5e3dde..68716d354 100644 --- a/config/software/openssl.rb +++ b/config/software/openssl.rb @@ -236,7 +236,12 @@ if version.start_with?("3") && fips_mode? make "install_sw install_ssldirs install_fips", env: env - # if windows? + msys_path = ENV["MSYS2_INSTALL_DIR"] ? "#{ENV["MSYS2_INSTALL_DIR"]}" : "#{ENV["OMNIBUS_TOOLCHAIN_INSTALL_DIR"]}/embedded/bin" + + if windows? + %w{ libcrypto-3-x64.dll libssl-3-x64.dll openssl.exe }.each do |file| + copy "#{msys_path}/usr/local/bin/#{file}", "#{install_dir}/embedded/bin/#{file}" + end # # Needed now that we switched to msys2 and have not figured out how to tell # # it how to statically link yet # dlls = [ @@ -258,7 +263,7 @@ # %w{ openssl }.each do |cmd| # copy "#{project_dir}/bin/#{cmd}", "#{install_dir}/embedded/bin/#{cmd}" # end - # end + end else make "install", env: env end diff --git a/config/software/ruby.rb b/config/software/ruby.rb index 5777a651d..b81dab39c 100644 --- a/config/software/ruby.rb +++ b/config/software/ruby.rb @@ -121,11 +121,7 @@ # environment in omnibus-toolchain would probably need to look a little more identical to the devkit. env["CC"] = "gcc" env["CFLAGS"] = "-I#{install_dir}/embedded/include -DFD_SETSIZE=2048" - if windows_arch_i386? - env["CFLAGS"] << " -m32 -march=i686 -O3" - else - env["CFLAGS"] << " -m64 -march=x86-64 -O3" - end + env["CFLAGS"] << " -m64 -march=x86-64 -O3" env["CPPFLAGS"] = env["CFLAGS"] env["CXXFLAGS"] = env["CFLAGS"] else # including linux @@ -317,36 +313,7 @@ if windows? # Needed now that we switched to msys2 and have not figured out how to tell # it how to statically link yet - # build do - # if version.satisfies?("~> 3.0.0") && fips_mode? - # require 'find' - # puts "***************************" - # puts "** Searching for Openssl **" - # puts "***************************" - # Find.find('openssl.exe') { |f| puts f } - - - # files = [ - # "libcrypto-3-x64.dll", - # "libssl-3-x64.dll", - # "openssl.exe", - # ] - - # files.each do |file| - # # mingw = ENV["MSYSTEM"].downcase - # msys_path = ENV["MSYS2_INSTALL_DIR"] ? "#{ENV["MSYS2_INSTALL_DIR"]}" : "#{ENV["OMNIBUS_TOOLCHAIN_INSTALL_DIR"]}/embedded/bin" - # windows_path = "#{msys_path}/usr/local/bin/#{file}" - # puts "checking for this file: #{windows_path}" - - # if File.exist?(windows_path) - # puts "writing openssl file #{file} to the /embedded directory" - # copy windows_path, "#{install_dir}/embedded/bin/#{file}" - # end - # end - # end - # end - - %w{ erb gem irb rdoc ri bundle libcrypto-3-x64.dll libssl-3-x64.dll openssl.exe }.each do |cmd| + %w{ erb gem irb rdoc ri bundle }.each do |cmd| copy "#{project_dir}/bin/#{cmd}", "#{install_dir}/embedded/bin/#{cmd}" end