Le vendredi 03 juillet 2020 à 07:26 +0200, Pavel Raiskup a écrit :
Hi,
I'm not familiar with the %forge* macros, but I don't think
it is
expected that you will add commands that need the Internet into the
macro definition.
It’s neither expected nor unexpected. For a Fedora-oriented spec, of
course you should never depend on Internet ability. For you own needs,
both mock and copr allow enabling the internet. forge macros do not
enforce a specific policy.
The main showstopper will be that if the additional commands need to
process files in sources, you need to run %prep first, and %prep
depends on sources being set, so you’ll be in a chicken and egg
situation.
Now, we’ve been moving to more dynamic spec contruction in the last
years, so I can see it being possible in the near feature if everyone
makes a goodwill effort, but right now that is not possible.
With the dynamic buildrequires part rpm upstream added, and with
https://fedoraproject.org/wiki/Changes/Patches_in_Forge_macros_-_Auto_mac...
it will certainly be possible to compute a second level of sources
during the dynamic buildrequires first pass over prep, and the change
makes the forge macro code modular enough the second level will be
auto-registered in sourcelist, but how is the buildsystem supposed to
provide sources that did not exist during its first pass over the spec
file?
That probably involves running spectool by default over %sourcelist at
the start of %prep, which, again, should be doable easily with
https://fedoraproject.org/wiki/Changes/Patches_in_Forge_macros_-_Auto_mac...
and Fabio’s most excellent rewrite of the spectool code (if you have
not used it yet, try it, it’s good). However someone needs to add
lookaside or buildsys integration to spectool to spectool so spectool
has something to source new sources from in a restricted build context.
If anyone is interested in doing the spectool/buildsys integration
part, we can fill a change for F34. It’s another example, like
autobumping, of high level build features that were devilishly hard to
implement before something like %auto_call was available, and is pretty
simple to do with %auto_call implemented
Regards,
--
Nicolas Mailhot