This page covers common configuration steps for Tito.
Main project configuration file, created by tito init:
[buildconfig]
# Builder class to use
builder = tito.builder.Builder
# Tagger class for release tagging
tagger = tito.tagger.VersionTagger
# Changelog settings
changelog_do_not_remove_changelog = False
changelog_format = %a %b %d %Y
# Release tag prefix
tag_prefix =
# Version separator
version_separator = -
# Release separator
release_separator = -
# Use release for version calculation
use_release = False
Lists packages managed by Tito:
myapp . myapp.spec
Format: package_name directory spec_file
Dependencies for the build:
python3-devel
rpm-build
git
Tito manages RPM spec files. Key sections:
Name: myapp
Version: %{tito_version}
Release: 1%{?dist}
Summary: My Application
License: MIT
URL: https://example.com/myapp
Source0: %{name}-%{version}.tar.gz
BuildRequires: gcc
BuildRequires: make
Requires: glibc >= 2.31
%description
Detailed description of myapp package.
%prep
%setup -q
%build
%configure
make %{?_smp_mflags}
%install
make install DESTDIR=%{buildroot}
%files
%{_bindir}/myapp
%{_mandir}/man1/myapp.1*
%changelog
# Auto-generated by Tito from git history
# Tag a new release
tito tag
# Tag with specific version
tito tag --version 2.0.0
# Dry-run tagging
tito tag --dry-run
# Build RPM
tito build --rpm
# Build SRPM
tito build --srpm
# Build to specific directory
tito build --rpm --output-dir /tmp/packages
# Build with Mock (clean chroot)
tito build --mock
# Submit to Koji
tito build --koji
Create custom builder in .tito/builders/:
# .tito/builders/custom_builder.py
from tito.builder import Builder
class CustomBuilder(Builder):
def rpm_spec(self, build_dir):
# Custom spec file generation
return super(CustomBuilder, self).rpm_spec(build_dir)
Update tito.props:
[buildconfig]
builder = .tito.builders.custom_builder.CustomBuilder
Tito reads configuration on each command - no reload needed.
# Check project status
tito status
# Show pending changes
tito report
# Verify spec file
tito build --srpm --test
# List packages
tito package
# Show version info
tito --version
# 1. Make changes and commit
git add .
git commit -m "New feature implementation"
# 2. Tag release
tito tag
# 3. Build RPM
tito build --rpm
# 4. Push to git
git push origin main
git push origin --tags
# 1. Cherry-pick or apply fix
git cherry-pick <commit-hash>
# 2. Tag with iteration bump
tito tag --auto-inc
# 3. Build and release
tito build --rpm
Squeezing every bit of performance from your Tito builds? Our experts help with:
Optimize your setup: office@linux-server-admin.com | Contact Us