rpms/kernel/devel Makefile, 1.45, 1.45.8.1 kernel-2.6.spec, 1.3040, 1.3040.2.1 linux-2.6-build-nonintconfig.patch, 1.6, 1.6.72.1

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Tue Apr 3 15:58:36 UTC 2007


Author: jwilson

Update of /cvs/dist/rpms/kernel/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv24533

Modified Files:
      Tag: private-jw-vanilla-branch
	Makefile kernel-2.6.spec linux-2.6-build-nonintconfig.patch 
Log Message:
Here's hoping I did this private branch thing right... Committing changes to support --with vanilla build option to produce unpatched builds


Index: Makefile
===================================================================
RCS file: /cvs/dist/rpms/kernel/devel/Makefile,v
retrieving revision 1.45
retrieving revision 1.45.8.1
diff -u -r1.45 -r1.45.8.1
--- Makefile	19 Mar 2007 21:32:30 -0000	1.45
+++ Makefile	3 Apr 2007 15:58:33 -0000	1.45.8.1
@@ -66,5 +66,30 @@
 	@VERSION="2.6.20" make -f Makefile.config configs
 	@scripts/reconfig.sh
 
+P_BRANCH := private-$(PRIVATE)-branch
+P_TAG := $(shell echo $(PRIVATE) | sed s/-/_/g)
+P_BASE := $(shell test -n "$(BASE)" && echo "-r $(BASE)")
+
+private:
+	@if [ -z "$(PRIVATE)" ]; then \
+		echo "Please specify a PRIVATE branch name"; \
+		echo "To create a 'private-bz1234-branch' cvs branch"; \
+		echo -e "\tmake PRIVATE=bz1234 private (branch off working directory)"; \
+		echo -e "\tmake PRIVATE=bz1234 BASE=kernel-2_6_18-8_el5" \
+		"private (branch off revision kernel-2_6_18-8_el5)"; \
+		exit 1; \
+	fi;
+	@if [ -z "$$(cvs log -h Makefile | grep $(P_BRANCH))" ]; then \
+		cvs tag $(P_BASE) -b $(P_BRANCH); \
+	fi;
+	@cvs update -dr $(P_BRANCH)
+	@if [ ! "$$(grep $(P_TAG) $(SPECFILE))" ]; then \
+		sed -ie 's/\(#% define buildid.*\).*/%define buildid '"$(P_TAG)"'.1/g' \
+		$(SPECFILE); \
+	fi;
+
+update:
+	@cvs update -PAd
+
 # since i386 isn't a target...
 compile compile-short: DIST_DEFINES += --target $(shell uname -m)


Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/dist/rpms/kernel/devel/kernel-2.6.spec,v
retrieving revision 1.3040
retrieving revision 1.3040.2.1
diff -u -r1.3040 -r1.3040.2.1
--- kernel-2.6.spec	2 Apr 2007 19:39:38 -0000	1.3040
+++ kernel-2.6.spec	3 Apr 2007 15:58:33 -0000	1.3040.2.1
@@ -49,6 +49,10 @@
 # See also 'make debug' and 'make release'.
 %define debugbuildsenabled 0
 
+# Want to build a vanilla kernel build without any non-upstream patches?
+# (well, almost none, we need a few for build purposes). Default to 0 (off).
+%define with_vanilla %{?_with_vanilla: 1} %{?!_with_vanilla: 0}
+
 # Versions of various parts
 
 # Polite request for people who spin their own kernel rpms:
@@ -60,7 +64,15 @@
 %define sublevel 20
 %define kversion 2.6.%{sublevel}
 %define rpmversion 2.6.%{sublevel}
-%define release %(R="$Revision$"; RR="${R##: }"; echo ${RR%%?})%{?dist}%{?buildid}
+%define specrelease %(R="$Revision$"; RR="${R##: }"; echo ${RR%%?})%{?dist}%{?buildid}
+%define release %{specrelease}
+# Set upstream kernel sublevel, -rcX and -gitY levels here
+# For rawhide, usually the forthcoming kernel's sublevel, for a stable
+# release, likely something like 20.5 for kernel 2.6.20.5
+# Comment out rcrev and gitrev as needed
+%define uksublevel 21
+%define rcrev 5
+%define gitrev 9
 
 %define make_target bzImage
 %define kernel_image x86
@@ -91,6 +103,23 @@
 %define with_debug 0
 %endif
 
+# if vanilla build...
+%if %{with_vanilla}
+%{?rcrev: %define rctag _rc%rcrev}
+%{?gitrev: %define gittag _git%gitrev}
+%define ukver 2.6.%{uksublevel}%{?rctag}%{?gittag}
+%define includexen 0
+%define with_xen 0
+%define with_modsign 0
+# Ignore unknown options in our config-* files.
+# Some options go with patches we're not applying.
+%define oldconfig_target loose_nonint_oldconfig
+# Put upstream kernel version in release
+%define release 0.%{specrelease}.%{ukver}
+%else
+%define oldconfig_target nonint_oldconfig
+%endif
+
 # don't build xen or kdump kernels for OLPC
 %if 0%{?olpc}
 %define with_xen 0
@@ -373,8 +402,8 @@
 #
 # Patches 0 through 100 are meant for core subsystem upgrades
 #
-Patch1: patch-2.6.21-rc5.bz2
-Patch2: patch-2.6.21-rc5-git9.bz2
+Patch1: patch-2.6.%{uksublevel}-rc%{rcrev}.bz2
+Patch2: patch-2.6.%{uksublevel}-rc%{rcrev}-git%{gitrev}.bz2
 Patch3: git-geode.patch
 
 # Patches 10 through 99 are for things that are going upstream really soon.
@@ -941,7 +970,7 @@
 if [ ! -d kernel-%{kversion}/vanilla ]; then
   # Ok, first time we do a make prep.
   rm -f pax_global_header
-%setup -q -n %{name}-%{version} -c
+%setup -q -n %{name}-%{kversion} -c
   mv linux-%{kversion} vanilla
 else
   # We already have a vanilla dir.
@@ -963,6 +992,7 @@
 %patch1 -p1
 %patch2 -p1
 
+%if !%{with_vanilla}
 # Patches 10 through 100 are meant for core subsystem upgrades
 
 # Roland's utrace ptrace replacement.
@@ -1057,12 +1087,14 @@
 # and patches related to how RPMs are build
 #
 
+%endif
 
 # This patch adds a "make nonint_oldconfig" which is non-interactive and
 # also gives a list of missing options at the end. Useful for automated
 # builds (as used in the buildsystem).
 %patch800 -p1
 
+%if !%{with_vanilla}
 # Exec shield
 %patch810 -p1
 
@@ -1280,6 +1312,7 @@
 %patch10001 -p1
 
 # END OF PATCH APPLICATIONS
+%endif
 
 cp %{SOURCE10} Documentation/
 
@@ -1302,7 +1335,7 @@
 
 %if 0%{?debugbuildsenabled}
 %else
-rm -f kernel-%kversion}-*-debug.config
+rm -f kernel-%{kversion}-*-debug.config
 %endif
 
 # now run oldconfig over all the config files
@@ -1310,7 +1343,7 @@
 do
   mv $i .config
   Arch=`head -1 .config | cut -b 3-`
-  make ARCH=$Arch nonint_oldconfig > /dev/null
+  make ARCH=$Arch %{oldconfig_target} > /dev/null
   echo "# $Arch" > configs/$i
   cat .config >> configs/$i
 done
@@ -1318,8 +1351,10 @@
 # make sure the kernel has the sublevel we know it has. This looks weird
 # but for -pre and -rc versions we need it since we only want to use
 # the higher version when the final kernel is released.
+%if !%{with_vanilla}
 perl -p -i -e "s/^SUBLEVEL.*/SUBLEVEL = %{sublevel}/" Makefile
 perl -p -i -e "s/^EXTRAVERSION.*/EXTRAVERSION = -prep/" Makefile
+%endif
 
 # get rid of unwanted files resulting from patch fuzz
 find . \( -name "*.orig" -o -name "*~" \) -exec rm -f {} \; >/dev/null
@@ -1328,7 +1363,7 @@
 
 # unpack sparse.
 if [ ! -d sparse-%{sparsever} ] ; then
-%setup -D -T -q -a 3
+%setup -D -T -q -n %{name}-%{kversion} -a3
 fi
 
 # Unpack the Xen tarball.
@@ -1337,7 +1372,7 @@
 if [ -d xen ]; then
   rm -rf xen
 fi
-%setup -D -T -q -n %{name}-%{version} -a1
+%setup -D -T -q -n %{name}-%{kversion} -a1
 cd xen
 # Any necessary hypervisor patches go here
 %patch20000 -p1
@@ -1386,7 +1421,7 @@
       DevelLink=
     fi
 
-    KernelVer=%{version}-%{release}$Flavour
+    KernelVer=%{kversion}-%{release}$Flavour
     echo BUILDING A KERNEL FOR $Flavour %{_target_cpu}...
 
     # make sure EXTRAVERSION says what we want it to say
@@ -1404,7 +1439,7 @@
        KernelImage=arch/$Arch/boot/bzImage
     fi
 
-    make -s ARCH=$Arch nonint_oldconfig > /dev/null
+    make -s ARCH=$Arch %{oldconfig_target} > /dev/null
     make -s ARCH=$Arch %{?_smp_mflags} $MakeTarget %{?sparse_mflags}
     make -s ARCH=$Arch %{?_smp_mflags} modules %{?sparse_mflags} || exit 1
 
