GNU bug report logs - #64521
[PATCH] gnu: tuba: Fix video-player crash and webp support.

Previous Next

Package: guix-patches;

Reported by: Lilah Tascheter <lilah <at> lunabee.space>

Date: Fri, 7 Jul 2023 19:30:02 UTC

Severity: normal

Tags: patch

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 64521 in the body.
You can then email your comments to 64521 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#64521; Package guix-patches. (Fri, 07 Jul 2023 19:30:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Lilah Tascheter <lilah <at> lunabee.space>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 07 Jul 2023 19:30:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Lilah Tascheter <lilah <at> lunabee.space>
To: guix-patches <at> gnu.org
Cc: Lilah Tascheter <lilah <at> lunabee.space>
Subject: [PATCH] gnu: tuba: Fix video-player crash and webp support.
Date: Fri,  7 Jul 2023 14:28:51 -0500
Without gstreamer, tuba will crash every time the user clicks on a
video. libwepb was included as an input but without a pixbuf loader, so
webp support was compiled in but didn't work.

* gnu/packages/mastodon.scm (tuba)[arguments]: Update to new style.

  (tuba)[arguments]<phases>: Add lib-vars-wrap phase to set
  GST_PLUGIN_SYSTEM_PATH and GDK_PIXBUF_MODULE_FILE variables.

  (tuba)[native-inputs]: Add gdk-pixbuf.

  (tuba)[inputs]: Add gstreamer, plugins, and webp-pixbuf-loader.
---
 gnu/packages/mastodon.scm | 41 +++++++++++++++++++++++++++------------
 1 file changed, 29 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/mastodon.scm b/gnu/packages/mastodon.scm
index feef8c61f9..e3334ac868 100644
--- a/gnu/packages/mastodon.scm
+++ b/gnu/packages/mastodon.scm
@@ -21,6 +21,7 @@
 (define-module (gnu packages mastodon)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix gexp)
   #:use-module (guix git-download)
   #:use-module (guix build-system meson)
   #:use-module (guix build-system python)
@@ -32,6 +33,7 @@ (define-module (gnu packages mastodon)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnome)
+  #:use-module (gnu packages gstreamer)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages image)
   #:use-module (gnu packages pkg-config)
