
Right now the spec file is completely tied to tog-pegasus, this should allow the spec file to be compatible with sblim-sfcb too. This also switches to systemctl which is now used in Fedora. I would actually like some feedback on the patch if someone has an environment to test with sblim-sfcb Also I noted that if I built the package with sblim-sfcb installed it failed in the make install phase with the following error: ---------------------------------------------------------- /bin/sh /u/veillard/rpms/BUILD/libvirt-cim-0.6.1/install-sh -c -m 644 -t "/u/veillard/rpms/BUILDROOT/libvirt-cim-0.6.1-2.fc18.x86_64/usr/share/libvirt-cim" ./schema/RegisteredProfile.registration ./schema/ElementConformsToProfile.registration ./schema/ReferencedProfile.registration if [[ sfcb != pegasus ]]; then \ sed -i '/^# --/,/^# --!/d' .//u/veillard/rpms/BUILDROOT/libvirt-cim-0.6.1-2.fc18.x86_64/usr/share/libvirt-cim/RegisteredProfile.registration .//u/veillard/rpms/BUILDROOT/libvirt-cim-0.6.1-2.fc18.x86_64/usr/share/libvirt-cim/ElementConformsToProfile.registration .//u/veillard/rpms/BUILDROOT/libvirt-cim-0.6.1-2.fc18.x86_64/usr/share/libvirt-cim/ReferencedProfile.registration; \ fi sed: can't read .//u/veillard/rpms/BUILDROOT/libvirt-cim-0.6.1-2.fc18.x86_64/usr/share/libvirt-cim/RegisteredProfile.registration: No such file or directory sed: can't read .//u/veillard/rpms/BUILDROOT/libvirt-cim-0.6.1-2.fc18.x86_64/usr/share/libvirt-cim/ElementConformsToProfile.registration: No such file or directory sed: can't read .//u/veillard/rpms/BUILDROOT/libvirt-cim-0.6.1-2.fc18.x86_64/usr/share/libvirt-cim/ReferencedProfile.registration: No such file or directory make[2]: *** [install-data-local] Error 2 make[2]: Leaving directory `/home/veillard/rpms/BUILD/libvirt-cim-0.6.1' make[1]: *** [install-am] Error 2 make[1]: Leaving directory `/home/veillard/rpms/BUILD/libvirt-cim-0.6.1' make: *** [install-recursive] Error 1 ---------------------------------------------------------- Any idea ? thanks, Daniel --- libvirt-cim.spec 2012-02-10 13:49:31.679905149 +0800 +++ libvirt-cim.spec 2012-03-09 14:41:45.617781910 +0800 @@ -12,7 +12,8 @@ Requires: libxml2 >= 2.6.0 Requires: libvirt >= 0.9.0 Requires: unzip -Requires: tog-pegasus +# either tog-pegasus or sblim-sfcb should provide cim-server +Requires: cim-server BuildRequires: libcmpiutil >= 0.5.4 BuildRequires: tog-pegasus-devel BuildRequires: libvirt-devel >= 0.9.0 @@ -85,8 +86,18 @@ %{_datadir}/%{name}/install_base_schema.sh %{_datadir}/%{name} -/etc/init.d/tog-pegasus condrestart +if [ "`systemctl is-active tog-pegasus.service`" = "active" ] +then + systemctl restart tog-pegasus.service +fi + +if [ "`systemctl is-active sblim-sfcb.service`" = "active" ] +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 @@ -102,8 +113,29 @@ %{_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 @@ -116,6 +148,22 @@ %{_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 -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/