User:Aradke/Upgrading from 0.18.1 to 0.19 on Debian from debs
This page does not refer in any way to the setup or configuration of mythtv or any of it's dependencies. It also assumes a general knowledge of Linux or *nix commands. Also whereever
aptitude is used
apt-get should also be useable.
I have also shamelessly borrowed chunks of text from Upgrading_from_0.18.1_to_0.19_on_Fedora_4_from_ATrpms
All feedback welcome!
Create a backup of your database
Before upgrading anything you'll want to backup your mythtv database, just in case something goes wrong.
$ mysqldump -u <sql username here> -p<password here> mythconverg -c > mythtv_backup18.sql
Note there is no space between the -p option and your password. For example, if your mysql username was mythtv and your password media the command would be:
mysqldump -u mythtv -pmedia mythconverg -c > mythtv_backup18.sql
This will save a backup of the database to your current directory.
Stop the backend
Stop the backend and any frontends. You'll also want to stop lircd.
Check to be sure that the backend and any other MythTV related processes have stopped with something like the following:
ps -ef | grep myth | grep -v grep
If there is anything listed there make sure to kill it before continuing.
Configuring your apt sources
Firstly you will need to make sure your sources for apt are correct. If your Debian box is only doing MythTV you should only need the base Debain repository and the MythTV repository. This is controlled by editting
An example Australian sources file:
deb http://ftp.au.debian.org/debian/ unstable main non-free contrib ### MythTV deb ftp://ftp.nerim.net/debian-marillat/ sid main
Note: I haven't tested this on a Debian stable (sarge) box and at the time of editing the version on ftp.nerim.net was still at 0.18.1
After this run the following to update your apt sources:
Generally you probably don't want to upgrade your entire Debian system. If it works now and after the MythTV upgrade you have problems isolating the cause could be very difficult.
Choose from the next two items as appropriate for your setup:
All MythTV components installed
The following command will upgrade all the components of MythTV:
aptitude install mythtv
Some MythTV components installed
As such you first need to make a list of which parts of MythTV you have installed.
aptitude search myth will give you a list of packages with "myth" in their name and their current status.
The following is an example from my backend box (after the upgrade). An "i" at the beginning of the line indicates that the package is installed on the system. Note that none of the frontend components are installed and some non-MythTV packages are listed due to having "myth" in their name.
# aptitude search myth v libmyth-0.16 - v libmyth-0.16-dev - v libmyth-0.17 - v libmyth-0.17-dev - v libmyth-0.18 - i libmyth-0.18.1 - Common library code for MythTV and add-on p libmyth-0.18.1-dev - Common library code for MythTV and add-on i A libmyth-0.19 - Common library code for MythTV and add-on p libmyth-0.19-dev - Common library code for MythTV and add-on v libmyth-dev - p libmythes-dev - simple thesaurus library (development fil p mythbrowser - A small web browser module for MythTV p mythcontrols - External controls for MythTV p mythdvd - DVD add-on module for MythTV p mythflix - netflix module for MythTV p mythgallery - Image gallery/slideshow add-on module for p mythgame - xmame add-on module for MythTV p mythmusic - Music add-on module for MythTV p mythnews - An RSS feed news reader module for MythTV p mythphone - a phone and videophone module for MythTV p mythplugins - Wrapper package for MythTV plugins p mythtv - A personal video recorder application (cl i mythtv-backend - A personal video recorder application (se i mythtv-common - A personal video recorder application (co i mythtv-database - A personal video recorder application (da p mythtv-debug - Debugging symbols for MythTV i mythtv-doc - A personal video recorder application (do p mythtv-frontend - A personal video recorder application (cl p mythtv-themes - Additional themes for MythTV p mythvideo - A generic video player frontend module fo p mythweather - Weather add-on module for MythTV i mythweb - Web interface add-on module for MythTV
Since you are only going to be upgrading the packages that are installed you need to run
aptitude install listing only the existing installed packages minus version specific libraries (i.e. libmyth). From the example above you would run the following:
aptitude install mythtv-backend mythtv-common mythtv-database mythtv-doc mythweb
Aptitude should now sort out any dependencies for you offer to install a whole pile of packages including those you specified.
The first thing you will need to do is run
Backends with a display or all in one systems
On a system with X running this should be as simple as
su - mythtv -c "DISPLAY=:0 mythtv-setup"
Backends without a display
If you have a backend server like I do with no display connected it's a little more complicated.
On the frontend (or any *nix box with X running) you will first need to make sure that remote hosts can connect to your display. Generally this can be accomplished by running
xhost + in a terminal or
DISPLAY=:0 xhost + if you have connected via ssh, etc. This will grant any host permission to display anything on your screen for the life of the X session. If this is an issue study the options for xhost.
Additionally your X server will need to be listening for remote TCP connections. By default most recent systems have this disabled. This can be controlled in a number of different places depending on how X is being started. For example with xdm you will need to edit
/etc/X11/xdm/Xserver and remove the " -nolisten tcp" from the end of the following line:
:0 local /usr/X11R6/bin/X vt7 -dpi 100 -nolisten tcp
With all this in mind run the following subsituting <frontend> for the name or IP address of the system you are using as a display:
su - mythtv -c "DISPLAY=<frontend>:0 mythtv-setup"
Most documentation mentions running mythfilldatabase now. I didn't do this myself since it takes a long time for me and it seemed to have no side effects. I would suggest that you do do this step though.
su - mythtv -c "mythfilldatabase"
I have a symlink on my system pointing /var/www/mythweb to /usr/share/mythtv/mythweb. This saves copying an extra set of files around when upgrading. I'll assume that this is the setup that you are using and that you are using Apache 2. Adapting these instructions to Apache 1 shouldn't be too hard.
/etc/apache2/conf.d/mythweb with the following contents:
<Directory "/var/www/mythweb"> AllowOverride All </Directory>
Also, verify that any files in
/etc/apache2/sites-enabled that relate to mythtv also have the correct AllowOverride setting within the <Directory "/var/www/mythweb> tags. Don't remove anything from within these tags, just verify the AllowOverride setting:
<Directory "/var/www/mythweb"> AllowOverride All </Directory>
Apache 1 users can add this to the end of their
You need to enable mod_rewrite (mod_env is builtin to Apache2).
ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/
/var/www/mythweb/.htaccess with the password for the MythTV MySQL database where it says "setenv db_password "mythtv"". The password can be found in
/etc/mythtv/mysql.txt on the line "DBPassword=MythTVPassword". The rest of this file should be correct on a standard install.
You should be able to get away with the defaults in
Lastly grant permission for Apache to write to the data directory:
chgrp -R www-data /var/www/mythweb/data/ chmod g+rw /var/www/mythweb/data/
At this point MythTV should be working again nicely. Since the rest of the system has been left as untouched as possible any problems that occur should be limited to the upgrade of MythTV. Start up a frontend by your preferred method and enjoy the new look and feel of 0.19.
I noticed that the commercial flagging was having a terrible effect on playback and interaction on my frontend system on occasions. This seemed to be when recording two or three channels at the same time and trying to play something back. For some reason I never noticed this under 0.18. To correct this I have changed the "nice" level of the backend by editing
/etc/init.d/mythtv-backend and changing the line that says
NICE=-1. I haven't had a chance to see if this corrects the problem yet since I also decided to turn off commercial detection on all my recordings. :-(