On 01/28/2010 11:49 AM, Christian Krause wrote:
During a review the following question came up:
Would it be OK if a package creates
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:
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
/var/db/ and a quick web search revealed that on a couple of systems
some daemons use /var/db like this
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
I would vote against it and would recommend
/var/lib/<package> or a
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
would serve the audio files from this directory (per default)?
What kind of files
are inside of this "db" directory?
* 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...
that's how I would do it.