unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] gnu: rhythmbox: Add gst-plugins-ugly dependency.
@ 2015-08-21 14:51 Andy Wingo
  2015-08-21 20:47 ` Mark H Weaver
  0 siblings, 1 reply; 8+ messages in thread
From: Andy Wingo @ 2015-08-21 14:51 UTC (permalink / raw)
  To: guix-devel

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

Not sure what the right solution to this mess is; ideally a user would
just have to install a set of gstreamer plugins and those would work
across all of their applications, and you wouldn't have to specify the
plugins for each gst-using app.  Dunno.  For now this works better than
not being able to play mp3s tho :P

Andy


[-- Attachment #2: 0001-gnu-rhythmbox-Add-gst-plugins-ugly-dep.patch --]
[-- Type: text/plain, Size: 893 bytes --]

From d73e56bbb687eb42a7449aca37c807afdbf2cbaf Mon Sep 17 00:00:00 2001
From: Andy Wingo <wingo@igalia.com>
Date: Fri, 21 Aug 2015 16:49:31 +0200
Subject: [PATCH] gnu: rhythmbox: Add gst-plugins-ugly dep.

* gnu/packages/gnome.scm (rhythmbox): Depend on gst-plugins-ugly so that we
  can play mp3 files.
---
 gnu/packages/gnome.scm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index b97c9ff..433a37a 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -3007,6 +3007,7 @@ which can read a large number of file formats.")
       ("gstreamer" ,gstreamer)
       ("gst-plugins-base" ,gst-plugins-base)
       ("gst-plugins-good" ,gst-plugins-good)
+      ("gst-plugins-ugly" ,gst-plugins-ugly)
       ("totem-pl-parser" ,totem-pl-parser)
       ("libgudev" ,libgudev)
       ;;("libmtp" ,libmtp) FIXME: Not detected
-- 
2.4.3


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

* Re: [PATCH] gnu: rhythmbox: Add gst-plugins-ugly dependency.
  2015-08-21 14:51 [PATCH] gnu: rhythmbox: Add gst-plugins-ugly dependency Andy Wingo
@ 2015-08-21 20:47 ` Mark H Weaver
  2015-08-24  7:43   ` Andy Wingo
  2015-08-25 15:19   ` Ludovic Courtès
  0 siblings, 2 replies; 8+ messages in thread
From: Mark H Weaver @ 2015-08-21 20:47 UTC (permalink / raw)
  To: Andy Wingo; +Cc: guix-devel

Andy Wingo <wingo@igalia.com> writes:

> Not sure what the right solution to this mess is; ideally a user would
> just have to install a set of gstreamer plugins and those would work
> across all of their applications, and you wouldn't have to specify the
> plugins for each gst-using app.  Dunno.  For now this works better than
> not being able to play mp3s tho :P

I don't think we should apply this patch.  Instead, please set
GST_PLUGIN_SYSTEM_PATH to ~/.guix-profile/lib/gstreamer-1.0 and then
all gstreamer plugins installed in your profile should be available
to programs based on gstreamer.  Works for me with totem, anyway.

Note that we have a 'native-search-paths' specification on the
'gstreamer' package, so if you install that package in your profile, it
should remind you to set GST_PLUGIN_SYSTEM_PATH.  Unfortunately, this is
not very satisfactory because there's usually no reason to install
gstreamer in your profile.

It would be good to find a better solution to this more general problem.
Ideally, it would be good to remind the user about 'native-search-paths'
for all *run-time* dependencies of the packages in the user's profile.
Things get messy in a different way when your packages are split between
your user profile and the system profile.  I'm not sure yet how to solve
the more general problem.

What do you think?

    Thanks,
      Mark

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

* Re: [PATCH] gnu: rhythmbox: Add gst-plugins-ugly dependency.
  2015-08-21 20:47 ` Mark H Weaver
@ 2015-08-24  7:43   ` Andy Wingo
  2015-08-24 16:14     ` Mark H Weaver
  2015-08-25 15:19   ` Ludovic Courtès
  1 sibling, 1 reply; 8+ messages in thread
From: Andy Wingo @ 2015-08-24  7:43 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: guix-devel

On Fri 21 Aug 2015 22:47, Mark H Weaver <mhw@netris.org> writes:

> Andy Wingo <wingo@igalia.com> writes:
>
>> Not sure what the right solution to this mess is; ideally a user would
>> just have to install a set of gstreamer plugins and those would work
>> across all of their applications, and you wouldn't have to specify the
>> plugins for each gst-using app.  Dunno.  For now this works better than
>> not being able to play mp3s tho :P
>
> I don't think we should apply this patch.  Instead, please set
> GST_PLUGIN_SYSTEM_PATH to ~/.guix-profile/lib/gstreamer-1.0 and then
> all gstreamer plugins installed in your profile should be available
> to programs based on gstreamer.  Works for me with totem, anyway.

Is that the right thing even if you have multiple GStreamer versions
installed, I wonder?  And why is GST_PLUGIN_PATH not sufficient and you
have to use GST_PLUGIN_SYSTEM_PATH?

Also, this line doesn't appear in my .guix-profile/etc/profile.  Why is
that?  In general I think having to rely on people to add lines to their
profile is a bad idea.  Might be necessary, of course, but sounds like a
bad idea compared to just sourcing the profile file.

> What do you think?

No real opinion, but some questions :)  The experience installing
rhythmbox is pretty bad though.

Andy

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

* Re: [PATCH] gnu: rhythmbox: Add gst-plugins-ugly dependency.
  2015-08-24  7:43   ` Andy Wingo
@ 2015-08-24 16:14     ` Mark H Weaver
  2015-08-24 16:26       ` Andy Wingo
  0 siblings, 1 reply; 8+ messages in thread
From: Mark H Weaver @ 2015-08-24 16:14 UTC (permalink / raw)
  To: Andy Wingo; +Cc: guix-devel

Andy Wingo <wingo@igalia.com> writes:

> On Fri 21 Aug 2015 22:47, Mark H Weaver <mhw@netris.org> writes:
>
>> Andy Wingo <wingo@igalia.com> writes:
>>
>>> Not sure what the right solution to this mess is; ideally a user would
>>> just have to install a set of gstreamer plugins and those would work
>>> across all of their applications, and you wouldn't have to specify the
>>> plugins for each gst-using app.  Dunno.  For now this works better than
>>> not being able to play mp3s tho :P
>>
>> I don't think we should apply this patch.  Instead, please set
>> GST_PLUGIN_SYSTEM_PATH to ~/.guix-profile/lib/gstreamer-1.0 and then
>> all gstreamer plugins installed in your profile should be available
>> to programs based on gstreamer.  Works for me with totem, anyway.
>
> Is that the right thing even if you have multiple GStreamer versions
> installed, I wonder?

Well, if that's a problem, the same problem would exist on a more
traditional distribution.

I should explain why I don't want to add gst-plugins-ugly as a
dependency: it would mean forcing users to always install these
patent-encumbered codecs, even if they don't need MP3 support and want
to avoid the associated legal uncertainties.

More generally, it's contrary to the idea of plugins for every program
that uses gstreamer to include as inputs the entire set of plugins that
anyone might want.  The whole idea of plugins is that users can choose
which ones to install.

> And why is GST_PLUGIN_PATH not sufficient and you have to use
> GST_PLUGIN_SYSTEM_PATH?

I guess that either would probably work, but honestly I don't know.

> Also, this line doesn't appear in my .guix-profile/etc/profile.  Why is
> that?

For the same reason that I explained in my last email in this thread,
although I forgot to mention ~/.guix-profile/etc/profile:

  Note that we have a 'native-search-paths' specification on the
  'gstreamer' package, so if you install that package in your profile, it
  should remind you to set GST_PLUGIN_SYSTEM_PATH.

So, if you install 'gstreamer' in your profile, then I guess that a
proper setting should appear in ~/.guix-profile/etc/profile.  Quoting
myself again:

  Unfortunately, this is not very satisfactory because there's usually
  no reason to install gstreamer in your profile.

  It would be good to find a better solution to this more general problem.
  Ideally, it would be good to remind the user about 'native-search-paths'
  for all *run-time* dependencies of the packages in the user's profile.

>> What do you think?
>
> No real opinion, but some questions :)  The experience installing
> rhythmbox is pretty bad though.

I agree.  I think we should populate ~/.guix-profile/etc/profile with
'native-search-paths' not only from the transitive propagated-inputs of
the user's profile, as we currently do, but from the transitive
*run-time* dependencies.  That should solve many problems like this.

It may be tricky to implement, however, since the run-time dependencies
are not known in advance, and I guess it would involve getting the
information from the daemon.  This is an area where my knowledge is
quite weak, so I'm hoping that Ludovic will take an interest in this.

     Mark

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

* Re: [PATCH] gnu: rhythmbox: Add gst-plugins-ugly dependency.
  2015-08-24 16:14     ` Mark H Weaver
@ 2015-08-24 16:26       ` Andy Wingo
  2015-08-25 13:35         ` 宋文武
  0 siblings, 1 reply; 8+ messages in thread
From: Andy Wingo @ 2015-08-24 16:26 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: guix-devel

Hi Mark :)

Thank you for being patient with an idiot :)

On Mon 24 Aug 2015 18:14, Mark H Weaver <mhw@netris.org> writes:

