LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-19-2009, 03:05 AM   #1
B-Boy
Member
 
Registered: Jan 2008
Posts: 103

Rep: Reputation: 15
make rpm from source


Hi guys

I would like to know how do I make and rpm from source. I have downloaded the source for an app (X3270) and I want to make an rpm. The reqson for this is the x3270 that comes from suse does not support SSL only the latest one supports this and I cannot find an rpm.
 
Old 03-19-2009, 03:42 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
In short: first of all note you do not need to build the package as root account user. Just set up an unprivileged user with a build environment. Next find the .src.rpm for the latest SuSE release of X3270. Download the latest CVS, SVN or tarball of X3270. Explode the .src.rpm (rpm2cpio piped through cpio) into a temp dir. See if it builds (build requirements like dev libs) OK. Unpack the current source if necessary, configure and see if it builds OK as well. Copy .src.rpm .spec file, changing version, release, build deps then try to build the RPM from that. See how far you can get on your own and post details if it errors out or more specific questions if unclear.
 
Old 03-19-2009, 12:50 PM   #3
anurag_bhd
Member
 
Registered: Nov 2006
Location: Jalandhar, India
Distribution: openSuSE 11.0, Granular 1.0, Mandriva One 2009, Fedora 11
Posts: 60

Rep: Reputation: 18
And if you cannot find a SRPM (src.rpm) for the package that you want to build or you want to make RPM direct from source (and not from SRPM), try looking for other solutions like:
1. Manually writing the spec file for the source package and the compiling it to create RPM.
2. Use checkinstall if solution 1 seems too advanced. checkinstall will ease the task of creating the spec file.
3. Try using the openSuSE build service.
 
Old 03-19-2009, 01:40 PM   #4
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,363

Rep: Reputation: 172Reputation: 172
I will second unSpawn on this one. Using the spec file from the latest released version(src.rpm) of what you are trying to build will save you a ton of time and headaches. Varying from distro to distro there are often tiny little details that need to be taken care of in order to be able to run a partiuclar app on that particular distro. There are often patches contained within the src rpm to handle some of those issues. While the spec file and the patches from the prior release of the package may not apply 100% to the new release, it often does. When it does not, it usually is about 90% of the way there. A simple thing to watch for is that the old source and the new source are tarred the same way. I cannot tell you how many times the old source was a tar file while the new source was a tar.gz file has hung me up for a half hour (you just change the label in the spec file).
 
Old 03-20-2009, 12:20 AM   #5
B-Boy
Member
 
Registered: Jan 2008
Posts: 103

Original Poster
Rep: Reputation: 15
thanks guy this really helped for my problem. what I done was I got the SRPM fro opensuse and I just need to add on line in the spec file..built the RPM and whala it worked like a charm


Thanks again
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Downloaded Wireshark source code and while make rpm got this error, kindly help pkhera_2001 Linux - Newbie 1 03-20-2008 08:09 AM
installed apache from source, didn't remove rpm, updated rpm causes problems leftPeg Linux - Newbie 5 06-06-2007 09:20 PM
how do I make a binary rpm from a source rpm darkone66669 Linux - Software 3 01-11-2005 10:42 AM
how to make rpm package from source tarball? demmylls Linux - General 2 03-10-2004 11:31 AM
binary vs source RPM (and other RPM questions) calimer Linux - Software 4 06-22-2003 12:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:40 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration