[mythtv] Help needed for RPM Fusion package modernizaton

R. G. Newbury newbury at mandamus.org
Wed Jul 18 18:33:04 UTC 2012


On 07/18/2012 01:55 PM, Richard Shaw wrote:
> On Wed, Jul 18, 2012 at 12:44 PM, R. G. Newbury<newbury at mandamus.org>  wrote:
>> And I will add, that the RPM should also create the /var/log/mythtv folder,
>> and chown it to mythtv as well as /run/mythtv (or /var/run/mythtv) for the
>> pid file
>
> Are you using the RPM Fusion packages? It has created /var/log/mythtv
> as long as I have maintained it, although the ownership is a more
> recent addition. Since the default is Type=simple then we don't need a
> directory for a pid file, but more on that below.

Sorry, my comment was more a generalization. I had not used rpmfusion 
until last night! I did a nuke and start over install and used rpmfusion 
to get back to before some recent changes which may be the cause of my 
deadlock problems.

So I didn't notice that you had created the folder. I just ran the 
pre-start script.

>
>> I have found that systemd has problems with creating /run, so I am using
>> /var/log/mythtv/ for the pid file. Also systemd has problems running
>> /etc/rc.d/rc.local so you cannot be sure that everything properly exists on
>> reboot if it used to be set there.
>>
>> I run a pre-start script in the service file, to make sure that everything
>> is correct. I think it now needs to be type=forking, otherwise the
>> mythlogserver process becomes an orphan (with type=simple) and a blocker to
>> any restart. (systemctl may fail to start the backend with any visible error
>> message)
>
> I'm not familiar with mythlogserver. I don't have any process by that
> name on my F14 based FE/BE system. Does mythbackend spawn this
> process? Is this only spawned if using syslogging?

This may be a recent addition to trunk which is what I ran on the 
mythbox until last night! It gets spawned by mythbackend. and I am using 
--logpath /var/log/mythtv and not syslog. As noted, it can be a silent 
failure blocker to systemctl.  And so it now (or will shortly) requires 
type=forking.

Note: I do not know offhand, if the .25 level system from rpmfusion 
creates a mythlogserver. I did not look this morning. (Something about a 
caffeine deficiency at 6:30 am....). So this may be premature to your 
situation. But it is relevant to .026-pre..

>
>> # in this case a non-usual home for mythtv user
>> export HOME=/var/log/mythtv
>> export MYTHTV_HOME=/var/log/mythtv
>
> I don't think MYTHTV_HOME does anything. This was used in the old sysv
> init script where it was used to set the values of both HOME and
> MYTHCONFDIR.

Well to a great extent I am duplicating that sysv type of setup. in an 
attempt to avoid avoidable errors. The state of the system is clearly a 
'known unknown' This choice is, at least a safe choice and can be easily 
over-ridden by the user. It also fits with allowing a normal user to run 
the frontend, while the backend runs against this.

>
>> # Check for user, create if missing, create HOME too
>> RESULT=""
>> # if user exists, will be in /etc/passwd file
>> RESULT=`grep "$USERNAME" /etc/passwd`;
>> if [ "$RESULT" == ""  ]; then
>>       echo "Mythtv user not found, user account will be created"
>>       useradd -m -d "$HOME" -G mysql -p "$PASSWORD" -U "$USERNAME" 2>&1
>>       usermod -a -G audio,video mythtv 2>&1;
>> #  else
>> #     echo "User exists, no action taken";
>> fi
>
> If you're using my packages you shouldn't need this. This is checked
> on install and every update.

Great minds think alike. As I said, I used the package for the first 
time late last night. And applied the usual steps I have been using 
against trunk, which does none of these things at all. And so you 
already have it, and I'm trying to teach you what you already know!

Geoff








More information about the mythtv-dev mailing list