where `.cargo/config.toml` should be located
Based on my observation obs-service-cargo will generate .cargo/config.toml at the root of the project directory. This comes with some caveats that we have to do that --manifest-path=<path-to-Cargo.toml> as an additional flag on the specfile. This is not ideal.
So based on https://doc.rust-lang.org/cargo/reference/config.html#hierarchical-structure, I should
- [ ] If it's a workspace configuration, use the workspace Cargo.toml's location as the location for the .cargo/config.toml
- [ ] Otherwise, we should put .cargo/config.toml for each location of the Cargo.toml for each crate found or used.
Relevant openSUSE package: monorepo-like Rust package such as python-tokenizers
Additionally,
vendorseems to not extract at the exact path. Is this caused by the change when we merged a PR that modifies mtime in the tarball for reproducible builds
I remembered i designed this in a way where if it is extracted, they're extracted in the correct path... (i might be wrong so imma investigate this lol)
TODO
- [ ] Investigate https://github.com/Firstyear/obs-service-cargo/pull/78
- [ ] Fix pathing. (Investigate and add findings)
- [ ] Fix extracting. (Investigate and add findings)
- [ ] Add tests
- [ ] Monorepo packages e.g. python-tokenizers
- [ ] Workspaces e.g. wezterm, zellij