@@ -94,21 +96,35 @@ (define-public tuba
         (base32 "1xhyz6wi17g4m76lr6qc75q4xnnw7c3dh3d04dg8m5gzk6j0y89x"))))
     (build-system meson-build-system)
     (arguments
-     `(#:glib-or-gtk? #t
-       #:configure-flags (list "-Ddistro=true")
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'glib-or-gtk-wrap 'symlink-package
-           (lambda* (#:key outputs #:allow-other-keys)
-             (with-directory-excursion
-               (string-append (assoc-ref outputs "out") "/bin")
-               (symlink "dev.geopjr.Tuba" "tuba")))))))
+      (list
+        #:glib-or-gtk? #t
+        #:configure-flags ''("-Ddistro=true")
+        #:phases
+        #~(modify-phases %standard-phases
+            (add-after 'glib-or-gtk-wrap 'lib-vars-wrap
+              (lambda _
+                (let ((gstvar "GST_PLUGIN_SYSTEM_PATH")
+                      (pixvar "GDK_PIXBUF_MODULE_FILE"))
+                  (wrap-program (string-append #$output "/bin/dev.geopjr.Tuba")
+                    `(,gstvar ":" suffix (,(getenv gstvar)))
+                    `(,pixvar ":" = (,(getenv pixvar)))))))
+            (add-after 'lib-vars-wrap 'symlink-package
+              (lambda _
+                (with-directory-excursion
+                  (string-append #$output "/bin")
+                  (symlink "dev.geopjr.Tuba" "tuba")))))))
     (native-inputs
-     (list gettext-minimal
+     (list gdk-pixbuf ; so pixbuf loader cache (for webp) is generated
+           gettext-minimal
            `(,glib "bin") ; for glib-compile-resources
            pkg-config))
     (inputs
-     (list gtk
+     (list gst-plugins-bad
+           gst-plugins-base
+           gst-plugins-good
+           gst-plugins-ugly
+           gstreamer
+           gtk
            gtksourceview
            json-glib
            libadwaita
@@ -117,7 +133,8 @@ (define-public tuba
            libsecret
            libwebp
            libxml2
-           vala))
+           vala
+           webp-pixbuf-loader))
     (home-page "https://tuba.geopjr.dev/")
     (synopsis "GTK client for Mastodon")
     (description "Tuba is a GTK client for Mastodon.  It provides a clean,

base-commit: 3e9915724718948f0d74d83aaac1b3c8061c26d2
-- 
2.40.1





Information forwarded to guix-patches <at> gnu.org:
bug#64521; Package guix-patches. (Fri, 07 Jul 2023 21:09:01 GMT) Full text and rfc822 format available.

Message #8 received at 64521 <at> debbugs.gnu.org (full text, mbox):

From: Juliana Sims <juli <at> incana.org>
To: lilah <at> lunabee.space
Cc: 64521 <at> debbugs.gnu.org
Subject: Re: [PATCH] gnu: tuba: Fix video-player crash and webp support.
Date: Fri, 07 Jul 2023 17:08:16 -0400
Hello,

First of all, could you split this into multiple patches? Specifically, 
could you split the fix apart from the argument modernization?

My other major concern is the inclusion of all those gstreamer plugins. 
Do we really need all of them? Ideally we want to avoid *-ugly and 
*-bad if we can.

I'm not sure if this is an issue with the Guix package, my personal 
setup, or Tuba itself, but while testing the patch I ran into an issue 
signing in. Because spaces are used to separate the permissions the 
application requests, my browser seems to interpret them as indicating 
new URLs instead. If you're able to fix that, that would be great!

Also, feel free to add a copyright line to the top of the file as part 
of your first patch ;)

Thanks,
Juli






Information forwarded to guix-patches <at> gnu.org:
bug#64521; Package guix-patches. (Sat, 08 Jul 2023 05:09:02 GMT) Full text and rfc822 format available.

Message #11 received at 64521 <at> debbugs.gnu.org (full text, mbox):

From: Lilah Tascheter <lilah <at> lunabee.space>
To: Juliana Sims <juli <at> incana.org>
Cc: 64521 <at> debbugs.gnu.org
Subject: Re: [PATCH] gnu: tuba: Fix video-player crash and webp support.
Date: Sat, 8 Jul 2023 00:08:23 -0500
hey juli!

> First of all, could you split this into multiple patches?
yep!

> My other major concern is the inclusion of all those gstreamer
> plugins. Do we really need all of them? Ideally we want to avoid
> *-ugly and *-bad if we can.
-ugly can definately be removed; looks like it only provides DVD
decoding stuff. -bad, though, is required in order to play .mp4 video.

> Because spaces are used to separate the permissions the application
> requests, my browser seems to interpret them as indicating new URLs
> instead.
I just reported it upstream; the scopes aren't properly urlencoded.

thank you so much!
~lunabee




Information forwarded to guix-patches <at> gnu.org:
bug#64521; Package guix-patches. (Sat, 08 Jul 2023 05:12:01 GMT) Full text and rfc822 format available.

Message #14 received at 64521 <at> debbugs.gnu.org (full text, mbox):

From: Lilah Tascheter <lilah <at> lunabee.space>
To: 64521 <at> debbugs.gnu.org
Cc: rg <at> raghavgururajan.name, Lilah Tascheter <lilah <at> lunabee.space>,
 liliana.prikler <at> gmail.com, maxim.cournoyer <at> gmail.com, juli <at> incana.org
