Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 8250 - rpm wrongly 'detects' required libraries
rpm wrongly 'detects' required libraries
Product: Red Hat Linux
Classification: Retired
Component: rpm-build (Show other bugs)
All Linux
medium Severity high
: ---
: ---
Assigned To: Jeff Johnson
Depends On:
  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:
Last Closed: 2001-05-22 14:17:50 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
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


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
	/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.