linux poison RSS
linux poison Email

How To create RPM from Source

This is for the Redhat, SuSE and CentOS user out there. Sometimes when you try to search for rpm packages, the only thing that you find is the source file. You create rpm file using this source file:

1. save the source file(usually in tar.gz or tar.bz2 format)
2. extract the files-> tar -xvzf filename.tar.gz or tar -xvjf filename.tar.bz2
3. open the folder of the extracted file and find .spec file
4. type-> rpmbuild -bb filename.spec
5. see the error and continue according to the error until you finish creating rpm files
6. type-> rpm -Uvh filename.rpm to install


4 comments:

Anonymous said...

Hello:

If you want more information about building RPM, this is the guide: Maximun RPM: http://www.rpm.org/max-rpm/

Greetings.

Gustavo Eli
http://www.yanalte.com/gustavoeli/blog

Felipe said...

this article doesn't explain what to do with source files that DO NOT contain spec file.

DevOps said...

Thanks Felipe,

If you know how to do this what you are telling, please let me know, I will add it to this post.

Thanks,
Nikesh

Jankarlitos said...

I haven't seen the first tarball with a .spec on it. This is because the source code is general-purpouse, and .spec is only meant for red hat distributions. You might want to rename this to "HOW TO CREATE RPM FROM SRC.RPM".

Post a Comment

Related Posts with Thumbnails