Bug 532583 - pulseaudio-gdm-hooks dependency on pulseaudio makes gdm require pulseaudio
Summary: pulseaudio-gdm-hooks dependency on pulseaudio makes gdm require pulseaudio
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: pulseaudio
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Lennart Poettering
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-11-02 21:13 UTC by Adam Williamson
Modified: 2009-11-05 23:32 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-11-05 00:54:18 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Adam Williamson 2009-11-02 21:13:01 UTC
There's an unfortunate PA -> gdm dependency chain...

gdm requires pulseaudio-gdm-hooks
pulseaudio-gdm-hooks requires pulseaudio

which causes gdm to depend on pulseaudio, so if you remove PA, you lose gdm. There are still people out there who'll try to remove PA, and this will cause them to either wonder what the hell happened to their login manager, or complain loudly about how everything in the world depends on PA these days. Or both.

In this case I think we can avoid the problem without losing any functionality. pulseaudio-gdm-hooks doesn't actually need to require pulseaudio, I believe. If pulseaudio-gdm-hooks is installed without pulseaudio being present I don't think anything bad will happen; all it contains is a configuration file for PA which will just be ignored since PA isn't running. So we could break the chain by dropping the dependency. By default everything will still work as intended (PA, GDM, and pulseaudio-gdm-hooks will all be present), and if you _do_ remove PA, you'll still have gdm and it should work fine.

Comment 1 Lennart Poettering 2009-11-03 19:06:15 UTC
I believe this would be the wrong fix. The right fix would be to fix RPM so that the PA package can simply include the gdm hook itself and at the same time would not need to depend on gdm.

I also think this is like trying to get blood from a stone. Those who detest PA won't be satisfied unless all PA related packages are removable, and that would include pulseaudio-gdm-hooks. Also, nobody filed a bug requesting this in the first place. So if nobody every so enough need for this to bother filing a bug the need cannot be too big.

Also, I'd almost bet that soon after changing this someone will complain that p-g-h includes a reference to a binary that is not among the deps of the RPM.

OTOH I am not too concerned, so feel free to commit this if you think it makes sense and you made sure this does indeed not break things. I myself am not going to do it however.

