This is an automated email from the ASF dual-hosted git repository.
sekikn pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bigtop.git
The following commit(s) were added to refs/heads/master by this push:
new d9541643d BIGTOP-4064. Fix Bigtop toolchain to work with Puppet 3.x.
(#1238)
d9541643d is described below
commit d9541643d112284910c9771e6df58b9841efe803
Author: Masatake Iwasaki <[email protected]>
AuthorDate: Thu Feb 29 10:18:22 2024 +0900
BIGTOP-4064. Fix Bigtop toolchain to work with Puppet 3.x. (#1238)
* BIGTOP-4064. Fix Bigtop toolchain to work with Puppet 3.x.
* removed duplicate conditions and limited scope to major version 9.
* updated conditionals for RedHat variants.
* fixed invalid comment.
---
bigtop_toolchain/manifests/packages.pp | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/bigtop_toolchain/manifests/packages.pp
b/bigtop_toolchain/manifests/packages.pp
index 5f8d62ad8..a2004bec8 100644
--- a/bigtop_toolchain/manifests/packages.pp
+++ b/bigtop_toolchain/manifests/packages.pp
@@ -70,12 +70,16 @@ class bigtop_toolchain::packages {
"yasm"
]
- if (/redhat|centos|rocky/ in downcase($operatingsystem) and
Integer($operatingsystemmajrelease) >= 9) {
- $pkgs = $_pkgs + ['cmake']
- } elsif ($operatingsystem == 'Fedora' or $operatingsystemmajrelease !~
/^[0-7]$/) {
+ if ($operatingsystem == 'Fedora') {
$pkgs = concat($_pkgs, ["python2-devel", "libtirpc-devel", "cmake"])
- } else {
- $pkgs = concat($_pkgs, ["python-devel", "cmake3"])
+ } else { # RedHat, CentOS, Rocky
+ if (0 <= versioncmp($operatingsystemmajrelease, '9')) {
+ $pkgs = concat($_pkgs, ["libtirpc-devel", "cmake"])
+ } elsif (0 == versioncmp($operatingsystemmajrelease, '8')) {
+ $pkgs = concat($_pkgs, ["python2-devel", "libtirpc-devel", "cmake"])
+ } elsif (0 == versioncmp($operatingsystemmajrelease, '7')) {
+ $pkgs = concat($_pkgs, ["python-devel", "cmake3"])
+ }
}
}
/(?i:(SLES|opensuse))/: { $pkgs = [
@@ -400,8 +404,8 @@ class bigtop_toolchain::packages {
# download python 2.7.14 for openEuler docker slaves
# and RHEL9 based distros
- if $operatingsystem == 'openEuler'
- or (/redhat|centos|rocky/ in $operatingsystem and
Integer($operatingsystemmajrelease) >= 9) {
+ if ($operatingsystem == 'openEuler' or
+ ($osfamily == 'RedHat' and $operatingsystem != 'Fedora' and 0 <=
versioncmp($operatingsystemmajrelease, '9'))) {
exec { "download_python2.7":
cwd => "/usr/src",
command => "/usr/bin/wget
https://www.python.org/ftp/python/2.7.14/Python-2.7.14.tgz
--no-check-certificate && /usr/bin/mkdir Python-2.7.14 && /bin/tar -xvzf
Python-2.7.14.tgz -C Python-2.7.14 --strip-components=1 && cd Python-2.7.14",