Bug 1227304 - open build service raises 'Failed build dependencies' when new BuildRequires tag added to the .spec file by the _service during runtime, instead installing build requirements
Summary: open build service raises 'Failed build dependencies' when new BuildRequires...
Status: RESOLVED WORKSFORME
Alias: None
Product: openSUSE.org
Classification: openSUSE
Component: BuildService (show other bugs)
Version: unspecified
Hardware: Other Other
: P5 - None : Major (vote)
Target Milestone: ---
Assignee: E-mail List
QA Contact: Adrian Schröter
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-02 16:03 UTC by huakim tylyktar
Modified: 2024-07-04 12:41 UTC (History)
2 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
log file indicating what happened during build process (44.78 KB, text/plain)
2024-07-02 16:09 UTC, huakim tylyktar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description huakim tylyktar 2024-07-02 16:03:34 UTC
When i added code to _service, which formats .spec file adding BuildRequires tags at buildtime, futher build failes with 'Failed build dependencies', instead of installing these build dependencies
Comment 1 huakim tylyktar 2024-07-02 16:09:15 UTC
Created attachment 875834 [details]
log file indicating what happened during build process
Comment 2 Adrian Schröter 2024-07-02 16:46:45 UTC
yes, it is too late to do that at build time. The VM has no network and the dependencies can not pre-calculated.

Either do that in default mode, so the change gets commited to the source.

Alternative is to use dynamic build dependency implementation where another build job gets started in case dependencies are changing. That is a generic rpm feature, supported by OBS by respawning a new job. https://fedoraproject.org/wiki/Changes/DynamicBuildRequires


closing as works as designed.
Comment 3 huakim tylyktar 2024-07-02 19:55:43 UTC
(In reply to Adrian Schröter from comment #2)
> yes, it is too late to do that at build time. The VM has no network and the
> dependencies can not pre-calculated.
> 
> Either do that in default mode, so the change gets commited to the source.
> 
> Alternative is to use dynamic build dependency implementation where another
> build job gets started in case dependencies are changing. That is a generic
> rpm feature, supported by OBS by respawning a new job.
> https://fedoraproject.org/wiki/Changes/DynamicBuildRequires
> 
> 
> closing as works as designed.

But, maybe, we just need to add the feauture to order to respawn a new job before rpmbuild?
Comment 4 huakim tylyktar 2024-07-02 19:56:52 UTC
(In reply to huakim tylyktar from comment #3)
> (In reply to Adrian Schröter from comment #2)
> > yes, it is too late to do that at build time. The VM has no network and the
> > dependencies can not pre-calculated.
> > 
> > Either do that in default mode, so the change gets commited to the source.
> > 
> > Alternative is to use dynamic build dependency implementation where another
> > build job gets started in case dependencies are changing. That is a generic
> > rpm feature, supported by OBS by respawning a new job.
> > https://fedoraproject.org/wiki/Changes/DynamicBuildRequires
> > 
> > 
> > closing as works as designed.
> 
> But, maybe, we just need to add the feauture to order to respawn a new job
> before rpmbuild?

And, of course, with keeping generic rpm feauture.
Comment 5 Adrian Schröter 2024-07-03 06:47:41 UTC
this is already supported by OBS. It restarts the build when dependencies are changing.
Comment 6 huakim tylyktar 2024-07-04 12:41:04 UTC
(In reply to Adrian Schröter from comment #5)
> this is already supported by OBS. It restarts the build when dependencies
> are changing.

There are also error that prevent from building: 
unresolvable: nothing provides %{lua_module, nothing provides luarocks}, nothing provides devel}
The lua-module macro is provided in lua-rpm-macros package
I added lua-rpm-macros to project configuration
Comment 7 huakim tylyktar 2024-07-04 12:41:46 UTC
(In reply to huakim tylyktar from comment #6)
> (In reply to Adrian Schröter from comment #5)
> > this is already supported by OBS. It restarts the build when dependencies
> > are changing.
> 
> There are also error that prevent from building: 
> unresolvable: nothing provides %{lua_module, nothing provides luarocks},
> nothing provides devel}
> The lua-module macro is provided in lua-rpm-macros package
> I added lua-rpm-macros to project configuration

The .spec file contains line 
BulidRequires: %{lua_module}