Red Hat Bugzilla – Bug 182032
rpmbuild --rebuild and command line build result in two different kernels
Last modified: 2015-01-04 17:25:22 EST
Description of problem:
A kernel build on the command line with
rpmbuild -bp kernel*.src.rpm
rpmbuild -bp kernel*.src.rpm
does not result in the same executable binaries as
rpmbuild --rebuild kernel*.src.rpm
rpm -ivh kernel*.ia64.rpm
Version-Release number of selected component (if applicable):
Latest rawhide/fedora pulls.
How reproducible: 100%
Steps to Reproduce:
1. See comments above.
If I boot the kernel from the rpmbuild --rebuild I see many "unaligned access"
messages throughout the boot (these are caused by the cpu being presented an
address that hasn't been aligned to 64-bit boundary. A trap is generated and
the unaligned access message is sent to the console from a handler).
However, if I boot with a kernel that has been built on the command line using
either of the methods above I do not see these warning messages ... which
means that I cannot reliably reproduce a binary generated by the build system
without executing an rpmbuild --rebuild.
The binaries should be the same*.
* Okay, yes, they will be "different" due to different dates on the build that
the module and built-in signing works. But they should execute the same way.
1. I've done a diff between the output of a command line build versus rpmbuild
--rebuild (in order to look for obvious CFLAGS differences, etc.). I haven't
seen anything obvious.
Oddly, the order of the files that are compiled is different...
2. A possible next step is to do a diff between objdumps to see what is really
3. The SHA1 compression routines are generating the "unaligned access" messages
-- I tracked this down quickly.
4. I've built on the latest rawhide drops on a RHEL4 and a Fedora Core system
in order to see if that was the issue -- that does not appear to be the case.
5. I verified that the "unaligned access" trap is being generated in the
command line kernels. So it isn't a problem with that.
6. I've only noticed this on ia64 because the "unaligned access" messages
disappeared from the console. I have not attempted to see if there are any
discrepancies on other arch's.
rpmbuild is voodoo to me, maybe Paul knows. (Cc'd)
Prarit - have you tried running the rpmbuild post scripts (eg for stripping and
debuginfo) on the resultant image to see if they cause it.
%define __strip /bin/true
to the spec file. Still see "unaligned access" messages.
Also ran strip and debuginfo on a "self-built" kernel image. Don't see
"unaligned access" messages ...
What exact steps did you take exactly?
rpm -E '%__debug_install_post'
rpm -E '%__arch_install_post'
rpm -E '%__os_install_post'
/usr/lib/rpm/redhat/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump
Jes' upstream patch that fixed the kernel name alignment fixed this issue.
Since this will get sucked into Fedora there's no point in putting a patch