Upgrading To SVN

From MythTV Official Wiki
Jump to: navigation, search

Time.png Outdated: The information on this page may no longer be relevant to the current release of MythTV, 31.0. Please consider helping to update it.

This article will explain how you can best upgrade from a release version to the most current development version retrieved from the Subversion server. It won't tell you how to go back, so you will likely be well served to make sure you back up your database (and your build directory if you did not install Myth with a package manager) before you start this procedure.

And as with all procedures concerning software: read everything before doing anything.

Make sure you need to upgrade from SVN

The atrpms repository (http://atrpms.net/) has SVN trunk rpms ready to use. After you add atrpms to your yum config files then try:

 $ yum --enable=atrpms-bleeding list mythtv

and see if the displayed versions are sufficient for you.

How to upgrade to SVN from ATrpms

Try this at your own risk as it may break things.

Things to know before you get started

  • This is for upgrading the ATrpms packages which install things in /usr not /usr/local. If you do not add /usr as the prefix then you will need to adjust any scripts/shortcuts you might have to reflect the new paths.
  • Doing apt-get uninstall mythtv-suite (or yum remove) will remove a LOT more than Myth. We instead suggest the option below which removes just the necessary myth rpms.
  • The 'apt-get' command is mostly equivalent to the newer (and better) 'yum' command. If you have 'yum' on your system, you should consider using that in place of 'apt-get' (basic commands only are equivalent).
  • Using ccache can greatly reduce your build times. If you have yum installed, 'yum install ccache' should install it for you. If you install it prior to running your any configure scripts, it will be enabled in the build process by default.
  • If things go south, an {{{apt-get --reinstall install mythtv-suite}}} should fix things

About Subversion

Subversion does not work through most HTTP Proxy caches... it uses some new HTTP commands (instead of the POST, GET, etc standard ones) which they don't understand and will reject. There are instructions on the Subversion site for configuring Squid to allow the new commands, but for ISP customers behind transparent port 80 ISP proxies (eg, NTL in the UK) Subversion connections on port 80 won't work at all (long delay on checkout attempt followed by error without downloading anything). The Subversion site suggests running the server on another port additionally (eg, port 81 or 8080) but mythtv.org does not seem to do this at the moment. One workaround is to ssh to another machine without the ISP proxy to checkout, create a tarball of the source tree and scp it back to your proxied machine.

Note regarding install paths

This guide is written on the basis that any existing RPM based install will be removed and the SVN install will overwrite the old install, in /usr. Accordingly the first step is to remove the existing myth RPMS. The 'Installing Mythtv SVN on Fedora Core' guide, installs SVN to /usr/local and does not *require* an un-install first. Thus *this* guide seems to disagree with the Fedora guide, but actually describes a different situation. If you want to keep your existing install, read the Fedora SVN guide to understand the minimal but important changes required.

Uninstall all existing myth RPMs to avoid conflicts:

# rpm -qa | grep myth | xargs rpm -e
$ mkdir ~/myth-svn
$ cd ~/myth-svn

Upgrading Specific Packages


There are two options available. Run the latest "trunk" version which contains the latest code but is considered unstable or use the latest "-fixes" version which is considered stable.

To run the latest "-fixes" version

# yum install lirc-lib-devel lame-devel qt-devel pulse-audio-libs-devel subversion
$ mkdir mythtv-release-0-21-fixes
$ svn co http://svn.mythtv.org/svn/branches/release-0-21-fixes/ mythtv-release-0-21-fixes
$ cd mythtv-release-0-21-fixes

To run the latest "trunk" version

# yum install lirc-lib-devel lame-devel qt-devel pulse-audio-libs-devel subversion
$ mkdir mythtv
$ svn co http://svn.mythtv.org/svn/trunk/ mythtv
$ cd mythtv

For both versions open settings.pro and change the following (if neccesary):

$ ./configure --prefix=/usr/local
$ make
# make install
$ cd contrib
# chmod a+x etc.rc.d.init.d.mythbackend
# cp etc.rc.d.init.d.mythbackend /etc/rc.d/init.d/mythbackend
# cp etc.sysconfig.mythbackend /etc/sysconfig/mythbackend
# /sbin/chkconfig --level 345 mythbackend on

Resolving missing dependencies

  • If qmake doesn't run install qt-devel by running 'yum install qt-devel'.
  • If you get the following error "big/little test failed error, no memalign() but sse enabled, either disable it or use --enable-memalign-hack" it means you don't have gcc or g++ installed. Run 'yum install gcc gcc-c++' to install required packages.
  • reviewing the ./configure script for lines containing 'has_library' can enlighten you to the large list of possible dependancies for mythtv. Here is a SLOW, but useful, one-liner command to help you determine a list of possible RPM dependancies for your system:
grep has_library ~/myth-svn/mythtv/configure | perl -pe 's/.*has_library (.*?) .*$//g;' | grep -v has_library | xargs yum whatprovides | grep i386 | perl -pe 's/ .*//;' | sort -n | uniq
If you installed to /usr instead of /usr/local, then edit /etc/sysconfig/mythbackend and change the line

If you find subsequently that starting the mythbackend service throws an error about libmythtv-*.so.0 not existing, it may have been placed in /usr/local/lib by the install action. You can work around this by appending /usr/local/lib to /etc/ld.so.conf and running ldconfig as root. This will find libraries in /usr/local/lib and allow it to work properly.

echo "/usr/local/lib" >> /etc/ld.so.conf
echo "/usr/local/lib" > /etc/ld.so.conf.d/usr_local.conf


To get the updated plugins you should use:

$ cd ~/myth-svn
$ svn co http://svn.mythtv.org/svn/trunk/mythplugins
$ cd mythplugins

Then use the steps below..

  1. Run configure --help and decide on required options to get your plugins built
  2. Run configure and/or resolve dependancies
  3. Build it.

MythMusic Dependencies

# yum install fftw2 fftw2-devel libtaglib-devel flac-devel libcdaudio-devel SDL-devel cdparanoia-devel

MythGallery Dependencies

To read additional information embedded within some digital pictures (EXIF data), you will need libexif-devel

# yum install libexif-dev

MythNews/Video/Weather Dependencies


Note: ./configure is not necessary for many of the add-ins

Building the Plugins

$ ./configure --prefix=/usr
$ make
# make install

Plugin Build Problem resolution

More often than not, a failure of the 'make' happens as a result of a missing library dependancy. Ask yourself: 1. Do I have the required library rpm installed? 2. Do I also have the -devel version of the rpm installed? 3. Which rpm is it? Here the command 'yum whatprovides libid3tag' (example) helps enormously, as rpm names don't always match the library name.

One-liner shell script to help identifiy possibly required rpms:

grep has_library ~/myth-svn/mythplugins/configure | perl -pe 's/.*has_library (.*?) .*$//g;' | grep -v has_library | xargs yum whatprovides | grep i386 | perl -pe 's/ .*//;' | sort -n | uniq

Here's a list of rpms I installed/upgraded to build the plugins and/or myth, even after having ATrpms version installed (some of these may be superfluous?):

yum install lirc-lib-devel lame lame-devel qt qt-devel qt-MySQL libmad libmad-devel libid3tag libid3tag-devel \ libcdaudio libcdaudio-devel cdparanoia-libs cdparanoia-devel libvorbis libvorbis-devel libtiff libtiff-devel \ libid3tag libid3tag-devel libid3tag-debuginfo libdvdread libdvdread-devel libdvdread-debuginfo lame-debuginfo \ flac flac-devel fftw3 fftw3-devel faad2 faad2-devel bmp bmp-aac-debuginfo libdvdnav libdvdnav-devel


Mythweb is NOT installed by the usual build process. You have to do the following by hand. The folder /var/www/html is the usual 'document root' for apache.

$ cd ~/myth-svn/mythplugins/mythweb
# cp -R * /var/www/html/mythweb/

How to upgrade to SVN with Gentoo ebuilds

Try this at your own risk as it may break things.

There is now (since March 2007) official ebuilds for the svn version of MythTV.

You need to hard-unmask them :

echo media-tv/mythtv >> /etc/portage/package.unmask
echo x11-themes/mythtv-themes >> /etc/portage/package.unmask
emerge -av mythtv

How to upgrade to SVN with Mythbuntu

Automatic Weekly Builds