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

Mailing List Archive: MythTV: Dev

Help needed for RPM Fusion package modernizaton

 

 

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


hobbes1069 at gmail

Jul 14, 2012, 2:04 PM

Post #1 of 25 (2265 views)
Permalink
Help needed for RPM Fusion package modernizaton

Ok, now that I've got 0.25.1 (mostly) fixed I though it would be good
to make sure that the package is up to date setup wise and had a few
questions.

1. The current package still installs a mysql.txt file. I think this
is totally unneeded but wanted to check first. It also currently
installs a blank config.xml in /etc/mythtv which I think is all I
need.

2. Right now on sysv systems both HOME and MTYHCONFDIR are being set
to /etc/mythtv which is causing all the HLS stuff to be installed
there (including the generated stream files). On systemd based
installs they are separate with MYTHCONFDIR being set to /etc/mythtv
and HOME being set to /usr/share/mythtv which I'm thinking needs to be
changed... The stream files need to NOT go into /etc but I'm not sure
how to do it. A more appropriate place for the stream files would be
something like /var/cache/mythtv which is actually already being
created but doesn't appear to be in use by anything. Or if the stream
files should be a bit more permanent, something like
/var/lib/mythstream which I could have the package create on install.

As an aside from 2, I would like to know:
- If any other environment variables are used by the backend?
- What components of mythtv use HOME and for what purposes.

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


hobbes1069 at gmail

Jul 18, 2012, 6:18 AM

Post #2 of 25 (2199 views)
Permalink
Re: Help needed for RPM Fusion package modernizaton [In reply to]

Since 0.25.2 has been tagged I figured this was worth pinging....

On Sat, Jul 14, 2012 at 4:04 PM, Richard Shaw <hobbes1069 [at] gmail> wrote:
> Ok, now that I've got 0.25.1 (mostly) fixed I though it would be good
> to make sure that the package is up to date setup wise and had a few
> questions.
>
> 1. The current package still installs a mysql.txt file. I think this
> is totally unneeded but wanted to check first. It also currently
> installs a blank config.xml in /etc/mythtv which I think is all I
> need.
>
> 2. Right now on sysv systems both HOME and MTYHCONFDIR are being set
> to /etc/mythtv which is causing all the HLS stuff to be installed
> there (including the generated stream files). On systemd based
> installs they are separate with MYTHCONFDIR being set to /etc/mythtv
> and HOME being set to /usr/share/mythtv which I'm thinking needs to be
> changed... The stream files need to NOT go into /etc but I'm not sure
> how to do it. A more appropriate place for the stream files would be
> something like /var/cache/mythtv which is actually already being
> created but doesn't appear to be in use by anything. Or if the stream
> files should be a bit more permanent, something like
> /var/lib/mythstream which I could have the package create on install.
>
> As an aside from 2, I would like to know:
> - If any other environment variables are used by the backend?
> - What components of mythtv use HOME and for what purposes.

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


danielk at cuymedia

Jul 18, 2012, 6:54 AM

Post #3 of 25 (2203 views)
Permalink
Re: Help needed for RPM Fusion package modernizaton [In reply to]

On 07/18/2012 09:18 AM, Richard Shaw wrote:
> Since 0.25.2 has been tagged I figured this was worth pinging....
>> 1. The current package still installs a mysql.txt file. I think this
>> is totally unneeded but wanted to check first. It also currently
>> installs a blank config.xml in /etc/mythtv which I think is all I
>> need.

The 0.25 series uses mysql.txt, for 0.26 mysql.txt should not be installed.

>> 2. Right now on sysv systems both HOME and MTYHCONFDIR are being set

Dunno about this. MYTHCONFDIR is used both to locate configuration
files and as a location for caches. It would make a lot of sense
to allow caches to go somewhere else.

>> As an aside from 2, I would like to know:
>> - If any other environment variables are used by the backend?

There are many, but other than those two I believe they are
just used for debugging.

>> - What components of mythtv use HOME and for what purposes.

As far as I know HOME is only used when MYTHCONFDIR isn't set. It's
used to create a myth configuration directory at $HOME/.mythtv

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


keemllib at gmail

Jul 18, 2012, 7:36 AM

Post #4 of 25 (2212 views)
Permalink
Re: Help needed for RPM Fusion package modernizaton [In reply to]

On 07/18/2012 08:54 AM, Daniel Thor Kristjansson wrote:
> On 07/18/2012 09:18 AM, Richard Shaw wrote:
...
>>> As an aside from 2, I would like to know:
>>> - If any other environment variables are used by the backend?
...

Hi;

Set LANG if it isn't already. For example: LANG=en_US.UTF-8.

--
Bill


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


gary.buhrmaster at gmail

Jul 18, 2012, 7:47 AM

Post #5 of 25 (2196 views)
Permalink
Re: Help needed for RPM Fusion package modernizaton [In reply to]

On Wed, Jul 18, 2012 at 6:54 AM, Daniel Thor Kristjansson
<danielk [at] cuymedia> wrote:
....
>>> 2. Right now on sysv systems both HOME and MTYHCONFDIR are being set
>
>
> Dunno about this. MYTHCONFDIR is used both to locate configuration
> files and as a location for caches. It would make a lot of sense
> to allow caches to go somewhere else.

sysv scripts are mostly dead for Fedora (EOL for F15 has
already happened). Ignore them, let then die in piece.

In my opinion, the defaults should be to run as a "regular user",
with no need to read/write to system directories. The mythtv
user should be created if it does not exist. HOME should
not need to be set in the systemd scripts when the User=mythtv
line exists in the systemd script. Any configuration that is
required for operation commonly created in /etc, /usr,
should be copied to the (RPM created, if does not exist) mythtv
user's .mythrv/ directory, using the RPM standards of "...rpmnew"
if the configuration already exists and is different than the file
you are trying to install (to the normal/correct name if the
file does not exist). The mythtv user should be added to the
video and audio groups if the mythtv user is created by the RPM.
The startup scripts should specify the user mythtv as the user
to run the backend. Create an appropriate /etc/limit.d/90-mythtv.conf
file to set the audio group for rtprio.

An individual can always override all of these things in their
copy of the service file that they place in /etc/systemd/system
(and/or modify the ~mythtv/.mythtv/ files, as needed).

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


stuart at tase

Jul 18, 2012, 8:04 AM

Post #6 of 25 (2208 views)
Permalink
Re: Help needed for RPM Fusion package modernizaton [In reply to]

On Wednesday 18 Jul 2012 09:36:01 Bill Meek wrote:
> On 07/18/2012 08:54 AM, Daniel Thor Kristjansson wrote:
> > On 07/18/2012 09:18 AM, Richard Shaw wrote:
> ...
>
> >>> As an aside from 2, I would like to know:
> >>> - If any other environment variables are used by the backend?
>
> ...
>
> Hi;
>
> Set LANG if it isn't already. For example: LANG=en_US.UTF-8.

Making sure that it's actually correct for that machine/user and not en_US for
everyone.

That said we don't actually need LANG for locale, it's just used as a hint, we
still ask users to confirm their language/country - entering these incorrectly
will result in the wrong settings being used by default.
--
Stuart Morgan
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-dev


hobbes1069 at gmail

Jul 18, 2012, 8:05 AM

Post #7 of 25 (2203 views)
Permalink
Re: Help needed for RPM Fusion package modernizaton [In reply to]

On Wed, Jul 18, 2012 at 9:47 AM, Gary Buhrmaster
<gary.buhrmaster [at] gmail> wrote:
> sysv scripts are mostly dead for Fedora (EOL for F15 has
> already happened). Ignore them, let then die in piece.

That's true for Fedora but we're also supporting EL6 so they'll still
be around for a while.


> In my opinion, the defaults should be to run as a "regular user",
> with no need to read/write to system directories. The mythtv
> user should be created if it does not exist.

The spec currently creates a mythtv user and group but does not create
a home directory since only the backend runs as user mythtv by
default.

> HOME should
> not need to be set in the systemd scripts when the User=mythtv
> line exists in the systemd script. Any configuration that is
> required for operation commonly created in /etc, /usr,
> should be copied to the (RPM created, if does not exist) mythtv
> user's .mythrv/ directory, using the RPM standards of "...rpmnew"
> if the configuration already exists and is different than the file
> you are trying to install (to the normal/correct name if the
> file does not exist).

Hmm... I don't think this will be acceptable. I don't know of any
package that creates a full user account on install and I don't think
it would be welcomed. The current method is to assume a system wide
install (no automatic dependence on anything in /home) for the backend
running as the mythtv user and the frontend using whatever login the
end user wants.


> The mythtv user should be added to the
> video and audio groups if the mythtv user is created by the RPM.

This is done already.


> The startup scripts should specify the user mythtv as the user
> to run the backend. Create an appropriate /etc/limit.d/90-mythtv.conf
> file to set the audio group for rtprio.

The first part is the default in the systemd file but I'm unfamiliar
with /etc/limit.d/...


> An individual can always override all of these things in their
> copy of the service file that they place in /etc/systemd/system
> (and/or modify the ~mythtv/.mythtv/ files, as needed).

I haven't thought of all possible consequences of this but my
preference would be for the backend to not rely on anything in /home
and for the frontend to pretty much rely on ~/.mythtv. That leaves at
least one common denominator, config.xml.

Perhaps the best behavior here would be to use ~/.mythtv/config.xml if
it exists and fall back to /etc/mythtv/config.xml.

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


gary.buhrmaster at gmail

Jul 18, 2012, 10:07 AM

Post #8 of 25 (2201 views)
Permalink
Re: Help needed for RPM Fusion package modernizaton [In reply to]

On Wed, Jul 18, 2012 at 3:05 PM, Richard Shaw <hobbes1069 [at] gmail> wrote:
....
> Hmm... I don't think this will be acceptable. I don't know of any
> package that creates a full user account on install and I don't think
> it would be welcomed. The current method is to assume a system wide
> install (no automatic dependence on anything in /home) for the backend
> running as the mythtv user and the frontend using whatever login the
> end user wants.

Then create an appropriate home entry in /var/lib (as other system
daemons do). Nothing in /etc or /usr should (need to be) writeable.
That is LSB.

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


hobbes1069 at gmail

Jul 18, 2012, 10:40 AM

Post #9 of 25 (2198 views)
Permalink
Re: Help needed for RPM Fusion package modernizaton [In reply to]

On Wed, Jul 18, 2012 at 12:07 PM, Gary Buhrmaster
<gary.buhrmaster [at] gmail> wrote:
> On Wed, Jul 18, 2012 at 3:05 PM, Richard Shaw <hobbes1069 [at] gmail> wrote:
> ....
>> Hmm... I don't think this will be acceptable. I don't know of any
>> package that creates a full user account on install and I don't think
>> it would be welcomed. The current method is to assume a system wide
>> install (no automatic dependence on anything in /home) for the backend
>> running as the mythtv user and the frontend using whatever login the
>> end user wants.
>
> Then create an appropriate home entry in /var/lib (as other system
> daemons do). Nothing in /etc or /usr should (need to be) writeable.
> That is LSB.

I like that idea better, but it could be a migration mess...
/var/lib/mythtv is already created by the package.

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


newbury at mandamus

Jul 18, 2012, 10:44 AM

Post #10 of 25 (2222 views)
Permalink
Re: Help needed for RPM Fusion package modernizaton [In reply to]

On 07/18/2012 10:47 AM, Gary Buhrmaster wrote:
> On Wed, Jul 18, 2012 at 6:54 AM, Daniel Thor Kristjansson
> <danielk [at] cuymedia> wrote:
> ....
>>>> 2. Right now on sysv systems both HOME and MTYHCONFDIR are being set
>>
>>
>> Dunno about this. MYTHCONFDIR is used both to locate configuration
>> files and as a location for caches. It would make a lot of sense
>> to allow caches to go somewhere else.
>
> sysv scripts are mostly dead for Fedora (EOL for F15 has
> already happened). Ignore them, let then die in piece.
>
> In my opinion, the defaults should be to run as a "regular user",
> with no need to read/write to system directories. The mythtv
> user should be created if it does not exist. HOME should
> not need to be set in the systemd scripts when the User=mythtv
> line exists in the systemd script. Any configuration that is
> required for operation commonly created in /etc, /usr,
> should be copied to the (RPM created, if does not exist) mythtv
> user's .mythrv/ directory, using the RPM standards of "...rpmnew"
> if the configuration already exists and is different than the file
> you are trying to install (to the normal/correct name if the
> file does not exist). The mythtv user should be added to the
> video and audio groups if the mythtv user is created by the RPM.
> The startup scripts should specify the user mythtv as the user
> to run the backend. Create an appropriate /etc/limit.d/90-mythtv.conf
> file to set the audio group for rtprio.
>
> An individual can always override all of these things in their
> copy of the service file that they place in /etc/systemd/system
> (and/or modify the ~mythtv/.mythtv/ files, as needed).
>

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

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)

