-   Linux - Newbie (
-   -   Source rpm, binary rpm and source code (

mcpoon 06-29-2009 10:57 PM

Source rpm, binary rpm and source code
I am new to rpm thus I need some here. I have a src.rpm file and I have installed it using below command
rpm -ivh file.src.rpm
Then I found try to build the rpm file which is under root/BUILD/SPEC
rpmbuild -bb file.spec
After it is execute, a list of output is printed out and nothing changes in that directory thereafter.
Can someone help to explain how the source rpm or binary rpm work, where I can find the source code for the package and how the software or program will work with the source rpm?
Thank you.

chrism01 06-29-2009 10:58 PM

Can I ask why you are using src rpms?

billymayday 06-29-2009 11:03 PM

Source RPMS are used to build binary rpms. They are effectively uncompiled source code in a particular format. Binary rpms are compiled packages that are platform specific, so an i386 binary is different from an x86_64 binary that is built for a 64 bit system.

Where you get stuff depend on what you want to get.

mcpoon 06-29-2009 11:03 PM

I need to install a program and src.rpm is what I found.

billymayday 06-29-2009 11:08 PM

What is in root/BUILD/RPMS ?

doncrawley 06-30-2009 09:33 AM

Installing new software
Since you're a newbie, I would strongly encourage you to use yum (Yellowdog Updater Modified) instead of trying to compile from source. yum will take care of dependencies for you and manage your software for you. Assuming you're using a Red Hat-based distro such as Red Hat, Fedora, or CentOS, yum is far and away the easiest software installation and management tool.

The yum utility is included with RHEL/Fedora/CentOS for the management of software. It is an interactive, automated system for maintaining systems using RPM. It allows you to install, update, and remove software on your computer running the RHEL/Fedora operating system. yum is a command-line utility which requires a network connection to a yum server, either locally or on the public Internet.

Using yum
  • yum y update will update all packages on your system. The y option will answer yes to all prompts such as confirmation that you want to install or update a particular package. (Use with care!)
  • yum y update [package name] will update only the specified package on your system. Yum resolves all dependencies during the update process.
  • yum y install [package name] will install the specified package on your system. Yum resolves all dependencies during the installation process.
  • yum check-update does what the name implies; it checks your machine to see if any updates need to be applied.
  • yum search [text string] will search for any packages matching the string in the description, summary, packager, and package name fields in the rpm.
  • yum deplist displays a list of all dependencies and the packages that provide those dependencies.
There are many other options available with yum. See the yum man page for details.

Adding additional yum repositories

Often, you may want to add more software sources, known as repositories. A repo that is commonly added is rpmforge. A good guide for that is here..

All times are GMT -5. The time now is 02:11 PM.