> For the same reason that I explained in my last email in this thread,
> although I forgot to mention ~/.guix-profile/etc/profile:
>
>   Note that we have a 'native-search-paths' specification on the
>   'gstreamer' package, so if you install that package in your profile, it
>   should remind you to set GST_PLUGIN_SYSTEM_PATH.
>
> So, if you install 'gstreamer' in your profile, then I guess that a
> proper setting should appear in ~/.guix-profile/etc/profile.  Quoting
> myself again:
>
>   Unfortunately, this is not very satisfactory because there's usually
>   no reason to install gstreamer in your profile.
>
>   It would be good to find a better solution to this more general problem.
>   Ideally, it would be good to remind the user about 'native-search-paths'
>   for all *run-time* dependencies of the packages in the user's profile.

You are right!  I guess my experience was that would install things,
even gstreamer, but run rhythmbox from Alt-F2 so I wouldn't get the
environment of the newly installed profile, whereas if I had run from a
shell I would.  I didn't know what was going on.

> I agree.  I think we should populate ~/.guix-profile/etc/profile with
> 'native-search-paths' not only from the transitive propagated-inputs of
> the user's profile, as we currently do, but from the transitive
> *run-time* dependencies.  That should solve many problems like this.
>
> It may be tricky to implement, however, since the run-time dependencies
> are not known in advance, and I guess it would involve getting the
> information from the daemon.  This is an area where my knowledge is
> quite weak, so I'm hoping that Ludovic will take an interest in this.

What would happen if we made gst-plugins-ugly also add the same
native-search-paths?  Multiple packages can add the same paths, right?
In that case you wouldn't have to install gstreamer.

Andy

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

* Re: [PATCH] gnu: rhythmbox: Add gst-plugins-ugly dependency.
  2015-08-24 16:26       ` Andy Wingo
@ 2015-08-25 13:35         ` 宋文武
  0 siblings, 0 replies; 8+ messages in thread
From: 宋文武 @ 2015-08-25 13:35 UTC (permalink / raw)
  To: Andy Wingo, Mark H Weaver; +Cc: guix-devel

Andy Wingo <wingo@igalia.com> writes:

> Hi Mark :)
>
> Thank you for being patient with an idiot :)
>
> On Mon 24 Aug 2015 18:14, Mark H Weaver <mhw@netris.org> writes:
>
>> For the same reason that I explained in my last email in this thread,
>> although I forgot to mention ~/.guix-profile/etc/profile:
>>
>>   Note that we have a 'native-search-paths' specification on the
>>   'gstreamer' package, so if you install that package in your profile, it
>>   should remind you to set GST_PLUGIN_SYSTEM_PATH.
>>
>> So, if you install 'gstreamer' in your profile, then I guess that a
>> proper setting should appear in ~/.guix-profile/etc/profile.  Quoting
>> myself again:
>>
>>   Unfortunately, this is not very satisfactory because there's usually
>>   no reason to install gstreamer in your profile.
>>
>>   It would be good to find a better solution to this more general problem.
>>   Ideally, it would be good to remind the user about 'native-search-paths'
>>   for all *run-time* dependencies of the packages in the user's profile.
>
> You are right!  I guess my experience was that would install things,
> even gstreamer, but run rhythmbox from Alt-F2 so I wouldn't get the
> environment of the newly installed profile, whereas if I had run from a
> shell I would.  I didn't know what was going on.
Yes, I agree it's a bad experience.
The problem is:
  We installed rhythmbox, it can't play mp3 files.
  OK, let's installed gst-plugins-ugly (and gstreamer if necessary).
  Now start a new rhythmbox by menu, launch, etc. from the DE.
  It won't work!
The desktop users have to logout and login again.
>
>> I agree.  I think we should populate ~/.guix-profile/etc/profile with
>> 'native-search-paths' not only from the transitive propagated-inputs of
>> the user's profile, as we currently do, but from the transitive
>> *run-time* dependencies.  That should solve many problems like this.
>>
>> It may be tricky to implement, however, since the run-time dependencies
>> are not known in advance, and I guess it would involve getting the
>> information from the daemon.  This is an area where my knowledge is
>> quite weak, so I'm hoping that Ludovic will take an interest in this.
>
> What would happen if we made gst-plugins-ugly also add the same
> native-search-paths?  Multiple packages can add the same paths, right?
> In that case you wouldn't have to install gstreamer.
It's fine, but the previous problem still exist.

How about add the 'runtime-search-paths' to rhythmbox, when
a matched plugin package installed into the same profile,
we update rhythmbox by wrap it?
when the matched package get removed, we need to unwrap it..

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

* Re: [PATCH] gnu: rhythmbox: Add gst-plugins-ugly dependency.
  2015-08-21 20:47 ` Mark H Weaver
  2015-08-24  7:43   ` Andy Wingo
@ 2015-08-25 15:19   ` Ludovic Courtès
  2015-10-15 21:12     ` Ludovic Courtès
  1 sibling, 1 reply; 8+ messages in thread
