Bug 10617

Summary: Can't build modules from source in path that has ':' in it
Product: Other Reporter: Hans Petter Jansson (hpj)
Component: ConfigurationAssignee: other_other
Status: REJECTED WILL_NOT_FIX    
Severity: normal CC: bunk, randy.dunlap
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.25-rc8 Subsystem:
Regression: --- Bisected commit-id:

Description Hans Petter Jansson 2008-05-07 18:11:52 UTC
Latest working kernel version: Unknown
Earliest failing kernel version: 2.6.25-rc8
Distribution: openSUSE 11.0 Beta 1
Hardware Environment: IBM T42p laptop i686 32-bit
Software Environment: openSUSE 11.0 Beta 1
Problem Description:

If you're going to build a kernel module, and the path to the module contains
one or more ':' characters, the kernel Makefile will fail like this:

hpj [~/work/suse/bs/home:hpjansson:sysprof/sysprof/sysprof-1.0.8-work/module] make
/usr/bin/make -C /lib/modules/2.6.25-rc8-12-default/build
SUBDIRS=/home/hpj/work/suse/bs/home:hpjansson:sysprof/sysprof/sysprof-1.0.8-work/module
modules
make[1]: Entering directory `/usr/src/linux-2.6.25-rc8-12-obj/i386/default'
/usr/bin/make -C /usr/src/linux-2.6.25-rc8-12
O=/usr/src/linux-2.6.25-rc8-12-obj/i386/default/. modules
/usr/src/linux-2.6.25-rc8-12/Makefile:1290: *** target pattern contains no `%'. Stop.
make[2]: *** [sub-make] Error 2
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.25-rc8-12-obj/i386/default'
make: *** [sysprof-module.o] Error 2

When I moved the source to ~/temp/sysprof/, I could build it just fine.

Steps to reproduce:

Unpack a source containing a kernel module in a path that has ':' characters in it. Try to build it.
Comment 1 Hans Petter Jansson 2008-05-07 18:13:57 UTC
For reference, the distro bug from which this was upstreamed is at:

https://bugzilla.novell.com/show_bug.cgi?id=378614
Comment 2 Randy Dunlap 2008-05-07 18:26:11 UTC
The answer given on March 25, 2008, for this issue was "Don't do that".

See http://marc.info/?l=linux-kernel&m=120646948505697&w=2

Why is that answer not sufficient?
Comment 3 Hans Petter Jansson 2008-05-07 18:42:39 UTC
The openSUSE public build service uses colons in checkout paths, e.g. "openSUSE:Factory", "home:user:repo".

I agree it's not ideal, and I wasn't involved in making that decision, but there it is and it'll hurt users trying to build packages that contain kernel modules.

To my knowledge, this problem hasn't come up with any userspace-only packages using Automake - only with kernel modules.

The openSUSE build service is at: https://build.opensuse.org/
Comment 4 Adrian Bunk 2008-05-08 00:28:44 UTC
Sam (who is both the kbuild maintainer and the only person doing serious work in this area) has already said he does not want to check for this.

And "but there it is" is not a valid point - if someone wants to create such pathnames and uses colons instead of e.g. underscores it should be clear from the beginning that this is more likely to break somewhere.
Comment 5 Hans Petter Jansson 2008-05-08 07:33:55 UTC
Fair enough.

What's the set of supported characters?