public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/transmission] epel10: Apply upstream patch to fix important bug in adding magnet links from command line
@ 2026-07-20 20:38 Federico Pellegrin
  0 siblings, 0 replies; only message in thread
From: Federico Pellegrin @ 2026-07-20 20:38 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/transmission
Branch : epel10
Commit : b33fb9bec3e5ed316452bea3160faf3c938bdd15
Author : Federico Pellegrin <fede@evolware.org>
Date   : 2026-02-10T16:18:52+01:00
Stats  : +48/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/transmission/c/b33fb9bec3e5ed316452bea3160faf3c938bdd15?branch=epel10

Log:
Apply upstream patch to fix important bug in adding magnet links from command line

---
diff --git a/0004-Fix_magnet_links_from_command_line.patch b/0004-Fix_magnet_links_from_command_line.patch
new file mode 100644
index 0000000..80b9fbf
--- /dev/null
+++ b/0004-Fix_magnet_links_from_command_line.patch
@@ -0,0 +1,42 @@
+From 32464f4b9f73e97becf3e94807b2c97d45665303 Mon Sep 17 00:00:00 2001
+From: Charles Kerr <charles@charleskerr.com>
+Date: Mon, 9 Feb 2026 21:34:19 -0600
+Subject: [PATCH] fix: cannot add magnet links from the command line
+
+---
+ gtk/Session.cc | 14 ++++++++++++--
+ 1 file changed, 12 insertions(+), 2 deletions(-)
+
+diff --git a/gtk/Session.cc b/gtk/Session.cc
+index 88d916bb16e..0fa4fb5e0be 100644
+--- a/gtk/Session.cc
++++ b/gtk/Session.cc
+@@ -144,7 +144,7 @@ class Session::Impl
+     void inc_busy();
+     void dec_busy();
+ 
+-    bool add(Glib::ustring const& name, bool do_start, bool do_prompt, bool do_notify);
++    bool add(Glib::ustring const& name_in, bool do_start, bool do_prompt, bool do_notify);
+     void add_file_async_callback(
+         Glib::RefPtr<Gio::File> const& file,
+         Glib::RefPtr<Gio::AsyncResult>& result,
+@@ -822,8 +822,18 @@ void Session::Impl::add_file_async_callback(
+ }
+ 
+ // Add `name,` which might be a local filename, a magnet link, or a URI.
+-bool Session::Impl::add(Glib::ustring const& name, bool const do_start, bool const do_prompt, bool const do_notify)
++bool Session::Impl::add(Glib::ustring const& name_in, bool const do_start, bool const do_prompt, bool const do_notify)
+ {
++    auto name = name_in;
++
++    // `gio::File` doesn't seem to know how to stringify magnet links correctly.
++    // Unfortunately there are some code paths that unavoidably use `gio::File`
++    // e.g. Gtk::Application::on_open() so we have to do this:
++    if (auto constexpr BrokenMagnetLinkPrefix = "magnet:///?"sv; tr_strv_starts_with(name.raw(), BrokenMagnetLinkPrefix))
++    {
++        name.replace(0, std::size(BrokenMagnetLinkPrefix), "magnet:?");
++    }
++
+     auto* const session = get_session();
+     if (session == nullptr)
+     {

diff --git a/transmission.spec b/transmission.spec
index 7d74567..9c8104c 100644
--- a/transmission.spec
+++ b/transmission.spec
@@ -1,6 +1,6 @@
 Name:           transmission
 Version:        4.1.0
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        A lightweight GTK+ BitTorrent client
 # See COPYING. This licensing situation is... special.
 License:        MIT and GPL-2.0-only
@@ -17,6 +17,8 @@ Patch1:         0002-Make-compatible-with-CMake-4.0.patch
 Patch2:         7669.patch
 # https://github.com/transmission/transmission/pull/8277, to be removed in 4.1.1 or 4.2.0
 Patch3:         0003-Fix_cannot_add_magnet_links_in_GTK_client.patch
+# https://github.com/transmission/transmission/pull/8415, to be removed in 4.1.1 or 4.2.0
+Patch4:         0004-Fix_magnet_links_from_command_line.patch
 
 BuildRequires:  make
 BuildRequires:  cmake
@@ -200,6 +202,9 @@ install -m0644 -D transmission.sysusers.conf %{buildroot}%{_sysusersdir}/transmi
 %doc %{_mandir}/man1/transmission-qt.*
 
 %changelog
+* Tue Feb 10 2026 Federico Pellegrin <fede@evolware.org> - 4.1.0-3
+- Apply upstream patch to fix important bug in adding magnet links from command line
+
 * Sun Feb 08 2026 Federico Pellegrin <fede@evolware.org> - 4.1.0-2
 - Apply upstream patch to fix important bug in adding magnet links in GTK client
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-07-20 20:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-20 20:38 [rpms/transmission] epel10: Apply upstream patch to fix important bug in adding magnet links from command line Federico Pellegrin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox