-   Linux - Newbie (
-   -   Please Demystify .src.rpm files (

koodoo 05-01-2005 12:04 AM

Please Demystify .src.rpm files

Now it seems very silly to ask such a simple question but I really don't know what to do with

the .src.rpm files for a package. :confused:

Now what I know is that these are the source files of the package and would get us rid of many dependencies as we will compile these on our system instead of the rpm's which are compiled on some default system.

I also know that we could use these .src.rpm files to build rpm's on our own system.

Also that we could get the tarballs of the package if I extract them.

But the information is in bits and pieces and I am not very clear of the concepts.So I am reading "Maximum RPM" :study: to understand in detail about the Red-Hat Package Management System. Now this would obviously take time which at present I do not have.I have to install a few files that are the .src.rpm files.

I can easily install from the rpm's and the tarballs but have no idea about the .src.rpm files. I mean this file is just in front of me which I want to install but I can't do anything :scratch:

So, please could anyone give a short tutorial on installing from these source files.
I'll continue reading "Maximum RPM".

Thanx in anticipation,

Please Help.

Kdr Kane 05-01-2005 12:29 AM

The .rpm part just means that you can install the sources for the program with your RPM installer.

.src just indicates that they are source files.

This doesn't mean that you use the RPM package manager to compile the source files. Usually, you change into the source directory and run:

make ./configure
make install

You might consider finding the correct RPMs (not the source files) that contain the binaries for your distribution.

detpenguin 05-01-2005 12:51 AM

download the src.rpm file

as root, in a terminal, type
rpm -ivh <packagenamehere>.src.rpm

this will place sources in your /usr/src/SOURCES file and a spec file in your /usr/src/SPECS file.

cd into the /usr/src/SPECS file and type:
rpmbuild -bb <packagenamehere>.spec

and this will create an rpm file in your /usr/src/RPMS/i386 can install it from there using

rpm -ivh <packagenamehere>.rpm

koodoo 05-01-2005 05:44 AM


Thanx for the great!!! help detpenguin

The method you mentioned works flawlessly and in no time I have installed many .src.rpms :)

Only difference was that on my system the SOURCES, SPECS, RPMS etc directories were under /usr/src/redhat/

Thanx Kdr Kane now I know how to get the tarballs from the .src.rpms. So now I can also install packages in the usual way (i.e. using the tarrballs) :)

Thanx a lot again detpenguin and Kdr Kane you've been a great help.

Thanx everyone.


reddazz 05-01-2005 08:29 AM

You can rebuild source rpms without installing them. As root you would do,


#rpmbuild --rebuild file.src.rpm

koodoo 05-01-2005 05:44 PM

Thanx for the help reddazz

All times are GMT -5. The time now is 12:14 AM.