conga ./clustermon.spec.in.in ./conga.spec.in. ...
CVSROOT: /cvs/cluster
Module name: conga
Branch: RHEL5
Changes by: rmccabe at sourceware.org 2008-07-28 17:49:45
Modified files:
. : clustermon.spec.in.in conga.spec.in.in
make : version.in
ricci/modules/virt: Makefile Virt.cpp
ricci/test_suite/cluster: vm_list.xml
Log message:
Build fixes
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/clustermon.spec.in.in.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.18.2.38&r2=1.18.2.39
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/conga.spec.in.in.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.45.2.98&r2=1.45.2.99
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/make/version.in.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.21.2.41&r2=1.21.2.42
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/virt/Makefile.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1.2.1&r2=1.1.2.2
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/virt/Virt.cpp.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1.2.1&r2=1.1.2.2
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/test_suite/cluster/vm_list.xml.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1.2.1&r2=1.1.2.2
clustermon.spec.in.in +1 -19
@@ -27,22 +27,11 @@ Source0: %{name}-%{version}.tar.gz Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -%define virt_support 0 - -%ifarch i386 x86_64 ia64 -%define virt_support 0 -%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 -%if %{virt_support} -BuildRequires: libvirt-devel -Requires: libvirt -%endif - %description This package contains Red Hat Enterprise Linux Cluster Suite SNMP/CIM module/agent/provider.
@@ -52,17 +41,10 @@ %setup -q %build -%if %{virt_support} -%configure --arch=%{_arch} \ - --docdir=%{_docdir} \ - --pegasus_providers_dir=%{PEGASUS_PROVIDERS_DIR} \ - --include_zope_and_plone=no --VIRT_SUPPORT=0 -%else %configure --arch=%{_arch} \ --docdir=%{_docdir} \ --pegasus_providers_dir=%{PEGASUS_PROVIDERS_DIR} \ - --include_zope_and_plone=no --VIRT_SUPPORT=0 -%endif + --include_zope_and_plone=no make %{?_smp_mflags} clustermon
conga.spec.in.in +28 -8
@@ -31,6 +31,12 @@ %endif Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +%define virt_support 0 + +%ifarch i386 x86_64 ia64 +%define virt_support 1 +%endif + BuildRequires: python-devel >= 2.4.1 BuildRequires: glibc-devel gcc-c++ libxml2-devel sed BuildRequires: cyrus-sasl-devel >= 2.1
@@ -56,9 +62,16 @@ %endif %build +%if %{virt_support} %configure --arch=%{_arch} \ --docdir=%{_docdir} \ - --include_zope_and_plone=%{include_zope_and_plone} + --include_zope_and_plone=%{include_zope_and_plone} --VIRT_SUPPORT=1 +%else +%configure --arch=%{_arch} \ + --docdir=%{_docdir} \ + --include_zope_and_plone=%{include_zope_and_plone} --VIRT_SUPPORT=0 +%endif + make %{?_smp_mflags} conga %install
@@ -198,10 +211,16 @@ Requires: initscripts Requires: oddjob dbus openssl pam cyrus-sasl >= 2.1 Requires: sed util-linux -Requires: modcluster >= 0.10.0 +Requires: modcluster >= 0.12.0 # modreboot +# modvirt + +%if %{virt_support} +BuildRequires: libvirt-devel +%endif + # modrpm # modstorage
@@ -253,13 +272,14 @@ %config(noreplace) %{_sysconfdir}/dbus-1/system.d/ricci-modlog.systembus.conf %{_libexecdir}/ricci-modlog +# modvirt +%config(noreplace) %{_sysconfdir}/oddjobd.conf.d/ricci-modvirt.oddjob.conf +%config(noreplace) %{_sysconfdir}/dbus-1/system.d/ricci-modvirt.systembus.conf + %{_libexecdir}/ricci-modvirt + %pre -n ricci -if ! /bin/grep ^ricci\:x /etc/group >&/dev/null; then - /usr/sbin/groupadd -r -f ricci >&/dev/null -fi -if ! /bin/grep ^ricci\:x /etc/passwd >&/dev/null; then - /usr/sbin/useradd -r -M -s /sbin/nologin -d /var/lib/ricci -g ricci ricci >&/dev/null -fi +getent group ricci >/dev/null || groupadd -r ricci +getent passwd ricci >/dev/null || useradd -r -M -g ricci -d /var/lib/ricci -s /sbin/nologin -c "ricci daemon user" ricci exit 0 %post -n ricci
make/version.in +1 -1
@@ -1,2 +1,2 @@ VERSION=0.12.1 -RELEASE=0 +RELEASE=1
ricci/modules/virt/Makefile +8 -5
@@ -14,7 +14,7 @@ include ${top_srcdir}/make/defines.mk -TARGET = modvirt +TARGET = ricci-modvirt OBJECTS = main.o \ VirtModule.o \
@@ -22,8 +22,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
@@ -39,9 +42,9 @@ $(INSTALL_DIR) ${libexecdir} $(INSTALL_BIN) ${TARGET} ${libexecdir} $(INSTALL_DIR) ${sysconfdir}/oddjobd.conf.d - $(INSTALL_FILE) d-bus/modvirt.oddjob.conf ${sysconfdir}/oddjobd.conf.d + $(INSTALL_FILE) d-bus/ricci-modvirt.oddjob.conf ${sysconfdir}/oddjobd.conf.d $(INSTALL_DIR) ${sysconfdir}/dbus-1/system.d - $(INSTALL_FILE) d-bus/modvirt.systembus.conf ${sysconfdir}/dbus-1/system.d + $(INSTALL_FILE) d-bus/ricci-modvirt.systembus.conf ${sysconfdir}/dbus-1/system.d uninstall:
ricci/modules/virt/Virt.cpp +13 -0
@@ -23,7 +23,9 @@ #include <sys/stat.h> #include <string.h> #include <errno.h> +#if VIRT_SUPPORT == 1 #include <libvirt/libvirt.h> +#endif #include "sys_util.h" #include "base64.h"
@@ -53,6 +55,8 @@ return false; } +#if VIRT_SUPPORT == 1 + map<String, String> Virt::get_vm_list(const String &hvURI) { std::map<String, String> vm_list; int i;
@@ -130,3 +134,12 @@ virConnectClose(con); return vm_list; } + +#else + +map<String, String> Virt::get_vm_list(const String &hvURI) { + std::map<String, String> vm_list; + return vm_list; +} + +#endif
ricci/test_suite/cluster/vm_list.xml +1 -1
@@ -2,7 +2,7 @@ <ricci version="1.0" function="process_batch" async="false"> <batch> -<module name="cluster"> +<module name="virt"> <request sequence="1254" API_version="1.0"> <function_call name="list_vm" /> </request>