deb-mock/docs/Feature-modularity.md
robojerk 4c0dcb2522
Some checks failed
Build Deb-Mock Package / build (push) Successful in 54s
Lint Code / Lint All Code (push) Failing after 1s
Test Deb-Mock Build / test (push) Failing after 36s
enhance: Add comprehensive .gitignore for deb-mock project
- Add mock-specific build artifacts (chroot/, mock-*, mockroot/)
- Include package build files (*.deb, *.changes, *.buildinfo)
- Add development tools (.coverage, .pytest_cache, .tox)
- Include system files (.DS_Store, Thumbs.db, ._*)
- Add temporary and backup files (*.tmp, *.bak, *.backup)
- Include local configuration overrides (config.local.yaml, .env.local)
- Add test artifacts and documentation builds
- Comprehensive coverage for Python build system project

This ensures build artifacts, chroot environments, and development
tools are properly ignored in version control.
2025-08-18 23:37:49 -07:00

1.4 KiB

layout title
default Feature modularity support

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.

  • Artificial example:
    • Disable any potentially enabled postgresql module stream.
    • Enable specific postgresql and ruby module streams.
    • Install the development nodejs profile and (4) disable it immediately.
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.

  • dnf module enable list of modules
  • dnf module install module1/profile module2/profile

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