LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 01-10-2005, 03:43 PM   #1
Icarus315
LQ Newbie
 
Registered: Oct 2003
Location: Alberta, Canada
Distribution: SuSE 9.2
Posts: 16

Rep: Reputation: 0
Converting source archives to binary RPM's


Could someone more learned with Linux than I please post some newbie-friendly instructions for all the newbies like myself?
Specif icily how do you create an rpm from source, the best places to find dependency packages that always crop up, and how to safely and properly uninstall rpm's.
I'm using SuSE 9.2 but rpm seems to be ubiquitous across distributions so I believe that the instructions shouldn't vary.
That is all.
Thanks in advance.
 
Old 01-10-2005, 04:13 PM   #2
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
Does this help:

http://wings.buffalo.edu/computing/u...HOWTO-rpm.html
 
Old 01-10-2005, 04:18 PM   #3
Icarus315
LQ Newbie
 
Registered: Oct 2003
Location: Alberta, Canada
Distribution: SuSE 9.2
Posts: 16

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by bulliver
Does this help:

http://wings.buffalo.edu/computing/u...HOWTO-rpm.html
The spec file they mention, is that part of all source archives or is the created by ./configure?
 
Old 01-10-2005, 04:41 PM   #4
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
A spec file may be included by the package's authors or you may have to create one yourself. I have onnly built rpms on Fedora Core, and they have a spec file template that you can easily reconfigure to meet your needs. To check dependencies, I usually watch the configure process either by compiling the source package manually or by watching rpm trying to build the rpm from the spec file I've made. Suse has some rpm building tools to help people build rpms for their distro but unfortunately I can't remember what the packages are called. Take a look at rpm.org, you may find some useful information there.
 
Old 01-10-2005, 04:41 PM   #5
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
Quote:
The spec file they mention, is that part of all source archives or is the created by ./configure?
No, it's created by _you_, ie: the guy who wants to turn a source package into an RPM. Maybe I don't understand what you are asking for...
 
Old 01-10-2005, 07:49 PM   #6
megaspaz
Senior Member
 
Registered: Nov 2002
Location: Silly Con Valley
Distribution: Red Hat 7.3, Red Hat 9.0
Posts: 2,054

Rep: Reputation: 46
assuming you have a working compiler and the version of rpm and/or rpm tools being used, try:

rpm -ta filename.tar.gz

or

rpmbuild -ta filename.tar.gz

find the created rpms somewhere in /usr/src

*redhat will create rpms in /usr/src/redhat/RPMS/i386
 
Old 01-10-2005, 09:46 PM   #7
Icarus315
LQ Newbie
 
Registered: Oct 2003
Location: Alberta, Canada
Distribution: SuSE 9.2
Posts: 16

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by megaspaz
assuming you have a working compiler and the version of rpm and/or rpm tools being used, try:

rpm -ta filename.tar.gz

...[snip]...

*redhat will create rpms in /usr/src/redhat/RPMS/i386
from having source rpms, what is the next step - making them into binary rpms? Thanks.
 
Old 01-11-2005, 12:32 AM   #8
megaspaz
Senior Member
 
Registered: Nov 2002
Location: Silly Con Valley
Distribution: Red Hat 7.3, Red Hat 9.0
Posts: 2,054

Rep: Reputation: 46
Quote:
Originally posted by Icarus315
from having source rpms, what is the next step - making them into binary rpms? Thanks.
huh?

rpm -ta filename.tar.gz

or

rpmbuild -ta filename.tar.gz

will build binary rpms from a tarball (as well as source rpms) provided the tarball has a spec file. in redhat, rpms get generated in /usr/src/redhat/RPMS/i386 and srpms will get generated in /usr/src/redhat/SRPMS
 
Old 01-11-2005, 03:21 AM   #9
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
For everything you could ever want to know about rpm, go to the RedHat website, and search for Max-rpm. It's their book about rpm: what it is, what it does, how to build a source tree, how to write a spec file, etc.
 
Old 01-11-2005, 06:00 AM   #10
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
rpm.org has all the info you need. To rebuild a source rpm (.srpm). You do,

#rpmbuild --rebuild package.srpm

Mandrake tips for building rpms are available here. Fedora's guide is here.
 
Old 01-11-2005, 09:31 AM   #11
bones996
Member
 
Registered: Sep 2003
Location: Pennsylvania
Distribution: Debian Squeeze
Posts: 106

Rep: Reputation: 15
I like to use the program checkinstall to build rpms from source packages. It works quite well on my SuSe & Red Hat boxes both. As for dependencies & such I have installed apt on my boxes to avoid rpm hell .

Last edited by bones996; 01-11-2005 at 09:33 AM.
 
  


Reply



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
gnome-calculator - converting between numeric bases (eg hex to binary) jht2k Linux - General 2 07-01-2005 09:12 AM
Are source RPM's and binary RPM's installed the same way? Simon Adebisi Linux - Software 3 06-28-2005 03:45 AM
Converting ASCII to Binary? Darx Linux - Software 0 04-08-2004 10:43 AM
Source RPM's GtkUser Linux - Software 3 04-02-2003 03:57 PM
How to install source rpm's? concoran Linux - Newbie 3 11-13-2001 02:03 PM

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

All times are GMT -5. The time now is 06:43 PM.

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