Difference between revisions of "Upgrading To SVN"

From MythTV Official Wiki
Jump to: navigation, search
m (How to upgrade to CVS with Gentoo ebuilds)
m (Removed the note about how it used to be CVS. People can view the page history if they really care.)
Line 6: Line 6:
 
'''Try this at your own risk as it may break things.'''
 
'''Try this at your own risk as it may break things.'''
  
Note1: This document used to refer to 'cvs' (Concurrent Versioning System), but the Myth source repository is now in 'svn' (Subversion), and so all references have been updated to refer to svn/subversion.
+
Note1: 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.
  
Note2: 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.
+
Note2: 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.
 
 
Note3: 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.
 
 
''If things go south, an {{{apt-get --reinstall install mythtv-suite}}} should fix things''
 
''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).
+
Note3: 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.
 
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.

Revision as of 16:40, 30 May 2007

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.

How to upgrade to SVN from ATrpms

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

Note1: 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.

Note2: 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. If things go south, an {{{apt-get --reinstall install mythtv-suite}}} should fix things

Note3: 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.

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

MythTV

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

Open settings.pro and change the following (if neccesary):

$ ./configure --prefix=/usr/local
$ 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


If you installed to /usr instead of /usr/local, then edit /etc/sysconfig/mythbackend and change the line
#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 Dependencies

# yum install fftw2 fftw2-devel libid3tag-devel libmad-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

MythDVD Dependencies

$ yum install libdvdread-devel

MythNews/Video/Weather Dependencies

??[TODO]??


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

MythWeb

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/

Building the Plugins

$ ./configure --prefix=/usr
$ qmake PREFIX=/usr 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. 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-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.

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