From fda7bc52efe5534ebabe978f02265354b66a9419 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20P=C3=A1ral?= Date: Fri, 5 May 2023 13:43:34 +0200 Subject: [PATCH] Prevent partial updates (rhbz#2193135) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is another attempt to prevent partial updates, where important mesa subpackages get desynchronized with mesa-dri-drivers, and things crash because of version mismatch. Last time, we forgot that an old mesa version is still kept in the 'fedora' repo, and DNF can choose it over a newer version. Because the old version doesn't have the dependency fixes, a partial update can still happen. This patch tries to remedy that. You should be able to either install old mesa or new mesa, but always only as a whole set, not mix and match. According to Michel Dänzer [1], libglapi and libgbm should always match in version to dri-drivers. So the conditional requirement was added there, and it will help guard dependants (e.g. libGL, libEGL) versions in the future. The conditional requirement under dri-drivers (for libEGL) is just a temporary measure, because libEGL in the 'fedora' repo has broken dependencies. It needs to be present in F37 and F38, but it doesn't need to go to Rawhide and future releases. [1] https://bugzilla.redhat.com/show_bug.cgi?id=2187726#c4 --- mesa.spec | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/mesa.spec b/mesa.spec index ae4350d..5e89a4e 100644 --- a/mesa.spec +++ b/mesa.spec @@ -195,6 +195,10 @@ Requires: %{name}-libglapi%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{relea %if 0%{?with_va} Recommends: %{name}-va-drivers%{?_isa} %endif +# If mesa-libEGL is installed, it must match in version. This is here to prevent using +# mesa-libEGL < 23.0.3-1 (frozen in the 'fedora' repo) which didn't have strong enough +# inter-dependencies. See https://bugzilla.redhat.com/show_bug.cgi?id=2193135 . +Requires: (%{name}-libEGL%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} if %{name}-libEGL%{?_isa}) %description dri-drivers %{summary}. @@ -248,6 +252,10 @@ Summary: Mesa gbm runtime library Provides: libgbm Provides: libgbm%{?_isa} Recommends: %{name}-dri-drivers%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} +# If mesa-dri-drivers are installed, they must match in version. This is here to prevent using +# older mesa-dri-drivers together with a newer mesa-libgbm and its dependants. +# See https://bugzilla.redhat.com/show_bug.cgi?id=2193135 . +Requires: (%{name}-dri-drivers%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} if %{name}-dri-drivers%{?_isa}) %description libgbm %{summary}. @@ -284,6 +292,10 @@ Provides: libxatracker-devel%{?_isa} Summary: Mesa shared glapi Provides: libglapi Provides: libglapi%{?_isa} +# If mesa-dri-drivers are installed, they must match in version. This is here to prevent using +# older mesa-dri-drivers together with a newer mesa-libglapi or its dependants. +# See https://bugzilla.redhat.com/show_bug.cgi?id=2193135 . +Requires: (%{name}-dri-drivers%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} if %{name}-dri-drivers%{?_isa}) %description libglapi %{summary}.