Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 604426

Summary: [vmware] app-emulation/vmware-workstation-12.5.8.7098237 : make vmware-modules optional
Product: Gentoo Linux Reporter: Jeffrey Lin <jeffrey>
Component: Current packagesAssignee: Gentoo VMWare Bug Squashers [disabled] <vmware+disabled>
Status: RESOLVED FIXED    
Severity: normal CC: burcheri.massimo+bugs-gentoo, giuseppe, Manfred.Knick, rossi.f, stefantalpalaru
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Jeffrey Lin 2017-01-02 18:19:41 UTC
vmware-modules should be optional since vmware-workstation works fine without it if you only need to connect to remote locations. This could be incorporated with a 'modules' USE flag that is on by default.
Comment 1 Manfred Knick 2017-07-07 18:14:53 UTC
Current situation:

We have a circular dependency of each upon the other:


A) In vmware-workstation-12.5.7.5813279.ebuild, we have:

PDEPEND="~app-emulation/vmware-modules-${PV_MODULES}
    vmware-tools? ( app-emulation/vmware-tools )"

Thus:

# equery depends vmware-workstation | grep vmware
app-emulation/vmware-modules-308.5.7


B) In vmware-modules-308.5.7.ebuild, we have:

DEPEND="${RDEPEND}
    || ( =app-emulation/vmware-player-12.${PV_MINOR}*
    =app-emulation/vmware-workstation-12.${PV_MINOR}* )"

Thus:

# equery depends vmware-modules | grep vmware
app-emulation/vmware-workstation-12.5.7.5813279
Comment 2 Ștefan Talpalaru 2017-11-30 13:13:15 UTC
(In reply to Manfred Knick from comment #1)
> Current situation:
> 
> We have a circular dependency of each upon the other:

Yes, but it is solved by the workstation being a build time dependency of the modules, so it gets installed first (the workstation package has the module sources).

The modules are only a post-merge dependency of the workstation, so they are installed afterwards. More details: https://devmanual.gentoo.org/general-concepts/dependencies/index.html

(In reply to Jeffrey Lin from comment #0)
> vmware-modules should be optional since vmware-workstation works fine
> without it if you only need to connect to remote locations. This could be
> incorporated with a 'modules' USE flag that is on by default.

Done in vmware-workstation-14.0.0.6661328-r7: https://github.com/stefantalpalaru/gentoo-overlay
Comment 3 Manfred Knick 2017-11-30 13:47:47 UTC
VMware Products have been removed from Main Portage Tree during Nov-2017.

Further development has been relegated to [vmware] Overlay.

Situation as of today, 30-Nov-2017:
Workstation : stable in [vmware] = 12.5.8  / released = 14.0.0  : Bug 634770
Player      : stable in [vmware] = 12.5.8  / released = 14.0.0  : Bug 639162
Modules     : stable in [vmware] = 308.5.8 / released = 329.0.0 : Bug 634862
Tools       : stable in [vmware] = 10.1.6  / released = 10.1.15 : Bug 634854


Vmware-Workstation-12.* will EOL soon: 2018 / 02 / 25  

@ Fabio : 
        : Incorporate Stefan's "+modules"  (c.f. lines 31 and 204) ?
        : Or "WONTFIX" for 12 ?

(In reply to Ștefan Talpalaru from comment #2)
> Done in vmware-workstation-14.0.0.6661328-r7:
> https://github.com/stefantalpalaru/gentoo-overlay

Thanks!

+ CONFIRMATION for default USE="modules".

Test for non-default USE="-modules" will follow.
Comment 4 Manfred Knick 2017-11-30 17:37:39 UTC
(In reply to Manfred Knick from comment #3)

> Test for non-default USE="-modules" will follow.

RESULT: as expected: Startup needs some handling too.


# emerge -aC vmware-workstation

# emerge -a --depclean               <-- /lib/modules/$(uname -r)/misc/vm*.ko 
                                     <-- from former installation
                                     <-- are left behind
# reboot

# < insert   USE="-modules"  >

# emerge vmware-workstation

# /etc/init.d/vmware status
 * status: stopped

# /etc/init.d/vmware start
 * Caching service dependencies ...                    [ ok ]
 * Starting VMware USB Arbitrator ...                  [ ok ]
 * Starting VMware services ...

insmod /lib/modules/4.14.2-gentoo/misc/vmmon.ko                      <---
insmod /lib/modules/4.14.2-gentoo/misc/vmblock.ko                    <---
insmod /lib/modules/4.14.2-gentoo/misc/vmnet.ko        [ ok ]        <---

Started Bridge networking on vmnet0
Started Bridge networking on vmnet1
Started all configured services on all networks        [ ok ]


# lsmod | grep vm
vmnet                  40960  6
vmblock                20480  0
vmmon                  73728  0


ebuild, line 527 ff. :
    # install the init.d script

files/vmware-14.0.rc,
  line 48: unconditional yet:
      modprobe -av vmmon vmblock vmnet
  line 62: unconditional yet:
      modprobe -rv vmmon vmblock vmnet


Without a former modules installation,
an Error like "file does not exist" would have occured.
Comment 5 Manfred Knick 2017-11-30 17:43:30 UTC
# emerge -aC vmware-workstation :

>>> Unmerging (1 of 1) app-emulation/vmware-workstation-14.0.0.6661328-r7...

works with small hickup only:

/var/tmp/portage/._unmerge_/app-emulation/
     vmware-workstation-14.0.0.6661328-r7/temp/environment:
     line 2920:
     fdo-xdg_desktop_database_update: command not found
Comment 6 Ștefan Talpalaru 2017-11-30 18:43:34 UTC
(In reply to Manfred Knick from comment #5)
>      fdo-xdg_desktop_database_update: command not found

"fdo-xdg_desktop_database_update" was renamed to "xdg_desktop_database_update" in August: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1b62e7745ff3a741d503b0e7f5724f9572f8e8a6

but the documentation was not regenerated: https://devmanual.gentoo.org/eclass-reference/xdg-utils.eclass/index.html

"app-office/scribus", in the main tree, still tries to use the old version.

Anyway, fixed in vmware-workstation-14.0.0.6661328-r10.

(In reply to Manfred Knick from comment #4)
> # emerge -a --depclean               <-- /lib/modules/$(uname
> -r)/misc/vm*.ko 
>                                      <-- from former installation
>                                      <-- are left behind

virtualbox-modules also leaves the kernel modules behind. Must be a distro-wide policy.
Comment 7 Manfred Knick 2017-11-30 21:07:54 UTC
(In reply to Ștefan Talpalaru from comment #6)

> ... Must be a
> distro-wide policy.
True.
Also applies e.g. to modules from nvidia-drivers etc.


USE="-modules" :

  The following REQUIRED_USE flag constraints are unsatisfied:
    server? ( modules )

Sure - correct!

USE="-modules -server" :  

   - emerges fine, 
   - trying to start a VM complains correctly

# emerge -aC vmware-workstation
# < revert inserting  USE="-modules -server"  >
# emerge vmware-workstation                          <-- correctly pulls Modules
# /etc/init.d/vmware  start
#       chgrp vmware    /dev/vmnet*
#       chmod g+rw      /dev/vmnet*

:: Starting VMs work again.

# /etc/init.d/vmware stop

# emerge -aC vmware-workstation
# emerge -aC vmware-modules

:: No complaints at all.

==>

AFAICS,
with Stefan's vmware-workstation-14.0.0.6661328-r10,
   it is possible to dynamically switch between installations 
   with valid { modules | server } combinations.
   ( No need for reboot etc. )

AFAICS,
   this bug can be RESOLVED as FIXED.

Thanks to Stefan!


@ Jeffrey Lin :

  Please, test and confirm.
Comment 8 Jeffrey Lin 2017-12-02 03:42:18 UTC
Seems to work fine when I connect to a remote host. emerge --info reports:

app-emulation/vmware-workstation-14.0.0.6661328-r10::stefantalpalaru was built with the following:
USE="-bundled-libs -cups -doc -macos-guests -modules -ovftool -server -systemd -vix -vmware-tools-darwin -vmware-tools-darwinPre15 -vmware-tools-freebsd -vmware-tools-linux -vmware-tools-linuxPreGlibc25 -vmware-tools-netware -vmware-tools-solaris -vmware-tools-winPre2k -vmware-tools-winPreVista -vmware-tools-windows" ABI_X86="(64)"


and vmware-modules is not installed.
Comment 9 Manfred Knick 2017-12-02 09:52:13 UTC
(In reply to Jeffrey Lin from comment #8)

> Seems to work fine when I connect to a remote host.
Thanks for your confirmation!

Would you be so kind to reveal against which (e.g. plain ESXi?) host (version) you tested?
Comment 10 Jeffrey Lin 2017-12-03 17:05:39 UTC
(In reply to Manfred Knick from comment #9)
> Would you be so kind to reveal against which (e.g. plain ESXi?) host
> (version) you tested?

ESXi version 6.5.0 (Build 4564106)