Skip to content

Commit

Permalink
(CAT-1505) Ensure openssl-3.0 headers are not overwritten by openssl-…
Browse files Browse the repository at this point in the history
…1.1.1

When installing openssl-1.1.1 in order to support ruby-2.7.8 the previously installed openssl-3.0 headers are being overwritten.
This pr moves them out of the way while ruby-2.7.8 is being set up and then moves them back once it is done.
  • Loading branch information
david22swan committed Nov 10, 2023
1 parent 3daed22 commit b82d685
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions configs/components/post-additional-rubies.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
component "post-additional-rubies" do |pkg, settings, platform|
pkg.build do
[ "rm -rf #{settings[:prefix]}/include/openssl",
"mv /tmp/openssl #{settings[:prefix]}/include/openssl"]
end
end
5 changes: 5 additions & 0 deletions configs/components/pre-additional-rubies.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
component "pre-additional-rubies" do |pkg, settings, platform|
pkg.build do
["mv #{settings[:prefix]}/include/openssl /tmp/openssl"]
end
end
2 changes: 2 additions & 0 deletions configs/projects/_pdk-components.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
raise "Not sure which openssl version to use for ruby #{rubyver}" unless rubyver.start_with?("2.7")

# old ruby versions don't support openssl 3
proj.component "pre-additional-rubies"
proj.component "openssl-1.1.1"
proj.component "ruby-#{rubyver}"

Expand All @@ -49,6 +50,7 @@
proj.component "ruby-#{ruby_minor}-augeas" unless platform.is_windows?
proj.component "ruby-#{ruby_minor}-selinux" if platform.is_el? || platform.is_fedora?
proj.component "ruby-#{ruby_minor}-stomp"
proj.component "post-additional-rubies"
end
end

Expand Down

0 comments on commit b82d685

Please sign in to comment.