Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-dev
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-dev@g.o
From: "Robin H. Johnson" <robbat2@g.o>
Subject: linux-info.eclass: lacking sources, config checks and module building
Date: Sun, 30 Aug 2009 19:58:22 +0000
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@g.o
GnuPG FP   : 11AC BA4F 4778 E3F6 E4ED  F38E B27B 944E 3488 4E85
Attachment:
pgpgHCULltZel.pgp (PGP signature)
Replies:
Re: linux-info.eclass: lacking sources, config checks and module building
-- Daniel Drake
Re: linux-info.eclass: lacking sources, config checks and module building
-- Mike Auty
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
[RFC] USE flags requirements (EAPI-4 ?)
Next by thread:
Re: linux-info.eclass: lacking sources, config checks and module building
Previous by date:
Re: About udev-145: new features / extras and kernel requirements
Next by date:
Road towards EAPI 3 main tree approval


Updated Jun 29, 2012

Summary: Archive of the gentoo-dev mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.