[Pkg-virtualbox-devel] Bug#456916: virtualbox-ose-source: fails to build kernel module

Stefan Lippers-Hollmann s.L-H at gmx.de
Tue Dec 18 13:44:21 UTC 2007


Package: virtualbox-ose-source
Version: 1.5.2-dfsg2-5
Severity: grave
Justification: renders package unusable
Tags: patch

*** Please type your report below this line ***
Hi

A side effect of commit r134, the addition of 
debian/virtualbox-ose-source.dirs, was that 
	usr/src/modules/virtualbox-ose/
	usr/src/modules/virtualbox-ose/debian/
now exist before the install target of debia/rules gets invoked
	# Install virtualbox-ose-source
	mv debian/$(sname)/usr/lib/virtualbox/src debian/$(psource)/usr/src/modules/$(sname)
which now moves
	debian/$(sname)/usr/lib/virtualbox/src/
to
	debian/$(psource)/usr/src/modules/$(sname)/src/
because debian/$(psource)/usr/src/modules/$(sname) already exists, 
although debian/virtualbox-ose-source.rules still expects the kernel 
module's Makefile still in 
	debian/$(psource)/usr/src/modules/$(sname)/Makefile
instead of
	debian/$(psource)/usr/src/modules/$(sname)/src/Makefile

This results in the following error while trying to build kernel modules via virtualbox-ose-source

cd /tmp/pkg/linux && \
	make-kpkg --rootcmd fakeroot --revision 1 modules
[...]
make[2]: Entering directory `/tmp/pkg/modules/virtualbox-ose'
fakeroot kmk -w -f debian/rules kdist_clean kdist_config binary-modules
kmk[3]: Entering directory `/tmp/pkg/modules/virtualbox-ose'
kmk -w -f debian/rules clean
kmk[4]: Entering directory `/tmp/pkg/modules/virtualbox-ose'
kmk[4]: Nothing to be done for `clean'.
kmk[4]: Leaving directory `/tmp/pkg/modules/virtualbox-ose'
kmk[3]: Nothing to be done for `kdist_config'.
for templ in ; do \
    cp $templ `echo $templ | sed -e 's/_KVERS_/2.6.24-rc5-git5-slh-smp-1/g'` ; \
  done
for templ in `ls debian/*.modules.in` ; do \
    test -e ${templ%.modules.in}.backup || cp ${templ%.modules.in} ${templ%.modules.in}.backup 2>/dev/null || true; \
    sed -e 's/##KVERS##/2.6.24-rc5-git5-slh-smp-1/g ;s/#KVERS#/2.6.24-rc5-git5-slh-smp-1/g ; s/_KVERS_/2.6.24-rc5-git5-slh-smp-1/g ; s/##KDREV##/1/g ; s/#KDREV#/1/g ; s/_KDREV_/1/g  ' < $templ > ${templ%.modules.in}; \
  done
dh_testroot
dh_clean -k
# Build the module
kmk all KSRC=/tmp/pkg/linux KVER=2.6.24-rc5-git5-slh-smp-1 KERN_DIR=/tmp/pkg/linux
kmk[4]: Entering directory `/tmp/pkg/modules/virtualbox-ose'
kmk[4]: *** No rule to make target `all'.  Stop.
kmk[4]: Leaving directory `/tmp/pkg/modules/virtualbox-ose'
kmk[3]: *** [binary-modules] Error 2
kmk[3]: Leaving directory `/tmp/pkg/modules/virtualbox-ose'
make[2]: *** [kdist_build] Error 2
make[2]: Leaving directory `/tmp/pkg/modules/virtualbox-ose'
Module /tmp/pkg/modules/virtualbox-ose failed.
Perhaps /tmp/pkg/modules/virtualbox-ose does not understand --rootcmd?
If you see messages that indicate that it is not
in fact being built as root, please file a bug
against /tmp/pkg/modules/virtualbox-ose.
Hit return to Continue?

Of course, (/tmp/pkg/)modules/virtualbox-ose/Makefile does not exist, as 
it is hiding in (/tmp/pkg/)modules/virtualbox-ose/src/Makefile.

I see two potential fixes for this issue, the attached debdiff
"virtualbox-ose-source_fix-installdir.diff" installs the module source 
directly to modules/virtualbox/ again, while the likewise attached 
debdiff "virtualbox-ose-source_fix-rules.diff" rewrites 
debian/virtualbox-ose-source.rules to deal with the module sources now
residing in a subdir.

Personally I tend to favour "virtualbox-ose-source_fix-installdir.diff", as
it seems to be more consistent to keep a top level Makefile than 
redirecting to a subdirectory in debian/rules.

Regards
	Stefan Lippers-Hollmann

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.24-rc5-git5-slh64-smp-1 (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages virtualbox-ose-source depends on:
ii  bzip2                         1.0.3-7    high-quality block-sorting file co
ii  debhelper                     5.0.62     helper programs for debian/rules
ii  dpatch                        2.0.28     patch maintenance system for Debia
ii  kbuild                        1366-1     framework for writing simple makef
ii  module-assistant              0.10.11    tool to make module package creati

virtualbox-ose-source recommends no packages.

-- no debconf information
-------------- next part --------------
A non-text attachment was scrubbed...
Name: virtualbox-ose-source_fix-installdir.diff
Type: text/x-diff
Size: 693 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/pkg-virtualbox-devel/attachments/20071218/fa7a5e6c/attachment.diff 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: virtualbox-ose-source_fix-rules.diff
Type: text/x-diff
Size: 619 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/pkg-virtualbox-devel/attachments/20071218/fa7a5e6c/attachment-0001.diff 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.alioth.debian.org/pipermail/pkg-virtualbox-devel/attachments/20071218/fa7a5e6c/attachment.pgp 


More information about the Pkg-virtualbox-devel mailing list