Bug 728012

Summary: %kernel_module_package macro doesn't work flavor option
Product: Red Hat Enterprise Linux 6 Reporter: joyce.yu
Component: driver-update-programAssignee: Jon Masters <jcm>
Status: CLOSED NOTABUG QA Contact: Cui Chun <ccui>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.0CC: bzeranski, ccui
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-03-05 03:22:49 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 725987    

Description joyce.yu 2011-08-03 22:50:46 UTC
Description of problem:

kmodtool doesn't embed version/release number specified by
"%kernel_module_package flavor macros in KMP packages. 

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

How reproducible:

Steps to Reproduce:
1.create kmp.spec

Name:    kmp
Summary: Dummy summary
Version: 1.0
Release: 0
License: GPL
Group:   System Environment/Kernel

BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: %kernel_module_package_buildreqs

Test bug 252188
Example ussage from http://driverupdateprogram.com

%kernel_module_package 2.6.32-71.el6.x86_64

* Tue Oct  9 2007 Foo Bar
- Updated original examples

2.Run "rpmbuild --target=x86_64 -bb kmp.spec"

error: Failed build dependencies:
        kernel-2.6.32-71.el6.x86_64-devel is needed by sxgevf-1.0-0.x86_64

Actual results:

Not able to build other flavor of the kernel

Expected results:
Nothing was created

Additional info:

Comment 4 Jon Masters 2012-03-05 03:22:49 UTC
I realize that this bug is likely the result of a badly worded example on my part in the documentation. The intention of the "flavor" is to specify other kernel variants, such as "xen", "kdump", "pae", etc. In the case of RHEL6, there really aren't many variants left and so use of this is very rare indeed.

Given this, I apologize for not realizing sooner that your request wasn't actually for a feature change in the macro, but merely a simple clarification. In general, if you want to specify a specific kernel version, all you need to do is set %kernel_version to whatever the version number you want to build against, which will override the default. Generally, the latest kernel is preferred, or a build is done using mock, but in case that you need to choose a specific kernel, please set "%kernel_version 2.6.32-release_goes_here".

We will get the documentation updated. Again, many apologies for not realizing the true nature of this request much sooner. If I can be of any assistance, please do not hesitate to email me directly at jcm@redhat.com in general.