From 9d729367a98d791bc2b61ee36fc60411ae504e6a Mon Sep 17 00:00:00 2001 From: Shubham Shinde Date: Thu, 8 Feb 2024 19:07:45 +0530 Subject: [PATCH] (PA-6002) Add SLES-11 (Intel) support --- configs/components/cpp-hocon.rb | 2 +- configs/components/cpp-pcp-client.rb | 2 +- configs/components/leatherman.rb | 4 ++-- configs/components/pxp-agent.rb | 2 +- configs/platforms/sles-11-x86_64.rb | 25 +++++++++++++++++++++++++ configs/projects/pxp-agent.rb | 2 +- 6 files changed, 31 insertions(+), 6 deletions(-) create mode 100644 configs/platforms/sles-11-x86_64.rb diff --git a/configs/components/cpp-hocon.rb b/configs/components/cpp-hocon.rb index bff796e..f0825af 100644 --- a/configs/components/cpp-hocon.rb +++ b/configs/components/cpp-hocon.rb @@ -38,7 +38,7 @@ 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-12|ubuntu-18.04-amd64/ || + elsif platform.name =~ /el-[67]|redhatfips-7|sles-1[12]|ubuntu-18.04-amd64/ || platform.is_aix? toolchain = '-DCMAKE_TOOLCHAIN_FILE=/opt/pl-build-tools/pl-build-toolchain.cmake' cmake = '/opt/pl-build-tools/bin/cmake' diff --git a/configs/components/cpp-pcp-client.rb b/configs/components/cpp-pcp-client.rb index 8578246..0c69992 100644 --- a/configs/components/cpp-pcp-client.rb +++ b/configs/components/cpp-pcp-client.rb @@ -50,7 +50,7 @@ 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-12|ubuntu-18.04-amd64/ + elsif platform.name =~ /el-[67]|redhatfips-7|sles-1[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 diff --git a/configs/components/leatherman.rb b/configs/components/leatherman.rb index a590fea..19faa63 100644 --- a/configs/components/leatherman.rb +++ b/configs/components/leatherman.rb @@ -16,7 +16,7 @@ elsif platform.is_windows? pkg.build_requires 'cmake' pkg.build_requires "pl-gettext-#{platform.architecture}" - elsif platform.name =~ /el-[67]|redhatfips-7|sles-12|ubuntu-18.04-amd64/ + elsif platform.name =~ /el-[67]|redhatfips-7|sles-1[12]|ubuntu-18.04-amd64/ pkg.build_requires 'pl-cmake' pkg.build_requires 'pl-gettext' pkg.build_requires 'runtime' @@ -77,7 +77,7 @@ # 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-12|ubuntu-18.04-amd64/ || + elsif platform.name =~ /el-[67]|redhatfips-7|sles-1[12]|ubuntu-18.04-amd64/ || platform.is_aix? toolchain = '-DCMAKE_TOOLCHAIN_FILE=/opt/pl-build-tools/pl-build-toolchain.cmake' cmake = '/opt/pl-build-tools/bin/cmake' diff --git a/configs/components/pxp-agent.rb b/configs/components/pxp-agent.rb index 759c0c3..abc5c32 100644 --- a/configs/components/pxp-agent.rb +++ b/configs/components/pxp-agent.rb @@ -66,7 +66,7 @@ toolchain = "-DCMAKE_TOOLCHAIN_FILE=#{settings[:tools_root]}/pl-build-toolchain.cmake" special_flags += ' -DDYNAMICBASE=OFF' if platform.name =~ /windowsfips-2012r2/ - elsif platform.name =~ /el-[67]|redhatfips-7|sles-12|ubuntu-18.04-amd64/ + elsif platform.name =~ /el-[67]|redhatfips-7|sles-1[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 diff --git a/configs/platforms/sles-11-x86_64.rb b/configs/platforms/sles-11-x86_64.rb new file mode 100644 index 0000000..ef7f48d --- /dev/null +++ b/configs/platforms/sles-11-x86_64.rb @@ -0,0 +1,25 @@ +platform "sles-11-x86_64" do |plat| + plat.servicedir "/etc/init.d" + 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 = [ + "aaa_base", + "autoconf", + "automake", + "libbz2-devel", + "make", + "pkgconfig", + "pl-cmake", + "pl-gcc", + "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-gcc=4.8.2-1") + plat.vmpooler_template "sles-11-x86_64" +end diff --git a/configs/projects/pxp-agent.rb b/configs/projects/pxp-agent.rb index e1b603f..62e5023 100644 --- a/configs/projects/pxp-agent.rb +++ b/configs/projects/pxp-agent.rb @@ -29,7 +29,7 @@ proj.setting(:service_conf, File.join(proj.install_root, 'service_conf')) proj.component 'puppet-runtime' - proj.component 'runtime' if platform.name =~ /el-[67]|redhatfips-7|sles-12|ubuntu-18.04-amd64/ || !platform.is_linux? + proj.component 'runtime' if platform.name =~ /el-[67]|redhatfips-7|sles-1[12]|ubuntu-18.04-amd64/ || !platform.is_linux? proj.component 'leatherman' proj.component 'cpp-hocon'