[Libvirt-cim] [PATCH] Change installed namespace to root/virt

Daniel Veillard veillard at redhat.com
Fri Nov 9 09:12:53 UTC 2007


On Thu, Nov 08, 2007 at 01:56:43PM -0700, Dan Smith wrote:
> # HG changeset patch
> # User Dan Smith <danms at us.ibm.com>
> # Date 1194558864 28800
> # Node ID 90ffd19dda747eb615f12b10aa04e4f9bc978b31
> # Parent  114b074cb5e710e6c3613ca89edf205bbf945d4c
> Change installed namespace to root/virt
> 
> This one deserves some serious testing, although I was pleasantly surprised
> at how few instances of the namespace we had hard-coded.  We could probably
> use a configure flag to set the namespace, but the schema files would all
> have to change before it would work, so I'm not sure it's worth it.
> 
> Signed-off-by: Dan Smith <danms at us.ibm.com>
> 
> diff -r 114b074cb5e7 -r 90ffd19dda74 Makefile.am
> --- a/Makefile.am	Thu Nov 08 12:47:38 2007 -0800
> +++ b/Makefile.am	Thu Nov 08 13:54:24 2007 -0800
> @@ -81,11 +81,11 @@ EXTRA_DIST = schema $(pkgdata_DATA) $(pk
>  # Un/Register the providers and class definitions from/to the current CIMOM.
>  # @CIMSERVER@ is set by the configure script
>  postinstall:
> -	sh provider-register.sh -v -t @CIMSERVER@ -n /root/ibmsd -r $(REGS) -m $(MOFS)
> +	sh provider-register.sh -v -t @CIMSERVER@ -n /root/virt -r $(REGS) -m $(MOFS)
>  	sh provider-register.sh -v -t @CIMSERVER@ -n /root/interop -r $(INTEROP_REGS) -m $(INTEROP_MOFS)

  In general root's home does not sound the proper place for storing
system data, is there really no way to put this somewhere under /var instead ?

  The part below seems unrelated to the namespace change :-) but fine by me

> diff -r 114b074cb5e7 -r 90ffd19dda74 doc/Makefile.am
> --- a/doc/Makefile.am	Thu Nov 08 12:47:38 2007 -0800
> +++ b/doc/Makefile.am	Thu Nov 08 13:54:24 2007 -0800
> @@ -1,6 +1,8 @@ XSLTPROC = /usr/bin/xsltproc
>  XSLTPROC = /usr/bin/xsltproc
>  
>  WEB_PAGES = index.html
> +
> +EXTRA_DIST = site.xsl libvirt-cim.html

  Any chance to also add all the generated HTML pages ? That way we are
sure the package will include the documentation in its final form, and
even if xsltproc is not installed "make install" will suceed.
  We also need to initialize $(XSLTPROC) with a configure check if possible

>  $(WEB_PAGES): libvirt-cim.html site.xsl
>  	$(XSLTPROC) --nonet --html $(top_srcdir)/doc/site.xsl $(top_srcdir)/doc/libvirt-cim.html > index.html
> diff -r 114b074cb5e7 -r 90ffd19dda74 doc/libvirt-cim.html
[...]
> @@ -142,7 +142,7 @@ static bool async_ind(CMPIContext *conte
>          CMPIStatus s;
>          const char *type_name;
>          char *type_cn = NULL;
> -        const char *ns = "root/ibmsd";
> +        const char *ns = "root/virt";
>  
>          /* FIXME: Hmm, need to get the namespace a better way */
>  
> diff -r 114b074cb5e7 -r 90ffd19dda74 src/Virt_ElementConformsToProfile.c
> --- a/src/Virt_ElementConformsToProfile.c	Thu Nov 08 12:47:38 2007 -0800
> +++ b/src/Virt_ElementConformsToProfile.c	Thu Nov 08 13:54:24 2007 -0800
> @@ -64,7 +64,7 @@ static CMPIStatus elem_instances(const C
>                  goto out;
>          }
>  
> -        op = CMNewObjectPath(_BROKER, "/root/ibmsd", classname, &s);
> +        op = CMNewObjectPath(_BROKER, "/root/virt", classname, &s);
>          if ((s.rc != CMPI_RC_OK) || CMIsNullObject(op))
>                  goto error;

  Can't this go under $(datadir)/libvirt-cim ?
If we could export this from config.h as a define I guess that would be 
perfect.

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
veillard at redhat.com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/




More information about the Libvirt-cim mailing list