Comment 2 Adam Williamson 2009-11-03 19:13:59 UTC
Thanks, Lennart - given your take I guess what I'll do is keep an eye on the forums after release and see how angry people get, and if it seems to be a big sticking point I'll ask again if we can commit this (I don't think I have rights to do it myself).

I do believe that the dependency is 'wrong' in absolute terms, gdm doesn't require PulseAudio to work, so we should fix it in any case. But I'm amenable to your argument that there's a better fix possible. I don't follow it entirely, though - what's wrong with RPM that makes this currently not possible?

-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 3 Lennart Poettering 2009-11-03 19:22:50 UTC
(In reply to comment #2)
> Thanks, Lennart - given your take I guess what I'll do is keep an eye on the
> forums after release and see how angry people get, and if it seems to be a big
> sticking point I'll ask again if we can commit this (I don't think I have
> rights to do it myself).

I am pretty sure you should have the necessary rights. I think to all packages of the desktop group any fedora dev can commit. We are friendly folks... 

> I do believe that the dependency is 'wrong' in absolute terms, gdm doesn't
> require PulseAudio to work, so we should fix it in any case. But I'm amenable
> to your argument that there's a better fix possible. I don't follow it
> entirely, though - what's wrong with RPM that makes this currently not
> possible?

In Debian it is very common that a package drops a file into a directory that belongs to another package without having an explicit dependency between each other. In fact it is one of the most common things to do to implement "loose coupling" on Debian systems. However, on RPM/Fedora this is frowned upon. If you stick a file into another package's directory you need to depend on it. And that sucks.

Comment 4 Adam Williamson 2009-11-03 19:32:47 UTC
I believe that's a Fedora policy rather than anything intrinsic to RPM, but I agree that it's not sensible in all cases, specifically this one. How about we raise the issue on -devel-list and see if there's a recommended solution?

-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 5 Adam Williamson 2009-11-03 19:43:56 UTC
Bill Nottingham suggests the solution in this new proposal he's working on, which was accepted at recent FESco and FPC meetings:

https://fedoraproject.org/wiki/BillNottingham/DirectoryDraft

the solution is fairly simple - put the hook in the PA package, and have the PA package also own the directory. It's covered under this case:

https://fedoraproject.org/wiki/BillNottingham/DirectoryDraft#Multiple_packages_own_files_in_a_common_directory_but_none_of_them_needs_to_require_the_others.

as far as I can see.

-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 6 Adam Williamson 2009-11-03 20:05:32 UTC
so discussing a bit further with Toshio, this would not make sense - /var/lib/gdm is not just any old directory, it's the gdm user's home directory, so it's not good for it to be around if the gdm user doesn't exist (i.e. if gdm isn't installed). so it's actually correct for the hook to depend on gdm.

that puts us back to the best fix being for the hook not to depend on PulseAudio - I still can't see why it should. I don't think "includes a reference to a binary that is not among the deps of the RPM" is actually considered a problem per Fedora policies, as far as I know anyway. Toshio agrees with my reasoning here (or rather, I agree with his :>)

-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 7 Toshio Ernie Kuratomi 2009-11-03 20:15:40 UTC
I'm more concerned with the owner and group of the files in the pulseaudio-gdm-hooks directory.  The hook is owned by the gdm user but we don't have that user unless the gdm package has been installed on the system.  I'm pretty sure that if we don't depend on gdm, the hook could get installed before gdm which will cause %{_localstatedir}/lib/gdm/.pulse/default.pa to be installed root:root 0600.  That makes the file unreadable by gdm so it won't be available to configure pulseaudio.

Like adamw, I'm not sure why cutting the dep chain by removing the Requires: pulseaudio from pulseaudio-gdm-hooks would be wrong.  If you could explain that it would be great.

Comment 8 Lennart Poettering 2009-11-03 22:43:29 UTC
(In reply to comment #7)

> Like adamw, I'm not sure why cutting the dep chain by removing the Requires:
> pulseaudio from pulseaudio-gdm-hooks would be wrong.  If you could explain that
> it would be great.  

So you have a .desktop file installed, but you cannot actually use it, because the binary it points to doesn't exist? At the very least this is ugly. 

Also, allowing this "dangling" .desktop file might break if some DE actually shows an error dialog if it cannot find the program referenced.

Comment 9 Adam Williamson 2009-11-03 22:56:36 UTC
Uh...what desktop file are we talking about?

As far as I can see, pulseaudio-gdm-hooks contains only the file /var/lib/gdm/.pulse/default.pa and only depends on gdm and pulseaudio...so where's this desktop file you're talking about?

-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 10 Lennart Poettering 2009-11-04 19:42:02 UTC
Oops. I guess my memory is not as goo as I thought. You are right, there is not .desktop file in there. I thought I also stuck an XDG autostart file there, but I was wrong. That indeed makes the issue I raised regarding the danling .desktop file bogus.

Comment 11 Lennart Poettering 2009-11-04 19:57:03 UTC
One last thing: I still think that this fix is a pointless excercise: you cannot satisfy PA haters. But if someone cares enough then he's welcome to commit a fix. But please don't break things, i.e. make sure you add the package to comps as a replacement for the dropped dep.

Comment 12 Lennart Poettering 2009-11-04 19:57:48 UTC
also, i don't see why this should be f12target. dropping that.

Comment 13 Adam Williamson 2009-11-04 20:17:23 UTC
nothing needs to be added to comps: it's not like if pulseaudio-gdm-hooks doesn't require pulseaudio, pulseaudio will suddenly not get installed. That's the only dependency that needs to be dropped. This is literally a one-line change:

http://cvs.fedoraproject.org/viewvc/rpms/pulseaudio/F-12/pulseaudio.spec?r1=1.102&r2=1.103

the only thing it could _somehow_ _possibly_ break is result in pulseaudio not being installed/included on a build when it should be, but...the gdm-hooks package never existed in F11 and pulseaudio got installed just fine, and:

[adamw@adam comps]$ grep pulse comps-f12.xml.in 
      <packagereq type="default">pulseaudio-module-gconf</packagereq>
      <packagereq type="default">pulseaudio-module-x11</packagereq>
      <packagereq type="optional">pulseaudio-esound-compat</packagereq>
      <packagereq type="default">kde-settings-pulseaudio</packagereq>
      <packagereq type="conditional" requires="xine-lib">xine-lib-pulseaudio</packagereq>
      <packagereq type="default">alsa-plugins-pulseaudio</packagereq>
      <packagereq type="default">pulseaudio</packagereq>
      <packagereq type="default">pulseaudio-module-bluetooth</packagereq>
      <packagereq type="default">pulseaudio-utils</packagereq>
      <packagereq type="optional">pulseaudio-module-lirc</packagereq>
      <packagereq type="optional">pulseaudio-module-zeroconf</packagereq>

not to mention all the things that depend on pulseaudio that don't happen to have it in their name. it'd take a moderate sized nuclear missile to break enough stuff to stop pulseaudio making it into builds :)

we're not breaking the gdm dependency on pulseaudio-gdm-hooks, that dependency is perfectly fine and correct, so there's no danger of the hooks package not getting installed.

-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 14 Adam Williamson 2009-11-04 20:48:07 UTC
Warren has fixed this (see above commit) and sent a build:

http://koji.fedoraproject.org/koji/buildinfo?buildID=139763

I am testing it. It installs fine with no errors. 'yum erase pulseaudio' now acts exactly as we expected/wanted it to:

Dependencies Resolved

================================================================================
 Package                        Arch      Version            Repository    Size
================================================================================
Removing:
 pulseaudio                     x86_64    0.9.19-2.fc12      installed    1.9 M
Removing for dependencies:
 alsa-plugins-pulseaudio        x86_64    1.0.21-2.fc12      installed     93 k
 bluez                          x86_64    4.57-2.fc12        installed    928 k
 gnome-bluetooth                x86_64    2.28.3-1.fc12      installed    1.5 M
 kde-settings-pulseaudio        noarch    4.3-12             installed     0.0 
 pulseaudio-esound-compat       x86_64    0.9.19-2.fc12      installed    3.2 k
 pulseaudio-module-bluetooth    x86_64    0.9.19-2.fc12      installed    163 k
 pulseaudio-module-gconf        x86_64    0.9.19-2.fc12      installed     19 k
 pulseaudio-module-x11          x86_64    0.9.19-2.fc12      installed     46 k

Transaction Summary
================================================================================
Remove        9 Package(s)
Reinstall     0 Package(s)
Downgrade     0 Package(s)

i.e. it now doesn't drag gdm with it, but equally you can't now magically remove it without also losing all the stuff which really does need to depend on it.

You can't erase pulseaudio-gdm-hooks without losing gdm:

Dependencies Resolved

================================================================================
 Package                 Arch    Version                       Repository  Size
================================================================================
Removing:
 pulseaudio-gdm-hooks    x86_64  0.9.19-2.fc12                 installed   385 
Removing for dependencies:
 gdm                     x86_64  1:2.28.1-20.fc12              installed  4.4 M
 gdm-plugin-fingerprint  x86_64  1:2.28.1-20.fc12              installed   75 k
 gdm-user-switch-applet  x86_64  1:2.28.1-20.fc12              installed  106 k
 plymouth-gdm-hooks      x86_64  0.8.0-0.2009.29.09.16.fc12    installed   171 

Transaction Summary
================================================================================
Remove        5 Package(s)
Reinstall     0 Package(s)
Downgrade     0 Package(s)

so that's still correct.

I'm going to reboot in a minute and confirm my sound still works, which I have no doubt it will. I can also do a live CD compose and confirm that the appropriate packages still wind up on it, if anyone is actually worried about that. Not quite sure what else to 'test', here. It's pretty obvious this is doing exactly what we thought it would.

-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 15 Adam Williamson 2009-11-04 21:05:30 UTC
After a reboot, sound continues to work.

-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 16 Adam Williamson 2009-11-05 00:54:18 UTC
This has been tagged for F12 final release, closing. thanks for doing the change, warren.

-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 17 Gideon Mayhak 2009-11-05 17:24:30 UTC
May I make a suggestion, albeit later in the game?  Rather than GDM depending on pulseaudio-gdm-hooks, wouldn't it be better that pulseaudio-gdm-hooks depend on PA and GDM not depend on either?  Example use case:

I don't ever, ever, ever want sound on my login screen, so I figure I can most quickly guarantee this by uninstalling pulseaudio-gdm-hooks.  However, that wants to take GDM with it.  I don't want that, and I do want PA once I log in.

So in summary, I want GDM, I don't want sound in GDM, but I want PA.  I would think the best way to do that would be to remove pulseaudio-gdm-hooks, but that's not currently an option.  So GDM !depend on pulseaudio-gdm-hooks, and pulseaudio-gdm-hooks depends on GDM and PA.

Comment 18 Gideon Mayhak 2009-11-05 17:26:13 UTC
So to be entirely clear, *nothing* depends on pulseaudio-gdm-hooks.

Comment 19 Adam Williamson 2009-11-05 23:32:06 UTC
That does not seem like a sensible change. Removing pulseaudio-gdm-hooks would not be a sensible way of disabling sound in gdm. I believe you can configure gdm not to make sound, in gconf I think.

-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers


Note You need to log in before you can comment on or make changes to this bug.