From: Ludovic Courtès @ 2015-08-25 15:19 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: guix-devel

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

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

> I don't think we should apply this patch.  Instead, please set
> GST_PLUGIN_SYSTEM_PATH to ~/.guix-profile/lib/gstreamer-1.0 and then
> all gstreamer plugins installed in your profile should be available
> to programs based on gstreamer.  Works for me with totem, anyway.
>
> Note that we have a 'native-search-paths' specification on the
> 'gstreamer' package, so if you install that package in your profile, it
> should remind you to set GST_PLUGIN_SYSTEM_PATH.  Unfortunately, this is
> not very satisfactory because there's usually no reason to install
> gstreamer in your profile.

Right.

As an interim solution, I would suggest this:


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

diff --git a/gnu/system.scm b/gnu/system.scm
index ea6e9c1..2c1387e 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -511,6 +511,9 @@ export DBUS_FATAL_WARNINGS=0
 # Allow Aspell to find dictionaries installed in the user profile.
 export ASPELL_CONF=\"dict-dir $HOME/.guix-profile/lib/aspell\"
 
+# Allow GStreamer-based applications to find plugins.
+export GST_PLUGIN_PATH=\"$HOME/.guix-profile/lib/gstreamer-1.0\"
+
 if [ -n \"$BASH_VERSION\" -a -f /etc/bashrc ]
 then
   # Load Bash-specific initialization code.

[-- Attachment #3: Type: text/plain, Size: 1068 bytes --]


This is inelegant, but better than broken software IMO.

WDYT?

> It would be good to find a better solution to this more general problem.
> Ideally, it would be good to remind the user about 'native-search-paths'
> for all *run-time* dependencies of the packages in the user's profile.
> Things get messy in a different way when your packages are split between
> your user profile and the system profile.  I'm not sure yet how to solve
> the more general problem.

That’s something we might be able to do, indeed, and it sounds good.

Technically, populating <manifest-entry>’s ‘search-paths’ fields with
search paths of the *run-time* dependencies may be difficult: We could
get the information on run-time deps in the derivation that builds the
manifest (via #:references-graph), but then that derivation would need
to know all the possible search paths (that is, those of the build-time
dependencies) so that it can select the subset of search paths
corresponding to run-time dependencies.

Needs more thought.

Thanks,
Ludo’.

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

* Re: [PATCH] gnu: rhythmbox: Add gst-plugins-ugly dependency.
  2015-08-25 15:19   ` Ludovic Courtès
@ 2015-10-15 21:12     ` Ludovic Courtès
  0 siblings, 0 replies; 8+ messages in thread
From: Ludovic Courtès @ 2015-10-15 21:12 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: guix-devel

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

> Mark H Weaver <mhw@netris.org> skribis:
>
>> I don't think we should apply this patch.  Instead, please set
>> GST_PLUGIN_SYSTEM_PATH to ~/.guix-profile/lib/gstreamer-1.0 and then
>> all gstreamer plugins installed in your profile should be available
>> to programs based on gstreamer.  Works for me with totem, anyway.
>>
>> Note that we have a 'native-search-paths' specification on the
>> 'gstreamer' package, so if you install that package in your profile, it
>> should remind you to set GST_PLUGIN_SYSTEM_PATH.  Unfortunately, this is
>> not very satisfactory because there's usually no reason to install
>> gstreamer in your profile.
>
> Right.
>
> As an interim solution, I would suggest this:
>
> diff --git a/gnu/system.scm b/gnu/system.scm
> index ea6e9c1..2c1387e 100644
> --- a/gnu/system.scm
> +++ b/gnu/system.scm
> @@ -511,6 +511,9 @@ export DBUS_FATAL_WARNINGS=0
>  # Allow Aspell to find dictionaries installed in the user profile.
>  export ASPELL_CONF=\"dict-dir $HOME/.guix-profile/lib/aspell\"
>  
> +# Allow GStreamer-based applications to find plugins.
> +export GST_PLUGIN_PATH=\"$HOME/.guix-profile/lib/gstreamer-1.0\"
> +
>  if [ -n \"$BASH_VERSION\" -a -f /etc/bashrc ]
>  then
>    # Load Bash-specific initialization code.
>
> This is inelegant, but better than broken software IMO.

Done in 4af7c83bc7010b23735c40e074c7d581dad8212e.

Ludo’.

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

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

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-21 14:51 [PATCH] gnu: rhythmbox: Add gst-plugins-ugly dependency Andy Wingo
2015-08-21 20:47 ` Mark H Weaver
2015-08-24  7:43   ` Andy Wingo
2015-08-24 16:14     ` Mark H Weaver
2015-08-24 16:26       ` Andy Wingo
2015-08-25 13:35         ` 宋文武
2015-08-25 15:19   ` Ludovic Courtès
2015-10-15 21:12     ` 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).