[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#987795: unblock: liferea/1.13.5-2



Package: release.debian.org
User: release.debian.org@packages.debian.org
Usertags: unblock
Severity: normal

Please unblock package liferea

[ Reason ]
It used to be enough to declare the liferea custom scheme as local to
access resources with a file scheme, but for WebKit2Gtk >= 2.32 it looks
like it is necessary to register the custom scheme with a handler.

Thanks to pabs for filing the bug. Upstream fixed the issue already and
the patch is taken from there.

[ Impact ]
The summary bar in the main window will look odd.

[ Tests ]
pabs confirmed that the upload fixes the issue.

[ Risks ]
The involved code is not very complex.

[ Checklist ]
  [x] all changes are documented in the d/changelog
  [x] I reviewed all changes and I approve them
  [x] attach debdiff against the package in testing

unblock liferea/1.13.5-2

diff -Nru liferea-1.13.5/debian/changelog liferea-1.13.5/debian/changelog
--- liferea-1.13.5/debian/changelog	2021-01-14 21:17:48.000000000 +0100
+++ liferea-1.13.5/debian/changelog	2021-04-27 20:27:39.000000000 +0200
@@ -1,3 +1,10 @@
+liferea (1.13.5-2) unstable; urgency=medium
+
+  * Add patch to work with latest webgit2gkt:
+    34d26be00328a68d2f1625c78b54dc168da0648e.patch (Closes: #987448)
+
+ -- Paul Gevers <elbrus@debian.org>  Tue, 27 Apr 2021 20:27:39 +0200
+
 liferea (1.13.5-1) unstable; urgency=medium
 
   * New upstream version 1.13.5
diff -Nru liferea-1.13.5/debian/patches/34d26be00328a68d2f1625c78b54dc168da0648e.patch liferea-1.13.5/debian/patches/34d26be00328a68d2f1625c78b54dc168da0648e.patch
--- liferea-1.13.5/debian/patches/34d26be00328a68d2f1625c78b54dc168da0648e.patch	1970-01-01 01:00:00.000000000 +0100
+++ liferea-1.13.5/debian/patches/34d26be00328a68d2f1625c78b54dc168da0648e.patch	2021-04-27 20:27:39.000000000 +0200
@@ -0,0 +1,52 @@
+From 0b199d75be2bc41575de71ed5b5e0a6aa08c30bd Mon Sep 17 00:00:00 2001
+From: Laetitia Berthelot <leiaz@mailbox.org>
+Date: Mon, 5 Apr 2021 14:26:38 +0200
+Subject: [PATCH] Register liferea custom scheme, fixes #973
+
+It used to be enought to declare the liferea custom scheme as local to
+access resources with file scheme, but for WebKit2Gtk >= 2.32 it looks
+like it is necessary to register the custom scheme with a handler.
+
+The handler doesn't do anything interesting for now as we just pass the
+content with webkit_web_view_load_bytes and use the file scheme to
+access resources, but it could be used to load Liferea resources in the
+future ...
+---
+ src/webkit/webkit.c | 17 +++++++++++++++++
+ 1 file changed, 17 insertions(+)
+
+diff --git a/src/webkit/webkit.c b/src/webkit/webkit.c
+index cc90e4ba0..e43c58149 100644
+--- a/src/webkit/webkit.c
++++ b/src/webkit/webkit.c
+@@ -391,6 +391,21 @@ liferea_webkit_impl_download_started (WebKitWebContext	*context,
+ 	enclosure_download (NULL, webkit_uri_request_get_uri (request), TRUE);
+ }
+ 
++static void
++liferea_webkit_handle_liferea_scheme (WebKitURISchemeRequest *request, gpointer user_data)
++{
++	const gchar *uri = webkit_uri_scheme_request_get_uri (request);
++	GInputStream *stream;
++	gssize length;
++	gchar *contents;
++
++	contents = g_strdup_printf ("Placeholder handler for liferea scheme. URI requested : %s", uri);
++	length = (gssize) strlen (contents);
++	stream = g_memory_input_stream_new_from_data (contents, length, g_free);
++	webkit_uri_scheme_request_finish (request, stream, length, "text/plain");
++	g_object_unref (stream);
++}
++
+ static void
+ liferea_webkit_impl_init (LifereaWebKitImpl *self)
+ {
+@@ -398,6 +413,8 @@ liferea_webkit_impl_init (LifereaWebKitImpl *self)
+ 	WebKitSecurityManager *security_manager;
+ 	WebKitWebsiteDataManager *website_data_manager;
+ 	self->dbus_connections = NULL;
++	webkit_web_context_register_uri_scheme (webkit_web_context_get_default(), "liferea",
++		(WebKitURISchemeRequestCallback) liferea_webkit_handle_liferea_scheme,NULL,NULL);
+ 
+ 	security_manager = webkit_web_context_get_security_manager (webkit_web_context_get_default ());
+ 	website_data_manager = webkit_web_context_get_website_data_manager (webkit_web_context_get_default ());
diff -Nru liferea-1.13.5/debian/patches/series liferea-1.13.5/debian/patches/series
--- liferea-1.13.5/debian/patches/series	2021-01-14 21:17:48.000000000 +0100
+++ liferea-1.13.5/debian/patches/series	2021-04-27 20:27:39.000000000 +0200
@@ -1,2 +1,3 @@
 debian-example-feeds.patch
 www-browser.patch
+34d26be00328a68d2f1625c78b54dc168da0648e.patch

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


Reply to: