Kernel source package shipped by RH always produces all the components (smp kernels, boot kernels, pcmcia package, ibcs package and so on) on build stage. Building of one component is a long operation. But most users who builds kernel himself needs only particular configuration (e.g. only up-kernel for i686 without pcmcia and ibcs -- most common config I guess). Here is a patch for .spec file (against 2.2.16-1) to allow such separation. It introduces some variables (%defined at top) named as mk_XXX that are default to 1 (%define mk_smp 1). When changing those variables to 0, corresponding components are skipped from build process. One more thing I want here is to allow also easy building of kernel-headers and kernel-source "for i686 arch", i.e. so that only one target and one build will require to produce kernel-xxx-i686.rpm and kernel-source-xxx-i386.rpm. But this is not so easy with current rpm... And also, I tried to make easily configurable custom config and have a patch for this (to .spec also), but this is a bit ugly for moment. The idea is to allow definition of some variable (e.g. --define 'kerncustom someval') and in this case kernel-xxx-somevel.xxx.rpm will built using kernel-xxx-somevel.config files, not the original redhat kernel-xxx.config configs. Please apply (or review and apply) this patch -- it not breaks anything, it is clean and it is simple. This all will greatly simplify life for all people who needs custom kernel builds. Thank you.
Created attachment 620 [details] patch to kernel-2.2.16-1.spec file (already described)
Created attachment 982 [details] diff against 2.2.16-8
I see that at least BOOT/smp/enterprize kernels can be excluded now. Thank you. But pcmcia and ibcs still can't. Is this a principal position? It may be so, as kernels built without pcmcia/ibcs stuff will not be "compatible" with original redhat's ones (some modules will be omitted). If this is a cause, than Ok -- just confirm this and let's close this whole issue (still new). If not, here is another patch, against 2.2.16-24. What I really missed is that kernel is one of almost two packages that can't be build as non-root, and the only cause is ibcs devices. So, if ibcs stuff can be excluded, kernel will be buildable for non-root users. And also the changes I tried to made here triggered a bug in rpm -- it won't understand nested `%ifarch' and `%if %{var}' constructs.
Created attachment 4390 [details] diff against 2.2.16-24 to allow having buildibcs=0 and buildpcmcia=0
Michael can decide if this should be in the src rpm.
Closing at this point.