#6637 closed defect (fixed)

.cargo directory created off user's home dir

Reported by: tim Owned by:
Priority: Should Have Milestone:
Component: Build & Packages Keywords:
Cc: Patch:

Description

when building 0ad a .cargo directory containing a zero length .package-cache file is created from the user's home directory. This is being run on a non-debian based system (slackware) so apt is not used or present. Is there a way to prevent this directory being created outside of the extracted source tree? I test the build in an overlayfs chroot and everything else is created in the expected location. the build script is virtually the same as the one at https://slackbuilds.org/slackbuilds/15.0/games/0ad/0ad.SlackBuild updated for v 0.0.26-alpha and also uses https://slackbuilds.org/slackbuilds/15.0/games/0ad/disable-root-check.patch to allow root to create the package (as is standard for slackware packages)

Change History (3)

comment:1 by Ralph Sennhauser, 18 months ago

You could set CARGO_HOME to point somewhere else than the default $HOME/.cargo

Rust/Cargo is used by the bundled spidermonky only. So if you use system spidermonky you can shift the issue or check how your distro does it for the spidermonkey package.

For SM78 it would also be possible to patch out the requirement for Rust as the bits needed for 0ad do not depend on the Rust parts.

comment:2 by tim, 18 months ago

many thanks. that setting the CARGO_HOME environment variable has fixed it.

comment:3 by tim, 18 months ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.