Re: [libvirt] [PATCH] Use XDG Base Directories instead of storing in home directory

2012-05-03 Thread Daniel P. Berrange
On Wed, May 02, 2012 at 01:53:36PM -0400, William Jon McCann wrote: > +static int migrateProfile(void) > +{ > +char *old_base = NULL; > +char *updated = NULL; > +char *home = NULL; > +char *xdg_dir = NULL; > +char *config_dir = NULL; > +const char *config_home; > +int r

Re: [libvirt] [PATCH] Use XDG Base Directories instead of storing in home

2012-05-03 Thread Christophe Fergeau
Hey, On Wed, May 02, 2012 at 01:49:42PM -0400, William Jon McCann wrote: > Hi, > > On Wed, May 2, 2012 at 6:26 AM, Christophe Fergeau > wrote: > > Hey, > > > > On Mon, Apr 30, 2012 at 02:55:06PM -0400, William Jon McCann wrote: > >> This has a number of advantages for us: > >> > >>     It allow

Re: [libvirt] [PATCH] Use XDG Base Directories instead of storing in home directory

2012-05-02 Thread Eric Blake
On 05/02/2012 12:13 PM, Zeeshan Ali (Khattak) wrote: > On Wed, May 2, 2012 at 9:02 PM, Eric Blake wrote: >> On 05/02/2012 11:53 AM, William Jon McCann wrote: >>> As defined in: >>> http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html >> >> If I'm not mistaken, this is v3? When u

Re: [libvirt] [PATCH] Use XDG Base Directories instead of storing in home directory

2012-05-02 Thread Zeeshan Ali (Khattak)
On Wed, May 2, 2012 at 9:02 PM, Eric Blake wrote: > On 05/02/2012 11:53 AM, William Jon McCann wrote: >> As defined in: >> http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html > > If I'm not mistaken, this is v3?  When using git send-mail, you can use > --subject-prefix=PATCHv3 t

Re: [libvirt] [PATCH] Use XDG Base Directories instead of storing in home directory

2012-05-02 Thread Eric Blake
On 05/02/2012 11:53 AM, William Jon McCann wrote: > As defined in: > http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html If I'm not mistaken, this is v3? When using git send-mail, you can use --subject-prefix=PATCHv3 to make it more obvious to reviewers. > > This offers a num

[libvirt] [PATCH] Use XDG Base Directories instead of storing in home directory

2012-05-02 Thread William Jon McCann
As defined in: http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html This offers a number of advantages: * Allows sharing a home directory between different machines, or sessions (eg. using NFS) * Cleanly separates cache, runtime (eg. sockets), or app data from user settings *

Re: [libvirt] [PATCH] Use XDG Base Directories instead of storing in home

2012-05-02 Thread William Jon McCann
Hi, On Wed, May 2, 2012 at 6:26 AM, Christophe Fergeau wrote: > Hey, > > On Mon, Apr 30, 2012 at 02:55:06PM -0400, William Jon McCann wrote: >> This has a number of advantages for us: >> >>     It allows sharing a home directory between different machines, or >> sessions (eg. using NFS) >>     Su

Re: [libvirt] [PATCH] Use XDG Base Directories instead of storing in home directory

2012-05-02 Thread William Jon McCann
On Wed, May 2, 2012 at 11:30 AM, Daniel P. Berrange wrote: > On Tue, May 01, 2012 at 09:50:31AM -0400, William Jon McCann wrote: >> +static int migrateProfile(void) >> +{ >> +    char *old_base = NULL; >> +    char *updated = NULL; >> +    char *home = NULL; >> +    char *xdg_dir = NULL; >> +    c

Re: [libvirt] [PATCH] Use XDG Base Directories instead of storing in home directory

2012-05-02 Thread Daniel P. Berrange
On Tue, May 01, 2012 at 09:50:31AM -0400, William Jon McCann wrote: > +static int migrateProfile(void) > +{ > +char *old_base = NULL; > +char *updated = NULL; > +char *home = NULL; > +char *xdg_dir = NULL; > +char *config_dir = NULL; > +int ret = -1; > +mode_t old_umask;

Re: [libvirt] [PATCH] Use XDG Base Directories instead of storing in home

2012-05-02 Thread Christophe Fergeau
Hey, On Mon, Apr 30, 2012 at 02:55:06PM -0400, William Jon McCann wrote: > This has a number of advantages for us: > > It allows sharing a home directory between different machines, or > sessions (eg. using NFS) > Supports performing smart or selective migration of settings > between diff

Re: [libvirt] [PATCH] Use XDG Base Directories instead of storing in home directory

2012-05-01 Thread William Jon McCann
Sorry for the noise. Please disregard. Apparently I don't know how to use git-email. On Tue, May 1, 2012 at 9:39 AM, William Jon McCann wrote: > --- >  daemon/libvirtd-config.c       |   10 +-- >  daemon/libvirtd.c              |  110 +++--- >  daemon/libvirtd.pod.in      

[libvirt] [PATCH] Use XDG Base Directories instead of storing in home directory

2012-05-01 Thread William Jon McCann
As defined in: http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html This offers a number of advantages: * Allows sharing a home directory between different machines, or sessions (eg. using NFS) * Cleanly separates cache, runtime (eg. sockets), or app data from user settings *

[libvirt] [PATCH] Use XDG Base Directories instead of storing in home directory

2012-05-01 Thread William Jon McCann
--- daemon/libvirtd-config.c | 10 +-- daemon/libvirtd.c | 110 +++--- daemon/libvirtd.pod.in |2 +- docs/auth.html.in |2 +- docs/uri.html.in |2 +- src/libvirt.c |4 +- src/libvirt_p

Re: [libvirt] [PATCH] Use XDG Base Directories instead of storing in home

2012-05-01 Thread William Jon McCann
Hi, Thanks for the quick review! On Tue, May 1, 2012 at 4:25 AM, Daniel P. Berrange wrote: > On Mon, Apr 30, 2012 at 02:55:06PM -0400, William Jon McCann wrote: ... >> +    if (!virFileIsDir(old_base) || virFileExists(config_dir)) { >> +        goto error; >> +    } >> + >> +    /* test if we al

Re: [libvirt] [PATCH] Use XDG Base Directories instead of storing in home

2012-05-01 Thread Daniel P. Berrange
On Mon, Apr 30, 2012 at 02:55:06PM -0400, William Jon McCann wrote: > Hi, > > New to the list so hopefully I'm following the correct protocol. Almost - we tend to like the commit messages for patches to be fairly verbose about the change, so your description of advantages here is actually better

[libvirt] [PATCH] Use XDG Base Directories instead of storing in home

2012-04-30 Thread William Jon McCann
Hi, New to the list so hopefully I'm following the correct protocol. Attached is a patch (mostly untested at the moment) to change the default storage location from .libvirt to the locations defined in the XDG Base Directory Specification (http://standards.freedesktop.org/basedir-spec/basedir-spe