fedora-copr / copr

RPM build system - upstream for https://copr.fedorainfracloud.org/
115 stars 59 forks source link

`build.log` is not correctly populated if the build fails. #2961

Open befeleme opened 11 months ago

befeleme commented 11 months ago

When I build RPM and it produces an SRPM correctly, but fails in the RPM build phase, I expect the full RPM build log to be present in build.log Actual result - truncated log: See: https://download.copr.fedorainfracloud.org/results/@python/python3.13/fedora-rawhide-x86_64/06550594-Cython/build.log.gz

The RPM build has in fact started and it can be seen in the builder-live.log.gz: See: https://download.copr.fedorainfracloud.org/results/@python/python3.13/fedora-rawhide-x86_64/06550594-Cython/builder-live.log.gz

praiskup commented 11 months ago

Thank you for the report. Yes, known issue. This has been reported also in bugzilla.

Do we have to prioritize a fix for this? What is the use for build.log?

befeleme commented 11 months ago

For the Python package rebuilds in Copr we try to determine the reason of the build failure. Typically if the build log is short, this indicates a problem with missing dependencies (the actual build doesn't even start), if it's long - we use some other heuristics to determine the actual build failure. This information, however hacky and error-prone, helps us determine whether to open a BZ ticket for a given package or not.

hroncok commented 11 months ago

We also have existing code that downloads the log and searches for common error patterns. It should be possible to change the code to use builder-live.log instead.