unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCHES] Add totem
@ 2015-06-21  4:21 Mark H Weaver
  2015-06-22 19:24 ` Ludovic Courtès
  0 siblings, 1 reply; 13+ messages in thread
From: Mark H Weaver @ 2015-06-21  4:21 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 721 bytes --]

Hello Guix,

These patches add totem, a.k.a. GNOME Videos, and its prerequisites
grilo and grilo-plugins.  This patch set also depends on the 'clutter'
and 'gom' patch sets which I posted recently.

A few caveats: in order for totem to work properly, you must have
several other packages installed in your profile.  I'm not entirely sure
of the full set needed, but I guess it includes:

  grilo
  grilo-plugins
  gstreamer
  gst-plugins-base
  gst-plugins-good
  dconf

You will also need to set the GRL_PLUGIN_PATH and GST_PLUGIN_SYSTEM_PATH
environment variables as advised by "guix package --search-paths".

Obviously it would be nice for this to work more seamlessly.  Comments
and suggestions welcome.

      Mark


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: [PATCH 1/3] gnu: Add grilo --]
[-- Type: text/x-patch, Size: 2820 bytes --]

From 4bdac7f9e1ffeec6e3a2b26d366bfe8d71cd5ae2 Mon Sep 17 00:00:00 2001
From: Mark H Weaver <mhw@netris.org>
Date: Sat, 20 Jun 2015 19:34:50 -0400
Subject: [PATCH 1/3] gnu: Add grilo.

* gnu/packages/gnome.scm (grilo): New variable.
---
 gnu/packages/gnome.scm | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 3342ed6..9dcfc17 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -2686,3 +2686,54 @@ presentations, kiosk style applications and so on.")
 write applications that need to store structured data as well as make complex
 queries upon that data.")
     (license license:lgpl2.1+)))
+
+(define-public grilo
+  (package
+    (name "grilo")
+    (version "0.2.12")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://gnome/sources/" name "/"
+                           (version-major+minor version) "/"
+                           name "-" version ".tar.xz"))
+       (sha256
+        (base32
+         "11bvc7rsrjjwz8hp67p3fn8zmywrpawrcbi3vgw8b0dwa0sndd2m"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("glib:bin" ,glib "bin")         ; for glib-mkenums and glib-genmarshal
+       ("intltool" ,intltool)
+       ("pkg-config" ,pkg-config)
+       ("gobject-introspection" ,gobject-introspection)))
+    (inputs
+     `(("glib" ,glib)
+       ("gtk+" ,gtk+)
+       ("libxml2" ,libxml2)
+       ;; XXX TODO: Add oauth
+       ("libsoup" ,libsoup)
+       ("totem-pl-parser" ,totem-pl-parser)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fix-introspection-install-dir
+                    (lambda* (#:key outputs #:allow-other-keys)
+                      (let ((out (assoc-ref outputs "out")))
+                        (substitute* '("src/Makefile.in"
+                                       "libs/pls/Makefile.in"
+                                       "libs/net/Makefile.in")
+                          (("@INTROSPECTION_GIRDIR@")
+                           (string-append out "/share/gir-1.0/"))
+                          (("@INTROSPECTION_TYPELIBDIR@")
+                           (string-append out "/lib/girepository-1.0/")))))))))
+    (native-search-paths
+     (list (search-path-specification
+            (variable "GRL_PLUGIN_PATH")
+            (files (list (string-append "lib/grilo-"
+                                        (version-major+minor version)))))))
+    (home-page "http://live.gnome.org/Grilo")
+    (synopsis "Framework for discovering and browsing media")
+    (description
+     "Grilo is a framework focused on making media discovery and browsing easy
+for application developers.")
+    (license license:lgpl2.1+)))
-- 
2.4.3


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: [PATCH 2/3] gnu: Add grilo-plugins --]
[-- Type: text/x-patch, Size: 3281 bytes --]

From ba786fa3d1d7896336dca3b364bb630142c30fa1 Mon Sep 17 00:00:00 2001
From: Mark H Weaver <mhw@netris.org>
Date: Sat, 20 Jun 2015 21:09:54 -0400
Subject: [PATCH 2/3] gnu: Add grilo-plugins.

* gnu/packages/gnome.scm (grilo-plugins): New variable.
---
 gnu/packages/gnome.scm | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 9dcfc17..fa24e83 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -34,6 +34,7 @@
   #:use-module (guix build-system glib-or-gtk)
   #:use-module (gnu packages)
   #:use-module (gnu packages autotools)
+  #:use-module (gnu packages avahi)
   #:use-module (gnu packages base)
   #:use-module (gnu packages bison)
   #:use-module (gnu packages cups)
@@ -57,6 +58,7 @@
   #:use-module (gnu packages libcanberra)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages libusb)
+  #:use-module (gnu packages lua)
   #:use-module (gnu packages image)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
@@ -2737,3 +2739,56 @@ queries upon that data.")
      "Grilo is a framework focused on making media discovery and browsing easy
 for application developers.")
     (license license:lgpl2.1+)))
+
+(define-public grilo-plugins
+  (package
+    (name "grilo-plugins")
+    (version "0.2.14")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://gnome/sources/" name "/"
+                           (version-major+minor version) "/"
+                           name "-" version ".tar.xz"))
+       (sha256
+        (base32
+         "1aykhc679pwn2qxsg19g8nh9hffpsqkgxcbqq7lcfn2hcwb83wfh"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("glib:bin" ,glib "bin")     ; for glib-mkenums and glib-genmarshal
+       ("intltool" ,intltool)
+       ("itstool" ,itstool)
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("grilo" ,grilo)
+       ("glib" ,glib)
+       ("libxml2" ,libxml2)
+       ("sqlite" ,sqlite)
+       ("gom" ,gom)
+       ;; XXX TODO: Add oauth
+       ;; XXX TODO: Add goa
+       ;; XXX TODO: Add gdata (e.g. needed for youtube plugin)
+       ;; XXX TODO: Add lua (needs help finding it)
+       ("json-glib" ,json-glib)
+       ("avahi" ,avahi)
+       ("gmime" ,gmime)
+       ("libsoup" ,libsoup)
+       ("libarchive" ,libarchive)
+       ("totem-pl-parser" ,totem-pl-parser)))
+    (arguments
+     `(#:make-flags (list (string-append "GRL_PLUGINS_DIR="
+                                         %output
+                                         "/lib/grilo-"
+                                         ,(version-major+minor version)))
+       ;; XXX FIXME: Investigate test failure:
+       ;;   TEST: test_apple_trailers... (pid=8718)
+       ;;     /apple-trailers/browse/count:
+       ;;   ERROR:test_apple_trailers.c:88:test_browse_count: assertion failed: (source)
+       ;;   FAIL
+       #:tests? #f))
+    (home-page "http://live.gnome.org/Grilo")
+    (synopsis "Framework for discovering and browsing media - Plugins")
+    (description
+     "Grilo is a framework focused on making media discovery and browsing easy
+for application developers.")
+    (license license:lgpl2.1+)))
-- 
2.4.3


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: [PATCH 3/3] gnu: Add totem --]
[-- Type: text/x-patch, Size: 3369 bytes --]

From 2bbcefc85149fa4d6b8513de26fc4ba749e4111b Mon Sep 17 00:00:00 2001
From: Mark H Weaver <mhw@netris.org>
Date: Sat, 20 Jun 2015 18:26:34 -0400
Subject: [PATCH 3/3] gnu: Add totem.

* gnu/packages/gnome.scm (totem): New variable.
---
 gnu/packages/gnome.scm | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 64 insertions(+)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index fa24e83..308a7e2 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -58,6 +58,7 @@
   #:use-module (gnu packages libcanberra)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages libusb)
+  #:use-module (gnu packages lirc)
   #:use-module (gnu packages lua)
   #:use-module (gnu packages image)
   #:use-module (gnu packages perl)
@@ -2792,3 +2793,66 @@ for application developers.")
      "Grilo is a framework focused on making media discovery and browsing easy
 for application developers.")
     (license license:lgpl2.1+)))
+
+(define-public totem
+  (package
+    (name "totem")
+    (version "3.16.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://gnome/sources/" name "/"
+                           (version-major+minor version) "/"
+                           name "-" version ".tar.xz"))
+       (sha256
+        (base32
+         "1nkm2i271ivq40hryrl6px39gbbvhmlx4vmvwvw4h3z8xh3013f9"))))
+    (build-system glib-or-gtk-build-system)
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("desktop-file-utils" ,desktop-file-utils)
+       ("intltool" ,intltool)
+       ("itstool" ,itstool)))
+    (inputs
+     `(("gtk+" ,gtk+)
+       ("gdk-pixbuf" ,gdk-pixbuf)
+       ("atk" ,atk)
+       ("cairo" ,cairo)
+       ("dbus-glib" ,dbus-glib)
+       ("clutter" ,clutter)
+       ("clutter-gtk" ,clutter-gtk)
+       ("clutter-gst" ,clutter-gst)
+       ("xproto" ,xproto)
+       ("libxxf86vm" ,libxxf86vm)
+       ("libxtst" ,libxtst)
+       ("libxrandr" ,libxrandr)
+       ("libxml2" ,libxml2)
+       ("libsoup" ,libsoup)
+       ("libpeas" ,libpeas)
+       ("librsvg" ,librsvg)
+       ("lirc" ,lirc)
+       ("gnome-desktop" ,gnome-desktop)
+       ("gstreamer" ,gstreamer)
+       ("gst-plugins-base" ,gst-plugins-base)
+       ("gst-plugins-good" ,gst-plugins-good)
+       ("dconf" ,dconf)
+       ("gobject-introspection" ,gobject-introspection)
+       ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
+       ("adwaita-icon-theme" ,adwaita-icon-theme)
+       ;; XXX We use python-2 because libxml2 because itstool (which needs
+       ;; libxml) currently uses python-2.
+       ("python" ,python-2)
+       ("python-pygobject" ,python2-pygobject)
+       ;; XXX TODO pylint needed for python support
+       ("totem-pl-parser" ,totem-pl-parser)
+       ("grilo" ,grilo)
+       ("nettle" ,nettle)
+       ("vala" ,vala)))
+    (home-page "https://wiki.gnome.org/Apps/Videos")
+    (synopsis "Simple media player for GNOME based on GStreamer")
+    (description "Totem is a simple yet featureful media player for GNOME
+which can read a large number of file formats.")
+    ;; GPL2+ with an exception clause for non-GPL compatible GStreamer plugins
+    ;; to be used and distributed together with GStreamer and Totem.  See
+    ;; file://COPYING in the source distribution for details.
+    (license license:gpl2+)))
-- 
2.4.3


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCHES] Add totem
  2015-06-21  4:21 [PATCHES] Add totem Mark H Weaver
@ 2015-06-22 19:24 ` Ludovic Courtès
  2015-06-24  5:58   ` How to handle required plugins and dbus services for GNOME Programs? Mark H Weaver
  2015-06-24  6:06   ` [PATCHES] Add totem Mark H Weaver
  0 siblings, 2 replies; 13+ messages in thread
From: Ludovic Courtès @ 2015-06-22 19:24 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: guix-devel

Mark H Weaver <mhw@netris.org> skribis:

> A few caveats: in order for totem to work properly, you must have
> several other packages installed in your profile.  I'm not entirely sure
> of the full set needed, but I guess it includes:
>
>   grilo
>   grilo-plugins
>   gstreamer
>   gst-plugins-base
>   gst-plugins-good
>   dconf
>
> You will also need to set the GRL_PLUGIN_PATH and GST_PLUGIN_SYSTEM_PATH
> environment variables as advised by "guix package --search-paths".

I can imagine why the plugins package need to be in the profile, but I
find the others more surprising.  Do you know what happens?  Are Grilo,
GStreamer, and DConf dlopened, or is it just to get the right search
path recommendation that they are needed?

> From 4bdac7f9e1ffeec6e3a2b26d366bfe8d71cd5ae2 Mon Sep 17 00:00:00 2001
> From: Mark H Weaver <mhw@netris.org>
> Date: Sat, 20 Jun 2015 19:34:50 -0400
> Subject: [PATCH 1/3] gnu: Add grilo.
>
> * gnu/packages/gnome.scm (grilo): New variable.

LGTM.

> From ba786fa3d1d7896336dca3b364bb630142c30fa1 Mon Sep 17 00:00:00 2001
> From: Mark H Weaver <mhw@netris.org>
> Date: Sat, 20 Jun 2015 21:09:54 -0400
> Subject: [PATCH 2/3] gnu: Add grilo-plugins.
>
> * gnu/packages/gnome.scm (grilo-plugins): New variable.

[...]

> +     `(#:make-flags (list (string-append "GRL_PLUGINS_DIR="
> +                                         %output
> +                                         "/lib/grilo-"
> +                                         ,(version-major+minor version)))
> +       ;; XXX FIXME: Investigate test failure:
> +       ;;   TEST: test_apple_trailers... (pid=8718)
> +       ;;     /apple-trailers/browse/count:
> +       ;;   ERROR:test_apple_trailers.c:88:test_browse_count: assertion failed: (source)
> +       ;;   FAIL
> +       #:tests? #f))

Would it be OK to skip just this for now?  If that’s too much, we can
leave it for later.

> +    (synopsis "Framework for discovering and browsing media - Plugins")

Maybe “Plugins for the Grilo media discovery library”?

> From 2bbcefc85149fa4d6b8513de26fc4ba749e4111b Mon Sep 17 00:00:00 2001
> From: Mark H Weaver <mhw@netris.org>
> Date: Sat, 20 Jun 2015 18:26:34 -0400
> Subject: [PATCH 3/3] gnu: Add totem.
>
> * gnu/packages/gnome.scm (totem): New variable.

OK.

Thank you!

Ludo’.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* How to handle required plugins and dbus services for GNOME Programs?
  2015-06-22 19:24 ` Ludovic Courtès
@ 2015-06-24  5:58   ` Mark H Weaver
  2015-06-24 15:45     ` 宋文武
                       ` (3 more replies)
  2015-06-24  6:06   ` [PATCHES] Add totem Mark H Weaver
  1 sibling, 4 replies; 13+ messages in thread
From: Mark H Weaver @ 2015-06-24  5:58 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

ludo@gnu.org (Ludovic Courtès) writes:

> Mark H Weaver <mhw@netris.org> skribis:
>
>> A few caveats: in order for totem to work properly, you must have
>> several other packages installed in your profile.  I'm not entirely sure
>> of the full set needed, but I guess it includes:
>>
>>   grilo
>>   grilo-plugins
>>   gstreamer
>>   gst-plugins-base
>>   gst-plugins-good
>>   dconf
>>
>> You will also need to set the GRL_PLUGIN_PATH and GST_PLUGIN_SYSTEM_PATH
>> environment variables as advised by "guix package --search-paths".
>
> I can imagine why the plugins package need to be in the profile, but I
> find the others more surprising.  Do you know what happens?  Are Grilo,
> GStreamer, and DConf dlopened, or is it just to get the right search
> path recommendation that they are needed?

Actually, it turns out that 'grilo' doesn't need to be in the profile,
although if you don't have it you won't get the search path
recommendation which is crucial for Totem to work properly.

'gstreamer' is a propagated-input of 'gst-plugins-base', so you don't
need to explicitly install it and I'm not sure what would happen if it
were removed.

'dconf' apparently needs to be in the profile for both GNOME Terminal
and Totem because of the session dbus service(s) it provides.  Without
it, modern GNOME programs behave quite badly.  They have no way to
access or change their own configuration settings, e.g. if you go into
their preferences, you see checkboxes that do not change their state
when clicked.

I'm not sure how best to deal with issues like this, and also with
things like grilo-plugins and gst-plugins-* that are needed for the
proper functioning of Totem.  Should we make them propagated-inputs?

Or perhaps they should be normal inputs and we should use a wrapper to
add those directories as suffixes to GRL_PLUGIN_PATH and
GST_PLUGIN_SYSTEM_PATH automatically?

What do you think?

      Mark

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCHES] Add totem
  2015-06-22 19:24 ` Ludovic Courtès
  2015-06-24  5:58   ` How to handle required plugins and dbus services for GNOME Programs? Mark H Weaver
@ 2015-06-24  6:06   ` Mark H Weaver
  2015-06-24 20:21     ` Ludovic Courtès
  1 sibling, 1 reply; 13+ messages in thread
From: Mark H Weaver @ 2015-06-24  6:06 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

ludo@gnu.org (Ludovic Courtès) writes:

>> From ba786fa3d1d7896336dca3b364bb630142c30fa1 Mon Sep 17 00:00:00 2001
>> From: Mark H Weaver <mhw@netris.org>
>> Date: Sat, 20 Jun 2015 21:09:54 -0400
>> Subject: [PATCH 2/3] gnu: Add grilo-plugins.
>>
>> * gnu/packages/gnome.scm (grilo-plugins): New variable.
>
> [...]
>
>> +     `(#:make-flags (list (string-append "GRL_PLUGINS_DIR="
>> +                                         %output
>> +                                         "/lib/grilo-"
>> +                                         ,(version-major+minor version)))
>> +       ;; XXX FIXME: Investigate test failure:
>> +       ;;   TEST: test_apple_trailers... (pid=8718)
>> +       ;;     /apple-trailers/browse/count:
>> +       ;;   ERROR:test_apple_trailers.c:88:test_browse_count: assertion failed: (source)
>> +       ;;   FAIL
>> +       #:tests? #f))
>
> Would it be OK to skip just this for now?  If that’s too much, we can
> leave it for later.

