[CentOS] Rpmbuild and how to disable automatic dependency list
fred at derf.nl
Mon Sep 29 12:43:11 UTC 2008
When I build RPM packages, rpmbuild always scans all the executables,
shared libs, perl scripts, etc. to find out which external libraries
the application depends on. This is normally a Good Thing but I am
currently packaging an in-house, self contained application.
I could almost use a tarball but an RPM provides better manageability
and also allows post-installation tasks. All shared libraries are
under a single prefix, which is not in the system-wide ld.so.conf - it
is configured in the startup script of the application. However,
rpmbuild finds all these dependencies and adds them to the list of
"Requires", which is not desirable in this case.
My question therefore is - how can I tell rpmbuild to stop
automatically creating a dependency list? The best I can come up with
at the moment is to add the following to my ~/.rpmmacros (line numbers
added by me):
 %__os_install_post /usr/lib/rpm/brp-strip-comment-note
 %__find_requires /bin/true
 %__perl_requires /bin/true
 - Stop it stripping already stripped binaries.
 and  - This stops it doing the automatic dependency list creation.
This seems a bit heavy handed though, is there another, cleaner way to do it?
More information about the CentOS