mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 03:25:20 +00:00
spec: Disable with_userfaultfd_sysctl on Fedora and RHEL-9
All supported versions of Fedora and RHEL >= 9.0 support /dev/userfaultfd. Signed-off-by: Jiri Denemark <jdenemar@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
2a6799fd43
commit
7512cbee39
@ -90,6 +90,7 @@
|
||||
|
||||
# Other optional features
|
||||
%define with_numactl 0%{!?_without_numactl:1}
|
||||
%define with_userfaultfd_sysctl 0%{!?_without_userfaultfd_sysctl:1}
|
||||
|
||||
# A few optional bits off by default, we enable later
|
||||
%define with_fuse 0
|
||||
@ -246,6 +247,12 @@
|
||||
%define enable_werror -Dwerror=false -Dgit_werror=disabled
|
||||
%endif
|
||||
|
||||
# Fedora and RHEL-9 are new enough to support /dev/userfaultfd, which
|
||||
# does not require enabling vm.unprivileged_userfaultfd sysctl.
|
||||
%if 0%{?fedora} || 0%{?rhel} >= 9
|
||||
%define with_userfaultfd_sysctl 0
|
||||
%endif
|
||||
|
||||
%define tls_priority "@LIBVIRT,SYSTEM"
|
||||
|
||||
# libvirt 8.1.0 stops distributing any sysconfig files.
|
||||
@ -1276,6 +1283,12 @@ exit 1
|
||||
%define arg_remote_mode -Dremote_default_mode=legacy
|
||||
%endif
|
||||
|
||||
%if %{with_userfaultfd_sysctl}
|
||||
%define arg_userfaultfd_sysctl -Duserfaultfd_sysctl=enabled
|
||||
%else
|
||||
%define arg_userfaultfd_sysctl -Duserfaultfd_sysctl=disabled
|
||||
%endif
|
||||
|
||||
%define when %(date +"%%F-%%T")
|
||||
%define where %(hostname)
|
||||
%define who %{?packager}%{!?packager:Unknown}
|
||||
@ -1355,6 +1368,7 @@ export SOURCE_DATE_EPOCH=$(stat --printf='%Y' %{_specdir}/libvirt.spec)
|
||||
-Dqemu_moddir=%{qemu_moddir} \
|
||||
-Dqemu_datadir=%{qemu_datadir} \
|
||||
-Dtls_priority=%{tls_priority} \
|
||||
%{?arg_userfaultfd_sysctl} \
|
||||
%{?enable_werror} \
|
||||
-Dexpensive_tests=enabled \
|
||||
-Dinit_script=systemd \
|
||||
@ -2215,7 +2229,9 @@ exit 0
|
||||
%if %{with_qemu}
|
||||
%files daemon-driver-qemu
|
||||
%config(noreplace) %{_sysconfdir}/libvirt/virtqemud.conf
|
||||
%if %{with_userfaultfd_sysctl}
|
||||
%config(noreplace) %{_prefix}/lib/sysctl.d/60-qemu-postcopy-migration.conf
|
||||
%endif
|
||||
%{_datadir}/augeas/lenses/virtqemud.aug
|
||||
%{_datadir}/augeas/lenses/tests/test_virtqemud.aug
|
||||
%{_unitdir}/virtqemud.service
|
||||
|
Loading…
Reference in New Issue
Block a user