Terra uses a subrepo (sub-repository) system to organize packages that may conflict with Fedora or require special handling. This allows users to selectively enable only the package sets they need while avoiding conflicts.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/terrapkg/packages/llms.txt
Use this file to discover all available pages before exploring further.
What are subrepos?
Subrepos are separate repository streams within Terra that contain packages requiring isolation from the main repository. Each subrepo has its own repository configuration file and can be enabled or disabled independently.The main Terra repository contains packages that don’t conflict with Fedora and can be safely enabled alongside the base system.
Available subrepos
Terra provides four subrepos, each serving a specific purpose:Extras
Packages that conflict with Fedora packages, such as patched versions or alternative implementations
NVIDIA
NVIDIA proprietary drivers and CUDA libraries that may conflict with Fedora’s driver packages
Mesa
Patched and codec-complete Mesa builds with additional optimizations
Multimedia
Multimedia codecs and tools that may conflict with Fedora packages (work in progress)
Repository configuration
Each subrepo is defined in theterra-release package spec file and deployed as a separate .repo file:
Main repository
Fromanda/terra/release/terra.repo:
terra.repo
Extras subrepo
Fromanda/terra/release/terra-extras.repo:
terra-extras.repo
The
priority=150 setting gives the extras repo a lower priority than the main Terra repository (default priority is 99).Installation
Subrepos are installed as separate packages:- Extras
- NVIDIA
- Mesa
- Multimedia
Package assignment
Packages are assigned to subrepos using thesubrepo label in their anda.hcl manifest:
Extras subrepo
Fromanda/apps/anki/anda.hcl:
Multimedia subrepo
Fromanda/multimedia/ffmpeg/anda.hcl:
Multiple subrepos example
Fromanda/lib/DirectX-Headers/anda.hcl:
Subrepo package structure
Theterra-release.spec file defines all subrepo packages:
terra-release.spec
- Installs a separate
.repofile in/etc/yum.repos.d/ - Requires the
terra-gpg-keyspackage for signature verification - Can be installed and removed independently
When to use subrepos
Choose appropriate subrepo
- Use
extrasfor patched versions or alternatives to Fedora packages - Use
nvidiafor NVIDIA-specific drivers and libraries - Use
mesafor custom Mesa builds - Use
multimediafor codec-related packages
Repository priorities
Subrepos use different priority levels to control package selection:Source repositories
Each subrepo also provides a source repository for accessing SRPMs:terra-extras.repo
Best practices
Document conflicts clearly
Document conflicts clearly
When assigning a package to a subrepo, document what it conflicts with and why in the spec file or commit message.
Test with and without subrepos
Test with and without subrepos
Verify that your package works correctly when the subrepo is enabled and doesn’t break things when disabled.
Use conservative subrepo assignment
Use conservative subrepo assignment
Only use subrepos when necessary. Packages that don’t conflict should remain in the main repository.
Consider RPM Fusion conflicts
Consider RPM Fusion conflicts
Test subrepo packages alongside RPM Fusion to identify potential conflicts users might encounter.
Monitor multimedia subrepo
Monitor multimedia subrepo
The multimedia subrepo is work in progress. Coordinate with maintainers before adding packages.
Migration and obsoletes
The spec file shows how packages handle migrations:Package manifests
Learn how to configure subrepo assignment in anda.hcl
Repository structure
Understand the overall monorepo organization