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

(PA-7099) Libpsl component addition to agent-runtime-main #938

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
source ENV['GEM_SOURCE'] || "https://rubygems.org"
source "https://rubygems.org"

def location_for(place)
if place =~ /^((?:git[:@]|https:)[^#]*)#(.*)/
Expand Down
17 changes: 16 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? || platform.name =~ /solaris-11/
pkg.build_requires "libpsl"
end

ldflags = settings[:ldflags]
if platform.is_cross_compiled_linux?
Expand All @@ -35,9 +38,18 @@
# 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

if(version.start_with?('8'))
if(platform.name =~ /solaris-11/)
pkg.environment "LD_LIBRARY_PATH", "/opt/csw/lib: "
else
pkg.environment "LD_LIBRARY_PATH", "/opt/csw/lib"
end
end

# 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'
Expand All @@ -53,7 +65,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
9 changes: 5 additions & 4 deletions configs/platforms/solaris-11-native-sparc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,9 @@
action=nocheck
# Install to the default base directory.
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
]
echo "mirror=https://artifactory.delivery.puppetlabs.net/artifactory/generic__remote_opencsw_mirror/testing
wgetopts=--no-check-certificate" > /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.6.3,REV=2024.10.10 libunistring_dev python33 libpsl_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
Loading