From 1c15f90ec2b80c19ec2873126da39e2b8aa551a3 Mon Sep 17 00:00:00 2001 From: Zheng Junjie Date: Thu, 18 Jun 2026 15:54:46 +0800 Subject: [PATCH 1/2] SPECS: glib: Enable static build. Build qemu-user-static require glib static library. Signed-off-by: Zheng Junjie --- SPECS/glib/glib.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/SPECS/glib/glib.spec b/SPECS/glib/glib.spec index e7e0959fce..c91f537d1e 100644 --- a/SPECS/glib/glib.spec +++ b/SPECS/glib/glib.spec @@ -13,7 +13,7 @@ %bcond bootstrap 0 %endif -%bcond static 0 +%bcond static 1 # For -tests subpackage. %bcond tests 0 %bcond doc 0 @@ -94,6 +94,10 @@ This package contains the essential runtime libraries and tools. %package devel Summary: Development files for the GLib library Requires: %{name}%{?_isa} = %{version}-%{release} +%if %{with static} +Provides: %{name}-static = %{version}-%{release} +Provides: %{name}-static%{?_isa} = %{version}-%{release} +%endif %description devel This package contains the header files, libraries, and developer tools @@ -180,6 +184,9 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : %{_datadir}/bash-completion/completions/gsettings %files devel +%if %{with static} +%{_libdir}/lib*.a +%endif %{_libdir}/lib*.so %dir %{_libdir}/glib-2.0 %dir %{_libdir}/glib-2.0/include From 916cdc3a8a951b8f7425c5c9dbb22f2bde4538ee Mon Sep 17 00:00:00 2001 From: Zheng Junjie Date: Tue, 23 Jun 2026 16:03:31 +0800 Subject: [PATCH 2/2] SPECS: qemu: enable qemu-user-static build. Signed-off-by: Zheng Junjie --- SPECS/qemu/qemu.spec | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/SPECS/qemu/qemu.spec b/SPECS/qemu/qemu.spec index ee98291ba6..65ea7e95d6 100644 --- a/SPECS/qemu/qemu.spec +++ b/SPECS/qemu/qemu.spec @@ -43,8 +43,8 @@ # By default build dynamic user-mode emulation %bcond user_dynamic 1 -# By default do not build static user-mode emulation -%bcond user_static 0 +# By default build static user-mode emulation +%bcond user_static 1 # Disable compiler Werror by default %bcond enable_werror 0 @@ -404,7 +404,7 @@ BuildRequires: igvm-devel %if %{with user_static} BuildRequires: glib-static BuildRequires: glibc-static -BuildRequires: zlib-devel-static +BuildRequires: zlib-ng-compat-static #BuildRequires: libatomic-static %endif # Requires for the openRuyi 'qemu' metapackage @@ -1541,6 +1541,7 @@ popd %{_bindir}/qemu-sparc32plus-static %{_bindir}/qemu-sparc64-static %{_bindir}/qemu-x86_64-static +%{_bindir}/qemu-i386-static %if %{with have_systemtap} %{_datadir}/systemtap/tapset/qemu-aarch64-log-static.stp %{_datadir}/systemtap/tapset/qemu-aarch64-simpletrace-static.stp @@ -1607,6 +1608,7 @@ popd %endif %ifnarch x86_64 %{_exec_prefix}/lib/binfmt.d/qemu-x86_64-static.conf +%{_exec_prefix}/lib/binfmt.d/qemu-i386-static.conf %{_exec_prefix}/lib/binfmt.d/qemu-i486-static.conf %endif %{_exec_prefix}/lib/binfmt.d/qemu-s390x-static.conf