On Thursday 07 August 2003 02:09, Tzafrir Cohen wrote: > > > 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
Its no biggy - just create the base directory and define it in our .rpmmacros: $_topdir /home/oded/rpm now create the directories BUILD, SRPMS and RPMS/<whatever arch you build for> under that root and your set to fo - all other stuff gets generated. Building packages as a regular user is recommended for testing, but if you want to build binary packages and distribute them, you'd better do that as root, otherwise you'll have lots of premissions and ownership issues. > > 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? It's easy to save the configuration you've setup in the source RPM and make sure that the SPEC file builds the kernel with your configuration. of course, depending on your setup, that config file may or may not cause your generated source RPM to be distributable to other users. Mandrake has a complicated setup to allow the same source RPM to be built w/o changes for different architectures - I personally couldn't find head or tails in that mess :-) -- Oded ================================================================= 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]