Upgrading To SVN
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.
Contents
How to upgrade to SVN from ATrpms
Try this at your own risk as it may break things.
Note1: This document used to refer to 'cvs' (Concurrent Versioning System) (see the title), but the Myth source repository is now in 'svn' (Subversion), and so all references have been updated to refer to svn/subversion.
Note2: This is for upgrading the ATrpms packages which install things in /usr not /usr/local. If you do not change the .pro files to use /usr as the prefix then you will need to adjust any scripts/shortcuts you might have to reflect the new paths.
Note3: doing apt-get uninstall mythtv-suite (or yum remove) will remove a LOT more than Myth. We instead suggest the option below which remotres just the necessary myth rpms. If things go south, an {{{apt-get --reinstall install mythtv-suite}}} should fix things
Note4: the 'apt-get' command is mostly equivalent to the newer (and better) 'yum' command. If you have 'yum' on your system, you shoud consider using that in place of 'apt-get' (basic commands only are equivalent).
About Subversion: it 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.
Uninstall all existing myth RPMs to avoid conflicts:
# rpm -qa | grep myth | xargs rpm -e $ mkdir ~/myth-svn $ cd ~/myth-svn
MythTV
# yum install lirc-lib-devel lame-devel qt-devel subversion libmyth $ svn co http://cvs.mythtv.org/svn/trunk/mythtv $ cd mythtv
Open settings.pro and change the following (if neccesary):
In the Native lirc support section uncomment (delete leading #)the lines {{{CONFIG += using_lirc}}} and {{{LIRC_LIBS = -llirc_client}}}
$ ./configure --prefix=/usr $ qmake PREFIX=/usr mythtv.pro $ 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
note: the PREFIX on qmake is optional if you want to install the file to /usr/local.
---notes on resolving missing dependencies--- note1: if qmake doesn't run install qt-devel by running 'yum install qt-devel'.
note2: 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.
note3: 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 poissible 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
#MBE_LOCATION="/usr/local/bin"to
MBE_LOCATION="/usr/bin"
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 OR echo "/usr/local/lib" > /etc/ld.so.conf.d/usr_local.conf
MythPlugins Note
The information below used to contain separate instructions for each plugin. All plugins are now in one svn tree. To get the updated plugins you should use:
$ cd ~/myth-svn $ svn co http://cvs.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 Dependancies
# yum install fftw2 fftw2-devel libid3tag-devel libmad-devel flac-devel libcdaudio-devel SDL-devel cdparanoia-devel
Open settings.pro and change the following:
Uncomment (delete # before line) {{{INCLUDEPATH *= /usr/include/cdda}}}
MythDVD Dependancies
$ yum install libdvdread-devel
MythNews/Video/Weather Dependancies
??[TODO]??
Note: ./configure is not necessary for many of the add-ins
MythWeb
$ cd ~/myth-svn/mythplugins/mythweb # cp -R * /var/www/html/mythweb/
Building the Plugins
./configure --prefix=/usr qmake mythplugins.pro 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. as 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 enourmously, as rpm names don't always mach 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-devel qt qt-devel qt-MySQL libmad libmad-devel libid3tag libid3tag-devel flac libcdaudio libcdaudio-devel cdparanoia-libs cdparanoia-devel libvorbis libvorbis-devel libtiff libtiff-devel libid3tag libid3tag-devel libid3tag-debuginfo libdvdread libdvdread-devel libdvdread-debuginfo lame lame-devel lame-debuginfo flac flac-devel fftw3 fftw3-devel faad2 faad2-devel bmp bmp-aac-debuginfo libdvdnav libdvdnav-devel
How to upgrade to CVS with Gentoo ebuilds
Try this at your own risk as it may break things.
One obscure feature of Gentoo ebuilds is packages that build from CVS instead of from tar files. While these ebuilds are not included in portage, it is relatively easy to install them yourself.
There are two sources for ebuilds. One is at http://bugs.gentoo.org/show_bug.cgi?id=66337 and the other is at http://ice-nine.us/mythtv-cvs-ebuilds.tar.bz2
$ mkdir /usr/local/portage $ echo 'PORTDIR_OVERLAY="/usr/local/portage"' >> /etc/make.conf $ cd /usr/local/portage $ tar -xpjf ~/myth-cvs.tar.bz2
You now have a -cvs ebuild corresponding to each regular myth package. The -cvs ebuilds conflict with the non-cvs ebuilds, so you'll have to manually unmerge the older builds first:
$ emerge unmerge mythtv mythvideo mythgallery $ emerge mythtv-cvs mythvideo-cvs mythgallery-cvs