Opened 6 years ago

Closed 6 years ago

#5317 closed defect (fixed)

RPM's might have too many provides

Reported by: anders.blomdell@… Owned by: Martin Sjölund
Priority: normal Milestone: 1.14.0
Component: *unknown* Version: v1.13.0
Keywords: Cc: anders.blomdell@…

Description

The rpm's provided by openmodelica has provides of many bundled
libraries that might make other packages that depends on those
provides fail if openmodelica gets loaded instead of a rpm that
has that library in the ordinary library paths(s)

$ curl https://build.openmodelica.org/rpm/fc27/openmodelica-1.13-1.13.2-1.fc27.x86_64.rpm > openmodelica-1.13-1.13.2-1.fc27.x86_64.rpm
$ rpm -q --provides -p openmodelica-1.13-1.13.2-1.fc27.x86_64.rpm
libModelicaExternalC.so.0()(64bit)
libModelicaIO.so.0()(64bit)
libModelicaMatIO.so.0()(64bit)
libModelicaStandardTables.so.0()(64bit)
libOMPlot.so.1()(64bit)
libOpenModelicaCompiler.so()(64bit)
libOpenModelicaFMIRuntimeC.so()(64bit)
libOpenModelicaRuntimeC.so()(64bit)
libSimulationRuntimeC.so()(64bit)
libamd.so()(64bit)
libbtf.so()(64bit)
libcminpack.so.1()(64bit)
libcoinmumps.so.1()(64bit)
libcolamd.so()(64bit)
libfmilib_shared.so()(64bit)
libipopt.so.0()(64bit)
libklu.so()(64bit)
liblis.so.0()(64bit)
libomantlr3.so()(64bit)
libomcgc.so.1()(64bit)
libomcruntime.so()(64bit)
libomopcua.so()(64bit)
libomqwt.so.6()(64bit)
libqjson.so.0()(64bit)
libsundials_arkode.so.1()(64bit)
libsundials_cvode.so.1()(64bit)
libsundials_cvodes.so.2()(64bit)
libsundials_ida.so.2()(64bit)
libsundials_idas.so.0()(64bit)
libsundials_kinsol.so.1()(64bit)
libsundials_nvecserial.so.0()(64bit)
libumfpack.so()(64bit)
libzlib.so.0()(64bit)
libzmq.so.5.1.3()(64bit)
openmodelica-1.12 = 1.12.0~9~g6f68ff6-1.fc27
openmodelica-1.12(x86-64) = 1.12.0~9~g6f68ff6-1.fc27

Adding something like this in the .spec file might be a good idea:

%global __provides_exclude_from ^/opt/openmodelica-1.13/lib/x86_64-linux-gnu/omc/.*$
%global __requires_exclude_from ^/opt/openmodelica-1.13/lib/x86_64-linux-gnu/omc/.*$

Change History (9)

comment:1 by Anders Blomdell <anders.blomdell@…>, 6 years ago

Cc: anders.blomdell@… added

comment:2 by Per Östlund, 6 years ago

Owner: changed from somebody to Martin Sjölund
Status: newassigned

comment:3 by Martin Sjölund, 6 years ago

We can't remove the requires though (or the correct dependencies would not be installed)...

https://fedoraproject.org/wiki/Packaging:AutoProvidesAndRequiresFiltering suggests a pattern like:

%global _privatelibs libprivate[.]so.*
%global __provides_exclude ^(%{_privatelibs})$
%global __requires_exclude ^(%{_privatelibs})$

But we don't know the list of shared objects until we have compiled it, so I guess we would need to read this dynamically.

comment:4 by Martin Sjölund, 6 years ago

export PRIVATELIBS=`find %{buildroot}/opt -name "*.so" -exec basename {} ";" | tr '\n' "|" | sed -e "s/[.]so/.so.*/g" -e "s/|\$//"`
%global _privatelibs $PRIVATELIBS
%global __provides_exclude ^(%{_privatelibs})$
%global __requires_exclude ^(%{_privatelibs})$

Didn't seem to work :(

comment:5 by Martin Sjölund, 6 years ago

I'm trying this commit on our build system (disabling auto-provides; as long as we can install the generated rpm, it should be working):
https://github.com/OpenModelica/OpenModelicaBuildScripts/commit/2877da50c04aabc9ee705be2a5d9ef6ef5db5b78
https://test.openmodelica.org/jenkins/blue/organizations/jenkins/LINUX_BUILDS/

comment:6 by Martin Sjölund, 6 years ago

That seems to have worked fine for Fedora and CentOS7, but CentOS6 is too old for that. So I will add some requires manually and let the RPM sometimes be broken on CentOS6 instead :(

comment:7 by Francesco Casella, 6 years ago

Milestone: Future1.14.0

comment:8 by Martin Sjölund, 6 years ago

Actually, milestone has no real meaning here: they are rebuilt also for 1.9.6 :)

comment:9 by Martin Sjölund, 6 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.