From 0b608508743baa63220a92361f443af8557a2b9b Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Wed, 11 Sep 2013 13:44:10 +0200 Subject: qemu-block: fix building from distribution tarball when glib2-devel is installed Building RPMs from a 'make dist' tarball fails when qemu-block is enabled. Enabling is done automatically when the glib2 development files are available (enabled by ./configure). Manual building with: $ ./autogen.sh && ./configure && make dist && rpmbuild -ta *.tar.gz Building in mock works fine, glib2-devel is not installed by default so the qemu-block xlator gets disabled. This change also adds glib2-devel to the BuildRequires in the glusterfs.spec file, causing the qemu-block xlator to be built by default, and included in the glusterfs RPM. Change-Id: Ibb73628772586d9e07bbfde7a8ff2fc973489086 BUG: 986775 Signed-off-by: Niels de Vos Reviewed-on: http://review.gluster.org/5896 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- glusterfs.spec.in | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'glusterfs.spec.in') diff --git a/glusterfs.spec.in b/glusterfs.spec.in index a64e2ba7a..d654c085c 100644 --- a/glusterfs.spec.in +++ b/glusterfs.spec.in @@ -51,6 +51,15 @@ %define _without_bd --disable-bd-xlator %endif +# if you wish to compile an rpm without the qemu-block support... +# rpmbuild -ta @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz --without qemu-block +%{?_without_qemu_block:%global _without_qemu_block --disable-qemu-block} + +%if ( 0%{?rhel} && 0%{?rhel} < 6 ) +# xlators/features/qemu-block fails to build on RHEL5, disable it +%define _without_qemu_block --disable-qemu-block +%endif + %if ( 0%{?fedora} && 0%{?fedora} > 16 ) || ( 0%{?rhel} && 0%{?rhel} > 6 ) %global _with_systemd true %endif @@ -140,6 +149,9 @@ BuildRequires: systemtap-sdt-devel %if ( 0%{!?_without_bd:1} ) BuildRequires: lvm2-devel %endif +%if ( 0%{!?_without_qemu_block:1} ) +BuildRequires: glib2-devel +%endif Obsoletes: hekafs <= 0.7 Obsoletes: %{name}-libs <= 2.0.0 @@ -393,7 +405,16 @@ This package provides the api include files. %build ./autogen.sh -%configure %{?_without_rdma} %{?_without_epoll} %{?_without_fusermount} %{?_without_georeplication} %{?_without_ocf} %{?_without_syslog} %{?_without_bd} %{?_without_systemtap} +%configure \ + %{?_without_rdma} \ + %{?_without_epoll} \ + %{?_without_fusermount} \ + %{?_without_georeplication} \ + %{?_without_ocf} \ + %{?_without_syslog} \ + %{?_without_bd} \ + %{?_without_qemu_block} \ + %{?_without_systemtap} # fix hardening and remove rpath in shlibs %if ( 0%{?fedora} && 0%{?fedora} > 17 ) || ( 0%{?rhel} && 0%{?rhel} > 6 ) -- cgit