emacsPackages.ws-butler: avoid fetchFromSavannah#477666
emacsPackages.ws-butler: avoid fetchFromSavannah#477666jian-lin merged 1 commit intoNixOS:masterfrom
fetchFromSavannah#477666Conversation
| ws-butler = super.ws-butler.overrideAttrs (old: { | ||
| # work around https://github.com/NixOS/nixpkgs/issues/436534 | ||
| src = pkgs.fetchFromSavannah { | ||
| repo = "emacs/nongnu"; | ||
| inherit (old.src) rev outputHash outputHashAlgo; | ||
| }; | ||
| }); |
There was a problem hiding this comment.
This won't work. We need to fix it or use another workaround.
I have the following error to build ws-butler.
It works for you probably because you already have the src FOD in the nix store. If that's true, try to add the --rebuild flag and you'll get the error.
nix build -f . emacs-pgtk.pkgs.ws-butler -L
these 2 derivations will be built:
/nix/store/7h1cl12ipzf2ri6my2115cgk0yi6q351-nongnu-9ee5a76.drv
/nix/store/jm5z0pn80zcnbnyc7x6lhhi2xfx7kbwp-emacs-ws-butler-20250310.205.drv
building '/nix/store/7h1cl12ipzf2ri6my2115cgk0yi6q351-nongnu-9ee5a76.drv'...
nongnu> structuredAttrs is enabled
nongnu> exporting https://git.savannah.gnu.org/git/emacs/nongnu.git (rev 9ee5a7657a22e836618813c2e2b64a548d27d2ff) into /nix/store/4cmfwrxnib7bpil5maqm6yk5hr6f6iqg-nongnu-9ee5a76
nongnu> Initialized empty Git repository in /nix/store/4cmfwrxnib7bpil5maqm6yk5hr6f6iqg-nongnu-9ee5a76/.git/
nongnu> error: Server does not allow request for unadvertised object 9ee5a7657a22e836618813c2e2b64a548d27d2ff
nongnu> ERROR: `git fetch' failed.
nongnu> This might be due to the dumb transfer protocol not supporting shallow fetch or no-tag cloning. Trying with `--tags' and without `--depth=1'...
nongnu> remote: Counting objects: 569800, done.
nongnu> remote: Compressing objects: 100% (193314/193314), done.
nongnu> remote: Total 569800 (delta 371837), reused 566055 (delta 368737)
nongnu> Receiving objects: 100% (569800/569800), 413.47 MiB | 9.81 MiB/s, done.
nongnu> Resolving deltas: 100% (371837/371837), done.
nongnu> error: Could not read 2a59ce05bd0a86db1911f07adb942f10b8540614
nongnu> fatal: Failed to traverse parents of commit b1c16e50e93c662a12c49ac8f18b607656238361
nongnu> error: https://git.savannah.gnu.org/git/emacs/nongnu.git did not send all necessary objects
nongnu> Unable to checkout 9ee5a7657a22e836618813c2e2b64a548d27d2ff from https://git.savannah.gnu.org/git/emacs/nongnu.git.
There was a problem hiding this comment.
It turns out that removing this overrideAttrs and updating its url to the new one https://https.git.savannah.gnu.org/git/elpa/nongnu.git fixes it. So we should update the url in upstream melpa/melpaand the change will reaches Nixpkgs after the next elisp bump. Before that, we can optionally add the following override to update url locally in Nixpkgs. Could you do those two PRs?
ws-butler = super.ws-butler.overrideAttrs (old: {
# TODO remove this when not needed
src = old.src.override {
url = "https://https.git.savannah.gnu.org/git/elpa/nongnu.git";
};
});
There was a problem hiding this comment.
There was a problem hiding this comment.
That's funny because the build works fine for me ...
What is the final take on it? Should we remove the override and fix the URL upstream?
There was a problem hiding this comment.
(I just saw your comment on why it works for me, but not for others, thanks).
There was a problem hiding this comment.
What is the final take on it? Should we remove the override and fix the URL upstream?
Yes
@jian-lin and I met halfway on this and kept |
(I wanted to comment on this previously but forgot 😅)
The situation has changed: savannah disabled their cgit snapshot service for many (all?) repos about a month ago. (related nix-community/emacs-overlay#524) So I would not say it is usable as is currently. As a result, now I think we should remove it. |
|
I have removed I still need to fix the |
|
It wouldn't be good to remove |
|
OK, I can split this up but running out of time. I am not angry if you want to take over. |
|
|
||
| fetchFromBitbucket = callPackage ../build-support/fetchbitbucket { }; | ||
|
|
||
| fetchFromSavannah = callPackage ../build-support/fetchsavannah { }; |
There was a problem hiding this comment.
jian-lin
left a comment
There was a problem hiding this comment.
I guess this also merits an entry in the breaking changes Discourse thread. What are your opinions?
I think adding an alias which throws should be enough.
It wouldn't be good to remove fetchFromSavannah here, this is something handled in a separate PR for organization.
I think removing fetchFromSavannah in this PR isn't a big deal, it is acceptable. Of course, doing it in another PR is better.
| ws-butler = super.ws-butler.overrideAttrs (old: { | ||
| # work around https://github.com/NixOS/nixpkgs/issues/436534 | ||
| src = pkgs.fetchFromSavannah { | ||
| repo = "emacs/nongnu"; | ||
| inherit (old.src) rev outputHash outputHashAlgo; | ||
| }; | ||
| }); |
There was a problem hiding this comment.
What is the final take on it? Should we remove the override and fix the URL upstream?
Yes
|
Re: @jian-lin
My concern is that we don't have all the facts about savannah organized here and I don't want to bog down this original build fix with discussions on the fetcher. It'd be better to handle the removal in a separate PR so we could consolidate discussion there and get this PR moving without it. Also @dschrempf mentioned not having time to dedicate to this I presume, so I also want to respect that wish. Much easier to negotiate a build fix than a standard library removal. |
|
Thanks for the clarification. I agree with you now. |
|
@normalcea go ahead. If you wish, you can cherry pick the PR removing the fetcher, but no need to to so. |
|
As an addendum, this PR should be backported, but there's also the question of whether we'd want to backport a future fetchFromSavannah removal since it's not going to be functional in stable and so the question is how to communicate that, something that's going to take up too much time here. |
|
In that case @dschrempf can you force push removing fetchFromSavannah: remove? I have your patch saved. |
Instead, update upstream URL.
|
I have replaced the override with the one fixing the URL. Building works for me, even with |
| src = pkgs.fetchFromSavannah { | ||
| repo = "emacs/nongnu"; | ||
| inherit (old.src) rev outputHash outputHashAlgo; | ||
| # TODO: Remove override when URL was updated in MELPA. |
There was a problem hiding this comment.
Ideally we should put the MELPA PR in this comment. But it will be removed in the next elisp bump so not a big deal.
|
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin release-25.11
git worktree add -d .worktree/backport-477666-to-release-25.11 origin/release-25.11
cd .worktree/backport-477666-to-release-25.11
git switch --create backport-477666-to-release-25.11
git cherry-pick -x efb7f2ae14222a57f3615c44444e222134287655 |
|
This issue was fixed in MELPA: Good time to test #473079 by the way :) |
Avoid usage of
fetchFromSavannahforws-butler. (Simply remove the override; this works for me).This may fix #436534, although I am not sure if it resolves the root cause of the issue.
@jian-lin @normalcea
Should we remove
fetchFromSavannahaltogether? It is not used anymore after this PR (but may be used downstream).Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.Add a 👍 reaction to pull requests you find important.