From 3e5f76f99e0f089376d4586f00eaacd7f3a0c2f3 Mon Sep 17 00:00:00 2001 From: Kazunori Kimura Date: Fri, 26 Jan 2024 15:40:16 +0900 Subject: [PATCH 1/3] Replace removed function in patch for `assets::compile` `Dir.exists?(file_name) -> bool` have been deprecated since Ruby 2.1 and removed on Ruby 3.2. See https://bugs.ruby-lang.org/issues/17391 Replacement is `Dir.exist?(file_name) -> bool`. --- .../build/patches/0004-fix-raketask-gitlab-assets-compile.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/build/patches/0004-fix-raketask-gitlab-assets-compile.patch b/assets/build/patches/0004-fix-raketask-gitlab-assets-compile.patch index f03bf8e5..7563b75a 100644 --- a/assets/build/patches/0004-fix-raketask-gitlab-assets-compile.patch +++ b/assets/build/patches/0004-fix-raketask-gitlab-assets-compile.patch @@ -11,7 +11,7 @@ index b8a6e7018767..5096d81ea63f 100644 + # so do not remove the directory directly, empty instead + # Dir.glob("*") ignores dotfiles (even it is fine to remove here), so list up children manually + removal_targets = Dir.glob('app/assets/javascripts/locale/**/app.js') -+ if Dir.exists?(Tasks::Gitlab::Assets::PUBLIC_ASSETS_DIR) ++ if Dir.exist?(Tasks::Gitlab::Assets::PUBLIC_ASSETS_DIR) + removal_targets += Dir.children(Tasks::Gitlab::Assets::PUBLIC_ASSETS_DIR).map {|child| File.join(Tasks::Gitlab::Assets::PUBLIC_ASSETS_DIR, child)} + end + FileUtils.rm_rf(removal_targets, secure: true) From bebcc0507301e882cb8f8e8cd37229f34a0487bb Mon Sep 17 00:00:00 2001 From: Kazunori Kimura Date: Fri, 26 Jan 2024 15:42:54 +0900 Subject: [PATCH 2/3] Remove trailing whitespace in patch for `assets:compile` to suppress warning on build like below: Applying patch /etc/docker-gitlab/build/patches/0004-fix-raketask-gitlab-assets-compile.patch for gitlab-foss... :15: trailing whitespace. removal_targets += Dir.children(Tasks::Gitlab::Assets::PUBLIC_ASSETS_DIR).map {|child| File.join(Tasks::Gitlab::Assets::PUBLIC_ASSETS_DIR, child)} warning: 1 line adds whitespace errors. --- .../build/patches/0004-fix-raketask-gitlab-assets-compile.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/build/patches/0004-fix-raketask-gitlab-assets-compile.patch b/assets/build/patches/0004-fix-raketask-gitlab-assets-compile.patch index 7563b75a..a0877b83 100644 --- a/assets/build/patches/0004-fix-raketask-gitlab-assets-compile.patch +++ b/assets/build/patches/0004-fix-raketask-gitlab-assets-compile.patch @@ -12,7 +12,7 @@ index b8a6e7018767..5096d81ea63f 100644 + # Dir.glob("*") ignores dotfiles (even it is fine to remove here), so list up children manually + removal_targets = Dir.glob('app/assets/javascripts/locale/**/app.js') + if Dir.exist?(Tasks::Gitlab::Assets::PUBLIC_ASSETS_DIR) -+ removal_targets += Dir.children(Tasks::Gitlab::Assets::PUBLIC_ASSETS_DIR).map {|child| File.join(Tasks::Gitlab::Assets::PUBLIC_ASSETS_DIR, child)} ++ removal_targets += Dir.children(Tasks::Gitlab::Assets::PUBLIC_ASSETS_DIR).map {|child| File.join(Tasks::Gitlab::Assets::PUBLIC_ASSETS_DIR, child)} + end + FileUtils.rm_rf(removal_targets, secure: true) From b088bd3c9af5b886cc6c1c587e733c2f8b80e338 Mon Sep 17 00:00:00 2001 From: Kazunori Kimura Date: Tue, 28 Nov 2023 10:13:03 +0900 Subject: [PATCH 3/3] Update Ruby to 3.2.3 --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1462f0b7..07d93bf2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,8 +3,8 @@ FROM ubuntu:focal-20231211 ARG VERSION=16.7.4 ENV GITLAB_VERSION=${VERSION} \ - RUBY_VERSION=3.1.4 \ - RUBY_SOURCE_SHA256SUM="a3d55879a0dfab1d7141fdf10d22a07dbf8e5cdc4415da1bde06127d5cc3c7b6" \ + RUBY_VERSION=3.2.3 \ + RUBY_SOURCE_SHA256SUM="af7f1757d9ddb630345988139211f1fd570ff5ba830def1cc7c468ae9b65c9ba" \ GOLANG_VERSION=1.21.6 \ GITLAB_SHELL_VERSION=14.32.0 \ GITLAB_PAGES_VERSION=16.7.4 \