From f98625f61ab8a527a4e3e57c669fcd4721ba5085 Mon Sep 17 00:00:00 2001 From: treydock Date: Wed, 21 Jun 2023 18:11:33 -0400 Subject: [PATCH] Update to NodeJS 18 and Ruby 3.1 where possible (#248) * 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 --- Gemfile.lock | 2 +- lib/ood_packaging/build_box/docker-image/Dockerfile.erb | 4 +++- lib/ood_packaging/utils.rb | 6 ++++-- lib/ood_packaging/version.rb | 6 +++--- packages/ondemand-release-latest/deb/debian/rules | 2 +- packages/ondemand-release/deb/debian/rules | 2 +- packages/ondemand-runtime/rpm/ondemand-runtime.spec | 6 +++--- packages/passenger/rpm/passenger.spec | 2 +- release-manifest.yaml | 2 +- spec/ood_packaging/ood_packaging_spec.rb | 2 +- 10 files changed, 19 insertions(+), 15 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index e6eb711..ac3476f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - ood_packaging (0.10.0) + ood_packaging (0.11.0) rake (~> 13.0.1) GEM diff --git a/lib/ood_packaging/build_box/docker-image/Dockerfile.erb b/lib/ood_packaging/build_box/docker-image/Dockerfile.erb index 2a77b35..3964ea5 100644 --- a/lib/ood_packaging/build_box/docker-image/Dockerfile.erb +++ b/lib/ood_packaging/build_box/docker-image/Dockerfile.erb @@ -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' : '' %> && \ diff --git a/lib/ood_packaging/utils.rb b/lib/ood_packaging/utils.rb index 8e8fe44..5a7476d 100644 --- a/lib/ood_packaging/utils.rb +++ b/lib/ood_packaging/utils.rb @@ -63,7 +63,9 @@ def ondemand_rpm_repo_baseurl end def ruby_version - '3.0' + return '3.0' if dist == 'el7' + + '3.1' end def scl_ruby @@ -71,7 +73,7 @@ def scl_ruby end def nodejs_version - '14' + '18' end def ctr_scripts_dir diff --git a/lib/ood_packaging/version.rb b/lib/ood_packaging/version.rb index 7cbbda3..3907a66 100644 --- a/lib/ood_packaging/version.rb +++ b/lib/ood_packaging/version.rb @@ -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', diff --git a/packages/ondemand-release-latest/deb/debian/rules b/packages/ondemand-release-latest/deb/debian/rules index 8f75687..352b434 100755 --- a/packages/ondemand-release-latest/deb/debian/rules +++ b/packages/ondemand-release-latest/deb/debian/rules @@ -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 $@ diff --git a/packages/ondemand-release/deb/debian/rules b/packages/ondemand-release/deb/debian/rules index 13ea056..0dc7f9d 100755 --- a/packages/ondemand-release/deb/debian/rules +++ b/packages/ondemand-release/deb/debian/rules @@ -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 $@ diff --git a/packages/ondemand-runtime/rpm/ondemand-runtime.spec b/packages/ondemand-runtime/rpm/ondemand-runtime.spec index a37e43b..a49bb98 100644 --- a/packages/ondemand-runtime/rpm/ondemand-runtime.spec +++ b/packages/ondemand-runtime/rpm/ondemand-runtime.spec @@ -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 @@ -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 diff --git a/packages/passenger/rpm/passenger.spec b/packages/passenger/rpm/passenger.spec index 05071fb..50b2599 100644 --- a/packages/passenger/rpm/passenger.spec +++ b/packages/passenger/rpm/passenger.spec @@ -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} diff --git a/release-manifest.yaml b/release-manifest.yaml index 9aaf30d..9271c2d 100644 --- a/release-manifest.yaml +++ b/release-manifest.yaml @@ -1,6 +1,6 @@ major: '3.1' full: '3.1.0' -runtime: '3.1.2' +runtime: '3.1.3' # release ondemand-release: diff --git a/spec/ood_packaging/ood_packaging_spec.rb b/spec/ood_packaging/ood_packaging_spec.rb index 6800a1e..176f975 100644 --- a/spec/ood_packaging/ood_packaging_spec.rb +++ b/spec/ood_packaging/ood_packaging_spec.rb @@ -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