"make check" aborts after this failure, which is the first test.  I
tried "make -k check" and found that _all_ tests fail with the same
assertion failure when run in the build container.

However, if I run "make -k check" on the failed build directory in
/tmp/nix-build-* from outside of the build container, all but one of the
tests succeeds.  This when using the precise environment variable
settings from the build and no others.  Using strace, I found that it
was accessing the system dbus, so I guess that's the problem.

>> +    (synopsis "Framework for discovering and browsing media - Plugins")
>
> Maybe “Plugins for the Grilo media discovery library”?

Yes, that's better, thanks!

I'm going to hold off on pushing grilo{-plugins} and totem until the
'nettle-fix' branch is merged (it fixes gst-libav on x86_64), and also
to get more feedback on how best to handle totem's required plugins and
dbus services.

      Thanks,
        Mark

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: How to handle required plugins and dbus services for GNOME Programs?
  2015-06-24  5:58   ` How to handle required plugins and dbus services for GNOME Programs? Mark H Weaver
@ 2015-06-24 15:45     ` 宋文武
  2015-06-25  4:07       ` Mark H Weaver
  2015-06-24 20:47     ` Ludovic Courtès
                       ` (2 subsequent siblings)
  3 siblings, 1 reply; 13+ messages in thread
From: 宋文武 @ 2015-06-24 15:45 UTC (permalink / raw)
  To: Mark H Weaver, Ludovic Courtès; +Cc: guix-devel

Mark H Weaver <mhw@netris.org> writes:

> ludo@gnu.org (Ludovic Courtès) writes:
>
>> Mark H Weaver <mhw@netris.org> skribis:
>>
>>> A few caveats: in order for totem to work properly, you must have
>>> several other packages installed in your profile.  I'm not entirely sure
>>> of the full set needed, but I guess it includes:
>>>
>>>   grilo
>>>   grilo-plugins
>>>   gstreamer
>>>   gst-plugins-base
>>>   gst-plugins-good
>>>   dconf
>>>
>>> You will also need to set the GRL_PLUGIN_PATH and GST_PLUGIN_SYSTEM_PATH
>>> environment variables as advised by "guix package --search-paths".
>>
>> I can imagine why the plugins package need to be in the profile, but I
>> find the others more surprising.  Do you know what happens?  Are Grilo,
>> GStreamer, and DConf dlopened, or is it just to get the right search
>> path recommendation that they are needed?
>
> Actually, it turns out that 'grilo' doesn't need to be in the profile,
> although if you don't have it you won't get the search path
> recommendation which is crucial for Totem to work properly.
According to ArchLinux, grilo-plugins is used for media discovery.
Which is optional. I'm ok to add it though.
>
> 'gstreamer' is a propagated-input of 'gst-plugins-base', so you don't
> need to explicitly install it and I'm not sure what would happen if it
> were removed.
It's safe to remove 'gstreamer' from inputs.
>
> 'dconf' apparently needs to be in the profile for both GNOME Terminal
> and Totem because of the session dbus service(s) it provides.  Without
> it, modern GNOME programs behave quite badly.  They have no way to
> access or change their own configuration settings, e.g. if you go into
> their preferences, you see checkboxes that do not change their state
> when clicked.
Yes, dconf must in profile to be known to dbus-daemon (user sesssion).
It's loaded by dbus-daemon when needed.

https://developer.gnome.org/dconf/unstable/dconf-service.html
>
> I'm not sure how best to deal with issues like this, and also with
> things like grilo-plugins and gst-plugins-* that are needed for the
> proper functioning of Totem.  Should we make them propagated-inputs?
>
> Or perhaps they should be normal inputs and we should use a wrapper to
> add those directories as suffixes to GRL_PLUGIN_PATH and
> GST_PLUGIN_SYSTEM_PATH automatically?
Given that plugins only needed at runtime, how about make a 'raw' totem
package without wrapper and propagation, and a public one wrap it with
envs?  Thus avoid the rebuild of the raw totem package if plugins was
changed.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCHES] Add totem
  2015-06-24  6:06   ` [PATCHES] Add totem Mark H Weaver
