Solved

Building/Making a RPM

Posted on 2006-11-04
3
287 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

760 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

22 Experts available now in Live!

Get 1:1 Help Now