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 in GTK client
Date: Mon, 20 Jul 2026 20:38:00 GMT	[thread overview]
Message-ID: <178457988097.1.2582497674750249107.rpms-transmission-e4ede7fc07ed@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/transmission
Branch : epel10
Commit : e4ede7fc07ed805adc0f744abc29fbaa2bf11364
Author : Federico Pellegrin <fede@evolware.org>
Date   : 2026-02-08T08:49:28+01:00
Stats  : +78/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/transmission/c/e4ede7fc07ed805adc0f744abc29fbaa2bf11364?branch=epel10

Log:
Apply upstream patch to fix important bug in adding magnet links in GTK client

---
diff --git a/0003-Fix_cannot_add_magnet_links_in_GTK_client.patch b/0003-Fix_cannot_add_magnet_links_in_GTK_client.patch
new file mode 100644
index 0000000..0aa5f3b
--- /dev/null
+++ b/0003-Fix_cannot_add_magnet_links_in_GTK_client.patch
@@ -0,0 +1,72 @@
+From 90aa76e7cf079e13cceb8318b2a23119a2912ab6 Mon Sep 17 00:00:00 2001
+From: Charles Kerr <charles@charleskerr.com>
+Date: Thu, 29 Jan 2026 14:30:26 -0600
+Subject: [PATCH] fix: cannot add magnet links in GTK client
+
+---
+ gtk/Session.cc | 13 +++++++------
+ 1 file changed, 7 insertions(+), 6 deletions(-)
+
+diff --git a/gtk/Session.cc b/gtk/Session.cc
+index 50df618c636..bdda0210812 100644
+--- a/gtk/Session.cc
++++ b/gtk/Session.cc
+@@ -144,7 +144,7 @@ class Session::Impl
+     void inc_busy();
+     void dec_busy();
+ 
+-    bool add_file(Glib::RefPtr<Gio::File> const& file, bool do_start, bool do_prompt, bool do_notify);
++    bool add(Glib::ustring const& name, 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,
+@@ -823,7 +823,8 @@ void Session::Impl::add_file_async_callback(
+     dec_busy();
+ }
+ 
+-bool Session::Impl::add_file(Glib::RefPtr<Gio::File> const& file, bool do_start, bool do_prompt, bool do_notify)
++// 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)
+ {
+     auto* const session = get_session();
+     if (session == nullptr)
+@@ -837,6 +838,7 @@ bool Session::Impl::add_file(Glib::RefPtr<Gio::File> const& file, bool do_start,
+     tr_ctorSetPaused(ctor, TR_FORCE, !do_start);
+ 
+     bool loaded = false;
++    auto file = Gio::File::create_for_parse_name(name);
+     if (auto const path = file->get_path(); !std::empty(path))
+     {
+         // try to treat it as a file...
+@@ -846,7 +848,7 @@ bool Session::Impl::add_file(Glib::RefPtr<Gio::File> const& file, bool do_start,
+     if (!loaded)
+     {
+         // try to treat it as a magnet link...
+-        loaded = tr_ctorSetMetainfoFromMagnetLink(ctor, file->get_uri().c_str(), nullptr);
++        loaded = tr_ctorSetMetainfoFromMagnetLink(ctor, name.raw().c_str(), nullptr);
+     }
+ 
+     // if we could make sense of it, add it
+@@ -881,12 +883,11 @@ bool Session::add_from_url(Glib::ustring const& url)
+ 
+ bool Session::Impl::add_from_url(Glib::ustring const& url)
+ {
+-    auto const file = Gio::File::create_for_uri(url);
+     auto const do_start = gtr_pref_flag_get(TR_KEY_start_added_torrents);
+     auto const do_prompt = gtr_pref_flag_get(TR_KEY_show_options_window);
+     auto const do_notify = false;
+ 
+-    auto const handled = add_file(file, do_start, do_prompt, do_notify);
++    auto const handled = add(url, do_start, do_prompt, do_notify);
+     torrents_added();
+     return handled;
+ }
+@@ -900,7 +901,7 @@ void Session::Impl::add_files(std::vector<Glib::RefPtr<Gio::File>> const& files,
+ {
+     for (auto const& file : files)
+     {
+-        add_file(file, do_start, do_prompt, do_notify);
++        add(file->get_parse_name(), do_start, do_prompt, do_notify);
+     }
+ 
+     torrents_added();

diff --git a/transmission.spec b/transmission.spec
index f358d0a..7d74567 100644
--- a/transmission.spec
+++ b/transmission.spec
@@ -1,6 +1,6 @@
 Name:           transmission
 Version:        4.1.0
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        A lightweight GTK+ BitTorrent client
 # See COPYING. This licensing situation is... special.
 License:        MIT and GPL-2.0-only
@@ -15,6 +15,8 @@ Patch0:         0001-gtk-use-com.transmissionbt.Transmission.-D-Bus-names.patch
 # Proposed upstream: https://github.com/transmission/transmission/issues/7567
 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
 
 BuildRequires:  make
 BuildRequires:  cmake
@@ -198,6 +200,9 @@ install -m0644 -D transmission.sysusers.conf %{buildroot}%{_sysusersdir}/transmi
 %doc %{_mandir}/man1/transmission-qt.*
 
 %changelog
+* 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
+
 * Wed Jan 28 2026 Gwyn Ciesla <gwync@protonmail.com> - 4.1.0-1
 - 4.1.0
 

                 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=178457988097.1.2582497674750249107.rpms-transmission-e4ede7fc07ed@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