public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Federico Pellegrin <fede@evolware.org>
To: git-commits@fedoraproject.org
Subject: [rpms/transmission] epel10: Apply upstream patch to fix important bug in adding magnet links from command line
Date: Mon, 20 Jul 2026 20:38:01 GMT	[thread overview]
Message-ID: <178457988146.1.9515233780346073945.rpms-transmission-b33fb9bec3e5@fedoraproject.org> (raw)

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
 

                 reply	other threads:[~2026-07-20 20:38 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178457988146.1.9515233780346073945.rpms-transmission-b33fb9bec3e5@fedoraproject.org \
    --to=fede@evolware.org \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox