View Full Version : Why SRPMs
mborn
Hi all!
I want to know why do linux companies supply SRPMs CDs of their distros?
I mean, is it only to compy with terms of the GPL licince terms or is it possible for users to use them to install Linux.
I had this question in mind because I noticed that I installed FC4 which is compiled for i386 arch. and I guess this is not the optimized solution, so I thought to ask to see if we can install Linux from the sources Cds.
thanks
Max
khaledma
hi;
SRPM means you have the source tar ball and the *.spec file for the software.
you can go ahead and install it as usual:
# rpm -ivh <cource rpm file >
now go and inspect your /usr/src/redhat/SOURCES ,
what you will see here is the software in tar.gz archive, may be also you will see one or more patches.
Also, in the directory /usr/src/redhat/SPECS ; you will see the spec file for this
package.
If you now cd to /usr/src/redhat/SPECS
then run the command: # rpmbuild -bp --target=i686 <package.spec>
( i686 for Pentium 4 for example )
you will extract the package.tar.gz file and applay the patches to it.
now go to the directory : /usr/src/redhat/BUILD
you will see a complete source code tree for your software.
Here you have two options and it depends on you:
the first is to go ahead and recompiling the software on your system
using the rpmbuild
# cd /usr/src/redhat/SPECS
# rpmbuild -ba --target=i686 package.spec
[ after finishing go and inspect the /usr/src/redhat/RPMS/i686 directory ,
you will find the packages you just built in this directory ]
OR, to go inside the source tree and do ./configure ...< options comes here >
then make and make install
If you know how to play with the spec file you can do everything at this stage.
Ok,
anyway you can read the man page for the rpmbuid for more information.
This is just only a short description for the process.
khaled
mborn
Thank you very much khalid for this illustrative notice(s).
Well, is it possible to use the SRPMs CDs as an installation media so one can have an optimized system?
I know it will be time consuming, but if it is automated, that will be great!
(I mean something like gentoo as an example of what I want to say)
Max
khaledma
hi,
yes, i agree with you...but this will make the installation process becomes a nightmare,....it will takes a very vey long time ....may be a whole days...
anyway, you do not need to compile every thing to get a performance
gain...you just only need to recompile small number of them....
But, if you are looking for a performance gain...you have only to customize,
and recompile your kernel .... this is the most important piece inside the box.
khaled
mborn
Yeah, That will be a nightmare.
I am thinking of recompiling my kernel. but this will cause me a lot of time waste and terrible headache. I will do my best to do this project in the future. Currently Please accept my thanks.
Max
vBulletin v3.0.1, Copyright ©2000-2006, Jelsoft Enterprises Ltd.