From 699ec8030c297899bb019ae82c15384f3a049505 Mon Sep 17 00:00:00 2001 From: Josh Cooper Date: Wed, 5 Jul 2023 17:42:38 -0700 Subject: [PATCH] (PA-5618) Build curl on AIX 7.2 Hide and restore /opt/freeware/lib/libcurl.a while building curl --- configs/components/curl.rb | 17 +++++++++++++++++ configs/projects/_shared-agent-components.rb | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/configs/components/curl.rb b/configs/components/curl.rb index 2faf0cdb5..f00d59ec0 100644 --- a/configs/components/curl.rb +++ b/configs/components/curl.rb @@ -41,6 +41,17 @@ configure_options << "--disable-dependency-tracking" end + if platform.name == 'aix-7.2-ppc' + # yum on aix installs an old version of libcurl.a that /opt/freeware/bin/gcc seems + # to use no matter what -L search path I use, so use the same workaround as bbf248fb6 + pkg.configure do + [ + 'mkdir -p /opt/freeware/lib/hide', + 'mv /opt/freeware/lib/libcurl.a /opt/freeware/lib/hide/libcurl.a' + ] + end + end + pkg.configure do ["CPPFLAGS='#{settings[:cppflags]}' \ LDFLAGS='#{settings[:ldflags]}' \ @@ -59,6 +70,12 @@ ["#{platform[:make]} -j$(shell expr $(shell #{platform[:num_cores]}) + 1)"] end + if platform.name == 'aix-7.2-ppc' + pkg.build do + ['mv /opt/freeware/lib/hide/libcurl.a /opt/freeware/lib/libcurl.a'] + end + end + install_steps = [ "#{platform[:make]} -j$(shell expr $(shell #{platform[:num_cores]}) + 1) install", ] diff --git a/configs/projects/_shared-agent-components.rb b/configs/projects/_shared-agent-components.rb index 4d0b059b5..2a03db874 100644 --- a/configs/projects/_shared-agent-components.rb +++ b/configs/projects/_shared-agent-components.rb @@ -30,7 +30,7 @@ proj.component "openssl-#{proj.openssl_version}" end -proj.component 'curl' if platform.name != 'aix-7.2-ppc' # PA-5618 +proj.component 'curl' proj.component 'puppet-ca-bundle' proj.component "ruby-#{proj.ruby_version}" proj.component "readline" if platform.is_macos?