Difference between revisions of "Upgrading To SVN"

From MythTV Official Wiki
Jump to: navigation, search
(the libmyth rpm should not be installed if using svn)
m (Protected "Upgrading To SVN": Historical archive ([edit=sysop] (indefinite) [move=sysop] (indefinite)))
 
(29 intermediate revisions by 13 users not shown)
Line 1: Line 1:
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 [[Backing up your database|back up]] your database (and your build directory if you did not install Myth with a [[package manager]]) before you start this procedure.
+
{{outdated}}
 +
 
 +
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 [[Database Backup and Restore|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'''.
 
And as with all procedures concerning software: '''read everything before doing anything'''.
  
== How to upgrade to SVN from ATrpms ==
+
= Make sure you need to upgrade from SVN =
'''Try this at your own risk as it may break things.'''
+
 
 +
The atrpms repository (http://atrpms.net/) has SVN trunk rpms ready to use.
 +
After you add atrpms to your yum config files then try:
  
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.
+
  $ yum --enable=atrpms-bleeding list mythtv
  
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.
+
and see if the displayed versions are sufficient for you.
  
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.
+
= How to upgrade to SVN from ATrpms =
''If things go south, an {{{apt-get --reinstall install mythtv-suite}}} should fix things''
+
'''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''
  
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==
 +
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.
  
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:
+
===Uninstall all existing myth RPMs to avoid conflicts:===
  
 
  # rpm -qa | grep myth | xargs rpm -e
 
  # rpm -qa | grep myth | xargs rpm -e
Line 23: Line 35:
 
  $ cd ~/myth-svn
 
  $ cd ~/myth-svn
  
=== MythTV ===
+
=Upgrading Specific Packages=
 +
== MythTV ==
 +
 
 +
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
  
  # yum install lirc-lib-devel lame-devel qt-devel subversion
+
To run the latest "trunk" version
  $ svn co http://cvs.mythtv.org/svn/trunk/mythtv
+
 
 +
  # 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
 
  $ cd mythtv
  
Open settings.pro and change the following (if neccesary):
+
For both versions open settings.pro and change the following (if neccesary):
 
    
 
    
 
  $ ./configure --prefix=/usr/local
 
  $ ./configure --prefix=/usr/local
$ qmake PREFIX=/usr mythtv.pro
 
 
  $ make
 
  $ make
 
  # make install
 
  # make install
Line 41: Line 65:
 
  # /sbin/chkconfig --level 345 mythbackend on
 
  # /sbin/chkconfig --level 345 mythbackend on
  
note: the PREFIX on qmake is optional if you want to install the file to /usr/local.
+
===Resolving missing dependencies===
 
+
* If qmake doesn't run install qt-devel by running 'yum install qt-devel'.
---notes on resolving missing dependencies---
+
* 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.
note1: if qmake doesn't run install qt-devel by running 'yum install qt-devel'.
+
* 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:
 
 
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
 
  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 <pre>#MBE_LOCATION="/usr/local/bin"</pre> to <pre>MBE_LOCATION="/usr/bin"</pre>
 
If you installed to /usr instead of /usr/local, then edit /etc/sysconfig/mythbackend and change the line <pre>#MBE_LOCATION="/usr/local/bin"</pre> to <pre>MBE_LOCATION="/usr/bin"</pre>
Line 61: Line 79:
 
  echo "/usr/local/lib" > /etc/ld.so.conf.d/usr_local.conf
 
  echo "/usr/local/lib" > /etc/ld.so.conf.d/usr_local.conf
  
=== MythPlugins Note ===
+
== MythPlugins ==
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:
+
To get the updated plugins you should use:
 
 
  
 
  $ cd ~/myth-svn
 
  $ cd ~/myth-svn
  $ svn co http://cvs.mythtv.org/svn/trunk/mythplugins
+
  $ svn co http://svn.mythtv.org/svn/trunk/mythplugins
 
  $ cd mythplugins
 
  $ cd mythplugins
 
  
 
Then use the steps below..
 
Then use the steps below..
  
1. run configure --help and decide on required options to get your plugins built  
+
# Run configure --help and decide on required options to get your plugins built  
2. run configure and/or resolve dependancies
+
# Run configure and/or resolve dependancies
3. build it.
+
# Build it.
  
 
=== MythMusic Dependencies ===
 
=== MythMusic Dependencies ===
  
 +
# yum install fftw2 fftw2-devel libtaglib-devel flac-devel libcdaudio-devel SDL-devel cdparanoia-devel
  
  # 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 ===
 
=== MythNews/Video/Weather Dependencies ===
Line 91: Line 110:
  
 
''Note: ./configure is not necessary for many of the add-ins''
 
''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 ===
 
=== Building the Plugins ===
  
 
  $ ./configure --prefix=/usr
 
  $ ./configure --prefix=/usr
$ qmake PREFIX=/usr mythplugins.pro
 
 
  $ make
 
  $ make
 
  # make install
 
  # make install
Line 118: Line 130:
 
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?):
 
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
+
<code>
 +
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
 +
</code>
 +
 
 +
== 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/
 +
 
 +
 
 +
= How to upgrade to SVN with Gentoo ebuilds =
  
== How to upgrade to CVS with Gentoo ebuilds ==
 
 
'''Try this at your own risk as it may break things.'''
 
'''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 is now (since March 2007) official ebuilds for the svn version of MythTV.
 
 
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
 
  
 +
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
  
$ 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:
+
= How to upgrade to SVN with Mythbuntu =
  
$ emerge unmerge mythtv mythvideo mythgallery
+
[http://www.mythbuntu.org/auto-builds Automatic Weekly Builds]
$ emerge mythtv-cvs mythvideo-cvs mythgallery-cvs
 
  
 
[[Category:HOWTO]]
 
[[Category:HOWTO]]

Latest revision as of 16:39, 18 January 2011

Time.png Outdated: The information on this page may no longer be relevant to the current release of MythTV, 34.0. Please consider helping to update it. This page was last modified on 2011-01-18.

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

MythTV

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

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

??[TODO]??


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

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