Skip to content

Commit

Permalink
Update to NodeJS 18 and Ruby 3.1 where possible (#248)
Browse files Browse the repository at this point in the history
* Update to NodeJS 18 where possible
Updates ondemand-runtime to 3.1.3
Updates ondemand-release packages for Ubuntu

* Depend on Ruby 3.1 for el8 and el9

* Update passenger to depend on newer runtime
  • Loading branch information
treydock authored Jun 21, 2023
1 parent 2ad5f40 commit f98625f
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
ood_packaging (0.10.0)
ood_packaging (0.11.0)
rake (~> 13.0.1)

GEM
Expand Down
4 changes: 3 additions & 1 deletion lib/ood_packaging/build_box/docker-image/Dockerfile.erb
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@ RUN dnf update -y && dnf clean all && rm -rf /var/cache/dnf/*
RUN dnf install -y dnf-utils <%= dist =~ /^el/ ? 'epel-release' : '' %> langpacks-en glibc-langpack-en && dnf clean all && rm -rf /var/cache/dnf/*
<% if dist == 'el8' -%>
RUN dnf config-manager --set-enabled powertools && dnf clean all && rm -rf /var/cache/dnf/*
RUN dnf module enable -y ruby:<%= ruby_version %> nodejs:<%= nodejs_version %> && dnf clean all && rm -rf /var/cache/dnf/*
<% elsif dist == 'el9' -%>
RUN dnf config-manager --set-enabled crb && dnf clean all && rm -rf /var/cache/dnf/*
<% end -%>
<% if dist =~ /^el/ -%>
RUN dnf module enable -y ruby:<%= ruby_version %> nodejs:<%= nodejs_version %> && dnf clean all && rm -rf /var/cache/dnf/*
<% end -%>
RUN dnf install -y --allowerasing systemd ruby nodejs sudo which wget \
gcc-c++ gcc make patch shadow-utils gnupg2 \
rpm-build rpmdevtools rpm-sign <%= dist =~ /^el/ ? 'scl-utils-build' : '' %> && \
Expand Down
6 changes: 4 additions & 2 deletions lib/ood_packaging/utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,17 @@ def ondemand_rpm_repo_baseurl
end

def ruby_version
'3.0'
return '3.0' if dist == 'el7'

'3.1'
end

def scl_ruby
"rh-ruby#{ruby_version.tr('.', '')}"
end

def nodejs_version
'14'
'18'
end

def ctr_scripts_dir
Expand Down
6 changes: 3 additions & 3 deletions lib/ood_packaging/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

# Version code for OodPackaging
module OodPackaging
VERSION = '0.10.0'
VERSION = '0.11.0'
PACKAGE_VERSION = {
'ondemand-release' => {
'(ubuntu|debian)' => '3.1.0',
'default' => '3.1'
},
'ondemand-release-latest' => {
'(ubuntu|debian)' => '1',
'(ubuntu|debian)' => '2',
'default' => '1-8'
},
'ondemand-runtime' => '3.1.2',
'ondemand-runtime' => '3.1.3',
'scl-utils' => '2.0.3',
'passenger' => '6.0.17',
'cjose' => '0.6.1',
Expand Down
2 changes: 1 addition & 1 deletion packages/ondemand-release-latest/deb/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export DH_VERBOSE = 1
export CODENAME = $(shell lsb_release -sc)
export WEB_DESTDIR = $(CURDIR)/debian/ondemand-release-web-latest
export DEB_BUILD_OPTIONS=nocheck
export NODEREPO=node_14.x
export NODEREPO=node_18.x

%:
dh $@
Expand Down
2 changes: 1 addition & 1 deletion packages/ondemand-release/deb/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export DEB_BUILD_OPTIONS=nocheck
export VERSION_MAJOR = $(shell echo "$(VERSION)" | cut -d'.' -f1)
export VERSION_MINOR = $(shell echo "$(VERSION)" | cut -d'.' -f2)
export REPO = $(VERSION_MAJOR).$(VERSION_MINOR)
export NODEREPO=node_14.x
export NODEREPO=node_18.x

%:
dh $@
Expand Down
6 changes: 3 additions & 3 deletions packages/ondemand-runtime/rpm/ondemand-runtime.spec
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ packages depending on %{scl} Software Collection.
%package -n ondemand-ruby
Summary: Meta package for pulling in SCL Ruby %{ruby}
%if 0%{?rhel} >= 8
Requires: %{ruby} >= 3.0, %{ruby} < 3.1
Requires: %{ruby} >= 3.1, %{ruby} < 3.2
Requires: rubygem-rake
Requires: rubygem-bundler >= 2.1
Requires: ruby-devel
Expand Down Expand Up @@ -105,11 +105,11 @@ Meta package for pulling in SCL Ruby %{ruby}
%package -n ondemand-nodejs
Summary: Meta package for pulling in SCL nodejs %{nodejs}
%if 0%{?rhel} == 9
Requires: %{nodejs} >= 1:16.0, %{nodejs} < 1:18.0
Requires: %{nodejs} >= 1:18.0, %{nodejs} < 1:19.0
Requires: npm
%endif
%if 0%{?rhel} == 8
Requires: %{nodejs} >= 1:14.0, %{nodejs} < 1:16.0
Requires: %{nodejs} >= 1:18.0, %{nodejs} < 1:19.0
Requires: npm
%endif
%if 0%{?rhel} == 7
Expand Down
2 changes: 1 addition & 1 deletion packages/passenger/rpm/passenger.spec
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
%define release_version %{package_release}
%define ngix_release_version 1

%define runtime_version 3.1.2
%define runtime_version 3.1.3

%global nginx_user %{?scl_prefix}nginx
%global nginx_group %{nginx_user}
Expand Down
2 changes: 1 addition & 1 deletion release-manifest.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
major: '3.1'
full: '3.1.0'
runtime: '3.1.2'
runtime: '3.1.3'

# release
ondemand-release:
Expand Down
2 changes: 1 addition & 1 deletion spec/ood_packaging/ood_packaging_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
end

it 'gets package version for dist ubuntu-20.04' do
expect(described_class.package_version('ondemand-release-latest', 'ubuntu-20.04')).to eq('1')
expect(described_class.package_version('ondemand-release-latest', 'ubuntu-20.04')).to eq('2')
end
end

0 comments on commit f98625f

Please sign in to comment.