Author Topic: Updating MythTV with the latest SVN Howto  (Read 11709 times)

Hoochster

  • Regular Poster
  • **
  • Posts: 43
    • View Profile
Updating MythTV with the latest SVN Howto
« on: August 01, 2007, 05:58:10 am »
Until I can get the SVN Sources, once 1.1 comes out hopefully, I am not gonna waste time on a wiki, due to ideally it will all change and be PROPER.  This is more of a crude hack to make it work.  Mind you, it ideally should be safe, but it isn't proper.  Proper would be to take the dependencies for the dummy packages I have you make below and remove them from the source requirement.  Anywho, for those that might want it, here is how I upgraded Myth to the latest SVN.  Allowing you to apply any patches that might be required in your area.  Let me know any questions, or if you suggest anything that might work better till we can get sources. 

Step 1
Temporary Package Removal

First we need to remove some conflicting packages so that we can build the dependencies for compiling our own.  We later will re-install some of these dependencies, due to the fact they are the core of LinuxMCE!  Keep in mind during this time, none of your MD's will function, being as we will be taking out the DCERouter package.  Again, I repeat that we will be re-installing these later.  And the way we remove them won't be taking away any config files, just the binaries themselves.

So either SSH into your system, or open up another terminal by hitting CTRL-ALT-F2 or another Function Key.  Once in, we remove our packages.

Code: [Select]
sudo apt-get remove libmyth-0.20 libmyth-0.20-dev mythtv-backend mythtv-frontend mythtv-common mythtv-database mythweb pluto-mythtv-player pluto-mythtv-plugin pluto-dcerouter
This should remove all of those packages without complaining about other conflicts. 

Step 2
Install Dependencies

Now we will install the base dependencies for MythTV and also a package creator that we will use later to trick the system.  Mind you, this isn't ALL of the dependencies needed for Myth, this just covers the Core Backend/Frontend aspect.  If you have plugins that you want to install, you would have to install the dependencies for them separately just like you would with Myth alone.

Code: [Select]
sudo apt-get build-dep mythtv
sudo apt-get install checkinstall

This should install the base dependencies along with our package creator.

Step 3
MythTV SVN Compilation

Now we are ready to grab our SVN of Myth.  This is just how I do things, you can compile in your home directory if it suits you, but this is how I was brought up, whether it is proper, is to be determined! :)  But I always try and compile in /usr/local/src.  But to do so, we need to give our local user rights to compile there.  Again, this can be done without all these steps, but I believe it is proper.  Someone can correct me and teach me the right way if needed, I take learning too!  So first let's add our local user to some groups and change the permissions of the directories.

Code: [Select]
sudo adduser <username> src
sudo adduser <username> staff
sudo chown <username>:src /usr/src
sudo chown <username>:staff /usr/local/src

Substitute <username> with your local user.  And to be proper, you should log out and log back in, but it isn't absolutely required.  Now we need to grab the latest SVN.

Code: [Select]
mkdir /usr/local/src/mythtv.cvs
cd /usr/local/src/mythtv.cvs
svn co http://svn.mythtv.org/svn/trunk/mythtv
svn co http://svn.mythtv.org/svn/trunk/mythplugins
svn co http://svn.mythtv.org/svn/trunk/myththemes
svn co http://svn.mythtv.org/svn/trunk/themes

I personally like to keep record of the version of SVN I grabbed for reference in case I need to look up the TRACK and see of issues.  So whatever # is shown at the end of grabbing your source, I rename my directory to that as such:

Code: [Select]
mv mythtv mythtv.#####
Replacing ##### with the TRACK #.

Now we are ready to apply any patches you might use, and configure Myth.  I won't cover patches here, being as if you are doing this, then I would hope you know what patches you need, and everyone might have different ones.  So I will just show you the configure line.  I haven't had time to spend on it, to find out why, but having trouble with enabling XVMC.  Normally on a regular system it finds the libraries, but here, I assume they aren't installed.  I might come back and update this later or when we get the source and do the wiki, I will put the proper way in then.  I think the nvidia-glx-dev package needs installed.  I usually do the NVIDIA Drivers by Source, so that is a different topic.  And this is assuming NVIDIA, not everyone runs it!  So here is how I configure it.  Which mind you, is more than is needed, but it is what the default libmyth-0.20 uses, so I stuck with it for being proper.  And lots of these options are default.  But again, just being proper!

Code: [Select]
cd /usr/local/src/mythtv.cvs/mythtv.#####
./configure --prefix=/usr --enable-lirc --enable-audio-alsa --enable-audio-oss --enable-audio-jack --enable-audio-arts --enable-dvb --enable-ivtv --enable-firewire --enable-joystick-menu --disable-xvmc --enable-xvmc-vld --enable-xvmc-pro --enable-mmx --enable-proc-opt --enable-opengl-vsync

Now we are ready to compile and install.  This is assuming everything compiled ok, which it should unless you applied some patches that might not be compatible.

Code: [Select]
make
sudo make install

Step 4
Re-Installation of previous Packages

Now that we have our SVN Installed, we need to create some DUMMY packages to fill what our pluto packages have as dependencies required.  Once I get my hands on the source, we can just remove the dependencies from the source and it won't need these dummy packages.  Being as we manually compiled MythTV, it covers all of these packages mostly.  Except for MythWeb and MythTV-Database.  But the database is already installed, and MythWeb you can install yourself if you wish.  That isn't covered here. 

So here is where our package creator comes into play.  We just need to make a dummy blank package that gets installed just so when the pluto packages are re-installed they think we have what they are looking for.  To do this, we need to create an empty Makefile, with nothing to install, and then create the package like so.

Code: [Select]
mkdir /usr/local/src/mythtv.cvs/dummy
cd /usr/local/src/mythtv.cvs/dummy
nano -w Makefile

In this file, all we need is a line like such:

Code: [Select]
install:
That is it, now save the file by hitting CTRL-X and selecting Y to keep the filename.

Now to create our package, we just do this:

Code: [Select]
sudo checkinstall make install
It will first ask you if you wish to create package documentation.  This is a dummy package with no docs, so just answer N here.  Next it will ask for a description of the package.  I just put in what I am going to call the package with dummy-package at the end.  Then after you hit ENTER twice it will show you what it is going to do.  We need to change the actual name of the package so that it matches what we need.  That is usually Option 2.  And hopefully it appended todays date as the Version #, and you don't have to do anything, but if it didn't then enter Option 3 to put the date in as something for a Version.  That is it, once all that is entered, it should look something like:

This package will be built according to these values:

0 -  Maintainer: [ hooch@dcerouter ]
1 -  Summary: [ libmyth-0.20-dummy-package ]
2 -  Name:    [ libmyth-0.20 ]
3 -  Version: [ 20070731 ]
4 -  Release: [ 1 ]
5 -  License: [ GPL ]
6 -  Group:   [ checkinstall ]
7 -  Architecture: [ i386 ]
8 -  Source location: [ dummy ]
9 -  Alternate source location: [  ]
10 - Requires: [  ]

Enter a number to change any of them or press ENTER to continue:


Once it looks like the above, just hit ENTER to create the package, and it will install it for you.  We need to do that for all of the dependencies that the pluto packages will need:

libmyth-0.20
mythtv-backend
mythtv-frontend
mythtv-common
mythtv-database
mythweb


So in order to accomplish that, once one package is built, you can just get rid of the description-pak file and repeate the steps above, changing the name to the other package names. 

Once all your packages have been built and installed.  Then you are ready to re-install our pluto packages.

Code: [Select]
sudo apt-get install pluto-dcerouter pluto-mythtv-player pluto-mythtv-plugin
Step 5
Reboot and MythTVSetup

Whether it is absolutely required, I don't know but it is probably best, I would reboot the system now so that it boots back up with the new Myth and re-starts the DCERouter.

Code: [Select]
sudo reboot
Once your system has come back up, and you start the Core Services, you now need to run mythtv-setup  You will want to do this from the Orbiter.  Once it is running, you will need to go into General and possibly change the Database Password to match what is in your /etc/mythtv/mysql.txt file.  Once that is done, it will probably exit out of the setup.  And you will have to re-run it if you need to make any changes that are necessary.  Once you exit out, I also had to update the mysql.txt file for the mythtv user as well. 

Code: [Select]
sudo nano -w /home/mythtv/.mythtv/mysql.txt
For the DBPassword, make sure it matches what is in your /etc/mythtv/mysql.txt file.  Once done save the file and I believe it will restart the backend, and you should be back up and running.  With your new SVN of Myth. 

This didn't cover any Plugins or Themes, but there shouldn't be any issues installing them.  Just configure and compile them like you normally would.  And restart the backend.  And I haven't gotten into LinuxMCE enough yet to know what might have to be done so that your remote MD's will reflect the new Myth.  I think ideally it copies the files from your Core, so hopefully nothing, but maybe someone else can chime in there, till I get time to set one up.

Hopefully that helps someone.  Like mentioned above, once 1.1 goes final, and they hopefully release the SVN Sources of all the modules, then maybe we can do this properly instead of basically hacking it to work.  Let me know if there is anything you see that should be done better.  I am not ashamed to say I sure as hell don't know everything.  I can just usually hack at things to make them work! :)  DANGEROUS!