@@ -1652,10 +1687,10 @@
 %global __debug_package 1
 %files debuginfo-common
 %defattr(-,root,root)
-/usr/src/debug/%{name}-%{version}/linux-%{kversion}.%{_target_cpu}
+/usr/src/debug/%{name}-%{kversion}/linux-%{kversion}.%{_target_cpu}
 %if %{includexen}
 %if %{with_xen}
-/usr/src/debug/%{name}-%{version}/xen
+/usr/src/debug/%{name}-%{kversion}/xen
 %endif
 %endif
 %dir /usr/src/debug

linux-2.6-build-nonintconfig.patch:
 Makefile |    5 +++++
 conf.c   |   34 ++++++++++++++++++++++++++++++++--
 2 files changed, 37 insertions(+), 2 deletions(-)

Index: linux-2.6-build-nonintconfig.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/devel/linux-2.6-build-nonintconfig.patch,v
retrieving revision 1.6
retrieving revision 1.6.72.1
diff -u -r1.6 -r1.6.72.1
--- linux-2.6-build-nonintconfig.patch	27 Jun 2006 00:39:13 -0000	1.6
+++ linux-2.6-build-nonintconfig.patch	3 Apr 2007 15:58:33 -0000	1.6.72.1
@@ -1,15 +1,29 @@
-diff -urNp --exclude-from=/home/davej/.exclude linux-600/scripts/kconfig/conf.c linux-800/scripts/kconfig/conf.c
---- linux-600/scripts/kconfig/conf.c
-+++ linux-800/scripts/kconfig/conf.c
-@@ -20,6 +20,7 @@ enum {
+--- linux-2.6.17/scripts/kconfig/Makefile.nonintconfig
++++ linux-2.6.17/scripts/kconfig/Makefile
+@@ -23,6 +23,11 @@ oldconfig: $(obj)/conf
+ silentoldconfig: $(obj)/conf
+ 	$< -s arch/$(ARCH)/Kconfig
+ 
++nonint_oldconfig: $(obj)/conf
++	$< -b arch/$(ARCH)/Kconfig
++loose_nonint_oldconfig: $(obj)/conf
++	$< -B arch/$(ARCH)/Kconfig
++
+ update-po-config: $(obj)/kxgettext
+ 	xgettext --default-domain=linux \
+           --add-comments --keyword=_ --keyword=N_ \
+--- linux-2.6.17/scripts/kconfig/conf.c.nonintconfig
++++ linux-2.6.17/scripts/kconfig/conf.c
+@@ -21,6 +21,8 @@ enum {
  	ask_all,
  	ask_new,
  	ask_silent,
 +	dont_ask,
++	dont_ask_dont_tell,
  	set_default,
  	set_yes,
  	set_mod,
-@@ -37,6 +37,8 @@ static struct menu *rootEntry;
+@@ -37,6 +39,8 @@ static struct menu *rootEntry;
  
  static char nohelp_text[] = N_("Sorry, no help available for this option yet.\n");
  
@@ -18,7 +32,7 @@
  static void strip(char *str)
  {
  	char *p = str;
-@@ -93,6 +96,12 @@ static void conf_askvalue(struct symbol 
+@@ -103,6 +107,14 @@ static void conf_askvalue(struct symbol 
  		fflush(stdout);
  		fgets(line, 128, stdin);
  		return;
@@ -27,114 +41,71 @@
 +			fprintf(stderr,"CONFIG_%s\n",sym->name);
 +			return_value++;
 +		}
++		/*FALLTHROUGH*/
++	case dont_ask_dont_tell:
 +		return;
  	case set_default:
  		printf("%s\n", def);
  		return;
-@@ -337,6 +346,10 @@ static int conf_choice(struct menu *menu
+@@ -346,6 +358,11 @@ static int conf_choice(struct menu *menu
  			printf("?");
  		printf("]: ");
  		switch (input_mode) {
 +		case dont_ask:
++		case dont_ask_dont_tell:
 +			cnt = def;
 +			printf("%d\n", cnt);
 +			break;
  		case ask_new:
  		case ask_silent:
  			if (!is_new) {
-@@ -472,7 +485,10 @@ static void check_conf(struct menu *menu
+@@ -482,6 +499,10 @@ static void check_conf(struct menu *menu
  			if (!conf_cnt++)
- 				printf("*\n* Restart config...\n*\n");
+ 				printf(_("*\n* Restart config...\n*\n"));
  			rootEntry = menu_get_parent_menu(menu);
--			conf(rootEntry);
-+			if (input_mode == dont_ask)
++			if (input_mode == dont_ask
++			    || input_mode == dont_ask_dont_tell)
 +				fprintf(stderr,"CONFIG_%s\n",sym->name);
 +			else
-+				conf(rootEntry);
+ 			conf(rootEntry);
  		}
- 		if (sym_is_choice(sym) && sym_get_tristate_value(sym) != mod)
- 			return;
-@@ -493,6 +509,9 @@ int main(int ac, char **av)
+ 	}
+@@ -501,6 +522,12 @@ int main(int ac, char **av)
  		case 'o':
  			input_mode = ask_new;
  			break;
 +		case 'b':
 +			input_mode = dont_ask;
 +			break;
++		case 'B':
++			input_mode = dont_ask_dont_tell;
++			break;
  		case 's':
  			input_mode = ask_silent;
  			valid_stdin = isatty(0) && isatty(1) && isatty(2);
-@@ -557,6 +576,7 @@ int main(int ac, char **av)
+@@ -566,6 +593,8 @@ int main(int ac, char **av)
  		}
  	case ask_all:
  	case ask_new:
 +	case dont_ask:
++	case dont_ask_dont_tell:
  		conf_read(NULL);
  		break;
- 	default:
-@@ -632,7 +632,7 @@ int main(int ac, char **av)
+ 	case set_no:
+@@ -612,7 +641,8 @@ int main(int ac, char **av)
  	do {
  		conf_cnt = 0;
  		check_conf(&rootmenu);
 -	} while (conf_cnt);
-+	} while ((conf_cnt) && (input_mode != dont_ask));
++ 	} while (conf_cnt && (input_mode != dont_ask
++			      && input_mode != dont_ask_dont_tell));
  	if (conf_write(NULL)) {
  		fprintf(stderr, _("\n*** Error during writing of the kernel configuration.\n\n"));
  		return 1;
-@@ -643,5 +643,5 @@ skip_check:
+@@ -623,5 +653,5 @@ skip_check:
  		return 1;
  	}
  
 -	return 0;
 +	return return_value;
  }
---- linux-2.6.16.noarch/scripts/kconfig/Makefile~	2006-03-25 15:55:18.000000000 -0500
-+++ linux-2.6.16.noarch/scripts/kconfig/Makefile	2006-03-25 15:55:47.000000000 -0500
-@@ -23,6 +23,9 @@ oldconfig: $(obj)/conf
- silentoldconfig: $(obj)/conf
- 	$< -s arch/$(ARCH)/Kconfig
- 
-+nonint_oldconfig: scripts/kconfig/conf
-+	./scripts/kconfig/conf -b arch/$(ARCH)/Kconfig
-+
- update-po-config: $(obj)/kxgettext
- 	xgettext --default-domain=linux \
-           --add-comments --keyword=_ --keyword=N_ \
---- linux-2.6.14/scripts/kconfig/confdata.c~	2005-11-10 14:55:46.000000000 -0500
-+++ linux-2.6.14/scripts/kconfig/confdata.c	2005-11-10 14:56:01.000000000 -0500
-@@ -161,7 +161,7 @@ load:
- 			if (def == S_DEF_USER) {
- 				sym = sym_find(line + 9);
- 				if (!sym) {
--					conf_warning("trying to assign nonexistent symbol %s", line + 9);
-+					conf_warning("trying to assign nonexistent symbol %s", line + 9);
- 					break;
- 				}
- 			} else {
-@@ -197,7 +197,7 @@ load:
- 			if (def == S_DEF_USER) {
- 				sym = sym_find(line + 7);
- 				if (!sym) {
--					conf_warning("trying to assign nonexistent symbol %s", line + 7);
-+					conf_warning("trying to assign nonexistent symbol %s", line + 7);
- 					break;
- 				}
- 			} else {
---- linux-2.6.14/scripts/kconfig/confdata.c~	2005-11-15 23:51:37.000000000 -0500
-+++ linux-2.6.14/scripts/kconfig/confdata.c	2005-11-15 23:52:50.000000000 -0500
-@@ -153,7 +153,6 @@ int conf_read_simple(const char *name)
- 				break;
- 			} else if (!(sym->flags & SYMBOL_NEW)) {
- 				conf_warning("trying to reassign symbol %s", sym->name);
--				break;
- 			}
- 			switch (sym->type) {
- 			case S_BOOLEAN:
-@@ -183,7 +182,6 @@ int conf_read_simple(const char *name)
- 				break;
- 			} else if (!(sym->flags & SYMBOL_NEW)) {
- 				conf_warning("trying to reassign symbol %s", sym->name);
--				break;
- 			}
- 			switch (sym->type) {
- 			case S_TRISTATE:




More information about the fedora-cvs-commits mailing list