Building a source RPM using rpmbuild command

by on May 6, 2006 · 3 comments· Last updated December 18, 2007

Q. I need to build a source RPM, how do I build it?

A. In order to build a source RPM you need to use rpmbuild command. rpmbuild is used to build both binary and source software packages. A package consists of an archive of files and meta-data used to install and erase the archive files. The meta-data includes helper scripts, file attributes, and descriptive information about the package. Packages come in two varieties: binary packages, used to encapsulate software to be installed, and source packages, containing the source code and recipe necessary to produce binary packages.

You need to use .spec file to build the RPM file. Next type rpmbuild command as follows:

# rpmbuild -ba pakagename.spec

For more information, please refer Maximum RPM book.



You should follow me on twitter here or grab rss feed to keep track of new changes.

Featured Articles:

{ 3 comments… read them below or add one }

1 Yogesh February 28, 2010 at 1:33 pm

Whr do I find spec file?

Reply

2 Frederik March 6, 2011 at 4:28 pm

You have to make it yourself (or get someone else to make it for you).

Reply

3 Jaire August 2, 2012 at 10:54 am

If you have the .src.rpm file, just rpm -ivh .src.rpm. You’ll find the spec file in /usr/src/packages/SPEC directory after instalation.

Reply

Leave a Comment

You can use these HTML tags and attributes for your code and commands: <strong> <em> <ol> <li> <u> <ul> <blockquote> <pre> <a href="" title="">
What is 7 + 5 ?
Please leave these two fields as-is:
Solve the simple math so we know that you are a human and not a bot.




Tagged as: , , ,

Previous post:

Next post: