Adding capabilities to an RPM


 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Adding capabilities to an RPM
# 1  
Old 07-28-2008
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
# 2  
Old 07-29-2008
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.
# 3  
Old 07-29-2008
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?
# 4  
Old 07-30-2008
Try to use static linking instead; that will result in a bigger binary, but it will not require any external libraries.
# 5  
Old 07-30-2008
Quote:
Originally Posted by era
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?
# 6  
Old 07-31-2008
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.
# 7  
Old 07-31-2008
So to really include the library file I want, would I have to edit the Makefile as well as the spec file?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

RPM package, conditional adding files in "%files" section

Hello, Is it possible to specify a list of files to be included in an RPM package (section "% files") according to some condtions. For example, if a particular condition is true, do not include the file "X". If not include it. Thank you for your help. Regards (1 Reply)
Discussion started by: louzorios
1 Replies

2. AIX

Rpm issue with autoconf-2.63-1.AIX6.1.noarch.rpm

dears i am trying to install the autoconf-2.63-1.aix6.1.noarch.rpm but its shows the below error message . P700_dev/svn/dependencies>rpm -i autoconf-2.63-1.aix6.1.noarch.rpm error: failed dependencies: m4 is needed by autoconf-2.63-1 P700_dev/svn/dependencies> (6 Replies)
Discussion started by: thecobra151
6 Replies

3. UNIX for Advanced & Expert Users

Use of Capabilities

I wonder if anyone could assist with some problems I'm having with Linux Capabilities and their use when using the commands "nice" and "schedtool". I run a couple of PCs, one is an elderly AMD Sempron 2800+ (32-bit, 2GHz clock and 3GB memory) that is used as a family multimedia system running... (3 Replies)
Discussion started by: MikeGM
3 Replies

4. Shell Programming and Scripting

How to make RPM not write to RPM database if RPM fails to deploy?

How to make RPM not write to RPM database if RPM fails to deploy? IE I create an rpm spec file that contains the following if then exit 1 fi My rpm will fail at deployment, but if I do rpm -qa , I can see the rpm in the rpm db (3 Replies)
Discussion started by: 3junior
3 Replies

5. Shell Programming and Scripting

Extract RPM name from path to .rpm file

It's the end of the day and I just can't get my head around this. I'm trying to extract just the name of the RPM from the path to a .rpm file. So from: /home/me/rpm/RPMS/i386/nagios-our-plugins-1.2-6.i386.rpmI need to extract 'nagios-our-plugins'. I can't get the awk syntax right: awk '{... (5 Replies)
Discussion started by: aussieos
5 Replies

6. SuSE

How to install .src.rpm ? ( source rpm )

Hi, I have got few RPM's from rpmfind.net ( mainly gcc ). But it seems to be src files instead of the image. so I think we have to build the src files according to target machine using rpmbuild. Can any one help me with 1) Various options of rpm build that have to be taken care 2)... (3 Replies)
Discussion started by: Sivaswami
3 Replies

7. Linux

Converting source rpm to binary rpm

Hi, I need to install an rpm file,but I only have '.src.rpm' version of it. I want to convert it to a binary rpm. so I tried this rpm --rebuild somethin.src.rpm But I am gettin '--rebuild:Invalid option' as output Is there another way to rebuild source rpm.? Thanks in... (2 Replies)
Discussion started by: eamani_sun
2 Replies

8. UNIX for Advanced & Expert Users

p570 Capabilities

Hi there. I've been tasked with making a new design for our Unix systems :eek: Now the question I have is; How many LPARs can a p570 hold WITHOUT using a VIO Server. Many Thanks Kees (1 Reply)
Discussion started by: KeesH
1 Replies

9. Linux

Failed dependencies of rpm / how does RPM check for ?

Hey, I've a problem installing a package. rpm -ivh brings the errors: libjvm.so is needed by libverify.so is needed by But I have installed the Java SDK like requested and the files are on the disk. But I have no idea how to find out, why rpm cann't find them. I have also... (2 Replies)
Discussion started by: mod
2 Replies

10. UNIX for Dummies Questions & Answers

Unix Capabilities?

We are looking into buying a new software, billing software that is, and want to know if you can run that on the same UNIX server as another major software? Is there a limit to the different types of software Unix can run, or is it like windows where you can install as many as you like? ... (2 Replies)
Discussion started by: hoz
2 Replies
Login or Register to Ask a Question