Add Fedora packaging spec + review prep; fix license SPDX - #2358
Open
sinelaw wants to merge 3 commits into
Open
Conversation
sinelaw
force-pushed
the
fedora-packaging
branch
from
June 22, 2026 18:23
15aa2d6 to
a44abc4
Compare
…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
force-pushed
the
fedora-packaging
branch
from
July 17, 2026 11:54
a44abc4 to
11dc7ae
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 thefreshTUI binary from source in a clean chroot, vendoring the crate tree. This is the model Fedora accepts; the existingcargo-generate-rpmCI output is a prebuilt binary stuffed into an RPM, which Fedora rejects.fedora/gen-vendor.sh— produces the*-vendor.tar.zstdependency tarball (Source1) viacargo-vendor-filterer, likerust2rpm.fedora/gen-bundled-license.sh— computes the bundled-dependencyLicense:SPDX expression.fedora/README.md— full runbook: prereqs → vendor → SRPM → mock → fedora-review → COPR → Bugzilla Review Request → post-approval.License fix
LICENSEis GPLv2 with the "or (at your option) any later version" clause, so the correct SPDX id isGPL-2.0-or-later, not the deprecated bareGPL-2.0. Corrected in:Cargo.toml[workspace.package](inherited by all crates vialicense.workspace = true).exeLegalCopyrightresource string incrates/fresh-editor/build.rsNotes / follow-ups (not blocking this PR)
License:line is a# FIXMEplaceholder — fill it fromgen-bundled-license.shoutput before submitting the review.mock,fedora-review,rpmbuild) were not run — this was developed on Arch, which lacks the Fedora toolchain. They're documented for a Fedora host.fresh-editor(confirmed via Bugzilla); the README has the canonical submission steps incl. FE-NEEDSPONSOR.🤖 Generated with Claude Code