View on GitHub

Mock » Feature modularity support

A 'simple' chroot build environment manager for building RPMs.

Modularity support

There is support for Fedora and RHEL Modularity. This requires dnf, not merely yum. It is available for RHEL >= 8 and its clones, and built into all supported releases of Fedora.

The new modularity format was added with release 2.4 and uses module_setup_commands. Each command can be specified multiple times, and mock respects the order of the commands when executing them.

config_opts['module_setup_commands'] = [
    ('disable', 'postgresql'),
    ('enable',  'postgresql:12, ruby:2.6'),
    ('install', 'nodejs:13/development'),
    ('disable', 'nodejs'),
    ]

The obsolete, less flexible, but still available modularity syntax was added in Mock 1.4.2.

config_opts['module_enable'] = ['list', 'of', 'modules']
config_opts['module_install'] = ['module1/profile', 'module2/profile']

This would call these steps during the init phase.

You can find more about this obsolete format in this comprehensive blogpost.