fetchFromSavannah: deprecate#435964
Conversation
d5a45bc to
f8d6258
Compare
There was a problem hiding this comment.
fetchfromsavannah currently is not widely used in Nixpkgs. However, as I mentioned before, we, Nixpkgs Emacs ecosystem maintainers, plan to use fetchfromsavannah to re-write (non-)GNU (devel-)ELPA package generation for reproducibility. fetchfromsavannah will be used by about 1500 elisp packages after the re-write. It will be used to fetch tarballs of arbitrary commit of elisp packages in https://cgit.git.savannah.gnu.org/cgit/emacs/nongnu.git/ and https://git.savannah.gnu.org/cgit/emacs/elpa.git/ .
Given this potential use case of fetchfromsavannah, do you still think removing it is a good idea? If so, what is the alternative of fetchfromsavannah?
There was a problem hiding this comment.
I think the Emacs team then can have their own internal fetchFromSavannah equivalent that they use for elisp package generation as you've said here.
I'm not entirely against using Savannah's cgit snapshot feature in this way at all (outside of general savannah stability concerns). I think removing fetchFromSavannah usage tree-wide and then re-implementing for this purpose would make the Emacs team's work easier since they don't have to worry about breaking the interface for other package consumers (both in nixpkgs and out of it) anymore and can focus on Emacs' needs.
In short, I think this PR would actually aid in this endeavor since its not a nixpkgs wide fetcher anymore that has to stay backwards compatible.
There was a problem hiding this comment.
I agree with @normalcea about vendoring a specific variant for emacs use.
There was a problem hiding this comment.
I think the Emacs team then can have their own internal
fetchFromSavannahequivalent that they use for elisp package generation
I think we all agree that fetchFromSavannah should only be used when necessary. What we do not agree is how to achieve this goal. Instead of removing fetchFromSavannah and then re-introducing it somewhere else, I propose keeping fetchFromSavannah and modifying its doc to tell users to only use it when necessary. Sharing is good and vendoring is bad.
philiptaron
left a comment
There was a problem hiding this comment.
I'd love to merge most of the changes in this PR in their own precursor PRs. Let's do that then focus on the deprecation/removal solely in this PR.
There was a problem hiding this comment.
I agree with @normalcea about vendoring a specific variant for emacs use.
|
Re @normalcea "similar" from the doc is quite open to interpretation. As I said above, we need to improve the doc. BTW, I do not think "similar" means other fetchers should also support fallback from For fetchers that do not have the Re renaming "snapshot" does not add more meaning, I think, because In addition, if we do that rename, what should be the new implementation of Re @philiptaron's first thought I am not sure if you have read https://www.mail-archive.com/bug-gnulib%40gnu.org/msg48636.html or not. My conclusion after reading that is savannah only disables cgit snapshots when savannah is under DDoS attack or for some specific repos. Cgit snapshot is an interface and In addition, I do not quite understand @philiptaron's second thought since I am not a native English speaker. So I won't comment on that. Conclusion: extending doc of
|
When needing to pass args such as
Snapshot can add meaning by setting that this is fetching a snapshot offered by Savannah rather than being the best effort general-purpose fetcher from savannah which is competing with
There is no new implementation, this is still a deprecation in the sense that it is a symbolic deprecation. Savannah's cgit instance and their canonical savannah urls are not related by any sort of pattern we can take advantage of so it's difficult to extend
I don't think going down this route would be helpful in the long-term and it's also not the approach I want to take with fetcher documentation. For example "how" does one know when to prefer mirrors or fetchgit and "what" is a snapshot referring to (since it still leaves out the fact that these are served by their cgit instance). However, I agree that these sorts of recommendations about when to use certain fetchers are also needed. Re: @philiptaron I also am in the same boat as @jian-lin in your second point (I'm a native english speaker so don't feel bad jian-lin for not understanding), you did say it was a collection of conflicting thoughts. I'm interested to hear your opinion specifically on the effects of renaming the savannah fetcher (allowing it to be shared with out-of-tree) while also implicitly discouraging its use as a general purpose fetcher via a rename. At the very least I strongly agree that the documentation for the fetchers has room for improvement. I personally prefer if the fetchers were more verbose and technical so that one does not ever have the need to read the implementation to understand how to use the fetcher. But I also don't want to go down the route of ( ## `fetchFromSourcehut` {#fetchfromsourcehut}
This is used with sourcehut repositories. Similar to `fetchFromGitHub` above,
it expects `owner`, `repo`, `rev` and `hash`, but don't forget the tilde (~)
in front of the username! Expected arguments also include `vc` ("git" (default)
or "hg"), `domain` and `fetchSubmodules`.
If `fetchSubmodules` is `true`, `fetchFromSourcehut` uses `fetchgit`
or `fetchhg` with `fetchSubmodules` or `fetchSubrepos` set to `true`,
respectively. Otherwise, the fetcher uses `fetchzip`. |
@jian-lin's ❌ vetoing. I think we don't deprecate.
|
My mind has also changed, echoing what @philiptaron mentioned, all in-tree uses of |
|
From #477666 it stands to reason that the Savannah admins have disabled cgit snapshotting. Guix1 for example, shows the "Download' section in the tags header but clicking on it leads you to the revision status rather than a download link. Grub2 is the same way, Emacs3 too. Re-opening this PR, glad I didn't delete the patches. But now the question is that a nixpkgs fetcher is in a non-working state, so this deprecation will have to be backported to 25.11 from the looks of it. This makes me think instead of outright removal, a deprecation is more warranted in the off-chance that the Savannah administrators decide to re-enable the feature or that there exists a savannah package that still has snapshots or snapshots are re-enabled for some packages but not all. I can't find an official announcement of this change, finding a response from the Savannah admins would be helpful. Footnotes
|
619431c to
4e4f235
Compare
|
As I said, I agree with the deprecation or removal now since the situation has changed.
I do not think it is a "have to". Quite the opposite, the deprecation does not seem to be a qualified backport according to https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#changes-acceptable-for-releases.
It would be good to ask Savannah admins about the current state and future plan of cgit snapshot. Would you like to do it? |
|
I found this thread1 which was made relatively recently (dated December of last year), here's the relevant snippet I pulled out:
It seems like the admin consensus is that downstream packagers really shouldn't be relying on snapshots. @jian-lin if you would like to email them for more details or reply to this email thread you can do it on behalf of nixpkgs but I think they made their position clear enough already.
There's no word for word on what to do for fetchers, but my intention is for the deprecation to act as a "warning sign" to downstream consumers in stable since the functionality of the fetcher no longer is guaranteed. If we were removing the codepath entirely then I would agree that it wouldn't be appropriate to backport since it would crash downstream evaluations but a deprecation shouldn't do that. I'm all ears for suggestions on how else to do this properly. Footnotes |
philiptaron
left a comment
There was a problem hiding this comment.
I don't think we should backport but I do think we should merge given the message above.
jian-lin
left a comment
There was a problem hiding this comment.
Generally LGTM
I think the commits organization can be improve. Currently the removal of manual section and the changes of redirection are in separated commits, which is not atomic. IMHO, just 1 commit is enough.
4e4f235 to
cbde561
Compare
|
Re: @jian-lin Squashed the doc removal and redirection into one commit, they are related changes so they should be together. |
There was a problem hiding this comment.
LGTM, thanks!
One small thing is that GitHub only knows Co-authored-by: instead of Co-developed-by:.
In addition, I do not quite get why you separate the code change and its corresponding doc change into two commits. However, this does not affect my approval since @philiptaron has approved already.
cbde561 to
5d85c19
Compare
|
Re: @jian-lin The choice of separation was probably when this PR was a draft and I split the changes into each commit, I squashed all the changes and fixed the "authored by" lines, also adding you as co-author if you want that. |
The Savannah administrators do not want package maintainers to use cgit snapshots due to putting strain on the servers and have disabled cgit snapshots for most if not all of their repositories. See: https://lists.gnu.org/archive/html/savannah-hackers/2025-12/msg00014.html Co-authored-by: Philip Taron <[email protected]> Co-authored-by: LIN, Jian <[email protected]>
5d85c19 to
03b2128
Compare
Context
fetchFromSavannahis a fetcher which interpolates its arguments into a URL to be used byfetchzipto download a CGit snapshot from GNU Savannah's cgit instance.Most Savannah and GNU software is available through archive mirrors which are enumerated in nixpkgs via
"mirror://"and is used for the majority of GNU/Savannah packages in nixpkgs and in other distributions.I also updated the link for the savannah fetcher in #427024
The Issue
Doing a naive grep of the nixpkgs source checkout,
fetchFromSavannahis only used in a total of 5 packages. With single digit usage and no discernible tests, keepingfetchFromSavannahbecomes a maintenance burden when it can easily be removed.Also, CGit offers snapshot support, but it is optional and is not a API interface. Considering that GNU expects distributions to download from their release mirrors, we can't rely on CGit in the same way one can rely on Gitea/GitLab/GitHub.
The Solution
Replace each usage of
fetchFromSavannahwith either afetchurlmirror or afetchgitcall and adjust as needed.Packages changed
Tracking PRs:
fetchFromSavannahwith mirror; adjust build #436020fetchFromSavannahwithfetchgit; update links #436021fetchFromSavannahwith mirror; 1.5.1 → 1.5.2 #436013fetchFromSavannahwithfetchgit#436012fetchFromSavannahfetcher with files from autoconf #436023Deprecation notice
I decided not to remove
fetchFromSavannahcompletely but to instead deprecate vialib.warnand remove its entry from fetchers documentation to account for downstream use sincefetchFromSavannahwas in nixpkgs for a long time, it should be removed in the subsequent release of nixpkgs though, downstreams that use the savannah fetcher can just re-implement the string interpolating function downstream.So far I know emacs-overlay does use the savannah fetcher and
nix-updatehas a savannah update codepath (that haphazardly works)Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.Add a 👍 reaction to pull requests you find important.