Re: DNF vs YUM, $pkg, $pkg-mpi, $pkg-openmpi having same provides

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 19.06.2015 01:10, T.C. Hollingsworth wrote:

You don't have to override the internal dependency generator.  In
fact, you really shouldn't because overriding it also overrides
portions of rpm's multilib handling.  :-(

Patching find-(requires|provides) in /usr/lib/rpm is also useless, as
modern versions of rpm use an internal dependency generator instead.
(I think these scripts only still exist in modern Fedora because some
old external srpms hardcode it, overriding the internal dependency
generator.)

You should instead use the new depdendency generator hooks, which are
also quite a bit nicer to work with. All you have to do is create a
file %{_rpmconfigdir}/fileattrs/openmpi.attrs with something like:

# the path to your provides generating script
%__openmpi_provides %{_rpmconfigdir}/openmpi.prov
# the path to your requires generating script
%__openmpi_requires %{_rpmconfigdir}/openmpi.req
# a regular expression that paths in an RPM
# must match to trigger the generator
%__openmpi_path ^%{_prefix}/lib(64)/(openmpi|mpich)/.*$

When this file is present and any file is packaged during rpmbuild
that matches the regular expression in the last entry, the scripts
listed in the first two entries are executed.  Just as with
find-(provides|requires) a newline-seperated list of files in the
package is provided on the standard input (but in this case only those
which match the regular expression!) and you provide the Requires or
Provides to add on the standard output.

You can look in your /usr/lib/rpm/fileattrs directory for some hints.  :-)

Once you've got it working, you could propose a patch to
redhat-rpm-config to add it universally for all packages.  Or, if you
don't want to block on rpm changes and have more freedom to update it
in the future, you could create a new package for it and add it as a
dependency of both openmpi and mpich.

Thanks a lot for this explanation, very informative! I'll proceed as you outlined.

Thanks,
Sandro



--
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux