From Fedora Project Wiki

< User:Denisarnaud

Revision as of 18:02, 15 May 2020 by Denisarnaud (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Message from Petr Pisar on the 14 May 2020, on the Fedora Devel mailing list:

Let's look at real examples. <> lists avocado-latest-820200512173744.9edba152 module. That's this <> module build in Koji. The Source field reads <>.

Theat means "fedpkg clone modules/avocado" and there these branches:

  • latest
 remotes/origin/HEAD -> origin/latest

The module stream is called "latest", let us check "latest" branch:

commit 12e2140e759fdb0a4477ab2432c411a4452d8efc (HEAD -> latest, origin/lat= est, origin/HEAD) Author: Merlin Mathesius <> Date: Tue May 12 12:37:44 2020 -0500

   Rebuild with avocado 79.0.
   Signed-off-by: Merlin Mathesius <>

So you can see the module is built from a non-epel8 branch. An avocado.yaml file lists these dependencies:

 - buildrequires:
     platform: []
     platform: []

So "platform" is left empty to expand it by MBS on all available platforms. If you look at koji listing <>, there are five modules avocado-latest-*20200512173744 builds of from the same sources. That probably means that Koji attempts to build the module for all Fedoras and EPEL 8. Technically, it's possible to override the platform with "fedpkg module-build" command, but I cannot see any trace of it in the logs.

That build was performed by "merlinm" users. You can ask him for more details.

Cmake 3 as a module

The first thing to look at is CMake's compatibility policy. At a quick glance, it appears that CMake upstream expects to maintain backwards-compatible support for all minor releases within the "3.x" major release number. So from my perspective, the best choice for you would be to pick the stream name "3", resulting in cmake:3 as your module stream. This will allow you to update to any future 3.x release within the same stream. If CMake 4 is ever released, you can create the cmake:4 stream in the same manner.

To do this, request the "3" branch for the cmake module with:

$ fedpkg request-branch --namespace modules cmake 3

Once that branch is created:

$ fedpkg clone modules/cmake
$ fedpkg switch-branch 3

Create a cmake.yaml file in the dist-git checkout as described in the docs [2], commit and push it to dist-git and then do:

$ fedpkg module-build

When creating the definition, you'll want to either leave the dependencies at platform: [ ] (meaning build for all supported releases, Fedora and EPEL) or else specifically use platform: [ el8 ] to build only for EPEL 8.

All of this said: it's important to note that this approach also means that any package that wants to use your newer CMake to build in EPEL 8 will need to build as a module and set their module dependency to include cmake:3. It won't be available in the buildroot for non-modular packages.

[1] [2]

Alternative description

1) Make a module:

$ fedpkg clone cmake3
$ fedpkg request-repo --namespace modules cmake3
$ fedpkg request-branch --namespace modules --repo cmake3 latest

2) Writing a modulemd file based on this example [1]:


3) Build the module:

$ fedpkg module-build