From f7b65c53f25a95cad9e52c18de88c73e0e41881eb7e38e10b7bd4fa59d367f38 Mon Sep 17 00:00:00 2001 From: Bruce Rogers Date: Tue, 12 Jul 2016 20:12:45 +0000 Subject: [PATCH] Accepting request 407943 from home:bfrogers:branches:Virtualization Enable ceph (rbd) where possible OBS-URL: https://build.opensuse.org/request/show/407943 OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=303 --- qemu-testsuite.changes | 5 +++++ qemu-testsuite.spec | 47 ++++++++++++++++++++++++++++++++++++++++++ qemu.changes | 5 +++++ qemu.spec | 47 ++++++++++++++++++++++++++++++++++++++++++ qemu.spec.in | 47 ++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 151 insertions(+) diff --git a/qemu-testsuite.changes b/qemu-testsuite.changes index 71551775..9b86431e 100644 --- a/qemu-testsuite.changes +++ b/qemu-testsuite.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jul 12 18:20:24 UTC 2016 - brogers@suse.com + +- Enable ceph (rbd) support + ------------------------------------------------------------------- Mon Jul 4 06:20:16 UTC 2016 - glin@suse.com diff --git a/qemu-testsuite.spec b/qemu-testsuite.spec index 3fababac..fd234737 100644 --- a/qemu-testsuite.spec +++ b/qemu-testsuite.spec @@ -46,6 +46,12 @@ %endif %define noarch_supported 1110 +%ifarch x86_64 +%if 0%{?suse_version} > 1320 || ( 0%{?suse_version} == 1315 && ( 0%{?is_opensuse} == 0 || 0%{?sle_version} == 120200 ) ) +%define with_rbd 1 +%endif +%endif + Name: qemu-testsuite Url: http://www.qemu.org/ Summary: Universal CPU emulator @@ -202,6 +208,13 @@ BuildRequires: libgnutls-devel %if 0%{?suse_version} >= 1315 BuildRequires: libibverbs-devel %endif +%if 0%{?with_rbd} +%if 0%{?is_opensuse} +BuildRequires: librbd-devel +%else +BuildRequires: ceph-devel +%endif +%endif %if 0%{?suse_version} > 1320 BuildRequires: libiscsi-devel %endif @@ -335,6 +348,9 @@ Suggests: qemu-block-gluster %if 0%{?suse_version} > 1320 Suggests: qemu-block-iscsi %endif +%if 0%{?with_rbd} +Suggests: qemu-block-rbd +%endif %if 0%{?suse_version} > 1140 Suggests: qemu-block-ssh %endif @@ -550,6 +566,23 @@ This sub-package contains a module for accessing network-based image files over an iSCSI network connection from qemu-img tool and QEMU system emulation. %endif +%if 0%{?with_rbd} +%package block-rbd +Summary: Universal CPU emulator -- Ceph (rbd) block support +Group: System/Emulators/PC +%{qemu_module_conflicts} + +%description block-rbd +QEMU is an extremely well-performing CPU emulator that allows you to +choose between simulating an entire system and running userspace +binaries for different architectures under your native operating +system. It currently emulates x86, ARM, PowerPC and SPARC CPUs as well +as PC and PowerMac systems. + +This sub-package contains a module for accessing ceph (rbd,rados) +image files. +%endif + %if 0%{?suse_version} > 1140 %package block-ssh Summary: Universal CPU emulator -- SSH block support @@ -573,6 +606,9 @@ Group: System/Emulators/PC Provides: qemu:%_libexecdir/qemu-bridge-helper PreReq: permissions Recommends: qemu-block-curl +%if 0%{?with_rbd} +Recommends: qemu-block-rbd +%endif %description tools QEMU is an extremely well-performing CPU emulator that allows you to @@ -850,7 +886,11 @@ rm -f pc-bios/slof.bin --enable-numa \ %endif %endif +%if 0%{?with_rbd} + --enable-rbd \ +%else --disable-rbd \ +%endif %if 0%{?suse_version} >= 1315 --enable-rdma \ %else @@ -1238,6 +1278,13 @@ fi %_libdir/%name/block-iscsi.so %endif +%if 0%{?with_rbd} +%files block-rbd +%defattr(-, root, root) +%dir %_libdir/%name +%_libdir/%name/block-rbd.so +%endif + %if 0%{?suse_version} > 1140 %files block-ssh %defattr(-, root, root) diff --git a/qemu.changes b/qemu.changes index 71551775..9b86431e 100644 --- a/qemu.changes +++ b/qemu.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jul 12 18:20:24 UTC 2016 - brogers@suse.com + +- Enable ceph (rbd) support + ------------------------------------------------------------------- Mon Jul 4 06:20:16 UTC 2016 - glin@suse.com diff --git a/qemu.spec b/qemu.spec index 19bb6019..51cb9902 100644 --- a/qemu.spec +++ b/qemu.spec @@ -46,6 +46,12 @@ %endif %define noarch_supported 1110 +%ifarch x86_64 +%if 0%{?suse_version} > 1320 || ( 0%{?suse_version} == 1315 && ( 0%{?is_opensuse} == 0 || 0%{?sle_version} == 120200 ) ) +%define with_rbd 1 +%endif +%endif + Name: qemu Url: http://www.qemu.org/ Summary: Universal CPU emulator @@ -202,6 +208,13 @@ BuildRequires: libgnutls-devel %if 0%{?suse_version} >= 1315 BuildRequires: libibverbs-devel %endif +%if 0%{?with_rbd} +%if 0%{?is_opensuse} +BuildRequires: librbd-devel +%else +BuildRequires: ceph-devel +%endif +%endif %if 0%{?suse_version} > 1320 BuildRequires: libiscsi-devel %endif @@ -335,6 +348,9 @@ Suggests: qemu-block-gluster %if 0%{?suse_version} > 1320 Suggests: qemu-block-iscsi %endif +%if 0%{?with_rbd} +Suggests: qemu-block-rbd +%endif %if 0%{?suse_version} > 1140 Suggests: qemu-block-ssh %endif @@ -550,6 +566,23 @@ This sub-package contains a module for accessing network-based image files over an iSCSI network connection from qemu-img tool and QEMU system emulation. %endif +%if 0%{?with_rbd} +%package block-rbd +Summary: Universal CPU emulator -- Ceph (rbd) block support +Group: System/Emulators/PC +%{qemu_module_conflicts} + +%description block-rbd +QEMU is an extremely well-performing CPU emulator that allows you to +choose between simulating an entire system and running userspace +binaries for different architectures under your native operating +system. It currently emulates x86, ARM, PowerPC and SPARC CPUs as well +as PC and PowerMac systems. + +This sub-package contains a module for accessing ceph (rbd,rados) +image files. +%endif + %if 0%{?suse_version} > 1140 %package block-ssh Summary: Universal CPU emulator -- SSH block support @@ -573,6 +606,9 @@ Group: System/Emulators/PC Provides: qemu:%_libexecdir/qemu-bridge-helper PreReq: permissions Recommends: qemu-block-curl +%if 0%{?with_rbd} +Recommends: qemu-block-rbd +%endif %description tools QEMU is an extremely well-performing CPU emulator that allows you to @@ -850,7 +886,11 @@ rm -f pc-bios/slof.bin --enable-numa \ %endif %endif +%if 0%{?with_rbd} + --enable-rbd \ +%else --disable-rbd \ +%endif %if 0%{?suse_version} >= 1315 --enable-rdma \ %else @@ -1238,6 +1278,13 @@ fi %_libdir/%name/block-iscsi.so %endif +%if 0%{?with_rbd} +%files block-rbd +%defattr(-, root, root) +%dir %_libdir/%name +%_libdir/%name/block-rbd.so +%endif + %if 0%{?suse_version} > 1140 %files block-ssh %defattr(-, root, root) diff --git a/qemu.spec.in b/qemu.spec.in index 5c48cec4..c8aa1b96 100644 --- a/qemu.spec.in +++ b/qemu.spec.in @@ -46,6 +46,12 @@ %endif %define noarch_supported 1110 +%ifarch x86_64 +%if 0%{?suse_version} > 1320 || ( 0%{?suse_version} == 1315 && ( 0%{?is_opensuse} == 0 || 0%{?sle_version} == 120200 ) ) +%define with_rbd 1 +%endif +%endif + Name: qemu Url: http://www.qemu.org/ Summary: Universal CPU emulator @@ -142,6 +148,13 @@ BuildRequires: libgnutls-devel %if 0%{?suse_version} >= 1315 BuildRequires: libibverbs-devel %endif +%if 0%{?with_rbd} +%if 0%{?is_opensuse} +BuildRequires: librbd-devel +%else +BuildRequires: ceph-devel +%endif +%endif %if 0%{?suse_version} > 1320 BuildRequires: libiscsi-devel %endif @@ -275,6 +288,9 @@ Suggests: qemu-block-gluster %if 0%{?suse_version} > 1320 Suggests: qemu-block-iscsi %endif +%if 0%{?with_rbd} +Suggests: qemu-block-rbd +%endif %if 0%{?suse_version} > 1140 Suggests: qemu-block-ssh %endif @@ -490,6 +506,23 @@ This sub-package contains a module for accessing network-based image files over an iSCSI network connection from qemu-img tool and QEMU system emulation. %endif +%if 0%{?with_rbd} +%package block-rbd +Summary: Universal CPU emulator -- Ceph (rbd) block support +Group: System/Emulators/PC +%{qemu_module_conflicts} + +%description block-rbd +QEMU is an extremely well-performing CPU emulator that allows you to +choose between simulating an entire system and running userspace +binaries for different architectures under your native operating +system. It currently emulates x86, ARM, PowerPC and SPARC CPUs as well +as PC and PowerMac systems. + +This sub-package contains a module for accessing ceph (rbd,rados) +image files. +%endif + %if 0%{?suse_version} > 1140 %package block-ssh Summary: Universal CPU emulator -- SSH block support @@ -513,6 +546,9 @@ Group: System/Emulators/PC Provides: qemu:%_libexecdir/qemu-bridge-helper PreReq: permissions Recommends: qemu-block-curl +%if 0%{?with_rbd} +Recommends: qemu-block-rbd +%endif %description tools QEMU is an extremely well-performing CPU emulator that allows you to @@ -731,7 +767,11 @@ rm -f pc-bios/slof.bin --enable-numa \ %endif %endif +%if 0%{?with_rbd} + --enable-rbd \ +%else --disable-rbd \ +%endif %if 0%{?suse_version} >= 1315 --enable-rdma \ %else @@ -1121,6 +1161,13 @@ fi %_libdir/%name/block-iscsi.so %endif +%if 0%{?with_rbd} +%files block-rbd +%defattr(-, root, root) +%dir %_libdir/%name +%_libdir/%name/block-rbd.so +%endif + %if 0%{?suse_version} > 1140 %files block-ssh %defattr(-, root, root)