Skip to content

chore: AUR, Copr, Launchpad & AppImage packaging - #172

Merged
jotuel merged 1 commit into
mainfrom
add-native-packaging
Jul 21, 2026
Merged

chore: AUR, Copr, Launchpad & AppImage packaging#172
jotuel merged 1 commit into
mainfrom
add-native-packaging

Conversation

@jotuel

@jotuel jotuel commented Jul 21, 2026

Copy link
Copy Markdown
Member

What

Adds native distribution packaging for Enroll, alongside the existing Flathub build and AppImage. Each target builds from a vX.Y.Z tag, matching the existing tag-driven release flow.

Target Layout Build model Distros
AUR packaging/aur/PKGBUILD online cargo fetch --locked Arch
Copr packaging/copr/*.spec vendored (vendor.tar) Fedora 42+
Launchpad packaging/debian/* vendored (vendor.tar) Ubuntu 25.04+

packaging/README.md documents the targets, the vendoring model, and the Rust-version constraints.

Why vendored for Copr/Launchpad

libcosmic is a git dependency (pinned in Cargo.lock, not on crates.io). AUR builders have network at build time, so the PKGBUILD runs cargo fetch --locked and lets Cargo pull libcosmic from GitHub. Copr and Launchpad build chroots are network-isolated, so those two bundle a vendor.tar — produced by just vendor — containing .cargo/config.toml + vendor/ for every transitive dep including the libcosmic git source.

The Rust-version constraint (edition = "2024" → rustc ≥ 1.85) pins Fedora 42+ and Ubuntu 25.04+ (plucky).

Single source of truth for install layout

All three packagings install via the upstream just recipe:

just rootdir=<destdir> install

so the on-disk layout is defined in exactly one place — the install recipe in justfile. Change that recipe and every package follows automatically.

CI — four new jobs

.github/workflows/publish.yml adds four jobs that fire on v* tag push, alongside appimage and flathub. Independent — one failing never suppresses another.

create-release ─┬─ appimage    (existing)
                ├─ flathub     (existing, parallel)
                ├─ vendor-tar ─┬─ copr
                │              └─ launchpad
                └─ aur
Job Produces Needs
vendor-tar vendor.tar uploaded to the GitHub release create-release
aur pushes the updated PKGBUILD + .SRCINFO to AUR create-release
copr builds an SRPM, submits via copr-cli vendor-tar
launchpad builds a source package, dputs to the PPA vendor-tar

Bug fix: AppImage build dependencies

The appimage job was running cargo build --release on a stock ubuntu-latest runner that ships none of libcosmic's native build deps (fontconfig, freetype, expat, xkbcommon, wayland) — so the last release's AppImage build failed at link time. Adds an explicit Install build dependencies step so the build links.

Secrets required (out of band)

The packaging files + CI are complete, but the actual package targets and secrets are yours to set up. Documented in RELEASING.md:

Secret Job How to create
AUR_SSH_KEY aur SSH key registered on your AUR account
COPR_API_TOKEN copr full ~/.config/copr INI from Copr → API
LP_GPG_KEY launchpad private key registered to the PPA-owning Launchpad account
LP_GPG_PASSPHRASE launchpad passphrase for LP_GPG_KEY

Optional repo variables (not secrets): COPR_PROJECT (default enroll), DEB_SERIES (default plucky), LP_DPUT_HOST (default ppa:cosmic-utils/enroll).

Checklist

  • packaging/aur/PKGBUILD
  • packaging/copr/cosmic-utils-enroll.spec
  • packaging/debian/* (control, rules, changelog, copyright, compat, source/format, *.install)
  • packaging/README.md
  • publish.yml — four new jobs (vendor-tar, aur, copr, launchpad)
  • publish.yml — AppImage build-dep fix
  • RELEASING.md — secrets section for native packaging
  • AUR package cosmic-utils-enroll created (one-time, out of band)
  • Copr project created, Fedora 42+ chroots enabled (one-time, out of band)
  • Launchpad PPA created, GPG key registered (one-time, out of band)

Notes

  • I did not add cosmic-icons-git as a dependency: the app bundles its own icon and the source has no references to the COSMIC system icon set (matches the minimal ldd reality).
  • Runtime deps come from ldd on the built binary (libxkbcommon, gcc-libs, glibc) plus fprintd (the D-Bus daemon the app drives).
  • Nothing on main was changed directly — all work is on this branch.

Native distribution packaging for Enroll, alongside the existing Flathub
build and AppImage. Each target builds from a vX.Y.Z tag, matching the
existing tag-driven release flow.

Packaging files:
- packaging/aur/PKGBUILD          Arch (online cargo fetch --locked)
- packaging/copr/*.spec           Fedora 42+ (vendored vendor.tar)
- packaging/debian/*              Ubuntu 25.04+ (vendored vendor.tar)
- packaging/README.md             targets, vendoring model, constraints

All three packagings install via 'just rootdir=<destdir> install', so the
on-disk layout stays defined in one place (the justfile). Vendoring is
required for Copr/Launchpad because libcosmic is a git dep (not on
crates.io) and their build chroots are network-isolated.

CI (.github/workflows/publish.yml): four new independent jobs that fire on
v* tag push alongside appimage/flathub:
- vendor-tar  produces vendor.tar (reproducible VERGEN) for offline builds
- aur         stamps + pushes the PKGBUILD/.SRCINFO to AUR over SSH
- copr        builds an SRPM from the spec + vendor.tar, submits via copr-cli
- launchpad   rolls a Debian source package, signs with GPG, dputs to PPA

Also fixes the AppImage job: it was running 'cargo build --release' on a
stock ubuntu-latest runner that ships none of libcosmic's native build
deps (fontconfig, freetype, expat, xkbcommon, wayland). Adds an explicit
'Install build dependencies' step so the build links.

Target distros are constrained to Fedora 42+ / Ubuntu 25.04+ by Rust
edition 2024 (needs rustc >= 1.85). Secrets documented in RELEASING.md.
@jotuel jotuel changed the title feat: AUR/Copr/Launchpad packaging + AppImage build-dep fix chore: AUR, Copr, Launchpad & AppImage packaging Jul 21, 2026
@jotuel
jotuel merged commit 8076d50 into main Jul 21, 2026
1 check passed
@yochananmarqos

Copy link
Copy Markdown

@jotuel It's already in the AUR as enroll.

@jotuel

jotuel commented Jul 29, 2026

Copy link
Copy Markdown
Member Author

Oh thanks for letting me know & adding it. I'll just delete that part of the build pipeline then. 👍🏼

@jotuel
jotuel deleted the add-native-packaging branch August 6, 2026 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants