-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(PA-6507)(PA-6736) Gem install rexml to 3.3.2 for CVE-2024-35176 and CVE-2024-… #878
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,14 @@ | ||
component 'rubygem-rexml' do |pkg, settings, platform| | ||
pkg.version '3.2.6' | ||
pkg.md5sum 'a57288ae5afed07dd08c9f1302da7b25' | ||
pkg.version '3.3.2' | ||
pkg.md5sum '55d213401f5e6a7a83ff3d2cd64a23fe' | ||
|
||
# If the platform is solaris with sparc architecture in agent-runtime-7.x project, we want to gem install rexml | ||
# ignoring the dependencies, this is because the pl-ruby version used in these platforms is ancient so it gets | ||
# confused when installing rexml. It tries to install rexml's dependency 'strscan' by building native extensions | ||
# but fails. We can ignore insalling that since strscan is already shipped with ruby 2 as its default gem. | ||
if platform.name =~ /solaris-(10|11)-sparc/ && settings[:ruby_version].to_i < 3 | ||
settings["#{pkg.get_name}_gem_install_options".to_sym] = "--ignore-dependencies" | ||
end | ||
|
||
instance_eval File.read('configs/components/_base-rubygem.rb') | ||
end |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,6 +62,10 @@ | |
proj.component 'rubygem-fast_gettext' | ||
proj.component 'rubygem-ffi' | ||
|
||
# Note: We won't need to explicitly add 'rubygem-rexml' to agent-runtimes once ruby is upgraded to 3.3.3 or higher (CVE-2024-35176 and CVE-2024-39908). | ||
# This is because the bundled rexml gem version shipped with ruby itself will be free from these CVEs. | ||
proj.component 'rubygem-rexml' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do we want this in both streams? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oh, sorry i see that in the commit message. So for ruby 2.7 we want to override the default rexml version. |
||
|
||
if platform.is_windows? || platform.is_solaris? || platform.is_aix? | ||
proj.component 'rubygem-minitar' | ||
end | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,6 +68,7 @@ | |
proj.setting(:gem_install, "#{proj.host_gem} install --no-rdoc --no-ri --local --bindir=#{proj.bindir}") | ||
end | ||
|
||
proj.setting(:gem_cleanup, "#{proj.host_gem} cleanup") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I dont understand this change. Also, it seems like we are missing this for installer runtime. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Generally, i think this is related to my point here #878 (comment) I think this is a very specialized case. I would suggest the rexml component just encapsulate everything needed for this so that it is clear why we are doing it and when we eventually get to ruby version with the patched version it will be easier to drop. |
||
|
||
proj.setting(:datadir, File.join(proj.prefix, "share")) | ||
proj.setting(:mandir, File.join(proj.datadir, "man")) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dont think this specialized logic belongs in the generalized base rubygems code.