diff --git a/configs/components/_base-ruby.rb b/configs/components/_base-ruby.rb index d3b6e67bb..b7de1712e 100644 --- a/configs/components/_base-ruby.rb +++ b/configs/components/_base-ruby.rb @@ -29,8 +29,16 @@ end pkg.environment 'LDFLAGS', "#{settings[:ldflags]} -Wl,-bmaxdata:0x80000000" elsif platform.is_solaris? - pkg.environment 'PATH', "#{settings[:bindir]}:/usr/ccs/bin:/usr/sfw/bin:$(PATH):/opt/csw/bin" - pkg.environment 'CC', "/opt/pl-build-tools/bin/#{settings[:platform_triple]}-gcc" + # See PA-5639, if we decide to go without OpenCSW GCC then we can simplify this logic + if ruby_version_y >= '3.0' + pkg.environment 'PATH', "#{settings[:bindir]}:/opt/csw/bin:/usr/ccs/bin:/usr/sfw/bin:$(PATH)" + pkg.environment 'CC', '/opt/csw/bin/gcc' + pkg.environment 'LD', '/opt/csw/bin/gld' + pkg.environment 'AR', '/opt/csw/bin/gar' + else + pkg.environment 'PATH', "#{settings[:bindir]}:/usr/ccs/bin:/usr/sfw/bin:$(PATH):/opt/csw/bin" + pkg.environment 'CC', "/opt/pl-build-tools/bin/#{settings[:platform_triple]}-gcc" + end pkg.environment 'CXX', "/opt/pl-build-tools/bin/#{settings[:platform_triple]}-g++" pkg.environment 'LDFLAGS', "-Wl,-rpath=#{settings[:libdir]}" if platform.os_version == '10' 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/components/openssl-1.1.1.rb b/configs/components/openssl-1.1.1.rb index 2b57053fe..63ed2d5be 100644 --- a/configs/components/openssl-1.1.1.rb +++ b/configs/components/openssl-1.1.1.rb @@ -1,6 +1,6 @@ component 'openssl' do |pkg, settings, platform| - pkg.version '1.1.1t' - pkg.sha256sum '8dee9b24bdb1dcbf0c3d1e9b02fb8f6bf22165e807f45adeb7c9677536859d3b' + pkg.version '1.1.1u' + pkg.sha256sum 'e2f8d84b523eecd06c7be7626830370300fbcc15386bf5142d72758f6963ebc6' pkg.url "https://openssl.org/source/openssl-#{pkg.get_version}.tar.gz" pkg.mirror "#{settings[:buildsources_url]}/openssl-#{pkg.get_version}.tar.gz" diff --git a/configs/components/openssl-3.0.rb b/configs/components/openssl-3.0.rb index 30cf3c165..fb732ac9c 100644 --- a/configs/components/openssl-3.0.rb +++ b/configs/components/openssl-3.0.rb @@ -1,6 +1,6 @@ component 'openssl' do |pkg, settings, platform| - pkg.version '3.0.8' - pkg.sha256sum '6c13d2bf38fdf31eac3ce2a347073673f5d63263398f1f69d0df4a41253e4b3e' + pkg.version '3.0.9' + pkg.sha256sum 'eb1ab04781474360f77c318ab89d8c5a03abc38e63d65a603cabbf1b00a1dc90' pkg.url "https://openssl.org/source/openssl-#{pkg.get_version}.tar.gz" pkg.mirror "#{settings[:buildsources_url]}/openssl-#{pkg.get_version}.tar.gz" @@ -55,8 +55,9 @@ pkg.environment 'CC', '/opt/freeware/bin/gcc' cflags = "#{settings[:cflags]} -static-libgcc" - # see https://github.com/openssl/openssl/issues/18007 - ldflags = "#{settings[:ldflags]} -latomic -lm" + # see https://github.com/openssl/openssl/issues/18007 about -latomic + # see https://www.ibm.com/docs/en/aix/7.2?topic=l-ld-command about -R, which is equivalent to -rpath + ldflags = "#{settings[:ldflags]} -Wl,-R#{settings[:libdir]} -latomic -lm" target = 'aix-gcc' elsif platform.is_solaris? pkg.environment 'PATH', '/opt/csw/bin:$(PATH):/usr/local/bin:/usr/ccs/bin:/usr/sfw/bin' @@ -113,7 +114,6 @@ target, sslflags, 'no-camellia', - 'no-ec2m', 'no-md2', 'no-ssl3', 'no-ssl3-method', @@ -122,7 +122,6 @@ 'no-aria', # 'no-bf', pgcrypto is requires this cipher in postgres for puppetdb # 'no-cast', pgcrypto is requires this cipher in postgres for puppetdb - 'no-rc2', 'no-rc5', # 'no-md4', puppet infra uses the agent's runtime and runs WinRM tasks using NTLM, so it needs DES & MD4 'no-mdc2', diff --git a/configs/components/ruby-3.2.2.rb b/configs/components/ruby-3.2.2.rb index 88023608a..2de241798 100644 --- a/configs/components/ruby-3.2.2.rb +++ b/configs/components/ruby-3.2.2.rb @@ -85,6 +85,8 @@ # collect2: error: ld returned 16 exit status pkg.environment 'optflags', "-O2 -fPIC -g0 " + elsif platform.is_solaris? + pkg.environment 'optflags', '-O1' else pkg.environment 'optflags', '-O2' end @@ -223,7 +225,7 @@ elsif platform.name =~ /osx-12/ rbconfig_changes["CC"] = 'clang -target arm64-apple-macos12' else - rbconfig_changes["CC"] = "gcc" + rbconfig_changes["CC"] = 'gcc' rbconfig_changes["warnflags"] = "-Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat -Wsuggest-attribute=noreturn -Wsuggest-attribute=format -Wno-maybe-uninitialized" end if platform.name =~ /el-7-ppc64/ diff --git a/configs/components/rubygem-ffi.rb b/configs/components/rubygem-ffi.rb index 6ba914f02..ab2772ddb 100644 --- a/configs/components/rubygem-ffi.rb +++ b/configs/components/rubygem-ffi.rb @@ -65,9 +65,15 @@ pkg.environment "CPATH", "/opt/csw/lib/libffi-3.2.1/include" if platform.name =~ /solaris-11/ pkg.environment "MAKE", platform[:make] if platform.is_solaris? - if platform.is_cross_compiled_linux? || platform.is_solaris? - pkg.environment "PATH", "/opt/pl-build-tools/bin:/opt/csw/bin:$(PATH)" - end + if platform.is_cross_compiled_linux? + pkg.environment "PATH", "/opt/pl-build-tools/bin:$(PATH)" + elsif platform.is_solaris? + if settings[:runtime_project] == 'agent-runtime-main' + pkg.environment "PATH", "/opt/csw/bin:/opt/pl-build-tools/bin:$(PATH)" + else + pkg.environment "PATH", "/opt/pl-build-tools/bin:/opt/csw/bin:$(PATH)" + end + end if platform.name =~ /solaris-11-i386/ pkg.install_file "/usr/lib/libffi.so.5.0.10", "#{settings[:libdir]}/libffi.so" diff --git a/configs/components/rubygem-hiera-eyaml.rb b/configs/components/rubygem-hiera-eyaml.rb index ad3e889ed..aa651e44c 100644 --- a/configs/components/rubygem-hiera-eyaml.rb +++ b/configs/components/rubygem-hiera-eyaml.rb @@ -1,6 +1,6 @@ component 'rubygem-hiera-eyaml' do |pkg, settings, platform| - pkg.version '3.3.0' - pkg.md5sum '6f3eee8a30aa6c77736be2e640afafe9' + pkg.version '3.4.0' + pkg.sha256sum 'cdacb683dc5efefcae9bc668ab881f17ce5597cac1c0493aee7c4387c7c8ff54' instance_eval File.read('configs/components/_base-rubygem.rb') diff --git a/configs/platforms/aix-7.1-ppc.rb b/configs/platforms/aix-7.1-ppc.rb index a9a637ef5..465084443 100644 --- a/configs/platforms/aix-7.1-ppc.rb +++ b/configs/platforms/aix-7.1-ppc.rb @@ -41,6 +41,7 @@ tar xvf openssl-1.0.2.1800.tar; cd openssl-1.0.2.1800 && /usr/sbin/installp -acgwXY -d $PWD openssl.base; curl --output yum.sh https://artifactory.delivery.puppetlabs.net/artifactory/generic__buildsources/buildsources/aix-yum.sh && sh yum.sh; +/opt/freeware/bin/sed -i 's|https://anonymous:anonymous@public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS|https://artifactory.delivery.puppetlabs.net/artifactory/rpm__remote_aix_linux_toolbox/RPMS|' /opt/freeware/etc/yum/yum.conf; yum install -y gcc8-c++; ln -sf /opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/8/libgcc_s.a /opt/freeware/lib/libgcc_s.a] diff --git a/configs/platforms/aix-7.2-ppc.rb b/configs/platforms/aix-7.2-ppc.rb index 2d6d5d222..7445a52c3 100644 --- a/configs/platforms/aix-7.2-ppc.rb +++ b/configs/platforms/aix-7.2-ppc.rb @@ -1,7 +1,6 @@ platform "aix-7.2-ppc" do |plat| # os_version = 7.2 plat.make "gmake" - plat.mktemp "/opt/freeware/bin/mktemp -d -p /var/tmp" plat.patch "/opt/freeware/bin/patch" plat.rpmbuild "/usr/bin/rpm" plat.servicetype "aix" @@ -14,6 +13,12 @@ cd openssl-1.0.2.1800 && /usr/sbin/installp -acgwXY -d $PWD openssl.base; curl --output yum.sh https://artifactory.delivery.puppetlabs.net/artifactory/generic__buildsources/buildsources/aix-yum.sh && sh yum.sh] + # After installing yum, but before yum installing packages, point yum to artifactory + # AIX sed doesn't support in-place replacement, so download GNU sed and use that + plat.provision_with %[ +rpm -Uvh https://artifactory.delivery.puppetlabs.net/artifactory/rpm__remote_aix_linux_toolbox/RPMS/ppc/sed/sed-4.1.1-1.aix5.1.ppc.rpm; +/opt/freeware/bin/sed -i 's|https://anonymous:anonymous@public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS|https://artifactory.delivery.puppetlabs.net/artifactory/rpm__remote_aix_linux_toolbox/RPMS|' /opt/freeware/etc/yum/yum.conf] + packages = %w( autoconf cmake @@ -40,6 +45,9 @@ # No upstream rsync packages plat.provision_with "rpm -Uvh https://artifactory.delivery.puppetlabs.net/artifactory/rpm__remote_aix_linux_toolbox/RPMS/ppc/rsync/rsync-3.0.6-1.aix5.3.ppc.rpm" + # lots of things expect mktemp to be installed in the usual place, so link it + plat.provision_with "ln -sf /opt/freeware/bin/mktemp /usr/bin/mktemp" + plat.install_build_dependencies_with "yum install --assumeyes " plat.vmpooler_template "aix-7.2-power" end diff --git a/configs/platforms/osx-13-x86_64.rb b/configs/platforms/osx-13-x86_64.rb new file mode 100644 index 000000000..758509891 --- /dev/null +++ b/configs/platforms/osx-13-x86_64.rb @@ -0,0 +1,8 @@ +platform 'osx-13-x86_64' do |plat| + plat.inherit_from_default + + packages = %w[cmake pkg-config yaml-cpp] + plat.provision_with "su test -c '/usr/local/bin/brew install #{packages.join(' ')}'" + + plat.output_dir File.join('apple', '13', 'PC1', 'x86_64') +end diff --git a/configs/platforms/solaris-11-i386.rb b/configs/platforms/solaris-11-i386.rb index 1cd6a2fea..44f05056a 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|| exit 1; + /opt/csw/bin/pkgutil --config=/var/tmp/vanagon-pkgutil.conf -y -i libffi_dev autoconf gcc4core || exit 1; ntpdate pool.ntp.org] plat.output_dir File.join("solaris", "11", "PC1") 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?