[mythtv-users] today's mythtv update for v31 failed

Bill Meek keemllib at gmail.com
Fri Feb 4 15:39:05 UTC 2022

On 2/4/22 05:38, Jim Abernathy wrote:
> On 2/3/22 23:56, Stephen Worthington wrote:
>> On Thu, 3 Feb 2022 14:16:41 -0500, you wrote:
>>> On Thu, Feb 3, 2022 at 1:21 PM Mike Perkins <mikep at randomtraveller.org.uk>
>>> wrote:
>>>> That wasn't what I meant. I wondered if your *version* of python had
>>>> changed recently, as the result
>>>> of an update.
>>>> However, if you can run it by hand then that would likely be a no.
>>>> -- 
>>>> Mike Perkins
>>> The system in Ubuntu 21.10 and python3 is all there is. I'm pretty sure
>>> there was a permissions issue on the hdhr_discovery.log file. Either  that
>>> or somebody is running around and changing the ownership of files in
>>> /var/log/mythtv during an update.
>>> Jim A
>> Manually running the HDHR Python program will change the ownership of
>> the log file to whoever it was run from.  A permanent fix for this
>> would be to touch the log file from the mythtv-backend service before
>> running the Python program.  So try adding something like these lines
>> to your override.conf file before the one that runs the Python
>> program:
>> ExecStartPre=-/bin/rm /var/log/mythtv/hdhr_discovery.log
>> ExecStartPre=-/usr/bin/touch /var/log/mythtv/hdhr_discovery.log
>> ExecStartPre=-/bin/chown mythtv:mythtv
>> /var/log/mythtv/hdhr_discovery.log
>> ExecStartPre=-/bin/chmod a=rw /var/log/mythtv/hdhr_discovery.log
>> Note: These 4 ExecStartPre lines are each all one line - my email
>> client wraps long lines.
> The hdhr_discovery.log file ownership is not being changed by the hdhomerun_check.py I set the ownership to mythtv:mythtv yesterday and
> mythtv-backend.service has been run several times since then. I think the reason is that the python3 program only appends to an existing file.

It's how logging is initiated, the lines here (filemode=a(ppend)):

                        format='%(asctime)s %(levelname)s\t%(message)s',
                        datefmt='%Y-%m-%d %H:%M:%S',

If something else (rsyslog) is changing the user:group, then you could change the filename=
to /tmp/hdhr_discovery.log, for example. I suspect it's the configuration in rsyslog that
changes from mythtv:mythtv. See: grep "^\$File" /etc/rsyslog.conf . I wouldn't change that!

Not sure why I don't see the issue. But, I build from source, so no MythTV updates.

> That along with the fact that mythtv-backend.service runs as user 'mythtv'. Looking at .service, which is standard *ubuntu version.


More information about the mythtv-users mailing list