[libvirt-cim/f17] Improve support with sblim-sfcb

Daniel Veillard veillard at fedoraproject.org
Mon Mar 12 09:30:14 UTC 2012


commit d8af7b46a1f5863ba602d90dd4afdc9797bdc6a6
Author: Daniel Veillard <veillard at redhat.com>
Date:   Mon Mar 12 17:20:49 2012 +0800

    Improve support with sblim-sfcb
    
    fix build in the presence of sblim-sfcb
    add schemas (de)registration with sfcb if found
    Daniel

 libvirt-cim-0.6.1-fix-sfcb-install.patch |   12 +++++++
 libvirt-cim.spec                         |   48 +++++++++++++++++++++++++++++-
 2 files changed, 59 insertions(+), 1 deletions(-)
---
diff --git a/libvirt-cim-0.6.1-fix-sfcb-install.patch b/libvirt-cim-0.6.1-fix-sfcb-install.patch
new file mode 100644
index 0000000..e751e53
--- /dev/null
+++ b/libvirt-cim-0.6.1-fix-sfcb-install.patch
@@ -0,0 +1,12 @@
+diff -wruN -x '*~' ../orig-libvirt-cim-0.6.1/Makefile.am ./Makefile.am
+--- ../orig-libvirt-cim-0.6.1/Makefile.am	2012-02-08 14:23:43.000000000 +0100
++++ ./Makefile.am	2012-02-09 16:45:16.000000000 +0100
+@@ -189,7 +189,7 @@
+ 	$(install_sh_DATA) -t "$(DESTDIR)$(pkgdatadir)" $(INTEROP_MOFS)
+ 	$(install_sh_DATA) -t "$(DESTDIR)$(pkgdatadir)" $(INTEROP_REGS)
+ 	if [[ @CIMSERVER@ != pegasus ]]; then \
+-	sed -i '/^# --/,/^# --!/d' $(subst schema,$(DESTDIR)$(pkgdatadir), $(PGINTEROP_REGS)); \
++	sed -i '/^# --/,/^# --!/d' $(subst ./schema,$(DESTDIR)$(pkgdatadir), $(PGINTEROP_REGS)); \
+ 	fi
+ 
+ uninstall-local:
diff --git a/libvirt-cim.spec b/libvirt-cim.spec
index 033233f..0b13927 100644
--- a/libvirt-cim.spec
+++ b/libvirt-cim.spec
@@ -3,7 +3,7 @@
 Summary: A CIM provider for libvirt
 Name: libvirt-cim
 Version: 0.6.1
-Release: 1%{?dist}%{?extra_release}
+Release: 2%{?dist}%{?extra_release}
 License: LGPLv2+
 Group: Development/Libraries
 Source: libvirt-cim-%{version}.tar.gz
@@ -18,6 +18,8 @@ BuildRequires: libcmpiutil >= 0.5.4
 BuildRequires: tog-pegasus-devel
 BuildRequires: libvirt-devel >= 0.9.0
 
+Patch0: libvirt-cim-0.6.1-fix-sfcb-install.patch
+
 # In RHEL5 uuid-devel is provided by e2fsprogs
 %if 0%{?el5}
 BuildRequires: e2fsprogs-devel
@@ -38,6 +40,7 @@ platforms with a single provider.
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 %configure --disable-werror
@@ -96,6 +99,8 @@ then
     systemctl restart sblim-sfcb.service
 fi
 
+if [ -x /usr/sbin/cimserver ]
+then
 %{_datadir}/%{name}/provider-register.sh -t pegasus \
 	-n root/virt \
 	-r %{REGISTRATION} -m %{SCHEMA} >/dev/null 2>&1 || true
@@ -111,8 +116,29 @@ fi
 %{_datadir}/%{name}/provider-register.sh -t pegasus \
         -n root/cimv2\
         -r %{CIMV2_REG} -m %{CIMV2_MOF} -v >/dev/null 2>&1 || true
+fi
+if [ -x /usr/sbin/sfcbd ]
+then
+%{_datadir}/%{name}/provider-register.sh -t sfcb \
+	-n root/virt \
+	-r %{REGISTRATION} -m %{SCHEMA} >/dev/null 2>&1 || true
+%{_datadir}/%{name}/provider-register.sh -t sfcb \
+        -n root/virt \
+        -r %{REGISTRATION} -m %{SCHEMA} >/dev/null 2>&1 || true
+%{_datadir}/%{name}/provider-register.sh -t sfcb \
+        -n root/interop \
+        -r %{INTEROP_REG} -m %{INTEROP_MOF} -v >/dev/null 2>&1 || true
+%{_datadir}/%{name}/provider-register.sh -t sfcb \
+        -n root/PG_InterOp \
+        -r %{PGINTEROP_REG} -m %{PGINTEROP_MOF} -v >/dev/null 2>&1 || true
+%{_datadir}/%{name}/provider-register.sh -t sfcb \
+        -n root/cimv2\
+        -r %{CIMV2_REG} -m %{CIMV2_MOF} -v >/dev/null 2>&1 || true
+fi
 
 %preun
+if [ -x /usr/sbin/cimserver ]
+then
 %{_datadir}/%{name}/provider-register.sh -d -t pegasus \
 	-n root/virt \
 	-r %{REGISTRATION} -m %{SCHEMA} >/dev/null 2>&1 || true
@@ -125,6 +151,22 @@ fi
 %{_datadir}/%{name}/provider-register.sh -d -t pegasus \
 	-n root/cimv2 \
 	-r %{CIMV2_REG} -m %{CIMV2_MOF} >/dev/null 2>&1 || true
+fi
+if [ -x /usr/sbin/sfcbd ]
+then
+%{_datadir}/%{name}/provider-register.sh -d -t sfcb \
+	-n root/virt \
+	-r %{REGISTRATION} -m %{SCHEMA} >/dev/null 2>&1 || true
+%{_datadir}/%{name}/provider-register.sh -d -t sfcb \
+	-n root/interop \
+	-r %{INTEROP_REG} -m %{INTEROP_MOF} >/dev/null 2>&1 || true
+%{_datadir}/%{name}/provider-register.sh -d -t sfcb \
+	-n root/PG_InterOp \
+	-r %{PGINTEROP_REG} -m %{PGINTEROP_MOF} >/dev/null 2>&1 || true
+%{_datadir}/%{name}/provider-register.sh -d -t sfcb \
+	-n root/cimv2 \
+	-r %{CIMV2_REG} -m %{CIMV2_MOF} >/dev/null 2>&1 || true
+fi
 
 %postun -p /sbin/ldconfig
 
@@ -148,6 +190,10 @@ fi
 %config(noreplace) %{_sysconfdir}/libvirt-cim.conf
 
 %changelog
+* Mon Mar 12 2012 Daniel Veillard <veillard at redhat.com> - 0.6.1-2
+- fix build in the presence of sblim-sfcb
+- add schemas (de)registration with sfcb if found
+
 * Mon Mar  5 2012 Daniel Veillard <veillard at redhat.com> - 0.6.1-1
 - update to upstream release 0.6.1
 - allow to use tog-pegasus or sblimfscb


More information about the scm-commits mailing list