LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 10-17-2008, 06:52 AM   #1
alanhr
LQ Newbie
 
Registered: Aug 2008
Distribution: Crunchbang Waldorf, Arch
Posts: 23

Rep: Reputation: 15
Will RPM play nice with locally built packages?


Hi all,

Suppose I build library X from source and install it via make install. Suppose then that I install program Y via rpm. If program Y depends on library X, is there a way to make rpm see that I already have library X? Or am I pretty much stuck looking for a suitable rpm for library X (or packaging one up myself)?

Thanks.
 
Old 10-18-2008, 12:55 AM   #2
smbell100
Member
 
Registered: Sep 2007
Location: Shetland, UK
Distribution: Slackware, Mandrake, LFS
Posts: 59

Rep: Reputation: 16
if you look at http://perso.b2b2c.ca/sarrazip/dev/r...sh-course.html, amongst others, you will find instructions for building rpms. Most source packages that I have looked at have a spec file for building the rpm package.

There are slightly more detailed instructions at http://perso.b2b2c.ca/sarrazip/dev/r...sh-course.html.

Of course, the ultimate reference is http://www.rpm.org/max-rpm/

Hope this helps
 
Old 10-18-2008, 01:12 AM   #3
jay73
Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
Manually compiled libraries should work as well as any rpm provided alternative. However, you may occasionally need to edit one or more variables to make it work properly, especially when another library already provides the same functionality.
Anything you compile yourself is not known to the package manager, though, and takes manual removal and updating and obviously implies that you are yourself responsible for keeping track of any security issues related to the library in question .
Of course, you could also look into building your own rpm package from source if that looks inconvenient.
 
Old 10-18-2008, 05:04 AM   #4
abolishtheun
Member
 
Registered: Mar 2008
Posts: 183

Rep: Reputation: 31
obviously its best to build a proper rpm for the dependency, but if you're in a hurry, you can always edit the spec file (that is, if you can get the SRPM for the package).
1) install rpmbuild
2) do an rpm2cpio foo.src.rpm |cpio -id
3) remove the BuildRequires line for the dependency lib
3) copy the spec to /usr/src/redhat/SPECS, the tar to /usr/src/redhat/SOURCES
4) change to /usr/src/redhat
5) run rpmbuild -bb SPECS/foo.spec
6) install the new rpm in /usr/src/redhat/RPMS
 
Old 10-20-2008, 03:04 AM   #5
alanhr
LQ Newbie
 
Registered: Aug 2008
Distribution: Crunchbang Waldorf, Arch
Posts: 23

Original Poster
Rep: Reputation: 15
Excellent! Thank you all for the helpful tips! I will look into packaging my own rpms for locally compiled software. It looks like it might be a fairly involved process, though, so for the short term I might just have to live with side-by-side installations of multiple version of a few things. No big deal, as long as the number of those remains manageable....
 
Old 10-20-2008, 05:27 AM   #6
abolishtheun
Member
 
Registered: Mar 2008
Posts: 183

Rep: Reputation: 31
building rpms can be either trivial or excruciating. Usually, if the package uses automake/autoconf/etc, the spec file can be trivial and its worth building the package... on the other hand if the package uses hard coded directories, custom/buggy build scripts, etc, its best to install from source.
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Locally provided packages iotc247 Debian 1 06-11-2006 06:41 AM
Gentoo 2006 livecd installed,how do i emerge packages locally deepclutch Linux - Newbie 3 04-18-2006 09:39 AM
Does DELL play nice with SuSE ccin1492 Suse/Novell 10 04-16-2006 08:05 PM
X11R6.9.0 Won't Play Nice pkozub Linux - Software 2 01-21-2006 11:45 PM
built kernel locally...need to install to a remote machine. how? ARCHIGAMER Linux - General 1 04-10-2005 02:52 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration