Bug 8250 - rpm wrongly 'detects' required libraries
rpm wrongly 'detects' required libraries
Status: CLOSED WONTFIX
Product: Red Hat Linux
Classification: Retired
Component: rpm-build (Show other bugs)
6.1
All Linux
medium Severity high
: ---
: ---
Assigned To: Jeff Johnson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-01-06 20:40 EST by Dag Wieers
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-05-22 14:17:50 EDT
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 Dag Wieers 2000-01-06 20:40:58 EST
rpm shouldn't include the libraries that are defined in /etc/ld.so.preload
to it Requires:-data. (The same is true for libraries defined in the
environment-variable LD_PRELOAD)

the problem arises eg. when i socksify my system, which means i add

libdl.so
libdsocks.so

to /etc/ld.so.preload, after socksifying all my rpm's build on that machine
requires these libraries, which is not (necessarily) true. But in my case
all my builds fail to work on other machines. Which is a major annoyance.

Thanks in advance,
Comment 1 Jeff Johnson 2000-01-07 14:51:59 EST
This is a problem with your build system environment, rather than a problem with
rpm. Rpm currently does *nothing* to fix and/or clean the build environment
while running scripts to accomplish a build, the idea being that the builder
has a much better understanding of the build system's needs than rpm could
ever hope to implement.

If you simply need a work around, try the following:

1) Get the currently generated dependencies of your package:
	rpm -qp --requires <your_package>

2) Turn off the auto-generation of requirements by adding to yout spec file:
	AutoReq: off

3) Manually add the requirements from 1) to your spec file:
	Requires: ...
Comment 2 Jeff Johnson 2001-07-29 11:49:25 EDT
I still think that managing the build system configuration is
outside the scope of rpm.

However, you can filter autogenerated dependencies by overriding
the /usr/lib/rpm/find-requires script, and using sed to remove undesired
dependencies as in the following script
	#!/bin/sh
	/usr/lib/rpm/find-requires | sed -s 's/libfoo.so.[0-9]*//'
Put the script someplace like /etc/rpm/find-requires, make executable, and
configure your build system
	echo "%__find_requires /etc/rpm/find-requires" >> /etc/rpm/macros

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