From 3eccd84b7ecd5b724e7a50357be03a932369c40e Mon Sep 17 00:00:00 2001
From: Fedora Release Engineering <releng@fedoraproject.org>
Date: Feb 03 2026 21:10:30 +0000
Subject: [PATCH 1/3] Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild


---

diff --git a/virglrenderer.spec b/virglrenderer.spec
index dd5bbf6..bee7cdc 100644
--- a/virglrenderer.spec
+++ b/virglrenderer.spec
@@ -4,7 +4,7 @@
 
 Name:		virglrenderer
 Version:	1.2.0
-Release:	1.1%{?dist}
+Release:	1.3%{?dist}
 
 Summary:	Virgl Rendering library.
 License:	MIT
@@ -74,10 +74,13 @@ driver to test virgl rendering without GL.
 %{_bindir}/virgl_test_server
 
 %changelog
+* Sat Jan 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-3
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
+
 * Thu Sep 18 2025 Janne Grunau >janne-fdr@jannau.net> - 1.2.0-1.1
 - Use 1.1 as Release to sort below F43's 1.2.0-2 but exclude 1.2.0-1
 
-* Wed Sep 17 2025 Janne Grunau >janne-fdr@jannau.net> - 1.2.0-1
+* Wed Sep 17 2025 Janne Grunau >janne-fdr@jannau.net> - 1.2.0-2
 - Enable asahi,msm DRM native context support on aarch64
 
 * Tue Sep 09 2025 Marc-André Lureau <marcandre.lureau@redhat.com> - 1.2.0-1

From 30e89d2bc0a5653e53124b7dbd8d68af5853f9e8 Mon Sep 17 00:00:00 2001
From: Marc-André Lureau <marcandre.lureau@redhat.com>
Date: Feb 03 2026 21:12:38 +0000
Subject: [PATCH 2/3] Backport build fix, fixes FTBFS rhbz#2435177


Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>

---

diff --git a/0001-c11-threads-fix-build-on-c23.patch b/0001-c11-threads-fix-build-on-c23.patch
new file mode 100644
index 0000000..dca9b9b
--- /dev/null
+++ b/0001-c11-threads-fix-build-on-c23.patch
@@ -0,0 +1,62 @@
+From 3f0f775edb2df5ea54c37863286ad565ccddb276 Mon Sep 17 00:00:00 2001
+From: Dave Airlie <airlied@redhat.com>
+Date: Fri, 7 Nov 2025 13:14:56 +1000
+Subject: [PATCH virglrenderer] c11/threads: fix build on c23
+
+C23/glibc is now including once_init in stdlib.h
+
+https://patchwork.sourceware.org/project/glibc/patch/78061085-f04a-0c45-107b-5a8a15521083@redhat.com/#213088
+
+Fix the issue like it is done in mesa upstream
+
+https://gitlab.freedesktop.org/mesa/mesa/-/commit/179e744f7577d98df7c79d7324c22acfb32a0154?merge_request_iid=38298
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Part-of: <https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/1567>
+---
+ src/mesa/compat/c11/threads_posix.h | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/src/mesa/compat/c11/threads_posix.h b/src/mesa/compat/c11/threads_posix.h
+index 45cb6075..071faf79 100644
+--- a/src/mesa/compat/c11/threads_posix.h
++++ b/src/mesa/compat/c11/threads_posix.h
+@@ -51,7 +51,9 @@ Configuration macro:
+ #include <pthread.h>
+ 
+ /*---------------------------- macros ----------------------------*/
++#ifndef __once_flag_defined
+ #define ONCE_FLAG_INIT PTHREAD_ONCE_INIT
++#endif
+ #ifdef INIT_ONCE_STATIC_INIT
+ #define TSS_DTOR_ITERATIONS PTHREAD_DESTRUCTOR_ITERATIONS
+ #else
+@@ -66,8 +68,9 @@ typedef pthread_cond_t  cnd_t;
+ typedef pthread_t       thrd_t;
+ typedef pthread_key_t   tss_t;
+ typedef pthread_mutex_t mtx_t;
++#ifndef __once_flag_defined
+ typedef pthread_once_t  once_flag;
+-
++#endif
+ 
+ /*
+ Implementation limits:
+@@ -90,12 +93,13 @@ impl_thrd_routine(void *p)
+ 
+ /*--------------- 7.25.2 Initialization functions ---------------*/
+ // 7.25.2.1
++#ifndef __once_flag_defined
+ static inline void
+ call_once(once_flag *flag, void (*func)(void))
+ {
+     pthread_once(flag, func);
+ }
+-
++#endif
+ 
+ /*------------- 7.25.3 Condition variable functions -------------*/
+ // 7.25.3.1
+-- 
+2.52.0
+
diff --git a/virglrenderer.spec b/virglrenderer.spec
index bee7cdc..27d92c5 100644
--- a/virglrenderer.spec
+++ b/virglrenderer.spec
@@ -4,13 +4,17 @@
 
 Name:		virglrenderer
 Version:	1.2.0
-Release:	1.3%{?dist}
+Release:	1.4%{?dist}
 
 Summary:	Virgl Rendering library.
 License:	MIT
 
 Source:         https://gitlab.freedesktop.org/virgl/virglrenderer/-/archive/%{version}/virglrenderer-%{version}.tar.bz2
 
+%if 0%{?fedora} && 0%{?fedora} >= 44
+Patch0000:      0001-c11-threads-fix-build-on-c23.patch
+%endif
+
 BuildRequires:  meson
 BuildRequires:  gcc
 BuildRequires:	libepoxy-devel
@@ -74,6 +78,9 @@ driver to test virgl rendering without GL.
 %{_bindir}/virgl_test_server
 
 %changelog
+* Thu Jan 29 2026 Marc-André Lureau <marcandre.lureau@redhat.com> - 1.2.0-4
+- Backport build fix, fixes FTBFS rhbz#2435177
+
 * Sat Jan 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
 

From ea2152f056909dce92a07fcf2c6650a95c3fc87b Mon Sep 17 00:00:00 2001
From: Janne Grunau <janne-fdr@jannau.net>
Date: Feb 03 2026 21:25:21 +0000
Subject: [PATCH 3/3] Override vendor name on Fedora 44+


The transitional vendor name will enable a transition to the Fedora
package in Fedora 44 and later.

---

diff --git a/virglrenderer.spec b/virglrenderer.spec
index 27d92c5..527a4a4 100644
--- a/virglrenderer.spec
+++ b/virglrenderer.spec
@@ -5,6 +5,9 @@
 Name:		virglrenderer
 Version:	1.2.0
 Release:	1.4%{?dist}
+%if 0%{?fedora} && 0%{?fedora} >= 44
+Vendor:         Fedora Asahi - Transitional
+%endif
 
 Summary:	Virgl Rendering library.
 License:	MIT
@@ -78,6 +81,9 @@ driver to test virgl rendering without GL.
 %{_bindir}/virgl_test_server
 
 %changelog
+* Tue Feb 03 2026 Janne Grunau >janne-fdr@jannau.net> - 1.2.0-1.5
+- Override vendor on Fedora 44+ to allow transition to fedora package
+
 * Thu Jan 29 2026 Marc-André Lureau <marcandre.lureau@redhat.com> - 1.2.0-4
 - Backport build fix, fixes FTBFS rhbz#2435177
 

