Commit Graph

6 Commits

Author SHA1 Message Date
Paul Holzinger 8f0f7109e5 pkg/config: read user local config also as root
There is really no need to limit reading the config under
$XDG_CONFIG_HOME or $HOME to rootless users only. This poses two
problems, first on a multi user system any config that should be only
applied to root in /etc will also be read by all other users which makes
this impossible to use without having all user overwrite that option
with their local containers.conf. If we read the config from $HOME as
root as well then such changes are easy.
Second, because connections/farms are currently written by the cli it
means as root is tries to write under /etc which is not good as in some
envs /etc is mounted read only.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-01-29 16:28:07 +01:00
Paul Holzinger 745268b117 pkg/config: use containersConfEnv constant everywhere
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-01-29 16:28:06 +01:00
Doug Rabson 478419732a Change default image volume mode to "nullfs" on FreeBSD
This fixes a regression in
https://github.com/containers/podman/pull/19241 which quite reasonably
assumed that the default image volume mode from pkg/config was correct.

Signed-off-by: Doug Rabson <dfr@rabson.org>
2023-07-17 14:58:23 +01:00
Doug Rabson 4b906d8159 pkg/config: Fix DefaultSignaturePath on FreeBSD
The correct location on FreeBSD is /usr/local/etc/containers/policy.json
which is consistent with path conventions for installed packages. This
fixes 'podman commit' on FreeBSD.

There are several definitions of this path:

- c/image/signature has builtinDefaultPolicyPath and DefaultPolicy
- c/podman/pkg/trust has systemDefaultPolicyPath and DefaultPolicyPath
- c/common/pkg/config has DefaultSignaturePolicyPath

As far as I can tell, buildah uses c/image/signature which is why 'buildah
commit' was already working for me. Podman is using the c/common one. Very
confusing.

[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-11-09 16:50:45 +00:00
Doug Rabson a4a658034b Config files should live in /usr/local on FreeBSD
Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-05-09 14:07:58 +01:00
Doug Rabson 781511efee Add FreeBSD support for pkg/config
Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-04-22 11:21:27 +01:00