On Wed, Dec 17, 2025 at 14:59:32 +0000, Daniel P. Berrangé wrote: > From: Daniel P. Berrangé <[email protected]> > > The ELN build root performs rebuilds of Fedora rawhide packages with > %{rhel} set instead of %{fedora}. The vast majority of the time this > will "do the right thing", but when we control -Dwerror we chose to > enable -Werror on RHEL on the basis that the GCC toolchain is stable > and thus we don't expect new warnings to appear. That does not hold > true for ELN which tracks rawhide GCC. Thus we have the rare situation > where we should explicitly check %{eln} not just %{rhel}. > > Signed-off-by: Daniel P. Berrangé <[email protected]> > --- > libvirt.spec.in | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/libvirt.spec.in b/libvirt.spec.in > index ccfe75135b..22c9975d9f 100644 > --- a/libvirt.spec.in > +++ b/libvirt.spec.in > @@ -263,8 +263,9 @@ > > # RHEL releases provide stable tool chains and so it is safe to turn > # compiler warning into errors without being worried about frequent > -# changes in reported warnings > -%if 0%{?rhel} > +# changes in reported warnings. ELN is a rebuild of Rawhide so should > +# be treated as unstable for this flag > +%if 0%{?rhel} && !0%{?eln} > %define enable_werror -Dwerror=true > %else > %define enable_werror -Dwerror=false -Dgit_werror=disabled
Reviewed-by: Jiri Denemark <[email protected]>