@ 2015-06-24 20:21     ` Ludovic Courtès
  0 siblings, 0 replies; 13+ messages in thread
From: Ludovic Courtès @ 2015-06-24 20:21 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: guix-devel

Mark H Weaver <mhw@netris.org> skribis:

> ludo@gnu.org (Ludovic Courtès) writes:
>
>>> From ba786fa3d1d7896336dca3b364bb630142c30fa1 Mon Sep 17 00:00:00 2001
>>> From: Mark H Weaver <mhw@netris.org>
>>> Date: Sat, 20 Jun 2015 21:09:54 -0400
>>> Subject: [PATCH 2/3] gnu: Add grilo-plugins.
>>>
>>> * gnu/packages/gnome.scm (grilo-plugins): New variable.
>>
>> [...]
>>
>>> +     `(#:make-flags (list (string-append "GRL_PLUGINS_DIR="
>>> +                                         %output
>>> +                                         "/lib/grilo-"
>>> +                                         ,(version-major+minor version)))
>>> +       ;; XXX FIXME: Investigate test failure:
>>> +       ;;   TEST: test_apple_trailers... (pid=8718)
>>> +       ;;     /apple-trailers/browse/count:
>>> +       ;;   ERROR:test_apple_trailers.c:88:test_browse_count: assertion failed: (source)
>>> +       ;;   FAIL
>>> +       #:tests? #f))
>>
>> Would it be OK to skip just this for now?  If that’s too much, we can
>> leave it for later.
>
> "make check" aborts after this failure, which is the first test.  I
> tried "make -k check" and found that _all_ tests fail with the same
> assertion failure when run in the build container.
>
> However, if I run "make -k check" on the failed build directory in
> /tmp/nix-build-* from outside of the build container, all but one of the
> tests succeeds.  This when using the precise environment variable
> settings from the build and no others.  Using strace, I found that it
> was accessing the system dbus, so I guess that's the problem.

Ah OK.  It’s really a bug in their test framework IMO.  It’s probably OK
to punt on this one and document these findings in the comment.

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: How to handle required plugins and dbus services for GNOME Programs?
  2015-06-24  5:58   ` How to handle required plugins and dbus services for GNOME Programs? Mark H Weaver
  2015-06-24 15:45     ` 宋文武
@ 2015-06-24 20:47     ` Ludovic Courtès
  2015-06-25  5:00     ` David Hashe
  2015-07-09  6:30     ` Mark H Weaver
  3 siblings, 0 replies; 13+ messages in thread
From: Ludovic Courtès @ 2015-06-24 20:47 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: guix-devel

Mark H Weaver <mhw@netris.org> skribis:

> ludo@gnu.org (Ludovic Courtès) writes:

[...]

>> I can imagine why the plugins package need to be in the profile, but I
>> find the others more surprising.  Do you know what happens?  Are Grilo,
>> GStreamer, and DConf dlopened, or is it just to get the right search
>> path recommendation that they are needed?
>
> Actually, it turns out that 'grilo' doesn't need to be in the profile,
> although if you don't have it you won't get the search path
> recommendation which is crucial for Totem to work properly.

OK.

I wonder if search path recommendations should work “deeper” somehow.
Because currently there’s always a problem when the search path
specification is attached to a library (GST_*, GRL_*) rather than to an
executable (CPATH, GUILE_LOAD_PATH, etc.)

The difficulty is that, ideally, the propagation of search path
specifications would be based on the run-time dependencies, not the
compile-time dependencies.

Thoughts?

> 'gstreamer' is a propagated-input of 'gst-plugins-base', so you don't
> need to explicitly install it and I'm not sure what would happen if it
> were removed.
>
> 'dconf' apparently needs to be in the profile for both GNOME Terminal
> and Totem because of the session dbus service(s) it provides.  Without
> it, modern GNOME programs behave quite badly.  They have no way to
> access or change their own configuration settings, e.g. if you go into
> their preferences, you see checkboxes that do not change their state
> when clicked.

Really?  In Evince, I can change the state of various things (such as
whether or not to view documents continuously), but those changes are
lost across restarts.  However, changes made via dconf-editor are not
lost.  Weird no?

> I'm not sure how best to deal with issues like this, and also with
> things like grilo-plugins and gst-plugins-* that are needed for the
> proper functioning of Totem.  Should we make them propagated-inputs?

Are they required, or is it just that fewer features/file formats are
supported when they’re unavailable?

They could be propagated, but one would still need to know about these
environment variables.

> Or perhaps they should be normal inputs and we should use a wrapper to
> add those directories as suffixes to GRL_PLUGIN_PATH and
> GST_PLUGIN_SYSTEM_PATH automatically?

If they are required, that may be best.

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: How to handle required plugins and dbus services for GNOME Programs?
  2015-06-24 15:45     ` 宋文武
@ 2015-06-25  4:07       ` Mark H Weaver
  2015-06-25  7:42         ` 宋文武
  0 siblings, 1 reply; 13+ messages in thread
From: Mark H Weaver @ 2015-06-25  4:07 UTC (permalink / raw)
  To: 宋文武; +Cc: guix-devel

宋文武 <iyzsong@gmail.com> writes:
>> Actually, it turns out that 'grilo' doesn't need to be in the profile,
>> although if you don't have it you won't get the search path
>> recommendation which is crucial for Totem to work properly.
> According to ArchLinux, grilo-plugins is used for media discovery.
> Which is optional. I'm ok to add it though.

Without the grl-bookmarks grilo plugin, attempts to add local video
files to the playlist via the GUI interface silently fail.  See:

  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=768515

I ran into this problem before I packaged 'gom'.  So, although it is
still possible to play local videos by running "totem <filename>", I
would say that Totem malfunctions quite badly even for basic usage
without grilo-plugins.

>> 'gstreamer' is a propagated-input of 'gst-plugins-base', so you don't
>> need to explicitly install it and I'm not sure what would happen if it
>> were removed.
> It's safe to remove 'gstreamer' from inputs.

I don't understand.  Do you mean that it's safe to remove 'gstreamer'
from the inputs of some package?  Which package?

