Skip to content

Commit

Permalink
Change default image volume mode to "nullfs" on FreeBSD
Browse files Browse the repository at this point in the history
This fixes a regression in
containers/podman#19241 which quite reasonably
assumed that the default image volume mode from pkg/config was correct.

Signed-off-by: Doug Rabson <[email protected]>
  • Loading branch information
dfr committed Jul 17, 2023
1 parent 307a9d0 commit 35b7931
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const (
BoltDBStateStore RuntimeStateStore = iota
)

var validImageVolumeModes = []string{"bind", "tmpfs", "ignore"}
var validImageVolumeModes = []string{_typeBind, "tmpfs", "ignore"}

// ProxyEnv is a list of Proxy Environment variables
var ProxyEnv = []string{
Expand Down
3 changes: 3 additions & 0 deletions pkg/config/config_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ const (
// DefaultSignaturePolicyPath is the default value for the
// policy.json file.
DefaultSignaturePolicyPath = "/etc/containers/policy.json"

// Mount type for mounting host dir
_typeBind = "bind"
)

// podman remote clients on darwin cannot use unshare.isRootless() to determine the configuration file locations.
Expand Down
3 changes: 3 additions & 0 deletions pkg/config/config_freebsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ const (
// DefaultSignaturePolicyPath is the default value for the
// policy.json file.
DefaultSignaturePolicyPath = "/usr/local/etc/containers/policy.json"

// Mount type for mounting host dir
_typeBind = "nullfs"
)

// podman remote clients on freebsd cannot use unshare.isRootless() to determine the configuration file locations.
Expand Down
3 changes: 3 additions & 0 deletions pkg/config/config_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ const (
// DefaultSignaturePolicyPath is the default value for the
// policy.json file.
DefaultSignaturePolicyPath = "/etc/containers/policy.json"

// Mount type for mounting host dir
_typeBind = "bind"
)

func selinuxEnabled() bool {
Expand Down
3 changes: 3 additions & 0 deletions pkg/config/config_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ const (
// DefaultSignaturePolicyPath is the default value for the
// policy.json file.
DefaultSignaturePolicyPath = "/etc/containers/policy.json"

// Mount type for mounting host dir
_typeBind = "bind"
)

// podman remote clients on windows cannot use unshare.isRootless() to determine the configuration file locations.
Expand Down
2 changes: 1 addition & 1 deletion pkg/config/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const (
_defaultTransport = "docker://"

// _defaultImageVolumeMode is a mode to handle built-in image volumes.
_defaultImageVolumeMode = "bind"
_defaultImageVolumeMode = _typeBind
)

var (
Expand Down

0 comments on commit 35b7931

Please sign in to comment.