cirruslabs / tart

macOS and Linux VMs on Apple Silicon to use in CI and other automations
https://tart.run
Other
3.65k stars 102 forks source link

Adhere to XDG Base Directory Specification #765

Closed bartekpacia closed 3 months ago

bartekpacia commented 3 months ago

I'd like tart to adhere to XDG Base Directory Specification, by e.g. placing downloaded images into $XDG_CACHE_HOME instead of cluttering home directory.

edigaryev commented 3 months ago

The main reason why the .cache directory is currently located in ~/.tart is that there's a TART_HOME environment variable which allows users to conveniently relocate their VMs (including the downloaded OCI VMs, which are stored in .cache) and run the Tart from a separate disk (e.g. SSD).

Splitting the ~/.tart from the ~/.tart/cache is not be possible in this scenario because Tart relies on APFS zero-copy mechanism to copy the OCI VMs to the local VM storage, which does not work across the filesystem boundary.

What are you trying to achieve with this?

As far as I know, there are not too many apps adhering to XDG on macOS (compared to Linux), including the macOS itself.

torarnv commented 3 months ago

macOS is not a Freedesktop platform, so I don't think it makes sense for Tart to pick up the various XDG_ environment variables.

fkorotkov commented 3 months ago

Agreed with both points. Closing since we are not planning to support it.