[PATCH] gfeeds 0.16.2: Make it run

  • Done
  • quality assurance status badge
Details
2 participants
  • Luis Felipe
  • Mathieu Othacehe
Owner
unassigned
Submitted by
Luis Felipe
Severity
normal
L
L
Luis Felipe wrote on 23 Apr 2022 22:00
(name . Luis Felipe via Guix-patches)(address . guix-patches@gnu.org)
zg3iUkcszccjk4WfrG7ydgiKLp7p7UMqzoTp7-x28H1ovhf7HGxTcEVlyJPv0ONM8tWQHoCfLh8JgEYHlhXFF_c1-_edU4wKBoyCZ9dtFEc=@protonmail.com
This program fails to run. I attach a patch that makes it work.

SYSTEM INFORMATION

Guix system with the following Guix.

Generation 55 Apr 18 2022 11:42:09 (current)
guix 237d90a
branch: master
commit: 237d90a7808cfdced34b34595eba16632cbcb89e


STEPS TO REPRODUCE

guix shell gfeeds -- gfeeds
Traceback (most recent call last):
File "/gnu/store/8vbjfdq9dv8cscs28vq9iabmkz4zkqcg-gfeeds-0.16.2/bin/.gfeeds-real", line 64, in <module>
gi.require_version('WebKit2', '4.0')
File "/home/yo/.guix-profile/lib/python3.9/site-packages/gi/__init__.py", line 129, in require_version
raise ValueError('Namespace %s not available for version %s' %
ValueError: Namespace WebKit2 not available for version 4.0


ADDITIONAL INFORMATION

The problem seems to be that the current inputs of gfeeds don't provide WebKit2 4.0 but WebKit 4.1:

? guix shell python-pygobject webkitgtk

yo@gnu[env]: ~? python3
Python 3.9.9 (main, Jan 1 1970, 00:00:01)

[GCC 10.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
Toggle quote (5 lines)
>>> import gi
>>>

>>> # The following fails.
>>> gi.require_version("WebKit2", "4.0")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/yo/.guix-profile/lib/python3.9/site-packages/gi/__init__.py", line 129, in require_version
raise ValueError('Namespace %s not available for version %s' %
ValueError: Namespace WebKit2 not available for version 4.0
Toggle quote (10 lines)
>>>

>>>

>>> # But the following works.
>>> gi.require_version("WebKit2", "4.1")
>>>



POSSIBLE SOLUTION

I attach a patch that makes the program import WebKit 4.1 instead. This makes the program work. As far as I could see, there is no package in Guix that provides WebKit 4.0, so I left the inputs untouched.

Another option was to upgrade gfeeds to the latest (v1.0.2), but it required to package new libraries that are not available in Guix (a recent libadwaita, for example), and which I'm not able to package.


Best,

---
Luis Felipe López Acevedo
From 14b23d3ae7ffe5192a96a3e92e58175bd67e3497 Mon Sep 17 00:00:00 2001
From: Luis Felipe <luis.felipe.la@protonmail.com>
Date: Sat, 23 Apr 2022 14:14:43 -0500
Subject: [PATCH] gnu: gfeeds: Make it start.

This change patches the version of WebKit required by the program to a
version available in Guix, so that the program actually starts.

* gnu/packages/syndication.scm (gfeeds)[arguments]: Require WebKit2
4.1 instead of 4.0, which is not available.
---
gnu/packages/syndication.scm | 6 ++++++
1 file changed, 6 insertions(+)

Toggle diff (26 lines)
diff --git a/gnu/packages/syndication.scm b/gnu/packages/syndication.scm
index 0417737d7d..20929aa7ad 100644
--- a/gnu/packages/syndication.scm
+++ b/gnu/packages/syndication.scm
@@ -3,6 +3,7 @@
;;; Copyright © 2018, 2019, 2021 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
;;; Copyright © 2021 Felix Gruber <felgru@posteo.net>
+;;; Copyright © 2022 Luis Felipe López Acevedo <luis.felipe.la@protonmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -537,6 +538,11 @@ (define-public gfeeds
(substitute* "gfeeds/confManager.py"
(("mpv") (search-input-file inputs "/bin/mpv")))
#t))
+ (add-after 'unpack 'patch-webkit2-version
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "bin/gfeeds.in"
+ (("gi\\.require_version\\('WebKit2', '4\\.0'\\)")
+ "gi.require_version('WebKit2', '4.1')"))))
(add-after 'install 'wrap-gfeeds
(lambda* (#:key outputs #:allow-other-keys)
(wrap-program (string-append
--
2.35.1
Attachment: signature.asc
M
M
Mathieu Othacehe wrote on 26 Apr 2022 11:09
(name . Luis Felipe)(address . luis.felipe.la@protonmail.com)(address . 55085-done@debbugs.gnu.org)
87v8uwus6x.fsf@gnu.org
Hey Luis,

Toggle quote (5 lines)
> I attach a patch that makes the program import WebKit 4.1
> instead. This makes the program work. As far as I could see, there is
> no package in Guix that provides WebKit 4.0, so I left the inputs
> untouched.

Seems fair, pushed!

Thanks,

Mathieu
Closed
?