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

policy.json overwrite not honouring $XDG_CONFIG_HOME #2297

Open
Luap99 opened this issue Feb 15, 2024 · 3 comments
Open

policy.json overwrite not honouring $XDG_CONFIG_HOME #2297

Luap99 opened this issue Feb 15, 2024 · 3 comments
Labels
kind/feature A request for, or a PR adding, new functionality

Comments

@Luap99
Copy link
Member

Luap99 commented Feb 15, 2024

Reading the signature code I noticed that the user policy json file is always read from ~/.config and does not honour the XDG_CONFIG_HOME env var.

var userPolicyFile = filepath.FromSlash(".config/containers/policy.json")

userPolicyFilePath := filepath.Join(homeDir, userPolicyFile)

AFAICT the rest of our stack respects this var so I would think policy.json should do the same or am I overlooking something?

@Luap99 Luap99 changed the title policy.json overwrite not honering $XDG_CONFIG_HOME policy.json overwrite not honouring $XDG_CONFIG_HOME Feb 15, 2024
@mtrmac
Copy link
Collaborator

mtrmac commented Feb 15, 2024

That’s reasonable in principle — except that XDG_CONFIG_HOME is, strictly speaking, a Linux-specific concept.

There was #1011 some time ago, that goes into a bit more detail.

@mtrmac mtrmac added the kind/feature A request for, or a PR adding, new functionality label Feb 15, 2024
@Luap99
Copy link
Member Author

Luap99 commented Feb 15, 2024

Ah yeah didn't search for existing PRs, also looks like the same problem for registries.conf #1647

I don't have any need for this right now (juts noticed the problem while reading the code) so I leave it to you or others if they care to fix this or not.

@mtrmac
Copy link
Collaborator

mtrmac commented Feb 15, 2024

I think I’d only want to work on this after fixing known bugs in documented functionality, but PRs would be welcome.

Either way, having this issue filed to track the improvement is valuable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature A request for, or a PR adding, new functionality
Projects
None yet
Development

No branches or pull requests

2 participants