Martin Pool's blog

Simply yummy

yum made me very happy the other day at work.

Our software tree produces an rpm package when you say scons rpm, and the rules are set up so that for non-release builds the Subversion revision number gets into the RPM version number, like so: hp-foo-bar-3.0.trunk.r1376-1.ia64.rpm.

On an internal web server we have a directory for each suppported platform. The various built RPMs go into there, plus the libraries we depend upon that are not in the standard distribution. Then we simply run yum-arch /home/pub/yum/hp-foo/rhel3-ia64/latest/.

Various test and development machines reference this server in their yum.conf, so saying yum update on each of them will pull them up to the latest build. Other people who are testing our builds can also use yum, and we can have different directories for e.g. the tree head, alpha test, release candidates and so on. If we rev one of the underlying libraries it will get automatically upgraded as well.

Obviously it is not all that hard to install an rpm by hand. But we support several different configurations which need to be tested on different hardware, and we have internal beta users who will do more testing if we make it really easy for them (I hope). So I think the payoff is potentially quite nice. Being able to simply say yum update on a particular machine when you want to test it saves substantial time and avoids several possible errors compared to working out by hand which packages need to be updated and from where.

I haven't done it yet, but you can imagine a cron job on one machine that automatically builds an rpm and rebuilds the yum archive, and cron jobs on various test clients that automatically update and then test themselves.

There is an advantage to always installing from RPMS during test, which is that any packaging bugs are likely to be exercised often and caught early.

It's pretty simple but it works really well. Go yum.

Archives 2008: Apr Feb 2007: Jul May Feb Jan 2006: Dec Nov Oct Sep Aug Jul Jun Jan 2005: Sep Aug Jul Jun May Apr Mar Feb Jan 2004: Dec Nov Oct Sep Aug Jul Jun May Apr Mar Feb Jan 2003: Dec Nov Oct Sep Aug Jul Jun May