Bug 8031

Summary: kernel spec file never uses configs in /PATH/configs and make oldconfig problem
Product: [Retired] Red Hat Raw Hide Reporter: chrismcc
Component: kernelAssignee: Michael K. Johnson <johnsonm>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 1.0   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-01-04 22:20:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description chrismcc 1999-12-28 23:43:15 UTC
Hello...

	I ran into this when building a custom kernel rpm.  I was adding drivers
for a new device.  I patched the kernel config files after they were
installed in /PATH/BUILD/linux/configs.  Then the kernel build, but no
changes :(.  It seems that the files are copied into
/PATH/BUILD/linux/configs/ , but at build time they are copied again from
$RPM_SOURCE_DIR/kernel-%{kversion}-$Config.config to
arch/%{_arch}/defconfig.

-    cp $RPM_SOURCE_DIR/kernel-%{kversion}-$Config.config
arch/%{_arch}/defconfig
+    cp configs/kernel-%{kversion}-$Config.config arch/%{_arch}/defconfig

fixes that

This makes it significantly easier to add drivers/patches to the kernel for
custom installs.  For example,  my next task is to add some crypto/ipsec
stuff to 15 different servers.

In making my updates I also noticed that the config files in the
$RPM_SOURCE_DIR are not quite the same as the .config file that gets used.
After the config file is copied into place make oldconfig is run.   The
resulting .config file is different.
I would recomend something like
...
mkdir /PATH/BUILD/linux/configs.new
...
BuildKernel() {
...
make oldconfig
cp .config configs.new/kernel-%{kversion}-$Config.config
...
}
...
and copying them back to $RPM_SOURCE_DIR

Comment 1 Cristian Gafton 2000-01-04 22:20:59 UTC
Assigned to dledford

Comment 2 Michael K. Johnson 2000-07-31 20:27:45 UTC
That's how it's done in our current source package.