should build kernel modules with dkms

Bug #277556 reported by Craig on 2008-10-03
26
This bug affects 3 people
Affects Status Importance Assigned to Milestone
open-vm-tools (Debian)
Fix Released
Unknown
open-vm-tools (Ubuntu)
Undecided
Evan Broder
Nominated for Karmic by Craig

Bug Description

Binary package hint: open-vm-tools

dkms will allow the kernel modules to be automagically recompiled when a new kernel is installed, which is incredibly handy.

Right now, there's a many step process required (get the source, compile the source, install the modules) every time the kernel is upgraded.

The new upstream open-vm-tools release (2008.11.18) now provides dkms.conf which should allow for easy dkms integration. Could someone more familiar with dkms give this a shot?

Craig (candrews-integralblue) wrote :

With open-vm-tools the way it is now, if a kernel upgrade is performed (as happens often with security upgrades), and you forget to re-compile open-vm-sources, at next boot the system will have some major issues (like networking doesn't come up). With automated security installs (like I use), this means that whenever a reboot happens, there's a decent chance the system won't come up. I think it would be worth while to make DKMS work in this package to prevent these issues - I bet a lot of sysadmin would love you for it :-)

Launchpad Bug Tracker wrote:
> You have been subscribed to a public bug by Craig (candrews-integralblue):

read this:
http://people.debian.org/~daniel/documents/ubuntu.html

do *never* subscribe people to something without their prior consent.

--
Address: Daniel Baumann, Burgunderstrasse 3, CH-4562 Biberist
Email: <email address hidden>
Internet: http://people.panthera-systems.net/~daniel-baumann/

Changed in open-vm-tools:
status: Unknown → Fix Released
Greek Ordono (grexk) wrote :
Changed in open-vm-tools (Ubuntu):
assignee: nobody → Greek Ordoño (grexk)
status: New → Confirmed
Craig (candrews-integralblue) wrote :

I do not have Hardy around any more. If you make a Jaunty or Karmic version, I'll test it so fast it'll make your head spin :-)

Craig (candrews-integralblue) wrote :

I'm attaching a patch I made by taking all of grexk's patches (ppa1 through ppa3) from his ppa and porting them to the latest version of open-vm-tools in karmic (which is version 2009.05.22-167859-3). Here's to hoping this patch is acceptable for karmic!

Craig (candrews-integralblue) wrote :

I'm attaching a patch I made by taking all of grexk's patches (ppa1 through ppa3) from his ppa and porting them to the latest version of open-vm-tools in karmic (which is version 2009.05.22-167859-3). Here's to hoping this patch is acceptable for karmic!

Greek Ordono (grexk) wrote :

Sorry for the late reply, Can you check if this going to work well with karmic(https://launchpad.net/~grexk/+archive/ubuntu-dev/+files/open-vm-tools-dbg_2009.05.22-167859-3~ppa2.1_i386.deb). Check also my ppa for updates.

Greek Ordono (grexk) wrote :

dkms is not possible with open-vm-tools-2009-04-23 to latest version until fixed upstream.

Craig (candrews-integralblue) wrote :

"dkms is not possible with open-vm-tools-2009-04-23 to latest version until fixed upstream."

Did you fix this in your ppa version at https://launchpad.net/~grexk/+archive/ubuntu-dev ? If not... this won't work on Karmic anyway, right?

Also, I only have access to karmic systems running amd64, and right now, your version of open-vm-tools fails to build on amd64. https://launchpad.net/~grexk/+archive/ubuntu-dev/+build/1083732/+files/buildlog_ubuntu-karmic-amd64.open-vm-tools_2009.05.22-167859-3~ppa2.1_FAILEDTOBUILD.txt.gz

Craig (candrews-integralblue) wrote :

I got your ppa2.1 from https://launchpad.net/~grexk/+archive/ubuntu-dev to build on Intrepid by removing the dependency on liburiparser-dev from debian/control, and adding "--disable-unity" to the configure line in debian/rules on line 108. (Would I be asking too much if I requested an Intrepid version in your ppa? :-) )

I then used dpkg to install the resulting open-vm-dkms_2009.05.22-167859-3~ppa2.1_all.deb and ended up with the attached errors when dkms attempted to compile the modules.

Greek Ordono (grexk) wrote :

check my ppa for working open-vm-dkms but I'm still working out the amd64 version.

Craig (candrews-integralblue) wrote :

Mr Ordono, thanks for this great work!

I just compiling the package myself, and noticed two interesting warnings:

1) checking for notify_init in -lnotify... no
configure: WARNING: libnotify not found; notification disabled

