Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 566514 - sys-kernel/linux-headers - using KBUILD_OUTPUT as output directory to install headers
Summary: sys-kernel/linux-headers - using KBUILD_OUTPUT as output directory to install...
Status: RESOLVED DUPLICATE of bug 566496
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal major (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-22 20:54 UTC by Joe M
Modified: 2015-11-23 03:39 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
sandbox log (sandbox-32544.log,26.81 KB, text/x-log)
2015-11-22 20:54 UTC, Joe M
Details
build log (sys-kernel:linux-headers-3.18:20151122-205111.log,39.64 KB, text/x-log)
2015-11-22 20:54 UTC, Joe M
Details
patch to allow KBUILD_OUTPUT usage (kbuild_output.patch,803 bytes, patch)
2015-11-22 21:02 UTC, Joe M
Details | Diff
patch to allow linux-headers work even when kbuild_output is set (kbuild_output.patch,913 bytes, patch)
2015-11-22 21:08 UTC, Joe M
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joe M 2015-11-22 20:54:04 UTC
I have KBUILD_OUPTUT set in /etc/portage/bashrc.d/kbuild_output.sh

cat /etc/portage/bashrc.d/kbuild_output.sh

# /etc/portage/bashrc.d/kbuild_output.sh

export KBUILD_OUTPUT="/lib/modules/$(uname --kernel-release)/build"

When I run "sudo emerge --oneshot linux-headers"

.
.
.

>>> Install linux-headers-3.18 into /var/tmp/portage/sys-kernel/linux-headers-3.18/image/ category sys-kernel
make --jobs=9 headers_install INSTALL_HDR_PATH=/var/tmp/portage/sys-kernel/linux-headers-3.18/image///usr/include/.. ARCH=x86 CROSS_COMPILE=x86_64-pc-linux-gnu-
make[1]: Entering directory '/home/j/var/kernel/src/linux-builds/4.1.12-gentoo-20151122111531'
 * ACCESS DENIED:  open_wr:      /home/j/var/kernel/src/linux-builds/4.1.12-gentoo-20151122111531/.32606.tmp
 * ACCESS DENIED:  unlinkat:     /home/j/var/kernel/src/linux-builds/4.1.12-gentoo-20151122111531/.32606.tmp
 * ACCESS DENIED:  unlinkat:     /home/j/var/kernel/src/linux-builds/4.1.12-gentoo-20151122111531/.32606.o
rm: cannot remove ‘.32606.tmp’: Permission denied
rm: cannot remove ‘.32606.o’: Permission denied
 * ACCESS DENIED:  open_wr:      /home/j/var/kernel/src/linux-builds/4.1.12-gentoo-20151122111531/.32611.tmp
 * ACCESS DENIED:  unlinkat:     /home/j/var/kernel/src/linux-builds/4.1.12-gentoo-20151122111531/.32611.tmp
 * ACCESS DENIED:  unlinkat:     /home/j/var/kernel/src/linux-builds/4.1.12-gentoo-20151122111531/.32611.o
rm: cannot remove ‘.32611.tmp’: Permission denied
rm: cannot remove ‘.32611.o’: Permission denied
 * ACCESS DENIED:  open_wr:      /home/j/var/kernel/src/linux-builds/4.1.12-gentoo-20151122111531/.32616.tmp
 * ACCESS DENIED:  unlinkat:     /home/j/var/kernel/src/linux-builds/4.1.12-gentoo-20151122111531/.32616.tmp
 * ACCESS DENIED:  unlinkat:     /home/j/var/kernel/src/linux-builds/4.1.12-gentoo-20151122111531/.32616.o
rm: cannot remove ‘.32616.tmp’: Permission denied
rm: cannot remove ‘.32616.o’: Permission denied
 * ACCESS DENIED:  unlinkat:     /home/j/var/kernel/src/linux-builds/4.1.12-gentoo-20151122111531/.32621.tmp
 * ACCESS DENIED:  unlinkat:     /home/j/var/kernel/src/linux-builds/4.1.12-gentoo-20151122111531/.32621.o
rm: cannot remove ‘.32621.tmp’: Permission denied
rm: cannot remove ‘.32621.o’: Permission denied
 * ACCESS DENIED:  open_wr:      /home/j/var/kernel/src/linux-builds/4.1.12-gentoo-20151122111531/.32625.tmp
 * ACCESS DENIED:  unlinkat:     /home/j/var/kernel/src/linux-builds/4.1.12-gentoo-20151122111531/.32625.tmp
 * ACCESS DENIED:  unlinkat:     /home/j/var/kernel/src/linux-builds/4.1.12-gentoo-20151122111531/.32625.o
rm: cannot remove ‘.32625.tmp’: Permission denied
rm: cannot remove ‘.32625.o’: Permission denied
 * ACCESS DENIED:  open_wr:      /home/j/var/kernel/src/linux-builds/4.1.12-gentoo-20151122111531/.32630.tmp
 * ACCESS DENIED:  unlinkat:     /home/j/var/kernel/src/linux-builds/4.1.12-gentoo-20151122111531/.32630.tmp
 * ACCESS DENIED:  unlinkat:     /home/j/var/kernel/src/linux-builds/4.1.12-gentoo-20151122111531/.32630.o
rm: cannot remove ‘.32630.tmp’: Permission denied
rm: cannot remove ‘.32630.o’: Permission denied
 * ACCESS DENIED:  unlinkat:     /home/j/var/kernel/src/linux-builds/4.1.12-gentoo-20151122111531/.32635.tmp
 * ACCESS DENIED:  unlinkat:     /home/j/var/kernel/src/linux-builds/4.1.12-gentoo-20151122111531/.32635.o
rm: cannot remove ‘.32635.tmp’: Permission denied
rm: cannot remove ‘.32635.o’: Permission denied
 * ACCESS DENIED:  open_wr:      /home/j/var/kernel/src/linux-builds/4.1.12-gentoo-20151122111531/.32639.tmp
 * ACCESS DENIED:  unlinkat:     /home/j/var/kernel/src/linux-builds/4.1.12-gentoo-20151122111531/.32639.tmp
 * ACCESS DENIED:  unlinkat:     rm: cannot remove ‘.32639.tmp’: Permission denied

-

Reproducible: Always
Comment 1 Joe M 2015-11-22 20:54:22 UTC
Created attachment 417596 [details]
sandbox log
Comment 2 Joe M 2015-11-22 20:54:52 UTC
Created attachment 417598 [details]
build log
Comment 3 Joe M 2015-11-22 20:57:33 UTC
Adding the below line to /etc/portage/eclass/kernel-2.eclass fixes this issue:

 install_headers() {
        local ddir=$(kernel_header_destdir)

+       [[ ${ETYPE} == headers ]] && unset KBUILD_OUTPUT
        # 2.6.18 introduces headers_install which means we dont need any
        # of this crap anymore :D
        if kernel_is ge 2 6 18 ; then
Comment 4 Joe M 2015-11-22 21:02:28 UTC
Created attachment 417600 [details, diff]
patch to allow KBUILD_OUTPUT usage
Comment 5 Joe M 2015-11-22 21:08:01 UTC
Created attachment 417606 [details, diff]
patch to allow linux-headers work even when kbuild_output is set
Comment 6 SpanKY gentoo-dev 2015-11-23 00:34:40 UTC

*** This bug has been marked as a duplicate of bug 566496 ***
Comment 7 Joe M 2015-11-23 03:39:47 UTC
Comment on attachment 417606 [details, diff]
patch to allow linux-headers work even when kbuild_output is set

patch from https://bugs.gentoo.org/show_bug.cgi?id=454294 fixes this issue.