Subject: [PATCH 1/2] gnu: tuba: Update to new style.
Date: Sat,  8 Jul 2023 00:11:20 -0500
* gnu/packages/mastodon.scm (tuba)[arguments]: Update to new style.
---
 gnu/packages/mastodon.scm | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/gnu/packages/mastodon.scm b/gnu/packages/mastodon.scm
index feef8c61f9..af578bd7de 100644
--- a/gnu/packages/mastodon.scm
+++ b/gnu/packages/mastodon.scm
@@ -21,6 +21,7 @@
 (define-module (gnu packages mastodon)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix gexp)
   #:use-module (guix git-download)
   #:use-module (guix build-system meson)
   #:use-module (guix build-system python)
@@ -94,15 +95,16 @@ (define-public tuba
         (base32 "1xhyz6wi17g4m76lr6qc75q4xnnw7c3dh3d04dg8m5gzk6j0y89x"))))
     (build-system meson-build-system)
     (arguments
-     `(#:glib-or-gtk? #t
-       #:configure-flags (list "-Ddistro=true")
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'glib-or-gtk-wrap 'symlink-package
-           (lambda* (#:key outputs #:allow-other-keys)
-             (with-directory-excursion
-               (string-append (assoc-ref outputs "out") "/bin")
-               (symlink "dev.geopjr.Tuba" "tuba")))))))
+      (list
+        #:glib-or-gtk? #t
+        #:configure-flags ''("-Ddistro=true")
+        #:phases
+        #~(modify-phases %standard-phases
+            (add-after 'glib-or-gtk-wrap 'symlink-package
+              (lambda _
+                (with-directory-excursion
+                  (string-append #$output "/bin")
+                  (symlink "dev.geopjr.Tuba" "tuba")))))))
     (native-inputs
      (list gettext-minimal
            `(,glib "bin") ; for glib-compile-resources

base-commit: 3db685cb2e2ce2a4b29c62d28a66201b2eba018f
-- 
2.40.1





Information forwarded to guix-patches <at> gnu.org:
bug#64521; Package guix-patches. (Sat, 08 Jul 2023 05:12:02 GMT) Full text and rfc822 format available.

Message #17 received at 64521 <at> debbugs.gnu.org (full text, mbox):

From: Lilah Tascheter <lilah <at> lunabee.space>
To: 64521 <at> debbugs.gnu.org
Cc: rg <at> raghavgururajan.name, Lilah Tascheter <lilah <at> lunabee.space>,
 liliana.prikler <at> gmail.com, maxim.cournoyer <at> gmail.com, juli <at> incana.org
Subject: [PATCH 2/2] gnu: tuba: Fix videoplayer crash and webp support.
Date: Sat,  8 Jul 2023 00:11:21 -0500
* gnu/packages/mastodon.scm (tuba)[arguments]<phases: Add lib-vars-wrap
  phase to set GST_PLUGIN_SYSTEM_PATH and GDK_PIXBUF_MODULE_FILE
  variables.

  (tuba)[native-inputs]: Add gdk-pixbuf.
  (tuba)[inputs]: Add gstreamer, plugins, and webp-pixbuf-loader.
---
 gnu/packages/mastodon.scm | 22 ++++++++++++++++++----
 1 file changed, 18 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/mastodon.scm b/gnu/packages/mastodon.scm
index af578bd7de..4442e6cb2a 100644
--- a/gnu/packages/mastodon.scm
+++ b/gnu/packages/mastodon.scm
@@ -33,6 +33,7 @@ (define-module (gnu packages mastodon)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnome)
+  #:use-module (gnu packages gstreamer)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages image)
   #:use-module (gnu packages pkg-config)
@@ -100,17 +101,29 @@ (define-public tuba
         #:configure-flags ''("-Ddistro=true")
         #:phases
         #~(modify-phases %standard-phases
-            (add-after 'glib-or-gtk-wrap 'symlink-package
+            (add-after 'glib-or-gtk-wrap 'lib-vars-wrap
+              (lambda _
+                (let ((gstvar "GST_PLUGIN_SYSTEM_PATH")
+                      (pixvar "GDK_PIXBUF_MODULE_FILE"))
+                  (wrap-program (string-append #$output "/bin/dev.geopjr.Tuba")
+                    `(,gstvar ":" suffix (,(getenv gstvar)))
+                    `(,pixvar ":" = (,(getenv pixvar)))))))
+            (add-after 'lib-vars-wrap 'symlink-package
               (lambda _
                 (with-directory-excursion
                   (string-append #$output "/bin")
                   (symlink "dev.geopjr.Tuba" "tuba")))))))
     (native-inputs
-     (list gettext-minimal
+     (list gdk-pixbuf ; so pixbuf loader cache (for webp) is generated
+           gettext-minimal
            `(,glib "bin") ; for glib-compile-resources
            pkg-config))
     (inputs
-     (list gtk
+     (list gst-plugins-bad
+           gst-plugins-base
+           gst-plugins-good
+           gstreamer
+           gtk
            gtksourceview
            json-glib
            libadwaita
@@ -119,7 +132,8 @@ (define-public tuba
            libsecret
            libwebp
            libxml2
-           vala))
+           vala
+           webp-pixbuf-loader))
     (home-page "https://tuba.geopjr.dev/")
     (synopsis "GTK client for Mastodon")
     (description "Tuba is a GTK client for Mastodon.  It provides a clean,
-- 
2.40.1





Information forwarded to guix-patches <at> gnu.org:
bug#64521; Package guix-patches. (Sat, 08 Jul 2023 16:58:02 GMT) Full text and rfc822 format available.

Message #20 received at 64521 <at> debbugs.gnu.org (full text, mbox):

From: Juliana Sims <juli <at> incana.org>
To: Lilah Tascheter <lilah <at> lunabee.space>
Cc: 64521 <64521 <at> debbugs.gnu.org>
Subject: Re: [PATCH 2/2] gnu: tuba: Fix videoplayer crash and webp support.
Date: Sat, 08 Jul 2023 12:57:01 -0400
[Message part 1 (text/plain, inline)]
This looks good to me - but of course, the final say is with the 
commiters :)

- Juli

[Message part 2 (text/html, inline)]

Reply sent to Maxim Cournoyer <maxim.cournoyer <at> gmail.com>:
You have taken responsibility. (Mon, 10 Jul 2023 04:42:02 GMT) Full text and rfc822 format available.

Notification sent to Lilah Tascheter <lilah <at> lunabee.space>:
bug acknowledged by developer. (Mon, 10 Jul 2023 04:42:02 GMT) Full text and rfc822 format available.

Message #25 received at 64521-done <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Lilah Tascheter <lilah <at> lunabee.space>
Cc: rg <at> raghavgururajan.name, liliana.prikler <at> gmail.com,
 64521-done <at> debbugs.gnu.org, juli <at> incana.org
Subject: Re: [PATCH 2/2] gnu: tuba: Fix videoplayer crash and webp support.
Date: Mon, 10 Jul 2023 00:40:57 -0400
Hello,

Lilah Tascheter <lilah <at> lunabee.space> writes:

> * gnu/packages/mastodon.scm (tuba)[arguments]<phases: Add lib-vars-wrap
>   phase to set GST_PLUGIN_SYSTEM_PATH and GDK_PIXBUF_MODULE_FILE
>   variables.
>
>   (tuba)[native-inputs]: Add gdk-pixbuf.
>   (tuba)[inputs]: Add gstreamer, plugins, and webp-pixbuf-loader.

Applied this one and the precedent commit as
753428d7939bb5840d9e230215312d4bd5d487d3 and
88027480b537b391b5089fb06889835510f33e59, with minor cosmetic edits
(such as removing the whitespace in the above commit message).

Well done! :-)

-- 
Thanks,
Maxim




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 07 Aug 2023 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 9 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.