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 1RMJNb-0003i1-LV for garchives@archives.gentoo.org; Fri, 04 Nov 2011 13:00:20 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0744521C027; Fri, 4 Nov 2011 13:00:06 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id D5ADA21C031 for ; Fri, 4 Nov 2011 12:59:26 +0000 (UTC) Received: from phjr-macbookpro.local (fi122.internetdsl.tpnet.pl [80.53.34.122]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: phajdan.jr) by smtp.gentoo.org (Postfix) with ESMTPSA id C9B4B1B4003 for ; Fri, 4 Nov 2011 12:59:25 +0000 (UTC) Message-ID: <4EB3E1A2.6040702@gentoo.org> Date: Fri, 04 Nov 2011 13:59:14 +0100 From: =?UTF-8?B?IlBhd2XFgiBIYWpkYW4sIEpyLiI=?= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 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 To: gentoo-dev@lists.gentoo.org Subject: [gentoo-dev] linux-info.eclass: check_extra_config requires a configured kernel X-Enigmail-Version: 1.3.2 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig20F0A1CF877249F035C7CD67" X-Archives-Salt: 3f8f5f2e-6864-497d-86ce-0f6b3d72a3ed X-Archives-Hash: cb0c056e489b4a0f54c8213cd73768e5 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig20F0A1CF877249F035C7CD67 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable check_extra_config requires a configured kernel (/usr/src/linux/.config), while I think it should also be satisfied by /proc/config.gz (i.e. just a way to verify the config, not necessarily kernel built locally). An example use case is www-client/chromium, which makes sure the kernel will support its sandbox. It's generally a bad idea to run without full sandboxing support (it can work without kernel support, just doesn't prevent a compromised renderer from connecting to network or sending signals to processes). My suggestion is to replace the following code fregment: if [[ ${config_required} =3D=3D 0 ]]; then # In the case where we don't require a .config, we can now bail out # if the user has no .config as there is nothing to do. Otherwise # code later will cause a failure due to missing .config. if ! linux_config_exists; then ewarn "Unable to check for the following kernel config options du= e" ewarn "to absence of any configured kernel sources or compiled" ewarn "config:" for config in ${CONFIG_CHECK}; do local_error=3D"ERROR_${config#\~}" msg=3D"${!local_error}" if [[ "x${msg}" =3D=3D "x" ]]; then local_error=3D"WARNING_${config#\~}" msg=3D"${!local_error}" fi ewarn " - ${config#\~}${msg:+ - }${msg}" done ewarn "You're on your own to make sure they are set if needed." export LINUX_CONFIG_EXISTS_DONE=3D"${old_LINUX_CONFIG_EXISTS_DONE= }" return 0 fi else require_configured_kernel fi With something more like this: # In the case where we don't require a .config, we can now bail out # if the user has no .config as there is nothing to do. Otherwise # code later will cause a failure due to missing .config. if ! linux_config_exists; then ewarn "Unable to check for the following kernel config options due" ewarn "to absence of any configured kernel sources or compiled" ewarn "config:" for config in ${CONFIG_CHECK}; do local_error=3D"ERROR_${config#\~}" msg=3D"${!local_error}" if [[ "x${msg}" =3D=3D "x" ]]; then local_error=3D"WARNING_${config#\~}" msg=3D"${!local_error}" fi ewarn " - ${config#\~}${msg:+ - }${msg}" done ewarn "You're on your own to make sure they are set if needed." export LINUX_CONFIG_EXISTS_DONE=3D"${old_LINUX_CONFIG_EXISTS_DONE}" if [[ ${config_required} =3D=3D 0 ]]; then return 0 else die "unable to check for required kernel options" fi fi Thoughts? --------------enig20F0A1CF877249F035C7CD67 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) iEYEARECAAYFAk6z4agACgkQuUQtlDBCeQJ2JwCdFnmWeUzI4Cj83ZtWVq0uO1P1 VnYAnReJhBSq50rMHw470ORWLeiI+t9f =tvEe -----END PGP SIGNATURE----- --------------enig20F0A1CF877249F035C7CD67--