Re: RHEL 8 not cooperating with libcurl, wants libcurl-minimal
Date: Thu, 11 Jul 2019 21:08:40 +0200
On Thu, Jul 11, 2019 at 06:11:35PM +0000, Mark Richter wrote:
> The dependencies are added using a scripted series of commands to extract
> the dependency from the ldd output and locate the packages which provide
> them. I suspect that this is the culprit, although I have tested it and a)
> it works fine on RHEL 7 and b) appears to produce the same output for RHEL
> 8, but something is obviously amiss.
A similar procedure to what your scripted commands do is actually
already performed by rpmbuild tool when building a package. But instead of
adding a dependency on a package name, rpmbuild adds a dependency on a SONAME of
the needed library. Plus it appends an identifier for the architecture.
That's the "libcurl.so.4()(64bit)" dependency you should already see in your
package when you run "rpm -q --requires -p solar_secure-serverlock_cli-*.rpm".
(Unless you inhibited a default dependency generator provided by rpmbuild).
At the same time packages that install libcurl.so.4 library into a standard
dynamic linker path also get a Provide on SONAME. That you can see with "rpm
-q --provides libcurl" and also with "rpm -q --provides libcurl-minimal"
The Red Hat way of expressing dependencies enables multiple packages to provide
the same interface of the library. In this case they are libcurl and
libcurl-minimal packages. Then user can install whatever of them without
breaking RPM dependecies.
Your way of expressing dependencies is more rigid as it binds the new package
to exactly the same package that was used when building. E.g. it would prevent
users to install older version of libcurl-minimal than you used for building
Each of the approaches has its pros and cons. It depends on what you want to
I think you could either improve your scripted commands to take into account
that one library can be provided by multiple packages (RPM in RHEL 8 supports
special syntax for expressing a dependency on "package A or package B", but
that's out of scope of this thread; see
<https://rpm.org/user_doc/boolean_dependencies.html>), or you can stop using
them and start relying on the default rpmbuild dependency generators, or you
could add "BuildRequires: libcurl" in addition to "BuildRequires:
libcurl-devel" into your spec file. This will probably swap the run-time
dependency of solar_secure-serverlock_cli from libcurl-minimal to libcurl
because your scripted commands will locate the library in the other package.
- application/pgp-signature attachment: signature.asc