>> 'dconf' apparently needs to be in the profile for both GNOME Terminal
>> and Totem because of the session dbus service(s) it provides.  Without
>> it, modern GNOME programs behave quite badly.  They have no way to
>> access or change their own configuration settings, e.g. if you go into
>> their preferences, you see checkboxes that do not change their state
>> when clicked.
> Yes, dconf must in profile to be known to dbus-daemon (user sesssion).
> It's loaded by dbus-daemon when needed.
>
> https://developer.gnome.org/dconf/unstable/dconf-service.html
>>
>> I'm not sure how best to deal with issues like this, and also with
>> things like grilo-plugins and gst-plugins-* that are needed for the
>> proper functioning of Totem.  Should we make them propagated-inputs?
>>
>> Or perhaps they should be normal inputs and we should use a wrapper to
>> add those directories as suffixes to GRL_PLUGIN_PATH and
>> GST_PLUGIN_SYSTEM_PATH automatically?
> Given that plugins only needed at runtime, how about make a 'raw' totem
> package without wrapper and propagation, and a public one wrap it with
> envs?  Thus avoid the rebuild of the raw totem package if plugins was
> changed.

I'm not sure it would be worth it.  Totem itself doesn't take very long
to build.

     Mark

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: How to handle required plugins and dbus services for GNOME Programs?
  2015-06-24  5:58   ` How to handle required plugins and dbus services for GNOME Programs? Mark H Weaver
  2015-06-24 15:45     ` 宋文武
  2015-06-24 20:47     ` Ludovic Courtès
@ 2015-06-25  5:00     ` David Hashe
  2015-07-09  6:30     ` Mark H Weaver
  3 siblings, 0 replies; 13+ messages in thread
From: David Hashe @ 2015-06-25  5:00 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 2344 bytes --]

It's worth noting that these same questions appear in the Rhythmbox patch I
submitted earlier this week, so I'll be watching what we decide here for
guidance on how to improve that patch.

Thanks,
David

On Wed, Jun 24, 2015 at 12:58 AM, Mark H Weaver <mhw@netris.org> wrote:

> ludo@gnu.org (Ludovic Courtès) writes:
>
> > Mark H Weaver <mhw@netris.org> skribis:
> >
> >> A few caveats: in order for totem to work properly, you must have
> >> several other packages installed in your profile.  I'm not entirely sure
> >> of the full set needed, but I guess it includes:
> >>
> >>   grilo
> >>   grilo-plugins
> >>   gstreamer
> >>   gst-plugins-base
> >>   gst-plugins-good
> >>   dconf
> >>
> >> You will also need to set the GRL_PLUGIN_PATH and GST_PLUGIN_SYSTEM_PATH
> >> environment variables as advised by "guix package --search-paths".
> >
> > I can imagine why the plugins package need to be in the profile, but I
> > find the others more surprising.  Do you know what happens?  Are Grilo,
> > GStreamer, and DConf dlopened, or is it just to get the right search
> > path recommendation that they are needed?
>
> Actually, it turns out that 'grilo' doesn't need to be in the profile,
> although if you don't have it you won't get the search path
> recommendation which is crucial for Totem to work properly.
>
> 'gstreamer' is a propagated-input of 'gst-plugins-base', so you don't
> need to explicitly install it and I'm not sure what would happen if it
> were removed.
>
> 'dconf' apparently needs to be in the profile for both GNOME Terminal
> and Totem because of the session dbus service(s) it provides.  Without
> it, modern GNOME programs behave quite badly.  They have no way to
> access or change their own configuration settings, e.g. if you go into
> their preferences, you see checkboxes that do not change their state
> when clicked.
>
> I'm not sure how best to deal with issues like this, and also with
> things like grilo-plugins and gst-plugins-* that are needed for the
> proper functioning of Totem.  Should we make them propagated-inputs?
>
> Or perhaps they should be normal inputs and we should use a wrapper to
> add those directories as suffixes to GRL_PLUGIN_PATH and
> GST_PLUGIN_SYSTEM_PATH automatically?
>
> What do you think?
>
>       Mark
>
>

[-- Attachment #2: Type: text/html, Size: 3096 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: How to handle required plugins and dbus services for GNOME Programs?
  2015-06-25  4:07       ` Mark H Weaver
@ 2015-06-25  7:42         ` 宋文武
  0 siblings, 0 replies; 13+ messages in thread
From: 宋文武 @ 2015-06-25  7:42 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: guix-devel

Mark H Weaver <mhw@netris.org> writes:

> 宋文武 <iyzsong@gmail.com> writes:
>>> Actually, it turns out that 'grilo' doesn't need to be in the profile,
>>> although if you don't have it you won't get the search path
>>> recommendation which is crucial for Totem to work properly.
>> According to ArchLinux, grilo-plugins is used for media discovery.
>> Which is optional. I'm ok to add it though.
>
> Without the grl-bookmarks grilo plugin, attempts to add local video
> files to the playlist via the GUI interface silently fail.  See:
>
>   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=768515
>
> I ran into this problem before I packaged 'gom'.  So, although it is
> still possible to play local videos by running "totem <filename>", I
> would say that Totem malfunctions quite badly even for basic usage
> without grilo-plugins.
So grilo-plugins is really a curcial dep, thanks for explaination.
>
>>> 'gstreamer' is a propagated-input of 'gst-plugins-base', so you don't
>>> need to explicitly install it and I'm not sure what would happen if it
>>> were removed.
>> It's safe to remove 'gstreamer' from inputs.
>
> I don't understand.  Do you mean that it's safe to remove 'gstreamer'
> from the inputs of some package?  Which package?
I mean totem, sorry for the confusion.
>
>>> 'dconf' apparently needs to be in the profile for both GNOME Terminal
>>> and Totem because of the session dbus service(s) it provides.  Without
>>> it, modern GNOME programs behave quite badly.  They have no way to
>>> access or change their own configuration settings, e.g. if you go into
>>> their preferences, you see checkboxes that do not change their state
>>> when clicked.
>> Yes, dconf must in profile to be known to dbus-daemon (user sesssion).
>> It's loaded by dbus-daemon when needed.
>>
>> https://developer.gnome.org/dconf/unstable/dconf-service.html
>>>
>>> I'm not sure how best to deal with issues like this, and also with
>>> things like grilo-plugins and gst-plugins-* that are needed for the
>>> proper functioning of Totem.  Should we make them propagated-inputs?
>>>
>>> Or perhaps they should be normal inputs and we should use a wrapper to
>>> add those directories as suffixes to GRL_PLUGIN_PATH and
>>> GST_PLUGIN_SYSTEM_PATH automatically?
>> Given that plugins only needed at runtime, how about make a 'raw' totem
>> package without wrapper and propagation, and a public one wrap it with
>> envs?  Thus avoid the rebuild of the raw totem package if plugins was
>> changed.
>
> I'm not sure it would be worth it.  Totem itself doesn't take very long
> to build.
OK.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: How to handle required plugins and dbus services for GNOME Programs?
  2015-06-24  5:58   ` How to handle required plugins and dbus services for GNOME Programs? Mark H Weaver
                       ` (2 preceding siblings ...)
  2015-06-25  5:00     ` David Hashe