Take care

Hooch
« Last Edit: August 10, 2007, 05:39:50 pm by Hoochster »

Zaerc

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 2256
  • Department of Redundancy Department.
    • View Profile
Re: Updating MythTV with the latest SVN Howto
« Reply #1 on: August 07, 2007, 09:53:20 pm »
Having a few hours to kill before the LMCE-1.1 0704 torrent completes, I figured I might as well try this one last time on LMCE-1.1 RC1.  Haven't gotten MythTV fully working yet (since I only just started messing with it) but at least this time I have a pretty good idea of what to expect, and how I'm supposed to configure it, so I should at least be able to spot the serious breakage if it occurs.

Step 1: Check.

Step 2a: E: You must put some 'source' URIs in your sources.list
Code: [Select]
echo "deb-src http://us.archive.ubuntu.com/ubuntu/ feisty main restricted universe multiverse" >> /etc/apt/sources.list
apt-get update
Step 2b: Check.

Step 3a-d: Skipped (working as root).

Step 3e-j: Check.

Step 3k: Skipped (one time build).

Step 3l: cd /usr/local/src/mythtv.cvs/myth.##### => cd /usr/local/src/mythtv.cvs/mythtv.##### (nitpicking).
Step 3m: Check.

Step 3n: Check.
Step 3o: Check.

Step 4a: Check.
Step 4b: Check.
Step 4c: echo "install:" >Makefile (easier I think).

Step 4d: I did this in a loop because I'm lazy:
Code: [Select]
for DUMMY in libmyth-0.20 mythtv-backend mythtv-frontend mythtv-common mythtv-database mythweb
do
        checkinstall make install<< EOF
n

2
$DUMMY

EOF
        rm description-pak
done

Step 4e: Check.

Step 5a: Check.

Step 5b: Here is a scripted version, it also shows the current password in use:
Code: [Select]
pass_tmp=`sed -ne '/DBPassword/s/^[^=]*=//p' /etc/mythtv/mysql.txt` &&
echo "DBPassword=$pass_tmp" &&
sed -e "/DBPassword/s/=[^=]*$/=$pass_tmp/" -i /home/mythtv/.mythtv/mysql.txt &&
unset pass_tmp

I notice that all my previous settings have been preserved. Only it seems that the MythTV setup from the "computing" screen does not ask anymore whether to stop the backend beforehand, or whether to run "mythfilldatabase" afterward, probably something that got (re-)clobbered during the MythTV installation.  No MythTV in the KDE "start" menu either.  Other then that everything seems to be working (as far as I had it working before).

A diskless MD however complains that it can only understand version31 but the server speaks version35.  So I think, I''l try this on there as well while I mentaly prepare for installing 1.1 0704 (and leave ktorrent to seed back a bit more).

"Change is inevitable. Progress is optional."
-- Anonymous


Hoochster

  • Regular Poster
  • **
  • Posts: 43
    • View Profile
Re: Updating MythTV with the latest SVN Howto
« Reply #2 on: August 07, 2007, 10:46:02 pm »
Heh CHECK!.  Keep in mind now that we have sources, hopefully this can all be done properly, will have to play with it when time permits! 

Ya, the plugin I am guessing or the player that is part of LinuxMCE, is what is complaining about the protocol.  With source, hopefully we can figure out how to update it to the proper database schema of the newer myth we install, so that it interfaces properly.  And ya, most source compiles won't automatically install into X by itself, only packages will that know to put the icons in there. 

Started the torrent of the CD at lunch, didn't look promising on speed heh.  But hopefully it will be done tonight and I will see if I can find time to tinker some.  Thanks for trying it out.  At least we know that part is working.  Now to get the interface to work. 

Zaerc

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 2256
  • Department of Redundancy Department.
    • View Profile
Re: Updating MythTV with the latest SVN Howto
« Reply #3 on: August 08, 2007, 02:55:18 am »
Heh yeah, I figured I'd do it as a checklist and keep track of every step, and hang on I'm not done yet.  Just for the record, I got revision 14157 from SVN previously

On a diskless MD (I'll skip everything I've covered already):

Step 3g: -bash: svn: command not found
Code: [Select]
apt-get install subversion

While I am doing this I notice the revision changing to 14158, so I do 3g-3j again and it updates a single file.  It probably would have been easier and safer to re-use the sources already compiled on the Core, but where is the fun in that?

