Building Fedora modules locally

This page walks you through building modules locally on your machine.


You need to install the module-build-service as well as fedpkg:

$ sudo dnf install module-build-service fedpkg

and add yourself to the mock group:

$ sudo usermod -a -G mock USERNAME
$ newgrp

Step 1: Build your module

Local builds are started using fedpkg from within your dist-git repository.

For example, to submit a build of the testmodule:master module, run:

Local builds don’t support stream expansion. If your module depends on multiple streams of another module, such as platform, you need to specify what stream you want to build against. For example: fedpkg module-build-local -s platform:f28.
$ fedpkg clone modules/nodejs
$ cd nodejs
$ git checkout master
$ fedpkg module-build-local

When the build finishes, you’ll be able to find the results in:


where MODULE is "module-NAME-STREAM-VERSION", so for example "module-testmodule-master-20180612122805".

Step 2: Test your module

This requires Fedora 28 or higher.

To test your module, add the repository to your system by creating an entry similar to this in /etc/yum.repos.d/test.repo:

name=My Local Repository

Please replace "adam" with your user name, and "module-testmodule-master-20180612122805" with the actual value for your module.

Now, when you list the available modules on your system, you should be able to see it and install it:

$ dnf module list
$ dnf module install testmodule:master