LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-07-2011, 12:58 PM   #1
veeruk101
Member
 
Registered: Mar 2005
Distribution: Ubuntu 12.04 LTS
Posts: 249

Rep: Reputation: 16
How to create binary RPM from source tar?


Right now to install software from source I do a ./configure && make && make install which doesn't allow for easy uninstallation (some don't come with an 'uninstall' goal, and if they do you have to keep the source around).

I'd like to learn how to create binary RPMs from source tar.gz files (one reason being that it makes for easier uninstallation). I tried the following but it complains with the following errors:

Code:
$ rpmbuild -ta mysource.tar.gz

error: Name field must be present in package: (main package)
error: Version field must be present in package: (main package)
error: Release field must be present in package: (main package)
error: Summary field must be present in package: (main package)
error: Group field must be present in package: (main package)
error: License field must be present in package: (main package)

Apparently that's what happens when there is no SPEC file in the tarball. But all the tars I've tried give this same error. Is there a simple way to create binary RPMs from source files - as an example, this source tar http://www.tcpdump.org/release/libpcap-1.1.1.tar.gz
 
Old 06-07-2011, 01:02 PM   #2
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 3,774
Blog Entries: 1

Rep: Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339
I used this thread when I had to do this a while back:

http://www.fedoraforum.org/forum/arc...p/t-49110.html

Of course, things might have changed by now. I apologize if this turns out to be unusable.
 
Old 06-07-2011, 01:11 PM   #3
veeruk101
Member
 
Registered: Mar 2005
Distribution: Ubuntu 12.04 LTS
Posts: 249

Original Poster
Rep: Reputation: 16
In that post you linked to he has a spec file, whereas I don't. So I could create one with just fields like 'Name', 'Version', etc, but how could I take the source tar and this spec file and turn it into a binary RPM? I've tried searching all over but can't find anything about it, so hopefully someone could explain it. Thanks.

Last edited by veeruk101; 06-07-2011 at 01:22 PM.
 
Old 06-07-2011, 09:15 PM   #4
teckk
Senior Member
 
Registered: Oct 2004
Distribution: FreeBSD Arch
Posts: 1,825

Rep: Reputation: 221Reputation: 221Reputation: 221
A little bit of info.
http://tldp.org/HOWTO/RPM-HOWTO/build.html
 
Old 06-08-2011, 01:03 AM   #5
vinaytp
Member
 
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 704

Rep: Reputation: 55
Hi veeruk101,

You can also use Alien to convert source to RPM

Thanks,
 
  


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
Source rpm, binary rpm and source code mcpoon Linux - Newbie 5 06-30-2009 10:33 AM
Create ubuntu .deb from binary .tar.gz (Blender 2.41) trainpic Ubuntu 2 05-26-2006 02:12 PM
Are source RPM's and binary RPM's installed the same way? Simon Adebisi Linux - Software 3 06-28-2005 04:45 AM
how do I make a binary rpm from a source rpm darkone66669 Linux - Software 3 01-11-2005 11:42 AM
binary vs source RPM (and other RPM questions) calimer Linux - Software 4 06-22-2003 01:33 AM


All times are GMT -5. The time now is 01:21 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration