gentoo / vmware

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

updated to latest kernel 4.2 and version 12 of player and ws #15

Closed efferre79 closed 8 years ago

efferre79 commented 8 years ago

Hi Andreas, I have changed the vmware repository to keep it updated with latest software available upstream, so it supports kernel 4.2 and version 12 of vmware-player and vmware-workstation. I have added support to kernel 4.2 only for last two releases of modules, i.e 304 and 308. I have removed two patches from vmware-modules/files because they didn't apply anymore (and they were already commented in the ebuild of version 304.

The last version of vmware products ships with bundle files that contain compressed files with size 0 so I had to modify the eclass to manage this new issue. The new eclass was added to the repository too.

eteran commented 8 years ago

some of the patches you updated effect versions as early as 3.19. Have you tested that with these patches the modules still compile on earlier kernels?

efferre79 commented 8 years ago

I have tested (by only compiling, not running) the 304 and 308 versions with all kernels from 3.10 to 4.2

eteran commented 8 years ago

excellent. I'll coordinate with the others involved in maintaining the overlay

efferre79 commented 8 years ago

I have only used vmplayer (not the workstation), the only issue I have seen up to now with version 12 is that many icons on the bottom bar of the virtual machine window (where you have the disk activity, network, usb devices, etc) are missing.

CRHough commented 8 years ago

This fails for workstation with the server use flag enabled. It works fine without the server use flag.

From the build log (with server use flag):

Install vmware-workstation-12.0.0.2985596 into /tmp/portage/app-emulation/vmware-workstation-12.0.0.2985596/image/ category app-emulation chmod: cannot access ‘/tmp/portage/app-emulation/vmware-workstation-12.0.0.2985596/image//opt/vmware/lib/vmware/bin/vmware-wssc-adminTool’: No such file or directory

efferre79 commented 8 years ago

houghcr, please try again, upstream changed the name of the tool. I'm not using vmware-workstation so try running it

efferre79 commented 8 years ago

After feedback received in gentoo bug#559798 and with a few changes, it seems now that vmware-workstation works correctly.

Updated also vmware-tools.

Updated vmware-modules to support upcoming kernel 4.3 (only to latest 304 and 308 versions, time to kill older versions?).

francoisjacques commented 8 years ago

Thanks @efferre79 I'll give it a shot.

francoisjacques commented 8 years ago

Hey @efferre79, I've tried to emerge the package, without success. The patch: app-emulation/vmware-modules/files/308-hardened.patch fails to apply.

See gist - https://gist.github.com/francoisjacques/100c3a71d8e02efe088c for details.

francoisjacques commented 8 years ago

@efferre79 I looked at the patch. I think the offsets in that patch are wrong... it might just have to be regenerated?

efferre79 commented 8 years ago

@francoisjacques: I have fixed the hardened patches (version 304 and 308) to compile fine, please have a try because I don't use pax

francoisjacques commented 8 years ago

Thanks @efferre79! Just tried again and, for some reason, it tries to use 304 instead of 308 now? Anyway, I'm still getting a build error.

https://gist.github.com/francoisjacques/3969dda6280987622ab4

efferre79 commented 8 years ago

Did you pull the updates from the repo? Here the patch applies without problems. Try:

USE=pax_kernel ebuild ${path_to_repo}/app-emulation/vmware-modules/vmware-modules-304.2.ebuild clean prepare

francoisjacques commented 8 years ago

Yup. I did. Thanks for the tip @efferre79! So yeah, I confirm it did not apply correctly, the linux version is 4.1.7

On which version of Linux did you try it?

efferre79 commented 8 years ago

I'm using kernel 4.2.4 but I don't think that matters. Anyway I have installed your version (gentoo-sources-4.1.7), here is what I get

USE=pax_kernel ebuild /var/lib/layman/mine/app-emulation/vmware-modules/vmware-modules-304.2.ebuild prepare

So everything works here. Please compare the patch contents with the two files it touches (vmmon-only/linux/driver.c and vmnet-only/driver.c) to see where is the problem. Are you using my fork, aren't you?

What is the result of following commands: equery b /opt/vmware/lib/vmware/modules/source/vmmon.tar tar -O -xvf /opt/vmware/lib/vmware/modules/source/vmmon.tar vmmon-only/include/iocontrols.h| grep VMMON_VER

francoisjacques commented 8 years ago

Hmm. Yeah that looks pretty good to me.

I'll check, perhaps I'm on the plain linux 4.1.7? Anyway, it looks to be something weird on my side.

francoisjacques commented 8 years ago

Ah, found it !

My kernel version is sys-kernel/hardened-sources (4.1.7-r1)

efferre79 commented 8 years ago

Please post your kernel config and the above requested infos. I'd suggest to continue reporting in Bug #561614 on bugs.gentoo.org because this is a pull request. The most useful debugging you can do is check the patch contents against the touched files

francoisjacques commented 8 years ago

Yup, I agree. In the meantime I'll switch kernel to the unhardened one. Thank you!

dexteradeus commented 8 years ago

Is this going to be merged?

eteran commented 8 years ago

Sorry for the delay. Been quite busy with work lately. I plan to have any patches needed for Workstation 11/12 supported on 4.1+ merged in soon though.

Thanks for being patient.

hrk commented 8 years ago

I can confirm that vmplayer 12.1.0 works flawlessly under currently stable gentoo-sources (4.1.12). Switched origin to efferre79's master and performed a clean emerge (updating tools, modules and player).

hrk commented 8 years ago

FWIW, there may be some issues with deps in @efferre79 branch. Running emerge --depclean produces this:

!!! existing preserved libs:
>>> package: x11-libs/pangox-compat-0.0.2-r1
 *  - /usr/lib64/libpangox-1.0.so.0
 *  - /usr/lib64/libpangox-1.0.so.0.0.0
 *      used by /opt/vmware/lib/vmware/libconf/lib/pango/1.6.0/modules/pango-basic-x.so (app-emulation/vmware-player-12.1.0.3272444)
>>> package: media-libs/tiff-3.9.7-r1
 *  - /usr/lib64/libtiff.so.3
 *      used by /opt/vmware/lib/vmware/libconf/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-tiff.so (app-emulation/vmware-player-12.1.0.3272444)
>>> package: dev-libs/libgcrypt-1.5.4-r100
 *  - /usr/lib64/libgcrypt.so.11
 *  - /usr/lib64/libgcrypt.so.11.8.3
 *      used by /opt/vmware/lib/vmware/lib/libgcr.so.0/libgcr.so.0 (app-emulation/vmware-player-12.1.0.3272444)
Use emerge @preserved-rebuild to rebuild packages using these libraries

Which clearly won't be fixed after a rebuild, since it's a binary package. Used USE="vmware-tools -cups -doc -ovftool"

efferre79 commented 8 years ago

@hrk: yes, it's known, I haven't yet merged the bundled-libs useflag

efferre79 commented 8 years ago

@hrk: can you test latest vmware-workstation-12.1.0.3272444-r1 from my repo? I have just integrated the preserve-libs feature and bundled-libs useflag :-)

Hello71 commented 8 years ago

your version is missing all the new 12 libraries and I believe also will not work with glib 2.46.2.

efferre79 commented 8 years ago

I have only integrated the latest changes from upstream (version 11) to my repo (version 12) to have the same functionality, nothing specific to latest version yet... Is it working for you (both with +bundled-libs or -bundled-libs)?

After using bundled-libs feature, this is the list of additional new libs coming with version 12 (I don't consider here the libs already present in version 11):

The first two only changed name from v11 (I have just noticed that for libvmwarebase.so, see last fix). The only one not specific to vmware seems libpcsclite.so.1 which can be added to the bundled libs with sys-apps/pcsc-lite.

The bundled-libs useflag doesn't currently remove all glib libraries but libgio-2.0.so.0 (I guess Andreas checked ABI compatibility of the others) so vmware works only partially against the system glib. I don't know what will happen with glib 2.46.2 installed (which by the way is not stable yet but it's not slotted differently). Anyway Andreas declared everything as work in progress. Unfortunately the debug symbols are stripped from the shipped libraries so it's not easy to check for ABI compatibility.

Patches are welcome :-)

Hello71 commented 8 years ago

I already integrated bundled-libs properly in 12: https://bugs.gentoo.org/show_bug.cgi?id=559798

efferre79 commented 8 years ago

yes I have seen those but it's not quick to review, it would be easier to compare two repos especially given the fact that the gentoo vmware development is done on github. If you found problems with my repo, as you say before, please indicate the problems (this issue is dedicated to this purpose)

efferre79 commented 8 years ago

@Hello71: I have read your latest version ebuild, there are two errors. Regarding the libs, did you verify that the system libs are ABI compatible with the ones removed from vmware?

Hello71 commented 8 years ago

I verified using the thorough process of "it runs OK".

hrk commented 8 years ago

@efferre79 to tell the truth, I use the player (as I currently have no workstation license yet). After a git pull of https://github.com/efferre79/vmware.git no binary works. Launching from the commandline returns the shell w/o any other effect. This happens both with the vmware-player and vmware-wokstation ebuilds (currently installed is the latter). strace for vmplayer run https://gist.github.com/hrk/601cfaeac6ae2d650b6c Built w/ -bundled-libs.

[ebuild   R   ~] app-emulation/vmware-workstation-12.1.0.3272444-r1::vmware  USE="vmware-tools -bundled-libs -cups -doc -ovftool -server -vix" 0 KiB
hrk commented 8 years ago

Rebuilding w/ +bundled-libs makes the vmplayer binary run.

efferre79 commented 8 years ago

Hopefully now the unbundling should be complete, here the GUI runs correctly but I don't have a license to run a virtual machine. Tests are welcome

hrk commented 8 years ago

Changed USE to "-bundled-libs" and vmplayer runs fine, both GUI and virtual machine.

hrk commented 8 years ago

Something strange: on the recently stable gentoo-sources-4.1.15-r1 the modules compile fine but then no module can be loaded. modprobe claims the module cannot be found (module does not exist), but emerge @module-rebuild has installed them in the right place. This is the first time something like this happens to me, I'm out of ideas, and I've reverted to booting gentoo-sources-4.1.12.

hrk commented 8 years ago
E0557546 ~ # modprobe -vvvvvv vmmon
modprobe: INFO: custom logging function 0x409fd0 registered
modprobe: FATAL: Module vmmon not found.

E0557546 ~ # uname -a
Linux E0557546 4.1.15-gentoo-r1 #1 SMP Thu Jan 28 11:29:13 CET 2016 x86_64 Intel(R) Core(TM) i5-3320M CPU @ 2.60GHz GenuineIntel GNU/Linux

E0557546 ~ # find /lib/modules/4.1.15-gentoo-r1/ -type f -name "vm*"
/lib/modules/4.1.15-gentoo-r1/misc/vmci.ko
/lib/modules/4.1.15-gentoo-r1/misc/vmmon.ko
/lib/modules/4.1.15-gentoo-r1/misc/vmblock.ko
/lib/modules/4.1.15-gentoo-r1/misc/vmnet.ko
E0557546 ~ # 

I am clueless as to what may be happening. 4.1.15-r1 was compiled from a make oldconfig and has no changes in configuration in regards to 4.1.12.

efferre79 commented 8 years ago

that's strange, try to look with strace or kernel messages with dmesg. Review also the vmware-modules build log for possible warnings

hrk commented 8 years ago

Thanks, I always forget that strace is my best friend at understanding what's going wrong :) Using strace, I can see that modprobe checks modules.dep.bin, then modules.alias.bin, modules.symbols.bin and modules.builtin.bin before claiming that the module doesn't exist. Looking at the text files (not the binary ones I don't know how to parse), it appears something is indeed wrong:

E0557546 modules # diff -Naur 4.1.1{2-gentoo,5-gentoo-r1}/modules.dep
--- 4.1.12-gentoo/modules.dep   2016-01-19 09:56:23.434975024 +0100
+++ 4.1.15-gentoo-r1/modules.dep        2016-01-28 11:29:35.235905352 +0100
@@ -79,8 +79,3 @@
 kernel/net/bluetooth/hidp/hidp.ko: kernel/net/bluetooth/bluetooth.ko
 kernel/net/mac80211/mac80211.ko: kernel/net/wireless/cfg80211.ko
 kernel/lib/lz4/lz4_compress.ko:
-misc/vmmon.ko:
-misc/vmci.ko:
-misc/vmnet.ko:
-misc/vmblock.ko:
-misc/vsock.ko: misc/vmci.ko

Rebuilding vmware-modules has no warning whatsoever. emerge -C and then emerge again changes nothing. The dep file keeps the same last-modified date.

efferre79 commented 8 years ago

linux-mod.eclass automatically runs the depmod utility to update the module.dep file, you could try running manually to see what happens (in the build log you should see "Updating module dependencies" notice somewhere). To see how the command is run you can have a look at the update_depmod() function in the linux-mod.eclass

efferre79 commented 8 years ago

@hrk: it should be fixed now

hrk commented 8 years ago

app-emulation/vmware-modules fix confirmed to be working.

hrk commented 8 years ago

@efferre79 a couple of minor/cosmetic issues:

  1. "app-emulation/vmware-workstation is using the deprecated readme.gentoo.eclass. Please use readme.gentoo-r1 instead."
  2. Somehow, the ebuild doesn't reference the specific media-libs/tiff version it requires, as after an emerge --depclean -av I get this after using emerge:
!!! existing preserved libs:
>>> package: media-libs/tiff-3.9.7-r1
 *  - /usr/lib64/libtiff.so.3
 *      used by /opt/vmware/lib/vmware/libconf/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-tiff.so (app-emulation/vmware-workstation-12.1.0.3272444-r1)
Use emerge @preserved-rebuild to rebuild packages using these libraries

Installed is the 4.0.x:

E0557546 ~ # emerge media-libs/tiff -pv

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] media-libs/tiff-4.0.3-r6::gentoo  USE="cxx jpeg zlib -jbig -lzma -static-libs {-test}" ABI_X86="(64) -32 (-x32)" 2,004 KiB
efferre79 commented 8 years ago

@hrk: thanks for the suggestions, I'm working to add missing deps now. I'm wondering if the libs under /opt/vmware/lib/vmware/libconf//lib can be removed with -bundled-libs (as they are related to gtk+:2) adding dependencies on gnome-base/librsvg-2.39 (not in portage anymore...) and x11-themes/gtk-engines. What a mess with binary packages! :-)

efferre79 commented 8 years ago

@hrk: hopefully now it's fine

efferre79 commented 8 years ago

@eteran: any chance to have my fork reviewed and merged in portage? the only doubt I have currently is the introduction of USE=bundled-libs. We'll never be able to remove all the bundled libs, the required effort to support this feature is quite high and it leaves alive the possibility of having bugs caused by system libs not 100% compatible with the bundled version.

hrk commented 8 years ago

@efferre79 I confirm that everything I noticed is now fixed w/ USE=-bundled-libs. No more warnings or revdep-rebuild messages.

hrk commented 8 years ago

@eteran I second @efferre79's request, as I've tested successfully the new ebuilds in different configurations.

eteran commented 8 years ago

@hrk @efferre79 Sorry for the delay. As you can imagine, any change to a kernel module needs to be tested on a LOT of different versions (right now I test everything I think from 3.15 - 4.5!). I've begun banging through the necessary patches tonight and have gotten vmware 11 up to speed. I plan to get vmware 12 in the overlay and give it the same treatment over the next few days.

efferre79 commented 8 years ago

@eteran: thanks, I hope we'll see merged soon :-) latest vmware-modules should have all the needed patches to support up to kernel 4.5, I want to point out that I have added a custom patch in pkg_setup() (see append-cflags -mno-sse line) which must be solved at the base in linux-mod.eclass, see my bug report at https://bugs.gentoo.org/show_bug.cgi?id=571800. Moreover look at https://github.com/gentoo/vmware/issues/18 regarding the versioning of vmware-modules-308*