From 7645dde0593cc1fcc899d73f71b9b5290d1771d3 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Mon, 10 Jun 2024 10:54:49 +0300 Subject: [PATCH] transmission_3: rename from transmission --- nixos/doc/manual/release-notes/rl-2411.section.md | 4 ++++ nixos/modules/services/torrent/transmission.nix | 5 ++++- nixos/tests/all-tests.nix | 2 +- .../applications/networking/p2p/torrential/default.nix | 4 ++-- pkgs/build-support/fetchtorrent/default.nix | 4 ++-- .../tr/transmission_3/package.nix} | 4 ++-- .../transmission_3}/transmission-3.00-openssl-3.patch | 0 pkgs/top-level/aliases.nix | 10 ++++++++++ pkgs/top-level/all-packages.nix | 9 ++++----- pkgs/top-level/release.nix | 3 ++- 10 files changed, 31 insertions(+), 14 deletions(-) rename pkgs/{applications/networking/p2p/transmission/default.nix => by-name/tr/transmission_3/package.nix} (95%) rename pkgs/{applications/networking/p2p/transmission => by-name/tr/transmission_3}/transmission-3.00-openssl-3.patch (100%) diff --git a/nixos/doc/manual/release-notes/rl-2411.section.md b/nixos/doc/manual/release-notes/rl-2411.section.md index 57d8c59e612b..ee0fff7f1196 100644 --- a/nixos/doc/manual/release-notes/rl-2411.section.md +++ b/nixos/doc/manual/release-notes/rl-2411.section.md @@ -23,6 +23,10 @@ ## Backward Incompatibilities {#sec-release-24.11-incompatibilities} +- `transmission` package has been aliased with a `trace` warning to `transmission_3`. Since [Transmission 4 has been released last year](https://github.com/transmission/transmission/releases/tag/4.0.0), and Transmission 3 will eventually go away, it was decided perform this warning alias to make people aware of the new version. The `services.transmission.package` defaults to `transmission_3` as well because the upgrade can cause data loss in certain specific usage patterns (examples: [#5153](https://github.com/transmission/transmission/issues/5153), [#6796](https://github.com/transmission/transmission/issues/6796)). Please make sure to back up to your data directory per your usage: + - `transmission-gtk`: `~/.config/transmission` + - `transmission-daemon` using NixOS module: `${config.services.transmission.home}/.config/transmission-daemon` (defaults to `/var/lib/transmission/.config/transmission-daemon`) + - `androidenv.androidPkgs_9_0` has been removed, and replaced with `androidenv.androidPkgs` for a more complete Android SDK including support for Android 9 and later. - `nginx` package no longer includes `gd` and `geoip` dependencies. For enabling it, override `nginx` package with the optionals `withImageFilter` and `withGeoIP`. diff --git a/nixos/modules/services/torrent/transmission.nix b/nixos/modules/services/torrent/transmission.nix index 52b472631dcf..ceef0db78b09 100644 --- a/nixos/modules/services/torrent/transmission.nix +++ b/nixos/modules/services/torrent/transmission.nix @@ -174,7 +174,10 @@ in }; }; - package = mkPackageOption pkgs "transmission" {}; + package = mkPackageOption pkgs "transmission" { + default = "transmission_3"; + example = "pkgs.transmission_4"; + }; downloadDirPermissions = mkOption { type = with types; nullOr str; diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 8d5b865891e4..15aabadfd3bf 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -980,7 +980,7 @@ in { traefik = handleTestOn ["aarch64-linux" "x86_64-linux"] ./traefik.nix {}; trafficserver = handleTest ./trafficserver.nix {}; transfer-sh = handleTest ./transfer-sh.nix {}; - transmission = handleTest ./transmission.nix { transmission = pkgs.transmission; }; + transmission_3 = handleTest ./transmission.nix { transmission = pkgs.transmission_3; }; transmission_4 = handleTest ./transmission.nix { transmission = pkgs.transmission_4; }; # tracee requires bpf tracee = handleTestOn ["x86_64-linux"] ./tracee.nix {}; diff --git a/pkgs/applications/networking/p2p/torrential/default.nix b/pkgs/applications/networking/p2p/torrential/default.nix index cfc10c3f7466..2d9028bcc979 100644 --- a/pkgs/applications/networking/p2p/torrential/default.nix +++ b/pkgs/applications/networking/p2p/torrential/default.nix @@ -17,7 +17,7 @@ , libevent , libgee , libnatpmp -, libtransmission +, libtransmission_3 , libutp , miniupnpc , openssl @@ -54,7 +54,7 @@ stdenv.mkDerivation rec { libevent libgee libnatpmp - libtransmission + libtransmission_3 libutp miniupnpc openssl diff --git a/pkgs/build-support/fetchtorrent/default.nix b/pkgs/build-support/fetchtorrent/default.nix index 126748678bf2..041c1b9dcb39 100644 --- a/pkgs/build-support/fetchtorrent/default.nix +++ b/pkgs/build-support/fetchtorrent/default.nix @@ -1,4 +1,4 @@ -{ lib, runCommand, transmission_noSystemd, rqbit, writeShellScript, formats, cacert, rsync }: +{ lib, runCommand, transmission_3_noSystemd, rqbit, writeShellScript, formats, cacert, rsync }: let urlRegexp = ''.*xt=urn:bt[im]h:([^&]{64}|[^&]{40}).*''; in @@ -32,7 +32,7 @@ let in runCommand name { inherit meta; - nativeBuildInputs = [ cacert ] ++ (if (backend == "transmission" ) then [ transmission_noSystemd ] else if (backend == "rqbit") then [ rqbit ] else throw "rqbit or transmission are the only available backends for fetchtorrent"); + nativeBuildInputs = [ cacert ] ++ (if (backend == "transmission" ) then [ transmission_3_noSystemd ] else if (backend == "rqbit") then [ rqbit ] else throw "rqbit or transmission are the only available backends for fetchtorrent"); outputHashAlgo = if hash != "" then null else "sha256"; outputHash = hash; outputHashMode = if recursiveHash then "recursive" else "flat"; diff --git a/pkgs/applications/networking/p2p/transmission/default.nix b/pkgs/by-name/tr/transmission_3/package.nix similarity index 95% rename from pkgs/applications/networking/p2p/transmission/default.nix rename to pkgs/by-name/tr/transmission_3/package.nix index 39c160c771d8..3b5c4d30d2f8 100644 --- a/pkgs/applications/networking/p2p/transmission/default.nix +++ b/pkgs/by-name/tr/transmission_3/package.nix @@ -117,12 +117,12 @@ stdenv.mkDerivation (finalAttrs: { ''; passthru.tests = { - apparmor = nixosTests.transmission; # starts the service with apparmor enabled + apparmor = nixosTests.transmission_3; # starts the service with apparmor enabled smoke-test = nixosTests.bittorrent; }; meta = { - description = "Fast, easy and free BitTorrent client"; + description = "Fast, easy and free BitTorrent client (deprecated version 3)"; mainProgram = if enableQt then "transmission-qt" else if enableGTK3 then "transmission-gtk" else "transmission-cli"; longDescription = '' Transmission is a BitTorrent client which features a simple interface diff --git a/pkgs/applications/networking/p2p/transmission/transmission-3.00-openssl-3.patch b/pkgs/by-name/tr/transmission_3/transmission-3.00-openssl-3.patch similarity index 100% rename from pkgs/applications/networking/p2p/transmission/transmission-3.00-openssl-3.patch rename to pkgs/by-name/tr/transmission_3/transmission-3.00-openssl-3.patch diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 6eae001ae76f..266e52a8cc48 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -34,6 +34,12 @@ let dontDistribute alias else alias; + transmission3Warning = { prefix ? "", suffix ? "" }: let + p = "${prefix}transmission${suffix}"; + p3 = "${prefix}transmission_3${suffix}"; + p4 = "${prefix}transmission_4${suffix}"; + in "${p} has been renamed to ${p3} since ${p4} is also available. Note that upgrade caused data loss for some users so backup is recommended (see NixOS 24.11 release notes for details)"; + # Make sure that we are not shadowing something from all-packages.nix. checkInPkgs = n: alias: if builtins.hasAttr n super @@ -1320,6 +1326,10 @@ mapAliases ({ tokyo-night-gtk = tokyonight-gtk-theme; # Added 2024-01-28 tootle = throw "'tootle' has been removed as it is not maintained upstream. Consider using 'tuba' instead"; # Added 2024-02-11 tor-browser-bundle-bin = tor-browser; # Added 2023-09-23 + transmission = lib.warn (transmission3Warning {}) transmission_3; # Added 2024-06-10 + transmission-gtk = lib.warn (transmission3Warning {suffix = "-gtk";}) transmission_3-gtk; # Added 2024-06-10 + transmission-qt = lib.warn (transmission3Warning {suffix = "-qt";}) transmission_3-qt; # Added 2024-06-10 + libtransmission = lib.warn (transmission3Warning {prefix = "lib";}) libtransmission_3; # Added 2024-06-10 transfig = fig2dev; # Added 2022-02-15 transifex-client = transifex-cli; # Added 2023-12-29 trezor_agent = trezor-agent; # Added 2024-01-07 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3f1b969a1b0c..9aed2328de27 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -34777,15 +34777,14 @@ with pkgs; transcribe = callPackage ../applications/audio/transcribe { }; - transmission = callPackage ../applications/networking/p2p/transmission { }; - libtransmission = transmission.override { + libtransmission_3 = transmission_3.override { installLib = true; enableDaemon = false; enableCli = false; }; - transmission-gtk = transmission.override { enableGTK3 = true; }; - transmission-qt = transmission.override { enableQt = true; }; - transmission_noSystemd = transmission.override { enableSystemd = false; }; + transmission_3-gtk = transmission_3.override { enableGTK3 = true; }; + transmission_3-qt = transmission_3.override { enableQt = true; }; + transmission_3_noSystemd = transmission_3.override { enableSystemd = false; }; # Needs macOS >= 10.14.6 transmission_4 = darwin.apple_sdk_11_0.callPackage ../applications/networking/p2p/transmission/4.nix { diff --git a/pkgs/top-level/release.nix b/pkgs/top-level/release.nix index 4f95c7d084ef..04f10bb0fac1 100644 --- a/pkgs/top-level/release.nix +++ b/pkgs/top-level/release.nix @@ -125,7 +125,8 @@ let jobs.gimp.x86_64-darwin jobs.emacs.x86_64-darwin jobs.wireshark.x86_64-darwin - jobs.transmission-gtk.x86_64-darwin + jobs.transmission_3-gtk.x86_64-darwin + jobs.transmission_4-gtk.x86_64-darwin # Tests /*