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,
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: ...
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