msuchy / rpmfluff

Forked from rpmfluff 4 years ago


rpmfluff is a lightweight way of building RPMs, and sabotaging them so they are broken in controlled ways.

It is intended for use when testing RPM-testers e.g. rpmlint and writing test cases for RPM tools e.g. yum




  • 2019-05-10: Mostly fixes related to rpm changes, thanks ksrot and bcl!
  • 2019-01-31: Fix and new/improved functionality from David Shea (man pages, images, subpackage scriptlets and symlinks properties), thank you!
  • 2018-07-22: BTW we are in pip now, try pip install rpmfluff, but fixed small issue with tests for python3-rpm-4.14.2-0.rc1.1.fc29.2.x86_64 compatibility
  • 2018-02-23: Small fix for Rawhide and executable ELF files - see
  • 2017-06-28: New minor release of 0.5.3 version, also buch of other versions from last year not included below, oops
  • 2016-06-14: Git moved to
  • 2015-08-20: John Dulaney implemented weak dependencies.
  • 2015-07-10: And one tiny release to incorporate Will Woods's comment I have missed yesterday.
  • 2015-07-09: David Shea made rpmfluff running on Python 3 - awesome! RHEL5 (i.e. Python 2.4) support was dropped. Released version 0.4.
  • 2014-04-30: Something changed and we can not blindly remove newline here as it is not there now. But trying to keep it compatible with what we had before.
  • 2010-02-12: Now version is in the separate file
  • 2010-01-26: Fix for deprecated popen2 module
  • 2010-01-07: Now using EGGs for building
  • 2009-12-18: Released version 0.3, let's try to get to Fedora
  • 2009-05-14: Added method add_simple_payload_file_random() if you want to include some file to the rpm and you do not care about the content
  • 2009-04-22: Fixed build issues on ppc
  • 2009-01-06: Added %pre/%post/%preun/%prepost capabilities
  • 2008-09-08: Fixed 2 small issues and created 0.2-2 version
  • 2008-09-08: Commited new big bunch of changes by David Malcolm and released version 0.2
  • 2008-07-11: Package renamed to python-rpmfluff, now works on the F9, some more changes
  • 2008-07-08: Initial commit of David Malcolm's code from former Table Cloth project



Just build empty rpm

>>> import rpmfluff
>>> foo = rpmfluff.SimpleRpmBuild("foo", "0.1", "1")
>>> foo.make()

To install in virtualenv

This is bit harder, because we depend on rpm module which is not distributed over PyPI and by default Python in virtual environment do not see systems libraries:

virtualenv-3 --system-site-packages venv
source venv/bin/activate
pip install --ignore-installed rpmfluff


Feel free to fork here and send pull requests or email me to add you as a contributor directly to this repository. If you just need the code, then:

$ git clone