[ubuntu-mythtv] How do I test my own patch with Mythbuntu trunk builds.

Michael Haas laga+mythbuntu at laga.ath.cx
Sun Oct 28 10:30:14 GMT 2007


Roo schrieb:
> Hi,
> 
> I would like to use Mythbuntu for my production Mythtv box. I have
> been running svn trunk for a number of years and do not want to revert
> to -fixes.
> 
> I want to be able to apply my own patches for testing before
> submitting upstream, does the Mythbuntu project provide deb sources,
> is this what I need?
> 

Hey.

There are basically two ways to get yourself a nice source tree:

1)
* Put a deb-src line for your favorite mythbuntu-trunk mirror in your
/etc/apt/sources.list

* sudo aptitude update

* sudo apt-get source mythtv

2) This is more interesting because you can still use svn and bzr for
source management (eg, get updates and generate patches)

* Install subversion (SVN) and bzr:
sudo aptitude install subversion bzr

* Check out MythTV. According to <http://svn.mythtv.org/>, you use:
svn co http://svn.mythtv.org/svn/trunk/mythtv
This will create a directory "mythtv/" which contains the source code

* Now, get our packaging magic. You can see our bzr repositories here:
<https://code.launchpad.net/~ubuntu-mythtv/>. For MythTV, we use this:
bzr branch http://bazaar.launchpad.net/~ubuntu-mythtv/mythtv/mythtv-trunk
Now you have a directory called "mythtv-trunk" with the packaging scripts.

* Now we need to put the pieces together:
mythtv-trunk/ contains a directory called "debian/". Move that to our
MythTV source tree:
mv mythtv-trunk/debian mythtv/
You should also move bzr's fairy dust which is located in a hidden
directory:
mv mythtv-trunk/.bzr mythtv/debian/

Yay, now you've got your source tree. What do you with that now?

You can:

* update to the latest and greatest for MythTV (using svn up) and our
packaging magic (using bzr up IIRC)
* actually build the packages:
+ sudo apt-get build-dep mythtv to get all the build dependencies.
Alternately, you can use pbuilder.. feel free to ask if you have
questions about that.
+ dch -v my_new_fancy_version_number ("dch" is in a package called
"devscripts"; it's also a good idea to keep using our versioning scheme.
 see debian/changelog for details)
+ run dpkg-buildpackage -rfakeroot or debuild or $your_favorite_tool to
make some delicious packages.


You said you wanted to add patches, right? You can either modify the
MythTV source directly or use dpatch. I prefer dpatch because it's a
cleaner solution, eg you keep a clean source tree and patches are
applied at build-time. I won't really cover that here, just read "man
dpatch". After putting your patch in debian/patches, make sure to add it
to debian/patches/00list! If patching fails, check debian/patched.


So, that should cover it. The same procedure applies to mythplugins and
myththemes as well. For special credit, you can alse check out "themes"
from svn which basically is Juski's themes - we call those
"mythtv-additional-themes". If you want to automate $things a little
bit, this might be a good starting point:
<https://code.launchpad.net/~mythbuntu/mythbuntu/mythbuntu-weekly-build>
Feel free to bug me about the weekly build script, especially for trunk.
I also have a local script which automatically builds trunk for me using
pbuilder.


BTW, I'm always looking for people who want to help me maintain our
(trunk) packaging magic.

Hope that helps,

Michael




More information about the Ubuntu-mythtv mailing list