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-2.6.31.1-56.fc12.x86_64.rpm
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:

http://git.fedorahosted.org/git/autoqa.git?a=tree;f=tests/rpmguard

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!