Skip to content

Add Fedora packaging spec + review prep; fix license SPDX - #2358

Open
sinelaw wants to merge 3 commits into
masterfrom
fedora-packaging
Open

Add Fedora packaging spec + review prep; fix license SPDX#2358
sinelaw wants to merge 3 commits into
masterfrom
fedora-packaging

Conversation

@sinelaw

@sinelaw sinelaw commented Jun 15, 2026

Copy link
Copy Markdown
Owner

Summary

Adds a fedora/ directory with everything needed to submit Fresh to Fedora as a bundled Rust application and take it through official package review, plus a license-metadata correction.

  • fedora/fresh-editor.spec — builds the fresh TUI binary from source in a clean chroot, vendoring the crate tree. This is the model Fedora accepts; the existing cargo-generate-rpm CI output is a prebuilt binary stuffed into an RPM, which Fedora rejects.
  • fedora/gen-vendor.sh — produces the *-vendor.tar.zst dependency tarball (Source1) via cargo-vendor-filterer, like rust2rpm.
  • fedora/gen-bundled-license.sh — computes the bundled-dependency License: SPDX expression.
  • fedora/README.md — full runbook: prereqs → vendor → SRPM → mock → fedora-review → COPR → Bugzilla Review Request → post-approval.

License fix

LICENSE is GPLv2 with the "or (at your option) any later version" clause, so the correct SPDX id is GPL-2.0-or-later, not the deprecated bare GPL-2.0. Corrected in:

  • Cargo.toml [workspace.package] (inherited by all crates via license.workspace = true)
  • the Windows .exe LegalCopyright resource string in crates/fresh-editor/build.rs

Notes / follow-ups (not blocking this PR)

  • The spec's bundled License: line is a # FIXME placeholder — fill it from gen-bundled-license.sh output before submitting the review.
  • Build/lint steps (mock, fedora-review, rpmbuild) were not run — this was developed on Arch, which lacks the Fedora toolchain. They're documented for a Fedora host.
  • There is currently no Fedora review bug for fresh-editor (confirmed via Bugzilla); the README has the canonical submission steps incl. FE-NEEDSPONSOR.

🤖 Generated with Claude Code

@sinelaw
sinelaw force-pushed the fedora-packaging branch from 15aa2d6 to a44abc4 Compare June 22, 2026 18:23
sinelaw and others added 3 commits July 17, 2026 11:54
…SPDX

Add a `fedora/` directory with everything needed to submit Fresh to Fedora
as a bundled Rust application and shepherd it through official package review:

- fresh-editor.spec: builds the `fresh` TUI binary from source in a clean
  chroot, vendoring the crate tree (the model Fedora accepts; the existing
  cargo-generate-rpm CI output is a prebuilt binary, which Fedora rejects).
- gen-vendor.sh / gen-bundled-license.sh: produce the vendored-dependency
  tarball (Source1) and compute the bundled-dependency License: expression.
- README.md: full runbook from vendoring through the Bugzilla Review Request.

Also correct the license metadata: LICENSE is GPLv2 with the "or (at your
option) any later version" clause, so the SPDX id is GPL-2.0-or-later, not
the deprecated bare GPL-2.0. Fix it in Cargo.toml (inherited by all crates)
and in the Windows .exe LegalCopyright resource string.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add fedora/docker-build.sh, which stages the source tree + vendored crate
deps and runs rpmbuild inside a fedora:41 container, so the spec can be
smoke-tested on a non-Fedora host (this repo is developed on Arch). Output
RPMs land in fedora/out/. Document it in the README as a convenience check
that does not replace the clean-chroot mock build + fedora-review required
for the official package review.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Verified the packaging end-to-end in a Fedora container (cargo build with
rustc 1.96 reached the dependency compile cleanly). Fixes found along the way:

- spec %prep: Fedora's %cargo_prep does not extract a vendor tarball (its -V
  flag errors on Fedora), so extract Source1 explicitly and use
  `%cargo_prep -v vendor`. Previously cargo failed: "failed to read root of
  directory source ... No such file or directory".
- spec %install: %cargo_build builds the `rpm` profile into target/rpm/, so
  install from target/rpm/fresh (was target/rpm/release/fresh).
- vendor tarball: top-level dir is now `vendor` (matches `-v vendor`) while the
  file name stays fresh-editor-<ver>-vendor.tar.zst; updated gen-vendor.sh and
  docker-build.sh accordingly.
- Dockerfile + docker-build.sh: pre-bake the toolchain/BuildRequires into a
  builder image (pause-safe, fast to re-run) and add clang-devel for the
  rquickjs-sys bindgen step. Default to Fedora 43: F41's rustc 1.91 is older
  than the oxc crates' 1.93 MSRV; F43/F44 ship rustc 1.96.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@sinelaw
sinelaw force-pushed the fedora-packaging branch from a44abc4 to 11dc7ae Compare July 17, 2026 11:54
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.

1 participant