Skip to content

Commit

Permalink
Upgrade amzn2023 to NodeJS 20
Browse files Browse the repository at this point in the history
  • Loading branch information
treydock committed Nov 9, 2024
1 parent 78d173d commit 7ded8c9
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lib/ood_packaging/build_box/docker-image/Dockerfile.erb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ RUN dnf config-manager --set-enabled crb && dnf clean all && rm -rf /var/cache/d
<% 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 \
RUN dnf install -y --allowerasing systemd sudo which wget \
<%= ruby_package %> <%= nodejs_package %> \
gcc-c++ gcc make patch shadow-utils gnupg2 \
rpm-build rpmdevtools rpm-sign <%= dist =~ /^el/ ? 'scl-utils-build' : '' %> && \
dnf clean all && rm -rf /var/cache/dnf/*
Expand Down
10 changes: 10 additions & 0 deletions lib/ood_packaging/utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,20 @@ def ruby_version
'3.3'
end

def ruby_package
return "ruby#{ruby_version}" if dist == 'amzn2023'
'ruby'
end

def nodejs_version
'20'
end

def nodejs_package
return "nodejs#{nodejs_version}" if dist == 'amzn2023'
'nodejs'
end

def ctr_scripts_dir
'/ondemand-packaging'
end
Expand Down
4 changes: 2 additions & 2 deletions packages/ondemand-runtime/rpm/ondemand-runtime.spec
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
%endif
%if 0%{?amzn} == 2023
%global ruby ruby3.2
%global nodejs nodejs
%global nodejs nodejs20
%global apache httpd
%global ruby_version 3.2
%endif
Expand Down Expand Up @@ -95,7 +95,7 @@ Requires: %{nodejs} >= 1:20.0, %{nodejs} < 1:21.0
Requires: npm
%endif
%if 0%{?amzn} == 2023
Requires: %{nodejs} >= 1:18.0, %{nodejs} < 1:19.0
Requires: %{nodejs} >= 1:20.0, %{nodejs} < 1:21.0
Requires: npm
%endif

Expand Down

0 comments on commit 7ded8c9

Please sign in to comment.