@ 2015-07-09  6:30     ` Mark H Weaver
  2015-07-09 13:00       ` 宋文武
  2015-07-10 21:24       ` Ludovic Courtès
  3 siblings, 2 replies; 13+ messages in thread
From: Mark H Weaver @ 2015-07-09  6:30 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 1693 bytes --]

Mark H Weaver <mhw@netris.org> writes:

> 'dconf' apparently needs to be in the profile for both GNOME Terminal
> and Totem because of the session dbus service(s) it provides.  Without
> it, modern GNOME programs behave quite badly.  They have no way to
> access or change their own configuration settings, e.g. if you go into
> their preferences, you see checkboxes that do not change their state
> when clicked.
>
> I'm not sure how best to deal with issues like this, and also with
> things like grilo-plugins and gst-plugins-* that are needed for the
> proper functioning of Totem.  Should we make them propagated-inputs?
>
> Or perhaps they should be normal inputs and we should use a wrapper to
> add those directories as suffixes to GRL_PLUGIN_PATH and
> GST_PLUGIN_SYSTEM_PATH automatically?
>
> What do you think?

So, at this point my inclination is to do the following:

* Add 'dconf' to the propagated-inputs of 'totem', since totem needs
  dconf services to be available on the user session D-Bus.

* Add a wrapper for 'totem' that add prefixes to both
  GST_PLUGIN_SYSTEM_PATH and GRL_PLUGIN_PATH to ensure reliable access
  to a baseline set of plugins needed for proper functioning of 'totem'.
  This includes grilo-plugins, gst-plugins-base, and gst-plugins-good.
  IMO, this hard-coded set of plugins should exclude patent-encumbered
  codecs, so no gst-libav or gst-plugins-ugly.

Please see the attached 'totem' package.  To simplify things, the values
of the GST_PLUGIN_SYSTEM_PATH and GRL_PLUGIN_PATH environment variables
are taken directly from the build environment (using 'getenv') and
propagated unchanged into the created wrapper.

What do you think?

      Mark



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: [PATCH] gnu: Add totem --]
[-- Type: text/x-patch, Size: 4054 bytes --]

From f1cbb55b1dd87bffd34d77cf6e1e68f33c38b9e0 Mon Sep 17 00:00:00 2001
From: Mark H Weaver <mhw@netris.org>
Date: Sat, 20 Jun 2015 18:26:34 -0400
Subject: [PATCH] gnu: Add totem.

* gnu/packages/gnome.scm (totem): New variable.
---
 gnu/packages/gnome.scm | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 79 insertions(+)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 30277f5..3142506 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -57,6 +57,7 @@
   #:use-module (gnu packages libcanberra)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages libusb)
+  #:use-module (gnu packages lirc)
   #:use-module (gnu packages lua)
   #:use-module (gnu packages image)
   #:use-module (gnu packages perl)
@@ -2823,3 +2824,81 @@ for application developers.")
      "Grilo is a framework focused on making media discovery and browsing easy
 for application developers.")
     (license license:lgpl2.1+)))
+
+(define-public totem
+  (package
+    (name "totem")
+    (version "3.16.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://gnome/sources/" name "/"
+                           (version-major+minor version) "/"
+                           name "-" version ".tar.xz"))
+       (sha256
+        (base32
+         "1nkm2i271ivq40hryrl6px39gbbvhmlx4vmvwvw4h3z8xh3013f9"))))
+    (build-system glib-or-gtk-build-system)
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("desktop-file-utils" ,desktop-file-utils)
+       ("gobject-introspection" ,gobject-introspection)
+       ("intltool" ,intltool)
+       ("itstool" ,itstool)))
+    (propagated-inputs
+     `(("dconf" ,dconf)))
+    (inputs
+     `(("gtk+" ,gtk+)
+       ("gdk-pixbuf" ,gdk-pixbuf)
+       ("atk" ,atk)
+       ("cairo" ,cairo)
+       ("dbus-glib" ,dbus-glib)
+       ("clutter" ,clutter)
+       ("clutter-gtk" ,clutter-gtk)
+       ("clutter-gst" ,clutter-gst)
+       ("xproto" ,xproto)
+       ("libxxf86vm" ,libxxf86vm)
+       ("libxtst" ,libxtst)
+       ("libxrandr" ,libxrandr)
+       ("libxml2" ,libxml2)
+       ("libsoup" ,libsoup)
+       ("libpeas" ,libpeas)
+       ("librsvg" ,librsvg)
+       ("lirc" ,lirc)
+       ("gnome-desktop" ,gnome-desktop)
+       ("gstreamer" ,gstreamer)
+       ("gst-plugins-base" ,gst-plugins-base)
+       ("gst-plugins-good" ,gst-plugins-good)
+       ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
+       ("adwaita-icon-theme" ,adwaita-icon-theme)
+       ;; XXX We use python-2 because libxml2 because itstool (which needs
+       ;; libxml) currently uses python-2.
+       ("python" ,python-2)
+       ("python-pygobject" ,python2-pygobject)
+       ;; XXX TODO pylint needed for python support
+       ("totem-pl-parser" ,totem-pl-parser)
+       ("grilo" ,grilo)
+       ("grilo-plugins" ,grilo-plugins)
+       ("nettle" ,nettle)
+       ("vala" ,vala)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after
+          'install 'wrap-totem
+          (lambda* (#:key inputs outputs #:allow-other-keys)
+            (let ((out             (assoc-ref outputs "out"))
+                  (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH"))
+                  (grl-plugin-path (getenv "GRL_PLUGIN_PATH")))
+              (wrap-program (string-append out "/bin/totem")
+                `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path))
+                `("GRL_PLUGIN_PATH"        ":" prefix (,grl-plugin-path))))
+            #t)))))
+    (home-page "https://wiki.gnome.org/Apps/Videos")
+    (synopsis "Simple media player for GNOME based on GStreamer")
+    (description "Totem is a simple yet featureful media player for GNOME
+which can read a large number of file formats.")
+    ;; GPL2+ with an exception clause for non-GPL compatible GStreamer plugins
+    ;; to be used and distributed together with GStreamer and Totem.  See
+    ;; file://COPYING in the source distribution for details.
+    (license license:gpl2+)))
-- 
2.4.3


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: How to handle required plugins and dbus services for GNOME Programs?
  2015-07-09  6:30     ` Mark H Weaver
