!711 [sync] PR-705: 使用bcond_without控制条件编译

From: @openeuler-sync-bot 
Reviewed-by: @yezengruan 
Signed-off-by: @yezengruan
This commit is contained in:
openeuler-ci-bot 2022-12-13 07:42:15 +00:00 committed by Gitee
commit fcabe533e0
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -1,9 +1,9 @@
# Whether to support Ceph rbd storage backend
%define with_storage_rbd 0%{!?_without_storage_rbd:1}
%bcond_without rbd
Name: qemu
Version: 6.2.0
Release: 62
Release: 63
Epoch: 10
Summary: QEMU is a generic and open source machine emulator and virtualizer
License: GPLv2 and BSD and MIT and CC-BY-SA-4.0
@ -480,7 +480,7 @@ BuildRequires: libudev-devel
BuildRequires: pam-devel
BuildRequires: perl-Test-Harness
BuildRequires: python3-devel
%if %{with_storage_rbd}
%if %{with rbd}
BuildRequires: librbd-devel
%endif
BuildRequires: krb5-devel
@ -543,7 +543,7 @@ Summary: QEMU command line tool for manipulating disk images
%description img
This package provides a command line tool for manipulating disk images
%if %{with_storage_rbd}
%if %{with rbd}
%package block-rbd
Summary: Qemu-block-rbd
%description block-rbd
@ -668,7 +668,7 @@ cd ../
--enable-virglrenderer \
--enable-cap-ng \
--enable-libusb \
%if %{with_storage_rbd}
%if %{with rbd}
--enable-rbd \
%else
--disable-rbd \
@ -763,7 +763,7 @@ rm -rf %{buildroot}%{_libexecdir}/vhost-user-gpu
rm -rf %{buildroot}%{_datadir}/%{name}/vhost-user/50-qemu-gpu.json
rm -rf %{buildroot}%{_datadir}/%{name}/vhost-user/50-qemu-virtiofsd.json
%if %{with_storage_rbd}
%if %{with rbd}
strip %{buildroot}%{_libdir}/%{name}/block-rbd.so
%endif
strip %{buildroot}%{_libdir}/%{name}/block-iscsi.so
@ -943,7 +943,7 @@ getent passwd qemu >/dev/null || \
%{_bindir}/qemu-nbd
%{_bindir}/qemu-storage-daemon
%if %{with_storage_rbd}
%if %{with rbd}
%files block-rbd
%{_libdir}/%{name}/block-rbd.so
%endif
@ -967,6 +967,9 @@ getent passwd qemu >/dev/null || \
%endif
%changelog
* Mon Dec 12 2022 Qiang Wei <qiang.wei@suse.com> - 10:6.2.0-63
- Use bcond_without to control conditional build
* Thu Dec 8 2022 Qiang Wei <qiang.wei@suse.com> - 10:6.2.0-62
- Make Ceph rbd support an optional feature.