#1736 MBS doesn't support modulemd-packager v3
Opened 2 years ago by sgallagh. Modified 2 years ago

While the underlying libmodulemd supports modulemd-packager v3, the MBS itself has a check in get_mmds_required_by_module_recursively() that is relying on the old style of dependency lookups to function. As a result, any attempt to perform fedpkg module-build or fedpkg module-scratch-build using a modulemd-packager v3 document fails unless the user passes a --buildrequires platform:<something> --requires platform:<something> argument, but this also has the undesirable side-effect of setting the version field of the module stream incorrectly (it should be auto-detected by the configurations section.


I think the problem is that MBS does not support setting a default profile in modulemd-packager-v3. Building from modulemd-packger-v3 without "default: true" worked for me.

Then that means it does not support modulemd-packager v3, as that is A) a documented part of the specification and B) half of the reason it exists.

This is the whole reason for the libmodulemd API function modulemd_packager_v3_convert_to_index ()

It will convert the modulemd-packager v3 document into a ModuleIndex comprised of N modulemd-stream v2 documents (where N is the number of configurations) as well as 0 or 1 modulemd-defaults documents.

Until MBS (and Bodhi and Pungi) implements this feature, the user is advised not to use "default: true" in documents of his modules, and, instead, set default profile via a a file in https://pagure.io/releng/fedora-module-defaults/ repository.

Until MBS (and Bodhi and Pungi) implements this feature, the user is advised not to use "default: true" in documents of his modules, and, instead, set default profile via a a file in https://pagure.io/releng/fedora-module-defaults/ repository.

I think you have a fundamental misunderstanding of how the packager v3 format works. It does not require any changes to MBS, Bodhi or Pungi. Only the MBS needs to be modified to use the modulemd_packager_v3_convert_to_index () function. The output of that function is a ModuleIndex that is 100% compatible with all existing tools that understand modulemd-stream v2 and modulemd-defaults. It was designed very carefully to ensure that.

If you say so, I will trust you. You are the expert on MBS. I only hope that MBS will seamlessly store the defaults document to Koji where Pungi will seamlessly retrieve and place it into a compose.

As long as what you store to Koji is the complete dump of the ModuleIndex (and not just the Stream document), it should all work fine.

Any movement on this? It would be really nice to have implemented so we can stop dealing with the module-defaults repo.

Login to comment on this ticket.

Metadata