Bug 232602 - Kernel %prep should not modify files in SOURCES (patch included)
Kernel %prep should not modify files in SOURCES (patch included)
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel (Show other bugs)
5.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Don Zickus
Red Hat Kernel QE team
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-03-16 07:50 EDT by Jos Vos
Modified: 2009-05-26 16:45 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-05-26 16:45:56 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch for kernel-2.6.spec (2.6.18-8.1.1.el5) (4.79 KB, patch)
2007-03-16 07:50 EDT, Jos Vos
no flags Details | Diff

  None (edit)
Description Jos Vos 2007-03-16 07:50:01 EDT
Description of problem:
In %prep the *.config files from SOURCES are modified (merge.pl etc.) and the
original files are replaced by the modified ones! This is IMHO a serious RPM
packaging bug, as now (for example) the src.rpm files created with "rpmbuild
-bs" and  with "rpmbuild -ba" will have different contents (source files)!

Version-Release number of selected component (if applicable):
2.6.18-8.1.1.el5 (but this problem seems to be in since a while, sorry I didn't
notice it during the beta period ;-)).

How reproducible:
Compare the src.rpm's created with "rpmbuild -bs" and  with "rpmbuild -ba".

Solution:
Modify the *.config files in the build directory, don't change the files in
SOURCES.  Attached is a patch for the kerrnel spec file that does this.  Note
that the wildcards will not always match files now, that's why I included the
test (-f), so that if there is no match, the "$i" will still have the "*" and
the file does not exist.
Comment 1 Jos Vos 2007-03-16 07:50:01 EDT
Created attachment 150212 [details]
Patch for kernel-2.6.spec (2.6.18-8.1.1.el5)
Comment 2 Don Zickus 2007-06-21 00:59:54 EDT
Thanks.  It's been like that for about a year now.  We just have never noticed.
 I'll look into making these changes for 5.2.  They look straightforward.

-Don

Comment 3 Jarod Wilson 2007-07-11 13:59:42 EDT
Funny, I just started work on a patch for the rawhide spec last night that does
a lot of the same things... :) Yeah, those changes definitely look sane and
correct for the RHEL5 spec.
Comment 4 Don Zickus 2008-01-11 15:04:45 EST
in 2.6.18-66.el5dz_test
You can download this test kernel from http://people.redhat.com/dzickus/el5
Comment 5 Don Zickus 2009-05-26 16:45:56 EDT
This should have went out with the 5.2 release.  I am just going to close this a CURRENT RELEASE unless someone has a better idea.

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