Bug 18868 - Kernel-headers package un-buildable in kernel-2.2.16-22
Kernel-headers package un-buildable in kernel-2.2.16-22
Product: Red Hat Linux
Classification: Retired
Component: kernel (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Michael K. Johnson
Brock Organ
Depends On: 19399
  Show dependency treegraph
Reported: 2000-10-11 01:43 EDT by Bishop Clark
Modified: 2007-04-18 12:29 EDT (History)
1 user (show)

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

Attachments (Terms of Use)

  None (edit)
Description Bishop Clark 2000-10-11 01:43:59 EDT
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 14:08:49 EDT
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 15:51:35 EDT
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 16:14:26 EDT
See the bug id 19399 for this also.
Comment 4 Bishop Clark 2000-10-20 14:50:35 EDT
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 12:15:31 EDT
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 10:39:43 EST
Thanks for the magic; rpm macros can get confusing when nested.
Comment 7 Bishop Clark 2001-12-05 18:34:54 EST
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.