3.7 KiB
3.7 KiB
Flathub Submission for Coop
This directory contains the files needed to submit Coop to Flathub.
Prerequisites
- Flatpak installed
flatpak-builderinstalled- Rust/Cargo installed (for vendoring)
Quick Start
Run the preparation script from the repo root:
./script/prepare-flathub.sh
This will:
- Vendor all Rust dependencies (crates.io + git)
- Generate the metainfo.xml with proper release info
- Create
su.reya.coop.yml- the Flatpak manifest for Flathub
Files Generated
| File | Purpose |
|---|---|
su.reya.coop.yml |
Main Flatpak manifest (submit this to Flathub) |
su.reya.coop.metainfo.xml |
AppStream metadata with release info |
vendor.tar.gz |
Vendored Rust dependencies |
cargo-config.toml |
Cargo configuration for offline builds |
release-info.xml |
Release info snippet for metainfo |
Testing Locally
Before submitting to Flathub, test the build:
cd flathub
# Build and install locally
flatpak-builder --user --install --force-clean build su.reya.coop.yml
# Test the app
flatpak run su.reya.coop
# Run the Flathub linter (must pass!)
flatpak run --command=flatpak-builder-lint org.flatpak.Builder manifest su.reya.coop.yml
flatpak run --command=flatpak-builder-lint org.flatpak.Builder repo repo
Submitting to Flathub
1. Prepare Your Release
Ensure you have:
- Committed all changes
- Tagged the release:
git tag -a v1.0.0-beta2 -m "Release v1.0.0-beta2" - Pushed the tag:
git push origin v1.0.0-beta2 - Run
./script/prepare-flathub.shto regenerate files
2. Fork and Submit
# Fork https://github.com/flathub/flathub on GitHub first
# Clone your fork (use the new-pr branch!)
git clone --branch=new-pr git@github.com:YOUR_USERNAME/flathub.git
cd flathub
# Create a new branch
git checkout -b su.reya.coop
# Copy ONLY the manifest file from your project
cp /path/to/coop/flathub/su.reya.coop.yml .
# Commit and push
git add su.reya.coop.yml
git commit -m "Add su.reya.coop"
git push origin su.reya.coop
3. Open Pull Request
- Go to your fork on GitHub
- Click "Compare & pull request"
- Important: Set base branch to
new-pr(notmaster!) - Fill in the PR template
- Submit and wait for review
What Happens Next?
- Flathub's automated CI will build your app
- A maintainer will review your submission
- Once approved, a new repo
flathub/su.reya.coopwill be created - You'll get write access to maintain the app
- Future updates: Push new commits to
flathub/su.reya.coop
Updating the App
To release a new version:
- Update version in workspace
Cargo.toml - Tag the new release:
git tag -a v1.0.0-beta3 -m "Release v1.0.0-beta3" - Push the tag:
git push origin v1.0.0-beta3 - Run
./script/prepare-flathub.shto regenerate - Clone the flathub repo:
git clone https://github.com/flathub/su.reya.coop.git - Update the manifest with new commit/tag and hashes
- Submit PR to
flathub/su.reya.coop
Troubleshooting
Build fails with "network access not allowed"
- Make sure
CARGO_NET_OFFLINE=trueis set in the manifest - Ensure
vendor.tar.gzis properly extracted before building
Linter complains about metainfo
- Ensure
su.reya.coop.metainfo.xmlhas at least one<release>entry - Check that screenshots are accessible URLs
Missing dependencies
- If new git dependencies are added, re-run
prepare-flathub.sh - The script vendors all dependencies from
Cargo.lock