Bug 18868 - Kernel-headers package un-buildable in kernel-2.2.16-22
Summary: Kernel-headers package un-buildable in kernel-2.2.16-22
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: kernel   
(Show other bugs)
Version: 6.2
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Michael K. Johnson
QA Contact: Brock Organ
Depends On: 19399
TreeView+ depends on / blocked
Reported: 2000-10-11 05:43 UTC by Bishop Clark
Modified: 2007-04-18 16:29 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-02-21 15:39:47 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2001:047 normal SHIPPED_LIVE : Linux kernel 2.2.19 now available, provides security fixes, enhancements 2001-04-10 04:00:00 UTC

Description Bishop Clark 2000-10-11 05:43:59 UTC
In the kernel-2.2.spec, I've zeroed headersinsource .

When I rpm-ba the spec file (rh 6.2, rpm 305), I still do not have a headers package created.  

Am I on crack?  Should I not be expecting one?  

 - bish

Comment 1 Michael Tokarev 2000-10-19 18:08:49 UTC
Apply this patch to .spec:
--- cut ---
--- kernel-2.2.spec.orig        Thu Oct 19 21:42:15 2000
+++ kernel-2.2.spec     Thu Oct 19 22:07:59 2000
@@ -1282,7 +1282,9 @@

-%{!?headersinsource:%files headers}
+%if !  %{headersinsource}
+%files headers
 %dir /usr/src/linux-%{kversion}
--- cut ---
I.e. instead of using funny
  %{!?headersinsource:%files headers}
use more clean
  %if !  %{headersinsource}
  %files headers

It seemed to be an rpm problem.

BTW, there are too many bugreports like this (mostly about missing -headers
by default).  Should redhat revert to the old behavor?

Comment 2 Michael Tokarev 2000-10-19 19:51:35 UTC
Woops, this change triggers a bug in rpm -- rpm is unable to
handle nested `%ifarch' and `%if %{var}' constructs.  Doh!
Ok, to get the -headers package, apply this patch and compile
for i386 arch only (if it is i*86).  To compile for e.g. i686,
one need to backout this my patch...

Comment 3 Michael Tokarev 2000-10-19 20:14:26 UTC
See the bug id 19399 for this also.

Comment 4 Bishop Clark 2000-10-20 18:50:35 UTC
FWIW, I'd recommend it.  The upgrade is that much more smoothly.

Otherwise, we're in a forced removal, --justdb kinda install dance.  Hey, if we can make it easier with a little work, that's cool.

Can't we work something with the provides variabel on the no-headers config, so that there won't be so many problems upgrading to/from a 
HEADERSINSOURCE package?  How about building three arh.rpm files:


Make it so that either the first two provide source and headers, or the last one.  Then the upgrade is smoother, the user can choose which format to 
install, and almost everyone's happy.  The only drawback is that the space required will be more, increased by na amount equal to the size of the 
headers and the source.

Make sense? 

 - bish

Comment 5 giulioo 2000-10-21 16:15:31 UTC
This works for me for i386, i586, i686

%if "0" == "%{headersinsource}"
%files headers

(credits to Leon Kanter)

Comment 6 Michael K. Johnson 2001-02-21 15:39:43 UTC
Thanks for the magic; rpm macros can get confusing when nested.

Comment 7 Bishop Clark 2001-12-05 23:34:54 UTC
this problem seems to be less important now, considering that 2.2.16 is no longer a safe kernel.

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