@ 2015-07-09 13:00       ` 宋文武
  2015-07-10 21:24       ` Ludovic Courtès
  1 sibling, 0 replies; 13+ messages in thread
From: 宋文武 @ 2015-07-09 13:00 UTC (permalink / raw)
  To: Mark H Weaver, Ludovic Courtès; +Cc: guix-devel

Mark H Weaver <mhw@netris.org> writes:

[...]
> So, at this point my inclination is to do the following:
>
> * Add 'dconf' to the propagated-inputs of 'totem', since totem needs
>   dconf services to be available on the user session D-Bus.
>
> * Add a wrapper for 'totem' that add prefixes to both
>   GST_PLUGIN_SYSTEM_PATH and GRL_PLUGIN_PATH to ensure reliable access
>   to a baseline set of plugins needed for proper functioning of 'totem'.
>   This includes grilo-plugins, gst-plugins-base, and gst-plugins-good.
>   IMO, this hard-coded set of plugins should exclude patent-encumbered
>   codecs, so no gst-libav or gst-plugins-ugly.
>
> Please see the attached 'totem' package.  To simplify things, the values
> of the GST_PLUGIN_SYSTEM_PATH and GRL_PLUGIN_PATH environment variables
> are taken directly from the build environment (using 'getenv') and
> propagated unchanged into the created wrapper.
>
> What do you think?
Look great!

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: How to handle required plugins and dbus services for GNOME Programs?
  2015-07-09  6:30     ` Mark H Weaver
  2015-07-09 13:00       ` 宋文武
@ 2015-07-10 21:24       ` Ludovic Courtès
  1 sibling, 0 replies; 13+ messages in thread
From: Ludovic Courtès @ 2015-07-10 21:24 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: guix-devel

Mark H Weaver <mhw@netris.org> skribis:

> So, at this point my inclination is to do the following:
>
> * Add 'dconf' to the propagated-inputs of 'totem', since totem needs
>   dconf services to be available on the user session D-Bus.
>
> * Add a wrapper for 'totem' that add prefixes to both
>   GST_PLUGIN_SYSTEM_PATH and GRL_PLUGIN_PATH to ensure reliable access
>   to a baseline set of plugins needed for proper functioning of 'totem'.
>   This includes grilo-plugins, gst-plugins-base, and gst-plugins-good.
>   IMO, this hard-coded set of plugins should exclude patent-encumbered
>   codecs, so no gst-libav or gst-plugins-ugly.
>
> Please see the attached 'totem' package.  To simplify things, the values
> of the GST_PLUGIN_SYSTEM_PATH and GRL_PLUGIN_PATH environment variables
> are taken directly from the build environment (using 'getenv') and
> propagated unchanged into the created wrapper.
>
> What do you think?

Sounds good.  Thanks for moving forward!

Ludo’.

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2015-07-10 21:24 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-21  4:21 [PATCHES] Add totem Mark H Weaver
2015-06-22 19:24 ` Ludovic Courtès
2015-06-24  5:58   ` How to handle required plugins and dbus services for GNOME Programs? Mark H Weaver
2015-06-24 15:45     ` 宋文武
2015-06-25  4:07       ` Mark H Weaver
2015-06-25  7:42         ` 宋文武
2015-06-24 20:47     ` Ludovic Courtès
2015-06-25  5:00     ` David Hashe
2015-07-09  6:30     ` Mark H Weaver
2015-07-09 13:00       ` 宋文武
2015-07-10 21:24       ` Ludovic Courtès
2015-06-24  6:06   ` [PATCHES] Add totem Mark H Weaver
2015-06-24 20:21     ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).