From 34a0c1438c6e32a6bcf69075867300bb95624776 Mon Sep 17 00:00:00 2001 From: Alexander Sieg Date: Tue, 31 Dec 2024 12:33:04 +0100 Subject: [PATCH 1/2] gitlab: update prometheus-client-mmap gem to fix aarch64 --- .../version-management/gitlab/rubyEnv/Gemfile | 2 +- .../version-management/gitlab/rubyEnv/Gemfile.lock | 7 ++++--- .../version-management/gitlab/rubyEnv/gemset.nix | 6 +++--- pkgs/applications/version-management/gitlab/update.py | 6 ++++++ pkgs/development/ruby-modules/gem-config/default.nix | 9 ++++++--- 5 files changed, 20 insertions(+), 10 deletions(-) diff --git a/pkgs/applications/version-management/gitlab/rubyEnv/Gemfile b/pkgs/applications/version-management/gitlab/rubyEnv/Gemfile index 5e5b17ead2edd..082319571f39f 100644 --- a/pkgs/applications/version-management/gitlab/rubyEnv/Gemfile +++ b/pkgs/applications/version-management/gitlab/rubyEnv/Gemfile @@ -424,7 +424,7 @@ gem 'snowplow-tracker', '~> 0.8.0' # rubocop:todo Gemfile/MissingFeatureCategory # Metrics gem 'webrick', '~> 1.8.1', require: false # rubocop:todo Gemfile/MissingFeatureCategory -gem 'prometheus-client-mmap', '~> 1.1', '>= 1.1.1', require: 'prometheus/client' # rubocop:todo Gemfile/MissingFeatureCategory +gem 'prometheus-client-mmap', '1.1.2', require: 'prometheus/client' # rubocop:todo Gemfile/MissingFeatureCategory # Event-driven reactor for Ruby # Required manually in config/initializers/require_async_gem diff --git a/pkgs/applications/version-management/gitlab/rubyEnv/Gemfile.lock b/pkgs/applications/version-management/gitlab/rubyEnv/Gemfile.lock index 2d125ee82500c..6f96ec131e56e 100644 --- a/pkgs/applications/version-management/gitlab/rubyEnv/Gemfile.lock +++ b/pkgs/applications/version-management/gitlab/rubyEnv/Gemfile.lock @@ -1436,7 +1436,8 @@ GEM coderay parser unparser - prometheus-client-mmap (1.1.1) + prometheus-client-mmap (1.1.2) + base64 rb_sys (~> 0.9.86) pry (0.14.2) coderay (~> 1.1) @@ -2226,7 +2227,7 @@ DEPENDENCIES pg_query (~> 5.1.0) png_quantizator (~> 0.2.1) premailer-rails (~> 1.12.0) - prometheus-client-mmap (~> 1.1, >= 1.1.1) + prometheus-client-mmap (= 1.1.2) pry-byebug pry-rails (~> 0.3.9) pry-shell (~> 0.6.4) @@ -2329,4 +2330,4 @@ DEPENDENCIES yajl-ruby (~> 1.4.3) BUNDLED WITH - 2.5.11 + 2.5.22 diff --git a/pkgs/applications/version-management/gitlab/rubyEnv/gemset.nix b/pkgs/applications/version-management/gitlab/rubyEnv/gemset.nix index bf1ce4c42b5e2..e4d9e1eac00e6 100644 --- a/pkgs/applications/version-management/gitlab/rubyEnv/gemset.nix +++ b/pkgs/applications/version-management/gitlab/rubyEnv/gemset.nix @@ -5063,15 +5063,15 @@ src: version = "0.1.0"; }; prometheus-client-mmap = { - dependencies = ["rb_sys"]; + dependencies = ["base64" "rb_sys"]; groups = ["default"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0vg47xx3wgg24snqc6ychb08mbcyrjmvxym9fg69cpa4xvj133fx"; + sha256 = "1dwvpxqj652c8r61q88s336vzf2h2akcijk9hmjp9jzlnhil44n4"; type = "gem"; }; - version = "1.1.1"; + version = "1.1.2"; }; pry = { dependencies = ["coderay" "method_source"]; diff --git a/pkgs/applications/version-management/gitlab/update.py b/pkgs/applications/version-management/gitlab/update.py index ee723769b7614..b6393ed9093f6 100755 --- a/pkgs/applications/version-management/gitlab/update.py +++ b/pkgs/applications/version-management/gitlab/update.py @@ -180,6 +180,12 @@ def update_rubyenv(): cwd=rubyenv_dir, ) + # update to 1.1.2 to fix https://gitlab.com/gitlab-org/ruby/gems/prometheus-client-mmap/-/issues/68 + subprocess.check_output( + ["sed", "-i", "s:'prometheus-client-mmap', '~> 1.1', '>= 1.1.1':'prometheus-client-mmap', '1.1.2':g", "Gemfile"], + cwd=rubyenv_dir, + ) + # Un-vendor sidekiq # # The sidekiq dependency was vendored to maintain compatibility with Redis 6.0 (as diff --git a/pkgs/development/ruby-modules/gem-config/default.nix b/pkgs/development/ruby-modules/gem-config/default.nix index b6542ebeccc29..f7039d7e92b62 100644 --- a/pkgs/development/ruby-modules/gem-config/default.nix +++ b/pkgs/development/ruby-modules/gem-config/default.nix @@ -321,9 +321,12 @@ in cp -R ext/fast_mmaped_file_rs $out ''; }; - hash = if lib.versionAtLeast attrs.version "1.1.1" - then "sha256-RsN5XWX7Mj2ORccM0eczY+44WXsbXNTnJVcCMvnOATk=" - else "sha256-XuQZPbFWqPHlrJvllkvLl1FjKeoAUbi8oKDrS2rY1KM="; + hash = if lib.versionAtLeast attrs.version "1.1.2" + then "sha256-pNzW2fQZDcuqu8apv3GU7lUC/H1cX5WRifBBQlbE8+s=" + else + if lib.versionAtLeast attrs.version "1.1.1" + then "sha256-RsN5XWX7Mj2ORccM0eczY+44WXsbXNTnJVcCMvnOATk=" + else "sha256-XuQZPbFWqPHlrJvllkvLl1FjKeoAUbi8oKDrS2rY1KM="; }; nativeBuildInputs = [ cargo From d2b0b70dab658751051914d55f5d965c9feb2d9a Mon Sep 17 00:00:00 2001 From: Alexander Sieg Date: Tue, 31 Dec 2024 13:09:45 +0100 Subject: [PATCH 2/2] Revert "nixosTests.gitlab: do not block nixos-unstable on aarch64" This reverts commit 055ed2091b3ebfc88c898d3d68ab873387a5ce8b. --- nixos/release-combined.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/release-combined.nix b/nixos/release-combined.nix index 6d2afade31a0c..3b1c85a441429 100644 --- a/nixos/release-combined.nix +++ b/nixos/release-combined.nix @@ -99,7 +99,7 @@ rec { (onFullSupported "nixos.tests.firewall") (onFullSupported "nixos.tests.fontconfig-default-fonts") - (onSystems [ "x86_64-linux" ] "nixos.tests.gitlab") # we lack energy to really debug aarch64 here + (onFullSupported "nixos.tests.gitlab") (onFullSupported "nixos.tests.gnome") (onFullSupported "nixos.tests.gnome-xorg") (onSystems [ "x86_64-linux" ] "nixos.tests.hibernate")