Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

s3cmd violates XDG basedir spec on linux #658

Open
sandys opened this issue Oct 27, 2015 · 3 comments
Open

s3cmd violates XDG basedir spec on linux #658

sandys opened this issue Oct 27, 2015 · 3 comments

Comments

@sandys
Copy link

sandys commented Oct 27, 2015

according to http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html

$XDG_CONFIG_HOME defines the base directory relative to which user specific configuration files should be stored. If $XDG_CONFIG_HOME is either not set or empty, a default equal to $HOME/.config should be used.

s3cmd is storing all config files in the home directory and violating the spec.

@fviard
Copy link
Contributor

fviard commented Nov 19, 2015

@mdomsch What do you think? should we change that to be the default?

@mdomsch
Copy link
Contributor

mdomsch commented Nov 19, 2015

I don't have a strong opinion. $HOME/.s3cfg (and that pattern) has been
around far longer than the 2010 XDG spec, and it's voluntary. There isn't
a huge reason we should have to follow that - think of it more like a
recommendation. We also have people asking if we could get credentials out
of ~/.aws/config.

If someone felt strongly about doing it, allowing use of ~/.s3cfg, or
either of these other XDG recommendations, I'd be fine with that. If they
wanted to remove ~/.s3cfg and force users to move their config files, I'd
reject.

On Wed, Nov 18, 2015 at 4:25 PM, Florent Viard [email protected]
wrote:

@mdomsch https://github.com/mdomsch What do you think? should we change
that to be the default?


Reply to this email directly or view it on GitHub
#658 (comment).

@gahag
Copy link

gahag commented Nov 11, 2019

I believe the ideal behavior would be:

  • If no s3cfg file exists (neither in $XDG_CONFIG_HOME, or as $HOME/.s3cfg), create it in $XDG_CONFIG_HOME.
  • if the $XDG_CONFIG_HOME/s3cmd/config file exists, use it.
  • if the $HOME/.s3cfg file exists, use it.

@fviard, @mdomsch, what do you guys think? I would be willing to work on that next month if you agree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants