[mythtv] Re: [PATCH] Stop make install from overwriting mysql.txt
Joseph A. Caputo
jcaputo1 at comcast.net
Wed Oct 6 14:05:30 UTC 2004
On Tuesday 05 October 2004 18:22, Hamish Moffatt wrote:
> On Tue, Oct 05, 2004 at 02:37:08PM -0400, Joseph A. Caputo wrote:
> > 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.
>
> [..]
>
> > "/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.
>
> Oh? Why shouldn't the user modify /etc/mythtv/mysql.txt, if they
> move their MySQL server or change their database password, etc?
When I said 'user', I meant 'normal user', as opposed to system
administrator. A normal user cannot/should not have write permission
to /etc, /usr/share or /usr/local/share. It's the responsibility of
the person administering the box to manage software installations &
upgrades, which includes updating configuration files if required by a
new install/upgrade.
> mysql.txt is clearly a configuration file belonging in /etc or
> in ~/.mythtv; there is no case for it to exist in /usr/share.
I do see your point here -- most packages that use configuration files
in /etc or /usr/local/etc do not place them there when installed;
instead they provide a default template configuration file (usually
in /usr/share/doc/<package> or /usr/local/share/doc/<package>). It is
the sysadmin's responsibility to copy/create the initial configuration
file.
Packaging utilities like rpm work a little differently; rpm typically
does one of 2 things: copy the existing file to <file>.rpmsave before
installing the one from the package, or installing the file from the
package as <file>.rpmnew.
I do see your point now; perhaps it would make sense for Myth to keep
its master config file in /etc or /usr/local/etc. If so, it should
probably also be renamed to mythtv.conf (as /etc/mysql.txt would be
confusing). This would entail some minor code changes as well as
changes to the install portion of the makefile, plus an update to the
docs, as a new installation would require the user to manually copy or
create /etc/mythtv.conf.
I, for one, am quite satisfied with the status quo, as I have my
configuration in ~/.mythtv/mysql.txt. I imagine that, unless he's
opposed to the concept, Isaac might accept a patch to accomplish a
change as outlined above. The mythfrontend.pro patch that started this
thread is not the 'correct' way to go about things.
-JAC
More information about the mythtv-dev
mailing list