From 85c48a38b458aaf53867609a75abe63ef1cbe047 Mon Sep 17 00:00:00 2001 From: Antoine Pietri Date: Sat, 18 Feb 2023 19:44:58 +0100 Subject: [PATCH 1/2] Revert "transmission: use openssl_legacy" This reverts commit 52fe5d3bb6405aa3956df6b6fecdd08dde75e188. The patch prevents a segfault in EVP_CIPHER_CTX_set_key_length() when adding a new torrent. This should have been fixed by switching the dependency to the legacy openssl package. However, when installing the Qt version, `transmission-qt` still ends up picking up a non-legacy openssl via the Qt dependency. --- .../applications/networking/p2p/transmission/default.nix | 9 +++++++++ pkgs/top-level/all-packages.nix | 5 +---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/networking/p2p/transmission/default.nix b/pkgs/applications/networking/p2p/transmission/default.nix index 8d605877a62e..0bb11affed22 100644 --- a/pkgs/applications/networking/p2p/transmission/default.nix +++ b/pkgs/applications/networking/p2p/transmission/default.nix @@ -1,6 +1,7 @@ { stdenv , lib , fetchFromGitHub +, fetchurl , cmake , pkg-config , openssl @@ -46,6 +47,14 @@ in stdenv.mkDerivation { fetchSubmodules = true; }; + patches = [ + # fix build with openssl 3.0 + (fetchurl { + url = "https://salsa.debian.org/debian/transmission/-/raw/debian/3.00-2.1/debian/patches/openssl3-compat.patch"; + hash = "sha256-v+SDTW/lCtc8B3TuhQB1pmjW/QRAGLtYncaImNNwpes="; + }) + ]; + outputs = [ "out" "apparmor" ]; cmakeFlags = diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6cb79d651bde..46daa1ce3e0d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -33481,10 +33481,7 @@ with pkgs; transcribe = callPackage ../applications/audio/transcribe { }; - transmission = callPackage ../applications/networking/p2p/transmission { - # https://github.com/NixOS/nixpkgs/issues/207047 - openssl = openssl_legacy; - }; + transmission = callPackage ../applications/networking/p2p/transmission { }; libtransmission = transmission.override { installLib = true; enableDaemon = false; From e49dc267614001cfa1e492a2f0a4934f301435f3 Mon Sep 17 00:00:00 2001 From: Antoine Pietri Date: Wed, 22 Feb 2023 01:07:11 +0100 Subject: [PATCH 2/2] transmission: use gentoo patch to load legacy openssl provider Previous patch had a memory leak, see: https://github.com/NixOS/nixpkgs/issues/207047 The gentoo downstream patch is a lot simpler and does not seem to cause a memory leak. --- pkgs/applications/networking/p2p/transmission/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/p2p/transmission/default.nix b/pkgs/applications/networking/p2p/transmission/default.nix index 0bb11affed22..8f44d79f817d 100644 --- a/pkgs/applications/networking/p2p/transmission/default.nix +++ b/pkgs/applications/networking/p2p/transmission/default.nix @@ -50,8 +50,8 @@ in stdenv.mkDerivation { patches = [ # fix build with openssl 3.0 (fetchurl { - url = "https://salsa.debian.org/debian/transmission/-/raw/debian/3.00-2.1/debian/patches/openssl3-compat.patch"; - hash = "sha256-v+SDTW/lCtc8B3TuhQB1pmjW/QRAGLtYncaImNNwpes="; + url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/net-p2p/transmission/files/transmission-3.00-openssl-3.patch"; + hash = "sha256-peVrkGck8AfbC9uYNfv1CIu1alIewpca7A6kRXjVlVs="; }) ];