From d15b4020f5d06cb340b7a506d7f086ea8465a85f Mon Sep 17 00:00:00 2001 From: treydock Date: Thu, 2 Nov 2023 10:31:03 -0400 Subject: [PATCH] Update nodejs repo to use nodistro and new GPG key (#262) Fixes #261 --- Gemfile.lock | 2 +- lib/ood_packaging/build_box/docker-image/Dockerfile.erb | 4 ++-- lib/ood_packaging/version.rb | 6 +++--- packages/ondemand-release-latest/deb/debian/rules | 4 ++-- packages/ondemand-release/deb/debian/rules | 4 ++-- release-manifest.yaml | 6 +++--- spec/ood_packaging/ood_packaging_spec.rb | 2 +- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 05c366b..7d5e400 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - ood_packaging (0.13.4) + ood_packaging (0.13.5) 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 6a2e4c7..bd19c12 100644 --- a/lib/ood_packaging/build_box/docker-image/Dockerfile.erb +++ b/lib/ood_packaging/build_box/docker-image/Dockerfile.erb @@ -43,8 +43,8 @@ RUN apt update -y && apt install -y apt-transport-https ca-certificates \ sudo rake wget curl ruby bundler && \ apt clean all -y <% if ! ['bookworm'].include?(codename) && arch != 'ppc64le' %> -RUN echo "deb https://deb.nodesource.com/node_<%= nodejs_version %>.x <%= codename %> main" > /etc/apt/sources.list.d/nodesource.list -RUN curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | gpg --dearmor > /etc/apt/trusted.gpg.d/nodesource.gpg +RUN echo "deb https://deb.nodesource.com/node_<%= nodejs_version %>.x nodistro main" > /etc/apt/sources.list.d/nodesource.list +RUN curl -s https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor > /etc/apt/trusted.gpg.d/nodesource.gpg <% end %> <% end -%> RUN ln -s /dev/null /etc/systemd/system/proc-sys-fs-binfmt_misc.automount diff --git a/lib/ood_packaging/version.rb b/lib/ood_packaging/version.rb index d3e2ce5..2b770b5 100644 --- a/lib/ood_packaging/version.rb +++ b/lib/ood_packaging/version.rb @@ -2,14 +2,14 @@ # Version code for OodPackaging module OodPackaging - VERSION = '0.13.4' + VERSION = '0.13.5' PACKAGE_VERSION = { 'ondemand-release' => { - '(ubuntu|debian)' => '3.1.0', + '(ubuntu|debian)' => '3.1.1', 'default' => '3.1' }, 'ondemand-release-latest' => { - '(ubuntu|debian)' => '2', + '(ubuntu|debian)' => '3', 'default' => '1-8' }, 'ondemand-runtime' => '3.1.3', diff --git a/packages/ondemand-release-latest/deb/debian/rules b/packages/ondemand-release-latest/deb/debian/rules index f541254..42471a5 100755 --- a/packages/ondemand-release-latest/deb/debian/rules +++ b/packages/ondemand-release-latest/deb/debian/rules @@ -23,8 +23,8 @@ override_dh_auto_install: # Debian 12 (bookworm) has NodeJS 18 in OS repos ifeq ($(CODENAME),bookworm) else - echo "deb https://deb.nodesource.com/$(NODEREPO) $(CODENAME) main" > $(WEB_DESTDIR)/etc/apt/sources.list.d/nodesource.list - curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | gpg --dearmor > $(WEB_DESTDIR)/etc/apt/trusted.gpg.d/nodesource.gpg + echo "deb https://deb.nodesource.com/$(NODEREPO) nodistro main" > $(WEB_DESTDIR)/etc/apt/sources.list.d/nodesource.list + curl -s https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor > $(WEB_DESTDIR)/etc/apt/trusted.gpg.d/nodesource.gpg endif override_dh_builddeb: diff --git a/packages/ondemand-release/deb/debian/rules b/packages/ondemand-release/deb/debian/rules index 10ffc8a..e299d85 100755 --- a/packages/ondemand-release/deb/debian/rules +++ b/packages/ondemand-release/deb/debian/rules @@ -26,8 +26,8 @@ override_dh_auto_install: # Debian 12 (bookworm) has NodeJS 18 in OS repos ifeq ($(CODENAME),bookworm) else - echo "deb https://deb.nodesource.com/$(NODEREPO) $(CODENAME) main" > $(WEB_DESTDIR)/etc/apt/sources.list.d/nodesource.list - curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | gpg --dearmor > $(WEB_DESTDIR)/etc/apt/trusted.gpg.d/nodesource.gpg + echo "deb https://deb.nodesource.com/$(NODEREPO) nodistro main" > $(WEB_DESTDIR)/etc/apt/sources.list.d/nodesource.list + curl -s https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor > $(WEB_DESTDIR)/etc/apt/trusted.gpg.d/nodesource.gpg endif override_dh_builddeb: diff --git a/release-manifest.yaml b/release-manifest.yaml index de11e0a..db114c1 100644 --- a/release-manifest.yaml +++ b/release-manifest.yaml @@ -10,9 +10,9 @@ ondemand-release: versions: - '{major}-1' # deb package - - '{major}.0-focal' - - '{major}.0-jammy' - - '{major}.0-bookworm' + - '{major}.1-focal' + - '{major}.1-jammy' + - '{major}.1-bookworm' # web cjose: diff --git a/spec/ood_packaging/ood_packaging_spec.rb b/spec/ood_packaging/ood_packaging_spec.rb index 176f975..2fb8300 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('2') + expect(described_class.package_version('ondemand-release-latest', 'ubuntu-20.04')).to eq('3') end end