Skip to content

Commit

Permalink
Upgrade EL builds to use Ruby 3.0 (OSC#2053)
Browse files Browse the repository at this point in the history
* Update EL builds to Ruby 3.0
Fixes OSC#2044

* Remove deprecated Socket.gethostbyname
Fixes OSC#2048

* Update ood_packaging
  • Loading branch information
treydock authored May 26, 2022
1 parent 0397394 commit d42656d
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RUN dnf -y install https://yum.osc.edu/ondemand/latest/ondemand-release-web-late
RUN dnf -y update && \
dnf install -y dnf-utils && \
dnf config-manager --set-enabled powertools && \
dnf -y module enable nodejs:14 ruby:2.7 && \
dnf -y module enable nodejs:14 ruby:3.0 && \
dnf install -y \
file \
lsof \
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ RUN cp /etc/yum.repos.d/ondemand-web.repo /etc/yum.repos.d/ondemand-nightly-web.
RUN dnf -y update && \
dnf install -y dnf-utils && \
dnf config-manager --set-enabled powertools && \
dnf -y module enable nodejs:14 ruby:2.7 && \
dnf -y module enable nodejs:14 ruby:3.0 && \
dnf install -y ondemand ondemand-dex && \
dnf clean all && rm -rf /var/cache/dnf/*

Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ gem 'rake'
gem 'dotenv', '~> 2.1'

group :package do
gem 'ood_packaging', '~> 0.1.4'
gem 'ood_packaging', '~> 0.2.0'
end

group :test do
Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ GEM
oga (3.3)
ast
ruby-ll (~> 2.1)
ood_packaging (0.1.4)
ood_packaging (0.2.0)
rake (~> 13.0.1)
open_uri_redirections (0.2.1)
parallel (1.21.0)
Expand Down Expand Up @@ -186,7 +186,7 @@ DEPENDENCIES
beaker-docker (~> 1.0.1)
beaker-rspec
dotenv (~> 2.1)
ood_packaging (~> 0.1.4)
ood_packaging (~> 0.2.0)
rake
rspec
rubocop
Expand Down
2 changes: 1 addition & 1 deletion ood-portal-generator/lib/ood_portal_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def debian?
end

def fqdn
Socket.gethostbyname(Socket.gethostname).first
Addrinfo.getaddrinfo(Socket.gethostname, nil, :INET, :STREAM, nil, Socket::AI_CANONNAME).first.canonname
end

# Determine dex username
Expand Down
28 changes: 14 additions & 14 deletions packaging/rpm/ondemand.spec
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
%define git_tag_minus_v %(echo %{git_tag} | sed -r 's/^v//')
%define major_version %(echo %{git_tag_minus_v} | cut -d. -f1)
%define minor_version %(echo %{git_tag_minus_v} | cut -d. -f2)
%define runtime_version %{major_version}.%{minor_version}-1
%define next_major_version %(echo $((%{major_version}+1))).0
%define next_minor_version %{major_version}.%(echo $((%{minor_version}+1)))
%define runtime_version %{major_version}.%{minor_version}.1
%define runtime_release 1
%define runtime_version_full %{runtime_version}-%{runtime_release}%{?dist}
%define selinux_policy_ver %(rpm --qf "%%{version}-%%{release}" -q selinux-policy)
%global selinux_module_version %{package_version}.%{package_release}
%global gem_home %{scl_ondemand_core_gem_home}/%{version}
Expand Down Expand Up @@ -47,24 +47,24 @@ Source2: ondemand-selinux.fc
# node.js packages used in the apps
AutoReqProv: no

BuildRequires: ondemand-runtime >= %{runtime_version}, ondemand-runtime < %{next_major_version}, ondemand-runtime < %{next_minor_version}
BuildRequires: ondemand-scldevel >= %{runtime_version}, ondemand-scldevel < %{next_major_version}, ondemand-scldevel < %{next_minor_version}
BuildRequires: ondemand-build >= %{runtime_version}, ondemand-build < %{next_major_version}, ondemand-build < %{next_minor_version}
BuildRequires: ondemand-ruby >= %{runtime_version}, ondemand-ruby < %{next_major_version}, ondemand-ruby < %{next_minor_version}
BuildRequires: ondemand-nodejs >= %{runtime_version}, ondemand-nodejs < %{next_major_version}, ondemand-nodejs < %{next_minor_version}
BuildRequires: ondemand-runtime = %{runtime_version_full}
BuildRequires: ondemand-scldevel = %{runtime_version_full}
BuildRequires: ondemand-build = %{runtime_version_full}
BuildRequires: ondemand-ruby = %{runtime_version_full}
BuildRequires: ondemand-nodejs = %{runtime_version_full}
BuildRequires: rsync
BuildRequires: git
BuildRequires: python3

Requires: git
Requires: sudo, lsof, cronie, wget, curl, make, rsync, file, libxml2, libxslt, zlib, lua-posix, diffutils
Requires: python3
Requires: ondemand-apache >= %{runtime_version}, ondemand-apache < %{next_major_version}, ondemand-apache < %{next_minor_version}
Requires: ondemand-nginx = 1.20.2-1.p6.0.14.ood%{major_version}.%{minor_version}%{?dist}
Requires: ondemand-passenger = 6.0.14-1.ood%{major_version}.%{minor_version}%{?dist}
Requires: ondemand-ruby >= %{runtime_version}, ondemand-ruby < %{next_major_version}, ondemand-ruby < %{next_minor_version}
Requires: ondemand-nodejs >= %{runtime_version}, ondemand-nodejs < %{next_major_version}, ondemand-nodejs < %{next_minor_version}
Requires: ondemand-runtime >= %{runtime_version}, ondemand-runtime < %{next_major_version}, ondemand-runtime < %{next_minor_version}
Requires: ondemand-apache = %{runtime_version_full}
Requires: ondemand-nginx = 1.20.2-1.p6.0.14.ood%{runtime_version}%{?dist}
Requires: ondemand-passenger = 6.0.14-1.ood%{runtime_version}%{?dist}
Requires: ondemand-ruby = %{runtime_version_full}
Requires: ondemand-nodejs = %{runtime_version_full}
Requires: ondemand-runtime = %{runtime_version_full}
Requires: %{gems_name}

BuildRequires: systemd
Expand Down
2 changes: 1 addition & 1 deletion spec/e2e/e2e_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def bootstrap_repos
if host_inventory['platform_version'] =~ /^7/
repos << 'centos-release-scl yum-plugin-priorities'
else
on hosts, 'dnf -y module enable ruby:2.7'
on hosts, 'dnf -y module enable ruby:3.0'
on hosts, 'dnf -y module enable nodejs:14'
end
elsif host_inventory['platform'] == 'ubuntu'
Expand Down

0 comments on commit d42656d

Please sign in to comment.