trek10inc / awsume

A utility for easily assuming AWS IAM roles from the command line.
https://awsu.me
MIT License
487 stars 90 forks source link

Honor XDG base directories on Linux #132

Closed ghost closed 7 months ago

ghost commented 3 years ago

Putting files in e.g. ~/.awsume has not been standard in Linux for many years now. Files should live .config/awsume, .cache/awsume, and .local/share/awsume (if environment vars are not set).

You can read about it here. A summary:

XDG_CONFIG_HOME
    Where user-specific configurations should be written (analogous to /etc).
    Should default to $HOME/.config.

XDG_CACHE_HOME
    Where user-specific non-essential (cached) data should be written (analogous to /var/cache).
    Should default to $HOME/.cache.

XDG_DATA_HOME
    Where user-specific data files should be written (analogous to /usr/share).
    Should default to $HOME/.local/share.

XDG_RUNTIME_DIR
    Used for non-essential, user-specific data files such as sockets, named pipes, etc.
    Not required to have a default value; warnings should be issued if not set or equivalents provided.
    Must be owned by the user with an access mode of 0700.
    Filesystem fully featured by standards of OS.
    Must be on the local filesystem.
    May be subject to periodic cleanup.
    Modified every 6 hours or set sticky bit if persistence is desired.
    Can only exist for the duration of the user's login.
    Should not store large files as it may be mounted as a tmpfs.

https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html

bob-crutchley commented 3 years ago

I've made a PR for this, please see PR: #138

mtskillman commented 7 months ago

addressed by https://github.com/trek10inc/awsume/pull/228