On Sat, Aug 1, 2015 at 10:25 PM, Jan Kratochvil <jan.kratochvil@xxxxxxxxxx> wrote: > Hi, Hi, > > https://bugzilla.redhat.com/show_bug.cgi?id=1249325 > > GDB requires some library libXXX.so.3 by dlopen(). Therefore it is not found > by rpm automatic requires/provides from DT_NEEDED. Therefore one has to add > the libXXX.so.3 by specific BuildRequires and Requires to the .spec file. > > libXXX is librpm here but that is just a coincidence, it could be libz for > example. > > (1) How to make a dependency on librpm.so.7? > > librpm.so.7 is in rpm-libs-4.12.90-3.fc24.x86_64 which --provides: > librpm.so.7()(64bit) > librpmio.so.7()(64bit) > rpm-libs = 4.12.90-3.fc24 > rpm-libs(x86-64) = 4.12.90-3.fc24 > So there is no easy way to Requires: rpm-libs = NVRA > I do not see which V introduced / deprecates .so library version 7. > > So I would like to: Requires: librpm.so.7 > But that does not work as I need there the '()(64bit)' suffix. > > %{?_isa} suffix does not work, that is '(x86-64)' and not '()(64bit)'. > > I could %ifarch explicitly all 64-bit Fedora archs to append '()(64bit)' for > them but isn't there some better way how to generate the '()(64bit)' suffix? > > (2) The other possibility does work: > > BuildRequires: %{_libdir}/librpm.so.7 > > But > https://fedoraproject.org/wiki/Packaging:Guidelines#File_Dependencies > says > Whenever possible you should avoid file dependencies as they slow down > dependency resolution and require the package manager to download file > lists in addition to to regular dependency information. I'd propose to add something like: %if %{__isa_bits} = 64 Requires: libFOO.so.X()(64bit) %else Requires: libFOO.so.X %endif Not sure about syntax. https://github.com/rpm-software-management/rpm/blob/140744377b019e0de81d76d0931c32228d2ed57e/tools/elfdeps.c#L81-L97 > > From what I remember at least yum did not need the 'filelists' index for > /usr/bin/ files. Is it still valid today and also for dnf? > And is 'filelists' required for /usr/lib{,64}/ or not? You can add BuildRequires: /usr/bin/bar > > I think Packaging Guidelines could list these few directories - at least > /usr/bin/ - for safe file dependencies. Also CCing rpm maillist > > > Thanks, > Jan -- -Igor Gnatenko -- devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/devel Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct