Skip to content

Commit

Permalink
Merge pull request #816 from joshcooper/curl8
Browse files Browse the repository at this point in the history
Add curl 8.7.1 and configure agent-runtime-main to use it
  • Loading branch information
cthorn42 authored Apr 18, 2024
2 parents 436024a + fc11658 commit 50954b5
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 51 deletions.
35 changes: 24 additions & 11 deletions configs/components/curl.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
component 'curl' do |pkg, settings, platform|
pkg.version '7.88.1'
pkg.sha256sum 'cdb38b72e36bc5d33d5b8810f8018ece1baa29a8f215b4495e495ded82bbf3c7'
# Projects may define a :curl_version setting
version = settings[:curl_version] || '7.88.1'
pkg.version version

case version
when '7.88.1'
pkg.sha256sum 'cdb38b72e36bc5d33d5b8810f8018ece1baa29a8f215b4495e495ded82bbf3c7'
when '8.7.1'
pkg.sha256sum 'f91249c87f68ea00cf27c44fdfa5a78423e41e71b7d408e5901a9896d905c495'
else
raise "curl version #{version} has not been configured; Cannot continue."
end

pkg.url "https://curl.se/download/curl-#{pkg.get_version}.tar.gz"
pkg.mirror "#{settings[:buildsources_url]}/curl-#{pkg.get_version}.tar.gz"

Expand All @@ -26,15 +37,17 @@
pkg.environment "PATH", "/opt/pl-build-tools/bin:$(PATH):#{settings[:bindir]}"
end

# Following 3 lines should we removed once we upgrade CURL to 8.x.x
pkg.apply_patch 'resources/patches/curl/CVE-2023-27535.patch'
pkg.apply_patch 'resources/patches/curl/CVE-2023-28319.patch'
pkg.apply_patch 'resources/patches/curl/CVE-2023-32001.patch'
pkg.apply_patch 'resources/patches/curl/CVE-2023-38545.patch'
pkg.apply_patch 'resources/patches/curl/CVE-2023-38546.patch'
pkg.apply_patch 'resources/patches/curl/CVE-2023-46218.patch'
pkg.apply_patch 'resources/patches/curl/CVE-2024-2004.patch'
pkg.apply_patch 'resources/patches/curl/CVE-2024-2398.patch'
# Following lines should we removed once we drop curl 7
if version.start_with?('7')
pkg.apply_patch 'resources/patches/curl/CVE-2023-27535.patch'
pkg.apply_patch 'resources/patches/curl/CVE-2023-28319.patch'
pkg.apply_patch 'resources/patches/curl/CVE-2023-32001.patch'
pkg.apply_patch 'resources/patches/curl/CVE-2023-38545.patch'
pkg.apply_patch 'resources/patches/curl/CVE-2023-38546.patch'
pkg.apply_patch 'resources/patches/curl/CVE-2023-46218.patch'
pkg.apply_patch 'resources/patches/curl/CVE-2024-2004.patch'
pkg.apply_patch 'resources/patches/curl/CVE-2024-2398.patch'
end

configure_options = []
configure_options << "--with-ssl=#{settings[:prefix]}"
Expand Down
2 changes: 2 additions & 0 deletions configs/projects/agent-runtime-main.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
proj.setting :augeas_version, '1.14.1'
end

proj.setting :curl_version, '8.7.1'

########
# Load shared agent settings
########
Expand Down
40 changes: 0 additions & 40 deletions resources/patches/curl/curl-7.55.1-aix-poll.patch

This file was deleted.

0 comments on commit 50954b5

Please sign in to comment.