Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 696840 - Kconfig IKHEADERS requires cpio as build dependency
Summary: Kconfig IKHEADERS requires cpio as build dependency
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL: https://github.com/torvalds/linux/blo...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-06 10:49 UTC by 7_9j~HTz
Modified: 2020-07-08 16:26 UTC (History)
1 user (show)

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 7_9j~HTz 2019-10-06 10:49:01 UTC
* stage3-amd64-hardened-20190925T214502Z
* sys-kernel/gentoo-sources-5.3.2

'make && make modules_install' failed with

> /kernel/gen_kheaders.sh: line 61: cpio: command not found

'which cpio' produced:

> which: no cpio in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin)

It would have been expected that all necessary dependencies for building the kernel/modules are provisioned automatically, least since there is no mentioning in the handbook of having to install the package manually
Comment 1 7_9j~HTz 2019-10-08 15:30:15 UTC
CPIO appears not being included in https://gitweb.gentoo.org/repo/gentoo.git/tree/profiles/base/packages whilst IKHEADERS would seem to depend on it.
Comment 2 Daniel Frey 2019-12-07 16:54:00 UTC
I am fresh installing gentoo on two different machines, and I have hit this exact bug both times.

In order to compile the kernel, (gentoo-sources:5.4.2) I had to manually emerge app-arch/cpio.

Shouldn't this be a dependency of gentoo-sources?
Comment 3 Thomas Deutschmann (RETIRED) gentoo-dev 2019-12-07 19:27:59 UTC
I don't know why this was assigned to hardened project.

For kernel eclass I am not convinced: CONFIG_IKHEADERS isn't a common feature and not enabled by default. Anyone using that feature should be aware about the cpio requirement. Forcing cpio for everyone just installing kernel sources is therefore not justified.
Comment 4 Francisco Blas Izquierdo Riera (RETIRED) gentoo-dev 2019-12-09 17:43:33 UTC
Hi!

This has nothing with Gentoo Hardened to do. If anything cpio is also missing on the non hardened stage3.

Also, I'd like to note that, for example, sys-devel/bc isn't included either in the stage3 although it is needed for kernel compilation. This is because the stage3 aims to provide the bare essentials of a Gentoo system as such a system may be ran inside a container or chroot where a kernel is not necessary.

IOW: It's up to the kernel team to decide whether they want to pull cpio as a dependency of gentoo-sources or not but the practice of not including in the base system packages which are needed for compiling the gentoo-sources is already well established.
Comment 5 Thomas Deutschmann (RETIRED) gentoo-dev 2019-12-09 18:10:44 UTC
Not sure if bc is best example because it isn't included in stage3 because stage3 doesn't contain any linux sources packages. But once you install a linux sources packages you will get bc for quite some time (see bug 461848).

Anyway, closing as WONTFIX: Like said in comment #3, that's not a common feature. And the fact that you run into this problem shows that you normally wouldn't use cpio like many others. So no need to force this for everyone at the moment.