We autogenerate RPM Requires/Provides in a few projects, and it's
quite nice.  eg: supermin-devel has:

  $ rpm -ql supermin-devel
  /usr/lib/rpm/fileattrs/supermin.attr
  /usr/lib/rpm/supermin-find-requires

and this means other packages that contain supermin appliances can
simply put their appliance in a particular directory matching the name
"*/supermin.d/packages/" and (since they have to BuildRequire
supermin-devel anyway) RPM will create the correct dependencies
automatically.

Great!  But ...

I'd like to use it to autogenerate nbdkit plugin Provides, where the
presence of a file named something like %{_libdir}/nbdkit/plugins/*.so
should generate a Provides with the plugin name, eg:

  $ rpm -qf --provides /usr/lib64/nbdkit/plugins/nbdkit-curl-plugin.so 
  nbdkit-curl-plugin = 1.21.7-1.fc33

Right now we list them explicitly:

  https://src.fedoraproject.org/rpms/nbdkit/blob/master/f/nbdkit.spec#_161

The problem is all the current plugins exist in nbdkit itself.  nbdkit
is not a BuildRequire of nbdkit, so it cannot provide RPM rules for
itself.  Doing so would create a nasty circular dependency that makes
bootstrapping awkward.

I could create a subpackage with the RPM rules, which is still a
circular dependency but at least the subpackage would be noarch and
wouldn't depend on anything else.

This is getting complicated - is there some easier thing I'm missing here?

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org

Reply via email to