This is the pre-start.sh, but everything in it needs to be in the
install too I think.

# *****************************************************************
#!/bin/bash
# pre-start.sh script for systemd (replacing /etc/init.d/mythbackend)

USERNAME="mythtv"
PASSWORD="mythtv"

# in this case a non-usual home for mythtv user
export HOME=/var/log/mythtv
export MYTHTV_HOME=/var/log/mythtv

# UTF encoding needed by myth
export LC_ALL=en_US.UTF-8

# 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

# Required sanity checks

if [ ! -x /var/log/mythtv ]; then
# make logging folder
mkdir -p -m 755 /var/log/mythtv
chown -hR mythtv:mythtv /var/log/mythtv
fi
# make pid folder even if using /var/log/mythtv
# sudo as may be called by mythtv user
sudo mkdir -p -m 755 /var/run/mythtv
sudo chown -hR mythtv:mythtv /var/run/mythtv

# and again to be sure
sudo mkdir -p -m 755 /run/mythtv
sudo chown -hR mythtv:mythtv /run/mythtv


# ******************
# below here, only for the pre-start script to clean up
# any existing errors on a restart.


# An 'is-running' check
# Kill any running process as a start has been initiated

$ the 'proper' pidfile
if [ -e /run/mythtv/backend.pid ]; then
sudo rm -f /run/mythtv/backend.pid
fi
# the alternate pidfile
if [ -e /var/log/mythtv/backend.pid ]; then
sudo rm -f /var/log/mythtv/backend.pid
fi

sudo killall mythlogserver 2&>1
sudo killall mythbackend 2&>1

# echo "Now ready to start mythbackend,service

# ********************************************



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


hobbes1069 at gmail

Jul 18, 2012, 10:55 AM

Post #11 of 25 (2195 views)
Permalink
Re: Help needed for RPM Fusion package modernizaton [In reply to]

On Wed, Jul 18, 2012 at 12:44 PM, R. G. Newbury <newbury [at] mandamus> 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.


> 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?


> # 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.


> # 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.

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


keemllib at gmail

Jul 18, 2012, 11:03 AM

Post #12 of 25 (2191 views)
Permalink
Re: Help needed for RPM Fusion package modernizaton [In reply to]

On 07/18/2012 10:04 AM, Stuart Morgan wrote:
> On Wednesday 18 Jul 2012 09:36:01 Bill Meek wrote:
...
>> Set LANG if it isn't already. For example: LANG=en_US.UTF-8.
>
> Making sure that it's actually correct for that machine/user and not en_US for
> everyone.
>
> That said we don't actually need LANG for locale, it's just used as a hint, we
> still ask users to confirm their language/country - entering these incorrectly
> will result in the wrong settings being used by default.

Hi;

I use: test -f /etc/default/locale && . /etc/default/locale || true
to set it properly LANG in the Upstart .conf file.

In any case, I always set LANG to remove the info & warning messages
in the backend (and frontend) log:

I [1329/1329] CoreContext mythcorecontext.cpp:231 (Init) - Assumed character encoding:
W [1329/1329] CoreContext mythcorecontext.cpp:238 (Init) - This application expects to be running a locale that specifies a UTF-8 codeset,
and many features may behave improperly with your current language settings. Please set the LC_ALL or LC_CTYPE, and LANG variable(s) in the
environment in which this program is executed to include a UTF-8 codeset (such as 'en_US.UTF-8').

The above from: v0.26-pre-906-gb66f0cf, I updated the Upstart Wiki while on 0.25pre.

Or I have something configured wrong, or the messages don't need to be there
anymore or ???

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


newbury at mandamus

Jul 18, 2012, 11:33 AM

Post #13 of 25 (2209 views)
Permalink
Re: Help needed for RPM Fusion package modernizaton [In reply to]

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> 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






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


gary.buhrmaster at gmail

Jul 18, 2012, 12:07 PM

Post #14 of 25 (2191 views)
Permalink
Re: Help needed for RPM Fusion package modernizaton [In reply to]

On Wed, Jul 18, 2012 at 5:40 PM, Richard Shaw <hobbes1069 [at] gmail> wrote:
....
> I like that idea better, but it could be a migration mess...
> /var/lib/mythtv is already created by the package.

There probably can be no reasonable migration. New installs
should *just work*, and people who have existing setups will
either have to cope, or live (you can create the /var/lib/myththv
regardless, but you only set the homedir if you create the
userid; you always copy config files (adding, leaving unchanged,
or .rpmnew as needed) to the homedir specified in /etc/passwd
(whether that ends up being /var/lib/mythtv or /home/mythtv
(someones else's config) or something else entirely).

btw, another simplification in packaging that I have seen
recommended by the devs is to always install the frontend
with a backend install (due to some config issues, I think).

btw, thanks for asking for thoughts. And thanks for building
the packages.

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


newbury at mandamus

Jul 18, 2012, 5:40 PM

Post #15 of 25 (2177 views)
Permalink
Re: Help needed for RPM Fusion package modernizaton [In reply to]

On 07/18/2012 03:07 PM, Gary Buhrmaster wrote:
> On Wed, Jul 18, 2012 at 5:40 PM, Richard Shaw<hobbes1069 [at] gmail> wrote:
> ....
>> I like that idea better, but it could be a migration mess...
>> /var/lib/mythtv is already created by the package.

>
> btw, thanks for asking for thoughts. And thanks for building
> the packages.

This! I had never used the package route. I typed yum install mythtv on
a 'livecd-install-to harddrive' etup and it pulled it all down and did
the deed nicely.

Kudos ( and brownie points) to Richard.


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


hobbes1069 at gmail

Jul 23, 2012, 7:05 AM

Post #16 of 25 (2124 views)
Permalink
Re: Help needed for RPM Fusion package modernizaton [In reply to]

On Wed, Jul 18, 2012 at 8:54 AM, Daniel Thor Kristjansson
<danielk [at] cuymedia> wrote:
> On 07/18/2012 09:18 AM, Richard Shaw wrote:
>>
>> Since 0.25.2 has been tagged I figured this was worth pinging....
>>>
>>> 1. The current package still installs a mysql.txt file. I think this
>>>
>>> is totally unneeded but wanted to check first. It also currently
>>> installs a blank config.xml in /etc/mythtv which I think is all I
>>> need.
>
> The 0.25 series uses mysql.txt, for 0.26 mysql.txt should not be installed.

Hmm... I know mysql.txt isn't obsolete in 0.25, but all of my systems
seem to have config.xml as well. I've been able to remove or rename
mysql.txt and everything appears to work.

I assume the first time I ran mythtv-setup or mythfrontend that the
information in mysql.txt was "copied" into config.xml? If that's true,
is it safe to assume that all mysql.txt's can be removed?

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


hobbes1069 at gmail

Jul 23, 2012, 7:11 AM

Post #17 of 25 (2111 views)
Permalink
Re: Help needed for RPM Fusion package modernizaton [In reply to]

On Wed, Jul 18, 2012 at 2:07 PM, Gary Buhrmaster
<gary.buhrmaster [at] gmail> wrote:
> btw, another simplification in packaging that I have seen
> recommended by the devs is to always install the frontend
> with a backend install (due to some config issues, I think).

I'll have to look into this but I don't know what would be needed in
the frontend package that would help...

One thing I have been thinking of doing is to install a default
config.xml (pointing to localhost) in /etc/mythtv rather than an empty
file which is what's currently installed by the backend package.

The reason I think this would be better is because by default the
systemd service file runs as use mythtv which does not have a login,
so not only would the end user need to force a login as user mythtv
but neither the HOME or MYTHCONDIR environment variables would be set
correctly and the setup files would instead be installed to
/root/.mythtv.

With the default file they would at least have something they could
edit without having to remember how to input all the XML tags.

There's still the problem of a redundant config.xml being installed to
$HOME/.mythtv the first time they run mythfrontend, but I don't think
there's much I can do about that at this point.

Anyone see a problem with this?

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


Michael.S.Schumacher at gmx

Jul 23, 2012, 12:17 PM

Post #18 of 25 (2098 views)
Permalink
Re: Help needed for RPM Fusion package modernizaton [In reply to]

Hello Richard,

Saturday, July 14, 2012, 11:04:43 PM, you wrote:

RS> Ok, now that I've got 0.25.1 (mostly) fixed I though it would be good
RS> to make sure that the package is up to date setup wise and had a few
RS> questions.

There is another unmentioned point with the RHEL-package. The package
mythtv-backend-0.25-6.el6.x86_64.rpm as well as well as
mythtv-backend-0.25.1-1.el6.x86_64.rpm are both installing the
"0.24-style" startup script in /etc/init.d/ that contains

OPTIONS="$OPTIONS --daemon --user ${MYTHBACKEND_USER} --logfile /var/log/mythtv/$prog.log --pidfile /var/run/$prog.pid"

rather than

OPTIONS="$OPTIONS --daemon --user ${MYTHBACKEND_USER} --logpath /var/log/mythtv --pidfile /var/run/$prog.pid"


looks like I am another beta-tester for the RHEL line. :-)


--
Best regards,
Michael mailto:Michael.S.Schumacher [at] gmx


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


hobbes1069 at gmail

Jul 23, 2012, 12:55 PM

Post #19 of 25 (2101 views)
Permalink
Re: Help needed for RPM Fusion package modernizaton [In reply to]

On Mon, Jul 23, 2012 at 2:17 PM, Michael Schumacher
<Michael.S.Schumacher [at] gmx> wrote:
> There is another unmentioned point with the RHEL-package. The package
> mythtv-backend-0.25-6.el6.x86_64.rpm as well as well as
> mythtv-backend-0.25.1-1.el6.x86_64.rpm are both installing the
> "0.24-style" startup script in /etc/init.d/ that contains
>
> OPTIONS="$OPTIONS --daemon --user ${MYTHBACKEND_USER} --logfile /var/log/mythtv/$prog.log --pidfile /var/run/$prog.pid"
>
> rather than
>
> OPTIONS="$OPTIONS --daemon --user ${MYTHBACKEND_USER} --logpath /var/log/mythtv --pidfile /var/run/$prog.pid"

Are you sure 0.25.1 doesn't have this fixed? I just downloaded the
mythtv-backend-0.25.1-1 package from the updates-testing repo[1] and
it definitely had --logpath...

Either way I haven't kept it up to date yet because I was waiting for
pmount to work it's way into Fedora EPEL updates (it's still in
updates-testing for a few more days) and we have yet to build xmltv
for EL6.

Thanks,
Richard

[1] http://download1.rpmfusion.org/free/el/updates/testing/6/x86_64/mythtv-backend-0.25.1-1.el6.x86_64.rpm
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-dev


Michael.S.Schumacher at gmx

Jul 23, 2012, 2:56 PM

Post #20 of 25 (2104 views)
Permalink
Re: Help needed for RPM Fusion package modernizaton [In reply to]

Hello Richard,

Monday, July 23, 2012, 9:55:51 PM, you wrote:

>> There is another unmentioned point with the RHEL-package. The package
>> mythtv-backend-0.25-6.el6.x86_64.rpm as well as well as
>> mythtv-backend-0.25.1-1.el6.x86_64.rpm are both installing the

RS> Are you sure 0.25.1 doesn't have this fixed? I just downloaded the
RS> mythtv-backend-0.25.1-1 package from the updates-testing repo[1] and
RS> it definitely had --logpath...

You are right. Looks like I messed something up when I installed both
versions. Perhaps an old startup file was still there. Anyway, I
checked and the old style start script is in 0.25-6, but the corrected
one is in 0.25.1-1. Sorry for the confusion.

Any time schedule for the new version?


--
Best regards,
Michael mailto:Michael.S.Schumacher [at] gmx


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


hobbes1069 at gmail

Jul 23, 2012, 3:47 PM

Post #21 of 25 (2094 views)
Permalink
Re: Help needed for RPM Fusion package modernizaton [In reply to]

On Mon, Jul 23, 2012 at 4:56 PM, Michael Schumacher
<Michael.S.Schumacher [at] gmx> wrote:
> Any time schedule for the new version?

I'm working on 0.25.2 for all releases (F16, F17, and EL6) but there's
an issue in rawhide that's preventing me from building there. I can
skip it for now but I'd rather keep everything "in-sync".

Also, for the EL6 build we're still missing xmltv so I may have to see
if I can help things along there.

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


mtdean at thirdcontact

Jul 30, 2012, 11:36 AM

Post #22 of 25 (2002 views)
Permalink
Re: Help needed for RPM Fusion package modernizaton [In reply to]

On 07/18/2012 02:03 PM, Bill Meek wrote:
> On 07/18/2012 10:04 AM, Stuart Morgan wrote:
>> On Wednesday 18 Jul 2012 09:36:01 Bill Meek wrote:
> ...
>>> Set LANG if it isn't already. For example: LANG=en_US.UTF-8.
>>
>> Making sure that it's actually correct for that machine/user and not
>> en_US for
>> everyone.
>>
>> That said we don't actually need LANG for locale, it's just used as a
>> hint, we
>> still ask users to confirm their language/country - entering these
>> incorrectly
>> will result in the wrong settings being used by default.

We need to ensure that Qt properly "self-configures" its character
encoding support. To do this, we suggest specifying LC_ALL or LC_CTYPE
/and/ LANG environment variables that are used by Qt to determine the
system's character encoding stuff. So, this is completely unrelated to
the locale-support code in MythTV, but necessary for proper character
encoding/multi-byte character support.

>
> I use: test -f /etc/default/locale && . /etc/default/locale || true
> to set it properly LANG in the Upstart .conf file.
>
> In any case, I always set LANG to remove the info & warning messages
> in the backend (and frontend) log:
>
> I [1329/1329] CoreContext mythcorecontext.cpp:231 (Init) - Assumed
> character encoding:
> W [1329/1329] CoreContext mythcorecontext.cpp:238 (Init) - This
> application expects to be running a locale that specifies a UTF-8
> codeset, and many features may behave improperly with your current
> language settings. Please set the LC_ALL or LC_CTYPE, and LANG
> variable(s) in the environment in which this program is executed to
> include a UTF-8 codeset (such as 'en_US.UTF-8').
>
> The above from: v0.26-pre-906-gb66f0cf, I updated the Upstart Wiki
> while on 0.25pre.
>
> Or I have something configured wrong, or the messages don't need to be
> there
> anymore or ???

Note "LC_ALL or LC_CTYPE, and LANG variable(s)". It doesn't say "LC_ALL
or LC_CTYPE or LANG variable(s)". That means you should specify either
LC_ALL or at least LC_CTYPE in addition to LANG. Specifying them is
definitely correct. (Though for generic package-installed startup
scripts, you should probably leverage the distro's configuration files,
i.e. an /etc/sysconfig/i18n or /etc/sysconfig/lang or ... to make sure
you get the right configuration, and it changes when the user
reconfigures the distro. Granted, you'll need to verify any codeset
information that may be specified in those files, possibly replacing it
with UTF-8, which is what you'll need with MythTV.)

The reason you have to do this is because there's no standard way to
specify the character encoding mechanism, so different systems
(different platforms and even different distros) use different
mechanisms. Therefore, Qt has a terrible, ugly hack that checks all
sorts of things and makes a best guess. While there are many ways you
could trick it into doing the right thing, the easiest way to ensure Qt
does the right thing is to explicitly specify the desired configuration
in Qt's "most-preferred" approaches. So, a distro-specific start script
can provide some code to adapt the information in the distro's
configuration files for use by Qt.

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


mtdean at thirdcontact

Jul 30, 2012, 11:40 AM

Post #23 of 25 (1998 views)
Permalink
Re: Help needed for RPM Fusion package modernizaton [In reply to]

On 07/18/2012 09:54 AM, Daniel Thor Kristjansson wrote:
> On 07/18/2012 09:18 AM, Richard Shaw wrote:
>>> - What components of mythtv use HOME and for what purposes.
>
> As far as I know HOME is only used when MYTHCONFDIR isn't set. It's
> used to create a myth configuration directory at $HOME/.mythtv

Note, though, that HOME may be used by various scripts that are run by
the MythTV frontend and/or backend. Therefore, you really should
specify a HOME dir that's writable by the user running the application.

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


keemllib at gmail

Jul 30, 2012, 3:19 PM

Post #24 of 25 (1992 views)
Permalink
Re: Help needed for RPM Fusion package modernizaton [In reply to]

On 07/30/2012 01:36 PM, Michael T. Dean wrote:
> On 07/18/2012 02:03 PM, Bill Meek wrote:
...
>> I use: test -f /etc/default/locale && . /etc/default/locale || true
>> to set it properly LANG in the Upstart .conf file.
>>
>> In any case, I always set LANG to remove the info & warning messages
>> in the backend (and frontend) log
...
> It doesn't say "LC_ALL or LC_CTYPE or LANG variable(s)".
...

Hi;

Yes, definitely the case, But after you added setlocale() in:
http://code.mythtv.org/trac/changeset/a63fc04, LC_CTYPE gets
set correctly if LANG is set.

In the *buntu world, setting LANG in the Upstart script is enough. Not
that my disk space is that tight. The MythTV Wiki was updated in June
to remove LC_ALL to match the mythbuntu version of that script.

Thanks for commenting on this. I'd been meaning to go back and figure
out why not setting LC_ALL didn't cause the warning message to fire.

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


mtdean at thirdcontact

Jul 30, 2012, 4:07 PM

Post #25 of 25 (1991 views)
Permalink
Re: Help needed for RPM Fusion package modernizaton [In reply to]

On 07/30/2012 06:19 PM, Bill Meek wrote:
> On 07/30/2012 01:36 PM, Michael T. Dean wrote:
>> On 07/18/2012 02:03 PM, Bill Meek wrote:
> ...
>>> I use: test -f /etc/default/locale && . /etc/default/locale || true
>>> to set it properly LANG in the Upstart .conf file.
>>>
>>> In any case, I always set LANG to remove the info & warning messages
>>> in the backend (and frontend) log
> ...
>> It doesn't say "LC_ALL or LC_CTYPE or LANG variable(s)".
> ...
>
> Hi;
>
> Yes, definitely the case, But after you added setlocale() in:
> http://code.mythtv.org/trac/changeset/a63fc04, LC_CTYPE gets
> set correctly if LANG is set.
>
> In the *buntu world, setting LANG in the Upstart script is enough. Not
> that my disk space is that tight. The MythTV Wiki was updated in June
> to remove LC_ALL to match the mythbuntu version of that script.
>
> Thanks for commenting on this. I'd been meaning to go back and figure
> out why not setting LC_ALL didn't cause the warning message to fire.
>


Pretty sure you know this, but just in case, I'll mention that the
setlocale() does not, er, set the locale--it only queries the
currently-configured locale using the default mechanism used by glibc,
which is a whole different set of code from the mechanism Qt uses to
determine the locale. This whole mess is a defensive strategy to do our
best to make sure that Qt does the right thing (since we can't even ask
Qt what it's done), so I highly recommend the
"most-likely-to-always-work" approach.

Since you're not getting a warning when you start up, setlocale() is
finding no LC_* values, so it falls back to checking LANG (standard
approach for *glibc). However, I can't/won't guaranteed that Qt is also
using LANG's value before something else that's configured on your
system. I didn't code in all of the checks that are done by Qt (there
are about 8 of them in a huge block of ugly code that even Qt's comments
describe as a hack), but if you set LC_ALL (or at least LC_CTYPE) and
LANG, Qt should do the right thing in at least the 2 places I know of
where they're making decisions about character encoding and that can
affect our code.

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

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.