From 2fc9d058a77cc8ff59514fc5377325ad0d5c7988 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Wed, 7 Feb 2024 15:03:24 -0800 Subject: [PATCH] Use gitlab-ruby-shadow gem instead of shadow source Both the upstream project (https://github.com/apalmblad/ruby-shadow) and the Chef fork (https://github.com/chef/ruby-shadow/tree/lcg/ruby-3.0) have gone unmaintained. We've added CI, fixed Ruby 3.2 issues, and published our own gem in https://gitlab.com/gitlab-org/ruby/gems/ruby-shadow/-/merge_requests/1, so let's use that now. Changelog: changed --- .custom_sources.yml | 3 --- config/software/ruby-shadow.rb | 21 ++++++++------------- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/.custom_sources.yml b/.custom_sources.yml index c6f8f6293..1bd361caa 100644 --- a/.custom_sources.yml +++ b/.custom_sources.yml @@ -154,6 +154,3 @@ ncurses: pgbouncer: remote: "git@dev.gitlab.org:omnibus-mirror/pgbouncer.git" alternative: "https://gitlab.com/gitlab-org/build/omnibus-mirror/pgbouncer.git" -ruby-shadow: - remote: "git@dev.gitlab.org:omnibus-mirror/ruby-shadow.git" - alternative: "https://gitlab.com/gitlab-org/build/omnibus-mirror/ruby-shadow.git" diff --git a/config/software/ruby-shadow.rb b/config/software/ruby-shadow.rb index 80b255cb3..697d64a31 100644 --- a/config/software/ruby-shadow.rb +++ b/config/software/ruby-shadow.rb @@ -16,10 +16,8 @@ # name 'ruby-shadow' -# From https://github.com/chef/chef/blob/3c35bd0e1d17a5bfd779fab3cc7860ea1923dec6/Gemfile#L41-L44 -version = Gitlab::Version.new('ruby-shadow', 'e408599fdba93340500dad8922e9ca75072879de') -default_version version.print(false) -display_version version.print(false) + +default_version '2.5.1' license 'Apache-2.0' license_file 'LICENSE' @@ -28,16 +26,13 @@ skip_transitive_dependency_licensing true dependency 'rubygems' -source git: version.remote - -relative_path 'ruby-shadow' - build do env = with_standard_compiler_flags(with_embedded_path) - # Remove existing built gems in case they exist in the current dir - delete 'ruby-shadow-*.gem' - - gem 'build ruby-shadow.gemspec', env: env - gem 'install ruby-shadow-*.gem --no-document', env: env + gem 'install gitlab-ruby-shadow' \ + " --clear-sources" \ + " -s https://rubygems.org" \ + " --version '#{version}'" \ + " --bindir '#{install_dir}/embedded/bin'" \ + ' --no-document', env: env end