[mythtv-users] Re: Putting a toe in the CVS water

Martin Ebourne lists at ebourne.me.uk
Tue Jan 18 03:50:04 EST 2005


On Tue, 2005-01-18 at 12:08 +1100, Phill Edwards wrote:
> OK - thanks for the advice. Couple of questions:
> 
> 1) How up to date with CVS are Axel's CVS RPMs?

Check the package name. It's got the date in there of the checkout.

> 2) Is there any howto stuff amywhere on how to do it with Axel's CVS
> RPMs? Just as I thought I'd understood how to go CVS this adds a new
> angle to it so I want to make sure I've got my head around this before
> I start.

Firstly, I don't know how experienced you are with RPM itself. Helps to
learn a bit about the package system, you'll have a much easier time of
system maintenance. This is the RPM book, and it's all on line:

http://www.rpm.org/max-rpm/

Could do a lot worse than learning some of the basics. There's been some
changes since it was published, most obviously that the building
commands have been split out into a separate rpmbuild command. man
rpm/rpmbuild will update you on that.

My usual plan goes something like this (replace version as appropriate):

(None of this involves being root.)
1. apt-get source mythtv
2. rpm -ivh mythtv-0.16.0.cvs20041220-87.src.rpm
3. cd ~/rpm/SPECS
4. vi mythtv-0.16.0.cvs20041220-87.rhfc3.at.spec
(I add '.mje.1' to the Release: field so I know I built it) 
4. rpmbuild -ba --without xvmcnvidia --without opengl_vsync mythtv-0.16.0.cvs20041220-87.rhfc3.at.spec
(Choose the --with/--without options to suit your setup, see the
mythtv-0.16.0.cvs20041220-87.rhfc3.at.spec file for the full list.

Then, as root, install the binary package(s) it generates and lists at
the end.

You'll need a .rpmmacros file which contains something similar to this:

%_topdir /home/martin/rpm

In addition, you'll need to add the atrpms macros from this post to the
same file:

http://lists.atrpms.net/pipermail/atrpms-devel/2004-November/000467.html

Having practised with rebuilding the version Axel provided you can then
go in & update the CVS to a newer version as you wish. Unfortunately
Axel doesn't seem to include all the CVS directories so you can't just
unpack the archive, cvs update, and then repack it.

You should, however, be able to drop a new one in. So get a CVS
checkout, tar.bz2 it up, and stick it in ~/rpm/SOURCES. Make sure the
tarfile name matches what you put in Version: in the .spec file. If in
doubt, unpack the one from the RPM (again, in SOURCES) and make sure
yours looks the same.

Again, vi the .spec file to update Version:/Release: as appropriate,
then rebuild. I recommend you always at least bump the Release: when you
rebuild so you don't end up with the confusion of differing packages
with the same version number. Also best to add a quick note to the
%changelog section for future reference.

As to a HOWTO, the best person to write it is the one who's just done it
all for the first time and has everything fresh. I'm bound to have
forgotten a crucial step somewhere, for which I apologise in advance. ;)
So presuming you manage to get somewhere with all this, how about
writing it up in a howto & adding it to Jarod's documentation, or the
wiki?

> I understood wiping out all the mythtv rpms and then
> downloading, configuring, compiling and installing the CVS source
> code. How does using the CVS RPMs differ from this. Do they basically
> download and put the source code somewhere and from that point on it's
> the same as normal CVS?

The main reason is that the end result is really no different from just
installing a new version pre-built for you. This has lots of advantages
- eg. easy, clean upgrades and downgrades (don't forget to backup the
db). RPM will handle dependencies for you, so it may be possible to run
precompiled myth modules against your CVS myth RPMs (depending on how
far they've diverged - you can't run 0.16 and cvs together at the
moment). But when they do diverge RPM will tell you.

No need to try and remove your manual install before upgrading to a new
pre-built version. Less breakage because all the files will be installed
in the same places in the same way as they always were with the normal
RPMs. And other good stuff too.

Finally, though, building the RPMs is actually easier. It might seem
counter-intuitive, but all of the instructions for configuring, building
and installing myth are in the RPM .spec file, so they are always
completely repeatable and you can't get them wrong. Your only job is to
drop a new source tarball in as and when you want, edit a couple of
lines of .spec file to match, and rpmbuild -ba xxx.spec.

Hope this helps,

Martin.



More information about the mythtv-users mailing list