From dac7d601baba6776b9bd38e07f26cc98c73236ba Mon Sep 17 00:00:00 2001
From: Dimitar Zhekov <jimmy@is-vn.bg>
Date: Sat, 13 Sep 2003 08:53:57 +0000
Subject: [PATCH] Dimitar Zhekov <jimmy@is-vn.bg>: linux24/config-500.in: lock
 LINUX_CUSTCONFIG=1 if config style none. If it is 0 then linux.cfg is
 removed, and 'none' fails.

linux24/lx_config.sh: remove make oldconfig if config
style none...
linux24-src/linux24-src.conf: ...and insert it here. We
need a it here to have a nice .config packaged.

bootdisk/config.in: remove the specific linux settings...
bootdisk/kernel.conf: ...and insert them here. That
should work, provided {desktop,server}/kernel.conf does.
It's a nice cleanup IMHO, now CUSTCONFIG/linux.cfg is for
user settings only.


git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@1383 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc
---
 Documentation/Developers/CHANGELOG-RENE   |  1 +
 package/base/linux24-src/linux24-src.conf |  5 ++++-
 package/base/linux24/config-500.in        |  4 ++++
 package/base/linux24/lx_config.sh         |  2 --
 target/bootdisk/config.in                 |  9 --------
 target/bootdisk/kernel.conf               | 27 +++++++++++++++++++++++
 6 files changed, 36 insertions(+), 12 deletions(-)
 create mode 100644 target/bootdisk/kernel.conf

diff --git a/Documentation/Developers/CHANGELOG-RENE b/Documentation/Developers/CHANGELOG-RENE
index 07b42c02f..5a274dc09 100644
--- a/Documentation/Developers/CHANGELOG-RENE
+++ b/Documentation/Developers/CHANGELOG-RENE
@@ -4,6 +4,7 @@
  - Alejandro Mery: fixed ncurses/zlib to install into /, fixed ncompress
                    download location and updated smartmontools
  - updated exim and spamassassin
+ - Dimitar Zhekov: linux config style fixes
 
 *) 2003-09-12 (2.0.0-rc1 - 2.0.0-rc2)
 
diff --git a/package/base/linux24-src/linux24-src.conf b/package/base/linux24-src/linux24-src.conf
index b2a69b546..5f704c92f 100644
--- a/package/base/linux24-src/linux24-src.conf
+++ b/package/base/linux24-src/linux24-src.conf
@@ -48,7 +48,10 @@ main_lx_src() {
 
 	lx_config
 
-	if [ "$ROCKCFG_PKG_LINUX_CONFIG_STYLE" != none ] ; then
+	if [ "$ROCKCFG_PKG_LINUX_CONFIG_STYLE" = none ] ; then
+		# create a valid .config (new settings may be available etc.)
+		yes '' | eval $MAKE oldconfig > /dev/null
+	else
 		cp -v .config_nomods  ../linux$treever-patches/config_nomods.txt
 		cp -v .config_modules ../linux$treever-patches/config_modules.txt
 	fi
diff --git a/package/base/linux24/config-500.in b/package/base/linux24/config-500.in
index 92b55f1c0..a40947e6e 100644
--- a/package/base/linux24/config-500.in
+++ b/package/base/linux24/config-500.in
@@ -35,6 +35,10 @@ menu_begin MENU_PKG_LINUX 'Linux Kernel Options'
 	pkgfilter sed  -e "/ linux.*-header / s/^./O/" \
 	               -e "/ $ROCKCFG_DEFAULT_KERNEL-header / s/^./X/"
 
+	if [ $ROCKCFG_PKG_LINUX_CONFIG_STYLE = none ] ; then
+		ROCKCFGSET_PKG_LINUX_CUSTCONFIG=1
+	fi
+
 	bool 'Apply custom kernel build configuration settings' \
 					ROCKCFG_PKG_LINUX_CUSTCONFIG 0
 
diff --git a/package/base/linux24/lx_config.sh b/package/base/linux24/lx_config.sh
index 4459b51bc..cdd5c2122 100644
--- a/package/base/linux24/lx_config.sh
+++ b/package/base/linux24/lx_config.sh
@@ -160,8 +160,6 @@ lx_config ()
 		echo "Using \$base/config/\$config/linux.cfg."
 		echo "Since automatic generation is disabled ..."
 		cp -v $base/config/$config/linux.cfg .config
-		# create a valid .config (new settings may be available)
-		yes '' | eval $MAKE oldconfig > /dev/null
 	else
 		echo "Automatically creating default configuration ...."
 		auto_config
diff --git a/target/bootdisk/config.in b/target/bootdisk/config.in
index d8a0a774e..b8b87c44f 100644
--- a/target/bootdisk/config.in
+++ b/target/bootdisk/config.in
@@ -84,12 +84,3 @@ ROCKCFGSET_DISABLE_NLS=1
 ROCKCFGSET_OPTSIZE=1
 ROCKCFGSET_LIMITCXX=1
 
-# Linux kernel preconfig
-ROCKCFGSET_PKG_LINUX_CUSTCONFIG=1
-cat << 'EOT' > config/$config/linux.cfg
-
-# the useful magic rq
-CONFIG_DEBUG_KERNEL=y
-CONFIG_MAGIC_SYSRQ=y
-
-EOT
diff --git a/target/bootdisk/kernel.conf b/target/bootdisk/kernel.conf
new file mode 100644
index 000000000..a7b3aa110
--- /dev/null
+++ b/target/bootdisk/kernel.conf
@@ -0,0 +1,27 @@
+
+# --- ROCK-COPYRIGHT-NOTE-BEGIN ---
+#
+# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
+# Please add additional copyright information _after_ the line containing
+# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
+# the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
+#
+# ROCK Linux: rock-src/target/bootdisk/kernel.conf
+# ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version. A copy of the GNU General Public
+# License can be found at Documentation/COPYING.
+#
+# Many people helped and are helping developing ROCK Linux. Please
+# have a look at http://www.rocklinux.org/ and the Documentation/TEAM
+# file for details.
+#
+# --- ROCK-COPYRIGHT-NOTE-END ---
+
+# the useful magic rq
+CONFIG_DEBUG_KERNEL=y
+CONFIG_MAGIC_SYSRQ=y
+