From 15afd641d8251dbef21171df649c3e1c56eb55cd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Javier=20B=C3=A9rtoli?= Date: Wed, 9 Mar 2022 19:55:17 -0300 Subject: [PATCH] 18849: enforce RVM on Debian 10 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Arvados-DCO-1.1-Signed-off-by: Javier Bértoli --- arvados/osfingermap.yaml | 22 +++++++++++++++++++ .../integration/api/controls/packages_spec.rb | 15 ++++++++----- .../shell/controls/packages_spec.rb | 10 +++++---- test/salt/pillar/examples/nginx_passenger.sls | 2 +- 4 files changed, 38 insertions(+), 11 deletions(-) diff --git a/arvados/osfingermap.yaml b/arvados/osfingermap.yaml index b454916..d435767 100644 --- a/arvados/osfingermap.yaml +++ b/arvados/osfingermap.yaml @@ -23,3 +23,25 @@ Ubuntu-18.04: - python3-dev - ruby-dev - zlib1g-dev + +Debian-10: + ruby: + manage_ruby: true + use_rvm: true + + pkg: ruby-2.7.2 + gems_deps: + - curl + - g++ + - gcc + - git + - libcurl4 + - libcurl4-gnutls-dev + - libpam0g-dev + - libpq-dev + - libxml2 + - libxml2-dev + - make + - python3-dev + - ruby-dev + - zlib1g-dev diff --git a/test/integration/api/controls/packages_spec.rb b/test/integration/api/controls/packages_spec.rb index 969bf07..1799a4b 100644 --- a/test/integration/api/controls/packages_spec.rb +++ b/test/integration/api/controls/packages_spec.rb @@ -43,9 +43,10 @@ end control 'RVM ruby manager' do title 'should be installed' - only_if('Forced requirement for Centos-7 and Ubuntu-18.04') do + only_if('Forced requirement for Centos-7, Ubuntu-18.04 and Debian-10') do (os.redhat? and platform[:release].to_f.truncate == 7) or - (os.name == 'ubuntu' and platform[:release].to_f.truncate == 18) + (os.name == 'ubuntu' and platform[:release].to_f.truncate == 18) or + (os.name == 'debian' and platform[:release].to_f.truncate == 10) end describe command('/usr/local/rvm/bin/rvm list') do @@ -57,9 +58,10 @@ end control 'arvados cli gem' do title 'should be installed' - only_if('Skipped in Centos-7 and Ubuntu-18.04') do + only_if('Skipped in Centos-7, Ubuntu-18.04 and Debian-10') do !((os.redhat? and platform[:release].to_f.truncate == 7) or - (os.name == 'ubuntu' and platform[:release].to_f.truncate == 18)) + (os.name == 'ubuntu' and platform[:release].to_f.truncate == 18) or + (os.name == 'debian' and platform[:release].to_f.truncate == 10)) end describe gem('arvados-cli') do @@ -70,9 +72,10 @@ end control 'RVM arvados cli gem' do title 'should be installed' - only_if('Forced requirement for Centos-7 and Ubuntu-18.04') do + only_if('Forced requirement for Centos-7, Ubuntu-18.04 and Debian-10') do (os.redhat? and platform[:release].to_f.truncate == 7) or - (os.name == 'ubuntu' and platform[:release].to_f.truncate == 18) + (os.name == 'ubuntu' and platform[:release].to_f.truncate == 18) or + (os.name == 'debian' and platform[:release].to_f.truncate == 10) end describe gem('arvados-cli', '/usr/local/rvm/bin/rvm all do gem') do diff --git a/test/integration/shell/controls/packages_spec.rb b/test/integration/shell/controls/packages_spec.rb index ac58157..9d52c12 100644 --- a/test/integration/shell/controls/packages_spec.rb +++ b/test/integration/shell/controls/packages_spec.rb @@ -41,9 +41,10 @@ end control 'arvados shell gems' do title 'should be installed' - only_if('Skipped in Centos-7 and Ubuntu-18.04') do + only_if('Skipped in Centos-7, Ubuntu-18.04 and Debian-10') do !((os.redhat? and platform[:release].to_f.truncate == 7) or - (os.name == 'ubuntu' and platform[:release].to_f.truncate == 18)) + (os.name == 'ubuntu' and platform[:release].to_f.truncate == 18) or + (os.name == 'debian' and platform[:release].to_f.truncate == 10)) end describe gem('arvados-cli') do @@ -54,9 +55,10 @@ end control 'RVM arvados shell gems' do title 'should be installed' - only_if('Forced requirement for Centos-7 and Ubuntu-18.04') do + only_if('Forced requirement for Centos-7, Ubuntu-18.04 and Debian-10') do (os.redhat? and platform[:release].to_f.truncate == 7) or - (os.name == 'ubuntu' and platform[:release].to_f.truncate == 18) + (os.name == 'ubuntu' and platform[:release].to_f.truncate == 18) or + (os.name == 'debian' and platform[:release].to_f.truncate == 10) end describe gem('arvados-cli', '/usr/local/rvm/bin/rvm all do gem') do diff --git a/test/salt/pillar/examples/nginx_passenger.sls b/test/salt/pillar/examples/nginx_passenger.sls index 63ca497..33699cd 100644 --- a/test/salt/pillar/examples/nginx_passenger.sls +++ b/test/salt/pillar/examples/nginx_passenger.sls @@ -10,7 +10,7 @@ if grains.osfinger in ('CentOS Linux-7',) else '/usr/lib/nginx/modules/ngx_http_passenger_module.so' %} {%- set passenger_ruby = '/usr/local/rvm/rubies/ruby-2.7.2/bin/ruby' - if grains.osfinger in ('CentOS Linux-7', 'Ubuntu-18.04',) else + if grains.osfinger in ('CentOS Linux-7', 'Ubuntu-18.04', 'Debian-10') else '/usr/bin/ruby' %} ### NGINX -- 2.30.2