[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] conga ./clustermon.spec.in.in ricci/modules/cl ...



CVSROOT:	/cvs/cluster
Module name:	conga
Branch: 	RHEL5
Changes by:	rmccabe sourceware org	2008-03-24 18:13:58

Modified files:
	.              : clustermon.spec.in.in 
	ricci/modules/cluster: Makefile Virt.cpp 

Log message:
	Jump through the requisite hoops to make this compile properly on arches that don't provide libvirt

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/clustermon.spec.in.in.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.18.2.33&r2=1.18.2.34
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/cluster/Makefile.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.14.2.5&r2=1.14.2.6
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/cluster/Virt.cpp.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1.2.4&r2=1.1.2.5

--- conga/clustermon.spec.in.in	2008/03/19 20:10:47	1.18.2.33
+++ conga/clustermon.spec.in.in	2008/03/24 18:13:58	1.18.2.34
@@ -27,12 +27,23 @@
 Source0: %{name}-%{version}.tar.gz
 Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
-BuildRequires: cman-devel libvirt-devel
+%define virt_support 0
+
+%ifarch i386 x86_64 ia64
+%define virt_support 1
+%endif
+
+BuildRequires: cman-devel
 BuildRequires: glibc-devel gcc-c++ libxml2-devel
 BuildRequires: openssl-devel dbus-devel pam-devel pkgconfig
 BuildRequires: net-snmp-devel tog-pegasus-devel
 
-Requires: libvirt libxml2
+%if %{virt_support}
+BuildRequires: libvirt-devel
+Requires: libvirt
+%endif 
+
+Requires: libxml2
 
 %description
 This package contains Red Hat Enterprise Linux Cluster Suite
@@ -43,10 +54,18 @@
 %setup -q
 
 %build
+%if %{virt_support}
 %configure		--arch=%{_arch} \
 		--docdir=%{_docdir} \
 		--pegasus_providers_dir=%{PEGASUS_PROVIDERS_DIR} \
-		--include_zope_and_plone=no
+		--include_zope_and_plone=no --VIRT_SUPPORT=1
+%else
+%configure		--arch=%{_arch} \
+		--docdir=%{_docdir} \
+		--pegasus_providers_dir=%{PEGASUS_PROVIDERS_DIR} \
+		--include_zope_and_plone=no --VIRT_SUPPORT=0
+%endif
+
 make %{?_smp_mflags} clustermon
 
 %install
--- conga/ricci/modules/cluster/Makefile	2008/03/19 14:45:33	1.14.2.5
+++ conga/ricci/modules/cluster/Makefile	2008/03/24 18:13:58	1.14.2.6
@@ -26,8 +26,11 @@
 
 PARANOID=0
 INCLUDE += -I${top_srcdir}/common/
-CXXFLAGS += -DPARANOIA=$(PARANOID)
-LDFLAGS += -lvirt
+CXXFLAGS += -DPARANOIA=$(PARANOID) -DVIRT_SUPPORT=$(VIRT_SUPPORT)
+
+ifeq ($(VIRT_SUPPORT), 1)
+	LDFLAGS += -lvirt
+endif
 
 ifeq ($(PARANOID), 1)
 	LDFLAGS += ${top_srcdir}/common/paranoid/*.o
--- conga/ricci/modules/cluster/Virt.cpp	2008/03/19 14:45:33	1.1.2.4
+++ conga/ricci/modules/cluster/Virt.cpp	2008/03/24 18:13:58	1.1.2.5
@@ -23,7 +23,9 @@
 	#include <sys/stat.h>
 	#include <string.h>
 	#include <errno.h>
-	#include <libvirt/libvirt.h>
+	#if VIRT_SUPPORT == 1
+	#	include <libvirt/libvirt.h>
+	#endif
 
 	#include "sys_util.h"
 	#include "base64.h"
@@ -178,6 +180,7 @@
 	return (key_out);
 }
 
+#if VIRT_SUPPORT == 1
 map<String, String> Virt::get_vm_list(const String &hvURI) {
 	std::map<String, String> vm_list;
 	int i;
@@ -255,3 +258,10 @@
 	virConnectClose(con);
 	return vm_list;
 }
+#else
+map<String, String> Virt::get_vm_list(const String &hvURI) {
+	std::map<String, String> vm_list;
+	throw String("Not implemented on this architecture");
+	return vm_list;
+}
+#endif


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]