Bug 89910 - rpm-4.1 findprovides problem - leading "/" in in Requires: path
rpm-4.1 findprovides problem - leading "/" in in Requires: path
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: rpm-build (Show other bugs)
8.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
Mike McLean
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-04-29 13:22 EDT by R P Herrold
Modified: 2007-04-18 12:53 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-02-23 11:41:42 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description R P Herrold 2003-04-29 13:22:43 EDT
reported, but not filed -- entered for a fix and for future poor souls bit by it

 RPM provides/requires strangeness

On Tue, Apr 29, 2003 at 09:50:25AM +0200, Jos Vos wrote:
> Hi,
>
> When packaging a commercial package (which is left as an exercise
> to the reader ;-)) at a customer site, I see that rpm generates a
> "provide" dependency for these three things:
>
>
/net/tw-serv/view/bld-v5.012/vobs/unix_notes/notes_linux/bin/linux/bin/libhttpsr
v.so(GCC.INTERNAL)
>
/net/tw-serv/view/bld-v5.012/vobs/unix_notes/notes_linux/bin/linux/bin/libhttpsr
v.so(noteslib_v1.00)
> libhttpsrv.so
>
readelf -Wa library.so.x and 

objdump -p library.so.x

allow inspection of what findprovides is seeing.

It turns out
    That is because the shared library was linked without the
    -Wl,-soname,libhttpsrv.so  options

workaround is:

Yup, that's what is extracted by rpm.

Your easiest fix is to whack out the string with sed by writing a
wrapper script
        #!/bin/sh
        /usr/lib/rpm/find-provides | sed -e
s,/net/tw-serv/view/bld-v5.012/vobs/unix_notes/notes_linux/bin/linux/bin/,,

Add script to some SourceN: tag, then add
        %define __find_provides %SOURCEN
(changing N appropriately).

There's a slightly different dance if building with rpm-4.2, you'll need
to disable internal dependency generation as well by adding
        %define _use_internal_dependency_generator 0

73 de Jeff


and needed fix for 4.1 is:

On Tue, Apr 29, 2003 at 03:42:14PM +0200, Jos Vos wrote:
> > > Attached both outputs.  You'll find the /net/... thing back there ;-).
> >
> > That is because the shared library was linked without
> > -Wl,-soname,libhttpsrv.so
>
> Wouldn't it be a good idea to strip by default anything up to the
> last '/' from all provided items in find-provides?

Probably, but that ain't going to get you a fix today ;-)

FWIW, find-provides is already dead, rpm-4.2 (and all of Red Hat 9)
were built generating dependencies internally.

All with the correct -Wl,-soname,libfoo.so, mind you ;-)
Comment 1 R P Herrold 2005-02-23 11:41:42 EST
more than six months old - long since overtaken by events - closing; please
reopen if appropriate

Note You need to log in before you can comment on or make changes to this bug.