Before Adding a Package
Check Fedora repositories
Verify the package isn’t already in Fedora’s official repos:
Terra is for packages not available in Fedora repos or for providing newer/modified versions.
Package Structure
Every Terra package requires these files inanda/category/package-name/:
Required Files
1. anda.hcl - Package Configuration
The anda.hcl file defines the package project:
mock = 1- Build using Mock (standard RPM builds)nightly = 1- Package is a nightly/development versionlarge = 1- Requires large build runner (for resource-intensive builds)sccache = 0- Disable sccache for this packageno_upload_srpms = 1- Don’t upload source RPMs
2. *.spec - RPM Spec File
The spec file defines how to build the package. Here are real examples from Terra:
Optional Files
update.rhai - Automated Updates
Create an update.rhai script for automatic version updates:
Update scripts run automatically via GitHub Actions to keep packages current.
Patches
Include patch files if needed to fix build issues or apply Fedora-specific changes:Step-by-Step: Adding a Package
Write the spec file
Create Key sections to include:
mypackage.spec following Fedora packaging guidelines. Use existing packages as templates:- Package metadata (Name, Version, Release, Summary, License, URL)
- Sources and patches
- BuildRequires and Requires
- %description
- %prep, %build, %install
- %files with proper file listings
- %changelog with your entry
Submit pull request
Open a PR using the new package template. Fill out:What software is being packaged here?
The name of the software and link to website and source code.Describe the motivation
Why you want this package and how it provides value to users.Additional context
Link to any relevant issues or upstream documentation.
Common Build Requirements
Rust Packages
Python Packages
CMake Projects
Qt Applications
Troubleshooting
Build fails with missing dependencies
Build fails with missing dependencies
Install the build dependencies first:Add any missing BuildRequires to your spec file.
Cargo/Rust build fails
Cargo/Rust build fails
Ensure you have:
cargo-rpm-macros >= 24in BuildRequires%cargo_prep_onlinein %prep%cargo_buildin %build- Proper license handling with
%cargo_license_online
File conflicts during install
File conflicts during install
Check if files overlap with other packages:Either remove the file or add a Conflicts: directive.
Package builds but doesn't work
Package builds but doesn't work
Verify:
- All runtime dependencies are listed in Requires:
- File permissions are correct in %files
- Binaries are in the right location (%, etc.)
- Any required data files are installed
Next Steps
Package Guidelines
Learn best practices for packaging
Testing Packages
Test your packages thoroughly