From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Mhlik-0000y5-4D for garchives@archives.gentoo.org; Sun, 30 Aug 2009 14:49:32 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BEBB0E08A1; Sun, 30 Aug 2009 19:58:26 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 971AFE08A1 for ; Sun, 30 Aug 2009 19:58:26 +0000 (UTC) Received: from mail.isohunt.com (b01.ext.isohunt.com [208.71.112.51]) by smtp.gentoo.org (Postfix) with ESMTP id 68DEA6663E for ; Sun, 30 Aug 2009 19:58:34 +0000 (UTC) Received: (qmail 20752 invoked from network); 30 Aug 2009 19:58:24 -0000 Received: from tsi-static.orbis-terrarum.net (HELO grubbs.orbis-terrarum.net) (76.10.188.108) by mail.isohunt.com (qpsmtpd/0.33-dev on beta01) with (CAMELLIA256-SHA encrypted) ESMTPS; Sun, 30 Aug 2009 19:58:24 +0000 Received: (qmail 28149 invoked by uid 10000); 30 Aug 2009 19:58:22 -0000 Date: Sun, 30 Aug 2009 19:58:22 +0000 From: "Robin H. Johnson" To: gentoo-dev@lists.gentoo.org Subject: [gentoo-dev] linux-info.eclass: lacking sources, config checks and module building Message-ID: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="yNb1oOkm5a9FJOVX" Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-Archives-Salt: a3c24a74-6d90-4471-802f-de5dbff028b9 X-Archives-Hash: 829163256397bedb7c96e751347ee4d8 --yNb1oOkm5a9FJOVX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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=3D1 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=3D1 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? --=20 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 --yNb1oOkm5a9FJOVX Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (GNU/Linux) Comment: Robbat2 @ Orbis-Terrarum Networks - The text below is a digital signature. If it doesn't make any sense to you, ignore it. iEYEARECAAYFAkqa2d4ACgkQPpIsIjIzwixPPwCcDb+Go+ioBkomj5pGfhrLFwyJ 5E8AnjgRqpTxCbmaGQ/iYRFyx+QFfV2K =aPyc -----END PGP SIGNATURE----- --yNb1oOkm5a9FJOVX--