2020-05-05 10:23:24

New project - create-fake-rpm

Let me introduce new project I started: create-fake-rpm.

This project has been already packaged and you can install it using dnf install create-fake-rpm (available in updates-testing at the time of writing this blog entry).

This script creates empty RPM package to satisfy the dependencies.

It may be useful when you install some library/module/application manually - without having an RPM package. E.g., when you

pip install somepackage

And when some RPM package Requires: python-somepackage then /usr/bin/rpm refuses to install such package, because python-somepackage is not present on your system. RPMDB does not know what you know. So you can run:

create-fake-rpm --build python-somepackage python3dist(somepackage)

This create package fake-python-somepackage-0-0.noarch.rpm which provides: “python-somepackage” and “python3dist(somepackage)”. You can install it using:

dnf install fake-python-somepackage-0-0.noarch.rpm


This is a big gun. You can easily shot yourself in a leg. Do not use this tool unless you know what you are doing. And if you know what you are doing - then think twice before you use it. You can easily destroy your machine with this tool.


Because the world is big. What we have packaged in Fedora is just a fraction of projects on GitHub and GitLab. And this script can be useful as-is for admins of layered application. But my biggest driving force is building packages. Very often you need some libraries to build your package; you do not need them for runtime. You just need them for building. And you do not have time/will to package those dependencies as RPM packages.

Later, I would like to introduce something like:

BuildRequires: external:pip(foo)

And then teach Mock to handle this kind of dependencies: Mock will run:

pip install foo
create-fake-rpm --build python-foo python3dist(foo) external:pip(foo)

Install this fake package in buildroot and run the rpmbuild command.

And do this for all languages which have its own package management: ruby, rust, nodejs…

I am aware that the use of these external dependencies will never be allowed in Fedora or RHEL. But that should not stop you to build such packages for your layered application in Fedora as a development box.

Posted by Miroslav Suchý | Permanent link
comments powered by Disqus