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 in GTK client
@ 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 : 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
^ 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 in GTK client Federico Pellegrin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox