]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
rpm: disable -Werror on ELN builds
authorDaniel P. Berrangé <berrange@redhat.com>
Wed, 17 Dec 2025 14:56:49 +0000 (14:56 +0000)
committerDaniel P. Berrangé <berrange@redhat.com>
Thu, 15 Jan 2026 09:23:17 +0000 (09:23 +0000)
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}.

Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
libvirt.spec.in

index ccfe75135bdc46656b0300aa83e1d7acb50ddfbe..22c9975d9f926633be984f220a6b2763dc073d50 100644 (file)
 
 # 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