Ignoring the apt during apt issue , I would like to make progress making this accessible to users. Currently we have no script / automation / documentation / awareness.
How to solve the following…?
~/kernel/linux-source-4.19 $ make deb-pkg
scripts/kconfig/conf --syncconfig Kconfig
*** Configuration file ".config" not found!
*** Please run some configurator (e.g. "make oldconfig" or
*** "make menuconfig" or "make xconfig").
make: *** [scripts/kconfig/Makefile:69: syncconfig] Error 1
make: *** [Makefile:533: syncconfig] Error 2
Makefile:620: include/config/auto.conf.cmd: No such file or directory
make: *** [Makefile:632: include/config/auto.conf.cmd] Error 2
What’s the solution to make this non-interactive (no user terminal input required)?
Needs kernel source or gcc from backports? kernel source might be quite doable. I don’t think that would cause any conflicts. Otherwise mixing with backports could lead to issues. Not a great default choice for a distribution default.
But even gcc from backports would not be a blocker. I could script the following:
set up a chroot (based on buster, buster-backports, or whatever) and build the kernel inside the chroot. Perhaps even using
If we want to create something amazing here, we might have to bite the bullet using backports, chroot, whatnot. Needless to say, ideally we could use linux-hardened.
To solve  (apt during apt) we might introduce a wrapper or teach users to use a tool other than apt if they want a hardened kernel. (More and more wrappers. Stream isolation (uwt), rapt (restricted APT) and now kernel upgrade.)
To make some progress I’ve added the build script.
Could you try it please? It is still primitive. But it can be improved over time. Soon I can do the proper packaging. Install
/usr/bin/hardened-kernel-build? Then this pacakge could be added to repository and users could manually run
/usr/bin/hardened-kernel-build. Next step would be
/usr/bin/hardened-kernel-install-and-build? Not a good name. And after this got more usable, the last step would be sorting out .