Contributing
Thank you for contributing to tuna-installer-cosmic! This document provides guidelines and instructions for setting up your environment, making changes, running local verification, and submitting pull requests.
Development Setupβ
System Prerequisitesβ
To build and test the COSMIC installer locally (Ubuntu/Fedora/Debian):
# System dependencies required by libcosmic and wgpu/rendering
sudo apt-get install -y pkg-config cmake clang \
libwayland-dev libxkbcommon-dev libfontconfig-dev libfreetype-dev \
libinput-dev libudev-dev libgbm-dev libegl1-mesa-dev libssl-dev
# Screenshot capture prerequisites (optional for capture testing)
sudo apt-get install -y mesa-vulkan-drivers xvfb imagemagick
Ensure you have Rust installed via rustup and just installed (cargo install just or via package manager).
Local Verification Commandsβ
Before opening a pull request, run the following verification steps:
1. Build and Checkβ
# Compile debug build
just check
# or
cargo build
# Compile release build
cargo build --release
2. Unit Testsβ
The backend logic β recipe defaults and JSON serialization, encryption-choice
filtering, os-release parsing, offline and readiness detection β is covered by
unit tests. They are pure logic and open no window, so they need no compositor,
Vulkan ICD or Xvfb:
# Run the test suite
just test
# or
cargo test --locked
# Run it with coverage (writes lcov.info)
just coverage
just coverage needs cargo-llvm-cov (cargo install cargo-llvm-cov) and the
llvm-tools-preview component (rustup component add llvm-tools-preview).
3. Check Cargo Sources for Flatpakβ
If you mutate Cargo.lock or add/update dependencies, you must update flatpak/cargo-sources.json:
# Regenerate cargo sources
just cargo-sources
# Verify cargo sources match Cargo.lock
just check-cargo-sources
4. Screenshot Capture Testsβ
The repository renders and verifies screenshot assets for all wizard steps using headless Vulkan (lavapipe) and Xvfb:
# Run screenshot capture and generate walkthrough GIF
just capture
# Test the pixel gate selftest
just capture-selftest
Pull Request Guidelinesβ
- Keep Changes Scoped: Focus PRs on a single bug fix, feature, or documentation update.
- DCO Sign-off Required: All commits must include Developer Certificate of Origin sign-off (
git commit -s). - CI Checks: Ensure the
cargo-sourcescheck, Flatpak build, andscreenshotsworkflows pass in GitHub Actions. None of them runs the test suite, so runjust testyourself before opening the PR. - Do Not Merge Your Own PR: PRs require review or automated merging.