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
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 @@ /usr/src/linux-%{kversion}/pcmcia-cs-%{pcmciaver} %endif -%{!?headersinsource:%files headers} +%if ! %{headersinsource} +%files headers +%endif %defattr(-,root,root) %dir /usr/src/linux-%{kversion} /usr/src/linux-%{kversion}/configs --- cut --- I.e. instead of using funny %{!?headersinsource:%files headers} use more clean %if ! %{headersinsource} %files headers %endif 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?
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...
See the bug id 19399 for this also.
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: kernel-headers kernel-source kernel-sourcenheaders 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
This works for me for i386, i586, i686 %if "0" == "%{headersinsource}" %files headers %endif (credits to Leon Kanter)
Thanks for the magic; rpm macros can get confusing when nested.
this problem seems to be less important now, considering that 2.2.16 is no longer a safe kernel.