From 864365ad6c199dfe48ae40910884b6c6c4eac24f Mon Sep 17 00:00:00 2001 From: emilylange Date: Fri, 6 Dec 2024 20:24:46 +0100 Subject: [PATCH] chromium: remove ofborg maintainer ping workaround, use CODEOWNERS The workaround to have ofborg ping chromium and ungoogled-chromium maintainers when a change was only made to the upstream-info relied on string context. That string context was provided by the upstream-info being a nix file, not a json file, and then holding on to that string context using awkward attribute merges. It was intended as a quick fix until the handling of this would improve in ofborg itself and worked great. That was until very recently when we switched from the chromium release tarball to git source fetching in 8dd2f1add978a4747a5962f2874b8ad20f86b01c. Part of that change included going back from upstream-info.nix to upstream-info.json and with that losing the string context and the base on which this workaround used to work. But this is fine. A lot has happened in the meantime. CODEOWNERS was reimplemented and no longer requires every user listed in it to have write permissions to the repository (commit bit). Meaning we can accept that ofborg pings no longer work and instead rely on CODEOWNERS exclusively. It should, however, be noted that CODEOWNERS provide less granularity than ofborg, meaning we can no longer differentiate between ungoogled-chromium and chromium or even chromedriver. Previously, implementing the workaround that is now essentially reverted: 68c59791fb6644ac733d99d0147b09bce4cb8319 (cherry picked from commit 674835a9d98fd037c8f6ce1c954b5e07e56b0832) --- ci/OWNERS | 4 ++-- pkgs/applications/networking/browsers/chromium/browser.nix | 2 ++ pkgs/applications/networking/browsers/chromium/common.nix | 7 +------ pkgs/applications/networking/browsers/chromium/default.nix | 6 ------ 4 files changed, 5 insertions(+), 14 deletions(-) diff --git a/ci/OWNERS b/ci/OWNERS index 9265ae8bc83df..596cf711567db 100644 --- a/ci/OWNERS +++ b/ci/OWNERS @@ -198,8 +198,8 @@ nixos/modules/installer/tools/nix-fallback-paths.nix @NixOS/nix-team @raitobeza # Browsers /pkgs/applications/networking/browsers/firefox @mweinelt -/pkgs/applications/networking/browsers/chromium @emilylange -/nixos/tests/chromium.nix @emilylange +/pkgs/applications/networking/browsers/chromium @emilylange @networkException +/nixos/tests/chromium.nix @emilylange @networkException # Certificate Authorities pkgs/data/misc/cacert/ @ajs124 @lukegb @mweinelt diff --git a/pkgs/applications/networking/browsers/chromium/browser.nix b/pkgs/applications/networking/browsers/chromium/browser.nix index d4259c2895ad2..bdedac20c5ebd 100644 --- a/pkgs/applications/networking/browsers/chromium/browser.nix +++ b/pkgs/applications/networking/browsers/chromium/browser.nix @@ -84,6 +84,8 @@ mkChromiumDerivation (base: rec { homepage = if ungoogled then "https://github.com/ungoogled-software/ungoogled-chromium" else "https://www.chromium.org/"; + # Maintainer pings for this derivation are highly unreliable. + # If you add yourself as maintainer here, please also add yourself as CODEOWNER. maintainers = with lib.maintainers; if ungoogled then [ networkexception emilylange ] else [ networkexception emilylange ]; diff --git a/pkgs/applications/networking/browsers/chromium/common.nix b/pkgs/applications/networking/browsers/chromium/common.nix index 4a16de319a1e3..c0a661a860389 100644 --- a/pkgs/applications/networking/browsers/chromium/common.nix +++ b/pkgs/applications/networking/browsers/chromium/common.nix @@ -663,12 +663,7 @@ let } // lib.optionalAttrs (!isElectron) { inherit chromiumDeps npmDeps; }; - } - # overwrite `version` with the exact same `version` from the same source, - # except it internally points to `upstream-info.nix` for - # `builtins.unsafeGetAttrPos`, which is used by ofborg to decide - # which maintainers need to be pinged. - // builtins.removeAttrs upstream-info (builtins.filter (e: e != "version") (builtins.attrNames upstream-info)); + }; # Remove some extraAttrs we supplied to the base attributes already. in stdenv.mkDerivation (base // removeAttrs extraAttrs [ diff --git a/pkgs/applications/networking/browsers/chromium/default.nix b/pkgs/applications/networking/browsers/chromium/default.nix index ecce9b395a75d..73ce63d6f8bc9 100644 --- a/pkgs/applications/networking/browsers/chromium/default.nix +++ b/pkgs/applications/networking/browsers/chromium/default.nix @@ -178,9 +178,3 @@ in stdenv.mkDerivation { inherit sandboxExecutableName; }; } -# the following is a complicated and long-winded variant of -# `inherit (chromium.browser) version`, with the added benefit -# that it keeps the pointer to upstream-info.nix for -# builtins.unsafeGetAttrPos, which is what ofborg uses to -# decide which maintainers need to be pinged. -// builtins.removeAttrs chromium.browser (builtins.filter (e: e != "version") (builtins.attrNames chromium.browser))