Overview
Theanda.hcl file is the core configuration file for packages in Terra. It defines how packages should be built, which architectures to support, and various metadata labels for the build system.
Every package directory must contain an anda.hcl file that specifies at minimum a project block with RPM configuration.
File Structure
Root Configuration
The rootanda.hcl (located at the repository root) configures global settings:
Prefix to strip from package paths when determining package names.
Suffix to strip from package paths when determining package names.
Project Block
Every packageanda.hcl must contain a project pkg block:
Configuration Reference
Architecture Configuration
List of architectures to build the package for. If omitted, defaults to all supported architectures.Common values:
"x86_64"- 64-bit Intel/AMD"aarch64"- 64-bit ARM"i386"- 32-bit Intel/AMD
RPM Configuration
Path to the RPM spec file, relative to the package directory.Example:
Additional repositories to enable during the build process. Useful when build dependencies are not available in standard Fedora or Terra repositories.Note: Use double backslashes (
\\) to escape RPM variables like $releasever and $basearch.Examples:Labels
Labels provide metadata to the build system and control various build behaviors.Specifies which Terra subrepo this package belongs to.Valid values:
"extras"- Packages that may conflict with Fedora"nvidia"- NVIDIA driver and CUDA packages"mesa"- Patched Mesa packages"multimedia"- Multimedia codec packages
When set to
1, enables mock build environment with additional isolation.Use when:- Package has complex build dependencies
- Build requires extra repositories
- Need clean build environment
When set to
1, indicates this is a large package that requires more build resources.Example:When set to
1, marks this package as a nightly/development build.Example:When set to
1, enables branch-specific version tracking.Example:Complete Examples
Simple Application Package
Package with Subrepo
Multi-Architecture Library
Package with External Dependencies
Multimedia Package with Multiple Repos
NVIDIA/CUDA Package
Nightly Build Package
Best Practices
Architecture Selection:
- Only specify architectures your package actually supports
- Test on all listed architectures before submitting
- Omit
archesif package isBuildArch: noarch
Subrepo Assignment:
extras- Packages that replace or conflict with Fedora packagesnvidia- All NVIDIA/CUDA related packagesmesa- Custom Mesa builds onlymultimedia- Codec and multimedia packages- No subrepo - Standard packages that complement Fedora
Common Patterns
System Tools
Large Builds
large and mock for resource-intensive builds.
Release Packages
updbranch.
Troubleshooting
Build fails with missing dependencies
Build fails with missing dependencies
Add the repository containing those dependencies to
extra_repos:Package conflicts with Fedora
Package conflicts with Fedora
Move to extras subrepo:
Build runs out of resources
Build runs out of resources
Enable the
large label:Need clean build environment
Need clean build environment
Enable mock:
Related Documentation
- RPM Spec File Reference - Learn how to write spec files
- Build System - Understand the build pipeline
- Contributing Guide - Package submission guidelines