Hi Rubyists,
Binary ruby- and rubygem- packages ships .so files. These .so files are
picked up by RPM's automatic Requires/Provides generater and they are
listed among provides, e.g.:
$ repoquery -q --provides rubygem-sqlite3
rubygem(sqlite3) = 1.3.5-4.fc19
rubygem-sqlite3 = 1.3.5-4.fc19
rubygem-sqlite3(x86-64) = 1.3.5-4.fc19
sqlite3_native.so()(64bit)
However, these .so files are not useful outside of Ruby world and they
might even conflict with some system library (although I don't have any
example at my hand currently). So I believe, we should filter out these
automatic provides, as is done in Perl for example. Therefore, since
F19, there are available %{?ruby_default_filter} and
%{?rubygems_default_filter} macros, which allow to filter out these
provides.
For your curiosity, this is their implementation:
%ruby_default_filter %{expand: \
%global __provides_exclude_from
%{?__provides_exclude_from:%{__provides_exclude_from}|}^(%{ruby_vendorarchdir}|%{ruby_sitearchdir})/.*\\\\.so$
\
}
%rubygems_default_filter %{expand: \
%global __provides_exclude_from
%{?__provides_exclude_from:%{__provides_exclude_from}|}^%{gem_extdir_mri}/.*\\\\.so$
\
}
If nobody objects, I am going to propose usage of these macros into Ruby
packaging guidelines [1].
Vít
[1]
https://fedoraproject.org/w/index.php?title=PackagingDrafts/Ruby&diff...