[Patch] Update 'How to' to clarify computation of datadir

Rodney Dawes dobey at novell.com
Sat Mar 11 18:19:45 EET 2006


Ah. I guess I missed the original thread. It looks like you're trying to
solve a special case problem, by putting your solution to that issue, in
as a general case specification. In the general case, I don't think your
solution works well.

It seems like we just need to clearly define datadir, sysconfdir, etc...
somewhere. You argued that we can't control what path arguments are
passed to configure by vendors of Linux, but we can, and do. The Linux
Filesystem Hierarchy Standard does exactly that.

I think you just want to specify the installation to user's $HOME case.
The system-wide installation issues are pretty much taken care of by the
FHS and use of the $XDG_{CONFIG,DATA}_DIRS variables. So, I'd say we
should just specify the use of $XDG_{CONFIG,DATA}_HOME when installing
items to the user's $HOME.

-- dobey


On Sat, 2006-03-11 at 07:52 -0600, Jeremy White wrote:
> Sorry, I should have included the context in my email.
> 
> There is an entire thread detailing this more carefully here:
>   http://lists.freedesktop.org/archives/xdg/2006-February/007685.html
> 
> Cheers,
> 
> Jeremy
> 
> Rodney Dawes wrote:
> > Perhaps I am just confused, but what is this meant to solve exactly?
> > $XDG_{CONFIG,DATA}_{DIRS,HOME} I do not believe are meant to be used
> > as build/install-time configuration mechanisms. They are meant to be
> > used for runtime detection of all possible datadir and sysconfdir
> > paths which would have been used at build/install time.
> > 
> > Also, the probabilities that a system-wide install is being done by
> > root, that the first item in $XDG_DATA_DIRS is /usr/share, the first
> > item in $XDG_CONFIG_DIRS is /etc, and that root can write to these,
> > are all very high. Also, what happens if an application is built as
> > a user, and then installed as root for system-wide use? Does the
> > path to which the data/config files change between "make" and
> > "sudo make install"? That seems fairly inappropriate to me.
> > 
> > -- dobey
> > 
> > 
> > On Fri, 2006-03-10 at 23:45 -0600, Jeremy White wrote:
> > 
> >>The attached patch specifies that a system wide
> >>installation should compute datadir by using the
> >>first writable element of $XDG_DATA_DIRS
> >>(or sysconfdir from the first writeable element
> >>of $XDG_CONFIG_DIRS), as previously discussed.
> >>
> >>The spec is clearly lacking, so I request that this
> >>either be applied, or a clear alternate be suggested.
> >>
> >>Cheers,
> >>
> >>Jeremy




More information about the xdg mailing list