On Jan 4, 2013, at 8:42 PM, Mykel Alvis <alvis.my...@gmail.com> wrote:

> 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?
> 

(aside)
You haven't identified what RPM you are using: the following is
relevant to @rpm5.org.

There's any number of ways to remove dependencies. There is also no
reason to think that the dependencies aren't necessary but …

RPM generates Requires: dependency only for executable files.

So add to %install at end
        chmod -x %{buildroot}/path/to/somewhere/libfoo.so
and rpmbuild will not attempt to generate Requires:.

You can also do any of the following:
        1) add all the missing dependencies as Provides:
        2) add the missing dependencies to /etc/rpm/sysinfo/Providename
        3) filter the dependencies being generated
        4) build another package that has the Provides:

I recommend "chmod -x …" as simplest: ymmv.

> 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 __os_install_post %{nil}
> %global __perl_requires %{nil}
> %global __perl_provides %{nil}
> 
> 
> %define __find_requires %{nil}
> %define __find_provides %{nil}
> 
> Autoreq: 0
> Autoprov: 0
> 

Ick: Get rid of all this crapola: just "chmod -x" to disable dependency
generation on a per-file basis.

> # %{target} is NOT like a prefix.  You can't relocate these packages except 
> at RPM build time
> %define         target          /opt
> 
> 
> ---- snip ----
> 
> Here's my question:  
> How do I get rpmbuild to just package the files without processing the .so 
> dependencies and requirements?  I KNOW that the packaging will work, because 
> I've done the copy by hand.  I know I don't need anything else when I 
> install.  But when I do a
> yum localinstall endenca*
> I get 
> Examining endeca-platformservices-6.1.3-1.el6.x86_64.rpm: 
> endeca-platformservices-6.1.3-1.el6.x86_64
> Marking endeca-platformservices-6.1.3-1.el6.x86_64.rpm to be installed
> Examining endeca-presentationapi-6.4.0-1.el6.x86_64.rpm: 
> endeca-presentationapi-6.4.0-1.el6.x86_64
> Marking endeca-presentationapi-6.4.0-1.el6.x86_64.rpm to be installed
> Examining endeca-toolsandframeworks-3.1.1-1.el6.x86_64.rpm: 
> endeca-toolsandframeworks-3.1.1-1.el6.x86_64
> Marking endeca-toolsandframeworks-3.1.1-1.el6.x86_64.rpm to be installed
> Resolving Dependencies
> --> Running transaction check
> ---> Package endeca-mdex.x86_64 0:6.4.0-1.el6 will be installed
> ---> Package endeca-platformservices.x86_64 0:6.1.3-1.el6 will be installed
> --> Processing Dependency: 
> /export/home/packaging/Work/RPM/BUILDROOT/endeca-1.0.0-1.el6.x86_64/opt/endeca/PlatformServices/6.1.3/perl/bin/perl
>  for package: endeca-platformservices-6.1.3-1.el6.x86_64
> --> Processing Dependency: /usr/local/bin/perl for package: 
> endeca-platformservices-6.1.3-1.el6.x86_64
> --> Processing Dependency: /usr/local/perl-5.8.3/bin/perl for package: 
> endeca-platformservices-6.1.3-1.el6.x86_64
> --> Processing Dependency: endeca-mdex=6.4.0 for package: 
> endeca-platformservices-6.1.3-1.el6.x86_64
> --> Processing Dependency: ld-linux.so.2 for package: 
> endeca-platformservices-6.1.3-1.el6.x86_64
> --> Processing Dependency: ld-linux.so.2(GLIBC_2.3) for package: 
> endeca-platformservices-6.1.3-1.el6.x86_64
> --> Processing Dependency: libc.so.6 for package: 
> endeca-platformservices-6.1.3-1.el6.x86_64
> --> Processing Dependency: libc.so.6(GLIBC_2.0) for package: 
> endeca-platformservices-6.1.3-1.el6.x86_64
> --> Processing Dependency: libc.so.6(GLIBC_2.1) for package: 
> endeca-platformservices-6.1.3-1.el6.x86_64
> --> Processing Dependency: libc.so.6(GLIBC_2.1.2) for package: 
> endeca-platformservices-6.1.3-1.el6.x86_64
> --> Processing Dependency: libc.so.6(GLIBC_2.1.3) for package: 
> endeca-platformservices-6.1.3-1.el6.x86_64
> --> Processing Dependency: libc.so.6(GLIBC_2.2) for package: 
> endeca-platformservices-6.1.3-1.el6.x86_64
> --> Processing Dependency: libc.so.6(GLIBC_2.2.4) for package: 
> endeca-platformservices-6.1.3-1.el6.x86_64
> --> Processing Dependency: libc.so.6(GLIBC_2.3) for package: 
> endeca-platformservices-6.1.3-1.el6.x86_64
> --> Processing Dependency: libcrypt.so.1 for package: 
> endeca-platformservices-6.1.3-1.el6.x86_64
> --> Processing Dependency: libcrypt.so.1(GLIBC_2.0) for package: 
> endeca-platformservices-6.1.3-1.el6.x86_64
> --> Processing Dependency: libdb-4.1.so for package: 
> endeca-platformservices-6.1.3-1.el6.x86_64
> --> Processing Dependency: libdl.so.2 for package: 
> endeca-platformservices-6.1.3-1.el6.x86_64
> --> Processing Dependency: libdl.so.2(GLIBC_2.0) for package: 
> endeca-platformservices-6.1.3-1.el6.x86_64
> --> Processing Dependency: libdl.so.2(GLIBC_2.1) for package: 
> endeca-platformservices-6.1.3-1.el6.x86_64
> --> Processing Dependency: libgdbm.so.2 for package: 
> endeca-platformservices-6.1.3-1.el6.x86_64
> --> Processing Dependency: libm.so.6 for package: 
> endeca-platformservices-6.1.3-1.el6.x86_64
> --> Processing Dependency: libm.so.6(GLIBC_2.0) for package: 
> endeca-platformservices-6.1.3-1.el6.x86_64
> --> Processing Dependency: libnsl.so.1 for package: 
> endeca-platformservices-6.1.3-1.el6.x86_64
> --> Processing Dependency: libpthread.so.0 for package: 
> endeca-platformservices-6.1.3-1.el6.x86_64
> --> Processing Dependency: libpthread.so.0(GLIBC_2.0) for package: 
> endeca-platformservices-6.1.3-1.el6.x86_64
> --> Processing Dependency: libpthread.so.0(GLIBC_2.1) for package: 
> endeca-platformservices-6.1.3-1.el6.x86_64
> --> Processing Dependency: libsc_ch.so for package: 
> endeca-platformservices-6.1.3-1.el6.x86_64
> --> Processing Dependency: libsc_da.so for package: 
> endeca-platformservices-6.1.3-1.el6.x86_64
> --> Processing Dependency: libsc_ex.so for package: 
> endeca-platformservices-6.1.3-1.el6.x86_64
> --> Processing Dependency: libsc_fa.so for package: 
> endeca-platformservices-6.1.3-1.el6.x86_64
> --> Processing Dependency: libsc_fi.so for package: 
> endeca-platformservices-6.1.3-1.el6.x86_64
> --> Processing Dependency: libsc_fut.so for package: 
> endeca-platformservices-6.1.3-1.el6.x86_64
> --> Processing Dependency: libsc_lo.so for package: 
> endeca-platformservices-6.1.3-1.el6.x86_64
> --> Processing Dependency: libsc_ut.so for package: 
> endeca-platformservices-6.1.3-1.el6.x86_64
> --> Processing Dependency: libutil.so.1 for package: 
> endeca-platformservices-6.1.3-1.el6.x86_64
> --> Processing Dependency: libwv_core.so for package: 
> endeca-platformservices-6.1.3-1.el6.x86_64
> ---> Package endeca-presentationapi.x86_64 0:6.4.0-1.el6 will be installed
> --> Processing Dependency: endeca-mdex=6.4.0 for package: 
> endeca-presentationapi-6.4.0-1.el6.x86_64
> ---> Package endeca-toolsandframeworks.x86_64 0:3.1.1-1.el6 will be installed
> --> Processing Dependency: endeca-mdex=6.4.0 for package: 
> endeca-toolsandframeworks-3.1.1-1.el6.x86_64
> --> Processing Dependency: endeca-platformservices=6.1.3 for package: 
> endeca-toolsandframeworks-3.1.1-1.el6.x86_64
> 
> And then at the end I get 
> 
> --> Processing Dependency: /usr/local/bin/perl for package: 
> endeca-platformservices-6.1.3-1.el6.x86_64
> --> Processing Dependency: 
> /export/home/packaging/Work/RPM/BUILDROOT/endeca-1.0.0-1.el6.x86_64/opt/endeca/PlatformServices/6.1.3/perl/bin/perl
>  for package: endeca-platformservices-6.1.3-1.el6.x86_64
> --> Processing Dependency: /usr/local/perl-5.8.3/bin/perl for package: 
> endeca-platformservices-6.1.3-1.el6.x86_64
> --> Finished Dependency Resolution
> Error: Package: endeca-platformservices-6.1.3-1.el6.x86_64 
> (/endeca-platformservices-6.1.3-1.el6.x86_64)
>            Requires: libsc_ut.so
> Error: Package: endeca-platformservices-6.1.3-1.el6.x86_64 
> (/endeca-platformservices-6.1.3-1.el6.x86_64)
>            Requires: libsc_ex.so
> Error: Package: endeca-platformservices-6.1.3-1.el6.x86_64 
> (/endeca-platformservices-6.1.3-1.el6.x86_64)
>            Requires: endeca-mdex=6.4.0
> Error: Package: endeca-platformservices-6.1.3-1.el6.x86_64 
> (/endeca-platformservices-6.1.3-1.el6.x86_64)
>            Requires: libsc_ch.so
> Error: Package: endeca-presentationapi-6.4.0-1.el6.x86_64 
> (/endeca-presentationapi-6.4.0-1.el6.x86_64)
>            Requires: endeca-mdex=6.4.0
> Error: Package: endeca-platformservices-6.1.3-1.el6.x86_64 
> (/endeca-platformservices-6.1.3-1.el6.x86_64)
>            Requires: libsc_lo.so
> Error: Package: endeca-platformservices-6.1.3-1.el6.x86_64 
> (/endeca-platformservices-6.1.3-1.el6.x86_64)
>            Requires: 
> /export/home/packaging/Work/RPM/BUILDROOT/endeca-1.0.0-1.el6.x86_64/opt/endeca/PlatformServices/6.1.3/perl/bin/perl
> Error: Package: endeca-platformservices-6.1.3-1.el6.x86_64 
> (/endeca-platformservices-6.1.3-1.el6.x86_64)
>            Requires: /usr/local/bin/perl
> Error: Package: endeca-platformservices-6.1.3-1.el6.x86_64 
> (/endeca-platformservices-6.1.3-1.el6.x86_64)
>            Requires: /usr/local/perl-5.8.3/bin/perl
> Error: Package: endeca-platformservices-6.1.3-1.el6.x86_64 
> (/endeca-platformservices-6.1.3-1.el6.x86_64)
>            Requires: libdb-4.1.so
> Error: Package: endeca-toolsandframeworks-3.1.1-1.el6.x86_64 
> (/endeca-toolsandframeworks-3.1.1-1.el6.x86_64)
>            Requires: endeca-platformservices=6.1.3
> Error: Package: endeca-platformservices-6.1.3-1.el6.x86_64 
> (/endeca-platformservices-6.1.3-1.el6.x86_64)
>            Requires: libwv_core.so
> Error: Package: endeca-platformservices-6.1.3-1.el6.x86_64 
> (/endeca-platformservices-6.1.3-1.el6.x86_64)
>            Requires: libsc_fa.so
> Error: Package: endeca-toolsandframeworks-3.1.1-1.el6.x86_64 
> (/endeca-toolsandframeworks-3.1.1-1.el6.x86_64)
>            Requires: endeca-mdex=6.4.0
> Error: Package: endeca-platformservices-6.1.3-1.el6.x86_64 
> (/endeca-platformservices-6.1.3-1.el6.x86_64)
>            Requires: libsc_fi.so
> Error: Package: endeca-platformservices-6.1.3-1.el6.x86_64 
> (/endeca-platformservices-6.1.3-1.el6.x86_64)
>            Requires: libsc_da.so
> Error: Package: endeca-platformservices-6.1.3-1.el6.x86_64 
> (/endeca-platformservices-6.1.3-1.el6.x86_64)
>            Requires: libsc_fut.so
>  You could try using --skip-broken to work around the problem
>  You could try running: rpm -Va --nofiles --nodigest
> 

Again:
        If you are using yum, then you are unlikely to be using @rpm5.org code,
and you will have to find your own "politically correct" answer elsewhere.

hth

73 de Jeff

> 
> All of these requirements are fulfilled already, so how do I get rpmbuild to 
> ignore them and not mark the various *.so as requirements?
> 
> Thanks!

Reply via email to