From 7b82f7c2f99a1b63ea19d6a9ccdc42aadd1b22f2 Mon Sep 17 00:00:00 2001 From: Yiyu Zhou Date: Thu, 20 Nov 2025 13:56:44 -0800 Subject: [PATCH] jesec-rtorrent: drop --- ...void-stack-overflow-for-lockfile-buf.patch | 30 -------- .../networking/p2p/jesec-rtorrent/default.nix | 77 ------------------- .../p2p/jesec-rtorrent/libtorrent.nix | 49 ------------ pkgs/top-level/aliases.nix | 1 + pkgs/top-level/all-packages.nix | 4 - 5 files changed, 1 insertion(+), 160 deletions(-) delete mode 100644 pkgs/applications/networking/p2p/jesec-rtorrent/avoid-stack-overflow-for-lockfile-buf.patch delete mode 100644 pkgs/applications/networking/p2p/jesec-rtorrent/default.nix delete mode 100644 pkgs/applications/networking/p2p/jesec-rtorrent/libtorrent.nix diff --git a/pkgs/applications/networking/p2p/jesec-rtorrent/avoid-stack-overflow-for-lockfile-buf.patch b/pkgs/applications/networking/p2p/jesec-rtorrent/avoid-stack-overflow-for-lockfile-buf.patch deleted file mode 100644 index 2a20b157a2fc..000000000000 --- a/pkgs/applications/networking/p2p/jesec-rtorrent/avoid-stack-overflow-for-lockfile-buf.patch +++ /dev/null @@ -1,30 +0,0 @@ -From dd4a96073d4a60ca8fff55be6ea6b17018de96a8 Mon Sep 17 00:00:00 2001 -From: Varun Madiath -Date: Wed, 19 Jul 2023 15:30:57 -0400 -Subject: [PATCH] utils: lockfile: avoid stack overflow for lockfile buffer - -Original patch by @cyphar was submitted to rakshasa/rtorrent at -https://github.com/rakshasa/rtorrent/pull/1169. - -Observed the segfault on nixos-unstable. ---- - src/utils/lockfile.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/utils/lockfile.cc b/src/utils/lockfile.cc -index 76e4b8f..441f5c8 100644 ---- a/src/utils/lockfile.cc -+++ b/src/utils/lockfile.cc -@@ -75,7 +75,8 @@ Lockfile::try_lock() { - int pos = ::gethostname(buf, 255); - - if (pos == 0) { -- ::snprintf(buf + std::strlen(buf), 255, ":+%i\n", ::getpid()); -+ ssize_t len = std::strlen(buf); -+ ::snprintf(buf + len, 255 - len, ":+%i\n", ::getpid()); - ssize_t __attribute__((unused)) result = ::write(fd, buf, std::strlen(buf)); - } - --- -2.41.0 - diff --git a/pkgs/applications/networking/p2p/jesec-rtorrent/default.nix b/pkgs/applications/networking/p2p/jesec-rtorrent/default.nix deleted file mode 100644 index ecc0ff81ad70..000000000000 --- a/pkgs/applications/networking/p2p/jesec-rtorrent/default.nix +++ /dev/null @@ -1,77 +0,0 @@ -{ - lib, - stdenv, - fetchFromGitHub, - cmake, - curl, - gtest, - libtorrent, - ncurses, - jsonRpcSupport ? true, - nlohmann_json, - xmlRpcSupport ? true, - xmlrpc_c, -}: - -stdenv.mkDerivation rec { - pname = "jesec-rtorrent"; - version = "0.9.8-r16"; - - src = fetchFromGitHub { - owner = "jesec"; - repo = "rtorrent"; - rev = "v${version}"; - hash = "sha256-i7c1jSawHshj1kaXl8tdpelIKU24okeg9K5/+ht6t2k="; - }; - - patches = [ - ./avoid-stack-overflow-for-lockfile-buf.patch - ]; - - passthru = { - inherit libtorrent; - }; - - nativeBuildInputs = [ - cmake - ]; - - buildInputs = [ - curl - libtorrent - ncurses - ] - ++ lib.optional jsonRpcSupport nlohmann_json - ++ lib.optional xmlRpcSupport xmlrpc_c; - - cmakeFlags = [ - "-DUSE_RUNTIME_CA_DETECTION=NO" - ] - ++ lib.optional (!jsonRpcSupport) "-DUSE_JSONRPC=NO" - ++ lib.optional (!xmlRpcSupport) "-DUSE_XMLRPC=NO"; - - doCheck = true; - - nativeCheckInputs = [ - gtest - ]; - - prePatch = '' - substituteInPlace src/main.cc \ - --replace "/etc/rtorrent/rtorrent.rc" "${placeholder "out"}/etc/rtorrent/rtorrent.rc" - ''; - - postFixup = '' - mkdir -p $out/etc/rtorrent - cp $src/doc/rtorrent.rc $out/etc/rtorrent/rtorrent.rc - ''; - - meta = with lib; { - description = "Ncurses client for libtorrent, ideal for use with screen, tmux, or dtach (jesec's fork)"; - homepage = "https://github.com/jesec/rtorrent"; - license = licenses.gpl2Plus; - maintainers = with maintainers; [ winter ]; - platforms = platforms.linux; - mainProgram = "rtorrent"; - }; -} diff --git a/pkgs/applications/networking/p2p/jesec-rtorrent/libtorrent.nix b/pkgs/applications/networking/p2p/jesec-rtorrent/libtorrent.nix deleted file mode 100644 index 50d250e7efe3..000000000000 --- a/pkgs/applications/networking/p2p/jesec-rtorrent/libtorrent.nix +++ /dev/null @@ -1,49 +0,0 @@ -{ - lib, - stdenv, - fetchFromGitHub, - cmake, - gtest, - openssl, - zlib, -}: - -stdenv.mkDerivation rec { - pname = "jesec-libtorrent"; - version = "0.13.8-r4"; - - src = fetchFromGitHub { - owner = "jesec"; - repo = "libtorrent"; - rev = "v${version}"; - hash = "sha256-jC/hgGSi2qy+ToZgdxl1PhASLYbUL0O8trX0th2v5H0="; - }; - - nativeBuildInputs = [ - cmake - ]; - - buildInputs = [ - openssl - zlib - ]; - - # Disabled because a test is flaky; see https://github.com/jesec/libtorrent/issues/4. - # doCheck = true; - - preCheck = '' - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}$PWD - ''; - - nativeCheckInputs = [ - gtest - ]; - - meta = with lib; { - homepage = "https://github.com/jesec/libtorrent"; - description = "BitTorrent library written in C++ for *nix, with focus on high performance and good code (jesec's fork)"; - license = licenses.gpl2Plus; - maintainers = with maintainers; [ winter ]; - platforms = platforms.linux; - }; -} diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index d773e8004b81..53133942bdd2 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -748,6 +748,7 @@ mapAliases { jdk23_headless = throw "OpenJDK 23 was removed as it has reached its end of life"; # Added 2025-11-04 jdk24 = throw "OpenJDK 24 was removed as it has reached its end of life"; # Added 2025-10-04 jdk24_headless = throw "OpenJDK 24 was removed as it has reached its end of life"; # Added 2025-10-04 + jesec-rtorrent = throw "'jesec-rtorrent' has been removed due to lack of maintenance upstream."; # Added 2025-11-20 jikespg = throw "'jikespg' has been removed due to lack of maintenance upstream."; # Added 2025-06-10 jing = jing-trang; # Added 2025-09-18 joplin = joplin-cli; # Added 2025-11-03 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f867017b59cf..2c708a5b7cfe 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3321,10 +3321,6 @@ with pkgs; libportal-qt5 = libportal.override { variant = "qt5"; }; libportal-qt6 = libportal.override { variant = "qt6"; }; - jesec-rtorrent = callPackage ../applications/networking/p2p/jesec-rtorrent { - libtorrent = callPackage ../applications/networking/p2p/jesec-rtorrent/libtorrent.nix { }; - }; - librest = callPackage ../development/libraries/librest { }; librest_1_0 = callPackage ../development/libraries/librest/1.0.nix { };