Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 573938 - Building kernel out of sourcedir broken
Summary: Building kernel out of sourcedir broken
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-05 14:50 UTC by Patrick Lauer
Modified: 2016-02-05 23:47 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Lauer gentoo-dev 2016-02-05 14:50:13 UTC
genkernel can (mostly) run as unprivileged user. Currently building the kernel is broken:

>>> Compiling source in /var/tmp/portage/sys-kernel/buildkernel-4.4.1/work/buildkernel-4.4.1 ...
* Gentoo Linux Genkernel; Version 3.4.52.4
* Running with options: all --no-mountboot --bootdir=/var/tmp/portage/sys-kernel/buildkernel-4.4.1/work/buildkernel-4.4.1/final/boot --makeopts=-j4 --logfile=/var/tmp/portage/sys-kernel/buildkernel-4.4.1/work/buildkernel-4.4.1/genkernel.log --tempdir=/var/tmp/portage/sys-kernel/buildkernel-4.4.1/work/buildkernel-4.4.1/tmp --module-prefix=/var/tmp/portage/sys-kernel/buildkernel-4.4.1/work/buildkernel-4.4.1/final --kerneldir=/usr/src/linux-4.4.1-gentoo --kernel-config=/usr/portage/sys-kernel/buildkernel/files/4.4.1 --install --no-mrproper --cachedir=/var/tmp/portage/sys-kernel/buildkernel-4.4.1/work/buildkernel-4.4.1/cache

* Using genkernel.conf from /etc/genkernel.conf
* Sourcing arch-specific config.sh from /usr/share/genkernel/arch/x86_64/config.sh ..
* Sourcing arch-specific modules_load from /usr/share/genkernel/arch/x86_64/modules_load ..

* Linux Kernel 4.4.1-gentoo for x86_64...
* .. with config file /usr/portage/sys-kernel/buildkernel/files/4.4.1
* kernel: Using config from /usr/portage/sys-kernel/buildkernel/files/4.4.1
* kernel: --mrproper is disabled; not running 'make mrproper'.
 * ACCESS DENIED:  open_wr:      /usr/src/linux-4.4.1-gentoo/.config
cp: cannot create regular file '/usr/src/linux-4.4.1-gentoo/.config': Permission denied
* ERROR: Could not copy configuration file!
* 
* -- Grepping log... --
* 
* Running with options: all --no-mountboot --bootdir=/var/tmp/portage/sys-kernel/buildkernel-4.4.1/work/buildkernel-4.4.1/final/boot --makeopts=-j4 --logfile=/var/tmp/portage/sys-kernel/buildkernel-4.4.1/work/buildkernel-4.4.1/genkernel.log --tempdir=/var/tmp/portage/sys-kernel/buildkernel-4.4.1/work/buildkernel-4.4.1/tmp --module-prefix=/var/tmp/portage/sys-kernel/buildkernel-4.4.1/work/buildkernel-4.4.1/final --kerneldir=/usr/src/linux-4.4.1-gentoo --kernel-config=/usr/portage/sys-kernel/buildkernel/files/4.4.1 --install --no-mrproper --cachedir=/var/tmp/portage/sys-kernel/buildkernel-4.4.1/work/buildkernel-4.4.1/cache
* Using genkernel.conf from /etc/genkernel.conf
* Sourcing arch-specific config.sh from /usr/share/genkernel/arch/x86_64/config.sh ..
* Sourcing arch-specific modules_load from /usr/share/genkernel/arch/x86_64/modules_load ..
*
* ERROR: Could not copy configuration file!


There's no reason to touch /usr/src/linux if --tempdir is set, I haven't figured out where this happens.
Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2016-02-05 23:47:10 UTC
Your command line does NOT include --kernel-outputdir; so it's trying to use the srcdir as the outputdir, which fails in your case.

I realize that kernel-outputdir was not in the manpage (it was in the --help output), and I've fixed that now (and added a check to ensure that all of --help is in the manpage in future).