mirror of
https://github.com/containers/podman.git
synced 2025-12-05 04:40:47 +08:00
Update buildah to current master
Vendor some changes to parsing code that we need for Podman. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
This commit is contained in:
2
vendor/github.com/containers/buildah/pkg/cli/common.go
generated
vendored
2
vendor/github.com/containers/buildah/pkg/cli/common.go
generated
vendored
@@ -186,7 +186,7 @@ func GetFromAndBudFlags(flags *FromAndBudResults, usernsResults *UserNSResults,
|
||||
fs.StringVar(&flags.CPUSetCPUs, "cpuset-cpus", "", "CPUs in which to allow execution (0-3, 0,1)")
|
||||
fs.StringVar(&flags.CPUSetMems, "cpuset-mems", "", "memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems.")
|
||||
fs.StringSliceVar(&flags.DNSSearch, "dns-search", []string{}, "Set custom DNS search domains")
|
||||
fs.StringSliceVar(&flags.DNSServers, "dns", []string{}, "Set custom DNS servers")
|
||||
fs.StringSliceVar(&flags.DNSServers, "dns", []string{}, "Set custom DNS servers or disable it completely by setting it to 'none', which prevents the automatic creation of `/etc/resolv.conf`.")
|
||||
fs.StringSliceVar(&flags.DNSOptions, "dns-option", []string{}, "Set custom DNS options")
|
||||
fs.BoolVar(&flags.HTTPProxy, "http-proxy", true, "pass thru HTTP Proxy environment variables")
|
||||
fs.StringVar(&flags.Isolation, "isolation", DefaultIsolation(), "`type` of process isolation to use. Use BUILDAH_ISOLATION environment variable to override.")
|
||||
|
||||
23
vendor/github.com/containers/buildah/pkg/parse/parse.go
generated
vendored
23
vendor/github.com/containers/buildah/pkg/parse/parse.go
generated
vendored
@@ -462,25 +462,40 @@ func ValidateVolumeCtrDir(ctrDir string) error {
|
||||
|
||||
// ValidateVolumeOpts validates a volume's options
|
||||
func ValidateVolumeOpts(options []string) ([]string, error) {
|
||||
var foundRootPropagation, foundRWRO, foundLabelChange, bindType int
|
||||
var foundRootPropagation, foundRWRO, foundLabelChange, bindType, foundExec, foundDev, foundSuid int
|
||||
finalOpts := make([]string, 0, len(options))
|
||||
for _, opt := range options {
|
||||
switch opt {
|
||||
case "noexec", "exec":
|
||||
foundExec++
|
||||
if foundExec > 1 {
|
||||
return nil, errors.Errorf("invalid options %q, can only specify 1 'noexec' or 'exec' option", strings.Join(options, ", "))
|
||||
}
|
||||
case "nodev", "dev":
|
||||
foundDev++
|
||||
if foundDev > 1 {
|
||||
return nil, errors.Errorf("invalid options %q, can only specify 1 'nodev' or 'dev' option", strings.Join(options, ", "))
|
||||
}
|
||||
case "nosuid", "suid":
|
||||
foundSuid++
|
||||
if foundSuid > 1 {
|
||||
return nil, errors.Errorf("invalid options %q, can only specify 1 'nosuid' or 'suid' option", strings.Join(options, ", "))
|
||||
}
|
||||
case "rw", "ro":
|
||||
foundRWRO++
|
||||
if foundRWRO > 1 {
|
||||
return nil, errors.Errorf("invalid options %q, can only specify 1 'rw' or 'ro' option", strings.Join(options, ", "))
|
||||
}
|
||||
foundRWRO++
|
||||
case "z", "Z", "O":
|
||||
foundLabelChange++
|
||||
if foundLabelChange > 1 {
|
||||
return nil, errors.Errorf("invalid options %q, can only specify 1 'z', 'Z', or 'O' option", strings.Join(options, ", "))
|
||||
}
|
||||
foundLabelChange++
|
||||
case "private", "rprivate", "shared", "rshared", "slave", "rslave", "unbindable", "runbindable":
|
||||
foundRootPropagation++
|
||||
if foundRootPropagation > 1 {
|
||||
return nil, errors.Errorf("invalid options %q, can only specify 1 '[r]shared', '[r]private', '[r]slave' or '[r]unbindable' option", strings.Join(options, ", "))
|
||||
}
|
||||
foundRootPropagation++
|
||||
case "bind", "rbind":
|
||||
bindType++
|
||||
if bindType > 1 {
|
||||
|
||||
Reference in New Issue
Block a user