Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 230617

Summary: Kernel spec file 'sublevel' can break compile if sublevel is not integer
Product: Red Hat Enterprise Linux 4 Reporter: Matthew Callaway <matt>
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED NOTABUG QA Contact: Brian Brock <bbrock>
Severity: low Docs Contact:
Priority: medium    
Version: 4.0   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-03-07 21:13:19 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Matthew Callaway 2007-03-01 19:47:04 UTC
Description of problem:

If you set 'sublevel' to a non-integer value, say 19.3 or 20.1, you will break
the toplevel kernel Makefile, and cause failure to compile.  Specifically, in
the Makefile:

define filechk_version.h
        (echo \#define LINUX_VERSION_CODE $(shell                             \
        expr $(VERSION) \* 65536 + $(PATCHLEVEL) \* 256 + $(SUBLEVEL));     \
        echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))';)

This 'expr' will fail with non-numeric value in $SUBLEVEL.  This leaves
LINUX_VERSION_CODE undefined, and causes syntax errors.  The first one appears
in drivers/usb/core/hcd.c line 133.

Not a big deal for your products, but someday you might find yourself building a
kernel of version a.b.c.d and wonder why it doesn't compile.

Version-Release number of selected component (if applicable):

kernel 2.6.9 specfile.

How reproducible:


Steps to Reproduce:
1. Try to build a newer kernel with sublevel 19.3 or 20.1.
2. rpmbuild -ba --target i686 kernel-2.6.spec
Actual results:

Expected results:

Additional info:

Comment 1 Jason Baron 2007-03-07 21:13:19 UTC
sublevel will not change over the life of rhel4 it is fixed at '9'. thus,
although it would be nice to make the code more general i don't see this as a bug.