public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] RFC: CONFIG_CHECK_FATAL, making CONFIG_CHECKS fatal by default
@ 2013-01-22  3:38 Robin H. Johnson
  2013-01-22  3:45 ` Mike Gilbert
                   ` (3 more replies)
  0 siblings, 4 replies; 57+ messages in thread
From: Robin H. Johnson @ 2013-01-22  3:38 UTC (permalink / raw
  To: gentoo-dev


[-- Attachment #1.1: Type: text/plain, Size: 1760 bytes --]

I'm raising this patch because of the recent spate of bugs with the
latest udev  that now fails to boot your system if CONFIG_DEVTMPFS is
not available in your kernel.

Bugs: 408947, 409393, 437320, 453074	

CONFIG_CHECK has not been fatal for some years now, because there turned
out to be some cases where it cannot detect what the system really has
[1], or what is returned is wrong [2].

However, while this is has been superb in helping those corner-cases,
the fallout is that users frequently ignore the non-fatal warnings that
a configuration option is needed to run a binary later, and end up with
weird breakage.

This patch introduces a new option, CONFIG_CHECK_FATAL, defaulting to
enabled, that explicitly causes a die if:
- CONFIG_CHECK cannot be performed successfully.
- Any CONFIG_CHECK options fail.

For the aforementioned corner cases, those environments are used to
customizing their make.conf heavily, and they should add:
CONFIG_CHECK_FATAL=0

This patch does NOT change the handling of ~/tilde in CONFIG_CHECK
- options that are required at compile-time MUST NOT use ~/tilde.
- options that are only required at run-time MUST include the ~/tilde.

Footnotes:
1. If you are using a VM environment, where the kernel is provided
   outside of your VM, and you don't have kernel sources, or
   /proc/config.gz, you CANNOT detect what options the kernel is
   configured with.
2. Building stages for example. You may have /proc bind-mounted from the
   host system, but it does not reflect the environment you are building
   for.

-- 
Robin Hugh Johnson
Gentoo Linux: Developer, Trustee & Infrastructure Lead
E-Mail     : robbat2@gentoo.org
GnuPG FP   : 11ACBA4F 4778E3F6 E4EDF38E B27B944E 34884E85

[-- Attachment #1.2: linux-info-config_check_fatal.patch --]
[-- Type: text/x-diff, Size: 1740 bytes --]

Index: linux-info.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/linux-info.eclass,v
retrieving revision 1.95
diff -p -u -r1.95 linux-info.eclass
--- linux-info.eclass	16 Jan 2013 14:29:01 -0000	1.95
+++ linux-info.eclass	22 Jan 2013 03:23:59 -0000
@@ -57,6 +57,16 @@
 # This is to allow usage of binary kernels, and minimal systems without kernel
 # sources.
 
+# @ECLASS-VARIABLE: CONFIG_CHECK_FATAL
+# @DESCRIPTION:
+# Make failure of CONFIG_CHECK fatal.
+#
+# Enabled by default to save users.
+#
+# If you use a binary kernel, a minimal system without kernel sources, or any
+# system where checking config is no possible, you must disable this.
+[[ ${CONFIG_CHECK_FATAL+set} == set ]] || CONFIG_CHECK_FATAL=1
+
 # @ECLASS-VARIABLE: ERROR_<CFG>
 # @DESCRIPTION:
 # A string containing the error message to display when the check against CONFIG_CHECK
@@ -701,6 +711,8 @@ check_extra_config() {
 				fi
 				ewarn " - ${config#\~}${msg:+ - }${msg}"
 			done
+			[[ ${CONFIG_CHECK_FATAL} == 1 ]] && \
+				die "Cannot check kernel config per CONFIG_CHECK_FATAL."
 			ewarn "You're on your own to make sure they are set if needed."
 			export LINUX_CONFIG_EXISTS_DONE="${old_LINUX_CONFIG_EXISTS_DONE}"
 			return 0
@@ -784,7 +796,7 @@ check_extra_config() {
 		fi
 	done
 
-	if [[ ${hard_errors_count} > 0 ]]; then
+	if [[ ${hard_errors_count} > 0 ]] || [[ ${CONFIG_CHECK_FATAL} == 1 ]] && [[ ${soft_errors_count} > 0 ]]; then
 		eerror "Please check to make sure these options are set correctly."
 		eerror "Failure to do so may cause unexpected problems."
 		eerror "Once you have satisfied these options, please try merging"

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

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

end of thread, other threads:[~2013-01-27  1:07 UTC | newest]

Thread overview: 57+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-22  3:38 [gentoo-dev] RFC: CONFIG_CHECK_FATAL, making CONFIG_CHECKS fatal by default Robin H. Johnson
2013-01-22  3:45 ` Mike Gilbert
2013-01-22  3:56   ` Zac Medico
2013-01-22  4:10     ` Rick "Zero_Chaos" Farina
2013-01-22  4:14       ` Zac Medico
2013-01-22  9:22     ` Markos Chandras
2013-01-22 14:49       ` Zac Medico
2013-01-22  4:23 ` Mike Gilbert
2013-01-22  6:22   ` Sergey Popov
2013-01-22  6:44     ` [gentoo-dev] " Duncan
2013-01-22 14:51     ` [gentoo-dev] " Zac Medico
2013-01-22 18:40       ` Robin H. Johnson
2013-01-23 12:32         ` Fabio Erculiani
2013-01-23 12:50           ` Rich Freeman
2013-01-23 21:27             ` Fabio Erculiani
2013-01-23 23:17               ` Francesco Riosa
2013-01-24  1:10           ` Robin H. Johnson
2013-01-24 19:46             ` Fabio Erculiani
2013-01-22 11:11 ` vivo75
2013-01-22 11:56   ` Rich Freeman
2013-01-24 17:04     ` Dustin C. Hatch
2013-01-24 17:49     ` [gentoo-dev] " Duncan
2013-01-24 18:09       ` Rich Freeman
2013-01-24 18:18         ` Ian Stakenvicius
2013-01-24 18:24           ` Dustin C. Hatch
2013-01-24 18:25           ` Rich Freeman
2013-01-24 18:55             ` Michael Orlitzky
2013-01-24 18:58               ` Ian Stakenvicius
2013-01-24 19:05                 ` Rich Freeman
2013-01-24 19:21                 ` Michael Orlitzky
2013-01-24 20:26                   ` vivo75
2013-01-24 20:39                     ` Michael Orlitzky
2013-01-24 20:45                       ` Michael Orlitzky
2013-01-25  0:29                         ` vivo75
2013-01-25  0:37                           ` Michael Orlitzky
2013-01-24 21:30                   ` Rich Freeman
2013-01-26 10:34                     ` Fabio Erculiani
2013-01-26 22:25                       ` Duncan
2013-01-26 22:30                         ` Fabio Erculiani
2013-01-26 22:54                           ` Rich Freeman
2013-01-27  0:31                             ` Peter Stuge
2013-01-27  1:06                               ` Rich Freeman
2013-01-25  1:39               ` Duncan
2013-01-25  1:53                 ` Robin H. Johnson
2013-01-25  2:22                 ` Michael Orlitzky
2013-01-25  3:12                   ` Rich Freeman
2013-01-25  3:27                     ` Michael Orlitzky
2013-01-25  6:15                   ` Duncan
2013-01-25 18:24 ` Nuno J. Silva
2013-01-25 18:47   ` Rich Freeman
2013-01-25 19:19     ` Christopher Head
2013-01-25 19:26       ` Rich Freeman
2013-01-25 19:47     ` Nuno J. Silva
2013-01-25 19:57       ` Rich Freeman
2013-01-25 20:06         ` Nuno J. Silva
2013-01-25 20:31           ` Rich Freeman
2013-01-26  1:51           ` Duncan

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