mirror of
https://github.com/containers/podman.git
synced 2025-10-19 12:12:36 +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:
84
vendor/github.com/containers/buildah/CHANGELOG.md
generated
vendored
84
vendor/github.com/containers/buildah/CHANGELOG.md
generated
vendored
@ -2,6 +2,90 @@
|
||||
|
||||
# Changelog
|
||||
|
||||
## v1.35.0 (2024-03-06)
|
||||
|
||||
fix(deps): update module github.com/stretchr/testify to v1.9.0
|
||||
cgroups: reuse version check from c/common
|
||||
Update vendor of containers/(common,image)
|
||||
fix(deps): update github.com/containers/storage digest to eadc620
|
||||
fix(deps): update github.com/containers/luksy digest to ceb12d4
|
||||
fix(deps): update github.com/containers/image/v5 digest to cdc6802
|
||||
manifest add: complain if we get artifact flags without --artifact
|
||||
Use retry logic from containers/common
|
||||
Vendor in containers/(storage,image,common)
|
||||
Update module golang.org/x/crypto to v0.20.0
|
||||
Add comment re: Total Success task name
|
||||
tests: skip_if_no_unshare(): check for --setuid
|
||||
Properly handle build --pull=false
|
||||
[skip-ci] Update tim-actions/get-pr-commits action to v1.3.1
|
||||
Update module go.etcd.io/bbolt to v1.3.9
|
||||
Revert "Reduce official image size"
|
||||
Update module github.com/opencontainers/image-spec to v1.1.0
|
||||
Reduce official image size
|
||||
Build with CNI support on FreeBSD
|
||||
build --all-platforms: skip some base "image" platforms
|
||||
Bump main to v1.35.0-dev
|
||||
Vendor in latest containers/(storage,image,common)
|
||||
Split up error messages for missing --sbom related flags
|
||||
`buildah manifest`: add artifact-related options
|
||||
cmd/buildah/manifest.go: lock lists before adding/annotating/pushing
|
||||
cmd/buildah/manifest.go: don't make struct declarations aliases
|
||||
Use golang.org/x/exp/slices.Contains
|
||||
Disable loong64 again
|
||||
Fix a couple of typos in one-line comments
|
||||
egrep is obsolescent; use grep -E
|
||||
Try Cirrus with a newer VM version
|
||||
Set CONTAINERS_CONF in the chroot-mount-flags integration test
|
||||
Update to match dependency API update
|
||||
Update github.com/openshift/imagebuilder and containers/common
|
||||
docs: correct default authfile path
|
||||
fix(deps): update module github.com/containerd/containerd to v1.7.13
|
||||
tests: retrofit test for heredoc summary
|
||||
build, heredoc: show heredoc summary in build output
|
||||
manifest, push: add support for --retry and --retry-delay
|
||||
fix(deps): update github.com/openshift/imagebuilder digest to b767bc3
|
||||
imagebuildah: fix crash with empty RUN
|
||||
fix(deps): update github.com/containers/luksy digest to b62d551
|
||||
fix(deps): update module github.com/opencontainers/runc to v1.1.12 [security]
|
||||
fix(deps): update module github.com/moby/buildkit to v0.12.5 [security]
|
||||
Make buildah match podman for handling of ulimits
|
||||
docs: move footnotes to where they're applicable
|
||||
Allow users to specify no-dereference
|
||||
Run codespell on code
|
||||
Fix FreeBSD version parsing
|
||||
Fix a build break on FreeBSD
|
||||
Remove a bad FROM line
|
||||
fix(deps): update module github.com/onsi/gomega to v1.31.1
|
||||
fix(deps): update module github.com/opencontainers/image-spec to v1.1.0-rc6
|
||||
docs: use reversed logo for dark theme in README
|
||||
build,commit: add --sbom to scan and produce SBOMs when committing
|
||||
commit: force omitHistory if the parent has layers but no history
|
||||
docs: fix a couple of typos
|
||||
internal/mkcw.Archive(): handle extra image content
|
||||
stage_executor,heredoc: honor interpreter in heredoc
|
||||
stage_executor,layers: burst cache if heredoc content is changed
|
||||
fix(deps): update module golang.org/x/crypto to v0.18.0
|
||||
Replace map[K]bool with map[K]struct{} where it makes sense
|
||||
fix(deps): update module golang.org/x/sync to v0.6.0
|
||||
fix(deps): update module golang.org/x/term to v0.16.0
|
||||
Bump CI VMs
|
||||
Replace strings.SplitN with strings.Cut
|
||||
fix(deps): update github.com/containers/storage digest to ef81e9b
|
||||
fix(deps): update github.com/containers/image/v5 digest to 1b221d4
|
||||
fix(deps): update module github.com/fsouza/go-dockerclient to v1.10.1
|
||||
Document use of containers-transports values in buildah
|
||||
fix(deps): update module golang.org/x/crypto to v0.17.0 [security]
|
||||
chore(deps): update dependency containers/automation_images to v20231208
|
||||
manifest: addCompression use default from containers.conf
|
||||
commit: add a --add-file flag
|
||||
mkcw: populate the rootfs using an overlay
|
||||
chore(deps): update dependency containers/automation_images to v20230517
|
||||
[skip-ci] Update actions/stale action to v9
|
||||
fix(deps): update module github.com/containernetworking/plugins to v1.4.0
|
||||
fix(deps): update github.com/containers/image/v5 digest to 7a40fee
|
||||
Bump to v1.34.1-dev
|
||||
Ignore errors if label.Relabel returns ENOSUP
|
||||
|
||||
## v1.34.0 (2023-12-11)
|
||||
|
||||
vendor: update c/{common,image,storage}
|
||||
|
3
vendor/github.com/containers/buildah/Makefile
generated
vendored
3
vendor/github.com/containers/buildah/Makefile
generated
vendored
@ -14,6 +14,8 @@ BINDIR := $(PREFIX)/bin
|
||||
BASHINSTALLDIR = $(PREFIX)/share/bash-completion/completions
|
||||
BUILDFLAGS := -tags "$(BUILDTAGS)"
|
||||
BUILDAH := buildah
|
||||
SELINUXOPT ?= $(shell test -x /usr/sbin/selinuxenabled && selinuxenabled && echo -Z)
|
||||
SELINUXTYPE=container_runtime_exec_t
|
||||
|
||||
GO := go
|
||||
GO_LDFLAGS := $(shell if $(GO) version|grep -q gccgo; then echo "-gccgoflags"; else echo "-ldflags"; fi)
|
||||
@ -75,6 +77,7 @@ static:
|
||||
|
||||
bin/buildah: $(SOURCES) cmd/buildah/*.go internal/mkcw/embed/entrypoint_amd64.gz
|
||||
$(GO_BUILD) $(BUILDAH_LDFLAGS) $(GO_GCFLAGS) "$(GOGCFLAGS)" -o $@ $(BUILDFLAGS) ./cmd/buildah
|
||||
test -z "${SELINUXOPT}" || chcon --verbose -t $(SELINUXTYPE) $@
|
||||
|
||||
ifneq ($(shell as --version | grep x86_64),)
|
||||
internal/mkcw/embed/entrypoint_amd64.gz: internal/mkcw/embed/entrypoint_amd64
|
||||
|
83
vendor/github.com/containers/buildah/changelog.txt
generated
vendored
83
vendor/github.com/containers/buildah/changelog.txt
generated
vendored
@ -1,3 +1,86 @@
|
||||
- Changelog for v1.35.0 (2024-03-06)
|
||||
* fix(deps): update module github.com/stretchr/testify to v1.9.0
|
||||
* cgroups: reuse version check from c/common
|
||||
* Update vendor of containers/(common,image)
|
||||
* fix(deps): update github.com/containers/storage digest to eadc620
|
||||
* fix(deps): update github.com/containers/luksy digest to ceb12d4
|
||||
* fix(deps): update github.com/containers/image/v5 digest to cdc6802
|
||||
* manifest add: complain if we get artifact flags without --artifact
|
||||
* Use retry logic from containers/common
|
||||
* Vendor in containers/(storage,image,common)
|
||||
* Update module golang.org/x/crypto to v0.20.0
|
||||
* Add comment re: Total Success task name
|
||||
* tests: skip_if_no_unshare(): check for --setuid
|
||||
* Properly handle build --pull=false
|
||||
* [skip-ci] Update tim-actions/get-pr-commits action to v1.3.1
|
||||
* Update module go.etcd.io/bbolt to v1.3.9
|
||||
* Revert "Reduce official image size"
|
||||
* Update module github.com/opencontainers/image-spec to v1.1.0
|
||||
* Reduce official image size
|
||||
* Build with CNI support on FreeBSD
|
||||
* build --all-platforms: skip some base "image" platforms
|
||||
* Bump main to v1.35.0-dev
|
||||
* Vendor in latest containers/(storage,image,common)
|
||||
* Split up error messages for missing --sbom related flags
|
||||
* `buildah manifest`: add artifact-related options
|
||||
* cmd/buildah/manifest.go: lock lists before adding/annotating/pushing
|
||||
* cmd/buildah/manifest.go: don't make struct declarations aliases
|
||||
* Use golang.org/x/exp/slices.Contains
|
||||
* Disable loong64 again
|
||||
* Fix a couple of typos in one-line comments
|
||||
* egrep is obsolescent; use grep -E
|
||||
* Try Cirrus with a newer VM version
|
||||
* Set CONTAINERS_CONF in the chroot-mount-flags integration test
|
||||
* Update to match dependency API update
|
||||
* Update github.com/openshift/imagebuilder and containers/common
|
||||
* docs: correct default authfile path
|
||||
* fix(deps): update module github.com/containerd/containerd to v1.7.13
|
||||
* tests: retrofit test for heredoc summary
|
||||
* build, heredoc: show heredoc summary in build output
|
||||
* manifest, push: add support for --retry and --retry-delay
|
||||
* fix(deps): update github.com/openshift/imagebuilder digest to b767bc3
|
||||
* imagebuildah: fix crash with empty RUN
|
||||
* fix(deps): update github.com/containers/luksy digest to b62d551
|
||||
* fix(deps): update module github.com/opencontainers/runc to v1.1.12 [security]
|
||||
* fix(deps): update module github.com/moby/buildkit to v0.12.5 [security]
|
||||
* Make buildah match podman for handling of ulimits
|
||||
* docs: move footnotes to where they're applicable
|
||||
* Allow users to specify no-dereference
|
||||
* Run codespell on code
|
||||
* Fix FreeBSD version parsing
|
||||
* Fix a build break on FreeBSD
|
||||
* Remove a bad FROM line
|
||||
* fix(deps): update module github.com/onsi/gomega to v1.31.1
|
||||
* fix(deps): update module github.com/opencontainers/image-spec to v1.1.0-rc6
|
||||
* docs: use reversed logo for dark theme in README
|
||||
* build,commit: add --sbom to scan and produce SBOMs when committing
|
||||
* commit: force omitHistory if the parent has layers but no history
|
||||
* docs: fix a couple of typos
|
||||
* internal/mkcw.Archive(): handle extra image content
|
||||
* stage_executor,heredoc: honor interpreter in heredoc
|
||||
* stage_executor,layers: burst cache if heredoc content is changed
|
||||
* fix(deps): update module golang.org/x/crypto to v0.18.0
|
||||
* Replace map[K]bool with map[K]struct{} where it makes sense
|
||||
* fix(deps): update module golang.org/x/sync to v0.6.0
|
||||
* fix(deps): update module golang.org/x/term to v0.16.0
|
||||
* Bump CI VMs
|
||||
* Replace strings.SplitN with strings.Cut
|
||||
* fix(deps): update github.com/containers/storage digest to ef81e9b
|
||||
* fix(deps): update github.com/containers/image/v5 digest to 1b221d4
|
||||
* fix(deps): update module github.com/fsouza/go-dockerclient to v1.10.1
|
||||
* Document use of containers-transports values in buildah
|
||||
* fix(deps): update module golang.org/x/crypto to v0.17.0 [security]
|
||||
* chore(deps): update dependency containers/automation_images to v20231208
|
||||
* manifest: addCompression use default from containers.conf
|
||||
* commit: add a --add-file flag
|
||||
* mkcw: populate the rootfs using an overlay
|
||||
* chore(deps): update dependency containers/automation_images to v20230517
|
||||
* [skip-ci] Update actions/stale action to v9
|
||||
* fix(deps): update module github.com/containernetworking/plugins to v1.4.0
|
||||
* fix(deps): update github.com/containers/image/v5 digest to 7a40fee
|
||||
* Bump to v1.34.1-dev
|
||||
* Ignore errors if label.Relabel returns ENOSUP
|
||||
|
||||
- Changelog for v1.34.0 (2023-12-11)
|
||||
* vendor: update c/{common,image,storage}
|
||||
* run: Allow using just one jail per container on FreeBSD
|
||||
|
2
vendor/github.com/containers/buildah/define/types.go
generated
vendored
2
vendor/github.com/containers/buildah/define/types.go
generated
vendored
@ -29,7 +29,7 @@ const (
|
||||
// identify working containers.
|
||||
Package = "buildah"
|
||||
// Version for the Package. Also used by .packit.sh for Packit builds.
|
||||
Version = "1.35.0-dev"
|
||||
Version = "1.35.0"
|
||||
|
||||
// DefaultRuntime if containers.conf fails.
|
||||
DefaultRuntime = "runc"
|
||||
|
3
vendor/github.com/containers/buildah/info.go
generated
vendored
3
vendor/github.com/containers/buildah/info.go
generated
vendored
@ -12,6 +12,7 @@ import (
|
||||
internalUtil "github.com/containers/buildah/internal/util"
|
||||
putil "github.com/containers/buildah/pkg/util"
|
||||
"github.com/containers/buildah/util"
|
||||
"github.com/containers/common/pkg/cgroups"
|
||||
"github.com/containers/storage"
|
||||
"github.com/containers/storage/pkg/system"
|
||||
"github.com/containers/storage/pkg/unshare"
|
||||
@ -50,7 +51,7 @@ func hostInfo() map[string]interface{} {
|
||||
info["cpus"] = runtime.NumCPU()
|
||||
info["rootless"] = unshare.IsRootless()
|
||||
|
||||
unified, err := util.IsCgroup2UnifiedMode()
|
||||
unified, err := cgroups.IsCgroup2UnifiedMode()
|
||||
if err != nil {
|
||||
logrus.Error(err, "err reading cgroups mode")
|
||||
}
|
||||
|
7
vendor/github.com/containers/buildah/util/util.go
generated
vendored
7
vendor/github.com/containers/buildah/util/util.go
generated
vendored
@ -9,7 +9,6 @@ import (
|
||||
"path/filepath"
|
||||
"sort"
|
||||
"strings"
|
||||
"sync"
|
||||
"syscall"
|
||||
|
||||
"github.com/containers/buildah/define"
|
||||
@ -376,12 +375,6 @@ func TruncateString(str string, to int) string {
|
||||
return newStr
|
||||
}
|
||||
|
||||
var (
|
||||
isUnifiedOnce sync.Once
|
||||
isUnified bool
|
||||
isUnifiedErr error
|
||||
)
|
||||
|
||||
// fileExistsAndNotADir - Check to see if a file exists
|
||||
// and that it is not a directory.
|
||||
func fileExistsAndNotADir(path string) (bool, error) {
|
||||
|
20
vendor/github.com/containers/buildah/util/util_linux.go
generated
vendored
20
vendor/github.com/containers/buildah/util/util_linux.go
generated
vendored
@ -1,20 +0,0 @@
|
||||
package util
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
// IsCgroup2UnifiedMode returns whether we are running in cgroup 2 cgroup2 mode.
|
||||
func IsCgroup2UnifiedMode() (bool, error) {
|
||||
isUnifiedOnce.Do(func() {
|
||||
var st syscall.Statfs_t
|
||||
if err := syscall.Statfs("/sys/fs/cgroup", &st); err != nil {
|
||||
isUnified, isUnifiedErr = false, err
|
||||
} else {
|
||||
isUnified, isUnifiedErr = st.Type == unix.CGROUP2_SUPER_MAGIC, nil
|
||||
}
|
||||
})
|
||||
return isUnified, isUnifiedErr
|
||||
}
|
4
vendor/github.com/containers/common/libimage/copier.go
generated
vendored
4
vendor/github.com/containers/common/libimage/copier.go
generated
vendored
@ -432,12 +432,12 @@ func (c *copier) copy(ctx context.Context, source, destination types.ImageRefere
|
||||
// Sanity checks for Buildah.
|
||||
if sourceInsecure != nil && *sourceInsecure {
|
||||
if c.systemContext.DockerInsecureSkipTLSVerify == types.OptionalBoolFalse {
|
||||
return nil, fmt.Errorf("can't require tls verification on an insecured registry")
|
||||
return nil, errors.New("can't require tls verification on an insecured registry")
|
||||
}
|
||||
}
|
||||
if destinationInsecure != nil && *destinationInsecure {
|
||||
if c.systemContext.DockerInsecureSkipTLSVerify == types.OptionalBoolFalse {
|
||||
return nil, fmt.Errorf("can't require tls verification on an insecured registry")
|
||||
return nil, errors.New("can't require tls verification on an insecured registry")
|
||||
}
|
||||
}
|
||||
|
||||
|
3
vendor/github.com/containers/common/libimage/filters.go
generated
vendored
3
vendor/github.com/containers/common/libimage/filters.go
generated
vendored
@ -4,6 +4,7 @@ package libimage
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"path"
|
||||
"strconv"
|
||||
@ -226,7 +227,7 @@ func (r *Runtime) containers(duplicate map[string]string, key, value string, ext
|
||||
case "false", "true":
|
||||
case "external":
|
||||
if externalFunc == nil {
|
||||
return fmt.Errorf("libimage error: external containers filter without callback")
|
||||
return errors.New("libimage error: external containers filter without callback")
|
||||
}
|
||||
default:
|
||||
return fmt.Errorf("unsupported value %q for containers filter", value)
|
||||
|
3
vendor/github.com/containers/common/libimage/load.go
generated
vendored
3
vendor/github.com/containers/common/libimage/load.go
generated
vendored
@ -4,6 +4,7 @@ package libimage
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
"time"
|
||||
@ -91,7 +92,7 @@ func (r *Runtime) Load(ctx context.Context, path string, options *LoadOptions) (
|
||||
// Give a decent error message if nothing above worked.
|
||||
// we want the colon here for the multiline error
|
||||
//nolint:revive
|
||||
loadError := fmt.Errorf("payload does not match any of the supported image formats:")
|
||||
loadError := errors.New("payload does not match any of the supported image formats:")
|
||||
for _, err := range loadErrors {
|
||||
loadError = fmt.Errorf("%v\n * %v", loadError, err)
|
||||
}
|
||||
|
2
vendor/github.com/containers/common/libimage/manifests/manifests.go
generated
vendored
2
vendor/github.com/containers/common/libimage/manifests/manifests.go
generated
vendored
@ -834,7 +834,7 @@ func (l *list) AddArtifact(ctx context.Context, sys *types.SystemContext, option
|
||||
if configDescriptor.Size != 0 {
|
||||
if len(configDescriptor.Data) == 0 {
|
||||
if options.ConfigFile == "" {
|
||||
return "", fmt.Errorf("needed config data file, but none was provided")
|
||||
return "", errors.New("needed config data file, but none was provided")
|
||||
}
|
||||
filePath, err := filepath.Abs(options.ConfigFile)
|
||||
if err != nil {
|
||||
|
4
vendor/github.com/containers/common/libimage/pull.go
generated
vendored
4
vendor/github.com/containers/common/libimage/pull.go
generated
vendored
@ -426,7 +426,7 @@ func (r *Runtime) copyFromRegistry(ctx context.Context, ref types.ImageReference
|
||||
for _, tag := range tags {
|
||||
select { // Let's be gentle with Podman remote.
|
||||
case <-ctx.Done():
|
||||
return nil, fmt.Errorf("pulling cancelled")
|
||||
return nil, errors.New("pulling cancelled")
|
||||
default:
|
||||
// We can continue.
|
||||
}
|
||||
@ -466,7 +466,7 @@ func (r *Runtime) imagesIDsForManifest(manifestBytes []byte, sys *types.SystemCo
|
||||
} else {
|
||||
d, err := manifest.Digest(manifestBytes)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("digesting manifest")
|
||||
return nil, errors.New("digesting manifest")
|
||||
}
|
||||
imageDigest = d
|
||||
}
|
||||
|
2
vendor/github.com/containers/common/libimage/runtime.go
generated
vendored
2
vendor/github.com/containers/common/libimage/runtime.go
generated
vendored
@ -690,7 +690,7 @@ func (r *Runtime) RemoveImages(ctx context.Context, names []string, options *Rem
|
||||
}
|
||||
|
||||
if options.ExternalContainers && options.IsExternalContainerFunc == nil {
|
||||
return nil, []error{fmt.Errorf("libimage error: cannot remove external containers without callback")}
|
||||
return nil, []error{errors.New("libimage error: cannot remove external containers without callback")}
|
||||
}
|
||||
|
||||
// The logic here may require some explanation. Image removal is
|
||||
|
2
vendor/github.com/containers/common/libimage/save.go
generated
vendored
2
vendor/github.com/containers/common/libimage/save.go
generated
vendored
@ -53,7 +53,7 @@ func (r *Runtime) Save(ctx context.Context, names []string, format, path string,
|
||||
return fmt.Errorf("unsupported format %q for saving multiple images (only docker-archive)", format)
|
||||
}
|
||||
if len(options.AdditionalTags) > 0 {
|
||||
return fmt.Errorf("cannot save multiple images with multiple tags")
|
||||
return errors.New("cannot save multiple images with multiple tags")
|
||||
}
|
||||
}
|
||||
|
||||
|
8
vendor/github.com/containers/common/libnetwork/internal/util/validate.go
generated
vendored
8
vendor/github.com/containers/common/libnetwork/internal/util/validate.go
generated
vendored
@ -93,15 +93,15 @@ func ValidateRoutes(routes []types.Route) error {
|
||||
|
||||
func ValidateRoute(route types.Route) error {
|
||||
if route.Destination.IP == nil {
|
||||
return fmt.Errorf("route destination ip nil")
|
||||
return errors.New("route destination ip nil")
|
||||
}
|
||||
|
||||
if route.Destination.Mask == nil {
|
||||
return fmt.Errorf("route destination mask nil")
|
||||
return errors.New("route destination mask nil")
|
||||
}
|
||||
|
||||
if route.Gateway == nil {
|
||||
return fmt.Errorf("route gateway nil")
|
||||
return errors.New("route gateway nil")
|
||||
}
|
||||
|
||||
// Reparse to ensure destination is valid.
|
||||
@ -112,7 +112,7 @@ func ValidateRoute(route types.Route) error {
|
||||
|
||||
// check that destination is a network and not an address
|
||||
if !ip.Equal(ipNet.IP) {
|
||||
return fmt.Errorf("route destination invalid")
|
||||
return errors.New("route destination invalid")
|
||||
}
|
||||
|
||||
return nil
|
||||
|
2
vendor/github.com/containers/common/libnetwork/netavark/config.go
generated
vendored
2
vendor/github.com/containers/common/libnetwork/netavark/config.go
generated
vendored
@ -309,7 +309,7 @@ func createIpvlanOrMacvlan(network *types.Network) error {
|
||||
return errIpvlanNoDHCP
|
||||
}
|
||||
if len(network.Subnets) > 0 {
|
||||
return fmt.Errorf("ipam driver dhcp set but subnets are set")
|
||||
return errors.New("ipam driver dhcp set but subnets are set")
|
||||
}
|
||||
}
|
||||
|
||||
|
2
vendor/github.com/containers/common/libnetwork/pasta/pasta.go
generated
vendored
2
vendor/github.com/containers/common/libnetwork/pasta/pasta.go
generated
vendored
@ -63,7 +63,7 @@ func Setup(opts *SetupOptions) error {
|
||||
var addr string
|
||||
|
||||
if i.HostIP != "" {
|
||||
addr = fmt.Sprintf("%s/", i.HostIP)
|
||||
addr = i.HostIP + "/"
|
||||
}
|
||||
|
||||
switch protocol {
|
||||
|
22
vendor/github.com/containers/common/libnetwork/slirp4netns/slirp4netns.go
generated
vendored
22
vendor/github.com/containers/common/libnetwork/slirp4netns/slirp4netns.go
generated
vendored
@ -210,7 +210,7 @@ func createBasicSlirpCmdArgs(options *networkOptions, features *slirpFeatures) (
|
||||
cmdArgs = append(cmdArgs, "--disable-host-loopback")
|
||||
}
|
||||
if options.mtu > -1 && features.HasMTU {
|
||||
cmdArgs = append(cmdArgs, fmt.Sprintf("--mtu=%d", options.mtu))
|
||||
cmdArgs = append(cmdArgs, "--mtu="+strconv.Itoa(options.mtu))
|
||||
}
|
||||
if !options.noPivotRoot && features.HasEnableSandbox {
|
||||
cmdArgs = append(cmdArgs, "--enable-sandbox")
|
||||
@ -221,33 +221,33 @@ func createBasicSlirpCmdArgs(options *networkOptions, features *slirpFeatures) (
|
||||
|
||||
if options.cidr != "" {
|
||||
if !features.HasCIDR {
|
||||
return nil, fmt.Errorf("cidr not supported")
|
||||
return nil, errors.New("cidr not supported")
|
||||
}
|
||||
cmdArgs = append(cmdArgs, fmt.Sprintf("--cidr=%s", options.cidr))
|
||||
cmdArgs = append(cmdArgs, "--cidr="+options.cidr)
|
||||
}
|
||||
|
||||
if options.enableIPv6 {
|
||||
if !features.HasIPv6 {
|
||||
return nil, fmt.Errorf("enable_ipv6 not supported")
|
||||
return nil, errors.New("enable_ipv6 not supported")
|
||||
}
|
||||
cmdArgs = append(cmdArgs, "--enable-ipv6")
|
||||
}
|
||||
|
||||
if options.outboundAddr != "" {
|
||||
if !features.HasOutboundAddr {
|
||||
return nil, fmt.Errorf("outbound_addr not supported")
|
||||
return nil, errors.New("outbound_addr not supported")
|
||||
}
|
||||
cmdArgs = append(cmdArgs, fmt.Sprintf("--outbound-addr=%s", options.outboundAddr))
|
||||
cmdArgs = append(cmdArgs, "--outbound-addr="+options.outboundAddr)
|
||||
}
|
||||
|
||||
if options.outboundAddr6 != "" {
|
||||
if !features.HasOutboundAddr || !features.HasIPv6 {
|
||||
return nil, fmt.Errorf("outbound_addr6 not supported")
|
||||
return nil, errors.New("outbound_addr6 not supported")
|
||||
}
|
||||
if !options.enableIPv6 {
|
||||
return nil, fmt.Errorf("enable_ipv6=true is required for outbound_addr6")
|
||||
return nil, errors.New("enable_ipv6=true is required for outbound_addr6")
|
||||
}
|
||||
cmdArgs = append(cmdArgs, fmt.Sprintf("--outbound-addr6=%s", options.outboundAddr6))
|
||||
cmdArgs = append(cmdArgs, "--outbound-addr6="+options.outboundAddr6)
|
||||
}
|
||||
|
||||
return cmdArgs, nil
|
||||
@ -300,7 +300,7 @@ func Setup(opts *SetupOptions) (*SetupResult, error) {
|
||||
|
||||
var apiSocket string
|
||||
if havePortMapping && netOptions.isSlirpHostForward {
|
||||
apiSocket = filepath.Join(opts.Config.Engine.TmpDir, fmt.Sprintf("%s.net", opts.ContainerID))
|
||||
apiSocket = filepath.Join(opts.Config.Engine.TmpDir, opts.ContainerID+".net")
|
||||
cmdArgs = append(cmdArgs, "--api-socket", apiSocket)
|
||||
}
|
||||
|
||||
@ -610,7 +610,7 @@ func SetupRootlessPortMappingViaRLK(opts *SetupOptions, slirpSubnet *net.IPNet,
|
||||
if stdoutStr != "" {
|
||||
// err contains full debug log and too verbose, so return stdoutStr
|
||||
logrus.Debug(err)
|
||||
return fmt.Errorf("rootlessport " + strings.TrimSuffix(stdoutStr, "\n"))
|
||||
return errors.New("rootlessport " + strings.TrimSuffix(stdoutStr, "\n"))
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
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 {
|
||||
|
2
vendor/github.com/containers/common/version/version.go
generated
vendored
2
vendor/github.com/containers/common/version/version.go
generated
vendored
@ -1,4 +1,4 @@
|
||||
package version
|
||||
|
||||
// Version is the version of the build.
|
||||
const Version = "0.58.0-dev"
|
||||
const Version = "0.58.0"
|
||||
|
2
vendor/github.com/containers/image/v5/version/version.go
generated
vendored
2
vendor/github.com/containers/image/v5/version/version.go
generated
vendored
@ -11,7 +11,7 @@ const (
|
||||
VersionPatch = 0
|
||||
|
||||
// VersionDev indicates development branch. Releases will be empty string.
|
||||
VersionDev = "-dev"
|
||||
VersionDev = ""
|
||||
)
|
||||
|
||||
// Version is the specification version that the package types support.
|
||||
|
Reference in New Issue
Block a user