Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Dev

Why are themes downloaded to /etc/mythtv?

 

 

MythTV dev RSS feed   Index | Next | Previous | View Threaded


hobbes1069 at gmail

Nov 25, 2011, 11:22 AM

Post #1 of 25 (2249 views)
Permalink
Why are themes downloaded to /etc/mythtv?

First a short introduction. I've taken over maintaining MythTV in RPM
Fusion for Fedora from Jarod. I also maintain several other packages,
such as avidemux, openshot, imagination, and other small utilities and
libraries. I'm currently working on FreeCAD and its dependencies.

I'm working on moving away from running mythbackend as root by default
and have run into a few problems, the latest of which is this:

Why are the themes downloaded into /etc/mythtv? I looked through the
configure options and didn't see any way to override this. I would
think /var/cache/mythtv would be more appropriate as I don't think the
backend writing to /etc for such things is a good idea and bloats /etc
which should really just be for configuration.

Thanks,
Richard
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-dev


raymond at wagnerrp

Nov 25, 2011, 12:34 PM

Post #2 of 25 (2197 views)
Permalink
Re: Why are themes downloaded to /etc/mythtv? [In reply to]

On 11/25/2011 14:22, Richard Shaw wrote:
> Why are the themes downloaded into /etc/mythtv?

Themes are downloaded to the standard configuration directory, specified
by $HOME or $MYTHCONFDIR in the environment when you run MythTV.
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-dev


lsorense at csclub

Nov 25, 2011, 1:06 PM

Post #3 of 25 (2201 views)
Permalink
Re: Why are themes downloaded to /etc/mythtv? [In reply to]

On Fri, Nov 25, 2011 at 03:34:55PM -0500, Raymond Wagner wrote:
> On 11/25/2011 14:22, Richard Shaw wrote:
> > Why are the themes downloaded into /etc/mythtv?
>
> Themes are downloaded to the standard configuration directory, specified
> by $HOME or $MYTHCONFDIR in the environment when you run MythTV.

Hmm, so they are. Eww.

--
Len Sorensen
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-dev


hobbes1069 at gmail

Nov 25, 2011, 6:40 PM

Post #4 of 25 (2196 views)
Permalink
Re: Why are themes downloaded to /etc/mythtv? [In reply to]

On Fri, Nov 25, 2011 at 3:06 PM, Lennart Sorensen
<lsorense [at] csclub> wrote:
> On Fri, Nov 25, 2011 at 03:34:55PM -0500, Raymond Wagner wrote:
>> On 11/25/2011 14:22, Richard Shaw wrote:
>> > Why are the themes downloaded into /etc/mythtv?
>>
>> Themes are downloaded to the standard configuration directory, specified
>> by $HOME or $MYTHCONFDIR in the environment when you run MythTV.

I'm setting both... Should $HOME not be preferred over $MYTHCONFDIR?

Thanks,
Richard
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-dev


raymond at wagnerrp

Nov 25, 2011, 7:06 PM

Post #5 of 25 (2195 views)
Permalink
Re: Why are themes downloaded to /etc/mythtv? [In reply to]

On 11/25/2011 21:40, Richard Shaw wrote:
> I'm setting both... Should $HOME not be preferred over $MYTHCONFDIR?

$HOME will always be configured, so $MYTHCONFDIR would be the optional
override.
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-dev


hobbes1069 at gmail

Nov 25, 2011, 7:30 PM

Post #6 of 25 (2190 views)
Permalink
Re: Why are themes downloaded to /etc/mythtv? [In reply to]

On Fri, Nov 25, 2011 at 9:06 PM, Raymond Wagner <raymond [at] wagnerrp> wrote:
> On 11/25/2011 21:40, Richard Shaw wrote:
>> I'm setting both... Should $HOME not be preferred over $MYTHCONFDIR?
>
> $HOME will always be configured, so $MYTHCONFDIR would be the optional
> override.

Is there any way to redirect this without mucking with C code?

Thanks,
Richard
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-dev


raymond at wagnerrp

Nov 25, 2011, 7:43 PM

Post #7 of 25 (2193 views)
Permalink
Re: Why are themes downloaded to /etc/mythtv? [In reply to]

