Repository navigation
build(fedora): add an RPM package published through COPR - #2120
Conversation
Build Strata from source as an RPM for Fedora and publish it to a stable and a preview COPR project for every non-nightly release. - packaging/rpm/strata.spec.in and scripts/build_srpm.py render the spec for a release tag and build a source RPM from the tag and its vendored crates, because COPR builders have no network access. - The package compiles with STRATA_UPDATER=disabled and without RAR support. unrar and unrar_sys are vendored only as empty stubs, and tags that predate STRATA_UPDATER are refused. - publish-copr.yml submits a release to COPR. The Release workflow calls it, and it stays disabled until COPR_PUBLISH_ENABLED is true. - rpm.yml builds, lints, and installs the RPM whenever its inputs change. Refs lgse#2118
The updater switch moved from the root build script to crates/strata-desktop in lgse#2112, so build_srpm.py refused every commit after it as predating STRATA_UPDATER, and rpm.yml looked for the updater cfg on the root crate's rustc command. - Look for STRATA_UPDATER in the workspace crates' build scripts too. - Check the updater cfg and the rar feature across all Strata crates. - Rebuild the RPM when a workspace crate's manifest or build script changes. Refs lgse#2118
ReviewMerged Fixed in 35b2990The merge brought in #2112, which split the app into workspace crates and moved the
Verified locally (Fedora 45 container,
|
COPR names a project after the Fedora account that owns it, and the packages are published from l0gicgate/strata and l0gicgate/strata-preview. Refs lgse#2118
|
Waiting on Fedora to create an FAS group named |
Description
Adds a Fedora RPM, built from source and published to two COPR projects (stable and preview) for every non-nightly release. Fedora users then get Strata and its runtime dependencies through dnf, and updates with ordinary system updates.
packaging/rpm/strata.spec.inandscripts/build_srpm.pyturn a release tag into a source RPM: agit archiveof the tag, the vendored crates (COPR builders have no network access), and the rendered spec. ItsLicensetag is generated from the crates and the bundled assets.STRATA_UPDATER=disabled(Let distribution packages build without the in-app updater, and license every source file as MIT #1933), so dnf owns updates, and it installs noinstall-source.toml.unrarandunrar_sysare vendored only as empty stubs, and the script refuses to build a source RPM otherwise.1.3.0~rc.1<1.3.0). Nightlies are not packaged.publish-copr.ymlsubmits a release to COPR and waits for the builds. Stable releases go to both projects; alpha, beta and RC releases go only to preview. The Release workflow calls it after each non-nightly release, and it can also be run by hand to retry, rebuild or backfill a release (back tov1.2.0-rc.1).rpm.ymlbuilds, lints and installs the RPM in a Fedora container when its inputs change, includingCargo.tomlandCargo.lock, since a dependency update can bring in a license COPR rejects.docs/packaging.mddocuments the package and its setup, andREADME.mdgains a Fedora install section.Publishing stays off until
COPR_PUBLISH_ENABLEDis set totrue, so merging this changes nothing in the release process until the setup below is done.Setup for the maintainer
None of this blocks merging, but publishing needs it, and the README section should not reach users before step 1.
lgse/strataandlgse/strata-preview. If you pick other names or a group (@group/strata), tell me and I'll update the README before merge. Settings I tested with:fedora-44andfedora-45, each forx86_64andaarch64;COPR_PROJECTandCOPR_PREVIEW_PROJECTto<owner>/<project>.copr-productionenvironment, restricted tomain, with a secretCOPR_CONFIGholding the~/.config/coprfile shown at https://copr.fedorainfracloud.org/api/.COPR_PUBLISH_ENABLEDtotrue.1.2.1. Otherwise the first packages arrive with the next release.COPR API tokens expire after 180 days. Renew the token on the same page and replace
COPR_CONFIGbefore then; an expired token fails only the COPR job, which can be rerun by hand.Both workflows run on
ubuntu-24.04with a Fedora container rather than on Blacksmith runners.rpm.ymltakes about 25 minutes: the release profile'slto = trueandcodegen-units = 1make the final link single-threaded. It runs only when the packaging inputs change.publish-copr.ymlmostly waits for COPR; it took about 70 minutes, bounded by theaarch64builds.Visual evidence
N/A: packaging and CI only, with no change to the application's interface.
How to test
publish-copr.ymlbuilt from this branch:sudo dnf copr enable bgmulinari/strata && sudo dnf install strata.Expected result: Strata starts from the desktop launcher, and previews and thumbnails render in the sandbox. Diagnostics reports that in-app updates are disabled, and Settings has no Updates page.
rpm -q --provides stratalistsbundled(crate(...))entries but nounrarcrate.I tested this on:
x86_64: Fedora 44 and 45 in clean containers, with the steps above.aarch64: built, installed and launched under QEMU emulation. The preview sandbox can't start there, because the emulator lacks Landlock and user namespaces, so sandboxed previews onaarch64are untested on real hardware.publish-copr.ymlon my fork built all eight chroots in both projects. Installing from that repository works on my Fedora 45 desktop, and dnf offers the rebuilt1.2.1-2as an upgrade.Related issue
Closes #2118