On Thu, Aug 07, 2003 at 12:19:22AM +0300, Oded Arbel wrote: > On Wednesday 06 August 2003 15:09, dittigas wrote: > > > > srpm is an RPM package that contains source archives, patches and > > > compilation instructions. it is used to build binary RPM packages. in the > > > RPM spec file you list the patches that you want to install and the build > > > process will path the source tree with them after it extracts all the > > > source archives. > > > > I Know what an SRPM is :) > > > > > It is relatively painless to add more patches and test them, though I > > > think that dittigas intended for something a bit different. > > > > It seems you've answered my Question. Just exactly how do you specifiy > > which patches to Install. Say I want the preempt or lowlatency patches. > > The SRPM includes some patches. these are listed in the spec file, where > normally all would be enabled (unless the pacakger wanted to temporarly > remove some). You'd see some lines like this: > > Patch0: patch-file.patch.bz2 > Patch1: patch-file.patch.bz2 > > and then later > > %patch0 > %patch1 > > You can simply comment the %patch lines for that patches you don't like. you > can also add more patch files and %patch commands.
Only in the kernel srpm there are so many of them that they are numbered with 4 digits to help keep track of them (I think there are a couple of houndreds in total.) . And some naturally depend on others, because they modify the same files. So changing that is quite a trick. Also, the kernel archive is naturally large. So an invocation of 'rpm -bp' on it deletes the old tree, extracts the kernel source, and starts aplying patches. This takes its time. Not the nicest srpm to edit... > > > Do I need to make them available on /usr/src and then add them to the > > Kernel SRPM and then re-build it? > > If you want to add patches, you put them in the SOURCES directory under your > RPM build tree (e.g. /usr/src/redhat/SOURCES on redhat, /usr/src/RPM/SOURCES > on mandrake), and then add them to the spec file as described above. > You can then test if they apply correctly by running Regarding the instructions that refered to /usr/src/REDHAT/ : I would recommend against building rpm packages as root. It is bad for your health, especially if you start editing the spec. In order to create packages as a user you need to create some files in your account, though. I know no built-in (in the rpm package) to automate this, so I wrote a simple script to create the necessary files and directories: grab http://linux.org.il/~tzafrir/mkrpmconf and run it > > rpm -bp kernel.spec > > which tells RPM to do only the "prepare" stage - untar the sources and run the > patches. > > when you build the binary RPM, don't forget to also build the new source RPM > using the -bs switch, so that you'll have a source RPM with all your new > patches, that you can distribute. But this builds the kernel a number of times with various configurations. How do I tell it to build just for my architecture? Or with my config file? One lousy alternative: In the source tree generated from rpm -bp run make (old|menu|x)config and when you're done: make rpm This will create a package with an image file. You'll have to configure lilo/grub and run mkinitrd (if necessary) manually, though. -- Tzafrir Cohen +---------------------------+ http://www.technion.ac.il/~tzafrir/ |vim is a mutt's best friend| mailto:[EMAIL PROTECTED] +---------------------------+ ================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]