rpmguard – print important differences between RPMs

Package maintainers, listen up! 🙂

I have created a simple tool called rpmguard for checking differences between RPM packages. It is very similar to rpmdiff, but it prints only important changes, not all. Therefore it can be used every time a new package is built to easily see if something hasn’t went completely wrong.

So what can it do?

Currently rpmguard reports:

  • new or removed Requires/Provides/Obsoletes/Conflicts
  • lowering the version of Requires/Provides/Obsoletes/Conflicts
  • new, removed or changed config file
  • new or removed executable
  • reduced number of documentation files
  • changed user/group ownership
  • changed file mode permissions

All the above-mentioned changed are considered important enough for the maintainer to have at least a quick look at them.

Let’s see it in action

Following packages must be installed:

  • rpm
  • rpm-python
  • rpmlint (rpmdiff version 0.91 contains serious bugs, please use newer or from trunk – it’s important)

Then you run the tool simply by:

$ ./rpmguard.py package-1.rpm package-2.rpm

Example output (artificial, usually there is no ouput or just several lines):

added        REQUIRES fooreq2
added        REQUIRES rpmlib(VersionedDependencies) <= 3.0.3-1
removed      REQUIRES fooreq1
lowered      REQUIRES('= 0.3.4' -> '>= 0.2.7') fooreq3
added        PROVIDES fooprov1 = 0.1.0
added        CONFLICTS fooconf >= 1.0
removed      OBSOLETES fooobs
added        CONFIG /etc/conf2
changed      CONFIG /etc/conf1
changed      MODE(0644 -> 04744) /usr/share/justfile1
reduced      DOCS(2 -> 1)
added        EXECUTABLE /usr/bin/bin1

And now a more real-world example:

$ ./rpmguard.py kernel-2.6.31-0.86.rc3.git5.fc12.x86_64.rpm kernel-
added        REQUIRES rpmlib(PayloadIsXz) <= 5.2-1
added        REQUIRES dracut >= 001-7
added        REQUIRES grubby >= 7.0.4-1
removed      REQUIRES mkinitrd >= 6.0.61-1

Cool, where to get it?

rpmguard is currently part of AutoQA framework, which will be used for performing various checks on Fedora packages. You can download just the rpmguard from here:


or rather download the whole AutoQA:

git clone git://git.fedorahosted.org/git/autoqa.git

and look into autoqa/tests/rpmguard.

Feedback welcome

Any feedback is really welcome. If you have any ideas:

  • which other changes in RPMs should be reported
  • which changes should not be reported
  • how to adjust the program output
  • what else to improve
  • any other comments

please let me know under this blog or in the autoqa-devel mailing list. Thanks!

7 thoughts on “rpmguard – print important differences between RPMs

  1. Thank you for a tool which filters the insignificant differences!

    This doesn’t work because the common used doesn’t have SSH access:
    git clone ssh://git.fedorahosted.org/git/autoqa.git
    This does work:
    git clone http://git.fedorahosted.org/git/autoqa.git

    Now, the most serious missing feature:
    Unlike rpmdiff, it doesn’t handle installed packages instead of files.
    rpmdiff rpmdiff evince /usr/src/redhat/RPMS/evince-2.28.1-3.fc10.pentium4.rpm

    I.e. if an argument can’t be opened as a file, try using it as a package name.

    1. Thanks for git correction, fixed (changed to git://).

      As for the missing feature: rpmguard was created for the needs of autoqa, therefore I only considered the need for comparing two rpm files. But you are right, for some people it may come handy to compare installed package with an uninstalled package. I will add that to the future feature list. Thanks!

Leave a Reply (Markdown syntax supported)

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s