diff --git a/manifests/dependencies/centos.pp b/manifests/dependencies/centos.pp index 756e71b1..30212123 100644 --- a/manifests/dependencies/centos.pp +++ b/manifests/dependencies/centos.pp @@ -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']) } diff --git a/manifests/passenger/dependencies/centos.pp b/manifests/passenger/dependencies/centos.pp index 1f0b1dfe..9241dc07 100644 --- a/manifests/passenger/dependencies/centos.pp +++ b/manifests/passenger/dependencies/centos.pp @@ -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']) } diff --git a/metadata.json b/metadata.json index a4c555c7..3e09cfd9 100644 --- a/metadata.json +++ b/metadata.json @@ -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" ] }, @@ -64,14 +52,15 @@ { "operatingsystem": "Debian", "operatingsystemrelease": [ - "6", - "7" + "9", + "10" ] }, { "operatingsystem": "Ubuntu", "operatingsystemrelease": [ - "12.04" + "18.04", + "20.04" ] }, { @@ -115,7 +104,7 @@ "requirements": [ { "name": "puppet", - "version_requirement": ">=3.0.0" + "version_requirement": ">= 6.1.0 < 7.0.0" } ] } diff --git a/spec/classes/dependencies_spec.rb b/spec/classes/dependencies_spec.rb index 3ddd43c9..738869b1 100644 --- a/spec/classes/dependencies_spec.rb +++ b/spec/classes/dependencies_spec.rb @@ -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') }