gentoo / vmware

[MIRROR] VMware desktop ebuilds
https://gitweb.gentoo.org/proj/vmware.git
21 stars 18 forks source link

Is pulseaudio really required for workstation 12? #20

Closed mikfire closed 8 years ago

mikfire commented 8 years ago

I would really rather not have pulseaudio installed. It is a hard dependency in the ebuild for vmware workstation 12.

I've modified my local ebuild to not require it, I've made sure pulseaudio is not installed and sound seems to work from my vms. If it isn't required, could it be an emerge flag?

akhuettel commented 8 years ago

Likely not. Removed.

efferre79 commented 8 years ago

It seems that vmware can support pulseaudio if it finds the library but it's not mandatory. You can see in the log files, e.g. for vmplayer

2016-03-20T19:54:10.778+01:00| vmplayer| I125: Printing loaded objects .... 2016-03-20T19:54:10.778+01:00| vmplayer| I125: [0x7F707F8E3000-0x7F707F932A6C): /usr/lib64/libpulse.so.0 2016-03-20T19:54:10.778+01:00| vmplayer| I125: [0x7F707F661000-0x7F707F6E025C): /usr/lib64/pulseaudio/libpulsecommon-8.0.so

If it's true that can really exploit the presence of pulseaudio, given the fact that it's impossible to remove/disable that feature, I'd at least add a notice to the user during pkg_postinst() without requiring a RDEPEND

akhuettel commented 8 years ago

@efferre79 What would be the practical use of such a notice? Normally for source-based packages automagic deps are discouraged, since the package contents depend on the detected libraries... but that's not the case here. vmware just picks the best available library at runtime...

efferre79 commented 8 years ago

ok, it makes sense unless the user misses some functionality when pulseaudio is not installed (but in this case it doesn't seem the same). Another dep related to audio is media-libs/alsa-lib, I didn't try removing alsa to see if it still works or vmware complains. What about if the user doesn't have alsa-lib installed but only pulseaudio[-alsa]? Would it make sense to have the following?

|| ( media-libs/alsa-lib media-sound/pulseaudio )

so that we give priority to alsa?

akhuettel commented 8 years ago

Do you know if it needs alsa-lib? Or does it just skip audio functionality completely if it can't find anything?

efferre79 commented 8 years ago

I have jsut tried renaming /usr/lib64/libasound.so.2.0.0 with vmplayer. The log reports

I125: HostDeviceInfoFindHostAlsaSoundDevices: Failed loading Alsa library to detect sound devices.

while comparing the logs this is a list of libs not loaded

I125: [0x7FCAC4C85000-0x7FCAC4D45F44): /usr/lib64/libasound.so.2 I125: [0x7FCAC4831000-0x7FCAC4880A6C): /usr/lib64/libpulse.so.0 I125: [0x7FCAC45AF000-0x7FCAC462E25C): /usr/lib64/pulseaudio/libpulsecommon-8.0.so I125: [0x7FCAC43A4000-0x7FCAC43AD04C): /usr/lib64/libjson-c.so.2 I125: [0x7FCAC415D000-0x7FCAC41A0E84): /usr/lib64/libdbus-1.so.3 I125: [0x7FCABFDE4000-0x7FCABFDFA854): /usr/lib64/libICE.so.6 I125: [0x7FCABFBDC000-0x7FCABFBE2A3C): /usr/lib64/libSM.so.6 I125: [0x7FCABF9D6000-0x7FCABF9DAAC4): /usr/lib64/libXtst.so.6 I125: [0x7FCABF7CC000-0x7FCABF7D3EBC): /lib64/libwrap.so.0 I125: [0x7FCABF557000-0x7FCABF5C700C): /usr/lib64/libsndfile.so.1 I125: [0x7FCABF352000-0x7FCABF3553D4): /usr/lib64/libasyncns.so.0 I125: [0x7FCABF14D000-0x7FCABF150434): /lib64/libuuid.so.1 I125: [0x7FCABEF15000-0x7FCABEF4AD44): /usr/lib64/libFLAC.so.8 I125: [0x7FCABEC62000-0x7FCABECF2104): /usr/lib64/libvorbisenc.so.2

libpulse.so is not loaded at all with this configuration so vmware doesn't support it directly!

Moreover, does this mean that all the following libs are not mandatory? Probably those libs are loaded as direct deps of /usr/lib64/libpulse.so

Besides the warning, the virtual machine starts normally and of course without audio :-)

efferre79 commented 8 years ago

@akhuettel does it make sense to add a conditional dep on alsa useflag for this binary package? As you pointed out we cannot enable/disable alsa support in that way but I don't know if the useflag is the proper way to restrict list of deps

eteran commented 8 years ago

it may make sense to have the USE flag simply so that if by some chance, they don't have alsa installed already, but have the alsa USE flag for this package.

Then installing the package can pull it in as needed (if that makes sense?).

akhuettel commented 8 years ago

the best idea that I can come up with is (in analogy to what we're doing in the dev-perl category):

add a useflag minimal, and add a sane set of useful optional dependencies as !minimal? ( ... )

Then by default these packages will be pulled in (since minimal is disabled by default), and whoever doesnt want that can still set USE=minimal for vmware.

That said, I'd probably leave pulseaudio out anyway, since I would not classify it as "sane minimal dependency"... :)

efferre79 commented 8 years ago

As you can see I have pushed a few changes to the overlay reducing the deps to only what is really needed, many deps were put in the list probably because found with ldd. The list is definitely shorter and, if it is correct, I think we don't need to introduce the minimal USE flag :-)