From: rmccabe@sourceware.org <rmccabe@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] conga ./clustermon.spec.in.in ricci/modules/cl ...
Date: 24 Mar 2008 18:13:59 -0000 [thread overview]
Message-ID: <20080324181359.933.qmail@sourceware.org> (raw)
CVSROOT: /cvs/cluster
Module name: conga
Branch: RHEL5
Changes by: rmccabe at 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
next reply other threads:[~2008-03-24 18:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-24 18:13 rmccabe [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-03-31 17:23 [Cluster-devel] conga ./clustermon.spec.in.in ricci/modules/cl rmccabe
2007-11-02 5:44 rmccabe
2007-10-09 19:58 rmccabe
2006-12-13 19:14 kupcevic
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080324181359.933.qmail@sourceware.org \
--to=rmccabe@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).