Skip to content

Install policy.json & default.yaml in /usr/share/ instead of /etc/#989

Open
rahilarious wants to merge 1 commit into
podman-container-tools:mainfrom
rahilarious:main
Open

Install policy.json & default.yaml in /usr/share/ instead of /etc/#989
rahilarious wants to merge 1 commit into
podman-container-tools:mainfrom
rahilarious:main

Conversation

@rahilarious

Copy link
Copy Markdown

Due to changes in podman 6.0 config file parsing changed[1]. So these files should be installed in /usr/share/containers by packagers and let /etc/containers should be system admins.

This is also followed in common/rpm/containers-common.spec

[1] https://github.com/podman-container-tools/podman/blob/main/contrib/design-docs/config-file-parsing.md

@github-actions github-actions Bot added the image Related to "image" package label Jul 15, 2026
Comment thread image/Makefile Outdated
@@ -30,7 +30,7 @@ MANPAGES ?= $(MANPAGES_MD:%.md=%)
ifeq ($(shell uname -s),FreeBSD)
CONTAINERSCONFDIR ?= /usr/local/etc/containers

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the freebsd dir should also be changed to /usr/local/share/containers then

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suspected, but wasn't sure about path. But done

Due to changes in podman 6.0 config file parsing changed[1]. So
these files should be installed in /usr/share/containers by packagers
and let /etc/containers should be system admins.

This is also followed in common/rpm/containers-common.spec

[1] https://github.com/podman-container-tools/podman/blob/main/contrib/design-docs/config-file-parsing.md

Signed-off-by: Rahil Bhimjiani <me@rahil.rocks>

@mtrmac mtrmac left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don’t have a very strong opinion on the default location in isolation (I’ll mostly defer to @Luap99 ’s expertise); but I have a pretty strong opinion that minor version updates should not break users’ setups or negatively affect their security posture, and this seems fairly risky from that point of view.

Making such a change for Podman 6.0 and associated releases might have been rather more palatable (and even then, making changes to non-Podman projects without bumping their major version number was a bit controversial). Now, during the lifetime of the 6.0 branch … I think it’s up to proponents of these changes to be convincing that the changes are safe.

@Luap99

Luap99 commented Jul 15, 2026

Copy link
Copy Markdown
Member

I have a pretty strong opinion that minor version updates should not break users’ setups or negatively affect their security posture, and this seems fairly risky from that point of view.

How will this break anyone? Packaging wise we want people to install the files into /usr/ over /etc/
Frankly I dunno how this Makefile here is supposed to be used? Our rpm packing files seems to not use any of this and were changes to put these things into /usr/share/containers so in that sense this makes things consistent with our default packaging.

I guess the risky part being the old files under /etc will persist if a user upgrades and runs this target again? I am not sure which users would perform such a workflow though compared to running this as part of the package install section and package managers should be smart enough to clean up the old /etc files then.

@Luap99 Luap99 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

image Related to "image" package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants