text: Olivier LAHAYE
  Thu, 04 Jun 2009 08:11:44 -0700
  I've slightly modified my packages and found few mino bugs. Here are the patchs: (see attachments)
  OVT_dkms_conf.patch: swap build of vmci and vsocks so symvers file is available when building vsocks OVT_configure_ac.patch: fix DOT= variable OVT_vmtoolsd_automake.patch : VMTOOLSD_PLUGIN_ROOT points to /usr/share/open-vm-tools instead of /usr/share/open-vm-tools/plugins OVT_doc_Makefile_am.patch: set PROJECT_NAME variable OVT_wiperPosix._c.patch: handle fgets return (maybe a incorrect patch, at least it works for me) aside that, I'm a little bit lost with few things: 1) I don't have vmtoolsd.conf samble file, where can I get one? 2) there are icons for .desktop files, but they are in xpm format and seems to be installed in bad location. are they used by other stuffs? if not, then I may convert them to png. 3) the vmblock module, when loaded does create /proc/fs/vmblock, but this directory is empty (no mountPoint subdir). no warnings in dmesg.... 4) I'm little bit lost between vmtoolsd and vmware-user-suid-wrapper: which one should be run? I've started vmtoolsd from inti.d script, it loads but I can't see anithing more.screen does not resise. then if I start vmware-user-suid-wrapper, screen can be resized. Though, mouse is unable to go outside the vmware window. I still must press CTRL-ALT... what could be wrong? Thanks for any tips. Regards, Olivier. Le mercredi 27 mai 2009 13:05:37 Olivier LAHAYE, vous avez écrit : > > Thanks Marcelo, > > I think I've got it. I finaly managed how to create a working dkms package > following your tips. > the result can be found here: > > > > > > > > I've attached the spec file so you can look at the %install stage and see all > the tricks I did. > Basicaly: for DKMS package: > - I've patched dkms.conf file to have vmci module built before vsock and thus > have the VMwareVMCIModule.symvers file generated befor building vsock module > - I've patched dkms.conf file to define MODULEBUILDDIR as it seems not > defined when run from dkms and thus symers files are not properly copied. > - I've created a symlink to the shared directory in each module tree. (I > think there are better way for this approach like changing the way makefiles > are generated so they all use the shared directory in the parent directory. > - I've put all shared includes form lib/include /lib/misc/ ....into the > shared directory > - I've put specific source files and includes in respective modules directory > - I've put backdoorGcc*.c files into vmhgfs directory and created a symlink > to it into the vmmemctl directory. (I think there should be a better approach > to this problem, but this quick and dirty hack is doing its job for now). > > I've attached the content of the 3 binary packages for information. > > Regards, > > Olivier. > > Le mardi 26 mai 2009 01:48:58 Marcelo Vanzin, vous avez écrit : > > Hi Olivier, > > > > Olivier LAHAYE wrote: > > > Then I had to patch docs/api/Makefile.am to add the -e > > > 's,##{PROJECT_NAME}##,@PACKAGE_STRING@,' line and then I had to fix > > > lib/wiper/wiperPosix.c to handle fgets return. > > > > Thanks for pointing out the PROJECT_NAME thing, I'll fix that. Dominique > > also > > pointed out the fgets() issue (it seems Ubuntu's headers are still not > > complaining about that function so I didn't catch it), I'll fix it > > internally > > (it shouldn't be hard to work around so you get things to compile). > > > > > - Put modules in a dkms package that build modules at boot if the kernel > > > has > > > been updated > > > > If you start with the latest open-vm-tools package, to create a working > > kernel > > module package to each module, you'll have to do the following: > > > > . create a new <target> directory for the module source > > . copy the module sources from their original locations into <target> > > . copy the modules/linux/shared directory into <target> (you should end up > > with > > a "shared" subdirectory) > > . if one exists, copy the contents of modules/shared/<module> into <target> > > . copy shared headers from lib/include into <target>/shared; these should > > take > > care of all modules: > > > > backdoor_def.h > > backdoor_types.h > > guest_msg_def.h > > includeCheck.h > > vm_assert.h > > vm_atomic.h > > vm_basic_asm.h > > vm_basic_asm_x86.h > > vm_basic_asm_x86_64.h > > vm_basic_defs.h > > vm_basic_math.h > > vm_basic_types.h > > vm_device_version.h > > vmware.h > > vmware_pack_begin.h > > vmware_pack_end.h > > vmware_pack_init.h > > dbllnklst.h > > circList.h > > x86cpuid.h > > > > . for a few modules, you'll have to copy extra source files (and some > > private > > header files) from lib/ into <target>; I think the worst case here is > > vmhgfs. > > You can check each module's Makefile.kernel to figure out the source files > > that > > need to be copied (there will be a section starting with "ifdef > > OVT_SOURCE_DIR" > > where all object files are listed manually - you just need to copy the > > corresponding .c file from lib/). > > > > Hopefully this can get you started. > > > > > I've notices in the modules dir that the Makefile has different > > > behaviours > > > depending OVT_SOURCE_DIR is defined or not. I've also noticed that the > > > dkms.conf file uses the standard Makefile. Then what is the purpose of > > > Makefile.kernel file? > > > >. > > > > > - Create a working open-vm-tools-devel package that permit developpements > > > of > > > new tools (tuypicaly would contain includes and .so files) > > > > As Dominique hinted at, mostly open-vm-tools are not yet extensible and > > wouldn't > > need a -devel package; there's one exception, though - the "guestlib" > > library. > > But you just need to install a handful of headers for this library (instead > > of > > everything under lib/include), namely: > > > > vm_basic_types.h > > vmGuestLib.h > > vmSessionId.h > > includeCheck.h > > > > It's also a good idea to include "modules/linux/vsock/linux/vmci_sockets.h" > > in > > that package so that users can write programs that use the vsock module. > > > > > I've also created an init file (/etc/init.d/vmtoolsd) that should be LSB > > > compatible (see attachment). > > > > I think it would be great to have this file in the distribution, even if > > just to > > serve as a starting point for packagers. If you haven't done so yet, could > > you > > take a look at and > > follow > > the instructions so we can get it into the official package? > > > > > Maybe one day all thoses modules will go into the standard linux > > > kernel.... > > > who knows? > > > > Believe me, you're not the only people who want that to happen. :-) > > > -- Olivier LAHAYE CEA Saclay
  --- modules/linux/dkms.conf.orig 2009-06-04 14:23:36.000000000 +0200 +++ modules/linux/dkms.conf 2009-06-04 14:17:46.000000000 +0200 @@ -1,13 +1,14 @@ PACKAGE_NAME=open-vm-tools PACKAGE_VERSION=2009.05.22 +export MODULEBUILDDIR=/var/lib/dkms/open-vm-tools/2009.05.22.167859-2cea2009.1/build MAKE[0]="make -C pvscsi VM_UNAME=\$kernelver; \ make -C vmblock VM_UNAME=\$kernelver; \ make -C vmhgfs VM_UNAME=\$kernelver; \ make -C vmmemctl VM_UNAME=\$kernelver; \ make -C vmsync VM_UNAME=\$kernelver; \ make -C vmxnet VM_UNAME=\$kernelver; \ - make -C vsock VM_UNAME=\$kernelver; \ make -C vmci VM_UNAME=\$kernelver; \ + make -C vsock VM_UNAME=\$kernelver; \ make -C vmxnet3 VM_UNAME=\$kernelver" CLEAN[0]="make -C pvscsi clean; \ make -C vmblock clean; \ @@ -15,8 +16,8 @@ make -C vmmemctl clean; \ make -C vmsync clean; \ make -C vmxnet clean; \ - make -C vsock clean; \ make -C vmci clean; \ + make -C vsock clean; \ make -C vmxnet3 clean" BUILT_MODULE_NAME[0]="pvscsi" BUILT_MODULE_NAME[1]="vmblock"
  --- configure.ac.orig 2009-06-04 14:12:36.000000000 +0200 +++ configure.ac 2009-06-04 14:11:50.000000000 +0200 @@ -892,7 +892,7 @@ [yes], [no]) if test "$HAVE_DOT" = "yes"; then - DOT=dot + DOT=/usr/bin else DOT= fi
  --- services/vmtoolsd/Makefile.am.orig 2009-06-03 19:09:55.000000000 +0200 +++ services/vmtoolsd/Makefile.am 2009-06-03 19:10:43.000000000 +0200 @@ -25,7 +25,7 @@ vmtoolsd_CPPFLAGS += @GOBJECT_CPPFLAGS@ vmtoolsd_CPPFLAGS += @GTHREAD_CPPFLAGS@ vmtoolsd_CPPFLAGS += -I$(builddir) -vmtoolsd_CPPFLAGS += -DVMTOOLSD_PLUGIN_ROOT=\"$(pkglibdir)\" +vmtoolsd_CPPFLAGS += -DVMTOOLSD_PLUGIN_ROOT=\"$(pkglibdir)/plugins/\" vmtoolsd_LDADD = vmtoolsd_LDADD += @VMTOOLS_LIBS@
  --- docs/api/Makefile.am.orig 2009-06-04 14:12:53.000000000 +0200 +++ docs/api/Makefile.am 2009-06-04 14:11:50.000000000 +0200 @@ -37,6 +37,7 @@ build/index.html: mkdir -p build sed \ + -e 's,##{PROJECT_NAME}##,@PACKAGE_STRING@,' \ -e 's,##{BUILD_DIR}##,$(top_builddir),' \ -e 's,##{BUILD_OUTPUT}##,build,' \ -e 's,##{CPP_EXPAND}##,$(DOXYGEN_CPP_EXPAND),' \
  --- lib/wiper/wiperPosix.c.orig 2009-06-04 14:13:25.000000000 +0200 +++ lib/wiper/wiperPosix.c 2009-06-04 14:11:50.000000000 +0200 @@ -997,7 +997,9 @@ Wiper_Init(void *clientData) { #if defined(__linux__) && !defined(N_PLAT_NLM) + char *p; FILE *fp; + int saveErrno; int deviceNum; char deviceName[256]; @@ -1013,7 +1015,11 @@ } } } else { - fgets(deviceName, sizeof deviceName, fp); + p = fgets(deviceName, sizeof deviceName, fp); + saveErrno = errno; + if (p == NULL) + Warning("DEVICE:"" Failed to read line from %s (%s).\n", + "/proc/devices", strerror(saveErrno)); } }
  ------------------------------------------------------------------------------ OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to:
  _______________________________________________ open-vm-tools-devel mailing list open-vm-tools-devel@lists.sourceforge.net