modules get placed into wrong /lib/modules/... directory tree Reproducible: Always Steps to Reproduce: 1. Set kernel CONFIG_LOCALVERSION to anythin non-empty 2. make the kernel 3. emerge vmware-modules Actual Results: modules get placed into /lib/modules/3.8.2 Expected Results: modules get placed into /lib/modules/3.8.2{CONFIG_LOCALVERSION} Remember Bug 445874 ?
============================================================================ Experiment A: ============================================================================ 0.) make /lib/modules completely empty. 1.) name the directoy = linux-M.m.s{LOCALVERSION} , in my case 1.) name the directoy = linux-3.8.2-SCST and 2.) set CONFIG_LOCALVERSION="-SCST" /usr/src lrwxrwxrwx 1 root root 16 10. Mär 08:38 linux -> linux-3.8.2-SCST <---------- drwxr-xr-x 24 root root 4,0K 10. Mär 08:37 linux-3.8.2 drwxr-xr-x 24 root root 4,0K 10. Mär 08:33 linux-3.8.2-gentoo drwxr-xr-x 24 root root 4,0K 10. Mär 08:42 linux-3.8.2-SCST <---------- 1.) make kernel 2.) emerge nvidia-drivers 3.) emerge vmware-modules ======= Result: ======= /lib/modules 3.8.2-gentoo: <--------- !!!!! ??? drwxr-xr-x 2 root root 4,0K 10. Mär 08:43 misc <--------- !!!!! ??? 3.8.2-SCST: lrwxrwxrwx 1 root root 25 10. Mär 08:42 build -> /usr/src/linux-3.8.2-SCST drwxr-xr-x 6 root root 4,0K 10. Mär 08:42 kernel -rw-r--r-- 1 root root 634 10. Mär 08:43 modules.alias -rw-r--r-- 1 root root 1,5K 10. Mär 08:43 modules.alias.bin -rw-r--r-- 1 root root 12K 10. Mär 08:42 modules.builtin -rw-r--r-- 1 root root 15K 10. Mär 08:43 modules.builtin.bin -rw-r--r-- 1 root root 1,6K 10. Mär 08:43 modules.dep -rw-r--r-- 1 root root 3,3K 10. Mär 08:43 modules.dep.bin -rw-r--r-- 1 root root 52 10. Mär 08:43 modules.devname -rw-r--r-- 1 root root 1,2K 10. Mär 08:42 modules.order -rw-r--r-- 1 root root 131 10. Mär 08:43 modules.softdep -rw-r--r-- 1 root root 7,0K 10. Mär 08:43 modules.symbols -rw-r--r-- 1 root root 9,4K 10. Mär 08:43 modules.symbols.bin lrwxrwxrwx 1 root root 25 10. Mär 08:42 source -> /usr/src/linux-3.8.2-SCST drwxr-xr-x 2 root root 4,0K 10. Mär 08:43 video <---------- +++++ 3.8.2-gentoo/misc: <------ !!!!! ??? -rw-r--r-- 1 root root 21K 10. Mär 08:43 vmblock.ko -rw-r--r-- 1 root root 111K 10. Mär 08:43 vmci.ko -rw-r--r-- 1 root root 94K 10. Mär 08:43 vmmon.ko -rw-r--r-- 1 root root 68K 10. Mär 08:43 vmnet.ko -rw-r--r-- 1 root root 56K 10. Mär 08:43 vsock.ko 3.8.2-SCST/video: -rw-r--r-- 1 root root 12M 10. Mär 08:43 nvidia.ko ============================================================================ Experiment B: ============================================================================ /usr/src drwxr-xr-x 24 root root 4,0K 10. Mär 10:32 linux-3.8.2 drwxr-xr-x 24 root root 4,0K 10. Mär 10:28 linux-3.8.2-gentoo 1.) build linux-3.8.2-gentoo + vmware-modules + nvidia-drivers: ======= Result: ======= Everything gets installed under /lib/modules/3.8.2-gentoo : perfect. 2.) Then, in addition, build linux-3.8.2 + vmware-modules + nvidia-drivers: ======= Result: ======= /lib/modules 3.8.2: insgesamt 84K lrwxrwxrwx 1 root root 20 10. Mär 10:32 build -> /usr/src/linux-3.8.2 drwxr-xr-x 6 root root 4,0K 10. Mär 10:32 kernel - - - - - - - - - - - - - - - - - - - - - - - - - - - <--- "misc" is missing !!! -rw-r--r-- 1 root root 634 10. Mär 10:34 modules.alias -rw-r--r-- 1 root root 1,5K 10. Mär 10:34 modules.alias.bin -rw-r--r-- 1 root root 12K 10. Mär 10:32 modules.builtin -rw-r--r-- 1 root root 15K 10. Mär 10:34 modules.builtin.bin -rw-r--r-- 1 root root 1,6K 10. Mär 10:34 modules.dep -rw-r--r-- 1 root root 3,3K 10. Mär 10:34 modules.dep.bin -rw-r--r-- 1 root root 52 10. Mär 10:34 modules.devname -rw-r--r-- 1 root root 1,2K 10. Mär 10:32 modules.order -rw-r--r-- 1 root root 131 10. Mär 10:34 modules.softdep -rw-r--r-- 1 root root 7,0K 10. Mär 10:34 modules.symbols -rw-r--r-- 1 root root 9,4K 10. Mär 10:34 modules.symbols.bin lrwxrwxrwx 1 root root 20 10. Mär 10:32 source -> /usr/src/linux-3.8.2 drwxr-xr-x 2 root root 4,0K 10. Mär 10:34 video 3.8.2-gentoo: insgesamt 92K lrwxrwxrwx 1 root root 27 10. Mär 09:06 build -> /usr/src/linux-3.8.2-gentoo drwxr-xr-x 6 root root 4,0K 10. Mär 09:06 kernel drwxr-xr-x 2 root root 4,0K 10. Mär 10:34 misc <--- gets overwritten instead !!! -rw-r--r-- 1 root root 707 10. Mär 09:12 modules.alias -rw-r--r-- 1 root root 1,6K 10. Mär 09:12 modules.alias.bin -rw-r--r-- 1 root root 12K 10. Mär 09:06 modules.builtin -rw-r--r-- 1 root root 15K 10. Mär 09:12 modules.builtin.bin -rw-r--r-- 1 root root 1,7K 10. Mär 09:12 modules.dep -rw-r--r-- 1 root root 3,6K 10. Mär 09:12 modules.dep.bin -rw-r--r-- 1 root root 52 10. Mär 09:12 modules.devname -rw-r--r-- 1 root root 1,3K 10. Mär 09:06 modules.order -rw-r--r-- 1 root root 131 10. Mär 09:12 modules.softdep -rw-r--r-- 1 root root 8,4K 10. Mär 09:12 modules.symbols -rw-r--r-- 1 root root 12K 10. Mär 09:12 modules.symbols.bin lrwxrwxrwx 1 root root 27 10. Mär 09:06 source -> /usr/src/linux-3.8.2-gentoo drwxr-xr-x 2 root root 4,0K 10. Mär 09:12 video 3.8.2-gentoo/misc: insgesamt 356K -rw-r--r-- 1 root root 21K 10. Mär 10:34 vmblock.ko - - - <--- newly built !!! -rw-r--r-- 1 root root 111K 10. Mär 10:34 vmci.ko -rw-r--r-- 1 root root 94K 10. Mär 10:34 vmmon.ko -rw-r--r-- 1 root root 68K 10. Mär 10:34 vmnet.ko -rw-r--r-- 1 root root 56K 10. Mär 10:34 vsock.ko 3.8.2-gentoo/video: insgesamt 12M -rw-r--r-- 1 root root 12M 10. Mär 09:12 nvidia.ko 3.8.2/video: insgesamt 12M -rw-r--r-- 1 root root 12M 10. Mär 10:34 nvidia.ko
*** Bug 461002 has been marked as a duplicate of this bug. ***
Possible examples for testing this: 1.) name the directoy = linux-3.8.2 2.) set CONFIG_LOCALVERSION="-SCST" 1.) name the directoy = linux-3.8.2-SCST 2.) leave CONFIG_LOCALVERSION="" 1.) name the directoy = linux-3.8.2-SCST 2.) set CONFIG_LOCALVERSION="-SCST" 1.) name the directoy = linux-3.8.2-SCST 2.) set CONFIG_LOCALVERSION="-something.else"
Also hit by this. linux-info.eclass search version from Makefile, but that is wrong: # head -n 4 /usr/src/linux/Makefile VERSION = 4 PATCHLEVEL = 4 SUBLEVEL = 0 EXTRAVERSION = But real version is here: # cat /usr/src/linux/include/config/kernel.release 4.4.0-10454-g3e1e21c-dirty # grep -i localversion /usr/src/linux/.config CONFIG_LOCALVERSION="" CONFIG_LOCALVERSION_AUTO=y
Created attachment 423604 [details, diff] Reorder local version and object directory assigments This trivial patch fixes bug for me. Tried on two different machines.
I'm also having this issue, and the proposed patch fixes things for me!
PING . . . Reported: 2013-03-09 18:48 UTC >= 4 (four) years . . . Fix provided: 2016-01-22 13:59:21 UTC . . . Latest confirm: 2016-09-05 18:39:47 UTC
While I agree that it's taking a long time, the devs might be waiting for more confirmations; there are only two, and you yourself haven't noted whether it works for you or not. Please - to people reading this, if you're willing to try it and the patch works for you, comment here and let the devs know. (This counts whether you're using CONFIG_LOCALVERSION or not, since the change needs to work for people who have it unset, too.) The thing that takes the most time is making sure that it works as expected for everybody!
I used to apply patch but don't anymore (not using out of tree modules). I didn't remember that there were any error with patch at all.
CONFIRMATION: Applying the patch, emerging vanilla-sources-4.12.4 : + + + WORKSFORME as expected. # ll /boot -rw-r--r-- 1 root root 116K 29. Jul 09:44 config-4.12.4 -rw-r--r-- 1 root root 116K 29. Jul 09:55 config-4.12.4.9999-localversion -rw-r--r-- 1 root root 116K 29. Jul 09:47 config-4.12.4-localversion -rw-r--r-- 1 root root 4,2M 29. Jul 09:44 System.map-4.12.4 -rw-r--r-- 1 root root 4,2M 29. Jul 09:55 System.map-4.12.4.9999-localversion -rw-r--r-- 1 root root 4,2M 29. Jul 09:47 System.map-4.12.4-localversion -rw-r--r-- 1 root root 8,1M 29. Jul 09:44 vmlinuz-4.12.4 -rw-r--r-- 1 root root 8,1M 29. Jul 09:55 vmlinuz-4.12.4.9999-localversion -rw-r--r-- 1 root root 8,1M 29. Jul 09:47 vmlinuz-4.12.4-localversion # ll /lib/modules drwxr-xr-x 3 root root 4,0K 29. Jul 09:44 4.12.4 drwxr-xr-x 3 root root 4,0K 29. Jul 09:55 4.12.4.9999-localversion drwxr-xr-x 3 root root 4,0K 29. Jul 09:47 4.12.4-localversion
(supplementing comment #10) . . . All-in-one : # ls -1 /boot config-4.12.4-extraversion-localversion System.map-4.12.4-extraversion-localversion vmlinuz-4.12.4-extraversion-localversion # ls -1 /lib/modules 4.12.4-extraversion-localversion Thanks.
Did this get submitted to the gentoo-dev mailing list? "Before updating eutils or a similar widely used eclass, it is best to email the gentoo-dev list. It may be that your proposed change is broken in a way you had not anticipated, or that there is an existing function which performs the same purpose, or that your function may be better off in its own eclass. If you don't email gentoo-dev first, and end up breaking something, expect to be in a lot of trouble."
(In reply to Mike Pagano from comment #12) > Did this get submitted to the gentoo-dev mailing list? Hi, Mike, Jeroen has assigned the Component to "Eclasses and Profiles", and Assignee to kernel-misc@gentoo.org; <----- Vapier the Assignee to "kernel@gentoo.org" developers. <----- I guess your citation is from Gentoo Development -> Eclass Writing Guide ? (I do not remember this commendation from early 2013.)
They're asking if the proposed patch was submitted for consideration to gentoo-dev, not the bug itself. The patch was made in 2016, not 2013. The idea is to bring it to the attention of people who may not be watching the bugs assigned to kernel@, I'd assume! I couldn't see it having been submitted there; I'd offer to do it myself, but I didn't make the patch and wouldn't want to appear to be taking credit for it. That said, I'll gladly submit it to the list if it's okay for anybody to do so!
(In reply to Sophie Hamilton from comment #14) Sophie, with all due respect for our honorable developers ... > I'll gladly submit it to the list if it's okay for > anybody to do so! I would be greatful - and (comment #9) > I used to apply patch but don't anymore (not using out of tree modules). indicates Dmitry would not mind either, right?
> > I used to apply patch but don't anymore (not using out of tree modules). > indicates Dmitry would not mind either, right? I don't mind at all. It would be useful to send patch to dev list..
@ Sophie Hamilton : Any news ?
Ack! I'm so sorry, I completely forgot. :/ I'm actually not so sure that I'd be able to do this after all, given that. Would there be anybody else willing to send this onto the list? (I am so, so sorry.)
(In reply to Manfred Knick from comment #7) > PING > > . . . Reported: 2013-03-09 18:48 UTC >= 4 (four) years > > . . . Fix provided: 2016-01-22 13:59:21 UTC > > . . . Latest confirm: 2016-09-05 18:39:47 UTC .......Confirmed again: 2017-07-29 08:02:08 UTC <--- comment #10 One year later: :: PING again
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=50078fbbb3966773401c1fc59838c1e5952c1318 commit 50078fbbb3966773401c1fc59838c1e5952c1318 Author: Dmitry Derevyanko <nrndda@gmail.com> AuthorDate: 2018-07-29 23:22:38 +0000 Commit: Thomas Deutschmann <whissi@gentoo.org> CommitDate: 2018-07-29 23:23:27 +0000 linux-info.eclass: respect kernel CONFIG_LOCALVERSION Closes: https://bugs.gentoo.org/460996 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org> eclass/linux-info.eclass | 50 ++++++++++++++++++++++++------------------------ 1 file changed, 25 insertions(+), 25 deletions(-)
(In reply to Larry the Git Cow from comment #20) CONFIRMATION: - emerge currently published sys-kernel/gentoo-sources-4.17.11:4.17.11 - cd /usr/src - cp -a linux-4.17.11-gentoo linux-4.17.11-gentoo-mkn <--- - ln -s linux-4.17.11-gentoo-mkn linux - cd linux # head -n 5 /usr/src/linux/Makefile | tail -n 4 VERSION = 4 PATCHLEVEL = 17 SUBLEVEL = 11 EXTRAVERSION = -gentoo <--- - make menuconfig : CONFIG_LOCALVERSION="-LOCALVERSION" <--- - iucode_tool -S ... - emerge -1 ... vmware-modules ... RESULT: + The additional "-mkn" from the directory name correctly gets ignored, + LOCALVERESION from .config and + EXTRAVERSION from Makefile correctly get applied: # ls -1 /boot | grep LOCAL config-4.17.11-gentoo-LOCALVERSION System.map-4.17.11-gentoo-LOCALVERSION vmlinuz-4.17.11-gentoo-LOCALVERSION # ls -1 /lib/modules | grep LOCAL 4.17.11-gentoo-LOCALVERSION # ls -1 /lib/modules/4.17.11-gentoo-LOCALVERSION/misc vmmon.ko vmnet.ko THANKS to @ Dmitry for providing the patch @ Thomas for integration
This commit causes a regression; I have opened bug 662772 for it.