Skip to content

Move m68k fork out of vendor/ and rename it to copperline-m68k#62

Merged
LinuxJedi merged 1 commit into
mainfrom
fix/m68k-crate-relocation
Jun 28, 2026
Merged

Move m68k fork out of vendor/ and rename it to copperline-m68k#62
LinuxJedi merged 1 commit into
mainfrom
fix/m68k-crate-relocation

Conversation

@LinuxJedi

Copy link
Copy Markdown
Owner

Problem

Offline/vendored builds (openSUSE OBS, and anyone using cargo vendor) failed with:

failed to load checksum `.cargo-checksum.json` of m68k v0.1.5 ... No such file or directory

Distro packaging vendors crates.io dependencies into a directory named vendor/ and emits:

[source.crates-io]
replace-with = "vendored-sources"
[source.vendored-sources]
directory = "vendor"

Cargo then treats every subdirectory of vendor/ as a vendored registry crate and requires a .cargo-checksum.json for each. Our committed path crate lived in vendor/m68k with no checksum file, so the offline build aborted.

Fix

  • Relocate the fork vendor/m68k -> crates/m68k, so it no longer collides with the packaging vendor/ directory.
  • Rename the package m68k -> copperline-m68k. The name no longer matches the upstream crates.io m68k crate, and the dependency carries no version requirement, so no tool, [patch], or future workspace member can substitute the unmodified upstream core for this fork.
  • Keep the importable library name as m68k via [lib] name, and alias the dependency back with package = "copperline-m68k", so no source use m68k::... changes were needed.
  • Update .gitignore, VENDOR.md, and the remaining vendor/m68k path references in docs and one source comment.

The 127 committed *.bin test fixtures (force-added past the global *.bin ignore) were carried over to the new path as renames; none were lost.

Verification

  • cargo build --release, cargo test --release (1194 passed, 0 failed), cargo clippy, cargo fmt --check: all clean.
  • The fork's own test suite still compiles/runs under the new lib name.
  • Reproduced the OBS scenario locally and confirmed it now succeeds:
cargo vendor vendor-check
cargo build --release --offline \
  --config 'source.crates-io.replace-with="vendored-sources"' \
  --config 'source.vendored-sources.directory="vendor-check"'

copperline-m68k builds from the local path while every crates.io dep resolves from the vendored directory.

Closes #57

Fixes #57: offline/vendored builds (e.g. openSUSE OBS) failed with
"failed to load checksum .cargo-checksum.json of m68k v0.1.5".

Distro packaging vendors crates.io dependencies into a directory named
vendor/ and points [source.vendored-sources] directory = "vendor" at it.
Cargo then treats every subdirectory of vendor/ as a vendored registry
crate and requires a .cargo-checksum.json for each one. Our committed
path crate lived in vendor/m68k with no checksum file, so the offline
build aborted.

- Relocate the fork from vendor/m68k to crates/m68k so it no longer
  collides with the packaging vendor/ directory.
- Rename the package from m68k to copperline-m68k. The name no longer
  matches the upstream crates.io m68k crate, and the dependency carries
  no version requirement, so no tool, [patch], or future workspace
  member can substitute the unmodified upstream core for this fork.
- Keep the importable library name as m68k via [lib] name, and alias the
  dependency back with package = "copperline-m68k", so no source
  use m68k::... changes were needed.
- Update .gitignore, VENDOR.md, and the remaining path references.

Verified by reproducing the OBS scenario: cargo vendor followed by an
offline build against [source.vendored-sources] now succeeds.
@LinuxJedi LinuxJedi merged commit 063faed into main Jun 28, 2026
9 checks passed
@LinuxJedi LinuxJedi deleted the fix/m68k-crate-relocation branch June 28, 2026 18:51
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.

Vendored builds don't seem to work

1 participant