Make Ceph rbd support optional

Signed-off-by: Qiang Wei <qiang.wei@suse.com>
(cherry picked from commit 8c06fb9dd9a12341f29aad3e7296a6c32587067a)
This commit is contained in:
Qiang Wei 2022-12-08 15:42:01 +08:00 committed by openeuler-sync-bot
parent 4e9ddedacb
commit d2867e8c56

View File

@ -1,6 +1,9 @@
# Whether to support Ceph rbd storage backend
%define with_storage_rbd 0%{!?_without_storage_rbd:1}
Name: qemu
Version: 6.2.0
Release: 61
Release: 62
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
@ -477,7 +480,9 @@ BuildRequires: libudev-devel
BuildRequires: pam-devel
BuildRequires: perl-Test-Harness
BuildRequires: python3-devel
%if %{with_storage_rbd}
BuildRequires: librbd-devel
%endif
BuildRequires: krb5-devel
BuildRequires: libssh-devel
BuildRequires: glib2
@ -538,10 +543,12 @@ 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}
%package block-rbd
Summary: Qemu-block-rbd
%description block-rbd
This package provides RBD support for Qemu
%endif
%package block-ssh
Summary: Qemu-block-ssh
@ -661,7 +668,11 @@ cd ../
--enable-virglrenderer \
--enable-cap-ng \
--enable-libusb \
%if %{with_storage_rbd}
--enable-rbd \
%else
--disable-rbd \
%endif
--disable-dmg \
--disable-qcow1 \
--disable-vdi \
@ -752,7 +763,9 @@ 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}
strip %{buildroot}%{_libdir}/%{name}/block-rbd.so
%endif
strip %{buildroot}%{_libdir}/%{name}/block-iscsi.so
strip %{buildroot}%{_libdir}/%{name}/block-curl.so
strip %{buildroot}%{_libdir}/%{name}/block-ssh.so
@ -930,8 +943,10 @@ getent passwd qemu >/dev/null || \
%{_bindir}/qemu-nbd
%{_bindir}/qemu-storage-daemon
%if %{with_storage_rbd}
%files block-rbd
%{_libdir}/%{name}/block-rbd.so
%endif
%files block-ssh
%{_libdir}/%{name}/block-ssh.so
@ -952,6 +967,9 @@ getent passwd qemu >/dev/null || \
%endif
%changelog
* Thu Dec 8 2022 Qiang Wei <qiang.wei@suse.com> - 10:6.2.0-62
- Make Ceph rbd support an optional feature.
* Wed Dec 07 2022 yezengruan <yezengruan@huawei.com> - 10:6.2.0-61
- BuildRequires add make