[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: How Do I build the kernel source rpm?



On Wed, Aug 25, 2004 at 07:20:00PM +0100, Bart Kalita wrote:
> 
> can I have "for the thick as a two short planks glued with thick glue"
> people version of how to build source for the 526 kernel?

You take 'kernel-2.6.8-1.526.src.rpm' and you run

   rpmbuild --rebuild --target=noarch \
	--define 'buildsource 1' kernel-2.6.8-1.526.src.rpm

Not tested and it may not work if '%define' inside of a kernel spec
file overrides your definition of 'buildsource'.  In such case
you have to 'rpm -i kernel-2.6.8-1.526.src.rpm',

   cd "$(rpm --eval %_topdir)/SPECS"

edit a corresponding spec file to replace 0 with 1 where
'buildsource' is defined, which could be a number of places, and run

  rpmbuild -bb --target=noarch "/my/modified/spec/file"

A description of an audience makes highly likely that you have
enough of a disk space on a partition where you trying to do that. :-)

Still it is highly advisable not to that all of the above as root
but to define your own '%_topdir' in ~/.rpmmacros and then you can
pick up a location where you are not likely to run out of a disk.
Copy a directory structure from /usr/src/redhat to your own
%_topdir.

   Michal



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]