This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 193735 - The patch file `linux-2.6-build-nonintconfig.patch' could use some cleanup
The patch file `linux-2.6-build-nonintconfig.patch' could use some cleanup
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Kernel Maintainer List
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-05-31 18:43 EDT by Jiri TRAVNICEK, alias JITR {temporarily not reading bugmail}
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-06-22 22:58:19 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
a proposed updated version of the `linux-2.6-build-nonintconfig.patch' patch (3.93 KB, patch)
2006-05-31 18:43 EDT, Jiri TRAVNICEK, alias JITR {temporarily not reading bugmail}
no flags Details | Diff

  None (edit)
Description Jiri TRAVNICEK, alias JITR {temporarily not reading bugmail} 2006-05-31 18:43:58 EDT
I'm preparing my own RPM with the latest kernel for CentOS. I'll use vanilla
source with no patches for the start. In order to to automatically build the RPM
I still need the `linux-2.6-build-nonintconfig.patch' so I cleaned it a bit. I
also rebuilt it against latest FC development SRPM in order to share it with the
community if there's interest.


Here's the summary of changes:

1. Fixed the ouput from the `conf' utility (ran via `make nonint_oldconfig' as
well as `make oldconfig' etc.). The output was missing newlines, so it looked
pretty messy. Well, a cosmetical change but still it is. (This doesn't take care
of simultaenous output to stdout and stderr, which will get mixed on the console
resulting in further mess. The output to stderr could be disabled but I left the
original behaviour here. Well, it can be still dev-nulled instead of modifying
the source...)

2. An ineffective patch for the `scripts/kconfig/confdata.c' has been implicitly
dropped. Thsi patch did nothing anyway as the "+" and "-" lines were the same.
Probably resulted from hand-editting the patch file?

3. The deletion of `break' statements in the `scripts/kconfig/confdata.c' file
has been systematically redone by prepending them whith `// '. This unifies two
methods used before -- prepending `//' and pure deletion of the line containing
that command. Well, again cosmetical, probably even more than #1.

4. The make target `nonint_oldconfig' added by this patch has been marked as
"phony". (This is done in the usual GNU Make way, ie. `.PHONY: nonint_oldconfig'
in the 2.6.16.18 kernel, but a different approach is used in FC's 2.6.16).

5. The rule for `nonint_oldconfig' has been rewritten to match the similar ones
(e. g. `oldconfig').


Summary as incremental diff from old version of
`linux-2.6-build-nonintconfig.patch' to a new one (this is the last part, so you
can skip it):

diff -ur linux-2.6.16.i686.with_old_patch/scripts/kconfig/conf.c
linux-2.6.16.i686/scripts/kconfig/conf.c
--- linux-2.6.16.i686.with_old_patch/scripts/kconfig/conf.c	2006-06-01
00:05:02.000000000 +0200
+++ linux-2.6.16.i686/scripts/kconfig/conf.c	2006-06-01 00:10:31.000000000 +0200
@@ -107,6 +107,7 @@
 		fgets(line, 128, stdin);
 		return;
 	case dont_ask:
+		printf("%s\n", def);
 		if (!sym_has_value(sym)) {
 			fprintf(stderr,"CONFIG_%s\n",sym->name);
 			return_value++;
diff -ur linux-2.6.16.i686.with_old_patch/scripts/kconfig/confdata.c
linux-2.6.16.i686/scripts/kconfig/confdata.c
--- linux-2.6.16.i686.with_old_patch/scripts/kconfig/confdata.c	2006-06-01
00:05:02.000000000 +0200
+++ linux-2.6.16.i686/scripts/kconfig/confdata.c	2006-06-01 00:10:31.000000000 +0200
@@ -153,6 +153,7 @@
 				break;
 			} else if (!(sym->flags & SYMBOL_NEW)) {
 				conf_warning("trying to reassign symbol %s", sym->name);
+				// break;
 			}
 			switch (sym->type) {
 			case S_BOOLEAN:
@@ -182,6 +183,7 @@
 				break;
 			} else if (!(sym->flags & SYMBOL_NEW)) {
 				conf_warning("trying to reassign symbol %s", sym->name);
+				// break;
 			}
 			switch (sym->type) {
 			case S_TRISTATE:
@@ -254,7 +256,7 @@
 					cs->flags |= SYMBOL_NEW;
 				} else
 					cs->user.val = sym;
-				//break;
+				// break;
 			}
 			cs->user.tri = E_OR(cs->user.tri, sym->user.tri);
 		}
diff -ur linux-2.6.16.i686.with_old_patch/scripts/kconfig/Makefile
linux-2.6.16.i686/scripts/kconfig/Makefile
--- linux-2.6.16.i686.with_old_patch/scripts/kconfig/Makefile	2006-06-01
00:05:02.000000000 +0200
+++ linux-2.6.16.i686/scripts/kconfig/Makefile	2006-06-01 00:10:31.000000000 +0200
@@ -3,6 +3,7 @@
 # These targets are used from top-level makefile
 
 PHONY += oldconfig xconfig gconfig menuconfig config silentoldconfig
update-po-config
+PHONY += nonint_oldconfig
 
 xconfig: $(obj)/qconf
 	$< arch/$(ARCH)/Kconfig
@@ -23,8 +24,8 @@
 silentoldconfig: $(obj)/conf
 	$< -s arch/$(ARCH)/Kconfig
 
-nonint_oldconfig: scripts/kconfig/conf
-	./scripts/kconfig/conf -b arch/$(ARCH)/Kconfig
+nonint_oldconfig: $(obj)/conf
+	$< -b arch/$(ARCH)/Kconfig
 
 update-po-config: $(obj)/kxgettext
 	xgettext --default-domain=linux \
Comment 1 Jiri TRAVNICEK, alias JITR {temporarily not reading bugmail} 2006-05-31 18:43:58 EDT
Created attachment 130319 [details]
a proposed updated version of the `linux-2.6-build-nonintconfig.patch' patch
Comment 2 Jiri TRAVNICEK, alias JITR {temporarily not reading bugmail} 2006-05-31 18:49:03 EDT
Well, a little misnomer has slipped htough (which is hopefully obvious, but I'd
still rather made it clear):

The above `Summary as incremental diff ...' ain't a diff of a diff but a diff of
the source tree, in particular the one with old version of the patch to the one
with the proposed version.
Comment 3 Jiri TRAVNICEK, alias JITR {temporarily not reading bugmail} 2006-06-01 15:32:14 EDT
Well, I also noticed the removed `break' statements change the semantics of
configuration file parsing, e. g. when there are duplicate occurences of the
same option and such. I think I know why this was done, but could someone
explain this officially?

Also what is the exact purpose of return value from `make nonint_oldconfig' (or,
in particular from the `main()' function of the `conf' utility) which was added
buy this patch? I know what it's value does indicate but would like to know what
is it used for? And last, how do you at Red Hat twiddle the configuration files
in SRPMs so that the return value is zero? Is there some automated process for
this? I find it impossible to do this by hand when a new kernel version is being
put in place.

Any information or pointers to it would be welcome (and probably not only by me).
Comment 4 Dave Jones 2006-06-22 22:58:19 EDT
the breaks are removed so it doesnt abort after the first symbol, so you get a
list of symbols that need attention when it fails.

There are two separate styles of break removal because the last one has a
different intent. (Though for the life of me I can't remember what it was).

From time to time, the conf_warning changes get //'s prepended to them to
quieten the noise, so they're meant to be in the diff.

Other than that, it works as expected, so I'm reluctant to change this,
especially as in the past it's been quite fragile.

Note You need to log in before you can comment on or make changes to this bug.