* 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
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.
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?
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.
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.
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.