On Dec 16, 2013, at 12:02 AM, [email protected] wrote:

> Jeff Johnson escreveu:
>> 
>> On Dec 15, 2013, at 9:51 PM, [email protected] wrote:
>> 
>>> Apparently this is a rpm4 feature. But I would like to
>>> have it working in cooker, that is, to generate some
>>> provides/requires automatically. For example:
>>> 
>>> $ cat /usr/lib/rpm/fileattrs/maven.attr
>>> %__maven_provides       %{_rpmconfigdir}/maven.prov
>>> %__maven_requires       %{_rpmconfigdir}/maven.req
>>> %__maven_path   ^%{_mavendepmapfragdir}/.*
>>> 
>>> $ cat /usr/lib/rpm/maven.prov
>>> #!/usr/bin/python
>>> .....
>>>              print "mvn({gid}:{aid}) = {version}".format(gid=groupId,
>>> .....
>>> 
>> 
>> Easy enough to do the equivalent. In lib/rpmfc.c there is
>> an if statement in C based on the path value of %{__maven_path} to
>> trigger setting a bit that runs %__maven_provides/%__requires as needed.
>> 
>> Note that path (instead of file(1)/magic(3) content) based classification is
>> highly
>> non-portable: rpm5 actually runs on non-linux.
> 
>  Can we get this feature in cooker (make it use maven.prov and
> maven.req)? I can run a modified rpm in the meantime, as I do
> not want to start pushing packages too early.
> 

(aside)
There is a certain irony that you need both less automation
and more automation in order to rebuild the Fedora java stack
for OpenMandriva.

If I were you, I'd run rpm -qp --provides *.rpm"( and --requires) on
exactly Fedora binary java packaging and add those dependencies
(with modest filtering) manually into your OpenMandriva *.spec files.

The Fedora dependencies for java, manually added to *.spec, are
likely sufficient to ensure that your packages can be installed while
bootstrapping a java stack.

>  Looking at the rpm code, it appears to not be trivial to
> someone that does not understand much of rpm internals what
> should be done...
>  Maybe I misunderstood, but there is no "maven_path" string
> anywhere in the rpm sources.
> 

Yes there is no %__maven_path string in RPM5 sources.

There are other paths used for classification in a large clause
that sets a classification bit like RPMFC_PYTHON.

The classification bit determines what automated provides/requires
helpers are run.

There is an additional problem finding a bit to use: all 32 bits are
in use (or reserved), so there will have to be a refactoring, or a
change from an RPM_TYPE_UINT32, in order to accomodate
Yet More Automation.

Note that the last addition similar to yours was from mdawkins
for a GNOME extraction. Getting that chnage into cooker took 4-5 weeks iirc.

I can/will do this work in "upstream" RPM this month. Meanwhile the
relationship between "upstream" RPM5 and what is in Cooker is not yet
clear, nor am I permitted to build RPM for OpenMandriva yet (I'm bero's bitch
per the 2014.0 specifications atm).

73 de Jeff


Reply via email to