Solved

Building/Making a RPM

Posted on 2006-11-04
3
288 Views
Last Modified: 2013-12-16
Hello Experts,

Sometime back I have attended one interview in which I was asked the following question: How do you build a RPM from the source?  I couldn't understand the question, so asked. They asked, How will you make your own RPM; instead of using the standard RPM packages.  I had no clue and replied that I don't have any idea.

Now could you please tell how can I do that? Assume that I'm an intermediate in Linux.

Thanks,
Ashok
0
Comment
Question by:rdashokraj
  • 2
3 Comments
 
LVL 10

Accepted Solution

by:
ssvl earned 250 total points
ID: 17873119
The rpm pkgs are platform depedable that is  the i386 pkg is onle mached for X86 systems(intel pentium and celeron or AMD)

if we download a src.rpm then we have to build it to our systems platform



Building from a source RPM (SRPM)

Install the .src.rpm file this way:

rpm -i somepackage-1.0-1.src.rpm

This will create files in the SOURCES directory of your RPM building directory tree, and a .spec file in the SPECS directory. (mostly under /usr/src/)

Then go the SPECS directory and give the command to build the RPM:

cd /home/your_userid/rpm/SPECS
rpmbuild -bb somepackage.spec

Give the -ba option instead if you also want to build the SRPM. The binary RPM packages will typically be created in the RPMS/i386 directory (on a PC-based system).


0
 
LVL 10

Expert Comment

by:ssvl
ID: 17873132
0
 

Author Comment

by:rdashokraj
ID: 17875847
Thanks for the explanation !!
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will explain how to make squid prevent malwares in five easy steps: Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. It reduces bandwidth and improves response times by caching and reusing frequently-…
How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now