Skip to content

Commit 45ab2a8

Browse files
authored
Merge pull request #842 from puppetlabs/revert-816-curl8
Revert "Add curl 8.7.1 and configure agent-runtime-main to use it"
2 parents f9068e6 + 0fcfda6 commit 45ab2a8

File tree

3 files changed

+51
-26
lines changed

3 files changed

+51
-26
lines changed

configs/components/curl.rb

Lines changed: 11 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,6 @@
11
component 'curl' do |pkg, settings, platform|
2-
# Projects may define a :curl_version setting
3-
version = settings[:curl_version] || '7.88.1'
4-
pkg.version version
5-
6-
case version
7-
when '7.88.1'
8-
pkg.sha256sum 'cdb38b72e36bc5d33d5b8810f8018ece1baa29a8f215b4495e495ded82bbf3c7'
9-
when '8.7.1'
10-
pkg.sha256sum 'f91249c87f68ea00cf27c44fdfa5a78423e41e71b7d408e5901a9896d905c495'
11-
else
12-
raise "curl version #{version} has not been configured; Cannot continue."
13-
end
14-
2+
pkg.version '7.88.1'
3+
pkg.sha256sum 'cdb38b72e36bc5d33d5b8810f8018ece1baa29a8f215b4495e495ded82bbf3c7'
154
pkg.url "https://curl.se/download/curl-#{pkg.get_version}.tar.gz"
165
pkg.mirror "#{settings[:buildsources_url]}/curl-#{pkg.get_version}.tar.gz"
176

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

40-
# Following lines should we removed once we drop curl 7
41-
if version.start_with?('7')
42-
pkg.apply_patch 'resources/patches/curl/CVE-2023-27535.patch'
43-
pkg.apply_patch 'resources/patches/curl/CVE-2023-28319.patch'
44-
pkg.apply_patch 'resources/patches/curl/CVE-2023-32001.patch'
45-
pkg.apply_patch 'resources/patches/curl/CVE-2023-38545.patch'
46-
pkg.apply_patch 'resources/patches/curl/CVE-2023-38546.patch'
47-
pkg.apply_patch 'resources/patches/curl/CVE-2023-46218.patch'
48-
pkg.apply_patch 'resources/patches/curl/CVE-2024-2004.patch'
49-
pkg.apply_patch 'resources/patches/curl/CVE-2024-2398.patch'
50-
end
29+
# Following 3 lines should we removed once we upgrade CURL to 8.x.x
30+
pkg.apply_patch 'resources/patches/curl/CVE-2023-27535.patch'
31+
pkg.apply_patch 'resources/patches/curl/CVE-2023-28319.patch'
32+
pkg.apply_patch 'resources/patches/curl/CVE-2023-32001.patch'
33+
pkg.apply_patch 'resources/patches/curl/CVE-2023-38545.patch'
34+
pkg.apply_patch 'resources/patches/curl/CVE-2023-38546.patch'
35+
pkg.apply_patch 'resources/patches/curl/CVE-2023-46218.patch'
36+
pkg.apply_patch 'resources/patches/curl/CVE-2024-2004.patch'
37+
pkg.apply_patch 'resources/patches/curl/CVE-2024-2398.patch'
5138

5239
configure_options = []
5340
configure_options << "--with-ssl=#{settings[:prefix]}"

configs/projects/agent-runtime-main.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
proj.setting :augeas_version, '1.14.1'
1515
end
1616

17-
proj.setting :curl_version, '8.7.1'
18-
1917
########
2018
# Load shared agent settings
2119
########
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
From 44b69e23fb7522e1e0d6052c4d379715f9aa6447 Mon Sep 17 00:00:00 2001
2+
From: Michael Smith <michael.smith@puppet.com>
3+
Date: Thu, 24 Aug 2017 16:43:01 -0700
4+
Subject: [PATCH] Compilation fails on AIX with 7.55.1 (#1828)
5+
6+
Compilation fails on multi.c. The root of it is that on AIX, when
7+
_ALL_SOURCE is set to 1 (as CURL does), sys/poll.h uses #define for
8+
event and revent. Because multi.c includes sys/poll.h but multi.h
9+
doesn't, we end up with a mismatch between names for the curl_waitfd
10+
struct.
11+
12+
Previously this appears to have built with curl 7.51.0 because multi.h
13+
also included sys/poll.h, so they were equally wrong. Based on
14+
https://curl.haxx.se/mail/lib-2013-02/0330.html, this appears to have
15+
been an issue off-and-on for years.
16+
17+
My workaround has been to undef _ALL_SOURCE before including select.h in
18+
multi.c, and redefine it after. This probably isn't a good general
19+
solution.
20+
---
21+
lib/multi.c | 2 ++
22+
1 file changed, 2 insertions(+)
23+
24+
diff --git a/lib/multi.c b/lib/multi.c
25+
index d5bc532ea..ecc00d3af 100644
26+
--- a/lib/multi.c
27+
+++ b/lib/multi.c
28+
@@ -35,7 +35,9 @@
29+
#include "sendf.h"
30+
#include "timeval.h"
31+
#include "http.h"
32+
+#undef _ALL_SOURCE
33+
#include "select.h"
34+
+#define _ALL_SOURCE 1
35+
#include "warnless.h"
36+
#include "speedcheck.h"
37+
#include "conncache.h"
38+
--
39+
2.14.1
40+

0 commit comments

Comments
 (0)