[mythtv] Re: [PATCH] Stop make install from overwriting mysql.txt

Joseph A. Caputo jcaputo1 at comcast.net
Tue Oct 5 18:37:08 UTC 2004


On Tuesday 05 October 2004 11:24, Gavin Hurlbut wrote:
> Isaac Richards <ijr at po.cwru.edu> wrote:
> > Just copy your mysql.txt file to ~/.mythtv/.
>
> Well, as we discussed on IRC, I think this is not clearly documented,
> and I will be sending in a patch to the SGML once I get a chance.
>
> One issue with this method would be for people who run the backend as
> one user and the frontend as another.  You'd need to duplicate the
> config.  Another issue would be with nuvexport and other external
> tools that will be using this file to find the database.   A
> system-wide config doesn't really belong in the home directory of a
> user in my mind.

...except that it's not just a 'system-wide' config.  You could have 
different users specifying a different DBHostName, so that each user 
would get their own personal frontend settings when they run.  Or you 
could even have different users specifying completely different 
databases (if, for instance, you had 2 completely separate backend 
setups, say, testing & production) and hence using different backends.  
When viewed this way, mysql.txt is just like any other application 
configuration file:  a master copy resides in a common location and is 
used if no per-user copy is found.

> That being said, I realize that the decision has been made to do
> things in this way.  Nothing I say will likely change that :)  In the
> mean-time, I'm sticking with my patched mythfrontend.pro until I find
> a better solution.
>
> I'd prefer to see a non-changed mysql.txt in /etc/mythtv, but I'd
> have to browse code to see if this path is "normally" used.  That's
> ideally where configs "should" be in a normal UNIX sense.

According to the Filesystem Hierarchy Standard, "/usr/share" or ("/usr/
local/share") should contain: "application-specific, 
architecture-independent directories".  Basically, it means that Myth 
should place read-only application data in /usr/share/mythtv or /usr/
local/share/mythtv.

Also:
User specific configuration files for applications are stored in the 
user's home directory in a file that starts with the '.' character (a 
"dot file"). If an application needs to create more than one dot file 
then they should be placed in a subdirectory with a name starting with 
a '.' character, (a "dot directory"). In this case the configuration 
files should not start with the '.' character. 

"/etc" is for 'system configuration'; there does not appear to be a 
formal rule distinguishing between types of configuration files that 
belong under /usr/share/<application> versus /etc ; however, it seems 
clear that Myth is conforming to accepted standards.  The copy of 
mysql.txt in /usr/[local/]share/mythtv is *read-only*, as is all data 
in that directory, and should not be modified by the program or the 
user.  The program distribution or package may alter the contents of 
its /usr/[local/]share directory when a new version is installed.  
User-modifiable configuration files are to be place under ${HOME}.

For more information on the Filesystem Hierarchy Standard, see:
http://www.pathname.com/fhs/

-JAC


More information about the mythtv-dev mailing list