Edit Info Other
Create account


XBMC in RPM Fusion

Getting a backtrace

Let's say you've found a way to crash XBMC. If you can make it crash reliably, even better. In addition to XBMC's own log file, the other piece that will help is a backtrace.

XBMC has a lot of pieces that could crash: a problem in the display driver, a problem in a codec, a problem in XBMC core, or a problem in the addons. A backtrace allows developers to see exactly where the crash occurs.

To get a backtrace, you'll need to install Fedora's debuginfo packages for XBMC and its dependencies. This allows your debugger to give meaningful information in the backtrace.

Open up a terminal, get root, and run:

debuginfo-install xbmc

The debuginfo-install command will use yum to install a slew of -debuginfo packages on your system. (Don't worry, you can clean them up after you're done if you care about disk space.)

Next, ensure that you have gdb installed:

yum install gdb

Next, as an unprivileged user (not root), start xbmc via GDB:

gdb -ex run /usr/lib64/xbmc/xbmc.bin

XBMC will launch inside GDB. Now navigate to your video or do whatever you do to replicate the crash.

After the crash, look again at your terminal. GDB should drop you at a "(gdb)" prompt. You should type a couple commands:

(gdb) set pagination 0
(gdb) set logging on
(gdb} thread apply all bt full 10

You will now have a "gdb.txt" file in your current working directory. Upload that file to your bug in Bugzilla.

Nightly builds

NOTE: nightly builds are disabled because I have not had time to resurrect them.

Nightly packages from xbmc's master Git branch are available at (removed).

To use these builds, download http://(removed)/fedora/xbmc-nightly.repo to /etc/yum.repos.d/ and run "yum update xbmc". To get back to RPM Fusion's official XBMC package, run "yum --disablerepo=xbmc-nightly downgrade xbmc"

Note that these builds may be in various states of disrepair, or even altogether unusable. Be prepared to upgrade or downgrade as needed. You have been warned.

The build script that does this is available at https://gitorious.org/ktdreyer/xbmc-nightly.

Modifying and building a custom package

RPM Fusion uses CVS to manage the spec files and associated files for a package. To add to the complexity, Alex and Ken keep the canonical RPM spec in a separate Git repository, since Git is much easier to work with than CVS. We do all commmits to Git first, and then periodically sync that to CVS.

Building from Git

To do a build from Git:

$ git clone git://github.com/mooninite/xbmc-rpm.git
$ cd xbmc
$ ./xbmc-generate-tarball-xz.sh
$ md5sum xbmc-*-patched.tar.xz > sources
$ fedpkg --dist f20 mockbuild --root fedora-20-x86_64-rpmfusion_free

Use fedpkg inside the Git repo in order to do the build. Because RPM Fusion's infrastructure is not yet plumbed up together with dist-git and fedpkg, we can't use this command for real package maintenance, but it is useful for easily doing local mock builds.

Maybe you're already familiar with mock and fedpkg... if so, great! If not, read over some of the relevant fedoraproject.org wiki pages.

Doing an XBMC upgrade

Let's say RPM Fusion is shipping an older version of XBMC, and you want a newer version.

Clone the Git repo, and maybe even looking through the history of commits (git log -p), so you can see how we do each update.

The first step is to change the Git tag in xbmc-generate-tarball-xz.sh and re-run that script. That will download a tarball to your working directory and strip it of all the unneeded bits.

Next, update the version in xbmc.spec. You will also need to put the md5sum of the new tarball into the sources file. You can run md5sum xbmc-*-patched.tar.xz > sources, but I like to use fedpkg new-sources to automatically update the .gitignore and sources files. (It's ok if fedpkg complains about failure to upload, since RPM Fusion's infrastructure technically doesn't use fedpkg.)

Lastly, make a git commit (fedpkg commit -c) that updates everything to the latest version.

Once you're sure it builds on a couple platforms (like F19 and F20), then create a patch with git format-patch and attach it to your bugzilla report.

xbmc (last edited 2014-05-09 15:51:58 by ktdreyer)