From f3ab09fe4e946ba0f9877b81ddb39d528dadf443 Mon Sep 17 00:00:00 2001 From: Tom Hubrecht Date: Tue, 28 Nov 2023 20:29:08 +0100 Subject: [PATCH] feat(ds-fr): Add custom patches --- machines/compute01/ds-fr/package/default.nix | 24 ++++++++++++++--- machines/compute01/ds-fr/package/meta.nix | 4 +-- .../compute01/ds-fr/package/rubyEnv/Gemfile | 1 + .../ds-fr/package/rubyEnv/Gemfile.lock | 12 ++++++--- .../ds-fr/package/rubyEnv/gemset.nix | 27 +++++++++++++------ 5 files changed, 50 insertions(+), 18 deletions(-) diff --git a/machines/compute01/ds-fr/package/default.nix b/machines/compute01/ds-fr/package/default.nix index 0d0942c..e99ec6e 100644 --- a/machines/compute01/ds-fr/package/default.nix +++ b/machines/compute01/ds-fr/package/default.nix @@ -1,6 +1,6 @@ -{ lib, stdenv, fetchFromGitHub, fetchYarnDeps, yarn, fixup_yarn_lock, nodejs -, ruby_3_2, bundlerEnv, logDir ? "/var/log/ds-fr", dataDir ? "/var/lib/ds-fr" -, initialDeploymentDate ? "17941030" }: +{ lib, stdenv, fetchpatch, fetchFromGitHub, fetchYarnDeps, yarn, fixup_yarn_lock +, nodejs, ruby_3_2, bundlerEnv, logDir ? "/var/log/ds-fr" +, dataDir ? "/var/lib/ds-fr", initialDeploymentDate ? "17941030" }: let pname = "ds-fr"; @@ -51,7 +51,23 @@ let patches = [ # Disable functionnalities as we only precompile assets ./patches/build.patch - ]; + ] ++ (builtins.map ({ id, hash ? lib.fakeHash }: + fetchpatch { + url = + "https://git.dgnum.eu/DGNum/demarches-normaliennes/commit/${id}.patch"; + inherit hash; + }) [ + # remplacement l'arrache de quelques logos vers versions DGNum + { + id = "05d34a880ebb34265ebbcac0a83625b3a976c348"; + hash = "sha256-3VTBom8Lz6F/NXvjLzdhBddXS5FerV5eNHUkDPBDeD8="; + } + # ajout des NDD usuels ENS et DGNum pour autoriser les changements d'adresse mail + { + id = "bc4742aaacb174a55a08baae5f354ada3fba4577"; + hash = "sha256-LShcRzj/lnFQyJtc9+RxNQq8tsCcdYrwhe2BjqLr1pQ="; + } + ]); OTP_SECRET_KEY = "precompile_placeholder"; SECRET_KEY_BASE = "precompile_placeholder"; diff --git a/machines/compute01/ds-fr/package/meta.nix b/machines/compute01/ds-fr/package/meta.nix index 4fe7f66..02f2fcb 100644 --- a/machines/compute01/ds-fr/package/meta.nix +++ b/machines/compute01/ds-fr/package/meta.nix @@ -1,5 +1,5 @@ { - version = "9a5e4d4ea587b86ac06f9e515d07ac2fa04f1838"; - src-hash = "sha256-MxuuX+UM5zUExqIBDR1rZiQGEC4j+LiMbKUWEHc2zb4="; + version = "2023-11-27-01"; + src-hash = "sha256-epYBG15Wu84Lpwqle5naRTXW/tp+emgbAza5/8fM5TI="; deps-hash = "sha256-kg9AuJE/5TzA51/LTJ94P3x+5mQ1LpGLz7xJ4AgcQLk="; } diff --git a/machines/compute01/ds-fr/package/rubyEnv/Gemfile b/machines/compute01/ds-fr/package/rubyEnv/Gemfile index e4d859b..b53c139 100644 --- a/machines/compute01/ds-fr/package/rubyEnv/Gemfile +++ b/machines/compute01/ds-fr/package/rubyEnv/Gemfile @@ -84,6 +84,7 @@ gem 'sassc-rails' # Use SCSS for stylesheets gem 'sentry-delayed_job' gem 'sentry-rails' gem 'sentry-ruby' +gem 'sentry-sidekiq' gem 'sib-api-v3-sdk' gem 'sidekiq' gem 'skylight' diff --git a/machines/compute01/ds-fr/package/rubyEnv/Gemfile.lock b/machines/compute01/ds-fr/package/rubyEnv/Gemfile.lock index a85c792..0bd3fe8 100644 --- a/machines/compute01/ds-fr/package/rubyEnv/Gemfile.lock +++ b/machines/compute01/ds-fr/package/rubyEnv/Gemfile.lock @@ -397,7 +397,7 @@ GEM railties (>= 4) request_store (~> 1.0) logstash-event (1.2.02) - loofah (2.21.4) + loofah (2.22.0) crass (~> 1.0.2) nokogiri (>= 1.12.0) mail (2.8.1) @@ -444,7 +444,7 @@ GEM net-protocol netrc (0.11.0) nio4r (2.5.9) - nokogiri (1.15.4) + nokogiri (1.15.5) mini_portile2 (~> 2.8.2) racc (~> 1.4) open4 (1.3.4) @@ -497,7 +497,7 @@ GEM pundit (2.2.0) activesupport (>= 3.0.0) raabro (1.4.0) - racc (1.7.1) + racc (1.7.3) rack (2.2.8) rack-attack (6.5.0) rack (>= 1.0, < 3) @@ -559,7 +559,7 @@ GEM thor (~> 1.0) zeitwerk (~> 2.5) rainbow (3.1.1) - rake (13.0.6) + rake (13.1.0) rake-progressbar (0.0.5) rb-fsevent (0.11.2) rb-inotify (0.10.1) @@ -682,6 +682,9 @@ GEM sentry-ruby (~> 5.9.0) sentry-ruby (5.9.0) concurrent-ruby (~> 1.0, >= 1.0.2) + sentry-sidekiq (5.9.0) + sentry-ruby (~> 5.9.0) + sidekiq (>= 3.0) shoulda-matchers (4.5.1) activesupport (>= 4.2.0) sib-api-v3-sdk (7.4.0) @@ -921,6 +924,7 @@ DEPENDENCIES sentry-delayed_job sentry-rails sentry-ruby + sentry-sidekiq shoulda-matchers sib-api-v3-sdk sidekiq diff --git a/machines/compute01/ds-fr/package/rubyEnv/gemset.nix b/machines/compute01/ds-fr/package/rubyEnv/gemset.nix index e113323..3c4082e 100644 --- a/machines/compute01/ds-fr/package/rubyEnv/gemset.nix +++ b/machines/compute01/ds-fr/package/rubyEnv/gemset.nix @@ -1554,10 +1554,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0d5p9vg2qkqfy60i93mpd3b25kw4bdxfai034y5a94pxp5fws61c"; + sha256 = "1zkjqf37v2d7s11176cb35cl83wls5gm3adnfkn2zcc61h3nxmqh"; type = "gem"; }; - version = "2.21.4"; + version = "2.22.0"; }; mail = { dependencies = ["mini_mime" "net-imap" "net-pop" "net-smtp"]; @@ -1805,10 +1805,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0k9w2z0953mnjrsji74cshqqp08q7m1r6zhadw1w0g34xzjh3a74"; + sha256 = "004ip9x9281fxhpipwi8di1sb1dnabscq9dy1p3cxgdwbniqqi12"; type = "gem"; }; - version = "1.15.4"; + version = "1.15.5"; }; open4 = { groups = ["default" "development" "test"]; @@ -2047,10 +2047,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "11v3l46mwnlzlc371wr3x6yylpgafgwdf0q7hc7c1lzx6r414r5g"; + sha256 = "01b9662zd2x9bp4rdjfid07h09zxj7kvn7f5fghbqhzc625ap1dp"; type = "gem"; }; - version = "1.7.1"; + version = "1.7.3"; }; rack = { groups = ["default" "development" "test"]; @@ -2231,10 +2231,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "15whn7p9nrkxangbs9hh75q585yfn66lv0v2mhj6q6dl6x8bzr2w"; + sha256 = "1ilr853hawi09626axx0mps4rkkmxcs54mapz9jnqvpnlwd3wsmy"; type = "gem"; }; - version = "13.0.6"; + version = "13.1.0"; }; rake-progressbar = { groups = ["default"]; @@ -2740,6 +2740,17 @@ }; version = "5.9.0"; }; + sentry-sidekiq = { + dependencies = ["sentry-ruby" "sidekiq"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1z5q9rb924qarh2sfl6zqgrg7yam1k5zqdr7qg3gqfzn7aylp11i"; + type = "gem"; + }; + version = "5.9.0"; + }; shoulda-matchers = { dependencies = ["activesupport"]; groups = ["test"];