From 03b2128fcc98eb9fefc3577fbb13b8636699d77b Mon Sep 17 00:00:00 2001 From: Jasi Date: Wed, 30 Jul 2025 14:06:01 -0700 Subject: [PATCH] fetchFromSavannah: deprecate 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 Co-authored-by: LIN, Jian --- doc/build-helpers/fetchers.chapter.md | 4 -- doc/redirects.json | 6 +-- doc/release-notes/rl-2605.section.md | 1 + pkgs/build-support/fetchsavannah/default.nix | 42 +++++++++++--------- 4 files changed, 26 insertions(+), 27 deletions(-) diff --git a/doc/build-helpers/fetchers.chapter.md b/doc/build-helpers/fetchers.chapter.md index e8289112963b..e2ac6640ef6c 100644 --- a/doc/build-helpers/fetchers.chapter.md +++ b/doc/build-helpers/fetchers.chapter.md @@ -899,10 +899,6 @@ However, `fetchFromBitbucket` will automatically switch to using `fetchgit` and When `fetchgit` is used, refer to the `fetchgit` section for documentation of its available options. -## `fetchFromSavannah` {#fetchfromsavannah} - -This is used with Savannah repositories. The arguments expected are very similar to `fetchFromGitHub` above. - ## `fetchFromRepoOrCz` {#fetchfromrepoorcz} This is used with repo.or.cz repositories. The arguments expected are very similar to `fetchFromGitHub` above. diff --git a/doc/redirects.json b/doc/redirects.json index d52ae8a8f047..8e072af31e4e 100644 --- a/doc/redirects.json +++ b/doc/redirects.json @@ -314,7 +314,8 @@ "release-notes.html#sec-nixpkgs-release-26.05-lib-breaking" ], "sec-nixpkgs-release-26.05-lib-deprecations": [ - "release-notes.html#sec-nixpkgs-release-26.05-lib-deprecations" + "release-notes.html#sec-nixpkgs-release-26.05-lib-deprecations", + "index.html#fetchfromsavannah" ], "sec-nixpkgs-release-26.05-lib-additions-improvements": [ "release-notes.html#sec-nixpkgs-release-26.05-lib-additions-improvements" @@ -1779,9 +1780,6 @@ "fetchfrombitbucket": [ "index.html#fetchfrombitbucket" ], - "fetchfromsavannah": [ - "index.html#fetchfromsavannah" - ], "fetchfromrepoorcz": [ "index.html#fetchfromrepoorcz" ], diff --git a/doc/release-notes/rl-2605.section.md b/doc/release-notes/rl-2605.section.md index 0d999f37a294..2eb5902778ed 100644 --- a/doc/release-notes/rl-2605.section.md +++ b/doc/release-notes/rl-2605.section.md @@ -162,6 +162,7 @@ - `mpv-unwrapped.scripts` and `mpv-unwrapped.wrapper` have been removed. Please use `mpvScripts` and `mpv.override` accordingly. +- `fetchFromSavannah` is now deprecated and is expected to be fully removed in a future release. From now on, use `fetchgit` or a Savannah releases mirror when applicable. ### Additions and Improvements {#sec-nixpkgs-release-26.05-lib-additions-improvements} diff --git a/pkgs/build-support/fetchsavannah/default.nix b/pkgs/build-support/fetchsavannah/default.nix index 475f2bdb4fd1..38075bdc1a98 100644 --- a/pkgs/build-support/fetchsavannah/default.nix +++ b/pkgs/build-support/fetchsavannah/default.nix @@ -12,23 +12,27 @@ lib.makeOverridable ( name ? repoRevToNameMaybe repo rev "savannah", ... # For hash agility }@args: - fetchzip ( - { - inherit name; - url = - let - repo' = lib.last (lib.strings.splitString "/" repo); # support repo like emacs/elpa - in - "https://cgit.git.savannah.gnu.org/cgit/${repo}.git/snapshot/${repo'}-${rev}.tar.gz"; - meta.homepage = "https://cgit.git.savannah.gnu.org/cgit/${repo}.git/"; - passthru.gitRepoUrl = "https://cgit.git.savannah.gnu.org/git/${repo}.git"; - } - // removeAttrs args [ - "repo" - "rev" - ] - ) - // { - inherit rev; - } + let + result = + fetchzip ( + { + inherit name; + url = + let + repo' = lib.last (lib.strings.splitString "/" repo); # support repo like emacs/elpa + in + "https://cgit.git.savannah.gnu.org/cgit/${repo}.git/snapshot/${repo'}-${rev}.tar.gz"; + meta.homepage = "https://cgit.git.savannah.gnu.org/cgit/${repo}.git/"; + passthru.gitRepoUrl = "https://cgit.git.savannah.gnu.org/git/${repo}.git"; + } + // removeAttrs args [ + "repo" + "rev" + ] + ) + // { + inherit rev; + }; + in + lib.warnOnInstantiate "`fetchFromSavannah` is deprecated and will be removed in a future release." result )