Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop EoL Puppet 5 #166

Merged
merged 4 commits into from
Jan 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 1 addition & 19 deletions manifests/dependencies/centos.pp
Original file line number Diff line number Diff line change
@@ -1,24 +1,6 @@
# Install packages needed by RVM on RedHat systems when not using autolibs
class rvm::dependencies::centos {
$version = $facts['os']['name'] ? {
'Amazon' => '6.x',
default => $facts['os']['release']['full'],
}

case $version {
/^[67]\..*/: {
ensure_packages(['libcurl-devel'])
}
/^5\..*/: {
ensure_packages(['autoconf'])
ensure_packages(['curl-devel'])
}
default: {
ensure_packages(['curl-devel'])
}
}

ensure_packages(['which','gcc','gcc-c++','make','gettext-devel','expat-devel','zlib-devel','openssl-devel',
'perl','cpio','gettext-devel','wget','bzip2','libxml2','libxml2-devel','libxslt','libxslt-devel',
'readline-devel','patch','git','libyaml-devel','libffi-devel','libtool','bison'])
'readline-devel','patch','git','libyaml-devel','libffi-devel','libtool','bison', 'libcurl-devel'])
}
14 changes: 1 addition & 13 deletions manifests/passenger/dependencies/centos.pp
Original file line number Diff line number Diff line change
@@ -1,16 +1,4 @@
# Package dependencies for Passenger on RedHat
class rvm::passenger::dependencies::centos {
$version = $facts['os']['name'] ? {
'Amazon' => '6.x',
default => $facts['os']['release']['full'],
}

case $version {
/^[67]\..*/: {
ensure_packages(['libcurl-devel'])
}
default: {
ensure_packages(['curl-devel'])
}
}
ensure_packages(['libcurl-devel'])
}
21 changes: 5 additions & 16 deletions metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,36 +22,24 @@
{
"operatingsystem": "RedHat",
"operatingsystemrelease": [
"4",
"5",
"6",
"7"
]
},
{
"operatingsystem": "CentOS",
"operatingsystemrelease": [
"4",
"5",
"6",
"7"
]
},
{
"operatingsystem": "OracleLinux",
"operatingsystemrelease": [
"4",
"5",
"6",
"7"
]
},
{
"operatingsystem": "Scientific",
"operatingsystemrelease": [
"4",
"5",
"6",
"7"
]
},
Expand All @@ -64,14 +52,15 @@
{
"operatingsystem": "Debian",
"operatingsystemrelease": [
"6",
"7"
"9",
"10"
]
},
{
"operatingsystem": "Ubuntu",
"operatingsystemrelease": [
"12.04"
"18.04",
"20.04"
]
},
{
Expand Down Expand Up @@ -115,7 +104,7 @@
"requirements": [
{
"name": "puppet",
"version_requirement": ">=3.0.0"
"version_requirement": ">= 6.1.0 < 7.0.0"
}
]
}
14 changes: 2 additions & 12 deletions spec/classes/dependencies_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,8 @@
it { is_expected.to contain_package('which') }
it { is_expected.to contain_package('gcc') }
it { is_expected.not_to contain_package('build-essential') }
case os_facts[:operatingsystemmajrelease]
when '5'
if %w[CentOS RedHat].include? os_facts[:operatingsystem]
it { is_expected.to contain_package('autoconf') } # rubocop:disable RSpec/RepeatedExample
it { is_expected.to contain_package('curl-devel') }
it { is_expected.not_to contain_package('libcurl-devel') }
end
when '6', '7'
it { is_expected.to contain_package('libcurl-devel') }
it { is_expected.not_to contain_package('autoconf') }
it { is_expected.not_to contain_package('curl-devel') }
end
it { is_expected.to contain_package('libcurl-devel') }
it { is_expected.not_to contain_package('autoconf') }
when 'Debian'
it { is_expected.to contain_package('autoconf') } # rubocop:disable RSpec/RepeatedExample
it { is_expected.to contain_package('build-essential') }
Expand Down