chromium,ungoogled-chromium: fix ofborg maintainer pings#245762
chromium,ungoogled-chromium: fix ofborg maintainer pings#245762emilylange merged 1 commit intoNixOS:masterfrom
Conversation
|
ofborg didn't ping for this PR either, because the change is a no-op. cc @primeos @thefloweringash @networkException @squalus @michaeladler |
c9fb56a to
96baaf3
Compare
|
Rebased to include #245710 (and resolved the merge conflict). @michaeladler, you reacted with 👍 on the initial PR comment. Does this mean you approve this fix? Any objections to merging? :) I will also need to manually backport this to 23.05. |
primeos
left a comment
There was a problem hiding this comment.
The changes look fine to me (although I cannot test/verify the result) - thanks for looking into this! :)
There was a problem hiding this comment.
Note: It's a bit unfortunate that this hack is required (twice) but I guess it should be fine.
96baaf3 to
932d09a
Compare
|
Testing this change isn't really straight forward, yeah. As mentioned in multiple places, ofborg uses Without this patch: ❯ nix repl -f "<nixpkgs>"
Welcome to Nix 2.15.1. Type :? for help.
Loading installable ''...
Added 19765 variables.
nix-repl> builtins.unsafeGetAttrPos "version" chromium
{ column = 10; file = "/nix/store/nhk2gnp8jf1xshlym3g63m6k7v35p21h-source/pkgs/applications/networking/browsers/chromium/default.nix"; line = 160; }
nix-repl> builtins.unsafeGetAttrPos "version" ungoogled-chromium
{ column = 10; file = "/nix/store/nhk2gnp8jf1xshlym3g63m6k7v35p21h-source/pkgs/applications/networking/browsers/chromium/default.nix"; line = 160; }Note that it does not return With this patch: ❯ nix repl -f .
Welcome to Nix 2.15.1. Type :? for help.
Loading installable ''...
Added 19832 variables.
nix-repl> builtins.unsafeGetAttrPos "version" chromium
{ column = 5; file = "/home/me/dev/NixOS/nixpkgs/pkgs/applications/networking/browsers/chromium/upstream-info.nix"; line = 46; }
nix-repl> builtins.unsafeGetAttrPos "version" ungoogled-chromium
{ column = 5; file = "/home/me/dev/NixOS/nixpkgs/pkgs/applications/networking/browsers/chromium/upstream-info.nix"; line = 63; }The actual ofborg thingy can be tested by running the following in a git clone of https://github.com/NixOS/ofborg -- instructions mostly copied from #219821 (comment) Pointing ofborg to the local nixpkgs checkout: diff --git a/ofborg/src/maintainers.nix b/ofborg/src/maintainers.nix
index c519725..dbc861e 100644
--- a/ofborg/src/maintainers.nix
+++ b/ofborg/src/maintainers.nix
@@ -1,6 +1,6 @@
{ changedattrsjson, changedpathsjson }:
let
- pkgs = import ./. {};
+ pkgs = import ../../../nixpkgs {};
changedattrs = builtins.fromJSON (builtins.readFile changedattrsjson);
changedpaths = builtins.fromJSON (builtins.readFile changedpathsjson);Populating the diff: Running the script: Without this PR, on the current nixpkgs master branch and telling ofborg that some change to the Which is why ofborg did not ping maintainers for version bumps in the past, at least those, that only touch the I am a quite tired; sorry if this doesn't make all that much sense. Footnotes |
michaeladler
left a comment
There was a problem hiding this comment.
If it works (and the order of the keys is preserved when dumping upstream-info.nix) then I'm fine with it :)
ofborg uses `builtins.unsafeGetAttrPos` internally, to figure out which
maintainers need to be pinged.
e.g:
`builtins.unsafeGetAttrPos "version" drv`
When using a `.json` file containing the version via `lib.importJSON`,
this will always return `null` and thus leading to no pings at all.
This commit works around this, resulting in properly working pings
for any changes to the upstream-info file.
A similar thing has been done for element-{web,desktop} in the past.
932d09a to
68c5979
Compare
|
^Manual backport in #246843 :) |
Description of changes
ofborg uses
builtins.unsafeGetAttrPosinternally, to figure out which maintainers need to be pinged.e.g:
builtins.unsafeGetAttrPos "version" drvWhen using a
.jsonfile containing the version vialib.importJSON, this will always returnnulland thus leading to no pings at all.This commit works around this, resulting in properly working pings for any changes to the upstream-info file.
A similar thing has been done for element-{web,desktop} in the past (#219821).
ofborg not pinging maintainers can be seen in #245572 and #245710
The ofborg code section in question is https://github.com/NixOS/ofborg/blob/released/ofborg/src/maintainers.nix#L50-L66
And yes, this should probably be fixed in ofborg in the long run, but for now, this works too.
Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Result of
nixpkgs-reviewrun on x86_64-linux 1