public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] linux-info.eclass: lacking sources, config checks and module building
@ 2009-08-30 19:58 Robin H. Johnson
  2009-08-30 20:21 ` Mike Auty
  2009-09-07  9:28 ` Daniel Drake
  0 siblings, 2 replies; 13+ messages in thread
From: Robin H. Johnson @ 2009-08-30 19:58 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 2422 bytes --]

Seeing the debate raised in the udev thread about checking for the
kernel, I'd like to propose that we revise the linux-info.eclass.

linux-info already checks a number of locations:
- KBUILD_OUTPUT,
- KERNEL_DIR, which defaults to /usr/src/linux/
- OUTPUT_DIR, which defaults to /lib/modules/`uname -r`/build/

It does NOT check /proc/config.gz presently. The original logic against
not checking /proc was that we were targeting the kernel being built,
but that's moot given the use of `uname -r` in OUTPUT_DIR.

Additionally, linux-info.eclass already has provisions for non-fatally
checking for kernel config options, by prefixing them with a tilde.

In parallel to what we actually check, we have the issue of systems that
may not have ANY of the above, or ANY kernel sources whatsoever.
The most common amongst these are:
- Hardened systems
- Virtual Machines

Proposed solution:
------------------
We need to be able to reduce user error, so we cannot simply make it
trust the user by default. So I propose that we add an environment
variable (I'm not set on the name yet), eg:
EXTERNALLY_BUILT_KERNEL=1

This option will cause linux-info.eclass to consider ALL kernel option
checks non-fatal. That way we still get the warnings and logs, but it
does not stop the builds.

When is the above NOT enough?
-----------------------------
The only time that ANY kernel sources are required is when you are
building an out-of-tree module. For this purpose, they must be
configured.

The check for having configured kernel sources must only be executed
when the modules are about to be compiled. Putting it in pkg_preinst
would block use of binpkgs on (related) machines.

- If a package builds modules AND userspace, we should offer a way to
  build the userspace only, as the user can build their modules
  externally (or patch them into the kernel) [1]
- For packages that ONLY build modules, and no userspace at all, having
  EXTERNALLY_BUILT_KERNEL=1 means that they should error out? [2]
  (this case might be thrown into the above one).

Footnotes:
----------
1. This has already been requested for ipset, bug #274577.
2. What about documentation? Is that enough of userspace still?

-- 
Robin Hugh Johnson
Gentoo Linux: Developer, Trustee & Infrastructure Lead
E-Mail     : robbat2@gentoo.org
GnuPG FP   : 11AC BA4F 4778 E3F6 E4ED  F38E B27B 944E 3488 4E85

[-- Attachment #2: Type: application/pgp-signature, Size: 330 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2009-09-07 10:42 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-30 19:58 [gentoo-dev] linux-info.eclass: lacking sources, config checks and module building Robin H. Johnson
2009-08-30 20:21 ` Mike Auty
2009-08-30 21:29   ` Robin H. Johnson
2009-08-30 21:58     ` Mike Auty
2009-08-30 23:02       ` Robin H. Johnson
2009-08-30 23:30         ` Mike Auty
2009-08-30 23:46           ` Robin H. Johnson
2009-08-31  0:00             ` Mike Auty
2009-08-31  0:27               ` Robin H. Johnson
2009-08-31  0:41                 ` Mike Auty
2009-08-31 22:43                   ` Mike Auty
2009-09-07  9:28 ` Daniel Drake
2009-09-07 10:42   ` Robin H. Johnson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox