Re: Usage of /var/db

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01/28/2010 11:49 AM, Christian Krause wrote:
> Hello,
>
> During a review the following question came up:
>
> Would it be OK if a package creates
> /var/db/<pkgname>
> for various kind of reasons (in this case a daemon would serve audio
> files the user puts there)?
Generally speaking: No.

> In Fedora only the nscd uses this directory:
> /var/db/Makefile
> /var/db/nscd/*
Well, a fact which I consider similarly arguable as your case ;)

I am not sufficiently familiar with nscd, but I guess it using /var/db 
is a historic artifact, similar to /var/named, /var/ftp, /var/yp etc.

> The FHS doesn't contain any specific guidelines about the usage of
> /var/db/ and a quick web search revealed that on a couple of systems
> some daemons use /var/db like this
> /var/db/mysql
> /var/db/openldap
> etc.
To my knowledge this doesn't apply to fedora, because we generally 
advise people to use /var/lib/<package>

> 1. Would it be acceptable in Fedora as well that a package creates
> /var/db/<pkgname>  ?
I would vote against it and would recommend /var/lib/<package> or a 
subdirectory thereof.

This way a package can "play whatever games", inside of this directory, 
if it needs to.

> 2. Would it make sense in this specific case, where a streaming server
> would serve the audio files from this directory (per default)?
What kind of files are inside of this "db" directory?

Are they
* an arbitrary directory hierarchy of plain "content" files?
* a prestructured directory hierarchy (prestructured to meet the demands 
of your application) of plain "content" files?
* real "database" files (e.g. indicies on something else)?

Depending on the answers to these questions, there would be several 
alternatives, rsp. further questions to be discussed.

> Personally I think that a collection of audio files should not be
> considered a database and so it shouldn't be there.

c.f. my last comment.

> Since usually the
> user has his audio collection in his home directory,
Not in real deamon driven scenario. There he would have his audio 
collection in an arbitrary directory, (could be a decicated user's home, 
could be some directory below /srv, could be elsewhere).

> I would just
> configure the daemon that way, that the user has to specifically
> configure the directory where the files reside the server should stream...
Agreed, that's how I would do it.

Ralf

--
packaging mailing list
packaging@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/packaging

[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Forum]     [KDE Users]

  Powered by Linux