The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > Linux
Google UNIX.COM


Linux RedHat, Ubuntu, SUSE, Fedora, Debian, Mandriva, Slackware, Gentoo linux, PCLinuxOS. All Linux questions here!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Improving Policy Verification Capabilities of Trusted Platforms iBot UNIX and Linux RSS News 0 06-23-2008 02:20 AM
Levanta 6.0 Brings Sophisticated Automation Capabilities to Linux ... - Business Wire iBot UNIX and Linux RSS News 0 10-02-2007 06:30 AM
p570 Capabilities KeesH UNIX for Advanced & Expert Users 1 10-01-2007 01:33 AM
Restoration of Multimedia Capabilities in Red Hat Linux 9 Jawwad Linux 5 12-09-2003 09:53 PM
Unix Capabilities? hoz UNIX for Dummies Questions & Answers 2 09-09-2003 11:44 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 07-28-2008
Registered User
 

Join Date: Jul 2008
Posts: 4
Adding capabilities to an RPM

Hi.
I downloaded a package that could only be installed on RHEL5, and not 4 or 3, so I got the source in order to compile it on RHEL 3 so hopefully it will work on all versions.

So I have the source for a working package, but when I build it in RHEL 3 and then try to install it in RHEL 5, it has a dependency, let's call it libX.so.5. I'm trying to add this capability to the package so I can recompile it and then use it on RHEL 3 4 and 5 without dependencies. However, I have no experience with building RPMs.

I've tried adding /usr/lib/libX.so.5 to the files list in the spec file, but it doesn't seem to have removed the dependency.

Anyone know how I can do this? Basically, I'm trying to add a file/capability to a package so that it's no longer a seperate dependency.

More information: The package also had a subpackage that, to build, required too high a version of python, so i deleted the subpackage's spec file and directory. This is information in case that may have broken something.

Thanks!
Boaz
Reply With Quote
Forum Sponsor
  #2  
Old 07-29-2008
Registered User
 

Join Date: May 2008
Posts: 75
This is a danger in using rpms not specifically meant for your distribution. The other option is to see if you can extract that file from the RPM that provides it, put it into /usr/lib and seeing if that will allow it to complete.

An alternative, though not any safer, is to find any file such as:
/usr/lib/libX.so.3 and create a symbolic link to /usr/lib/libX.so.5

This can break things.
Reply With Quote
  #3  
Old 07-29-2008
Registered User
 

Join Date: Jul 2008
Posts: 4
But isn't there a way to include libX.so.5 *in* the package i'm rebuilding? That way I don't have to do anything seperate when I try to install it on other systems, and it just works?
Reply With Quote
  #4  
Old 07-29-2008
era era is offline
Herder of Useless Cats
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,650
Try to use static linking instead; that will result in a bigger binary, but it will not require any external libraries.
Reply With Quote
  #5  
Old 07-30-2008
Registered User
 

Join Date: Jul 2008
Posts: 4
Quote:
Originally Posted by era View Post
Try to use static linking instead; that will result in a bigger binary, but it will not require any external libraries.
That sounds promising, though like I said I'm new to this. How do I do that?
Reply With Quote
  #6  
Old 07-30-2008
era era is offline
Herder of Useless Cats
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,650
In the trivial case, add -static to the CCFLAGS in the Makefile.

http://www.google.com/search?q=static+linking also brings up a lot of useful and interesting hits.
Reply With Quote
  #7  
Old 07-30-2008
Registered User
 

Join Date: Jul 2008
Posts: 4
So to really include the library file I want, would I have to edit the Makefile as well as the spec file?
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 08:33 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0