Re: New to RPMs - Dependencies in my own rpm

Jeff Johnson <[email protected]> Sun, 27 Jan 2008 14:01:26 -0500
Newsgroups gmane.linux.redhat.rpm.general
Message-ID <[email protected]>
On Jan 27, 2008, at 11:02 AM, Linux wrote:

> I am attempting to create an RPM with a binary and a dependent  
> shared library.
>
> %files
> /mypath/bin
> /mypath/lib
>
> In the bin directory, is my program:
> myprog
>
> In the library, is my library plus links to the library
> mylib.so.2.1.1 (actually library)
> mylib.so (link to the library)
>
> When I try to install the rpm, it says that mylib.so is required by  
> the rpm to install, but it is in the rpm.
>
> If I querry the package to see what it provides, it provides
> mylib.so.2.1.1
>
> But the link is what is "needed" by the package. How do I get the  
> rpm to know that it also provides the link? Or am I linking the  
> executable incorrectly?
>

The very simplest answer is just add
     Provides: mylib.so
to the spec file, build, and see whether the installed package "works".

Usually the DT_SONAME (run readelf -a on the library) is what is  
"provided"
for the DT_NEEDED (run readelf -a on the executable) for the  
"required" symbol.

The soname used is usually mylib.so.2.1.1 not mylib.so.

73 de Jeff

_______________________________________________
Rpm-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/rpm-list