Skip to content

Commit

Permalink
Merge pull request #795 from amitkarsale/PA-5998
Browse files Browse the repository at this point in the history
(PA-5998) Enable puppet-runtime builds for sles11-main
  • Loading branch information
joshcooper authored Feb 23, 2024
2 parents 7bff818 + 2a1b728 commit f7fad39
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 4 deletions.
7 changes: 6 additions & 1 deletion configs/components/_base-ruby-augeas.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@
pkg.build_requires "ruby-#{ruby_version}"
pkg.build_requires "augeas"

pkg.environment "PATH", "$(PATH):/opt/pl-build-tools/bin:/usr/local/bin:/opt/csw/bin:/usr/ccs/bin:/usr/sfw/bin"
if platform.name == 'sles-11-x86_64'
pkg.environment "PATH", "/opt/pl-build-tools/bin:$(PATH)"
else
pkg.environment "PATH", "$(PATH):/opt/pl-build-tools/bin:/usr/local/bin:/opt/csw/bin:/usr/ccs/bin:/usr/sfw/bin"
end

if platform.is_aix?
if platform.name == 'aix-7.1-ppc'
pkg.environment "CC", "/opt/pl-build-tools/bin/gcc"
Expand Down
8 changes: 7 additions & 1 deletion configs/components/ruby-3.2.3.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@
pkg.environment 'optflags', "-O2 -fPIC -g0 "
elsif platform.is_solaris?
pkg.environment 'optflags', '-O1'
elsif platform.name == 'sles-11-x86_64'
pkg.environment 'PATH', '/opt/pl-build-tools/bin:$(PATH)'
pkg.environment 'optflags', '-O2'
else
pkg.environment 'optflags', '-O2'
end
Expand Down Expand Up @@ -108,7 +111,9 @@
special_flags += " --with-baseruby=no --enable-dtrace=no "
end
special_flags += "--enable-close-fds-by-recvmsg-with-peek "
elsif platform.name =~ /el-6/
elsif platform.name =~ /el-6/ || platform.name =~ /sles-11-x86_64/
# Since we're not cross compiling, ignore old ruby versions that happen to be in the PATH
# and force ruby to build miniruby and use that to bootstrap the rest of the build
special_flags += " --with-baseruby=no "
elsif platform.is_windows?
# ruby's configure script guesses the build host is `cygwin`, because we're using
Expand All @@ -133,6 +138,7 @@
'osx-11-arm64',
'osx-12-arm64',
'redhatfips-7-x86_64',
'sles-11-x86_64',
'sles-12-ppc64le',
'solaris-11-sparc',
'solaris-113-sparc',
Expand Down
2 changes: 2 additions & 0 deletions configs/components/ruby-shadow.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
pkg.build_requires "ruby-#{settings[:ruby_version]}"
if !platform.is_cross_compiled? && platform.architecture == 'sparc'
pkg.environment "PATH", "$(PATH):/opt/pl-build-tools/bin:/usr/ccs/bin:/usr/sfw/bin"
elsif platform.name == 'sles-11-x86_64'
pkg.environment "PATH", "/opt/pl-build-tools/bin:$(PATH)"
else
pkg.environment "PATH", "$(PATH):/usr/ccs/bin:/usr/sfw/bin"
end
Expand Down
5 changes: 4 additions & 1 deletion configs/components/rubygem-ffi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@
else
pkg.environment "PATH", "/opt/pl-build-tools/bin:/opt/csw/bin:$(PATH)"
end
elsif platform.is_aix?
pkg.environment 'PATH', '/opt/freeware/bin:/opt/pl-build-tools/bin:$(PATH)'
elsif platform.name == 'sles-11-x86_64'
pkg.environment 'PATH', '/opt/pl-build-tools/bin:$(PATH)'
end

# With Ruby 3.2 on Solaris-11 we install OpenSCW's libffi, no need to copy over the system libffi
Expand All @@ -97,7 +101,6 @@
end

pkg.environment 'PKG_CONFIG_PATH', '/opt/puppetlabs/puppet/lib/pkgconfig:$(PKG_CONFIG_PATH)'
pkg.environment 'PATH', '/opt/freeware/bin:/opt/pl-build-tools/bin:$(PATH)' if platform.is_aix?

if platform.is_cross_compiled? && !platform.is_macos?
base_ruby = case platform.name
Expand Down
6 changes: 6 additions & 0 deletions configs/components/runtime-agent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
pkg.environment "PROJECT_SHORTNAME", "puppet"
pkg.add_source "file://resources/files/runtime/runtime.sh"

if platform.name =~ /sles-11-x86_64/ && settings[:ruby_version] =~ /2.7/
pkg.install do
"zypper install -y --oldpackage pl-gcc=4.8.2-1"
end
end

if platform.is_cross_compiled?
if platform.architecture =~ /aarch64|ppc64$|ppc64le/
libdir = File.join("/opt/pl-build-tools", settings[:platform_triple], "lib64")
Expand Down
1 change: 0 additions & 1 deletion configs/platforms/sles-11-x86_64.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"zlib-devel"
]
plat.provision_with("zypper -n --no-gpg-checks install -y #{packages.join(' ')}")
plat.provision_with "zypper install -y --oldpackage pl-gcc=4.8.2-1"
plat.provision_with "zypper install -y --oldpackage pl-cmake=3.2.3-13.sles11"
plat.install_build_dependencies_with "zypper -n --no-gpg-checks install -y"
plat.vmpooler_template "sles-11-x86_64"
Expand Down

0 comments on commit f7fad39

Please sign in to comment.