Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 377049

Summary: linux-mod.eclass should warn of bad permission into ${KV_OUT_DIR}
Product: Gentoo Linux Reporter: Francesco Riosa <vivo75>
Component: EclassesAssignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers <kernel>
Status: RESOLVED WONTFIX    
Severity: enhancement    
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge --debug
emerge
emerge --info
emerge -pqv

Description Francesco Riosa 2011-07-30 12:48:04 UTC
every version of x11-drivers/nvidia-drivers fail to build here if using portage version, it does compile if run from the nvidia package.
After putting a proper Module.symvers it also compile copying and pasting the make used by the ebuild in $S/kernel (
make -j1 HOSTCC=x86_64-pc-linux-gnu-gcc CROSS_COMPILE=x86_64-pc-linux-gnu- LDFLAGS= IGNORE_CC_MISMATCH=yes V=1 SYSSRC=/usr/src/linux SYSOUT=/usr/src/build/239 CC=x86_64-pc-linux-gnu-gcc clean module
)
I'll attach also an emerge --debug output

# locate Module.symvers
/g/tmp/portage/x11-drivers/nvidia-drivers-270.41.19/work/Module.symvers
/g/tmp/portage/x11-drivers/nvidia-drivers-270.41.19/work/kernel/Module.symvers
/g/tmp/portage/x11-drivers/nvidia-drivers-275.21/work/Module.symvers
/g/tmp/portage/x11-drivers/nvidia-drivers-275.21/work/kernel/Module.symvers
/usr/src/build/239/Module.symvers
# ls -l /g/tmp/portage/x11-drivers/nvidia-drivers-275.21/work/Module.symvers /usr/src/build/239/Module.symvers
-rw-r--r-- 1 portage portage      0 30 lug 14.30 /g/tmp/portage/x11-drivers/nvidia-drivers-275.21/work/Module.symvers
-rw-r--r-- 1 vivo    users   348121 30 lug 14.10 /usr/src/build/239/Module.symvers


Reproducible: Always
Comment 1 Francesco Riosa 2011-07-30 12:49:37 UTC
Created attachment 281565 [details]
emerge --debug
Comment 2 Francesco Riosa 2011-07-30 12:50:28 UTC
Created attachment 281567 [details]
emerge
Comment 3 Francesco Riosa 2011-07-30 12:50:58 UTC
Created attachment 281569 [details]
emerge --info
Comment 4 Francesco Riosa 2011-07-30 12:52:05 UTC
Created attachment 281571 [details]
emerge -pqv
Comment 5 Francesco Riosa 2011-07-30 13:47:50 UTC
The whole mess was caused by /usr/src having bad permissions:
drwxr----- 5 user root 4096 30 lug 02.07 /usr/src/

since portage drop privileges it was unable to access the contents of $KV_OUT_DIR.

While there is nothing linux-{mod,info}.eclass can do to solve the situation a big fat warning would be apreciated, saving the idio^W user the time to debug this issue.
Comment 6 Francesco Riosa 2011-07-30 13:48:58 UTC
(In reply to comment #5)
> drwx------ 5 user root 4096 30 lug 02.07 /usr/src/

(o700)
Comment 7 Mike Pagano gentoo-dev 2021-08-24 22:53:29 UTC
Feels like an extreme corner case