mirror of
https://github.com/containers/podman.git
synced 2025-12-02 02:58:03 +08:00
Bump Buildah to v1.35.0
As the title says. This is the last step in the vendor dance for Podman v5.0. [NO NEW TESTS NEEDED] Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
This commit is contained in:
2
vendor/github.com/containers/common/pkg/auth/auth.go
generated
vendored
2
vendor/github.com/containers/common/pkg/auth/auth.go
generated
vendored
@@ -285,7 +285,7 @@ func getUserAndPass(opts *LoginOptions, password, userFromAuthFile string) (user
|
||||
username := opts.Username
|
||||
if username == "" {
|
||||
if opts.Stdin == nil {
|
||||
return "", "", fmt.Errorf("cannot prompt for username without stdin")
|
||||
return "", "", errors.New("cannot prompt for username without stdin")
|
||||
}
|
||||
|
||||
if userFromAuthFile != "" {
|
||||
|
||||
8
vendor/github.com/containers/common/pkg/cgroups/cgroups_linux.go
generated
vendored
8
vendor/github.com/containers/common/pkg/cgroups/cgroups_linux.go
generated
vendored
@@ -103,7 +103,7 @@ func getAvailableControllers(exclude map[string]controllerHandler, cgroup2 bool)
|
||||
}
|
||||
// userSlice already contains '/' so not adding here
|
||||
basePath := cgroupRoot + userSlice
|
||||
controllersFile = fmt.Sprintf("%s/cgroup.controllers", basePath)
|
||||
controllersFile = basePath + "/cgroup.controllers"
|
||||
}
|
||||
controllersFileBytes, err := os.ReadFile(controllersFile)
|
||||
if err != nil {
|
||||
@@ -389,7 +389,7 @@ func Load(path string) (*CgroupControl, error) {
|
||||
// CreateSystemdUnit creates the systemd cgroup
|
||||
func (c *CgroupControl) CreateSystemdUnit(path string) error {
|
||||
if !c.systemd {
|
||||
return fmt.Errorf("the cgroup controller is not using systemd")
|
||||
return errors.New("the cgroup controller is not using systemd")
|
||||
}
|
||||
|
||||
conn, err := systemdDbus.NewWithContext(context.TODO())
|
||||
@@ -404,7 +404,7 @@ func (c *CgroupControl) CreateSystemdUnit(path string) error {
|
||||
// CreateSystemdUserUnit creates the systemd cgroup for the specified user
|
||||
func (c *CgroupControl) CreateSystemdUserUnit(path string, uid int) error {
|
||||
if !c.systemd {
|
||||
return fmt.Errorf("the cgroup controller is not using systemd")
|
||||
return errors.New("the cgroup controller is not using systemd")
|
||||
}
|
||||
|
||||
conn, err := UserConnection(uid)
|
||||
@@ -678,7 +678,7 @@ func cpusetCopyFileFromParent(dir, file string, cgroupv2 bool) ([]byte, error) {
|
||||
path := filepath.Join(dir, file)
|
||||
parentPath := path
|
||||
if cgroupv2 {
|
||||
parentPath = fmt.Sprintf("%s.effective", parentPath)
|
||||
parentPath += ".effective"
|
||||
}
|
||||
data, err := os.ReadFile(parentPath)
|
||||
if err != nil {
|
||||
|
||||
2
vendor/github.com/containers/common/pkg/cgroups/systemd_linux.go
generated
vendored
2
vendor/github.com/containers/common/pkg/cgroups/systemd_linux.go
generated
vendored
@@ -25,7 +25,7 @@ func systemdCreate(resources *configs.Resources, path string, c *systemdDbus.Con
|
||||
var lastError error
|
||||
for i := 0; i < 2; i++ {
|
||||
properties := []systemdDbus.Property{
|
||||
systemdDbus.PropDescription(fmt.Sprintf("cgroup %s", name)),
|
||||
systemdDbus.PropDescription("cgroup " + name),
|
||||
systemdDbus.PropWants(slice),
|
||||
}
|
||||
var ioString string
|
||||
|
||||
6
vendor/github.com/containers/common/pkg/config/default.go
generated
vendored
6
vendor/github.com/containers/common/pkg/config/default.go
generated
vendored
@@ -531,13 +531,13 @@ func (c EngineConfig) EventsLogMaxSize() uint64 {
|
||||
func (c *Config) SecurityOptions() []string {
|
||||
securityOpts := []string{}
|
||||
if c.Containers.SeccompProfile != "" && c.Containers.SeccompProfile != SeccompDefaultPath {
|
||||
securityOpts = append(securityOpts, fmt.Sprintf("seccomp=%s", c.Containers.SeccompProfile))
|
||||
securityOpts = append(securityOpts, "seccomp="+c.Containers.SeccompProfile)
|
||||
}
|
||||
if apparmor.IsEnabled() && c.Containers.ApparmorProfile != "" {
|
||||
securityOpts = append(securityOpts, fmt.Sprintf("apparmor=%s", c.Containers.ApparmorProfile))
|
||||
securityOpts = append(securityOpts, "apparmor="+c.Containers.ApparmorProfile)
|
||||
}
|
||||
if selinux.GetEnabled() && !c.Containers.EnableLabeling {
|
||||
securityOpts = append(securityOpts, fmt.Sprintf("label=%s", selinux.DisableSecOpt()[0]))
|
||||
securityOpts = append(securityOpts, "label="+selinux.DisableSecOpt()[0])
|
||||
}
|
||||
return securityOpts
|
||||
}
|
||||
|
||||
3
vendor/github.com/containers/common/pkg/filters/filters.go
generated
vendored
3
vendor/github.com/containers/common/pkg/filters/filters.go
generated
vendored
@@ -2,6 +2,7 @@ package filters
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"path/filepath"
|
||||
@@ -17,7 +18,7 @@ import (
|
||||
func ComputeUntilTimestamp(filterValues []string) (time.Time, error) {
|
||||
invalid := time.Time{}
|
||||
if len(filterValues) != 1 {
|
||||
return invalid, fmt.Errorf("specify exactly one timestamp for until")
|
||||
return invalid, errors.New("specify exactly one timestamp for until")
|
||||
}
|
||||
ts, err := timetype.GetTimestamp(filterValues[0], time.Now())
|
||||
if err != nil {
|
||||
|
||||
2
vendor/github.com/containers/common/pkg/ssh/connection_golang.go
generated
vendored
2
vendor/github.com/containers/common/pkg/ssh/connection_golang.go
generated
vendored
@@ -291,7 +291,7 @@ func ValidateAndConfigure(uri *url.URL, iden string, insecureIsMachineConnection
|
||||
}
|
||||
if len(authMethods) == 0 {
|
||||
authMethods = append(authMethods, ssh.PasswordCallback(func() (string, error) {
|
||||
pass, err := ReadPassword(fmt.Sprintf("%s's login password:", uri.User.Username()))
|
||||
pass, err := ReadPassword(uri.User.Username() + "'s login password:")
|
||||
return string(pass), err
|
||||
}))
|
||||
}
|
||||
|
||||
6
vendor/github.com/containers/common/pkg/ssh/connection_native.go
generated
vendored
6
vendor/github.com/containers/common/pkg/ssh/connection_native.go
generated
vendored
@@ -35,7 +35,7 @@ func nativeConnectionCreate(options ConnectionCreateOptions) error {
|
||||
// test connection
|
||||
ssh, err := exec.LookPath("ssh")
|
||||
if err != nil {
|
||||
return fmt.Errorf("no ssh binary found")
|
||||
return err
|
||||
}
|
||||
|
||||
if strings.Contains(uri.Host, "/run") {
|
||||
@@ -109,7 +109,7 @@ func nativeConnectionExec(options ConnectionExecOptions, input io.Reader) (*Conn
|
||||
|
||||
ssh, err := exec.LookPath("ssh")
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("no ssh binary found")
|
||||
return nil, err
|
||||
}
|
||||
|
||||
output := &bytes.Buffer{}
|
||||
@@ -157,7 +157,7 @@ func nativeConnectionScp(options ConnectionScpOptions) (*ConnectionScpReport, er
|
||||
|
||||
scp, err := exec.LookPath("scp")
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("no scp binary found")
|
||||
return nil, err
|
||||
}
|
||||
|
||||
conf, err := config.Default()
|
||||
|
||||
4
vendor/github.com/containers/common/pkg/ssh/ssh.go
generated
vendored
4
vendor/github.com/containers/common/pkg/ssh/ssh.go
generated
vendored
@@ -1,7 +1,7 @@
|
||||
package ssh
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"errors"
|
||||
"io"
|
||||
|
||||
"golang.org/x/crypto/ssh"
|
||||
@@ -18,7 +18,7 @@ func Dial(options *ConnectionDialOptions, kind EngineMode) (*ssh.Client, error)
|
||||
var rep *ConnectionDialReport
|
||||
var err error
|
||||
if kind == NativeMode {
|
||||
return nil, fmt.Errorf("ssh dial failed: you cannot create a dial-able client with native ssh")
|
||||
return nil, errors.New("ssh dial failed: you cannot create a dial-able client with native ssh")
|
||||
}
|
||||
rep, err = golangConnectionDial(*options)
|
||||
if err != nil {
|
||||
|
||||
5
vendor/github.com/containers/common/pkg/ssh/utils.go
generated
vendored
5
vendor/github.com/containers/common/pkg/ssh/utils.go
generated
vendored
@@ -1,6 +1,7 @@
|
||||
package ssh
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"net"
|
||||
@@ -80,7 +81,7 @@ func ReadPassword(prompt string) (pw []byte, err error) {
|
||||
pw = append(pw, b[0])
|
||||
// limit size, so that a wrong input won't fill up the memory
|
||||
if len(pw) > 1024 {
|
||||
err = fmt.Errorf("password too long, 1024 byte limit")
|
||||
err = errors.New("password too long, 1024 byte limit")
|
||||
}
|
||||
}
|
||||
if err != nil {
|
||||
@@ -156,7 +157,7 @@ func ParseScpArgs(options ConnectionScpOptions) (string, string, string, bool, e
|
||||
} else {
|
||||
split = strings.Split(host, ":")
|
||||
if len(split) != 2 {
|
||||
return "", "", "", false, fmt.Errorf("no remote destination provided")
|
||||
return "", "", "", false, errors.New("no remote destination provided")
|
||||
}
|
||||
host = split[0]
|
||||
remotePath = split[1]
|
||||
|
||||
2
vendor/github.com/containers/common/pkg/subscriptions/subscriptions.go
generated
vendored
2
vendor/github.com/containers/common/pkg/subscriptions/subscriptions.go
generated
vendored
@@ -212,7 +212,7 @@ func MountsWithUIDGID(mountLabel, containerRunDir, mountFile, mountPoint string,
|
||||
}
|
||||
|
||||
func rchown(chowndir string, uid, gid int) error {
|
||||
return filepath.Walk(chowndir, func(filePath string, f os.FileInfo, err error) error {
|
||||
return filepath.Walk(chowndir, func(filePath string, _ os.FileInfo, err error) error {
|
||||
return os.Lchown(filePath, uid, gid)
|
||||
})
|
||||
}
|
||||
|
||||
3
vendor/github.com/containers/common/pkg/supplemented/supplemented.go
generated
vendored
3
vendor/github.com/containers/common/pkg/supplemented/supplemented.go
generated
vendored
@@ -3,6 +3,7 @@ package supplemented
|
||||
import (
|
||||
"container/list"
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
@@ -286,7 +287,7 @@ func (s *supplementedImageReference) NewImageSource(ctx context.Context, sys *ty
|
||||
}
|
||||
|
||||
func (s *supplementedImageReference) DeleteImage(_ context.Context, _ *types.SystemContext) error {
|
||||
return fmt.Errorf("deletion of images not implemented")
|
||||
return errors.New("deletion of images not implemented")
|
||||
}
|
||||
|
||||
func (s *supplementedImageSource) Close() error {
|
||||
|
||||
Reference in New Issue
Block a user