GoogleCloudPlatform / GoogleCloudPlatform/gsutil
gsutil ignores XDG basedir spec
- Dominant language
- Python
- Stars
- 918
- Forks
- 335
- PR merge metrics
- No merged PRs in 30d
Description
Many *nix programs now adhere to the XDG Base Directory Specification. I'd love to see gsutil follow suit, or at least gain some built-in compatibility with it.
Here is the spec [itself](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html), and while I don't use Arch Linux, there's a good [write-up](https://wiki.archlinux.org/index.php/XDG_Base_Directory) on the wiki that explains the spec a bit more. It also has a list of programs that utilize the spec and workarounds for some of those that don't.
As it specifically relates to `gsutil`, it would be nice if the program checked for the configuration file in `$XDG_CONFIG_HOME/gsutil/boto` (defaulting back to `~/.boto`), and for the state directory in `$XDG_CACHE_HOME/gsutil` (defaulting back to `~/.gsutil`).
(I know you can set the `BOTO_CONFIG` environment variable to set the location of the config file, and inside said config file you can specify `state_dir`, but when you're running `gsutil` through `gcloud` it's not always obvious where to do that.)
Contributor guide
Research direction
Start by tracing how gsutil locates its boto configuration and state directory, then compare that behavior with the XDG Base Directory Specification linked in the issue. Done means checking $XDG_CONFIG_HOME/gsutil/boto and $XDG_CACHE_HOME/gsutil, with the stated ~/.boto and ~/.gsutil fallbacks, including use through gcloud.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, cloud
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100