Avoiding Requires: dependencies in rpm 4.8.0

Panu Matilainen pmatilai at laiskiainen.org
Mon Jan 7 11:29:26 UTC 2013


On 01/05/2013 06:44 PM, Mykel Alvis wrote:
> I mistakenly asked this on the rpm5 site.
>
> tl;dr version:  How do I get rpmbuild to ignore the .so in the %files tree
> and just add the .so without adding a provides or requires for it?
>
> Full text of the question below:
>
> So I'm trying to package the Endeca engine so that I can easily install it
> via RPM.  I'm pretty sure this doesn't violate any terms of service, and
> the installation is actually pretty simplistic.  You run a few shell
> scripts giving them a target directory.  It writes a few config files that
> are easily modified.  This the whole thing should be pretty transportable,
> right?
>
> First, the installation has a pile of shared libraries in it.
> libstdc++.so.6 is just one of them, but it's a consistent thorn in my side.
> Second, the installation installs its own jdk and perl binaries.  I'm sure
> it was just WAY too hard for the endeca developers to write something with
> compatibility checks built in, but that's another story.
>
> The real problem I have is that when I package the various pieces, rpmbuild
> produces something that looks like this:
>
> Processing files: endeca-mdex-6.4.0-1.el6.x86_64
> Provides: libclntshcore.so.12.1()(64bit) libcrypto.so.1.0.0()(64bit)
> libcurl.so.4()(64bit) libeaspell.so.15()(64bit) libexerces-c.so.27()(64bit)
> libgcc_s.so.1()(64bit) libgcc_s.so.1(GCC_3.0)(64bit)
> libgcc_s.so.1(GCC_3.3)(64bit) libgcc_s.so.1(GCC_3.3.1)(64bit)
> libgcc_s.so.1(GCC_3.4)(64bit) libgcc_s.so.1(GCC_3.4.2)(64bit)
> libgcc_s.so.1(GCC_3.4.4)(64bit) libgcc_s.so.1(GCC_4.0.0)(64bit)
> libgcc_s.so.1(GCC_4.2.0)(64bit) libgcc_s.so.1(GCC_4.3.0)(64bit)
> libicudata.so.42()(64bit) libicui18n.so.42()(64bit) libicuuc.so.42()(64bit)
> libimf.so()(64bit) libintlc.so.5()(64bit) libirc.so()(64bit)
> libolt.so()(64bit) libolt_c.so()(64bit) libolt_j.so()(64bit)
> libssl.so.1.0.0()(64bit) libstdc++.so.6()(64bit)
> libstdc++.so.6(CXXABI_1.3)(64bit) libstdc++.so.6(CXXABI_1.3.1)(64bit)
> libstdc++.so.6(CXXABI_1.3.2)(64bit) libstdc++.so.6(CXXABI_1.3.3)(64bit)
> libstdc++.so.6(CXXABI_1.3.4)(64bit) libstdc++.so.6(GLIBCXX_3.4)(64bit)
> libstdc++.so.6(GLIBCXX_3.4.1)(64bit) libstdc++.so.6(GLIBCXX_3.4.10)(64bit)
> libstdc++.so.6(GLIBCXX_3.4.11)(64bit) libstdc++.so.6(GLIBCXX_3.4.12)(64bit)
> libstdc++.so.6(GLIBCXX_3.4.13)(64bit) libstdc++.so.6(GLIBCXX_3.4.14)(64bit)
> libstdc++.so.6(GLIBCXX_3.4.2)(64bit) libstdc++.so.6(GLIBCXX_3.4.3)(64bit)
> libstdc++.so.6(GLIBCXX_3.4.4)(64bit) libstdc++.so.6(GLIBCXX_3.4.5)(64bit)
> libstdc++.so.6(GLIBCXX_3.4.6)(64bit) libstdc++.so.6(GLIBCXX_3.4.7)(64bit)
> libstdc++.so.6(GLIBCXX_3.4.8)(64bit) libstdc++.so.6(GLIBCXX_3.4.9)(64bit)
> Requires(interp): /bin/sh /bin/sh /bin/sh /bin/sh
> Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1
> rpmlib(PayloadFilesHavePrefix) <= 4.0-1
> Requires(pre): /bin/sh
> Requires(post): /bin/sh
> Requires(preun): /bin/sh
> Requires(postun): /bin/sh
> Requires: /bin/bash ld-linux-x86-64.so.2()(64bit)
> ld-linux-x86-64.so.2(GLIBC_2.3)(64bit) libaio.so.1()(64bit)
> libc.so.6()(64bit) libc.so.6(GLIBC_2.2.5)(64bit)
> libc.so.6(GLIBC_2.3)(64bit) libc.so.6(GLIBC_2.3.2)(64bit)
> libc.so.6(GLIBC_2.3.4)(64bit) libclntshcore.so.12.1()(64bit)
> libcrypto.so.1.0.0()(64bit) libcurl.so.4()(64bit) libdl.so.2()(64bit)
> libdl.so.2(GLIBC_2.2.5)(64bit) libeaspell.so.15()(64bit)
> libexerces-c.so.27()(64bit) libgcc_s.so.1()(64bit)
> libgcc_s.so.1(GCC_3.0)(64bit) libgcc_s.so.1(GCC_3.3)(64bit)
> libgcc_s.so.1(GCC_4.2.0)(64bit) libicudata.so.42()(64bit)
> libicui18n.so.42()(64bit) libicuuc.so.42()(64bit) libimf.so()(64bit)
> libintlc.so.5()(64bit) libirc.so()(64bit) libm.so.6()(64bit)
> libm.so.6(GLIBC_2.2.5)(64bit) libncurses.so.5()(64bit) libnsl.so.1()(64bit)
> libolt.so()(64bit) libolt_c.so()(64bit) libolt_j.so()(64bit)
> libpthread.so.0()(64bit) libpthread.so.0(GLIBC_2.2.5)(64bit)
> libpthread.so.0(GLIBC_2.3.2)(64bit) librt.so.1()(64bit)
> libssl.so.1.0.0()(64bit) libstdc++.so.6()(64bit)
> libstdc++.so.6(CXXABI_1.3)(64bit) libstdc++.so.6(CXXABI_1.3.1)(64bit)
> libstdc++.so.6(CXXABI_1.3.2)(64bit) libstdc++.so.6(GLIBCXX_3.4)(64bit)
> libstdc++.so.6(GLIBCXX_3.4.11)(64bit) libstdc++.so.6(GLIBCXX_3.4.14)(64bit)
> libstdc++.so.6(GLIBCXX_3.4.9)(64bit) rtld(GNU_HASH)
>
>
> The top of my spec file has the following
> ---- snip ----
>
> %global __libtool_requires      %{nil}
> %global __libtool_provides      %{nil}

> %global __perl_requires %{nil}
> %global __perl_provides %{nil}

These apply to the internal dependency generator, but only for files 
classified as libtool and perl. Not shared libraries.

>
> %define __find_requires %{nil}
> %define __find_provides %{nil}

...and these only apply to the external dependency generator (which is 
the thing enabled by the _use_internal_dependency_generator trick). 
Instead of disabling everything you might want to do more fine-grained 
filtering by eg calling the default find-requires/provides scripts from 
your own wrapper script that weeds out the unwanted parts.

>
> Autoreq: 0
> Autoprov: 0

These work both with the internal and external dependency generator, but 
note that these are per-package, not spec global. As your package seems 
to have (many) sub-packages, you'd need to separately disable autoreq 
and/or autoprov for each.

	- Panu -


More information about the Rpm-list mailing list