Solved

Building/Making a RPM

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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Suggested Solutions

rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
Fine Tune your automatic Updates for Ubuntu / Debian
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…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

749 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