Skip to content
This repository has been archived by the owner on Jan 15, 2025. It is now read-only.

Commit

Permalink
(PA-7099) Add libpsl component to agent-runtime-main
Browse files Browse the repository at this point in the history
 - Curl 8.10.1 requires the libpsl component.
 - Skip windows platforms for now (https://perforce.atlassian.net/browse/PA-7116).
 - Add python3.11 package to applicable platforms as libpsl requires it for building.
 - Add libunistring_dev package to solaris-11-native-sparc as libpsl requires unistr in solaris-11
  • Loading branch information
shubhamshinde360 committed Nov 20, 2024
1 parent fd408d3 commit c0c1b4d
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 3 deletions.
9 changes: 8 additions & 1 deletion configs/components/curl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@

pkg.build_requires "openssl-#{settings[:openssl_version]}"
pkg.build_requires "puppet-ca-bundle"
unless platform.is_windows?
pkg.build_requires "libpsl"
end

ldflags = settings[:ldflags]
if platform.is_cross_compiled_linux?
Expand All @@ -35,6 +38,7 @@
# exclude -Wl,-brtl
ldflags = "-L#{settings[:libdir]}"
else
pkg.environment "PKG_CONFIG_PATH", "/opt/puppetlabs/puppet/lib/pkgconfig"
pkg.environment "PATH", "/opt/pl-build-tools/bin:$(PATH):#{settings[:bindir]}"
end

Expand All @@ -53,7 +57,10 @@
end

configure_options = []
configure_options << "--with-ssl=#{settings[:prefix]} --without-libpsl"
configure_options << "--with-ssl=#{settings[:prefix]}"
if platform.is_windows?
configure_options << "--without-libpsl"
end

# OpenSSL version 3.0 & up no longer ships by default the insecure algorithms
# that curl's ntlm module depends on (md4 & des).
Expand Down
28 changes: 28 additions & 0 deletions configs/components/libpsl.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
component 'libpsl' do |pkg, settings, platform|
pkg.version '0.21.5'
pkg.url "https://github.com/rockdaboot/libpsl/releases/download/#{pkg.get_version}/libpsl-#{pkg.get_version}.tar.gz"
pkg.mirror "https://artifactory.delivery.puppetlabs.net/artifactory/generic__buildsources/buildsources/libpsl-0.21.5.tar.gz"
pkg.sha256sum "1dcc9ceae8b128f3c0b3f654decd0e1e891afc6ff81098f227ef260449dae208"

if platform.is_aix?
pkg.environment "MAKE", 'gmake'
pkg.environment "PATH", "$(PATH):/opt/freeware/bin"
elsif platform.is_solaris?
pkg.environment "MAKE", 'gmake'
pkg.environment "PATH", "/opt/pl-build-tools/bin:$(PATH)"
pkg.environment "CFLAGS", "-I/opt/csw/include"
pkg.environment "LDFLAGS", "-L/opt/csw/lib"
end

pkg.configure do
["./configure --prefix=#{settings[:prefix]}"]
end

pkg.build do
["#{platform[:make]} VERBOSE=1 -j$(shell expr $(shell #{platform[:num_cores]}) + 1)"]
end

pkg.install do
["#{platform[:make]} VERBOSE=1 -j$(shell expr $(shell #{platform[:num_cores]}) + 1) install"]
end
end
1 change: 1 addition & 0 deletions configs/platforms/el-8-aarch64.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
packages = %w(
perl-Getopt-Long
patch
python3.11
swig
libselinux-devel
readline-devel
Expand Down
2 changes: 2 additions & 0 deletions configs/platforms/el-8-ppc64le.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
platform 'el-8-ppc64le' do |plat|
plat.inherit_from_default
packages = ["python3.11"]
plat.provision_with("dnf install -y --allowerasing #{packages.join(' ')}")
end
1 change: 1 addition & 0 deletions configs/platforms/el-8-x86_64.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
libsepol-devel
libselinux-devel
pkgconfig
python3.11
readline-devel
rpmdevtools
swig
Expand Down
2 changes: 2 additions & 0 deletions configs/platforms/redhatfips-8-x86_64.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
platform "redhatfips-8-x86_64" do |plat|
plat.inherit_from_default
packages = ["python3.11"]
plat.provision_with "dnf install -y --allowerasing #{packages.join(' ')}"
end
2 changes: 1 addition & 1 deletion configs/platforms/solaris-11-i386.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
basedir=default" > /var/tmp/vanagon-noask;
echo "mirror=https://artifactory.delivery.puppetlabs.net/artifactory/generic__remote_opencsw_mirror/testing" > /var/tmp/vanagon-pkgutil.conf;
pkgadd -n -a /var/tmp/vanagon-noask -d http://get.opencsw.org/now all
/opt/csw/bin/pkgutil --config=/var/tmp/vanagon-pkgutil.conf -y -i libffi_dev autoconf gcc4core CSWxz-5.2.8,REV=2022.11.16 || exit 1;
/opt/csw/bin/pkgutil --config=/var/tmp/vanagon-pkgutil.conf -y -i libffi_dev autoconf gcc4core CSWxz-5.2.8,REV=2022.11.16 python33 || exit 1;
ntpdate pool.ntp.org]
plat.output_dir File.join("solaris", "11", "PC1")
end
2 changes: 1 addition & 1 deletion configs/platforms/solaris-11-native-sparc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@
basedir=default" > /var/tmp/vanagon-noask;
echo "mirror=https://artifactory.delivery.puppetlabs.net/artifactory/generic__remote_opencsw_mirror/testing" > /var/tmp/vanagon-pkgutil.conf;
pkgadd -n -a /var/tmp/vanagon-noask -d http://get.opencsw.org/now all
/opt/csw/bin/pkgutil -config=/var/tmp/vanagon-pkgutil.conf -U && /opt/csw/bin/pkgutil -config=/var/tmp/vanagon-pkgutil.conf -y -i bison CSWxz-5.2.8,REV=2022.11.16 || exit 1
/opt/csw/bin/pkgutil -config=/var/tmp/vanagon-pkgutil.conf -U && /opt/csw/bin/pkgutil -config=/var/tmp/vanagon-pkgutil.conf -y -i bison CSWxz-5.2.8,REV=2022.11.16 libunistring_dev || exit 1
]
end
3 changes: 3 additions & 0 deletions configs/projects/agent-runtime-main.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@
# Load shared agent components
########

unless platform.is_windows?
proj.component 'libpsl'
end
instance_eval File.read(File.join(File.dirname(__FILE__), '_shared-agent-components.rb'))

########
Expand Down

0 comments on commit c0c1b4d

Please sign in to comment.