{libtransmission_3,transmission_3{,-gtk,-qt,_noSystemd},torrential}: drop

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.
This commit is contained in:
Emily
2025-10-28 18:14:05 +00:00
parent 8b66d344c9
commit 0c3f4b7d67
9 changed files with 40 additions and 369 deletions
+29 -10
View File
@@ -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:
+1 -2
View File
@@ -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;
+1 -2
View File
@@ -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 = ''
-86
View File
@@ -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";
};
}
-183
View File
@@ -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 <<EOF
include <tunables/global>
$out/bin/transmission-daemon {
include <abstractions/base>
include <abstractions/nameservice>
include <abstractions/ssl_certs>
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 <local/bin.transmission-daemon>
}
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;
};
})
@@ -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);
@@ -1,37 +0,0 @@
From 6ee128b95bacaff20746538dc97c2b8e2b9fcc29 Mon Sep 17 00:00:00 2001
From: Mike Gilbert <floppym@gentoo.org>
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 <openssl/rand.h>
#include <openssl/ssl.h>
#include <openssl/x509.h>
+#if OPENSSL_VERSION_MAJOR >= 3
+#include <openssl/provider.h>
+#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
+9 -22
View File
@@ -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
-9
View File
@@ -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;