Skip to content

Commit

Permalink
(PA-6001) Add sles11 platform to pxp-agent
Browse files Browse the repository at this point in the history
  • Loading branch information
amitkarsale committed Mar 11, 2024
1 parent de42954 commit 0784b90
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 19 deletions.
5 changes: 4 additions & 1 deletion configs/components/cpp-pcp-client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@

cmake = 'C:/ProgramData/chocolatey/bin/cmake.exe -G "MinGW Makefiles"'
toolchain = "-DCMAKE_TOOLCHAIN_FILE=#{settings[:tools_root]}/pl-build-toolchain.cmake"
elsif platform.name =~ /el-[67]|redhatfips-7|sles-1[12]|ubuntu-18.04-amd64/
elsif platform.name == 'sles-11-x86_64'
cmake = 'env LD_LIBRARY_PATH=/opt/pl-build-tools/lib64 /opt/pl-build-tools/bin/cmake'
special_flags = " -DCMAKE_CXX_FLAGS='-Wno-error=implicit-fallthrough -Wno-error=catch-value' "
elsif platform.name =~ /el-[67]|redhatfips-7|sles-12|ubuntu-18.04-amd64/
# use default that is pl-build-tools
else
# These platforms use the default OS toolchain, rather than pl-build-tools
Expand Down
14 changes: 11 additions & 3 deletions configs/components/leatherman.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@
elsif platform.is_windows?
pkg.build_requires 'cmake'
pkg.build_requires "pl-gettext-#{platform.architecture}"
elsif platform.name =~ /el-[67]|redhatfips-7|sles-1[12]|ubuntu-18.04-amd64/
elsif platform.name == 'sles-11-x86_64'
pkg.build_requires 'pl-cmake'
pkg.build_requires 'pl-gettext'
pkg.build_requires 'runtime'
elsif platform.name =~ /el-[67]|redhatfips-7|sles-12|ubuntu-18.04-amd64/
pkg.build_requires 'pl-cmake'
pkg.build_requires 'pl-gettext'
pkg.build_requires 'runtime'
Expand Down Expand Up @@ -90,7 +94,11 @@

# Use environment variable set in environment.bat to find locale files
leatherman_locale_var = "-DLEATHERMAN_LOCALE_VAR='PUPPET_DIR' -DLEATHERMAN_LOCALE_INSTALL='share/locale'"
elsif platform.name =~ /el-[67]|redhatfips-7|sles-1[12]|ubuntu-18.04-amd64/
elsif platform.name == 'sles-11-x86_64'
cmake = 'env LD_LIBRARY_PATH=/opt/pl-build-tools/lib64 /opt/pl-build-tools/bin/cmake'
toolchain = '-DCMAKE_TOOLCHAIN_FILE=/opt/pl-build-tools/pl-build-toolchain.cmake'
special_flags += " -DCMAKE_CXX_FLAGS='-Wno-deprecated-declarations -Wno-error=class-memaccess -Wno-error=ignored-qualifiers -Wno-error=catch-value' "
elsif platform.name =~ /el-[67]|redhatfips-7|sles-12|ubuntu-18.04-amd64/
toolchain = '-DCMAKE_TOOLCHAIN_FILE=/opt/pl-build-tools/pl-build-toolchain.cmake'
cmake = '/opt/pl-build-tools/bin/cmake'
special_flags += " -DCMAKE_CXX_FLAGS='-Wno-deprecated-declarations' "
Expand Down Expand Up @@ -150,7 +158,7 @@

pkg.check do
["LEATHERMAN_RUBY=#{settings[:libdir]}/$(shell #{ruby} -e 'print RbConfig::CONFIG[\"LIBRUBY_SO\"]') \
LD_LIBRARY_PATH=#{settings[:libdir]} LIBPATH=#{settings[:libdir]} #{test_locale} #{make} test ARGS=-V"]
LD_LIBRARY_PATH=/opt/pl-build-tools/lib64 LIBPATH=#{settings[:libdir]} #{test_locale} #{make} test ARGS=-V"]
end
end

Expand Down
4 changes: 3 additions & 1 deletion configs/components/pxp-agent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,10 @@
cmake = 'C:/ProgramData/chocolatey/bin/cmake.exe -G "MinGW Makefiles"'
toolchain = "-DCMAKE_TOOLCHAIN_FILE=#{settings[:tools_root]}/pl-build-toolchain.cmake"

elsif platform.name =~ /el-[67]|redhatfips-7|sles-1[12]|ubuntu-18.04-amd64/
elsif platform.name =~ /el-[67]|redhatfips-7|sles-12|ubuntu-18.04-amd64/
# use default that is pl-build-tools
elsif platform.name =~ /sles-11/
special_flags += "-DCMAKE_CXX_FLAGS='#{settings[:cflags]}' -DENABLE_CXX_WERROR=OFF"
else
# These platforms use the default OS toolchain, rather than pl-build-tools
cmake = 'cmake'
Expand Down
4 changes: 3 additions & 1 deletion configs/components/runtime.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
pkg.build_requires "pl-iconv-#{platform.architecture}"
pkg.build_requires "pl-libffi-#{platform.architecture}"
pkg.build_requires "pl-pdcurses-#{platform.architecture}"
elsif platform.name =~ /el-[67]|redhatfips-7|sles-1[12]|ubuntu-18.04-amd64/
elsif platform.name == 'sles-11-x86_64'
pkg.build_requires 'pl-gcc8'
elsif platform.name =~ /el-[67]|redhatfips-7|sles-12|ubuntu-18.04-amd64/
pkg.build_requires 'pl-gcc'
end
end
25 changes: 12 additions & 13 deletions configs/platforms/sles-11-x86_64.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,20 @@
plat.defaultdir "/etc/sysconfig"
plat.servicetype "sysv"

# plat.add_build_repository "http://osmirror.delivery.puppetlabs.net/sles-11-deps-x86_64/sles-11-deps-x86_64.repo"
# plat.add_build_repository "http://pl-build-tools.delivery.puppetlabs.net/yum/sles/11/x86_64/pl-build-tools-sles-11-x86_64.repo"
packages = %w[
aaa_base
libbz2-devel
make
pkgconfig
pl-autotools
pl-cmake
readline-devel
rsync
zlib-devel
plat.add_build_repository "http://osmirror.delivery.puppetlabs.net/sles-11-deps-x86_64/sles-11-deps-x86_64.repo"
plat.add_build_repository "http://pl-build-tools.delivery.puppetlabs.net/yum/sles/11/x86_64/pl-build-tools-sles-11-x86_64.repo"
packages = [
"aaa_base",
"libbz2-devel",
"pkgconfig",
"pl-autotools",
"pl-cmake",
"pl-gcc8",
"readline-devel",
"rsync",
"zlib-devel"
]
plat.install_build_dependencies_with "zypper -n --no-gpg-checks install -y"
plat.provision_with("zypper -n --no-gpg-checks install -y #{packages.join(' ')}")
# plat.provision_with "zypper install -y --oldpackage pl-cmake-3.2.3-13.sles11.x86_64"
plat.vmpooler_template "sles-11-x86_64"
end

0 comments on commit 0784b90

Please sign in to comment.