From 0c3f4b7d67c64563e759d689bf4026a0dcd6ecbb Mon Sep 17 00:00:00 2001 From: Emily Date: Sun, 26 Oct 2025 20:08:02 +0000 Subject: [PATCH] {libtransmission_3,transmission_3{,-gtk,-qt,_noSystemd},torrential}: drop MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Unmaintained upstream and it’s been a year since we started migrating to Transmission 4. Let’s not carry networked software from half a decade ago into 25.11. --- .../modules/services/torrent/transmission.nix | 39 +++- nixos/tests/all-tests.nix | 3 +- nixos/tests/transmission.nix | 3 +- pkgs/by-name/to/torrential/package.nix | 86 -------- pkgs/by-name/tr/transmission_3/package.nix | 183 ------------------ .../transmission-3.00-miniupnpc-2.2.8.patch | 18 -- .../transmission-3.00-openssl-3.patch | 37 ---- pkgs/top-level/aliases.nix | 31 +-- pkgs/top-level/all-packages.nix | 9 - 9 files changed, 40 insertions(+), 369 deletions(-) delete mode 100644 pkgs/by-name/to/torrential/package.nix delete mode 100644 pkgs/by-name/tr/transmission_3/package.nix delete mode 100644 pkgs/by-name/tr/transmission_3/transmission-3.00-miniupnpc-2.2.8.patch delete mode 100644 pkgs/by-name/tr/transmission_3/transmission-3.00-openssl-3.patch diff --git a/nixos/modules/services/torrent/transmission.nix b/nixos/modules/services/torrent/transmission.nix index e261abe44450..3f6ed9eff4d1 100644 --- a/nixos/modules/services/torrent/transmission.nix +++ b/nixos/modules/services/torrent/transmission.nix @@ -19,6 +19,8 @@ let optionalString optional mkDefault + mkOptionDefault + versionOlder escapeShellArgs optionalAttrs mkMerge @@ -176,17 +178,12 @@ in }; umask = mkOption { type = types.either types.int types.str; - default = if cfg.package == pkgs.transmission_3 then 18 else "022"; - defaultText = literalExpression "if cfg.package == pkgs.transmission_3 then 18 else \"022\""; + default = "022"; description = '' Sets transmission's file mode creation mask. See the {manpage}`umask(2)` manpage for more information. Users who want their saved torrents to be world-writable may want to set this value to 0/`"000"`. - - Keep in mind, that if you are using Transmission 3, this has to - be passed as a base 10 integer, whereas Transmission 4 takes - an octal number in a string instead. ''; }; utp-enabled = mkOption { @@ -222,10 +219,19 @@ in }; }; - package = mkPackageOption pkgs "transmission" { - default = "transmission_3"; - example = "pkgs.transmission_4"; - }; + package = + mkPackageOption pkgs "transmission" { + default = "transmission_4"; + example = "pkgs.transmission_4"; + } + // { + defaultText = '' + if lib.versionAtLeast config.system.stateVersion "25.11" then + pkgs.transmission_4 + else + «error message» + ''; + }; downloadDirPermissions = mkOption { type = with types; nullOr str; @@ -331,6 +337,19 @@ in }; config = mkIf cfg.enable { + services.transmission.package = mkIf (versionOlder config.system.stateVersion "25.11") ( + mkOptionDefault (throw '' + `services.transmission.package` previously defaulted to + `pkgs.transmission_3`, which has been removed in favour + of `pkgs.transmission_4`. + + Please set `services.transmission.package` to + `pkgs.transmission_4` explicitly. Note that upgrade + caused data loss for some users so backup is recommended + (see NixOS 24.11 release notes for details) + '') + ); + # Note that using systemd.tmpfiles would not work here # because it would fail when creating a directory # with a different owner than its parent directory, by saying: diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index d1eb5b439da0..3dd46f640f41 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -1537,8 +1537,7 @@ in traefik = runTestOn [ "aarch64-linux" "x86_64-linux" ] ./traefik.nix; trafficserver = runTest ./trafficserver.nix; transfer-sh = runTest ./transfer-sh.nix; - transmission_3 = handleTest ./transmission.nix { transmission = pkgs.transmission_3; }; - transmission_4 = handleTest ./transmission.nix { transmission = pkgs.transmission_4; }; + transmission_4 = handleTest ./transmission.nix { }; trezord = runTest ./trezord.nix; trickster = runTest ./trickster.nix; trilium-server = runTestOn [ "x86_64-linux" ] ./trilium-server.nix; diff --git a/nixos/tests/transmission.nix b/nixos/tests/transmission.nix index 0ddce92e8345..5186098b40cc 100644 --- a/nixos/tests/transmission.nix +++ b/nixos/tests/transmission.nix @@ -1,5 +1,5 @@ import ./make-test-python.nix ( - { pkgs, transmission, ... }: + { pkgs, ... }: { name = "transmission"; meta = with pkgs.lib.maintainers; { @@ -16,7 +16,6 @@ import ./make-test-python.nix ( security.apparmor.enable = true; services.transmission.enable = true; - services.transmission.package = transmission; }; testScript = '' diff --git a/pkgs/by-name/to/torrential/package.nix b/pkgs/by-name/to/torrential/package.nix deleted file mode 100644 index f10ee282beae..000000000000 --- a/pkgs/by-name/to/torrential/package.nix +++ /dev/null @@ -1,86 +0,0 @@ -{ - stdenv, - lib, - fetchFromGitHub, - nix-update-script, - desktop-file-utils, - meson, - ninja, - pkg-config, - python3, - vala, - wrapGAppsHook4, - curl, - dht, - glib, - gtk4, - libb64, - libevent, - libgee, - libnatpmp, - libtransmission_3, - libutp, - miniupnpc, - openssl, - pantheon, -}: - -stdenv.mkDerivation rec { - pname = "torrential"; - version = "3.0.0"; - - src = fetchFromGitHub { - owner = "davidmhewitt"; - repo = "torrential"; - rev = version; - sha256 = "sha256-uHc/VNtbhetmGyuhynZH1TvxJscVX17eWO6dzX6Ft3A="; - }; - - nativeBuildInputs = [ - desktop-file-utils - meson - ninja - pkg-config - python3 - vala - wrapGAppsHook4 - ]; - - buildInputs = [ - curl - dht - glib - gtk4 - libb64 - libevent - libgee - libnatpmp - libtransmission_3 - libutp - miniupnpc - openssl - pantheon.granite7 - ]; - - postPatch = '' - chmod +x meson/post_install.py - patchShebangs meson/post_install.py - - substituteInPlace meson/post_install.py \ - --replace "gtk-update-icon-cache" "gtk4-update-icon-cache" - ''; - - passthru = { - updateScript = nix-update-script { }; - }; - - meta = with lib; { - description = "Download torrents in style with this speedy, minimalist torrent client for elementary OS"; - homepage = "https://github.com/davidmhewitt/torrential"; - maintainers = with maintainers; [ xiorcale ]; - teams = [ teams.pantheon ]; - platforms = platforms.linux; - license = licenses.gpl2Plus; - mainProgram = "com.github.davidmhewitt.torrential"; - }; -} diff --git a/pkgs/by-name/tr/transmission_3/package.nix b/pkgs/by-name/tr/transmission_3/package.nix deleted file mode 100644 index 3c7947d9c24b..000000000000 --- a/pkgs/by-name/tr/transmission_3/package.nix +++ /dev/null @@ -1,183 +0,0 @@ -{ - stdenv, - lib, - fetchFromGitHub, - cmake, - pkg-config, - openssl, - curl, - libevent, - inotify-tools, - systemd, - zlib, - pcre, - libb64, - libutp, - miniupnpc, - dht, - libnatpmp, - libiconv, - # Build options - enableGTK3 ? false, - gtk3, - xorg, - wrapGAppsHook3, - enableQt ? false, - qt5, - nixosTests, - enableSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd, - enableDaemon ? true, - enableCli ? true, - installLib ? false, - apparmorRulesFromClosure, -}: - -stdenv.mkDerivation (finalAttrs: { - pname = "transmission"; - version = "3.00"; - - src = fetchFromGitHub { - owner = "transmission"; - repo = "transmission"; - tag = finalAttrs.version; - hash = "sha256-n4iEDt9AstDZPZXN47p13brNLbNWS3BTB+A4UuoEjzE="; - fetchSubmodules = true; - }; - - patches = [ - # fix build with openssl 3.0 - ./transmission-3.00-openssl-3.patch - # fix build with miniupnpc 2.2.8 - ./transmission-3.00-miniupnpc-2.2.8.patch - ]; - - # Compatibility with CMake < 3.5 has been removed from CMake. - postPatch = '' - substituteInPlace \ - CMakeLists.txt \ - --replace-fail \ - "cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)" \ - "cmake_minimum_required(VERSION 3.5)" - ''; - - outputs = [ - "out" - "apparmor" - ]; - - cmakeFlags = - let - mkFlag = opt: if opt then "ON" else "OFF"; - in - [ - "-DENABLE_MAC=OFF" # requires xcodebuild - "-DENABLE_GTK=${mkFlag enableGTK3}" - "-DENABLE_QT=${mkFlag enableQt}" - "-DENABLE_DAEMON=${mkFlag enableDaemon}" - "-DENABLE_CLI=${mkFlag enableCli}" - "-DINSTALL_LIB=${mkFlag installLib}" - ]; - - nativeBuildInputs = [ - pkg-config - cmake - ] - ++ lib.optionals enableGTK3 [ wrapGAppsHook3 ] - ++ lib.optionals enableQt [ qt5.wrapQtAppsHook ]; - - buildInputs = [ - openssl - curl - libevent - zlib - pcre - libb64 - libutp - miniupnpc - dht - libnatpmp - ] - ++ lib.optionals enableQt [ - qt5.qttools - qt5.qtbase - ] - ++ lib.optionals enableGTK3 [ - gtk3 - xorg.libpthreadstubs - ] - ++ lib.optionals enableSystemd [ systemd ] - ++ lib.optionals stdenv.hostPlatform.isLinux [ inotify-tools ] - ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; - - postInstall = '' - mkdir $apparmor - cat >$apparmor/bin.transmission-daemon < - $out/bin/transmission-daemon { - include - include - include - include "${ - apparmorRulesFromClosure { name = "transmission-daemon"; } ( - [ - curl - libevent - openssl - pcre - zlib - libnatpmp - miniupnpc - ] - ++ lib.optionals enableSystemd [ systemd ] - ++ lib.optionals stdenv.hostPlatform.isLinux [ inotify-tools ] - ) - }" - r @{PROC}/sys/kernel/random/uuid, - r @{PROC}/sys/vm/overcommit_memory, - r @{PROC}/@{pid}/environ, - r @{PROC}/@{pid}/mounts, - rwk /tmp/tr_session_id_*, - - r $out/share/transmission/web/**, - - include - } - EOF - ''; - - env = { - # Fix GCC 14 build - NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types"; - }; - - passthru.tests = { - apparmor = nixosTests.transmission_3; # starts the service with apparmor enabled - smoke-test = nixosTests.bittorrent; - }; - - meta = { - 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 - on top of a cross-platform back-end. - Feature spotlight: - * Uses fewer resources than other clients - * Native Mac, GTK and Qt GUI clients - * Daemon ideal for servers, embedded systems, and headless use - * All these can be remote controlled by Web and Terminal clients - * Bluetack (PeerGuardian) blocklists with automatic updates - * Full encryption, DHT, and PEX support - ''; - homepage = "http://www.transmissionbt.com/"; - license = lib.licenses.gpl2Plus; # parts are under MIT - platforms = lib.platforms.unix; - }; - -}) diff --git a/pkgs/by-name/tr/transmission_3/transmission-3.00-miniupnpc-2.2.8.patch b/pkgs/by-name/tr/transmission_3/transmission-3.00-miniupnpc-2.2.8.patch deleted file mode 100644 index 66de8f9bf510..000000000000 --- a/pkgs/by-name/tr/transmission_3/transmission-3.00-miniupnpc-2.2.8.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff --git a/libtransmission/upnp.c b/libtransmission/upnp.c -index c9e248a379...c7b2580bcb 100644 ---- a/libtransmission/upnp.c -+++ b/libtransmission/upnp.c -@@ -194,8 +194,13 @@ - - errno = 0; - -+#if (MINIUPNPC_API_VERSION >= 18) - if (UPNP_GetValidIGD(devlist, &handle->urls, &handle->data, handle->lanaddr, -+ sizeof(handle->lanaddr), NULL, 0) == UPNP_IGD_VALID_CONNECTED) -+#else -+ if (UPNP_GetValidIGD(devlist, &handle->urls, &handle->data, handle->lanaddr, - sizeof(handle->lanaddr)) == UPNP_IGD_VALID_CONNECTED) -+#endif - { - tr_logAddNamedInfo(getKey(), _("Found Internet Gateway Device \"%s\""), handle->urls.controlURL); - tr_logAddNamedInfo(getKey(), _("Local Address is \"%s\""), handle->lanaddr); diff --git a/pkgs/by-name/tr/transmission_3/transmission-3.00-openssl-3.patch b/pkgs/by-name/tr/transmission_3/transmission-3.00-openssl-3.patch deleted file mode 100644 index f288298cbf3d..000000000000 --- a/pkgs/by-name/tr/transmission_3/transmission-3.00-openssl-3.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 6ee128b95bacaff20746538dc97c2b8e2b9fcc29 Mon Sep 17 00:00:00 2001 -From: Mike Gilbert -Date: Sun, 15 May 2022 10:54:38 -0400 -Subject: [PATCH] openssl: load "legacy" provider for RC4 - ---- - libtransmission/crypto-utils-openssl.c | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/libtransmission/crypto-utils-openssl.c b/libtransmission/crypto-utils-openssl.c -index 45fd71913..14d680654 100644 ---- a/libtransmission/crypto-utils-openssl.c -+++ b/libtransmission/crypto-utils-openssl.c -@@ -20,6 +20,9 @@ - #include - #include - #include -+#if OPENSSL_VERSION_MAJOR >= 3 -+#include -+#endif - - #include "transmission.h" - #include "crypto-utils.h" -@@ -184,6 +187,10 @@ static void openssl_evp_cipher_context_free(EVP_CIPHER_CTX* handle) - - tr_rc4_ctx_t tr_rc4_new(void) - { -+#if OPENSSL_VERSION_MAJOR >= 3 -+ OSSL_PROVIDER_load(NULL, "default"); -+ OSSL_PROVIDER_load(NULL, "legacy"); -+#endif - EVP_CIPHER_CTX* handle = EVP_CIPHER_CTX_new(); - - if (check_result(EVP_CipherInit_ex(handle, EVP_rc4(), NULL, NULL, NULL, -1))) --- -2.35.1 - diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index a2fe24a88240..d71a5d836ea3 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -29,18 +29,6 @@ let 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)"; - deprecatedPlasma5Packages = { inherit (plasma5Packages) akonadi-calendar @@ -806,9 +794,8 @@ mapAliases { libtcod = throw "'libtcod' has been removed due to being unused and having an incompatible build-system"; # Added 2025-10-04 libtensorflow-bin = throw "'libtensorflow-bin' has been renamed to/replaced by 'libtensorflow'"; # Converted to throw 2025-10-27 libtorrent = throw "'libtorrent' has been renamed to 'libtorrent-rakshasa' for clearer distinction from 'libtorrent-rasterbar'"; # Added 2025-09-10 - libtransmission = lib.warnOnInstantiate (transmission3Warning { - prefix = "lib"; - }) libtransmission_3; # Added 2024-06-10 + libtransmission = throw "libtransmission_3 has been removed in favour of libtransmission_4. Note that upgrade caused data loss for some users so backup is recommended (see NixOS 24.11 release notes for details)"; # Converted to throw 2025-10-26 + libtransmission_3 = throw "libtransmission_3 has been removed in favour of libtransmission_4. Note that upgrade caused data loss for some users so backup is recommended (see NixOS 24.11 release notes for details)"; # Converted to throw 2025-10-26 libviper = throw "'libviper' was removed as it is broken and not maintained upstream"; # Added 2025-05-17 libwnck3 = throw "'libwnck3' has been renamed to/replaced by 'libwnck'"; # Converted to throw 2025-10-27 lightdm_gtk_greeter = throw "'lightdm_gtk_greeter' has been renamed to/replaced by 'lightdm-gtk-greeter'"; # Converted to throw 2025-10-27 @@ -1480,13 +1467,13 @@ mapAliases { tracker-miners = throw "'tracker-miners' has been renamed to/replaced by 'localsearch'"; # Converted to throw 2025-10-27 transfig = throw "'transfig' has been renamed to/replaced by 'fig2dev'"; # Converted to throw 2025-10-27 transifex-client = throw "'transifex-client' has been renamed to/replaced by 'transifex-cli'"; # Converted to throw 2025-10-27 - transmission = lib.warnOnInstantiate (transmission3Warning { }) transmission_3; # Added 2024-06-10 - transmission-gtk = lib.warnOnInstantiate (transmission3Warning { - suffix = "-gtk"; - }) transmission_3-gtk; # Added 2024-06-10 - transmission-qt = lib.warnOnInstantiate (transmission3Warning { - suffix = "-qt"; - }) transmission_3-qt; # Added 2024-06-10 + transmission = throw "transmission_3 has been removed in favour of transmission_4. Note that upgrade caused data loss for some users so backup is recommended (see NixOS 24.11 release notes for details)"; # Converted to throw 2025-10-26 + transmission-gtk = throw "transmission_3-gtk has been removed in favour of transmission_4-gtk. Note that upgrade caused data loss for some users so backup is recommended (see NixOS 24.11 release notes for details)"; # Converted to throw 2025-10-26 + transmission-qt = throw "transmission_3-qt has been removed in favour of transmission_4-qt. Note that upgrade caused data loss for some users so backup is recommended (see NixOS 24.11 release notes for details)"; # Converted to throw 2025-10-26 + transmission_3 = throw "transmission_3 has been removed in favour of transmission_4. Note that upgrade caused data loss for some users so backup is recommended (see NixOS 24.11 release notes for details)"; # Added 2025-10-26 + transmission_3-gtk = throw "transmission_3-gtk has been removed in favour of transmission_4-gtk. Note that upgrade caused data loss for some users so backup is recommended (see NixOS 24.11 release notes for details)"; # Added 2025-10-26 + transmission_3-qt = throw "transmission_3-qt has been removed in favour of transmission_4-qt. Note that upgrade caused data loss for some users so backup is recommended (see NixOS 24.11 release notes for details)"; # Added 2025-10-26 + transmission_3_noSystemd = throw "transmission_3_noSystemd has been removed in favour of transmission_4. Note that upgrade caused data loss for some users so backup is recommended (see NixOS 24.11 release notes for details)"; # Added 2025-10-26 treefmt2 = throw "'treefmt2' has been renamed to/replaced by 'treefmt'"; # Converted to throw 2025-10-27 trenchbroom = throw "trenchbroom was removed due to numerous vulnerabilities in freeimage"; # Added 2025-10-23 trezor_agent = throw "'trezor_agent' has been renamed to/replaced by 'trezor-agent'"; # Converted to throw 2025-10-27 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8bd88d03adfb..75024814e250 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12509,15 +12509,6 @@ with pkgs; trustedqsl = tqsl; # Alias added 2019-02-10 - libtransmission_3 = transmission_3.override { - installLib = true; - enableDaemon = false; - enableCli = 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; }; - transmission_4 = callPackage ../applications/networking/p2p/transmission/4.nix { fmt = fmt_9; libutp = libutp_3_4;