diff --git a/Gemfile b/Gemfile index 06528f243..67ee95c0f 100644 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,4 @@ -source ENV['GEM_SOURCE'] || "https://rubygems.org" +source "https://rubygems.org" def location_for(place) if place =~ /^((?:git[:@]|https:)[^#]*)#(.*)/ diff --git a/configs/components/curl.rb b/configs/components/curl.rb index 9b83c1008..28860fd1a 100644 --- a/configs/components/curl.rb +++ b/configs/components/curl.rb @@ -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? @@ -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' @@ -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). diff --git a/configs/components/libpsl.rb b/configs/components/libpsl.rb new file mode 100644 index 000000000..a205fe45f --- /dev/null +++ b/configs/components/libpsl.rb @@ -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 diff --git a/configs/platforms/el-8-aarch64.rb b/configs/platforms/el-8-aarch64.rb index abc87f179..0c85c5277 100644 --- a/configs/platforms/el-8-aarch64.rb +++ b/configs/platforms/el-8-aarch64.rb @@ -4,6 +4,7 @@ packages = %w( perl-Getopt-Long patch + python3.11 swig libselinux-devel readline-devel diff --git a/configs/platforms/el-8-ppc64le.rb b/configs/platforms/el-8-ppc64le.rb index e40874a5f..aad987135 100644 --- a/configs/platforms/el-8-ppc64le.rb +++ b/configs/platforms/el-8-ppc64le.rb @@ -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 diff --git a/configs/platforms/el-8-x86_64.rb b/configs/platforms/el-8-x86_64.rb index 96a794035..080b478e2 100644 --- a/configs/platforms/el-8-x86_64.rb +++ b/configs/platforms/el-8-x86_64.rb @@ -6,6 +6,7 @@ libsepol-devel libselinux-devel pkgconfig + python3.11 readline-devel rpmdevtools swig diff --git a/configs/platforms/redhatfips-8-x86_64.rb b/configs/platforms/redhatfips-8-x86_64.rb index 8692d8452..d981ec921 100644 --- a/configs/platforms/redhatfips-8-x86_64.rb +++ b/configs/platforms/redhatfips-8-x86_64.rb @@ -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 diff --git a/configs/platforms/solaris-11-i386.rb b/configs/platforms/solaris-11-i386.rb index 1ac5501be..217e031c5 100644 --- a/configs/platforms/solaris-11-i386.rb +++ b/configs/platforms/solaris-11-i386.rb @@ -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 diff --git a/configs/platforms/solaris-11-native-sparc.rb b/configs/platforms/solaris-11-native-sparc.rb index 3dcf0b194..d84da5fd8 100644 --- a/configs/platforms/solaris-11-native-sparc.rb +++ b/configs/platforms/solaris-11-native-sparc.rb @@ -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 diff --git a/configs/projects/agent-runtime-main.rb b/configs/projects/agent-runtime-main.rb index 975baf4be..a856eec34 100644 --- a/configs/projects/agent-runtime-main.rb +++ b/configs/projects/agent-runtime-main.rb @@ -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')) ########