tags:

views:

14

answers:

0

I have a software suite of ~150 custom RPMs, with fairly complex dependencies between them:

  • the tree of dependencies for each package is usually about five levels deep
  • there are several packages that (deliberately) conflict with one another
  • most packages depend on one or more Red Hat packages as well as other custom packages

My Continuous Integration machine builds all my packages and creates a yum repository from them, and then spins an ISO of the yum repo - which is how my software is distributed.

My problem: I'd like the CI machine to verify, for every package in the ISO, that all its dependencies are met either by other custom packages in the ISO, or by Red Hat packages. This is intended to trap not only bugs in the underlying software but also developers who have forgotten to push their changes to the release branch in source control.

Here's how I'd like to solve it (so you guys can tell me there's a better way!): for each package, create a clean virtual machine with:

  • a basic install of RHEL or CentOS
  • package repos pointing at a RHEL mirror and my ISO (mounted via loop device)

...and call "yum install xxx" in the Virtual Machine.

The trouble is, this takes too long - doing each package install modifies the state of the Virtual Machine. Each RPM really needs to be tested on a "clean" OS, and recreating that takes ~10 minutes per package. Can I test my package install without modifying the VM or recreating the VM from scratch every time? I was hoping there was a "--test" command line argument to yum in a similar way to "rpm -i --test", but I don't see one. I can't use "rpm" directly because it doesn't automatically download dependencies.

The questions:

  • does anyone know of a way to run yum in "simulated" mode?
  • is there a better way to solve my problem?

Bear in mind I'm on RHEL here (yum 3.2.22), not Fedora, but EPEL is probably all right to use.