mingw spec file generation with script (like kmodtool)

Farkas Levente lfarkas at lfarkas.org
Mon Jul 11 09:58:09 UTC 2011


On 07/10/2011 09:46 PM, Farkas Levente wrote:
> On 07/10/2011 02:36 PM, Farkas Levente wrote:
>> On 07/09/2011 07:43 PM, Erik van Pienbroek wrote:
>>> Farkas Levente schreef op wo 06-07-2011 om 23:51 [+0200]:
>>>> i can't solve this f***n debug define so it's always have to add to the
>>>> spec file:
>>>> ----------------------------
>>>> %define __debug_install_post %{mingw_debug_install_post}
>>>> ----------------------------
>>>
>>> Does it work if you hide this line behind the mingwtool macro (so that
>>> this line gets added by the mingwtool) ? 
>>
>> no but you can image how hard i try to do so!
>> but still trying.
>>
>>> As it is now, I see a major issue with this approach. That is that the
>>> mingwtool isn't part of a default Fedora/EPEL buildroot. So if you try
>>> to build such a package in mock/koji it will fail because it doesn't
>>> know where to find the mingwtool. Even if you add a BR: mingw-filesystem
>>> (or wherever the mingwtool will be bundled with) then the build will
>>> still fail because mock/koji only processes the BuildRequires tags
>>> once. 
>>
>> no. it'll be added to mingw-filesystem-base and kojo can use it. just
>> try it:-)
>> of course the
>> BuildRequires: mingw-filesystem-base can't be added by the mingwtool but
>> by hand (which is missing in my example:-(
> 
> unfortunately you've got right:-(
> the key is redhat-rpm-config which is part of the buildsys yum group:-(
> so we've to add mingwtool to redhat-rpm-config. but in this case we've
> to make it good not just a 'first version' since probably can update
> redhat-rpm-config too often. the real problem is that it won't work on
> rhel since it's much harder to add something to an rhel package....

to answer to myself again and again...
i'm just thinking that may be we can create a mingwtool and a
mingwtool-real. the mingwtool can include mingwtool-real if found it
otherwise not. in this case mingwtool only handle the BuildRequires part
of the spec file it can be very easily (and hopefully good) implemented
and included in redhat-rpm-config which can't be change too often and
mingw-filesystem-base can include mingwtool-real.
so during the setup phase of mock only mingwtool run, but it can
generate the proper BuildRequires for mock. and after then when the real
rpmbuild run than mingwtool-real can also be used.


-- 
  Levente                               "Si vis pacem para bellum!"


More information about the mingw mailing list