Hi Marcelo,

I've worked on the new release (build 167859) and I'm still having great 
difficulties to package open-vm-tools.

Here are the problems.

1st of all I had to do a few patch for the whole stuff to build correctly (see 
attachment). Basicaly I had to patch configure.ac (DOT=/usr/bin instead of 
DOT=dot). 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.

2nd, lib/include/err.h has the same name as /usr/include.err.h
Should the file be packaged in the open-vm-tools-devel? if yes, should the 
includes go to /usr/include or /usr/include/vmware ?

3rd I must admit that I'm a little bit lost in finding what files should be 
packaged and what files are only relevant to build open-vm-tools.
Basicaly, which includes should be part of open-vm-tools-devel:/usr/include, 
which files should be part of dkms-open-vm-tools (that are not in open-vm-
tools)

I've also created an init file (/etc/init.d/vmtoolsd) that should be LSB 
compatible (see attachment).

Aside that, except using the ./configure script, I'm totaly unfamiliar with 
autotools, and thus I'm realy unable to go beyond a few very basic patch in 
.ac and .am files, thus I'm afraid I won't be able to setup the "autoconf 
stuff" 
in the shared dir.
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?

Best regards,

Olivier.



Le mardi 19 mai 2009 02:30:01 Marcelo Vanzin, vous avez écrit :
> About your other question about what files to package, after all this
> cleanup it does become a little bit trickier to package modules for use
> with dkms; basically, what you'll have to do is:
>
> . place all shared headers either on the module's dir directly, or under a
> "shared" directory under the module's source dir
> . place all the "autoconf" stuff under "shared/autoconf" under the module's
> source dir
> . copy any shared sources to the module's source dir (for example,
> lib/misc/dbllnklst.c which is used by a few modules).
>
> Also, you shouldn't define OVT_SOURCE_DIR when building through dkms (in
> case you're wondering why that's used in modules/Makefile.am). That
> variable changes the behavior of the makefiles to use the shared stuff in
> the open-vm-tools package, which is not what you want for dkms.
>
> We do something similar when we package these modules with the Tools we
> ship with Workstation or other VMware products, so if you want more
> information about what the directory structure for building different
> modules "stand alone" looks like, feel free to ask.

-- 
        Olivier LAHAYE
        CEA Saclay
        DRT-LIST-DETECS-SSTM
diff -ru open-vm-tools-2009.05.22-167859.old/configure.ac open-vm-tools-2009.05.22-167859/configure.ac
--- open-vm-tools-2009.05.22-167859.old/configure.ac	2009-05-22 09:00:44.000000000 +0200
+++ open-vm-tools-2009.05.22-167859/configure.ac	2009-05-25 14:07:13.000000000 +0200
@@ -892,7 +892,7 @@
                     [yes],
                     [no])
       if test "$HAVE_DOT" = "yes"; then
-         DOT=dot
+         DOT=/usr/bin
       else
          DOT=
       fi
diff -ru open-vm-tools-2009.05.22-167859.old/docs/api/Makefile.am open-vm-tools-2009.05.22-167859/docs/api/Makefile.am
--- open-vm-tools-2009.05.22-167859.old/docs/api/Makefile.am	2009-05-22 09:00:44.000000000 +0200
+++ open-vm-tools-2009.05.22-167859/docs/api/Makefile.am	2009-05-25 14:07:26.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),'         \
diff -ru open-vm-tools-2009.05.22-167859.old/lib/wiper/wiperPosix.c open-vm-tools-2009.05.22-167859/lib/wiper/wiperPosix.c
--- open-vm-tools-2009.05.22-167859.old/lib/wiper/wiperPosix.c	2009-05-22 09:01:33.000000000 +0200
+++ open-vm-tools-2009.05.22-167859/lib/wiper/wiperPosix.c	2009-05-25 14:07:48.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));
          }
       }
 

Attachment: vmtoolsd
Description: application/shellscript

------------------------------------------------------------------------------
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