简体   繁体   中英

rpm packaging: files installed using rpm but not found by other rpm which requires it

problem: my rpm package installs the following but doesn't finds it when other package uses it as a dependency:

sudo rpm -qlp libjaeger-16.0.0-3641.g0b61b1fc.el8.x86_64.rpm

/usr/lib64/libjaegertracing.so.0
/usr/lib64/libjaegertracing.so.0.6.1
/usr/lib64/libopentracing.so.1
/usr/lib64/libopentracing.so.1.6.0
/usr/lib64/libthrift.so.0.13.0

and for rpm package with this package being mentioned in Requires field, it does specify what shared libs you need:

Error: 
 Problem 1: conflicting requests
  - nothing provides libjaegertracing.so.0()(64bit) needed by ceph-common-2:16.0.0-3642.g90dc7b19.el8.x86_64
  - nothing provides libopentracing.so.1()(64bit) needed by ceph-common-2:16.0.0-3642.g90dc7b19.el8.x86_64
  - nothing provides libthrift.so.0.13.0()(64bit) needed by ceph-common-2:16.0.0-3642.g90dc7b19.el8.x86_64

but as you see, even after understanding which file are provided by Required rpm, it is not able to resolve the location for these files.

considerations and checkes I did:

  1. being build in the same platform (64bit)
  2. experimentally checked in a dummy spec file >> works fine with rpm --provides also listing shared libs,
    rpm -q --provides libjaeger2-1-1.x86_64
    libjaeger2 = 1-1
    libjaeger2(x86-64) = 1-1
    libjaegertracing.so.0()(64bit)
    libopentracing.so.1()(64bit)
    libthrift.so.0.13.0()(64bit)

but when I do the same for main source rpm created I do not see shared libs in provides:

❯ sudo rpm -q --provides libjaeger-16.0.0-3641.g0b61b1fc.el8.x86_64.rpm

libjaeger = 2:16.0.0-3641.g0b61b1fc.el8
libjaeger(x86-64) = 2:16.0.0-3641.g0b61b1fc.el8

how do I make sure rpm is able to resolve and find these shared libraries?

relevant part of spec file:

%if %{with jaeger}
%files -n libjaeger
#will have to change with find_package method
%{_libdir}/libopentracing.so.*
%{_libdir}/libthrift.so.*
%{_libdir}/libjaegertracing.so.*

%post -n libjaeger -p /sbin/ldconfig
%postun -n libjaeger -p /sbin/ldconfig

%files -n libjaeger-devel
%{_includedir}/thrift
%{_includedir}/jaegertracing
%{_includedir}/opentracing
%{_libdir}/libopentracing.so
%{_libdir}/libthrift.so
%{_libdir}/libjaegertracing.so
%endif



 %package -n libjaeger
    Summary:    Ceph distributed file system client library
    %if 0%{?suse_version}
    Group:      System/Libraries
    %endif
    Obsoletes:  libjaeger < %{_epoch_prefix}%{version}-%{release}
    %description -n libjaeger
    Ceph is a distributed network file system designed to provide excellent
    performance, reliability, and scalability.

You probably disabled automatic provides. See: http://ftp.rpm.org/max-rpm/s1-rpm-depend-auto-depend.html

You either have to enable it again by deleting the line with AutoReqProv or explicitly write it in spec:

  Provides: libjaegertracing.so.0()(64bit)
  Provides: libopentracing.so.1()(64bit)

The first is preferred as the second is hard to maintain.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM