Package: et131x-source
Version: 1.2.3-4
Severity: normal
Tags: patch

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

Trying to build et131x against a freshly built kernel(-source) using 
make-kpkg fails, because it attempts to build against the source/ headers
of the currently running kernel and not the specified one:
        $ cd /tmp/pkg/linux && \
                        make-kpkg --rootcmd fakeroot --revision 1 modules
        [...]
        # Build the module
        /usr/bin/make KERNEL_SRC=/tmp/pkg/linux 
KVERS=2.6.23-rc9-git2-slh64-smp-1
        make[4]: Entering directory `/tmp/pkg/modules/et131x'
        #@/usr/bin/make -C /lib/modules/2.6.23-rc8-git4-slh64-smp-2/build 
M=/tmp/pkg/modules/et131x modules
        make: Entering an unknown directory
        make: *** /lib/modules/2.6.23-rc8-git4-slh64-smp-2/build: No such file 
or directory.  Stop.
        make: Leaving an unknown directory
        make[4]: *** [modules] Error 2
        make[4]: Leaving directory `/tmp/pkg/modules/et131x'
        make[3]: *** [binary-modules] Error 2
        make[3]: Leaving directory `/tmp/pkg/modules/et131x'
        make[2]: *** [kdist_build] Error 2
        make[2]: Leaving directory `/tmp/pkg/modules/et131x'
        Module /tmp/pkg/modules/et131x failed.
        Perhaps /tmp/pkg/modules/et131x 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/et131x.
        Hit return to Continue?

/tmp/pkg/linux (which is a symlink to 
/tmp/pkg/linux-2.6.23-rc9-git2-slh64-smp-1/) does indeed contain the source 
for freshly built kernel 2.6.23-rc9-git2-slh64-smp-1, et131x sources are below
/tmp/pkg/modules/et131x/, the currently running kernel is 
2.6.23-rc8-git4-slh64-smp-2, for which no headers/ sources are currently 
available (if they are, et131x misbuilds against those, and not the specified 
kernel).

Using the following patch to debian/rules (and the kernel 2.6.23 build fix 
posted earlier) fixes that issue:
        diff -Nrupw et131x-1.2.3-4/debian/rules 
et131x-1.2.3-4+c0.sidux.2/debian/rules
        --- et131x-1.2.3-4/debian/rules 2007-10-05 18:54:08.000000000 +0200
        +++ et131x-1.2.3-4+c0.sidux.2/debian/rules      2007-10-05 
18:53:03.000000000 +0200
        @@ -97,7 +97,7 @@ binary-modules: kdist_config
                dh_clean -k
                dh_installdirs lib/modules/$(KVERS)/extra
                # Build the module
        -       $(MAKE) KERNEL_SRC=$(KSRC) KVERS=$(KVERS)
        +       $(MAKE) KERNEL_SRC=$(KSRC) KERNEL_VER=$(KVERS) 
KERNEL_DIR=$(KSRC)
                # Install the module
                cp et131x.$ko debian/$(PKGNAME)/lib/modules/$(KVERS)/extra
        
Build process and the module's vermagic look fine now (build tested only):
        $ cd /tmp/pkg/linux && \
                make-kpkg --rootcmd fakeroot --revision 1 modules
        [...]
        # Build the module
        /usr/bin/make KERNEL_SRC=/tmp/pkg/linux 
KERNEL_VER=2.6.23-rc9-git2-slh64-smp-1 KERNEL_DIR=/tmp/pkg/linux
        make[4]: Entering directory `/tmp/pkg/modules/et131x'
        #@/usr/bin/make -C /tmp/pkg/linux M=/tmp/pkg/modules/et131x modules
        make[5]: Entering directory `/tmp/pkg/linux-2.6.23-rc9-git2-slh64-smp-1'
        [...]
        make[2]: Leaving directory `/tmp/pkg/modules/et131x'
        Module /tmp/pkg/modules/et131x processed fine

        $ dpkg --contents 
et131x-modules-2.6.23-rc9-git2-slh64-smp-1_1.2.3-4+1_amd64.deb | grep \\.ko$
        -rw-r--r-- root/root    175386 2007-10-05 19:23 
./lib/modules/2.6.23-rc9-git2-slh64-smp-1/extra/et131x.ko

        $ dpkg -x 
et131x-modules-2.6.23-rc9-git2-slh64-smp-1_1.2.3-4+1_amd64.deb ./

        $ /sbin/modinfo 
./lib/modules/2.6.23-rc9-git2-slh64-smp-1/extra/et131x.ko | grep ^vermagic\:
        vermagic:       2.6.23-rc9-git2-slh64-smp-1 SMP preempt mod_unload

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.23-rc8-git4-slh64-smp-2 (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 et131x-source depends on:
ii  bzip2                         1.0.3-7    high-quality block-sorting file co
ii  debhelper                     5.0.57     helper programs for debian/rules
ii  make                          3.81-3     The GNU version of the "make" util
ii  module-assistant              0.10.11    tool to make module package creati
ii  quilt                         0.46-4     Tool to work with series of patche

et131x-source recommends no packages.

-- no debconf information

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to