Should a build dependency on libnotify-dev be added?

2) dpkg-gencontrol: warning: unknown substitution variable ${misc:Depends}
dpkg-gencontrol: warning: unknown substitution variable ${misc:Depends}

3) On karmic, the package compiles and works great!

4) On jaunty, if the dependency on liburiparser-dev is dropped and "--disable-unity" is added to the configure line, the packages and works great!

I can't wait until the amd64 situation is resolved. I'm quite psyched :-) Thanks again

Greek Ordono (grexk) wrote :

amd64 is now available. can you please check if dkms version will build perfectly in amd64.

Craig (candrews-integralblue) wrote :

I only have access to an amd64 Jaunty machine at the moment, and I just did the --disable-unity trick and the package compiled and I installed the resulting open-vm-dkms_2009.06.18-172495-0~ppa1_all.deb. Works perfectly!

Are you authorized to push this package to Karmic, or do you need to seek a sponsor?

Craig (candrews-integralblue) wrote :

I just installed open-vm-dkms_2009.06.18-172495-0~ppa1_all.deb on a server. The vmware server said that the tools were not running, so I checked ps, and sure enough, vmtoolsd was not running.

I ran "strace vmtoolsd" and this is the end of the output:
stat64("/etc/vmware-tools/tools.conf", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
open("/etc/vmware-tools/tools.conf", O_RDONLY|O_LARGEFILE) = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
close(4) = 0
time(NULL) = 1245705534
pipe([4, 5]) = 0
fcntl64(4, F_SETFD, FD_CLOEXEC) = 0
fcntl64(5, F_SETFD, FD_CLOEXEC) = 0
rt_sigaction(SIGSEGV, {0xb8084900, [SEGV], 0}, {SIG_DFL}, 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
rt_sigaction(SIGSEGV, {SIG_DFL}, NULL, 8) = 0
gettimeofday({1245705534, 60827}, NULL) = 0
stat64("/usr/lib/open-vm-tools/vmsvc", 0xbfec85dc) = -1 ENOENT (No such file or directory)
exit_group(1) = ?

vmtoolsd is looking for /usr/lib/open-vm-tools/vmsvc, but the actual path is /usr/lib/open-vm-tools/plugins/vmsvc

Craig (candrews-integralblue) wrote :

BTW:
ln -s /usr/lib/open-vm-tools/plugins/vmsvc /usr/lib/open-vm-tools/vmsvc
makes vmtoolsd work.

Marcelo Vanzin (mvanzin) wrote :

Hi Craig,

The vmtoolsd issue is a problem in the vmtoolsd source, not the package (although symlinking can help in the meantime as you've noticed). I'll fix it in the Tools source.

Craig (candrews-integralblue) wrote :

Thanks, Marcelo!

I believe I have found another problem. vmtoolsd does not work if the "--background" option is specified.

# vmtoolsd -l --background /var/run/vmtoolsd.pid
[Jun 22 18:14:42.984: ] [ warning] [vmtools] Hostinfo_Daemonize: Child could not exec /home/candrews/vmtoolsd, read 4, error 2.

It appears vmtoolsd is looking for itself in the cwd, instead of where it is actually located.

Marcelo Vanzin (mvanzin) wrote :

Thanks for letting us know. In the meantime, you can work around that by using the absolute path to execute vmtoolsd with the --background option (e.g. /usr/bin/vmtoolsd --background ...).

Greek Ordono (grexk) wrote :

I'm not authorized to upload to karmic, how can I be sponsored? I uploaded fixes for vmtoolsd, can you confirm if this is working now?

Greek Ordono (grexk) on 2009-06-23
Changed in open-vm-tools (Ubuntu):
assignee: Greek Ordono (grexk) → nobody
Craig (candrews-integralblue) wrote :

You are remarkable - the addition of Jaunty packages to the PPA makes my life a whole lot easier. I just installed the new packages on one of the Jaunty servers I use, and it worked great. vmtoolsd started right up, and seems to work without a hassle.

Looking through the package changelog, these appear to be the Ubuntu developer contacts you may have the best luck with:
Devid Antonio Filoni <email address hidden>
Dan Sheridan <email address hidden>

The ideal approach would be to get your patches in Debian. The debian maintainer for open-vm-tools is: Daniel Baumann <email address hidden>

There is a bug in debian requesting DKMS support at http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=516251

Also, the #ubuntu-dev channel on freenode may be able to help you find a sponsor.

Greek Ordono (grexk) on 2009-06-23
tags: added: upgrade
Craig (candrews-integralblue) wrote :

I have no idea what to do next... How do we get this included?

I contact the kernel team, here is their response: https://lists.ubuntu.com/archives/kernel-team/2009-June/006184.html

Ubuntu is fine with DKMS, so this package should be picked up. We just need someone at Debian or Ubuntu to accept it.

Craig (candrews-integralblue) wrote :

I've emailed Daniel (the Debian maintainer) and I'm trying to contact the Ubuntu MOTU team as well.

Anyways, open-vm-tools-2009.06.18-172495 has been released. If it's not too much to ask, would you mind updating this package?

Greek Ordono (grexk) wrote :

I'm going to sync later this week with upstream package.

Craig (candrews-integralblue) wrote :

According to Daniel Baumann, Debian could add open-vm-tools to a conglomeration package of kernel modules if these Debian bugs are resolved:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=525816
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=531936
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=532293
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=518014

I believe Greek Ordono's packaging fixes all 4.

Craig (candrews-integralblue) wrote :

grexk, did you do any more work on the packaging?

MOTU team, are you able to accept this? What is holding it back?

Greek Ordono (grexk) wrote :

I'm quite busy for the past months. here is dkms debdiff for karmic.

Craig (candrews-integralblue) wrote :

It would be awesome to have this fixed for the upcoming LTS release... grexk, are you still interested in doing so?

Evan Broder (broder) on 2009-12-19
Changed in open-vm-tools (Ubuntu):
status: Confirmed → In Progress
assignee: nobody → Evan Broder (broder)
Evan Broder (broder) wrote :

grexk: thanks for the patch. A few nits for future reference:
 - LP closers are generally of the form (LP: #nnnnnn) - you didn't have the hash
 - It looks like you added a superfluous line to set SRC_VERSION in debian/rules
 - Your version number was appropriate for a PPA upload, but not for uploading to Ubuntu. There's some discussion of version numbering schemes at <https://wiki.ubuntu.com/UbuntuDevelopment#Working%20with%20Ubuntu%20Packages>

Of course, packages that support building kernel modules with module-assistant are special. For those packages, it's necessary to use +ubuntu1 instead of just ubuntu1 in order to avoid version sorting issues.

I've combined grexk's patch with my patch for bug #391224 with the recommendations on using dkms in bug #497149. I've uploaded a test build to my PPA (https://launchpad.net/~broder/+archive/ubuntu-tests), and I'm attaching the resulting debdiff. I'm going to do some testing to make sure everything's in order, and hopefully I'll be able to upload tonight or tomorrow.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package open-vm-tools - 2009.11.16-210370-1+ubuntu1

---------------
open-vm-tools (2009.11.16-210370-1+ubuntu1) lucid; urgency=low

  * Recommend open-vm-toolbox in open-vm-tools. (LP: #391224)
  * Add support for dkms - based on patch from Greek Ordono. (LP: #277556)
 -- Evan Broder <email address hidden> Fri, 18 Dec 2009 20:18:42 -0500

Changed in open-vm-tools (Ubuntu):
status: In Progress → Fix Released
Changed in open-vm-tools (Debian):
status: Fix Released → Fix Committed
Changed in open-vm-tools (Debian):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.