On 11/25/2011 22:30, Richard Shaw wrote:
> On Fri, Nov 25, 2011 at 9:06 PM, Raymond Wagner<raymond [at] wagnerrp> wrote:
>> On 11/25/2011 21:40, Richard Shaw wrote:
>>> I'm setting both... Should $HOME not be preferred over $MYTHCONFDIR?
>> $HOME will always be configured, so $MYTHCONFDIR would be the optional
>> override.
> Is there any way to redirect this without mucking with C code?

Just don't define it, and MythTV won't try to use it.
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-dev


bill at bbqninja

Nov 25, 2011, 7:56 PM

Post #8 of 25 (2195 views)
Permalink
Re: Why are themes downloaded to /etc/mythtv? [In reply to]

Apologies for topquote, brief phone reply.

My guess is he is trying to set up myth like a "service" and not a user
app, hence using mythconfdir to point to /etc.

On Saturday, November 26, 2011, Raymond Wagner <raymond [at] wagnerrp> wrote:
> On 11/25/2011 22:30, Richard Shaw wrote:
>> On Fri, Nov 25, 2011 at 9:06 PM, Raymond Wagner<raymond [at] wagnerrp>
wrote:
>>> On 11/25/2011 21:40, Richard Shaw wrote:
>>>> I'm setting both... Should $HOME not be preferred over $MYTHCONFDIR?
>>> $HOME will always be configured, so $MYTHCONFDIR would be the optional
>>> override.
>> Is there any way to redirect this without mucking with C code?
>
> Just don't define it, and MythTV won't try to use it.
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev [at] mythtv
> http://www.mythtv.org/mailman/listinfo/mythtv-dev
>


stuart at tase

Nov 26, 2011, 4:56 AM

Post #9 of 25 (2183 views)
Permalink
Re: Why are themes downloaded to /etc/mythtv? [In reply to]

On Friday 25 Nov 2011 21:30:47 Richard Shaw wrote:
> On Fri, Nov 25, 2011 at 9:06 PM, Raymond Wagner <raymond [at] wagnerrp>
wrote:
> > On 11/25/2011 21:40, Richard Shaw wrote:
> >> I'm setting both... Should $HOME not be preferred over $MYTHCONFDIR?
> >
> > $HOME will always be configured, so $MYTHCONFDIR would be the optional
> > override.
>
> Is there any way to redirect this without mucking with C code?

No.

I think it's reasonable to offer a $MYTHCACHEDIR - falling back to $MYTHCONFDIR
and ultimately $HOME. I'll commit something soon.
--
Stuart Morgan
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-dev


hobbes1069 at gmail

Nov 26, 2011, 6:42 AM

Post #10 of 25 (2180 views)
Permalink
Re: Why are themes downloaded to /etc/mythtv? [In reply to]

On Sat, Nov 26, 2011 at 6:56 AM, Stuart Morgan <stuart [at] tase> wrote:
> On Friday 25 Nov 2011 21:30:47 Richard Shaw wrote:
>> On Fri, Nov 25, 2011 at 9:06 PM, Raymond Wagner <raymond [at] wagnerrp>
> wrote:
>> > On 11/25/2011 21:40, Richard Shaw wrote:
>> >> I'm setting both... Should $HOME not be preferred over $MYTHCONFDIR?
>> >
>> > $HOME will always be configured, so $MYTHCONFDIR would be the optional
>> > override.
>>
>> Is there any way to redirect this without mucking with C code?
>
> No.
>
> I think it's reasonable to offer a $MYTHCACHEDIR - falling back to $MYTHCONFDIR
> and ultimately $HOME. I'll commit something soon.

Thanks!

Richard
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-dev


mtdean at thirdcontact

Nov 26, 2011, 1:27 PM

Post #11 of 25 (2176 views)
Permalink
Re: Why are themes downloaded to /etc/mythtv? [In reply to]

On 11/26/2011 07:56 AM, Stuart Morgan wrote:
> On Friday 25 Nov 2011 21:30:47 Richard Shaw wrote:
>> On Fri, Nov 25, 2011 at 9:06 PM, Raymond Wagner wrote:
>>> On 11/25/2011 21:40, Richard Shaw wrote:
>>>> I'm setting both... Should $HOME not be preferred over $MYTHCONFDIR?
>>> $HOME will always be configured, so $MYTHCONFDIR would be the optional
>>> override.
>> Is there any way to redirect this without mucking with C code?
> No.
>
> I think it's reasonable to offer a $MYTHCACHEDIR - falling back to $MYTHCONFDIR
> and ultimately $HOME. I'll commit something soon.

Wasn't the plan to actually do a "temp" Storage Group rather than rely
on environment variables to set settings? Shouldn't we just do it right
in the first place?

Mike
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-dev


hobbes1069 at gmail

Dec 9, 2011, 1:18 PM

Post #12 of 25 (2077 views)
Permalink
Re: Why are themes downloaded to /etc/mythtv? [In reply to]

On Sat, Nov 26, 2011 at 6:56 AM, Stuart Morgan <stuart [at] tase> wrote:
> I think it's reasonable to offer a $MYTHCACHEDIR - falling back to $MYTHCONFDIR
> and ultimately $HOME. I'll commit something soon.

I don't want to sound impatient but I wanted to ask if there's been
any progress on this front? Should I put in a trac ticket for this?

Until this happens I'm going to have problems with users downloading
themes since as of Fedora 16 mythbackend no longer runs as root.

Thanks,
Richard
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-dev


mtdean at thirdcontact

Dec 9, 2011, 2:34 PM

Post #13 of 25 (2073 views)
Permalink
Re: Why are themes downloaded to /etc/mythtv? [In reply to]

On 12/09/2011 04:18 PM, Richard Shaw wrote:
> On Sat, Nov 26, 2011 at 6:56 AM, Stuart Morgan wrote:
>> I think it's reasonable to offer a $MYTHCACHEDIR - falling back to $MYTHCONFDIR
>> and ultimately $HOME. I'll commit something soon.
> I don't want to sound impatient but I wanted to ask if there's been
> any progress on this front? Should I put in a trac ticket for this?
>
> Until this happens I'm going to have problems with users downloading
> themes since as of Fedora 16 mythbackend no longer runs as root.
>

You wouldn't if you properly configure the directory structure.

If you want a shared config.xml, put it in /etc/mythtv/config.xml.

Then, in the HOME directory of the user who runs MythTV (I'll call this
user "mythtv"), you can have a ~/.mythtv directory and symlink the
"system" config.xml to that directory. Since the mythtv user has
permission to write to ~mythtv/.mythtv, it can create directories and
files for themes/*.

Or, you can actually have the /etc/mythtv directory writable as only
root, but create the (non-configuration) subdirectories (such as themes,
themecache, remotecache, thumbcache, tmp, channels, and a directory for
each of the plugins that requires a directory in ~/.mythtv/) with
permissions that allow the mythtv user to write to them.

IMHO, sinice the only true configuration in ~/.mythtv directory is the
config.xml, the first approach is much cleaner.

Mike
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-dev


james.dutton at gmail

Dec 10, 2011, 1:24 AM

Post #14 of 25 (2061 views)
Permalink
Re: Why are themes downloaded to /etc/mythtv? [In reply to]

On Dec 9, 2011 10:34 PM, "Michael T. Dean" <mtdean [at] thirdcontact> wrote:
>
> On 12/09/2011 04:18 PM, Richard Shaw wrote:
> > On Sat, Nov 26, 2011 at 6:56 AM, Stuart Morgan wrote:
> >> I think it's reasonable to offer a $MYTHCACHEDIR - falling back to
$MYTHCONFDIR
> >> and ultimately $HOME. I'll commit something soon.
> > I don't want to sound impatient but I wanted to ask if there's been
> > any progress on this front? Should I put in a trac ticket for this?
> >
> > Until this happens I'm going to have problems with users downloading
> > themes since as of Fedora 16 mythbackend no longer runs as root.
> >
>
> You wouldn't if you properly configure the directory structure.
>
> If you want a shared config.xml, put it in /etc/mythtv/config.xml.
>
> Then, in the HOME directory of the user who runs MythTV (I'll call this
> user "mythtv"), you can have a ~/.mythtv directory and symlink the
> "system" config.xml to that directory. Since the mythtv user has
> permission to write to ~mythtv/.mythtv, it can create directories and
> files for themes/*.
>
> Or, you can actually have the /etc/mythtv directory writable as only
> root, but create the (non-configuration) subdirectories (such as themes,
> themecache, remotecache, thumbcache, tmp, channels, and a directory for
> each of the plugins that requires a directory in ~/.mythtv/) with
> permissions that allow the mythtv user to write to them.
>
> IMHO, sinice the only true configuration in ~/.mythtv directory is the
> config.xml, the first approach is much cleaner.
>

The OP was talking about mythbackend running non-root and as a service.
I.e. No user home folder and no write access to /etc

All of your post is therefore unsuitable for that task.

James


dekarl at spaetfruehstuecken

Dec 10, 2011, 1:28 AM

Post #15 of 25 (2062 views)
Permalink
Re: Why are themes downloaded to /etc/mythtv? [In reply to]

> The OP was talking about mythbackend running non-root and as a service.
> I.e. No user home folder and no write access to /etc
>
> All of your post is therefore unsuitable for that task.

I don't agree with that. What is so special about running a service as
the user mythtv? It gets a nice home, can be added to the video group
and granted access to the storage, etc.

Regards,
Karl
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-dev


hobbes1069 at gmail

Dec 10, 2011, 5:42 AM

Post #16 of 25 (2052 views)
Permalink
Re: Why are themes downloaded to /etc/mythtv? [In reply to]

On Sat, Dec 10, 2011 at 3:28 AM, Karl Dietz
<dekarl [at] spaetfruehstuecken> wrote:
>> The OP was talking about mythbackend running non-root and as a service.
>> I.e. No user home folder and no write access to /etc
>>
>> All of your post is therefore  unsuitable for that task.
>
> I don't agree with that. What is so special about running a service as
> the user mythtv? It gets a nice home, can be added to the video group
> and granted access to the storage, etc.

In this case, it's not a regular user, it's created by the install
package. It does not have a home in /home or a login shell assigned.

Richard
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-dev


stuart at tase

Dec 10, 2011, 6:00 AM

Post #17 of 25 (2055 views)
Permalink
Re: Why are themes downloaded to /etc/mythtv? [In reply to]

On Friday 09 Dec 2011 15:18:52 Richard Shaw wrote:
> On Sat, Nov 26, 2011 at 6:56 AM, Stuart Morgan <stuart [at] tase> wrote:
> > I think it's reasonable to offer a $MYTHCACHEDIR - falling back to
> > $MYTHCONFDIR and ultimately $HOME. I'll commit something soon.
>
> I don't want to sound impatient but I wanted to ask if there's been
> any progress on this front? Should I put in a trac ticket for this?

There was a difference of opinion internally about the proposal. Some
developers wanted to instead implement this via storage groups which is not
something I have the time to work on.

--
Stuart Morgan
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-dev


dekarl at spaetfruehstuecken

Dec 10, 2011, 6:34 AM

Post #18 of 25 (2052 views)
Permalink
Re: Why are themes downloaded to /etc/mythtv? [In reply to]

On 10.12.2011 14:42, Richard Shaw wrote:
> On Sat, Dec 10, 2011 at 3:28 AM, Karl Dietz
> <dekarl [at] spaetfruehstuecken> wrote:
>>> The OP was talking about mythbackend running non-root and as a service.
>>> I.e. No user home folder and no write access to /etc
>>>
>>> All of your post is therefore unsuitable for that task.
>>
>> I don't agree with that. What is so special about running a service as
>> the user mythtv? It gets a nice home, can be added to the video group
>> and granted access to the storage, etc.
>
> In this case, it's not a regular user, it's created by the install
> package. It does not have a home in /home or a login shell assigned.

no worries, just give it one.
quoting from http://fedoraproject.org/wiki/Packaging:UsersAndGroups
"HOMEDIR should usually be a directory created and owned by the
package, with appropriately restrictive permissions. One good choice
for the location of the directory is the package's data directory in
case it has one."

Regards,
Karl
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-dev


cpinkham at bc2va

Dec 10, 2011, 6:43 AM

Post #19 of 25 (2053 views)
Permalink
Re: Why are themes downloaded to /etc/mythtv? [In reply to]

* On Sat Dec 10, 2011 at 02:00:04PM +0000, Stuart Morgan wrote:
> There was a difference of opinion internally about the proposal. Some
> developers wanted to instead implement this via storage groups which is not
> something I have the time to work on.

We already have a built in 'Themes' Storage Group that points to
GetConfDir() + "/themes", we just need to modify libmythui and
the theme downloader to honor it. I made a modification earlier
this week (or last) to allow overriding the builtin Storage Groups,
so users could put the themes wherever they want by overriding
that SG. I'll take a look at adding this functionality.

--
Chris
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-dev


hobbes1069 at gmail

Dec 10, 2011, 10:28 AM

Post #20 of 25 (2054 views)
Permalink
Re: Why are themes downloaded to /etc/mythtv? [In reply to]

On Sat, Dec 10, 2011 at 8:43 AM, Chris Pinkham <cpinkham [at] bc2va> wrote:
> * On Sat Dec 10, 2011 at 02:00:04PM +0000, Stuart Morgan wrote:
>> There was a difference of opinion internally about the proposal. Some
>> developers wanted to instead implement this via storage groups which is not
>> something I have the time to work on.
>
> We already have a built in 'Themes' Storage Group that points to
> GetConfDir() + "/themes", we just need to modify libmythui and
> the theme downloader to honor it.  I made a modification earlier
> this week (or last) to allow overriding the builtin Storage Groups,
> so users could put the themes wherever they want by overriding
> that SG.  I'll take a look at adding this functionality.

I'm not terribly picky on how it gets fixed, however, since I don't
assume storage group locations in the RPM package, it would require
the end user setting one up. While some setup by the end user is
unavoidable, I would like to use sane defaults wherever possible.

The packages I inherited from Jarod already create a /var/cache/mythtv
directory but that directory on my 2yo combined FE/BE doesn't have
anything in it. It would be a perfect target for the themes to be
downloaded into and other things that shouldn't be going into
/etc/mythtv.

The current contents of my /etc/mythtv are:
./.pulse
./.pulse/30aff66e6c7b07501e39fa7d0000001a-runtime
./tmp
./tmp/Arclight-1.1_0.24.zip
./tmp/blue-abstract-wide-1.4_0.24.zip
./tmp/Graphite-1.1_0.24.zip
./config.xml
./Cache-mythbackend-calvin.localdomain
./Cache-mythbackend-calvin.localdomain/ftp
./mysql.txt
./.config
./.config/Trolltech.conf
./.pulse-cookie
./themes
./channels

I would think pretty much all of that can be moved to
/var/cache/mythtv except for mysql.txt, config.xml, and .config/ and a
MYTHCACHEDIR environment variable would make that very easy to
accomplish.

Thanks,
Richard
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-dev


raymond at wagnerrp

Dec 10, 2011, 2:43 PM

Post #21 of 25 (2048 views)
Permalink
Re: Why are themes downloaded to /etc/mythtv? [In reply to]

On 12/10/2011 13:28, Richard Shaw wrote:
> On Sat, Dec 10, 2011 at 8:43 AM, Chris Pinkham<cpinkham [at] bc2va> wrote:
>> * On Sat Dec 10, 2011 at 02:00:04PM +0000, Stuart Morgan wrote:
>>> There was a difference of opinion internally about the proposal. Some
>>> developers wanted to instead implement this via storage groups which is not
>>> something I have the time to work on.
>> We already have a built in 'Themes' Storage Group that points to
>> GetConfDir() + "/themes", we just need to modify libmythui and
>> the theme downloader to honor it. I made a modification earlier
>> this week (or last) to allow overriding the builtin Storage Groups,
>> so users could put the themes wherever they want by overriding
>> that SG. I'll take a look at adding this functionality.
> I would think pretty much all of that can be moved to
> /var/cache/mythtv except for mysql.txt, config.xml, and .config/ and a
> MYTHCACHEDIR environment variable would make that very easy to
> accomplish.

I still don't understand why these files have to be moved around. Just
overwrite the HOME environment variable to place it in /etc or /home or
/var or where ever you want, require that users who want to run MythTV
be in the mythtv group, and give group write permissions to that
directory. Nearly all distros just configure their disks as one giant
partition these days, so it's not out of some concern for lack of free
space in /etc. For that matter, back when people did split out
different folders into different partitions, /var was supposed to be
intentionally small, containing nothing more than logs and runtime data,
making storage of things like recordings and theme/image cache there an
absolutely horrible idea.

When packagers start moving stuff around and doing screwy things with
the stock configuration, it just makes it that much harder for us trying
to help their users on the mailing list or IRC channel, since we have no
idea where anything is located any longer. It's already bad enough with
the dozen or so places MythTV already checks for `mysql.txt`. I'd
rather not see a bunch of extra settings that do nothing but add
confusion, and am particularly loathe to see settings triggered by
environment variables for anything other than debugging.
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-dev


raymond at wagnerrp

Dec 10, 2011, 6:49 PM

Post #22 of 25 (2038 views)
Permalink
Re: Why are themes downloaded to /etc/mythtv? [In reply to]

After a bit of a discussion with Mike Dean in IRC, we've decided that
the real problem is that MythTV should not be storing configuration data
and cache data in the same location. To that end, we've come up with a
potential solution

1. Get rid of mysql.txt. This one has been a long time coming ever
since config.xml showed up with the UPnP server and detection. This
means some of the options mysql.txt used to offer will need to be
migrated to config.xml, and a chunk of the database selection code will
need to be rewritten.

2. Move the name and location of config.xml to disconnect it from the
cache directory. Use something like mythtv.xml or mythtv-config.xml.
Have a default location of $HOME/.mythtv.xml, with a fall through to
SYSCONFDIR/mythtv.xml, where SYSCONFDIR is compiled in statically with
the standard --sysconfdir flag. Make the default to that /etc/mythtv/.
Make this selection very well spelled out in the logs with the default
logging parameters.

3. Keep the rest of the data in its current location of $HOME/.mythtv,
with an optional override of $MYTHCACHEDIR (as opposed to the old
$MYTHCONFDIR). This still contains all the theme and download cache,
and other temporary files, but since it is divested of configuration
data, it should be less of an issue for packagers and users to put
wherever they want and still continue to follow their distro's
convention. If packagers want this data shared between multiple users,
set $MYTHCACHEDIR to its location, and make sure all users are group
owners with group write permissions. This could be performed by a
wrapper script (like Mythbuntu), or by putting the definition into the
system profile.

Note that MythTV is capable of calling external applications and
utilities that may well want to store their own data in $HOME. Running
any MythTV application with an altered or non-existent home folder
should be considered very dangerous, and not done. This does mean I'll
have to alter the Gentoo ebuilds to comply with this.
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-dev


mtdean at thirdcontact

Dec 11, 2011, 12:06 AM

Post #23 of 25 (2042 views)
Permalink
Re: Why are themes downloaded to /etc/mythtv? [In reply to]

On 12/10/2011 09:49 PM, Raymond Wagner wrote:
> After a bit of a discussion with Mike Dean in IRC, we've decided that
> the real problem is that MythTV should not be storing configuration data
> and cache data in the same location. To that end, we've come up with a
> potential solution
>
> 1. Get rid of mysql.txt. This one has been a long time coming ever
> since config.xml showed up with the UPnP server and detection. This
> means some of the options mysql.txt used to offer will need to be
> migrated to config.xml, and a chunk of the database selection code will
> need to be rewritten.
>
> 2. Move the name and location of config.xml to disconnect it from the
> cache directory. Use something like mythtv.xml or mythtv-config.xml.
> Have a default location of $HOME/.mythtv.xml, with a fall through to
> SYSCONFDIR/mythtv.xml, where SYSCONFDIR is compiled in statically with
> the standard --sysconfdir flag. Make the default to that /etc/mythtv/.
> Make this selection very well spelled out in the logs with the default
> logging parameters.
>
> 3. Keep the rest of the data in its current location of $HOME/.mythtv,
> with an optional override of $MYTHCACHEDIR (as opposed to the old
> $MYTHCONFDIR). This still contains all the theme and download cache,
> and other temporary files, but since it is divested of configuration
> data, it should be less of an issue for packagers and users to put
> wherever they want and still continue to follow their distro's
> convention. If packagers want this data shared between multiple users,
> set $MYTHCACHEDIR to its location, and make sure all users are group
> owners with group write permissions. This could be performed by a
> wrapper script (like Mythbuntu), or by putting the definition into the
> system profile.
>
> Note that MythTV is capable of calling external applications and
> utilities that may well want to store their own data in $HOME. Running
> any MythTV application with an altered or non-existent home folder
> should be considered very dangerous, and not done. This does mean I'll
> have to alter the Gentoo ebuilds to comply with this.

Actually, I'd prefer not even having a MYTHCACHEDIR.

Firefox doesn't let me specify a different location for ~/.mozilla. Nor
does xine allow changing ~/.xine, nor MPlayer its ~/.mplayer, nor DBus
~/.dbus, ...

If it's just cache data (once we allow putting the config file
elsewhere), I really don't see a good reason to move the cache.

Mike
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-dev


james.dutton at gmail

Dec 11, 2011, 3:29 AM

Post #24 of 25 (2039 views)
Permalink
Re: Why are themes downloaded to /etc/mythtv? [In reply to]

On Dec 11, 2011 8:06 AM, "Michael T. Dean" <mtdean [at] thirdcontact> wrote:
>
>
> Actually, I'd prefer not even having a MYTHCACHEDIR.
>
> Firefox doesn't let me specify a different location for ~/.mozilla. Nor
> does xine allow changing ~/.xine, nor MPlayer its ~/.mplayer, nor DBus
> ~/.dbus, ...
>
> If it's just cache data (once we allow putting the config file
> elsewhere), I really don't see a good reason to move the cache.
>
> Mike

But i think the issue is that mythbackend does not need terminal
interaction. So i think that mythbackend should be treated like an "apache"
instead of a frontend like "firefox".
i.e. Have a main config file in /etc. and mythbackend will look in there
for the location of the cache directory.
Mythfrontend has user terminal interaction, so it is sensible to treat that
like a "firefox" and put its config in $HOME.

James.


raymond at wagnerrp

Dec 11, 2011, 12:47 PM

Post #25 of 25 (2024 views)
Permalink
Re: Why are themes downloaded to /etc/mythtv? [In reply to]

On 12/11/2011 06:29, James Courtier-Dutton wrote:
>
>
> On Dec 11, 2011 8:06 AM, "Michael T. Dean" <mtdean [at] thirdcontact
> <mailto:mtdean [at] thirdcontact>> wrote:
> >
> >
> > Actually, I'd prefer not even having a MYTHCACHEDIR.
> >
> > Firefox doesn't let me specify a different location for ~/.mozilla. Nor
> > does xine allow changing ~/.xine, nor MPlayer its ~/.mplayer, nor DBus
> > ~/.dbus, ...
> >
> > If it's just cache data (once we allow putting the config file
> > elsewhere), I really don't see a good reason to move the cache.
> >
> > Mike
>
> But i think the issue is that mythbackend does not need terminal
> interaction. So i think that mythbackend should be treated like an
> "apache" instead of a frontend like "firefox".
> i.e. Have a main config file in /etc. and mythbackend will look in
> there for the location of the cache directory.
> Mythfrontend has user terminal interaction, so it is sensible to treat
> that like a "firefox" and put its config in $HOME.
>

I still don't understand why you keep harping on this HOME directory
issue. Look in your passwd file. Everyone gets home directories,
everyone gets login shells. Looking through the various things I have
installed, my mail server uses HOME for its storage path, my print and
cron daemons use HOME for their spoolers, portage uses HOME for its
default build cache, man uses HOME for its man pages, NUT uses HOME for
its state data. The HOME path is nothing more than a place where you
can configure some aspect of that service. Some use it, some ignore it,
some set it to a non-existent or empty path.

The difference between a user and a service account is the ability to
log in. Users get a password and a terminal emulator for a shell.
Services get something that cannot be executed, such that any logins
fail, or the special 'nologin' application that prints a warning and
immediately logs back out.

In any case, not having any HOME for mythbackend is simply not a viable
option. MythTV does not live inside its own isolated bubble, it calls
external applications. There are several XMLTV grabbers that cache data
in HOME, and several others that store supplemental data in HOME.

MythTV dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.