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?

OVT_SOURCE_DIR is used when compiling the sources within the open-vm-tools 
tree; 
they allow the makefiles to find all those shared header and sources you'll 
have 
to copy into the module's directory when using dkms.

Makefile.kernel is needed because some modules also support 2.4 kernels, and 
the 
build instructions for those is in Makefile.normal. The top-level Makefile will 
detect which sub-makefile it needs to use.

> - 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 http://open-vm-tools.sourceforge.net/contribute.php 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. :-)

-- 
- Marcelo

------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com 
_______________________________________________
open-vm-tools-devel mailing list
open-vm-tools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open-vm-tools-devel

Reply via email to