What about ability to opt-in into %prep checking on push?
Could we add some new rules to gating.yaml for example, allowing few
checks on push?
Most of package I manage are tiny or small, prep check should not take
longer than 10s on most of them. I made mistake of omitting patch our
source file multiple time.
Could similar check be enabled either by dist-git file or project
settings on package sources?
I never did any check, but I think the most of packages are quite small.
How many packages could have significant size of sources? If we have
opt-in first and opt-out for large packages later, would it work?
On 1/26/21 6:32 PM, Zbigniew Jędrzejewski-Szmek wrote:
On Tue, Jan 26, 2021 at 03:59:18PM +0000, Jonathan Wakely wrote:
> On 25/01/21 19:58 +0100, Miro Hrončok wrote:
...
>
> Not for the first time, I wonder why we don't have a git server hook
> that rejects a push if it fails %prep. For large packages the %prep is
> too slow, but we could at least check for the common mistake of adding
> a patch to the .spec and forgetting to git add the actual .patch file.
> Why do we allow that, instead of just refusing the push?
>
> Does anybody have a valid reason to want to be able to push a .spec
> that refers to a missing .patch file? Surely it's always an accident
> (as happened with libreoffice last week) and we should use tooling to
> help us avoid such accidents?
I don't think we should do a full %prep (because that sometimes sources
can be huge and people do some preprocessing in %prep that might take
a few minutes). But we should check that Source* and Patch* is defined
and the spec file is syntactically valid. This would go a long way towards
avoiding stupid mistakes, without significant cost.
Zbyszek
--
Petr Menšík
Software Engineer
Red Hat,
http://www.redhat.com/
email: pemensik(a)redhat.com
PGP: DFCF908DB7C87E8E529925BC4931CA5B6C9FC5CB