Step 4e: left out pluto-dcerouter as that wanted to install almost 500 meg of software, and I'm not sure whether it is really needed, got this error though:
Code: [Select]
Setting up pluto-mythtv-plugin (2.0.0.44.0707242200) ...
/var/lib/dpkg/info/pluto-mythtv-plugin.postinst: line 25: /usr/pluto/bin/sqlCVS: No such file or directory
dpkg: error processing pluto-mythtv-plugin (--configure):
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 pluto-mythtv-plugin
E: Sub-process /usr/bin/dpkg returned an error code (1)

Don't know if it's related, can't win them all anyway.

After the reboot and some reconfiguration I run into this error: TV Error Failed to get recording show list", oh well it was a nice workout anyway, and I could use the excercize.


"Change is inevitable. Progress is optional."
-- Anonymous


Zaerc

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 2256
  • Department of Redundancy Department.
    • View Profile
Re: Updating MythTV with the latest SVN Howto
« Reply #4 on: August 09, 2007, 05:45:46 am »
The automatic stopping of the backend and running mythfilldatabase is done from: /usr/bin/mythtv-setup which calls the original setup binary that has been moved to /usr/bin/mythtv-setup.real.

So it might be an idea to make a backup of that before starting.
"Change is inevitable. Progress is optional."
-- Anonymous


Hoochster

  • Regular Poster
  • **
  • Posts: 43
    • View Profile
Re: Updating MythTV with the latest SVN Howto
« Reply #5 on: August 09, 2007, 07:29:14 am »
Would have to look, but pretty sure the mythtv-setup.real was their version of myth.  And even though it isn't popping up on the screen that it is stopping the backend when you run mythtv-setup, it is.  Otherwise mythtv-setup would let you know the backend is still running.  To verify that, when you run mythtv-setup, shell in and do a ps -e|grep myth, shouldn't be there, and once you exit out of setup it should automatically restart it.  Now that the source is out, hopefully if I EVER get the downloads done heh and get set back up, we can make some proper stuff.

ddamron

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 962
    • View Profile
    • My LinuxMCE User Page
Re: Updating MythTV with the latest SVN Howto
« Reply #6 on: August 12, 2007, 12:04:12 am »
Now that the sources are out, is there any way to make a patch file for mythtv?
The only intuitive interface is the nipple.  After that it's all learned.
My other computer is your windows box.
I'm out of my mind.  Back in 5 minutes.
Q:  What's Red and smells like blue paint?

A:  Red Paint.

Hoochster

  • Regular Poster
  • **
  • Posts: 43
    • View Profile
Re: Updating MythTV with the latest SVN Howto
« Reply #7 on: August 12, 2007, 08:03:44 am »
Had semi given up on it due to the way the source is setup, but with WebPaul replying to my questions, I will see if I can do anything with it.  No promises though, at least till source gets a little more user friendly heh.  But maybe we can make something happen, I would love to use the system.

ddamron

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 962
    • View Profile
    • My LinuxMCE User Page
Re: Updating MythTV with the latest SVN Howto
« Reply #8 on: August 12, 2007, 09:10:59 am »
I'm going to gice it a shot too...see if I can create .diff files for the 20-fixes branch, then see what's needed to implement them into the svn
The only intuitive interface is the nipple.  After that it's all learned.
My other computer is your windows box.
I'm out of my mind.  Back in 5 minutes.
Q:  What's Red and smells like blue paint?

A:  Red Paint.

Hoochster

  • Regular Poster
  • **
  • Posts: 43
    • View Profile
Re: Updating MythTV with the latest SVN Howto
« Reply #9 on: August 12, 2007, 09:39:53 pm »
The myth source is standard, there is nothing special about it for mce, it is the plugin and player they are using to integrate into mce.  So honestly there is nothing to diff between the 20 fixes and svn, there will be a TON of stuff changed between the two of those, but none relating to mce.  We have to patch the source of the player and plugin so that it will work with the current myth.

ddamron

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 962
    • View Profile
    • My LinuxMCE User Page
Re: Updating MythTV with the latest SVN Howto
« Reply #10 on: August 12, 2007, 09:44:12 pm »
ahh, gotcha..  it looks like I'm a bit out of my league here... so I'll poke around the source, see if I can figure this out... lol  Thanks hoochster!  and a HUGE thankyou to webpaul...
The only intuitive interface is the nipple.  After that it's all learned.
My other computer is your windows box.
I'm out of my mind.  Back in 5 minutes.
Q:  What's Red and smells like blue paint?

A:  Red Paint.

pauld

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Updating MythTV with the latest SVN Howto
« Reply #11 on: August 25, 2007, 10:19:30 am »
Has anybody managed to do this in 0704 yet?

Thanks