aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.cirrus.yml215
-rw-r--r--.github/ISSUE_TEMPLATE.md2
-rw-r--r--CONTRIBUTING.md2
-rw-r--r--cmd/podman/containers/restore.go28
-rw-r--r--cmd/podman/containers/run.go29
-rw-r--r--cmd/podman/pods/logs.go7
-rw-r--r--cmd/podman/system/service_abi.go2
-rw-r--r--cmd/podman/utils/utils.go40
-rw-r--r--contrib/cirrus/CIModes.md14
-rwxr-xr-xcontrib/cirrus/check_go_changes.sh16
-rwxr-xr-xcontrib/cirrus/ext_svc_check.sh47
-rwxr-xr-xcontrib/cirrus/postbuild.sh30
-rwxr-xr-xcontrib/cirrus/prebuild.sh77
-rwxr-xr-xcontrib/cirrus/runner.sh27
-rwxr-xr-xcontrib/cirrus/setup_environment.sh6
-rwxr-xr-xcontrib/cirrus/shellcheck.sh16
-rw-r--r--contrib/podmanimage/README.md13
-rw-r--r--docs/source/markdown/.gitignore2
-rw-r--r--docs/source/markdown/options/compression-format.md3
-rw-r--r--docs/source/markdown/options/features.md4
-rw-r--r--docs/source/markdown/options/log-opt.md16
-rw-r--r--docs/source/markdown/options/network.md32
-rw-r--r--docs/source/markdown/options/pod.run.md5
-rw-r--r--docs/source/markdown/options/sign-passphrase-file.md3
-rw-r--r--docs/source/markdown/options/time.md3
-rw-r--r--docs/source/markdown/options/variant.container.md3
-rw-r--r--docs/source/markdown/options/variant.manifest.md5
-rw-r--r--docs/source/markdown/podman-create.1.md.in62
-rw-r--r--docs/source/markdown/podman-kube-play.1.md.in50
-rw-r--r--docs/source/markdown/podman-manifest-add.1.md.in11
-rw-r--r--docs/source/markdown/podman-manifest-annotate.1.md.in (renamed from docs/source/markdown/podman-manifest-annotate.1.md)11
-rw-r--r--docs/source/markdown/podman-manifest-push.1.md.in8
-rw-r--r--docs/source/markdown/podman-pod-create.1.md.in35
-rw-r--r--docs/source/markdown/podman-pod-rm.1.md.in4
-rw-r--r--docs/source/markdown/podman-pod-stop.1.md.in4
-rw-r--r--docs/source/markdown/podman-pull.1.md.in4
-rw-r--r--docs/source/markdown/podman-push.1.md.in8
-rw-r--r--docs/source/markdown/podman-restart.1.md.in (renamed from docs/source/markdown/podman-restart.1.md)4
-rw-r--r--docs/source/markdown/podman-rm.1.md.in4
-rw-r--r--docs/source/markdown/podman-run.1.md.in63
-rw-r--r--docs/source/markdown/podman-stop.1.md.in4
-rw-r--r--go.mod30
-rw-r--r--go.sum127
-rw-r--r--libpod/container_inspect.go9
-rw-r--r--libpod/define/container_inspect.go1
-rw-r--r--libpod/networking_linux.go16
-rw-r--r--pkg/api/handlers/compat/images.go2
-rw-r--r--pkg/api/handlers/libpod/containers.go2
-rw-r--r--pkg/api/handlers/libpod/manifests.go4
-rw-r--r--pkg/api/server/register_containers.go4
-rw-r--r--pkg/bindings/manifests/manifests.go6
-rw-r--r--pkg/bindings/manifests/types.go14
-rw-r--r--pkg/bindings/manifests/types_add_options.go6
-rw-r--r--pkg/bindings/manifests/types_modify_options.go6
-rw-r--r--pkg/domain/entities/manifest.go2
-rw-r--r--pkg/domain/infra/abi/containers.go81
-rw-r--r--pkg/domain/infra/abi/network.go2
-rw-r--r--pkg/domain/infra/abi/play.go25
-rw-r--r--pkg/domain/infra/tunnel/manifest.go18
-rw-r--r--pkg/specgen/generate/kube/volume.go6
-rw-r--r--test/e2e/checkpoint_image_test.go48
-rw-r--r--test/e2e/checkpoint_test.go4
-rw-r--r--test/e2e/kill_test.go2
-rw-r--r--test/e2e/logs_test.go73
-rw-r--r--test/e2e/manifest_test.go14
-rw-r--r--test/e2e/network_test.go4
-rw-r--r--test/e2e/play_kube_test.go45
-rw-r--r--test/e2e/prune_test.go6
-rw-r--r--test/e2e/restart_test.go2
-rw-r--r--test/system/030-run.bats21
-rw-r--r--test/system/251-system-service.bats8
-rw-r--r--test/system/700-play.bats10
-rw-r--r--vendor/github.com/containers/buildah/CHANGELOG.md71
-rw-r--r--vendor/github.com/containers/buildah/Makefile4
-rw-r--r--vendor/github.com/containers/buildah/changelog.txt70
-rw-r--r--vendor/github.com/containers/buildah/config.go13
-rw-r--r--vendor/github.com/containers/buildah/copier/copier.go4
-rw-r--r--vendor/github.com/containers/buildah/define/types.go2
-rw-r--r--vendor/github.com/containers/buildah/imagebuildah/build.go19
-rw-r--r--vendor/github.com/containers/buildah/imagebuildah/stage_executor.go2
-rw-r--r--vendor/github.com/containers/buildah/info.go4
-rw-r--r--vendor/github.com/containers/buildah/internal/util/util.go17
-rw-r--r--vendor/github.com/containers/buildah/release.sh26
-rw-r--r--vendor/github.com/containers/buildah/run_linux.go40
-rw-r--r--vendor/github.com/containers/common/libimage/platform.go16
-rw-r--r--vendor/github.com/containers/common/pkg/config/default.go13
-rw-r--r--vendor/github.com/containers/common/pkg/util/util_supported.go6
-rw-r--r--vendor/github.com/containers/common/version/version.go2
-rw-r--r--vendor/github.com/containers/image/v5/version/version.go6
-rw-r--r--vendor/github.com/containers/storage/VERSION2
-rw-r--r--vendor/github.com/containers/storage/drivers/driver_linux.go8
-rw-r--r--vendor/github.com/containers/storage/layers.go4
-rw-r--r--vendor/github.com/containers/storage/pkg/archive/archive.go3
-rw-r--r--vendor/github.com/containers/storage/pkg/archive/archive_freebsd.go23
-rw-r--r--vendor/github.com/containers/storage/pkg/archive/archive_unix.go13
-rw-r--r--vendor/github.com/containers/storage/pkg/archive/archive_windows.go5
-rw-r--r--vendor/github.com/containers/storage/pkg/homedir/homedir_unix.go3
-rw-r--r--vendor/github.com/containers/storage/pkg/system/mknod.go5
-rw-r--r--vendor/github.com/containers/storage/pkg/system/mknod_freebsd.go5
-rw-r--r--vendor/github.com/containers/storage/pkg/system/rm.go3
-rw-r--r--vendor/github.com/containers/storage/pkg/system/rm_common.go10
-rw-r--r--vendor/github.com/containers/storage/pkg/system/rm_freebsd.go32
-rw-r--r--vendor/github.com/containers/storage/types/options.go55
-rw-r--r--vendor/github.com/docker/docker-credential-helpers/credentials/credentials.go8
-rw-r--r--vendor/github.com/docker/docker-credential-helpers/credentials/version.go16
-rw-r--r--vendor/github.com/klauspost/compress/README.md18
-rw-r--r--vendor/github.com/klauspost/compress/flate/deflate.go6
-rw-r--r--vendor/github.com/klauspost/compress/flate/fast_encoder.go56
-rw-r--r--vendor/github.com/klauspost/compress/flate/level1.go27
-rw-r--r--vendor/github.com/klauspost/compress/flate/level2.go35
-rw-r--r--vendor/github.com/klauspost/compress/flate/level3.go41
-rw-r--r--vendor/github.com/klauspost/compress/flate/level4.go11
-rw-r--r--vendor/github.com/klauspost/compress/flate/level5.go13
-rw-r--r--vendor/github.com/klauspost/compress/flate/level6.go9
-rw-r--r--vendor/github.com/klauspost/compress/zstd/decoder.go21
-rw-r--r--vendor/github.com/klauspost/compress/zstd/decoder_options.go34
-rw-r--r--vendor/github.com/klauspost/compress/zstd/enc_best.go1
-rw-r--r--vendor/github.com/klauspost/compress/zstd/framedec.go4
-rw-r--r--vendor/github.com/klauspost/compress/zstd/fse_decoder_amd64.go3
-rw-r--r--vendor/github.com/klauspost/compress/zstd/history.go21
-rw-r--r--vendor/github.com/klauspost/compress/zstd/seqdec.go22
-rw-r--r--vendor/github.com/klauspost/compress/zstd/seqdec_amd64.go7
-rw-r--r--vendor/github.com/klauspost/compress/zstd/seqdec_generic.go4
-rw-r--r--vendor/github.com/klauspost/pgzip/.travis.yml4
-rw-r--r--vendor/github.com/klauspost/pgzip/LICENSE3
-rw-r--r--vendor/github.com/klauspost/pgzip/README.md13
-rw-r--r--vendor/github.com/klauspost/pgzip/gunzip.go13
-rw-r--r--vendor/github.com/opencontainers/image-spec/specs-go/v1/annotations.go9
-rw-r--r--vendor/github.com/opencontainers/image-spec/specs-go/v1/artifact.go34
-rw-r--r--vendor/github.com/opencontainers/image-spec/specs-go/v1/descriptor.go10
-rw-r--r--vendor/github.com/opencontainers/image-spec/specs-go/v1/manifest.go5
-rw-r--r--vendor/github.com/opencontainers/image-spec/specs-go/v1/mediatype.go3
-rw-r--r--vendor/github.com/opencontainers/image-spec/specs-go/version.go6
-rw-r--r--vendor/github.com/opencontainers/selinux/go-selinux/doc.go1
-rw-r--r--vendor/github.com/opencontainers/selinux/go-selinux/label/label_linux.go46
-rw-r--r--vendor/github.com/opencontainers/selinux/go-selinux/label/label_stub.go1
-rw-r--r--vendor/github.com/opencontainers/selinux/go-selinux/rchcon.go12
-rw-r--r--vendor/github.com/opencontainers/selinux/go-selinux/rchcon_go115.go1
-rw-r--r--vendor/github.com/opencontainers/selinux/go-selinux/selinux_linux.go80
-rw-r--r--vendor/github.com/opencontainers/selinux/go-selinux/selinux_stub.go1
-rw-r--r--vendor/github.com/sigstore/sigstore/pkg/cryptoutils/certificate.go4
-rw-r--r--vendor/github.com/sigstore/sigstore/pkg/cryptoutils/doc.go17
-rw-r--r--vendor/github.com/sigstore/sigstore/pkg/signature/options/context.go2
-rw-r--r--vendor/github.com/sigstore/sigstore/pkg/signature/options/doc.go17
-rw-r--r--vendor/github.com/sigstore/sigstore/pkg/signature/payload/doc.go17
-rw-r--r--vendor/github.com/sigstore/sigstore/pkg/signature/payload/payload.go2
-rw-r--r--vendor/github.com/sylabs/sif/v2/pkg/sif/descriptor.go21
-rw-r--r--vendor/github.com/sylabs/sif/v2/pkg/sif/descriptor_input.go20
-rw-r--r--vendor/github.com/sylabs/sif/v2/pkg/sif/sif.go41
-rw-r--r--vendor/golang.org/x/crypto/openpgp/packet/opaque.go3
-rw-r--r--vendor/golang.org/x/crypto/openpgp/packet/private_key.go3
-rw-r--r--vendor/golang.org/x/crypto/openpgp/packet/symmetrically_encrypted.go2
-rw-r--r--vendor/golang.org/x/crypto/openpgp/packet/userattribute.go3
-rw-r--r--vendor/golang.org/x/crypto/openpgp/packet/userid.go3
-rw-r--r--vendor/golang.org/x/crypto/openpgp/write.go2
-rw-r--r--vendor/golang.org/x/crypto/ssh/cipher.go3
-rw-r--r--vendor/golang.org/x/crypto/ssh/session.go7
-rw-r--r--vendor/golang.org/x/net/context/go17.go4
-rw-r--r--vendor/golang.org/x/net/http2/server.go3
-rw-r--r--vendor/golang.org/x/sys/plan9/syscall.go3
-rw-r--r--vendor/golang.org/x/sys/unix/mkall.sh5
-rw-r--r--vendor/golang.org/x/sys/unix/syscall.go3
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_darwin.1_12.go32
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_darwin.1_13.go100
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_darwin.go90
-rw-r--r--vendor/golang.org/x/sys/unix/xattr_bsd.go95
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.go40
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.s25
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go32
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s21
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.go40
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.s25
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go32
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s21
-rw-r--r--vendor/golang.org/x/sys/windows/syscall.go10
-rw-r--r--vendor/golang.org/x/sys/windows/syscall_windows.go21
-rw-r--r--vendor/golang.org/x/sys/windows/types_windows.go45
-rw-r--r--vendor/golang.org/x/sys/windows/zsyscall_windows.go88
-rw-r--r--vendor/modules.txt36
179 files changed, 2162 insertions, 1378 deletions
diff --git a/.cirrus.yml b/.cirrus.yml
index d7b763f6d..68eca4ef5 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -77,79 +77,11 @@ gcp_credentials: ENCRYPTED[a28959877b2c9c36f151781b0a05407218cda646c7d047fc556e4
aws_credentials: ENCRYPTED[4ca070bffe28eb9b27d63c568b52970dd46f119c3a83b8e443241e895dbf1737580b4d84eed27a311a2b74287ef9f79f]
-# Attempt to prevent flakes by confirming all required external/3rd-party
-# services are available and functional.
-ext_svc_check_task:
- alias: 'ext_svc_check' # int. ref. name - required for depends_on reference
- name: "Ext. services" # Displayed Title - has no other significance
- # Don't create this task for new tags so release process is more reliable
- # Docs: ./contrib/cirrus/CIModes.md
- only_if: $CIRRUS_TAG == ''
- # Default/small container image to execute tasks with
- container: &smallcontainer
- image: ${CTR_FQIN}
- # Resources are limited across ALL currently executing tasks
- # ref: https://cirrus-ci.org/guide/linux/#linux-containers
- cpu: 2
- memory: 2
- env:
- TEST_FLAVOR: ext_svc
- CTR_FQIN: ${FEDORA_CONTAINER_FQIN}
- # NOTE: The default way Cirrus-CI clones is *NOT* compatible with
- # environment expectations in contrib/cirrus/lib.sh. Specifically
- # the 'origin' remote must be defined, and all remote branches/tags
- # must be available for reference from CI scripts.
- clone_script: &full_clone |
- cd /
- rm -rf $CIRRUS_WORKING_DIR
- mkdir -p $CIRRUS_WORKING_DIR
- git clone --recursive --branch=$DEST_BRANCH https://x-access-token:${CIRRUS_REPO_CLONE_TOKEN}@github.com/${CIRRUS_REPO_FULL_NAME}.git $CIRRUS_WORKING_DIR
- cd $CIRRUS_WORKING_DIR
- git remote update origin
- if [[ -n "$CIRRUS_PR" ]]; then # running for a PR
- git fetch origin pull/$CIRRUS_PR/head:pull/$CIRRUS_PR
- git checkout pull/$CIRRUS_PR
- else
- git reset --hard $CIRRUS_CHANGE_IN_REPO
- fi
- # Some test operations & checks require a git "identity"
- _gc='git config --file /root/.gitconfig'
- $_gc user.email "TMcTestFace@example.com"
- $_gc user.name "Testy McTestface"
-
- setup_script: &setup '$GOSRC/$SCRIPT_BASE/setup_environment.sh'
- main_script: &main '/usr/bin/time --verbose --output="$STATS_LOGFILE" $GOSRC/$SCRIPT_BASE/runner.sh'
- always: &runner_stats
- runner_stats_artifacts:
- path: ./*-${STATS_LOGFILE_SFX}
- type: text/plain
-
-
-# Execute some quick checks to confirm this YAML file and all
-# automation-related shell scripts are sane.
-automation_task:
- alias: 'automation'
- name: "Check Automation"
- # This task is not needed for branches, tags, or cron runs.
- # Docs: ./contrib/cirrus/CIModes.md
- only_if: &is_pr "$CIRRUS_PR != ''"
- container: *smallcontainer
- env:
- TEST_FLAVOR: automation
- CTR_FQIN: ${FEDORA_CONTAINER_FQIN}
- TEST_ENVIRON: container
- clone_script: *full_clone
- setup_script: *setup
- main_script: *main
- always: *runner_stats
-
-
-# N/B: The two following tasks are critical. They build all binaries for all supported
-# OS platforms and versions on x86_64 and aarch64. On success, the contents of the repository
-# are preserved as an artifact. This saves most subsequent tasks about
-# 3 minutes of otherwise duplicative effort. It also ensures that the
-# exact same binaries used throughout CI testing, are available for
-# future consumption|inspection by the final 'artifacts' task.
+# N/B: This matrix of build tasks are critical to CI, along with the following
+# aarch64 task. They build binaries for all CI platforms, and versions. On
+# success, the contents of the repository are preserved as an artifact for
+# consumption by most subsequent CI tasks. This saves about 3-5 minutes of
+# otherwise duplicative effort in most tasks.
build_task:
alias: 'build'
name: 'Build for $DISTRO_NV'
@@ -175,10 +107,10 @@ build_task:
# ID for re-use of build output
CI_DESIRED_RUNTIME: crun
#- env: &priorfedora_envvars
- #DISTRO_NV: ${PRIOR_FEDORA_NAME}
- #VM_IMAGE_NAME: ${PRIOR_FEDORA_CACHE_IMAGE_NAME}
- #CTR_FQIN: ${PRIOR_FEDORA_CONTAINER_FQIN}
- #CI_DESIRED_RUNTIME: crun
+ # DISTRO_NV: ${PRIOR_FEDORA_NAME}
+ # VM_IMAGE_NAME: ${PRIOR_FEDORA_CACHE_IMAGE_NAME}
+ # CTR_FQIN: ${PRIOR_FEDORA_CONTAINER_FQIN}
+ # CI_DESIRED_RUNTIME: crun
- env: &ubuntu_envvars
DISTRO_NV: ${UBUNTU_NAME}
VM_IMAGE_NAME: ${UBUNTU_CACHE_IMAGE_NAME}
@@ -186,9 +118,54 @@ build_task:
CI_DESIRED_RUNTIME: runc
env:
TEST_FLAVOR: build
- clone_script: *full_clone
- setup_script: *setup
- main_script: *main
+ # NOTE: The default way Cirrus-CI clones is *NOT* compatible with
+ # environment expectations in contrib/cirrus/lib.sh. Specifically
+ # the 'origin' remote must be defined, and all remote branches/tags
+ # must be available for reference from CI scripts.
+ clone_script: &full_clone |
+ cd /
+ rm -rf $CIRRUS_WORKING_DIR
+ mkdir -p $CIRRUS_WORKING_DIR
+ git clone --recursive --branch=$DEST_BRANCH https://x-access-token:${CIRRUS_REPO_CLONE_TOKEN}@github.com/${CIRRUS_REPO_FULL_NAME}.git $CIRRUS_WORKING_DIR
+ cd $CIRRUS_WORKING_DIR
+ git remote update origin
+ if [[ -n "$CIRRUS_PR" ]]; then # running for a PR
+ git fetch origin pull/$CIRRUS_PR/head:pull/$CIRRUS_PR
+ git checkout pull/$CIRRUS_PR
+ else
+ git reset --hard $CIRRUS_CHANGE_IN_REPO
+ fi
+ # Some test operations & checks require a git "identity"
+ _gc='git config --file /root/.gitconfig'
+ $_gc user.email "TMcTestFace@example.com"
+ $_gc user.name "Testy McTestface"
+ # Nightly dependency-bump job: fetch latest versions of the
+ # Big Three dependencies, and run full CI test suite. Notification
+ # email will go out to monitor-list upon failure.
+ if [[ "$CIRRUS_CRON" = "treadmill" ]]; then
+ for pkg in common image/v5 storage; do
+ echo "go mod edit --require containers/$pkg@main"
+ go mod edit --require github.com/containers/$pkg@main
+ make vendor
+ done
+ git add vendor
+ # Show what changed.
+ echo "git diff go.mod, then git diff --stat:"
+ git diff go.mod
+ git diff --stat
+ HOME=/root git commit --allow-empty -asm"Bump containers/common,image,storage"
+ fi
+ # Attempt to prevent flakes by confirming basic environment expectations,
+ # network service connectivity and essential container image availability.
+ prebuild_script: &prebuild $SCRIPT_BASE/prebuild.sh
+ # Standard setup stage call, used by nearly every task in CI.
+ setup_script: &setup '$GOSRC/$SCRIPT_BASE/setup_environment.sh'
+ # Attempt to prevent flakes by confirming automation environment and
+ # all required external/3rd-party services are available and functional.
+ # Standard main execution stage call, used by nearly every task in CI.
+ main_script: &main '/usr/bin/time --verbose --output="$STATS_LOGFILE" $GOSRC/$SCRIPT_BASE/runner.sh'
+ # Attempt to catch code-quality and vendoring problems early.
+ postbuild_script: &postbuild $SCRIPT_BASE/postbuild.sh
# Cirrus-CI is very slow uploading one file at time, and the repo contains
# thousands of files. Speed this up by archiving into tarball first.
repo_prep_script: &repo_prep >-
@@ -196,8 +173,10 @@ build_task:
repo_artifacts: &repo_artifacts
path: ./repo.tbz
type: application/octet-stream
- always: *runner_stats
-
+ always: &runner_stats
+ runner_stats_artifacts:
+ path: ./*-${STATS_LOGFILE_SFX}
+ type: text/plain
build_aarch64_task:
alias: 'build_aarch64'
@@ -218,7 +197,9 @@ build_aarch64_task:
CI_DESIRED_RUNTIME: crun
TEST_FLAVOR: build
clone_script: *full_clone
+ prebuild_script: *prebuild
setup_script: *setup
+ postbuild_script: *postbuild
main_script: *main
# Cirrus-CI is very slow uploading one file at time, and the repo contains
# thousands of files. Speed this up by archiving into tarball first.
@@ -242,10 +223,8 @@ validate_task:
# to nonsequential PR merging practices, will be caught on a future PR,
# build or test task failures.
# Docs: ./contrib/cirrus/CIModes.md
- only_if: *is_pr
+ only_if: &is_pr "$CIRRUS_PR != ''"
depends_on:
- - ext_svc_check
- - automation
- build
# golangci-lint is a very, very hungry beast.
gce_instance: &bigvm
@@ -281,8 +260,6 @@ validate_aarch64_task:
# Docs: ./contrib/cirrus/CIModes.md
only_if: *is_pr
depends_on:
- - ext_svc_check
- - automation
- build_aarch64
# golangci-lint is a very, very hungry beast.
ec2_instance: *standard_build_ec2_aarch64
@@ -366,51 +343,6 @@ swagger_task:
type: text/plain
-# Check that all included go modules from other sources match
-# what is expected in `vendor/modules.txt` vs `go.mod`. Also
-# make sure that the generated bindings in pkg/bindings/...
-# are in sync with the code.
-consistency_task:
- name: "Test Code Consistency"
- alias: consistency
- # Docs: ./contrib/cirrus/CIModes.md
- only_if: *is_pr
- depends_on:
- - build
- container: *smallcontainer
- env:
- <<: *stdenvars
- TEST_FLAVOR: consistency
- TEST_ENVIRON: container
- CTR_FQIN: ${FEDORA_CONTAINER_FQIN}
- clone_script: *get_gosrc
- setup_script: *setup
- main_script: *main
- always: *runner_stats
-
-
-# Check that all included go modules from other sources match
-# what is expected in `vendor/modules.txt` vs `go.mod`. Also
-# make sure that the generated bindings in pkg/bindings/...
-# are in sync with the code.
-consistency_aarch64_task:
- name: "Test Code Consistency (aarch64)"
- alias: consistency_aarch64
- # Docs: ./contrib/cirrus/CIModes.md
- only_if: *is_pr
- depends_on:
- - build_aarch64
- ec2_instance: *standard_build_ec2_aarch64
- env:
- <<: *stdenvars_aarch64
- TEST_FLAVOR: consistency
- TEST_ENVIRON: container
- clone_script: *get_gosrc_aarch64
- setup_script: *setup
- main_script: *main
- always: *runner_stats
-
-
# There are several other important variations of podman which
# must always build successfully. Most of them are handled in
# this task, though a few need dedicated tasks which follow.
@@ -643,9 +575,9 @@ container_integration_test_task:
CTR_FQIN: ${FEDORA_CONTAINER_FQIN}
CI_DESIRED_RUNTIME: crun
#- env:
- #DISTRO_NV: ${PRIOR_FEDORA_NAME}
- #VM_IMAGE_NAME: ${PRIOR_FEDORA_CACHE_IMAGE_NAME}
- #CTR_FQIN: ${PRIOR_FEDORA_CONTAINER_FQIN}
+ # DISTRO_NV: ${PRIOR_FEDORA_NAME}
+ # VM_IMAGE_NAME: ${PRIOR_FEDORA_CACHE_IMAGE_NAME}
+ # CTR_FQIN: ${PRIOR_FEDORA_CONTAINER_FQIN}
gce_instance: *standardvm
timeout_in: 90m
env:
@@ -929,8 +861,6 @@ image_build_task: &image-build
# this task to a specific Cirrus-Cron entry with this name.
# Docs: ./contrib/cirrus/CIModes.md
only_if: $CIRRUS_CRON == 'multiarch'
- depends_on:
- - ext_svc_check
timeout_in: 120m # emulation is sssllllooooowwww
gce_instance:
<<: *standardvm
@@ -1010,16 +940,12 @@ success_task:
alias: success
# N/B: ALL tasks must be listed here, minus their '_task' suffix.
depends_on:
- - ext_svc_check
- - automation
- build
- build_aarch64
- validate
- validate_aarch64
- bindings
- swagger
- - consistency
- - consistency_aarch64
- alt_build
- osx_alt_build
- win_installer
@@ -1044,7 +970,12 @@ success_task:
- upgrade_test
- image_build
- meta
- container: *smallcontainer
+ container: &smallcontainer
+ image: ${CTR_FQIN}
+ # Resources are limited across ALL currently executing tasks
+ # ref: https://cirrus-ci.org/guide/linux/#linux-containers
+ cpu: 2
+ memory: 2
env:
CTR_FQIN: ${FEDORA_CONTAINER_FQIN}
TEST_ENVIRON: container
diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
index 5946fa6a1..5c8cd9a37 100644
--- a/.github/ISSUE_TEMPLATE.md
+++ b/.github/ISSUE_TEMPLATE.md
@@ -61,7 +61,7 @@ Briefly describe the problem you are having in a few paragraphs.
(paste your output here)
```
-**Package info (e.g. output of `rpm -q podman` or `apt list podman`):**
+**Package info (e.g. output of `rpm -q podman` or `apt list podman` or `brew info podman`):**
```
(paste your output here)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index d0f4ceb02..48650f43e 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -42,7 +42,7 @@ the “In Progress” label be set and a member will do so for you.
## Contributing to Podman
-This section describes how to start a contribution to Podman.
+This section describes how to start a contribution to Podman. These instructions are geared towards using a Linux development machine, or doing development on the podman backend. For instructions on working on MacOS, read the [docs for building on osx](./build_osx.md).
### Prepare your environment
diff --git a/cmd/podman/containers/restore.go b/cmd/podman/containers/restore.go
index ee01e19b8..144925a54 100644
--- a/cmd/podman/containers/restore.go
+++ b/cmd/podman/containers/restore.go
@@ -10,7 +10,6 @@ import (
"github.com/containers/podman/v4/cmd/podman/registry"
"github.com/containers/podman/v4/cmd/podman/utils"
"github.com/containers/podman/v4/cmd/podman/validate"
- "github.com/containers/podman/v4/libpod/define"
"github.com/containers/podman/v4/pkg/domain/entities"
"github.com/containers/podman/v4/pkg/rootless"
"github.com/spf13/cobra"
@@ -94,7 +93,7 @@ func init() {
func restore(cmd *cobra.Command, args []string) error {
var (
- e error
+ err error
errs utils.OutputErrors
)
podmanStart := time.Now()
@@ -105,9 +104,9 @@ func restore(cmd *cobra.Command, args []string) error {
// Check if the container exists (#15055)
exists := &entities.BoolReport{Value: false}
for _, ctr := range args {
- exists, e = registry.ContainerEngine().ContainerExists(registry.GetContext(), ctr, entities.ContainerExistsOptions{})
- if e != nil {
- return e
+ exists, err = registry.ContainerEngine().ContainerExists(registry.GetContext(), ctr, entities.ContainerExistsOptions{})
+ if err != nil {
+ return err
}
if exists.Value {
break
@@ -116,27 +115,10 @@ func restore(cmd *cobra.Command, args []string) error {
if !exists.Value {
// Find out if this is an image
- inspectOpts := entities.InspectOptions{}
- imgData, _, err := registry.ImageEngine().Inspect(context.Background(), args, inspectOpts)
- if err != nil {
- return err
- }
-
- hostInfo, err := registry.ContainerEngine().Info(context.Background())
+ restoreOptions.CheckpointImage, err = utils.IsCheckpointImage(context.Background(), args)
if err != nil {
return err
}
-
- for i := range imgData {
- restoreOptions.CheckpointImage = true
- checkpointRuntimeName, found := imgData[i].Annotations[define.CheckpointAnnotationRuntimeName]
- if !found {
- return fmt.Errorf("image is not a checkpoint: %s", imgData[i].ID)
- }
- if hostInfo.Host.OCIRuntime.Name != checkpointRuntimeName {
- return fmt.Errorf("container image \"%s\" requires runtime: \"%s\"", imgData[i].ID, checkpointRuntimeName)
- }
- }
}
notImport := (!restoreOptions.CheckpointImage && restoreOptions.Import == "")
diff --git a/cmd/podman/containers/run.go b/cmd/podman/containers/run.go
index f66d4d4d3..d8d020c63 100644
--- a/cmd/podman/containers/run.go
+++ b/cmd/podman/containers/run.go
@@ -148,6 +148,35 @@ func run(cmd *cobra.Command, args []string) error {
imageName = name
}
+ // If this is a checkpoint image, invoke container restore.
+ // We do not return `err` when checkpointImage is false, because the value
+ // of `err` could be "image is not a checkpoint". In this case, the run
+ // command should continue as usual, preserving backwards compatibility.
+ checkpointImage, err := utils.IsCheckpointImage(registry.GetContext(), []string{imageName})
+ if checkpointImage {
+ if err != nil {
+ return err
+ }
+ var restoreOptions entities.RestoreOptions
+ responses, err := registry.ContainerEngine().ContainerRestore(registry.GetContext(), []string{imageName}, restoreOptions)
+ if err != nil {
+ return err
+ }
+
+ var errs utils.OutputErrors
+ for _, r := range responses {
+ switch {
+ case r.Err != nil:
+ errs = append(errs, r.Err)
+ case r.RawInput != "":
+ fmt.Println(r.RawInput)
+ default:
+ fmt.Println(r.Id)
+ }
+ }
+ return errs.PrintErrors()
+ }
+
if cliVals.Replace {
if err := replaceContainer(cliVals.Name); err != nil {
return err
diff --git a/cmd/podman/pods/logs.go b/cmd/podman/pods/logs.go
index 7093a7fa8..a0ec16976 100644
--- a/cmd/podman/pods/logs.go
+++ b/cmd/podman/pods/logs.go
@@ -121,5 +121,10 @@ func logs(_ *cobra.Command, args []string) error {
logsPodOptions.StdoutWriter = os.Stdout
logsPodOptions.StderrWriter = os.Stderr
- return registry.ContainerEngine().PodLogs(registry.GetContext(), args[0], logsPodOptions.PodLogsOptions)
+
+ podName := ""
+ if len(args) > 0 {
+ podName = args[0]
+ }
+ return registry.ContainerEngine().PodLogs(registry.GetContext(), podName, logsPodOptions.PodLogsOptions)
}
diff --git a/cmd/podman/system/service_abi.go b/cmd/podman/system/service_abi.go
index 68ac8902b..82419ff1a 100644
--- a/cmd/podman/system/service_abi.go
+++ b/cmd/podman/system/service_abi.go
@@ -89,7 +89,7 @@ func restService(flags *pflag.FlagSet, cfg *entities.PodmanConfig, opts entities
return fmt.Errorf("unable to create socket %v: %w", host, err)
}
default:
- logrus.Debugf("Attempting API Service endpoint scheme %q", uri.Scheme)
+ return fmt.Errorf("API Service endpoint scheme %q is not supported. Try tcp://%s or unix:/%s", uri.Scheme, opts.URI, opts.URI)
}
libpodRuntime.SetRemoteURI(uri.String())
}
diff --git a/cmd/podman/utils/utils.go b/cmd/podman/utils/utils.go
index a265faf51..8063f4309 100644
--- a/cmd/podman/utils/utils.go
+++ b/cmd/podman/utils/utils.go
@@ -1,9 +1,12 @@
package utils
import (
+ "context"
"fmt"
"os"
+ "github.com/containers/podman/v4/cmd/podman/registry"
+ "github.com/containers/podman/v4/libpod/define"
"github.com/containers/podman/v4/pkg/domain/entities"
"github.com/containers/podman/v4/pkg/domain/entities/reports"
)
@@ -99,3 +102,40 @@ func PrintNetworkPruneResults(networkPruneReport []*entities.NetworkPruneReport,
}
return errs.PrintErrors()
}
+
+// IsCheckpointImage returns true with no error only if all values in
+// namesOrIDs correspond to checkpoint images AND these images are
+// compatible with the container runtime that is currently in use,
+// e.g., crun or runc.
+//
+// IsCheckpointImage returns false with no error when none of the values
+// in namesOrIDs corresponds to an ID or name of an image.
+//
+// Otherwise, IsCheckpointImage returns false with appropriate error.
+func IsCheckpointImage(ctx context.Context, namesOrIDs []string) (bool, error) {
+ inspectOpts := entities.InspectOptions{}
+ imgData, _, err := registry.ImageEngine().Inspect(ctx, namesOrIDs, inspectOpts)
+ if err != nil {
+ return false, err
+ }
+ if len(imgData) == 0 {
+ return false, nil
+ }
+ imgID := imgData[0].ID
+
+ hostInfo, err := registry.ContainerEngine().Info(ctx)
+ if err != nil {
+ return false, err
+ }
+
+ for i := range imgData {
+ checkpointRuntimeName, found := imgData[i].Annotations[define.CheckpointAnnotationRuntimeName]
+ if !found {
+ return false, fmt.Errorf("image is not a checkpoint: %s", imgID)
+ }
+ if hostInfo.Host.OCIRuntime.Name != checkpointRuntimeName {
+ return false, fmt.Errorf("container image \"%s\" requires runtime: \"%s\"", imgID, checkpointRuntimeName)
+ }
+ }
+ return true, nil
+}
diff --git a/contrib/cirrus/CIModes.md b/contrib/cirrus/CIModes.md
index 0b5a189a6..7d6a36cf3 100644
--- a/contrib/cirrus/CIModes.md
+++ b/contrib/cirrus/CIModes.md
@@ -43,13 +43,10 @@ of this document, it's not possible to override the behavior of `$CIRRUS_PR`.
## Cirrus Task contexts and runtime modes
### Intended general PR Tasks (*italic*: matrix)
-+ ext_svc_check
-+ automation
+ *build*
+ validate
+ bindings
+ swagger
-+ consistency
+ *alt_build*
+ osx_alt_build
+ docker-py_test
@@ -76,31 +73,22 @@ of this document, it's not possible to override the behavior of `$CIRRUS_PR`.
+ release_test
### Intended `[CI:DOCS]` PR Tasks:
-+ ext_svc_check
-+ automation
+ *build*
+ validate
+ swagger
-+ consistency
+ meta
+ success
### Intended `[CI:COPR]` PR Tasks:
-+ ext_svc_check
-+ automation
+ *build*
+ validate
+ swagger
-+ consistency
+ meta
+ success
### Intend `[CI:BUILD]` PR Tasks:
-+ ext_svc_check
-+ automation
+ *build*
+ validate
-+ consistency
+ *alt_build*
+ osx_alt_build
+ test_image_build
@@ -109,7 +97,6 @@ of this document, it's not possible to override the behavior of `$CIRRUS_PR`.
+ artifacts
### Intended Branch tasks (and Cirrus-cron jobs, except "multiarch"):
-+ ext_svc_check
+ *build*
+ swagger
+ *alt_build*
@@ -123,7 +110,6 @@ of this document, it's not possible to override the behavior of `$CIRRUS_PR`.
+ artifacts
### Intended for "multiarch" Cirrus-Cron (always a branch):
-+ ext_svc_check
+ image_build
+ meta
+ success
diff --git a/contrib/cirrus/check_go_changes.sh b/contrib/cirrus/check_go_changes.sh
index 3c35ce51a..aa8f4ccf4 100755
--- a/contrib/cirrus/check_go_changes.sh
+++ b/contrib/cirrus/check_go_changes.sh
@@ -30,12 +30,22 @@ $(egrep -B 5 -A 5 "$regex"<<<"$diffs")"
fi
}
-if [[ -n "$CIRRUS_TAG" ]] || ! req_env_vars CIRRUS_CHANGE_IN_REPO CIRRUS_PR DEST_BRANCH
-then
- warn "Skipping: Golang code checks cannot run in this context"
+# Defined by Cirrus-CI
+# shellcheck disable=SC2154
+if [[ "$CIRRUS_BRANCH" =~ pull ]]; then
+ for var in CIRRUS_CHANGE_IN_REPO CIRRUS_PR DEST_BRANCH; do
+ if [[ -z "${!var}" ]]; then
+ warn "Skipping: Golang code checks require non-empty '\$$var'"
+ exit 0
+ fi
+ done
+else
+ warn "Skipping: Golang code checks in tag and branch contexts"
exit 0
fi
+# Defined by/in Cirrus-CI config.
+# shellcheck disable=SC2154
base=$(git merge-base $DEST_BRANCH $CIRRUS_CHANGE_IN_REPO)
diffs=$(git diff $base $CIRRUS_CHANGE_IN_REPO -- '*.go' ':^vendor/')
diff --git a/contrib/cirrus/ext_svc_check.sh b/contrib/cirrus/ext_svc_check.sh
deleted file mode 100755
index 146919c39..000000000
--- a/contrib/cirrus/ext_svc_check.sh
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/bin/bash
-
-set -eo pipefail
-
-# This script attempts basic confirmation of functional networking
-# by connecting to a set of essential external servers and failing
-# if any cannot be reached. It's intended for use early on in the
-# podman CI system, to help prevent wasting time on tests that can't
-# succeed due to some outage or another.
-
-# shellcheck source=./contrib/cirrus/lib.sh
-source $(dirname $0)/lib.sh
-
-cat ${CIRRUS_WORKING_DIR}/${SCRIPT_BASE}/required_host_ports.txt | \
- while read host port
- do
- if [[ "$port" -eq "443" ]]
- then
- echo "SSL/TLS to $host:$port"
- echo -n '' | \
- err_retry 9 1000 "" openssl s_client -quiet -no_ign_eof -connect $host:$port
- else
- echo "Connect to $host:$port"
- err_retry 9 1000 1 nc -zv -w 13 $host $port
- fi
- done
-
-# Verify we can pull metadata from a few key testing images on quay.io
-# in the 'libpod' namespace. This is mostly aimed at validating the
-# quay.io service is up and responsive. Images were hand-picked with
-# egrep -ro 'quay.io/libpod/.+:latest' test | sort -u
-TEST_IMGS=(\
- alpine:latest
- busybox:latest
- alpine_labels:latest
- alpine_nginx:latest
- alpine_healthcheck:latest
- badhealthcheck:latest
- cirros:latest
-)
-
-echo "Checking quay.io test image accessibility"
-for testimg in "${TEST_IMGS[@]}"; do
- fqin="quay.io/libpod/$testimg"
- echo " $fqin"
- skopeo inspect --retry-times 5 "docker://$fqin" | jq . > /dev/null
-done
diff --git a/contrib/cirrus/postbuild.sh b/contrib/cirrus/postbuild.sh
new file mode 100755
index 000000000..47cb558e3
--- /dev/null
+++ b/contrib/cirrus/postbuild.sh
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+set -eo pipefail
+
+# This script attempts to confirm all included go modules from
+# other sources match what is expected in `vendor/modules.txt`
+# vs `go.mod`. Also make sure that the generated bindings in
+# `pkg/bindings/...` are in sync with the code. It's intended
+# for use after successfully building podman, to prevent wasting
+# time on tests that might otherwise succeed with bad/ugly/invalid
+# code.
+
+source /etc/automation_environment
+source $AUTOMATION_LIB_PATH/common_lib.sh
+
+# Defined by the CI system
+# shellcheck disable=SC2154
+cd $CIRRUS_WORKING_DIR
+
+showrun make .install.goimports
+showrun make vendor
+SUGGESTION="run 'make vendor' and commit all changes" ./hack/tree_status.sh
+showrun make generate-bindings
+SUGGESTION="run 'make generate-bindings' and commit all changes" ./hack/tree_status.sh
+showrun make completions
+SUGGESTION="run 'make completions' and commit all changes" ./hack/tree_status.sh
+
+# Defined in Cirrus-CI config.
+# shellcheck disable=SC2154
+$SCRIPT_BASE/check_go_changes.sh
diff --git a/contrib/cirrus/prebuild.sh b/contrib/cirrus/prebuild.sh
new file mode 100755
index 000000000..ea05d90dc
--- /dev/null
+++ b/contrib/cirrus/prebuild.sh
@@ -0,0 +1,77 @@
+#!/bin/bash
+
+set -eo pipefail
+
+# This script attempts to confirm functional networking and
+# connectivity to essential external servers. It also verifies
+# some basic environmental expectations and shell-script sanity.
+# It's intended for use early on in the podman CI system, to help
+# prevent wasting time on tests that can't succeed due to some
+# outage, failure, or missed expectation.
+
+source /etc/automation_environment
+source $AUTOMATION_LIB_PATH/common_lib.sh
+
+req_env_vars CI DEST_BRANCH IMAGE_SUFFIX TEST_FLAVOR TEST_ENVIRON \
+ PODBIN_NAME PRIV_NAME DISTRO_NV AUTOMATION_LIB_PATH \
+ SCRIPT_BASE CIRRUS_WORKING_DIR FEDORA_NAME UBUNTU_NAME \
+ VM_IMAGE_NAME
+
+# Defined by the CI system
+# shellcheck disable=SC2154
+cd $CIRRUS_WORKING_DIR
+
+# Defined by CI config.
+# shellcheck disable=SC2154
+showrun $SCRIPT_BASE/cirrus_yaml_test.py
+
+# Defined by CI config.
+# shellcheck disable=SC2154
+if [[ "${DISTRO_NV}" =~ fedora ]]; then
+ showrun ooe.sh dnf install -y ShellCheck # small/quick addition
+ showrun shellcheck --color=always --format=tty \
+ --shell=bash --external-sources \
+ --enable add-default-case,avoid-nullary-conditions,check-unassigned-uppercase \
+ --exclude SC2046,SC2034,SC2090,SC2064 \
+ --wiki-link-count=0 --severity=warning \
+ $SCRIPT_BASE/*.sh hack/get_ci_vm.sh
+fi
+
+msg "Checking 3rd party network service connectivity"
+# shellcheck disable=SC2154
+cat ${CIRRUS_WORKING_DIR}/${SCRIPT_BASE}/required_host_ports.txt | \
+ while read host port
+ do
+ if [[ "$port" -eq "443" ]]
+ then
+ echo "SSL/TLS to $host:$port"
+ echo -n '' | \
+ err_retry 9 1000 "" openssl s_client -quiet -no_ign_eof -connect $host:$port
+ else
+ echo "Connect to $host:$port"
+ err_retry 9 1000 1 nc -zv -w 13 $host $port
+ fi
+ done
+
+# Verify we can pull metadata from a few key testing images on quay.io
+# in the 'libpod' namespace. This is mostly aimed at validating the
+# quay.io service is up and responsive. Images were hand-picked with
+# egrep -ro 'quay.io/libpod/.+:latest' test | sort -u
+TEST_IMGS=(\
+ alpine:latest
+ busybox:latest
+ alpine_labels:latest
+ alpine_nginx:latest
+ alpine_healthcheck:latest
+ badhealthcheck:latest
+ cirros:latest
+)
+
+msg "Checking quay.io test image accessibility"
+for testimg in "${TEST_IMGS[@]}"; do
+ fqin="quay.io/libpod/$testimg"
+ echo " $fqin"
+ # Belt-and-suspenders: Catch skopeo (somehow) returning False or null
+ # in addition to "bad" (invalid) JSON.
+ skopeo inspect --retry-times 5 "docker://$fqin" | jq -e . > /dev/null
+done
diff --git a/contrib/cirrus/runner.sh b/contrib/cirrus/runner.sh
index c44251e2f..d360f6a04 100755
--- a/contrib/cirrus/runner.sh
+++ b/contrib/cirrus/runner.sh
@@ -19,21 +19,6 @@ set -eo pipefail
# shellcheck source=contrib/cirrus/lib.sh
source $(dirname $0)/lib.sh
-function _run_ext_svc() {
- $SCRIPT_BASE/ext_svc_check.sh
-}
-
-function _run_automation() {
- $SCRIPT_BASE/cirrus_yaml_test.py
-
- req_env_vars CI DEST_BRANCH IMAGE_SUFFIX TEST_FLAVOR TEST_ENVIRON \
- PODBIN_NAME PRIV_NAME DISTRO_NV CONTAINER USER HOME \
- UID AUTOMATION_LIB_PATH SCRIPT_BASE OS_RELEASE_ID \
- CG_FS_TYPE
- bigto ooe.sh dnf install -y ShellCheck # small/quick addition
- $SCRIPT_BASE/shellcheck.sh
-}
-
function _run_validate() {
# TODO: aarch64 images need python3-devel installed
# https://github.com/containers/automation_images/issues/159
@@ -226,16 +211,6 @@ eof
rm -f $envvarsfile
}
-function _run_consistency() {
- make vendor
- SUGGESTION="run 'make vendor' and commit all changes" ./hack/tree_status.sh
- make generate-bindings
- SUGGESTION="run 'make generate-bindings' and commit all changes" ./hack/tree_status.sh
- make completions
- SUGGESTION="run 'make completions' and commit all changes" ./hack/tree_status.sh
- $SCRIPT_BASE/check_go_changes.sh
-}
-
function _run_build() {
# Ensure always start from clean-slate with all vendor modules downloaded
make clean
@@ -423,6 +398,8 @@ function _bail_if_test_can_be_skipped() {
return 0
fi
+ # Defined by Cirrus-CI for all tasks
+ # shellcheck disable=SC2154
head=$CIRRUS_CHANGE_IN_REPO
base=$(git merge-base $DEST_BRANCH $head)
diffs=$(git diff --name-only $base $head)
diff --git a/contrib/cirrus/setup_environment.sh b/contrib/cirrus/setup_environment.sh
index 4c86bbcfa..ca1e16544 100755
--- a/contrib/cirrus/setup_environment.sh
+++ b/contrib/cirrus/setup_environment.sh
@@ -228,13 +228,11 @@ esac
# Required to be defined by caller: The primary type of testing that will be performed
# shellcheck disable=SC2154
case "$TEST_FLAVOR" in
- ext_svc) ;;
validate)
dnf install -y $PACKAGE_DOWNLOAD_DIR/python3*.rpm
# For some reason, this is also needed for validation
make .install.pre-commit .install.gitvalidation
;;
- automation) ;;
altbuild)
# Defined in .cirrus.yml
# shellcheck disable=SC2154
@@ -366,10 +364,6 @@ case "$TEST_FLAVOR" in
docker.io/gitlab/gitlab-runner-helper:x86_64-latest-pwsh
;;
swagger) ;& # use next item
- consistency)
- make clean
- make .install.goimports
- ;;
release) ;;
*) die_unknown TEST_FLAVOR
esac
diff --git a/contrib/cirrus/shellcheck.sh b/contrib/cirrus/shellcheck.sh
deleted file mode 100755
index 667d30c91..000000000
--- a/contrib/cirrus/shellcheck.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/bash
-
-set -eo pipefail
-
-# shellcheck source=./contrib/cirrus/lib.sh
-source $(dirname $0)/lib.sh
-
-cd $CIRRUS_WORKING_DIR
-shellcheck --color=always --format=tty \
- --shell=bash --external-sources \
- --enable add-default-case,avoid-nullary-conditions,check-unassigned-uppercase \
- --exclude SC2046,SC2034,SC2090,SC2064 \
- --wiki-link-count=0 --severity=warning \
- $SCRIPT_BASE/*.sh hack/get_ci_vm.sh
-
-echo "Shellcheck: PASS"
diff --git a/contrib/podmanimage/README.md b/contrib/podmanimage/README.md
index ab406a56a..8720b41c7 100644
--- a/contrib/podmanimage/README.md
+++ b/contrib/podmanimage/README.md
@@ -1,3 +1,16 @@
+[comment]: <> (***ATTENTION*** ***WARNING*** ***ALERT*** ***CAUTION*** ***DANGER***)
+[comment]: <> ()
+[comment]: <> (ANY changes made to this file, once commited/merged must)
+[comment]: <> (be manually copy/pasted -in markdown- into the description)
+[comment]: <> (field on Quay at the following locations:)
+[comment]: <> ()
+[comment]: <> (https://quay.io/repository/containers/podman)
+[comment]: <> (https://quay.io/repository/podman/stable)
+[comment]: <> (https://quay.io/repository/podman/testing)
+[comment]: <> (https://quay.io/repository/podman/upstream)
+[comment]: <> ()
+[comment]: <> (***ATTENTION*** ***WARNING*** ***ALERT*** ***CAUTION*** ***DANGER***)
+
![PODMAN logo](https://raw.githubusercontent.com/containers/common/main/logos/podman-logo-full-vert.png)
# podmanimage
diff --git a/docs/source/markdown/.gitignore b/docs/source/markdown/.gitignore
index 57a64e1c1..584e88e75 100644
--- a/docs/source/markdown/.gitignore
+++ b/docs/source/markdown/.gitignore
@@ -12,6 +12,7 @@ podman-login.1.md
podman-logout.1.md
podman-logs.1.md
podman-manifest-add.1.md
+podman-manifest-annotate.1.md
podman-manifest-create.1.md
podman-manifest-push.1.md
podman-pause.1.md
@@ -25,6 +26,7 @@ podman-pod-stats.1.md
podman-pod-stop.1.md
podman-pull.1.md
podman-push.1.md
+podman-restart.1.md
podman-rm.1.md
podman-run.1.md
podman-search.1.md
diff --git a/docs/source/markdown/options/compression-format.md b/docs/source/markdown/options/compression-format.md
new file mode 100644
index 000000000..14c8c0499
--- /dev/null
+++ b/docs/source/markdown/options/compression-format.md
@@ -0,0 +1,3 @@
+#### **--compression-format**=**gzip** | *zstd* | *zstd:chunked*
+
+Specifies the compression format to use. Supported values are: `gzip`, `zstd` and `zstd:chunked`. The default is `gzip` unless overridden in the containers.conf file.
diff --git a/docs/source/markdown/options/features.md b/docs/source/markdown/options/features.md
new file mode 100644
index 000000000..b6ac4de34
--- /dev/null
+++ b/docs/source/markdown/options/features.md
@@ -0,0 +1,4 @@
+#### **--features**
+
+Specify the features list which the list or index records as requirements for
+the image. This option is rarely used.
diff --git a/docs/source/markdown/options/log-opt.md b/docs/source/markdown/options/log-opt.md
new file mode 100644
index 000000000..4eafc1fb0
--- /dev/null
+++ b/docs/source/markdown/options/log-opt.md
@@ -0,0 +1,16 @@
+#### **--log-opt**=*name=value*
+
+Logging driver specific options.
+
+Set custom logging configuration. The following *name*s are supported:
+
+**path**: specify a path to the log file
+ (e.g. **--log-opt path=/var/log/container/mycontainer.json**);
+
+**max-size**: specify a max size of the log file
+ (e.g. **--log-opt max-size=10mb**);
+
+**tag**: specify a custom log tag for the container
+ (e.g. **--log-opt tag="{{.ImageName}}"**.
+It supports the same keys as **podman inspect --format**.
+This option is currently supported only by the **journald** log driver.
diff --git a/docs/source/markdown/options/network.md b/docs/source/markdown/options/network.md
new file mode 100644
index 000000000..e2a2dc36a
--- /dev/null
+++ b/docs/source/markdown/options/network.md
@@ -0,0 +1,32 @@
+#### **--network**=*mode*, **--net**
+
+Set the network mode for the <<container|pod>>.
+
+Valid _mode_ values are:
+
+- **bridge[:OPTIONS,...]**: Create a network stack on the default bridge. This is the default for rootful containers. It is possible to specify these additional options:
+ - **alias=name**: Add network-scoped alias for the container.
+ - **ip=IPv4**: Specify a static ipv4 address for this container.
+ - **ip=IPv6**: Specify a static ipv6 address for this container.
+ - **mac=MAC**: Specify a static mac address for this container.
+ - **interface_name**: Specify a name for the created network interface inside the container.
+
+ For example to set a static ipv4 address and a static mac address, use `--network bridge:ip=10.88.0.10,mac=44:33:22:11:00:99`.
+- \<network name or ID\>[:OPTIONS,...]: Connect to a user-defined network; this is the network name or ID from a network created by **[podman network create](podman-network-create.1.md)**. Using the network name implies the bridge network mode. It is possible to specify the same options described under the bridge mode above. You can use the **--network** option multiple times to specify additional networks.
+- **none**: Create a network namespace for the container but do not configure network interfaces for it, thus the container has no network connectivity.
+- **container:**_id_: Reuse another container's network stack.
+- **host**: Do not create a network namespace, the container will use the host's network. Note: The host mode gives the container full access to local system services such as D-bus and is therefore considered insecure.
+- **ns:**_path_: Path to a network namespace to join.
+- **private**: Create a new namespace for the container. This will use the **bridge** mode for rootful containers and **slirp4netns** for rootless ones.
+- **slirp4netns[:OPTIONS,...]**: use **slirp4netns**(1) to create a user network stack. This is the default for rootless containers. It is possible to specify these additional options, they can also be set with `network_cmd_options` in containers.conf:
+ - **allow_host_loopback=true|false**: Allow slirp4netns to reach the host loopback IP (default is 10.0.2.2 or the second IP from slirp4netns cidr subnet when changed, see the cidr option below). The default is false.
+ - **mtu=MTU**: Specify the MTU to use for this network. (Default is `65520`).
+ - **cidr=CIDR**: Specify ip range to use for this network. (Default is `10.0.2.0/24`).
+ - **enable_ipv6=true|false**: Enable IPv6. Default is true. (Required for `outbound_addr6`).
+ - **outbound_addr=INTERFACE**: Specify the outbound interface slirp should bind to (ipv4 traffic only).
+ - **outbound_addr=IPv4**: Specify the outbound ipv4 address slirp should bind to.
+ - **outbound_addr6=INTERFACE**: Specify the outbound interface slirp should bind to (ipv6 traffic only).
+ - **outbound_addr6=IPv6**: Specify the outbound ipv6 address slirp should bind to.
+ - **port_handler=rootlesskit**: Use rootlesskit for port forwarding. Default.
+ Note: Rootlesskit changes the source IP address of incoming packets to an IP address in the container network namespace, usually `10.0.2.100`. If your application requires the real source IP address, e.g. web server logs, use the slirp4netns port handler. The rootlesskit port handler is also used for rootless containers when connected to user-defined networks.
+ - **port_handler=slirp4netns**: Use the slirp4netns port forwarding, it is slower than rootlesskit but preserves the correct source IP address. This port handler cannot be used for user-defined networks.
diff --git a/docs/source/markdown/options/pod.run.md b/docs/source/markdown/options/pod.run.md
new file mode 100644
index 000000000..6ba3c718b
--- /dev/null
+++ b/docs/source/markdown/options/pod.run.md
@@ -0,0 +1,5 @@
+#### **--pod**=*name*
+
+Run container in an existing pod. If you want Podman to make the pod for you, prefix the pod name with **new:**.
+To make a pod with more granular options, use the **podman pod create** command before creating a container.
+If a container is run with a pod, and the pod has an infra-container, the infra-container will be started before the container is.
diff --git a/docs/source/markdown/options/sign-passphrase-file.md b/docs/source/markdown/options/sign-passphrase-file.md
new file mode 100644
index 000000000..46e724db1
--- /dev/null
+++ b/docs/source/markdown/options/sign-passphrase-file.md
@@ -0,0 +1,3 @@
+#### **--sign-passphrase-file**=*path*
+
+If signing the image (using either **--sign-by** or **--sign-by-sigstore-private-key**), read the passphrase to use from the specified path.
diff --git a/docs/source/markdown/options/time.md b/docs/source/markdown/options/time.md
new file mode 100644
index 000000000..85d571d18
--- /dev/null
+++ b/docs/source/markdown/options/time.md
@@ -0,0 +1,3 @@
+#### **--time**, **-t**=*seconds*
+
+Seconds to wait before forcibly stopping <<the container|running containers within the pod>>.
diff --git a/docs/source/markdown/options/variant.container.md b/docs/source/markdown/options/variant.container.md
new file mode 100644
index 000000000..ed7cd29d3
--- /dev/null
+++ b/docs/source/markdown/options/variant.container.md
@@ -0,0 +1,3 @@
+#### **--variant**=*VARIANT*
+
+Use _VARIANT_ instead of the default architecture variant of the container image. Some images can use multiple variants of the arm architectures, such as arm/v5 and arm/v7.
diff --git a/docs/source/markdown/options/variant.manifest.md b/docs/source/markdown/options/variant.manifest.md
new file mode 100644
index 000000000..b1d7b28aa
--- /dev/null
+++ b/docs/source/markdown/options/variant.manifest.md
@@ -0,0 +1,5 @@
+#### **--variant**
+
+Specify the variant which the list or index records for the image. This option
+is typically used to distinguish between multiple entries which share the same
+architecture value, but which expect different versions of its instruction set.
diff --git a/docs/source/markdown/podman-create.1.md.in b/docs/source/markdown/podman-create.1.md.in
index 351124dc4..b7f621866 100644
--- a/docs/source/markdown/podman-create.1.md.in
+++ b/docs/source/markdown/podman-create.1.md.in
@@ -228,22 +228,7 @@ pod when that pod is not running.
@@option log-driver
-#### **--log-opt**=*name=value*
-
-Set custom logging configuration. The following *name*s are supported:
-
-- **path**: specify a path to the log file
-(e.g. **--log-opt path=/var/log/container/mycontainer.json**);
-
-- **max-size**: specify a max size of the log file
-(e.g. **--log-opt max-size=10mb**);
-
-- **tag**: specify a custom log tag for the container
-(e.g. **--log-opt tag="{{.ImageName}}"**.
-
-It supports the same keys as **podman inspect --format**.
-
-This option is currently supported only by the **journald** log driver.
+@@option log-opt
@@option mac-address
@@ -259,38 +244,11 @@ This option is currently supported only by the **journald** log driver.
@@option name.container
-#### **--network**=*mode*, **--net**
-
-Set the network mode for the container. Invalid if using **--dns**, **--dns-option**, or **--dns-search** with **--network** set to **none** or **container:**_id_. If used together with **--pod**, the container will not join the pod's network namespace.
-
-Valid _mode_ values are:
-
-- **bridge[:OPTIONS,...]**: Create a network stack on the default bridge. This is the default for rootful containers. It is possible to specify these additional options:
- - **alias=name**: Add network-scoped alias for the container.
- - **ip=IPv4**: Specify a static ipv4 address for this container.
- - **ip=IPv6**: Specify a static ipv6 address for this container.
- - **mac=MAC**: Specify a static mac address for this container.
- - **interface_name**: Specify a name for the created network interface inside the container.
-
- For example to set a static ipv4 address and a static mac address, use `--network bridge:ip=10.88.0.10,mac=44:33:22:11:00:99`.
-- \<network name or ID\>[:OPTIONS,...]: Connect to a user-defined network; this is the network name or ID from a network created by **[podman network create](podman-network-create.1.md)**. Using the network name implies the bridge network mode. It is possible to specify the same options described under the bridge mode above. You can use the **--network** option multiple times to specify additional networks.
-- **none**: Create a network namespace for the container but do not configure network interfaces for it, thus the container has no network connectivity.
-- **container:**_id_: Reuse another container's network stack.
-- **host**: Do not create a network namespace, the container will use the host's network. Note: The host mode gives the container full access to local system services such as D-bus and is therefore considered insecure.
-- **ns:**_path_: Path to a network namespace to join.
-- **private**: Create a new namespace for the container. This will use the **bridge** mode for rootful containers and **slirp4netns** for rootless ones.
-- **slirp4netns[:OPTIONS,...]**: use **slirp4netns**(1) to create a user network stack. This is the default for rootless containers. It is possible to specify these additional options, they can also be set with `network_cmd_options` in containers.conf:
- - **allow_host_loopback=true|false**: Allow slirp4netns to reach the host loopback IP (default is 10.0.2.2 or the second IP from slirp4netns cidr subnet when changed, see the cidr option below). The default is false.
- - **mtu=MTU**: Specify the MTU to use for this network. (Default is `65520`).
- - **cidr=CIDR**: Specify ip range to use for this network. (Default is `10.0.2.0/24`).
- - **enable_ipv6=true|false**: Enable IPv6. Default is true. (Required for `outbound_addr6`).
- - **outbound_addr=INTERFACE**: Specify the outbound interface slirp should bind to (ipv4 traffic only).
- - **outbound_addr=IPv4**: Specify the outbound ipv4 address slirp should bind to.
- - **outbound_addr6=INTERFACE**: Specify the outbound interface slirp should bind to (ipv6 traffic only).
- - **outbound_addr6=IPv6**: Specify the outbound ipv6 address slirp should bind to.
- - **port_handler=rootlesskit**: Use rootlesskit for port forwarding. Default.
- Note: Rootlesskit changes the source IP address of incoming packets to an IP address in the container network namespace, usually `10.0.2.100`. If your application requires the real source IP address, e.g. web server logs, use the slirp4netns port handler. The rootlesskit port handler is also used for rootless containers when connected to user-defined networks.
- - **port_handler=slirp4netns**: Use the slirp4netns port forwarding, it is slower than rootlesskit but preserves the correct source IP address. This port handler cannot be used for user-defined networks.
+@@option network
+
+Invalid if using **--dns**, **--dns-option**, or **--dns-search** with **--network** set to **none** or **container:**_id_.
+
+If used together with **--pod**, the container will not join the pod's network namespace.
@@option network-alias
@@ -318,10 +276,7 @@ This option conflicts with **--add-host**.
@@option platform
-#### **--pod**=*name*
-
-Run container in an existing pod. If you want Podman to make the pod for you, preference the pod name with `new:`.
-To make a pod with more granular options, use the `podman pod create` command before creating a container.
+@@option pod.run
@@option pod-id-file.container
@@ -440,8 +395,7 @@ Note: Labeling can be disabled for all containers by setting label=false in the
@@option uts.container
-#### **--variant**=*VARIANT*
-Use _VARIANT_ instead of the default architecture variant of the container image. Some images can use multiple variants of the arm architectures, such as arm/v5 and arm/v7.
+@@option variant.container
@@option volume
diff --git a/docs/source/markdown/podman-kube-play.1.md.in b/docs/source/markdown/podman-kube-play.1.md.in
index 3bbe8113a..dea47c307 100644
--- a/docs/source/markdown/podman-kube-play.1.md.in
+++ b/docs/source/markdown/podman-kube-play.1.md.in
@@ -146,58 +146,16 @@ Note: When joining multiple networks you should use the **--network name:ip=\<ip
Set logging driver for all created containers.
-#### **--log-opt**=*name=value*
-
-Set custom logging configuration. The following *name*s are supported:
-
-- **path**: specify a path to the log file
-(e.g. **--log-opt path=/var/log/container/mycontainer.json**);
-
-- **max-size**: specify a max size of the log file
-(e.g. **--log-opt max-size=10mb**);
-
-- **tag**: specify a custom log tag for the container
-(e.g. **--log-opt tag="{{.ImageName}}"**.
-
-It supports the same keys as **podman inspect --format**.
-
-This option is currently supported only by the **journald** log driver.
+@@option log-opt
#### **--mac-address**=*MAC address*
Assign a static mac address to the pod. This option can be specified several times when kube play creates more than one pod.
Note: When joining multiple networks you should use the **--network name:mac=\<mac\>** syntax.
-#### **--network**=*mode*, **--net**
-
-Change the network mode of the pod. The host network mode should be configured in the YAML file.
-Valid _mode_ values are:
-
-- **bridge[:OPTIONS,...]**: Create a network stack on the default bridge. This is the default for rootful containers. It is possible to specify these additional options:
- - **alias=name**: Add network-scoped alias for the container.
- - **ip=IPv4**: Specify a static ipv4 address for this container.
- - **ip=IPv6**: Specify a static ipv6 address for this container.
- - **mac=MAC**: Specify a static mac address for this container.
- - **interface_name**: Specify a name for the created network interface inside the container.
-
- For example to set a static ipv4 address and a static mac address, use `--network bridge:ip=10.88.0.10,mac=44:33:22:11:00:99`.
-- \<network name or ID\>[:OPTIONS,...]: Connect to a user-defined network; this is the network name or ID from a network created by **[podman network create](podman-network-create.1.md)**. Using the network name implies the bridge network mode. It is possible to specify the same options described under the bridge mode above. You can use the **--network** option multiple times to specify additional networks.
-- **none**: Create a network namespace for the container but do not configure network interfaces for it, thus the container has no network connectivity.
-- **container:**_id_: Reuse another container's network stack.
-- **ns:**_path_: Path to a network namespace to join.
-- **private**: Create a new namespace for the container. This will use the **bridge** mode for rootful containers and **slirp4netns** for rootless ones.
-- **slirp4netns[:OPTIONS,...]**: use **slirp4netns**(1) to create a user network stack. This is the default for rootless containers. It is possible to specify these additional options, they can also be set with `network_cmd_options` in containers.conf:
- - **allow_host_loopback=true|false**: Allow slirp4netns to reach the host loopback IP (default is 10.0.2.2 or the second IP from slirp4netns cidr subnet when changed, see the cidr option below). The default is false.
- - **mtu=MTU**: Specify the MTU to use for this network. (Default is `65520`).
- - **cidr=CIDR**: Specify ip range to use for this network. (Default is `10.0.2.0/24`).
- - **enable_ipv6=true|false**: Enable IPv6. Default is true. (Required for `outbound_addr6`).
- - **outbound_addr=INTERFACE**: Specify the outbound interface slirp should bind to (ipv4 traffic only).
- - **outbound_addr=IPv4**: Specify the outbound ipv4 address slirp should bind to.
- - **outbound_addr6=INTERFACE**: Specify the outbound interface slirp should bind to (ipv6 traffic only).
- - **outbound_addr6=IPv6**: Specify the outbound ipv6 address slirp should bind to.
- - **port_handler=rootlesskit**: Use rootlesskit for port forwarding. Default.
- Note: Rootlesskit changes the source IP address of incoming packets to an IP address in the container network namespace, usually `10.0.2.100`. If your application requires the real source IP address, e.g. web server logs, use the slirp4netns port handler. The rootlesskit port handler is also used for rootless containers when connected to user-defined networks.
- - **port_handler=slirp4netns**: Use the slirp4netns port forwarding, it is slower than rootlesskit but preserves the correct source IP address. This port handler cannot be used for user-defined networks.
+@@option network
+
+When no network option is specified and *host* network mode is not configured in the YAML file, a new network stack is created and pods are attached to it making possible pod to pod communication.
@@option no-hosts
diff --git a/docs/source/markdown/podman-manifest-add.1.md.in b/docs/source/markdown/podman-manifest-add.1.md.in
index 6a9df69b4..f7b9457bc 100644
--- a/docs/source/markdown/podman-manifest-add.1.md.in
+++ b/docs/source/markdown/podman-manifest-add.1.md.in
@@ -39,10 +39,7 @@ retrieved from the image's configuration information.
@@option creds
-#### **--features**
-
-Specify the features list which the list or index records as requirements for
-the image. This option is rarely used.
+@@option features
#### **--os**
@@ -58,11 +55,7 @@ image. This option is rarely used.
@@option tls-verify
-#### **--variant**
-
-Specify the variant which the list or index records for the image. This option
-is typically used to distinguish between multiple entries which share the same
-architecture value, but which expect different versions of its instruction set.
+@@option variant.manifest
## Transport
diff --git a/docs/source/markdown/podman-manifest-annotate.1.md b/docs/source/markdown/podman-manifest-annotate.1.md.in
index a6f82aa9a..71e80c0e7 100644
--- a/docs/source/markdown/podman-manifest-annotate.1.md
+++ b/docs/source/markdown/podman-manifest-annotate.1.md.in
@@ -23,10 +23,7 @@ the image. This is usually automatically retrieved from the image's
configuration information, so it is rarely necessary to use this option.
-#### **--features**
-
-Specify the features list which the list or index records as requirements for
-the image. This option is rarely used.
+@@option features
#### **--os**
@@ -44,11 +41,7 @@ for the image. This option is rarely used.
Specify the OS version which the list or index records as a requirement for the
image. This option is rarely used.
-#### **--variant**
-
-Specify the variant which the list or index records for the image. This option
-is typically used to distinguish between multiple entries which share the same
-architecture value, but which expect different versions of its instruction set.
+@@option variant.manifest
## EXAMPLE
diff --git a/docs/source/markdown/podman-manifest-push.1.md.in b/docs/source/markdown/podman-manifest-push.1.md.in
index fe0a534c9..593725ff7 100644
--- a/docs/source/markdown/podman-manifest-push.1.md.in
+++ b/docs/source/markdown/podman-manifest-push.1.md.in
@@ -23,9 +23,7 @@ the list or index itself. (Default true)
@@option cert-dir
-#### **--compression-format**=**gzip** | *zstd* | *zstd:chunked*
-
-Specifies the compression format to use. Supported values are: `gzip`, `zstd` and `zstd:chunked`. The default is `gzip` unless overridden in the containers.conf file.
+@@option compression-format
@@option creds
@@ -55,9 +53,7 @@ Sign the pushed images with a “simple signing” signature using the specified
Sign the pushed images with a sigstore signature using a private key at the specified path. (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines)
-#### **--sign-passphrase-file**=*path*
-
-If signing the image (using either **--sign-by** or **--sign-by-sigstore-private-key**), read the passphrase to use from the specified path.
+@@option sign-passphrase-file
@@option tls-verify
diff --git a/docs/source/markdown/podman-pod-create.1.md.in b/docs/source/markdown/podman-pod-create.1.md.in
index fdae1d249..14c798772 100644
--- a/docs/source/markdown/podman-pod-create.1.md.in
+++ b/docs/source/markdown/podman-pod-create.1.md.in
@@ -117,38 +117,9 @@ The custom image that will be used for the infra container. Unless specified, P
Assign a name to the pod.
-#### **--network**=*mode*, **--net**
-
-Set the network mode for the pod. Invalid if using **--dns**, **--dns-option**, or **--dns-search** with **--network** that is set to **none** or **container:**_id_.
-
-Valid _mode_ values are:
-
-- **bridge[:OPTIONS,...]**: Create a network stack on the default bridge. This is the default for rootful containers. It is possible to specify these additional options:
- - **alias=name**: Add network-scoped alias for the container.
- - **ip=IPv4**: Specify a static ipv4 address for this container.
- - **ip=IPv6**: Specify a static ipv6 address for this container.
- - **mac=MAC**: Specify a static mac address for this container.
- - **interface_name**: Specify a name for the created network interface inside the container.
-
- For example to set a static ipv4 address and a static mac address, use `--network bridge:ip=10.88.0.10,mac=44:33:22:11:00:99`.
-- \<network name or ID\>[:OPTIONS,...]: Connect to a user-defined network; this is the network name or ID from a network created by **[podman network create](podman-network-create.1.md)**. Using the network name implies the bridge network mode. It is possible to specify the same options described under the bridge mode above. You can use the **--network** option multiple times to specify additional networks.
-- **none**: Create a network namespace for the container but do not configure network interfaces for it, thus the container has no network connectivity.
-- **container:**_id_: Reuse another container's network stack.
-- **host**: Do not create a network namespace, the container will use the host's network. Note: The host mode gives the container full access to local system services such as D-bus and is therefore considered insecure.
-- **ns:**_path_: Path to a network namespace to join.
-- **private**: Create a new namespace for the container. This will use the **bridge** mode for rootful containers and **slirp4netns** for rootless ones.
-- **slirp4netns[:OPTIONS,...]**: use **slirp4netns**(1) to create a user network stack. This is the default for rootless containers. It is possible to specify these additional options, they can also be set with `network_cmd_options` in containers.conf:
- - **allow_host_loopback=true|false**: Allow slirp4netns to reach the host loopback IP (default is 10.0.2.2 or the second IP from slirp4netns cidr subnet when changed, see the cidr option below). The default is false.
- - **mtu=MTU**: Specify the MTU to use for this network. (Default is `65520`).
- - **cidr=CIDR**: Specify ip range to use for this network. (Default is `10.0.2.0/24`).
- - **enable_ipv6=true|false**: Enable IPv6. Default is true. (Required for `outbound_addr6`).
- - **outbound_addr=INTERFACE**: Specify the outbound interface slirp should bind to (ipv4 traffic only).
- - **outbound_addr=IPv4**: Specify the outbound ipv4 address slirp should bind to.
- - **outbound_addr6=INTERFACE**: Specify the outbound interface slirp should bind to (ipv6 traffic only).
- - **outbound_addr6=IPv6**: Specify the outbound ipv6 address slirp should bind to.
- - **port_handler=rootlesskit**: Use rootlesskit for port forwarding. Default.
- Note: Rootlesskit changes the source IP address of incoming packets to an IP address in the container network namespace, usually `10.0.2.100`. If your application requires the real source IP address, e.g. web server logs, use the slirp4netns port handler. The rootlesskit port handler is also used for rootless containers when connected to user-defined networks.
- - **port_handler=slirp4netns**: Use the slirp4netns port forwarding, it is slower than rootlesskit but preserves the correct source IP address. This port handler cannot be used for user-defined networks.
+@@option network
+
+Invalid if using **--dns**, **--dns-option**, or **--dns-search** with **--network** set to **none** or **container:**_id_.
@@option network-alias
diff --git a/docs/source/markdown/podman-pod-rm.1.md.in b/docs/source/markdown/podman-pod-rm.1.md.in
index 5d708b65c..abfa97f5b 100644
--- a/docs/source/markdown/podman-pod-rm.1.md.in
+++ b/docs/source/markdown/podman-pod-rm.1.md.in
@@ -27,9 +27,9 @@ Instead of providing the pod name or ID, remove the last created pod. (This opti
@@option pod-id-file.pod
-#### **--time**, **-t**=*seconds*
+@@option time
-Seconds to wait before forcibly stopping running containers within the pod. The --force option must be specified to use the --time option.
+The --force option must be specified to use the --time option.
## EXAMPLE
diff --git a/docs/source/markdown/podman-pod-stop.1.md.in b/docs/source/markdown/podman-pod-stop.1.md.in
index 575a5fa30..e6ffa4f76 100644
--- a/docs/source/markdown/podman-pod-stop.1.md.in
+++ b/docs/source/markdown/podman-pod-stop.1.md.in
@@ -23,9 +23,7 @@ Instead of providing the pod name or ID, stop the last created pod. (This option
@@option pod-id-file.pod
-#### **--time**, **-t**=*seconds*
-
-Seconds to wait before forcibly stopping the containers in the pod.
+@@option time
## EXAMPLE
diff --git a/docs/source/markdown/podman-pull.1.md.in b/docs/source/markdown/podman-pull.1.md.in
index 46adec97b..2add9d703 100644
--- a/docs/source/markdown/podman-pull.1.md.in
+++ b/docs/source/markdown/podman-pull.1.md.in
@@ -73,9 +73,7 @@ Suppress output information when pulling images
@@option tls-verify
-#### **--variant**=*VARIANT*
-
-Use _VARIANT_ instead of the default architecture variant of the container image. Some images can use multiple variants of the arm architectures, such as arm/v5 and arm/v7.
+@@option variant.container
## FILES
diff --git a/docs/source/markdown/podman-push.1.md.in b/docs/source/markdown/podman-push.1.md.in
index c679950f7..b5f78d0ed 100644
--- a/docs/source/markdown/podman-push.1.md.in
+++ b/docs/source/markdown/podman-push.1.md.in
@@ -56,9 +56,7 @@ $ podman push myimage oci-archive:/tmp/myimage
Compress tarball image layers when pushing to a directory using the 'dir' transport. (default is same compression type, compressed or uncompressed, as source)
Note: This flag can only be set when using the **dir** transport
-#### **--compression-format**=**gzip** | *zstd* | *zstd:chunked*
-
-Specifies the compression format to use. Supported values are: `gzip`, `zstd` and `zstd:chunked`. The default is `gzip` unless overridden in the containers.conf file.
+@@option compression-format
@@option creds
@@ -86,9 +84,7 @@ Add a “simple signing” signature at the destination using the specified key.
Add a sigstore signature at the destination using a private key at the specified path. (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines)
-#### **--sign-passphrase-file**=*path*
-
-If signing the image (using either **--sign-by** or **--sign-by-sigstore-private-key**), read the passphrase to use from the specified path.
+@@option sign-passphrase-file
@@option tls-verify
diff --git a/docs/source/markdown/podman-restart.1.md b/docs/source/markdown/podman-restart.1.md.in
index 513b9a1bf..71543ef6a 100644
--- a/docs/source/markdown/podman-restart.1.md
+++ b/docs/source/markdown/podman-restart.1.md.in
@@ -56,9 +56,7 @@ to run containers such as CRI-O, the last started container could be from either
Restart all containers that are already in the *running* state.
-#### **--time**, **-t**=*seconds*
-
-Seconds to wait before forcibly stopping the container.
+@@option time
## EXAMPLES
diff --git a/docs/source/markdown/podman-rm.1.md.in b/docs/source/markdown/podman-rm.1.md.in
index 6f4366ce9..b3bff4934 100644
--- a/docs/source/markdown/podman-rm.1.md.in
+++ b/docs/source/markdown/podman-rm.1.md.in
@@ -63,9 +63,9 @@ whose OCI runtime has become unavailable.
Instead of providing the container name or ID, use the last created container. If you use methods other than Podman
to run containers such as CRI-O, the last started container could be from either of those methods. (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines)
-#### **--time**, **-t**=*seconds*
+@@option time
-Seconds to wait before forcibly stopping the container. The --force option must be specified to use the --time option.
+The --force option must be specified to use the --time option.
#### **--volumes**, **-v**
diff --git a/docs/source/markdown/podman-run.1.md.in b/docs/source/markdown/podman-run.1.md.in
index 95ee595d9..d596ee902 100644
--- a/docs/source/markdown/podman-run.1.md.in
+++ b/docs/source/markdown/podman-run.1.md.in
@@ -249,22 +249,7 @@ Print usage statement
@@option log-driver
-#### **--log-opt**=*name=value*
-
-Logging driver specific options.
-
-Set custom logging configuration. The following *name*s are supported:
-
-**path**: specify a path to the log file
- (e.g. **--log-opt path=/var/log/container/mycontainer.json**);
-
-**max-size**: specify a max size of the log file
- (e.g. **--log-opt max-size=10mb**);
-
-**tag**: specify a custom log tag for the container
- (e.g. **--log-opt tag="{{.ImageName}}"**.
-
-This option is currently supported only by the **journald** log driver.
+@@option log-opt
@@option mac-address
@@ -280,38 +265,11 @@ This option is currently supported only by the **journald** log driver.
@@option name.container
-#### **--network**=*mode*, **--net**
-
-Set the network mode for the container. Invalid if using **--dns**, **--dns-option**, or **--dns-search** with **--network** set to **none** or **container:**_id_. If used together with **--pod**, the container will not join the pod's network namespace.
-
-Valid _mode_ values are:
-
-- **bridge[:OPTIONS,...]**: Create a network stack on the default bridge. This is the default for rootful containers. It is possible to specify these additional options:
- - **alias=name**: Add network-scoped alias for the container.
- - **ip=IPv4**: Specify a static ipv4 address for this container.
- - **ip=IPv6**: Specify a static ipv6 address for this container.
- - **mac=MAC**: Specify a static mac address for this container.
- - **interface_name**: Specify a name for the created network interface inside the container.
-
- For example to set a static ipv4 address and a static mac address, use `--network bridge:ip=10.88.0.10,mac=44:33:22:11:00:99`.
-- \<network name or ID\>[:OPTIONS,...]: Connect to a user-defined network; this is the network name or ID from a network created by **[podman network create](podman-network-create.1.md)**. Using the network name implies the bridge network mode. It is possible to specify the same options described under the bridge mode above. You can use the **--network** option multiple times to specify additional networks.
-- **none**: Create a network namespace for the container but do not configure network interfaces for it, thus the container has no network connectivity.
-- **container:**_id_: Reuse another container's network stack.
-- **host**: Do not create a network namespace, the container will use the host's network. Note: The host mode gives the container full access to local system services such as D-bus and is therefore considered insecure.
-- **ns:**_path_: Path to a network namespace to join.
-- **private**: Create a new namespace for the container. This will use the **bridge** mode for rootful containers and **slirp4netns** for rootless ones.
-- **slirp4netns[:OPTIONS,...]**: use **slirp4netns**(1) to create a user network stack. This is the default for rootless containers. It is possible to specify these additional options, they can also be set with `network_cmd_options` in containers.conf:
- - **allow_host_loopback=true|false**: Allow slirp4netns to reach the host loopback IP (default is 10.0.2.2 or the second IP from slirp4netns cidr subnet when changed, see the cidr option below). The default is false.
- - **mtu=MTU**: Specify the MTU to use for this network. (Default is `65520`).
- - **cidr=CIDR**: Specify ip range to use for this network. (Default is `10.0.2.0/24`).
- - **enable_ipv6=true|false**: Enable IPv6. Default is true. (Required for `outbound_addr6`).
- - **outbound_addr=INTERFACE**: Specify the outbound interface slirp should bind to (ipv4 traffic only).
- - **outbound_addr=IPv4**: Specify the outbound ipv4 address slirp should bind to.
- - **outbound_addr6=INTERFACE**: Specify the outbound interface slirp should bind to (ipv6 traffic only).
- - **outbound_addr6=IPv6**: Specify the outbound ipv6 address slirp should bind to.
- - **port_handler=rootlesskit**: Use rootlesskit for port forwarding. Default.
- Note: Rootlesskit changes the source IP address of incoming packets to an IP address in the container network namespace, usually `10.0.2.100`. If your application requires the real source IP address, e.g. web server logs, use the slirp4netns port handler. The rootlesskit port handler is also used for rootless containers when connected to user-defined networks.
- - **port_handler=slirp4netns**: Use the slirp4netns port forwarding, it is slower than rootlesskit but preserves the correct source IP address. This port handler cannot be used for user-defined networks.
+@@option network
+
+Invalid if using **--dns**, **--dns-option**, or **--dns-search** with **--network** set to **none** or **container:**_id_.
+
+If used together with **--pod**, the container will not join the pod's network namespace.
@@option network-alias
@@ -344,11 +302,7 @@ This is used to override the Podman provided user setup in favor of entrypoint c
@@option platform
-#### **--pod**=*name*
-
-Run container in an existing pod. If you want Podman to make the pod for you, prefix the pod name with **new:**.
-To make a pod with more granular options, use the **podman pod create** command before creating a container.
-If a container is run with a pod, and the pod has an infra-container, the infra-container will be started before the container is.
+@@option pod.run
@@option pod-id-file.container
@@ -481,8 +435,7 @@ echo "asdf" | podman run --rm -i someimage /bin/cat
@@option uts.container
-#### **--variant**=*VARIANT*
-Use _VARIANT_ instead of the default architecture variant of the container image. Some images can use multiple variants of the arm architectures, such as arm/v5 and arm/v7.
+@@option variant.container
@@option volume
diff --git a/docs/source/markdown/podman-stop.1.md.in b/docs/source/markdown/podman-stop.1.md.in
index 7b32ca4b0..ec5fd79b6 100644
--- a/docs/source/markdown/podman-stop.1.md.in
+++ b/docs/source/markdown/podman-stop.1.md.in
@@ -54,9 +54,7 @@ Valid filters are listed below:
Instead of providing the container name or ID, use the last created container. If you use methods other than Podman
to run containers such as CRI-O, the last started container could be from either of those methods. (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines)
-#### **--time**, **-t**=*seconds*
-
-Seconds to wait before forcibly stopping the container
+@@option time
## EXAMPLES
diff --git a/go.mod b/go.mod
index 6b675369c..07fd3433e 100644
--- a/go.mod
+++ b/go.mod
@@ -11,13 +11,13 @@ require (
github.com/container-orchestrated-devices/container-device-interface v0.5.2
github.com/containernetworking/cni v1.1.2
github.com/containernetworking/plugins v1.1.1
- github.com/containers/buildah v1.27.1-0.20220921131114-d3064796af36
- github.com/containers/common v0.49.2-0.20220926195839-590004b80685
+ github.com/containers/buildah v1.28.0
+ github.com/containers/common v0.50.1
github.com/containers/conmon v2.0.20+incompatible
- github.com/containers/image/v5 v5.22.1-0.20220919112403-fe51f7ffca50
+ github.com/containers/image/v5 v5.23.0
github.com/containers/ocicrypt v1.1.5
github.com/containers/psgo v1.7.3
- github.com/containers/storage v1.42.1-0.20220919112236-8a581aac3bdf
+ github.com/containers/storage v1.43.0
github.com/coreos/go-systemd/v22 v22.4.0
github.com/coreos/stream-metadata-go v0.0.0-20210225230131-70edb9eb47b3
github.com/cyphar/filepath-securejoin v0.2.3
@@ -44,11 +44,11 @@ require (
github.com/onsi/ginkgo v1.16.5
github.com/onsi/gomega v1.20.2
github.com/opencontainers/go-digest v1.0.0
- github.com/opencontainers/image-spec v1.0.3-0.20220114050600-8b9d41f48198
+ github.com/opencontainers/image-spec v1.1.0-rc2
github.com/opencontainers/runc v1.1.4
github.com/opencontainers/runtime-spec v1.0.3-0.20211214071223-8958f93039ab
github.com/opencontainers/runtime-tools v0.9.1-0.20220714195903-17b3287fafb7
- github.com/opencontainers/selinux v1.10.1
+ github.com/opencontainers/selinux v1.10.2
github.com/openshift/imagebuilder v1.2.4-0.20220711175835-4151e43600df
github.com/rootless-containers/rootlesskit v1.0.1
github.com/sirupsen/logrus v1.9.0
@@ -62,7 +62,7 @@ require (
github.com/vishvananda/netlink v1.1.1-0.20220115184804-dd687eb2f2d4
go.etcd.io/bbolt v1.3.6
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4
- golang.org/x/sys v0.0.0-20220909162455-aba9fc2a8ff2
+ golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8
golang.org/x/term v0.0.0-20220526004731-065cf7ba2467
golang.org/x/text v0.3.7
google.golang.org/protobuf v1.28.1
@@ -86,7 +86,7 @@ require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/digitalocean/go-libvirt v0.0.0-20201209184759-e2a69bcd5bd1 // indirect
github.com/disiqueira/gotree/v3 v3.0.2 // indirect
- github.com/docker/docker-credential-helpers v0.6.4 // indirect
+ github.com/docker/docker-credential-helpers v0.7.0 // indirect
github.com/felixge/httpsnoop v1.0.3 // indirect
github.com/fsouza/go-dockerclient v1.8.3 // indirect
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 // indirect
@@ -100,8 +100,8 @@ require (
github.com/imdario/mergo v0.3.13 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/jinzhu/copier v0.3.5 // indirect
- github.com/klauspost/compress v1.15.10 // indirect
- github.com/klauspost/pgzip v1.2.5 // indirect
+ github.com/klauspost/compress v1.15.11 // indirect
+ github.com/klauspost/pgzip v1.2.6-0.20220930104621-17e8dac29df8 // indirect
github.com/kr/fs v0.1.0 // indirect
github.com/letsencrypt/boulder v0.0.0-20220723181115-27de4befb95e // indirect
github.com/manifoldco/promptui v0.9.0 // indirect
@@ -122,11 +122,11 @@ require (
github.com/rivo/uniseg v0.2.0 // indirect
github.com/rogpeppe/go-internal v1.8.0 // indirect
github.com/seccomp/libseccomp-golang v0.10.0 // indirect
- github.com/sigstore/sigstore v1.4.1 // indirect
+ github.com/sigstore/sigstore v1.4.2 // indirect
github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980 // indirect
- github.com/sylabs/sif/v2 v2.7.2 // indirect
+ github.com/sylabs/sif/v2 v2.8.0 // indirect
github.com/tchap/go-patricia v2.3.0+incompatible // indirect
- github.com/theupdateframework/go-tuf v0.5.0 // indirect
+ github.com/theupdateframework/go-tuf v0.5.1 // indirect
github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 // indirect
github.com/vbatts/tar-split v0.11.2 // indirect
github.com/vishvananda/netns v0.0.0-20210104183010-2eb08e3e575f // indirect
@@ -136,8 +136,8 @@ require (
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
go.mozilla.org/pkcs7 v0.0.0-20210826202110-33d05740a352 // indirect
go.opencensus.io v0.23.0 // indirect
- golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 // indirect
- golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b // indirect
+ golang.org/x/crypto v0.0.0-20220919173607-35f4265a4bc0 // indirect
+ golang.org/x/net v0.0.0-20220909164309-bea034e7d591 // indirect
golang.org/x/tools v0.1.12 // indirect
google.golang.org/genproto v0.0.0-20220720214146-176da50484ac // indirect
google.golang.org/grpc v1.48.0 // indirect
diff --git a/go.sum b/go.sum
index 1ed28a7ba..8d7bc5cb7 100644
--- a/go.sum
+++ b/go.sum
@@ -192,33 +192,23 @@ github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZo
github.com/aws/aws-sdk-go v1.23.20/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
github.com/aws/aws-sdk-go v1.25.37/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
github.com/aws/aws-sdk-go v1.36.30/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=
-github.com/aws/aws-sdk-go v1.44.76/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo=
-github.com/aws/aws-sdk-go v1.44.96/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo=
-github.com/aws/aws-sdk-go-v2 v1.16.11/go.mod h1:WTACcleLz6VZTp7fak4EO5b9Q4foxbn+8PIz3PmyKlo=
-github.com/aws/aws-sdk-go-v2 v1.16.14/go.mod h1:s/G+UV29dECbF5rf+RNj1xhlmvoNurGSr+McVSRj59w=
-github.com/aws/aws-sdk-go-v2/config v1.17.0/go.mod h1:4SKzBMiB8lV0fw2w7eDBo/LjQyHFITN4vUUuqpurFmI=
-github.com/aws/aws-sdk-go-v2/config v1.17.5/go.mod h1:H0cvPNDO3uExWts/9PDhD/0ne2esu1uaIulwn1vkwxM=
-github.com/aws/aws-sdk-go-v2/credentials v1.12.13/go.mod h1:9fDEemXizwXrxPU1MTzv69LP/9D8HVl5qHAQO9A9ikY=
-github.com/aws/aws-sdk-go-v2/credentials v1.12.18/go.mod h1:O7n/CPagQ33rfG6h7vR/W02ammuc5CrsSM22cNZp9so=
-github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.12/go.mod h1:aZ4vZnyUuxedC7eD4JyEHpGnCz+O2sHQEx3VvAwklSE=
-github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.15/go.mod h1:Oz2/qWINxIgSmoZT9adpxJy2UhpcOAI3TIyWgYMVSz0=
-github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.18/go.mod h1:348MLhzV1GSlZSMusdwQpXKbhD7X2gbI/TxwAPKkYZQ=
-github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.21/go.mod h1:XsmHMV9c512xgsW01q7H0ut+UQQQpWX8QsFbdLHDwaU=
-github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.12/go.mod h1:ckaCVTEdGAxO6KwTGzgskxR1xM+iJW4lxMyDFVda2Fc=
-github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.15/go.mod h1:kjJ4CyD9M3Wq88GYg3IPfj67Rs0Uvz8aXK7MJ8BvE4I=
-github.com/aws/aws-sdk-go-v2/internal/ini v1.3.19/go.mod h1:cVHo8KTuHjShb9V8/VjH3S/8+xPu16qx8fdGwmotJhE=
-github.com/aws/aws-sdk-go-v2/internal/ini v1.3.22/go.mod h1:tltHVGy977LrSOgRR5aV9+miyno/Gul/uJNPKS7FzP4=
-github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.12/go.mod h1:1TODGhheLWjpQWSuhYuAUWYTCKwEjx2iblIFKDHjeTc=
-github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.15/go.mod h1:ZVJ7ejRl4+tkWMuCwjXoy0jd8fF5u3RCyWjSVjUIvQE=
-github.com/aws/aws-sdk-go-v2/service/kms v1.18.4/go.mod h1:WG8HUJKtDqXJM3+CNZeN+2wvdcJb5vprKo01fr1KQW4=
-github.com/aws/aws-sdk-go-v2/service/kms v1.18.9/go.mod h1:8sR6O18d56mlJf0VkYD7mOtrBoM//8eym7FcfG1t9Sc=
-github.com/aws/aws-sdk-go-v2/service/sso v1.11.16/go.mod h1:mS5xqLZc/6kc06IpXn5vRxdLaED+jEuaSRv5BxtnsiY=
-github.com/aws/aws-sdk-go-v2/service/sso v1.11.21/go.mod h1:q8nYq51W3gpZempYsAD83fPRlrOTMCwN+Ahg4BKFTXQ=
-github.com/aws/aws-sdk-go-v2/service/ssooidc v1.13.3/go.mod h1:+IF75RMJh0+zqTGXGshyEGRsU2ImqWv6UuHGkHl6kEo=
-github.com/aws/aws-sdk-go-v2/service/sts v1.16.13/go.mod h1:Ru3QVMLygVs/07UQ3YDur1AQZZp2tUNje8wfloFttC0=
-github.com/aws/aws-sdk-go-v2/service/sts v1.16.17/go.mod h1:bQujK1n0V1D1Gz5uII1jaB1WDvhj4/T3tElsJnVXCR0=
-github.com/aws/smithy-go v1.12.1/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA=
-github.com/aws/smithy-go v1.13.2/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA=
+github.com/aws/aws-sdk-go v1.44.102/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo=
+github.com/aws/aws-sdk-go-v2 v1.16.15/go.mod h1:SwiyXi/1zTUZ6KIAmLK5V5ll8SiURNUYOqTerZPaF9k=
+github.com/aws/aws-sdk-go-v2 v1.16.16/go.mod h1:SwiyXi/1zTUZ6KIAmLK5V5ll8SiURNUYOqTerZPaF9k=
+github.com/aws/aws-sdk-go-v2/config v1.17.7/go.mod h1:dN2gja/QXxFF15hQreyrqYhLBaQo1d9ZKe/v/uplQoI=
+github.com/aws/aws-sdk-go-v2/credentials v1.12.20/go.mod h1:UKY5HyIux08bbNA7Blv4PcXQ8cTkGh7ghHMFklaviR4=
+github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.17/go.mod h1:yIkQcCDYNsZfXpd5UX2Cy+sWA1jPgIhGTw9cOBzfVnQ=
+github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.22/go.mod h1:/vNv5Al0bpiF8YdX2Ov6Xy05VTiXsql94yUqJMYaj0w=
+github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.23/go.mod h1:2DFxAQ9pfIRy0imBCJv+vZ2X6RKxves6fbnEuSry6b4=
+github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.16/go.mod h1:62dsXI0BqTIGomDl8Hpm33dv0OntGaVblri3ZRParVQ=
+github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.17/go.mod h1:pRwaTYCJemADaqCbUAxltMoHKata7hmB5PjEXeu0kfg=
+github.com/aws/aws-sdk-go-v2/internal/ini v1.3.24/go.mod h1:jULHjqqjDlbyTa7pfM7WICATnOv+iOhjletM3N0Xbu8=
+github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.17/go.mod h1:4nYOrY41Lrbk2170/BGkcJKBhws9Pfn8MG3aGqjjeFI=
+github.com/aws/aws-sdk-go-v2/service/kms v1.18.10/go.mod h1:45pB2oUV71tilooilIi3dC1KVWWJHHhc7JnyqByuheo=
+github.com/aws/aws-sdk-go-v2/service/sso v1.11.23/go.mod h1:/w0eg9IhFGjGyyncHIQrXtU8wvNsTJOP0R6PPj0wf80=
+github.com/aws/aws-sdk-go-v2/service/ssooidc v1.13.5/go.mod h1:csZuQY65DAdFBt1oIjO5hhBR49kQqop4+lcuCjf2arA=
+github.com/aws/aws-sdk-go-v2/service/sts v1.16.19/go.mod h1:h4J3oPZQbxLhzGnk+j9dfYHi5qIOVJ5kczZd658/ydM=
+github.com/aws/smithy-go v1.13.3/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA=
github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4=
github.com/beeker1121/goque v1.0.3-0.20191103205551-d618510128af/go.mod h1:84CWnaDz4g1tEVnFLnuBigmGK15oPohy0RfvSN8d4eg=
github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM=
@@ -417,16 +407,14 @@ github.com/containernetworking/plugins v0.9.1/go.mod h1:xP/idU2ldlzN6m4p5LmGiwRD
github.com/containernetworking/plugins v1.0.1/go.mod h1:QHCfGpaTwYTbbH+nZXKVTxNBDZcxSOplJT5ico8/FLE=
github.com/containernetworking/plugins v1.1.1 h1:+AGfFigZ5TiQH00vhR8qPeSatj53eNGz0C1d3wVYlHE=
github.com/containernetworking/plugins v1.1.1/go.mod h1:Sr5TH/eBsGLXK/h71HeLfX19sZPp3ry5uHSkI4LPxV8=
-github.com/containers/buildah v1.27.1-0.20220921131114-d3064796af36 h1:LTSEbPUbs0slJSJ+IH6atAjYDe0IDzA0sPgBLjT1yAo=
-github.com/containers/buildah v1.27.1-0.20220921131114-d3064796af36/go.mod h1:cY3pGPyMmrNp/sEDK8ESoBOf4hoNovptZSI0oyo8eQM=
-github.com/containers/common v0.49.2-0.20220920205255-8062f81c5497/go.mod h1:ZnhOPR/07UOkfIg5bezUpBilGjxEUdaeoUpu7gRBGc0=
-github.com/containers/common v0.49.2-0.20220926195839-590004b80685 h1:rutCgIKcew85mTUO0JTnh7XDXQfaTz/qQ3HyQHb0jZE=
-github.com/containers/common v0.49.2-0.20220926195839-590004b80685/go.mod h1:ZnhOPR/07UOkfIg5bezUpBilGjxEUdaeoUpu7gRBGc0=
+github.com/containers/buildah v1.28.0 h1:63Kpf9nAEJGsDEOArb5Q0dn5S3B9wFQc9kST4nU7+Pw=
+github.com/containers/buildah v1.28.0/go.mod h1:pTYSfpf+Ha/KbnMmwhhhEjkSF3NuhpxZfiDNDORLgqY=
+github.com/containers/common v0.50.1 h1:AYRAf1xyahNVRez49KIkREInNf36SQx1lyLY9M95wQI=
+github.com/containers/common v0.50.1/go.mod h1:XnWlXPyE9Ky+8v8MfYWJZFnejkprAkUeo0DTWmSiwcY=
github.com/containers/conmon v2.0.20+incompatible h1:YbCVSFSCqFjjVwHTPINGdMX1F6JXHGTUje2ZYobNrkg=
github.com/containers/conmon v2.0.20+incompatible/go.mod h1:hgwZ2mtuDrppv78a/cOBNiCm6O0UMWGx1mu7P00nu5I=
-github.com/containers/image/v5 v5.22.1-0.20220907162003-651744379993/go.mod h1:/Ruurd87C6Ap45t1PWNOD8+SGwiZbk79XCgs1iUTvYA=
-github.com/containers/image/v5 v5.22.1-0.20220919112403-fe51f7ffca50 h1:tUKgZs27sh7EdolUQdjcyOF2+XPmCJF6/797+mkJZ0M=
-github.com/containers/image/v5 v5.22.1-0.20220919112403-fe51f7ffca50/go.mod h1:yA5N2XShBHbvlhp51kNABiFPmnRLpDRHV++zmMQn3eE=
+github.com/containers/image/v5 v5.23.0 h1:Uv/n8zsHVUBBJK2rfBUHbN4CutHHmsQeyi4f80lAOf8=
+github.com/containers/image/v5 v5.23.0/go.mod h1:EXFFGEsL99S6aqLqK2mQJ3yrNh6Q05UCHt4mhF9JNoM=
github.com/containers/libtrust v0.0.0-20200511145503-9c3a6c22cd9a h1:spAGlqziZjCJL25C6F1zsQY05tfCKE9F5YwtEWWe6hU=
github.com/containers/libtrust v0.0.0-20200511145503-9c3a6c22cd9a/go.mod h1:9rfv8iPl1ZP7aqh9YA68wnZv2NUDbXdcdPHVz0pFbPY=
github.com/containers/ocicrypt v1.0.1/go.mod h1:MeJDzk1RJHv89LjsH0Sp5KTY3ZYkjXO/C+bKAeWFIrc=
@@ -440,9 +428,8 @@ github.com/containers/psgo v1.7.3 h1:KTNurTMXpZjDJHWmlieVO7k7jgKJ4CR/HpPeSaAKtgc
github.com/containers/psgo v1.7.3/go.mod h1:PfaNzzHmMb8M9/blPgyD4BB3ZEj/0ApZIxN6nNtA+t4=
github.com/containers/storage v1.37.0/go.mod h1:kqeJeS0b7DO2ZT1nVWs0XufrmPFbgV3c+Q/45RlH6r4=
github.com/containers/storage v1.42.0/go.mod h1:JiUJwOgOo1dr2DdOUc1MRe2GCAXABYoYmOdPF8yvH78=
-github.com/containers/storage v1.42.1-0.20220907083030-5aff7f62e8d0/go.mod h1:nj2fW3rgwkr6toBVFzv5OqUYs1kowX+AMiPjgv2UXN0=
-github.com/containers/storage v1.42.1-0.20220919112236-8a581aac3bdf h1:CnGYVAFSZgwYdYHnJJhVnhxtrggWsgwooG/Be1LxWGI=
-github.com/containers/storage v1.42.1-0.20220919112236-8a581aac3bdf/go.mod h1:uZ147thiIFGdVTjMmIw19knttQnUCl3y9zjreHrg11s=
+github.com/containers/storage v1.43.0 h1:P+zulGXA3mqe2GnYmZU0xu87Wy1M0PVHM2ucrgmvTdU=
+github.com/containers/storage v1.43.0/go.mod h1:uZ147thiIFGdVTjMmIw19knttQnUCl3y9zjreHrg11s=
github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
@@ -451,7 +438,6 @@ github.com/coreos/go-iptables v0.4.5/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmeka
github.com/coreos/go-iptables v0.5.0/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU=
github.com/coreos/go-iptables v0.6.0/go.mod h1:Qe8Bv2Xik5FyTXwgIbLAnv2sWSBmvWdFETJConOQ//Q=
github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc=
-github.com/coreos/go-oidc/v3 v3.2.0/go.mod h1:rEJ/idjfUyfkBit1eI1fvyr+64/g9dcKpAm8MJMesvo=
github.com/coreos/go-oidc/v3 v3.4.0/go.mod h1:eHUXhZtXPQLgEaDrOVTgwbgmz1xGOkJNye6h3zkD2Pw=
github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
@@ -487,6 +473,7 @@ github.com/d2g/dhcp4server v0.0.0-20181031114812-7d4a0a7f59a5/go.mod h1:Eo87+Kg/
github.com/d2g/hardwareaddr v0.0.0-20190221164911-e7d9fbe030e4/go.mod h1:bMl4RjIciD2oAxI7DmWRx6gbeqrkoLqv3MV0vzNad+I=
github.com/daixiang0/gci v0.2.9/go.mod h1:+4dZ7TISfSmqfAGv59ePaHfNzgGtIkHAhhdKggP1JAc=
github.com/danieljoos/wincred v1.1.0/go.mod h1:XYlo+eRTsVA9aHGp7NGjFkPla4m+DCL7hqDjlFjiygg=
+github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0=
github.com/davecgh/go-spew v0.0.0-20161028175848-04cdfd42973b/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
@@ -518,8 +505,9 @@ github.com/docker/docker v20.10.17+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05
github.com/docker/docker v20.10.18+incompatible h1:SN84VYXTBNGn92T/QwIRPlum9zfemfitN7pbsp26WSc=
github.com/docker/docker v20.10.18+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
github.com/docker/docker-credential-helpers v0.6.3/go.mod h1:WRaJzqw3CTB9bk10avuGsjVBZsD05qeibJ1/TYlvc0Y=
-github.com/docker/docker-credential-helpers v0.6.4 h1:axCks+yV+2MR3/kZhAmy07yC56WZ2Pwu/fKWtKuZB0o=
github.com/docker/docker-credential-helpers v0.6.4/go.mod h1:ofX3UI0Gz1TteYBjtgs07O36Pyasyp66D2uKT7H8W1c=
+github.com/docker/docker-credential-helpers v0.7.0 h1:xtCHsjxogADNZcdv1pKUHXryefjlVRqWqIhk/uXJp0A=
+github.com/docker/docker-credential-helpers v0.7.0/go.mod h1:rETQfLdHNT3foU5kuNkFR1R1V12OJRRO5lzt2D1b5X0=
github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec=
github.com/docker/go-connections v0.4.1-0.20210727194412-58542c764a11 h1:IPrmumsT9t5BS7XcPhgsCTlkWbYg80SEXUzDpReaU6Y=
github.com/docker/go-connections v0.4.1-0.20210727194412-58542c764a11/go.mod h1:a6bNUGTbQBsY6VRHTr4h/rkOXjl244DyRD0tx3fgq4Q=
@@ -651,7 +639,6 @@ github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+
github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4=
github.com/go-redis/redis v6.15.8+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA=
github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo=
-github.com/go-rod/rod v0.109.1/go.mod h1:GZDtmEs6RpF6kBRYpGCZXxXlKNneKVPiKOjaMbmVVjE=
github.com/go-rod/rod v0.109.3/go.mod h1:GZDtmEs6RpF6kBRYpGCZXxXlKNneKVPiKOjaMbmVVjE=
github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
@@ -927,7 +914,7 @@ github.com/hashicorp/go-hclog v0.16.2/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39
github.com/hashicorp/go-hclog v1.2.1/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M=
github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
-github.com/hashicorp/go-kms-wrapping/entropy v0.1.0/go.mod h1:d1g9WGtAunDNpek8jUIEJnBlbgKS1N2Q61QkHiZyR1g=
+github.com/hashicorp/go-kms-wrapping/entropy/v2 v2.0.0/go.mod h1:xvb32K2keAc+R8DSFG2IwDcydK9DBQE+fGA5fsw6hSk=
github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM=
github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I=
github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
@@ -972,9 +959,8 @@ github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2p
github.com/hashicorp/memberlist v0.2.2/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE=
github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=
github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk=
-github.com/hashicorp/vault/api v1.7.2/go.mod h1:xbfA+1AvxFseDzxxdWaL0uO99n1+tndus4GCrtouy0M=
-github.com/hashicorp/vault/sdk v0.5.1/go.mod h1:DoGraE9kKGNcVgPmTuX357Fm6WAx1Okvde8Vp3dPDoU=
-github.com/hashicorp/vault/sdk v0.5.3/go.mod h1:DoGraE9kKGNcVgPmTuX357Fm6WAx1Okvde8Vp3dPDoU=
+github.com/hashicorp/vault/api v1.8.0/go.mod h1:uJrw6D3y9Rv7hhmS17JQC50jbPDAZdjZoTtrCCxxs7E=
+github.com/hashicorp/vault/sdk v0.6.0/go.mod h1:+DRpzoXIdMvKc88R4qxr+edwy/RvH5QK8itmxLiDHLc=
github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM=
github.com/hashicorp/yamux v0.1.0/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ=
github.com/honeycombio/beeline-go v1.1.1/go.mod h1:kN0cfUGBMfA87DyCYbiiLoSzWsnw3bluZvNEWtatHxk=
@@ -1123,10 +1109,11 @@ github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47e
github.com/klauspost/compress v1.15.7/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU=
github.com/klauspost/compress v1.15.8/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU=
github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU=
-github.com/klauspost/compress v1.15.10 h1:Ai8UzuomSCDw90e1qNMtb15msBXsNpH6gzkkENQNcJo=
-github.com/klauspost/compress v1.15.10/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM=
-github.com/klauspost/pgzip v1.2.5 h1:qnWYvvKqedOF2ulHpMG72XQol4ILEJ8k2wwRl/Km8oE=
+github.com/klauspost/compress v1.15.11 h1:Lcadnb3RKGin4FYM/orgq0qde+nc15E5Cbqg4B9Sx9c=
+github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM=
github.com/klauspost/pgzip v1.2.5/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs=
+github.com/klauspost/pgzip v1.2.6-0.20220930104621-17e8dac29df8 h1:BcxbplxjtczA1a6d3wYoa7a0WL3rq9DKBMGHeKyjEF0=
+github.com/klauspost/pgzip v1.2.6-0.20220930104621-17e8dac29df8/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
@@ -1388,8 +1375,10 @@ github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zM
github.com/opencontainers/image-spec v1.0.2-0.20211117181255-693428a734f5/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0=
github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0=
github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0=
-github.com/opencontainers/image-spec v1.0.3-0.20220114050600-8b9d41f48198 h1:+czc/J8SlhPKLOtVLMQc+xDCFBT73ZStMsRhSsUhsSg=
github.com/opencontainers/image-spec v1.0.3-0.20220114050600-8b9d41f48198/go.mod h1:j4h1pJW6ZcJTgMZWP3+7RlG3zTaP02aDZ/Qw0sppK7Q=
+github.com/opencontainers/image-spec v1.1.0-rc1/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ=
+github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034=
+github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ=
github.com/opencontainers/runc v1.1.1-0.20220617142545-8b9452f75cbc h1:qjkUzmFsOFbQyjObybk40mRida83j5IHRaKzLGdBbEU=
github.com/opencontainers/runc v1.1.1-0.20220617142545-8b9452f75cbc/go.mod h1:wUOQGsiKae6VzA/UvlCK3cO+pHk8F2VQHlIoITEfMM8=
github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
@@ -1411,8 +1400,9 @@ github.com/opencontainers/selinux v1.8.2/go.mod h1:MUIHuUEvKB1wtJjQdOyYRgOnLD2xA
github.com/opencontainers/selinux v1.8.5/go.mod h1:HTvjPFoGMbpQsG886e3lQwnsRWtE4TC1OF3OUvG9FAo=
github.com/opencontainers/selinux v1.9.1/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI=
github.com/opencontainers/selinux v1.10.0/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI=
-github.com/opencontainers/selinux v1.10.1 h1:09LIPVRP3uuZGQvgR+SgMSNBd1Eb3vlRbGqQpoHsF8w=
github.com/opencontainers/selinux v1.10.1/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI=
+github.com/opencontainers/selinux v1.10.2 h1:NFy2xCsjn7+WspbfZkUd5zyVeisV7VFbPSP96+8/ha4=
+github.com/opencontainers/selinux v1.10.2/go.mod h1:cARutUbaUrlRClyvxOICCgKixCs6L05aUsohzA3EkHQ=
github.com/openshift/imagebuilder v1.2.4-0.20220711175835-4151e43600df h1:vf6pdI10F2Tim5a9JKiVVl4/dpNz1OEhz4EnfLdLtiA=
github.com/openshift/imagebuilder v1.2.4-0.20220711175835-4151e43600df/go.mod h1:TRYHe4CH9U6nkDjxjBNM5klrLbJBrRbpJE5SaRwUBsQ=
github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
@@ -1560,9 +1550,8 @@ github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFR
github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk=
github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ=
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
-github.com/sigstore/sigstore v1.4.0/go.mod h1:z3kt1jm2A39M+g7emkQ8jdErL/haCMEjkNxvqTf41/k=
-github.com/sigstore/sigstore v1.4.1 h1:e/tfXseQRymIjgiykskciGrp75AZVCfYokZ2r9tg5vw=
-github.com/sigstore/sigstore v1.4.1/go.mod h1:4+s4d6oTDdoQkf5lwpZBoOlWWV+hXhur1my9WdN5PjU=
+github.com/sigstore/sigstore v1.4.2 h1:fTppzuZBAmQ/skgl7FWJRLyby70pxCqJGKyWfkSuMR8=
+github.com/sigstore/sigstore v1.4.2/go.mod h1:wCv58Fia7u1snVJyPcxdgIh/3uw1XdOLhxPExTwwyt4=
github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc=
github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc=
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
@@ -1640,15 +1629,14 @@ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1F
github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
-github.com/sylabs/sif/v2 v2.7.2 h1:eCxtl2ub9fPfrO7g2JPagn6HKDhv+Kl92Jz6+ww2Y1Q=
-github.com/sylabs/sif/v2 v2.7.2/go.mod h1:LQOdYXC9a8i7BleTKRw9lohi0rTbXkJOeS9u0ebvgyM=
+github.com/sylabs/sif/v2 v2.8.0 h1:FIfWA1fYSFynKD1LJwGbWJ2ib8ylT8XwZl9naLlciPE=
+github.com/sylabs/sif/v2 v2.8.0/go.mod h1:LQOdYXC9a8i7BleTKRw9lohi0rTbXkJOeS9u0ebvgyM=
github.com/sylvia7788/contextcheck v1.0.4/go.mod h1:vuPKJMQ7MQ91ZTqfdyreNKwZjyUg6KO+IebVyQDedZQ=
github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 h1:kdXcSzyDtseVEc4yCz2qF8ZrQvIDBJLl4S1c3GCXmoI=
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ=
-github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc=
github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d/go.mod h1:RRCYJbIwD5jmqPI9XoAFR0OcDxqUctll6zUj/+B4S48=
github.com/tchap/go-patricia v2.2.6+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ23RP/odRBOTVjwp2cDyi6I=
github.com/tchap/go-patricia v2.3.0+incompatible h1:GkY4dP3cEfEASBPPkWd+AmjYxhmDkqO9/zg7R0lSQRs=
@@ -1657,10 +1645,9 @@ github.com/tdakkota/asciicheck v0.0.0-20200416200610-e657995f937b/go.mod h1:yHp0
github.com/tenntenn/modver v1.0.1/go.mod h1:bePIyQPb7UeioSRkw3Q0XeMhYZSMx9B8ePqg6SAMGH0=
github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3/go.mod h1:ON8b8w4BN/kE1EOhwT0o+d62W65a6aPw1nouo9LMgyY=
github.com/tetafro/godot v1.4.11/go.mod h1:LR3CJpxDVGlYOWn3ZZg1PgNZdTUvzsZWu8xaEohUpn8=
-github.com/theupdateframework/go-tuf v0.3.1/go.mod h1:lhHZ3Vt2pdAh15h0Cc6gWdlI+Okn2ZznD3q/cNjd5jw=
-github.com/theupdateframework/go-tuf v0.4.0/go.mod h1:kfQTX2LhNeK/cp03OBiZHoua0Pp2l9w4ShRwFtc0oKg=
-github.com/theupdateframework/go-tuf v0.5.0 h1:aQ7i9CBw4q9QEZifCaW6G8qGQwoN23XGaZkOA+F50z4=
-github.com/theupdateframework/go-tuf v0.5.0/go.mod h1:vAqWV3zEs89byeFsAYoh/Q14vJTgJkHwnnRCWBBBINY=
+github.com/theupdateframework/go-tuf v0.5.1-0.20220920170306-f237d7ca5b42/go.mod h1:vAqWV3zEs89byeFsAYoh/Q14vJTgJkHwnnRCWBBBINY=
+github.com/theupdateframework/go-tuf v0.5.1 h1:kd8in4+boNxtYf8AYPbm9//Ps75RG5yURkN9Fng4Qs4=
+github.com/theupdateframework/go-tuf v0.5.1/go.mod h1:vAqWV3zEs89byeFsAYoh/Q14vJTgJkHwnnRCWBBBINY=
github.com/timakin/bodyclose v0.0.0-20200424151742-cb6215831a94/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk=
github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 h1:e/5i7d4oYZ+C1wj2THlRK+oAhjeS/TRQwMfkIuet3w0=
github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399/go.mod h1:LdwHTNJT99C5fTAzDz0ud328OgXz+gierycbcIx2fRs=
@@ -1703,7 +1690,6 @@ github.com/valyala/quicktemplate v1.7.0/go.mod h1:sqKJnoaOF88V07vkO+9FL8fb9uZg/V
github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc=
github.com/vbatts/tar-split v0.11.2 h1:Via6XqJr0hceW4wff3QRzD5gAk/tatMw/4ZA7cTlIME=
github.com/vbatts/tar-split v0.11.2/go.mod h1:vV3ZuO2yWSVsz+pfFzDG/upWH1JhjOiEaWq6kXyQ3VI=
-github.com/vbauerster/mpb/v7 v7.5.2/go.mod h1:UmOiIUI8aPqWXIps0ciik3RKMdzx7+ooQpq+fBcXwBA=
github.com/vbauerster/mpb/v7 v7.5.3 h1:BkGfmb6nMrrBQDFECR/Q7RkKCw7ylMetCb4079CGs4w=
github.com/vbauerster/mpb/v7 v7.5.3/go.mod h1:i+h4QY6lmLvBNK2ah1fSreiw3ajskRlBp9AhY/PnuOE=
github.com/viki-org/dnscache v0.0.0-20130720023526-c70c1f23c5d8/go.mod h1:dniwbG03GafCjFohMDmz6Zc6oCuiqgH6tGNyXTkHzXE=
@@ -1873,8 +1859,8 @@ golang.org/x/crypto v0.0.0-20211117183948-ae814b36b871/go.mod h1:IxCIyHEi3zRg3s0
golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
-golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 h1:Y/gsMcFOcR+6S6f3YeMKl5g+dZMEWqcz5Czj/GWYbkM=
-golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
+golang.org/x/crypto v0.0.0-20220919173607-35f4265a4bc0 h1:a5Yg6ylndHHYJqIPrdq0AhvR6KTvDTAvgBtaidhEevY=
+golang.org/x/crypto v0.0.0-20220919173607-35f4265a4bc0/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
@@ -1952,14 +1938,12 @@ golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLL
golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
-golang.org/x/net v0.0.0-20200505041828-1ed23360d12c/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
-golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20201006153459-a7d1128ccaa0/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
@@ -1997,8 +1981,9 @@ golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug
golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.0.0-20220708220712-1185a9018129/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
-golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b h1:ZmngSVLe/wycRns9MKikG9OWIEjGcGAkacif7oYQaUY=
golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
+golang.org/x/net v0.0.0-20220909164309-bea034e7d591 h1:D0B/7al0LLrVC8aWF4+oxpv/m8bc7ViFfVS8/gXGdqI=
+golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -2109,7 +2094,6 @@ golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200817155316-9781c653f443/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -2154,6 +2138,7 @@ golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210816074244-15123e1e1f71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210820121016-41cdb8703e55/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
@@ -2192,9 +2177,10 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220823224334-20c2bfdbfe24/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20220907062415-87db552b00fd/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20220909162455-aba9fc2a8ff2 h1:wM1k/lXfpc5HdkJJyW9GELpd8ERGdnh8sMGL6Gzq3Ho=
+golang.org/x/sys v0.0.0-20220825204002-c680a09ffe64/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220909162455-aba9fc2a8ff2/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8 h1:h+EGohizhe9XlX18rfpa8k8RAc5XyaeamM+0VHRd4lc=
+golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
@@ -2395,8 +2381,7 @@ google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3
google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o=
google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g=
google.golang.org/api v0.86.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw=
-google.golang.org/api v0.92.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw=
-google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI=
+google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
diff --git a/libpod/container_inspect.go b/libpod/container_inspect.go
index e4089efa6..4dc1ca3a5 100644
--- a/libpod/container_inspect.go
+++ b/libpod/container_inspect.go
@@ -166,6 +166,15 @@ func (c *Container) getContainerInspectData(size bool, driverData *define.Driver
IsInfra: c.IsInfra(),
IsService: c.IsService(),
}
+
+ if config.RootfsImageID != "" { // May not be set if the container was created with --rootfs
+ image, _, err := c.runtime.libimageRuntime.LookupImage(config.RootfsImageID, nil)
+ if err != nil {
+ return nil, err
+ }
+ data.ImageDigest = image.Digest().String()
+ }
+
if ctrSpec.Process.Capabilities != nil {
data.EffectiveCaps = ctrSpec.Process.Capabilities.Effective
data.BoundingCaps = ctrSpec.Process.Capabilities.Bounding
diff --git a/libpod/define/container_inspect.go b/libpod/define/container_inspect.go
index da5c58f27..7a00d708c 100644
--- a/libpod/define/container_inspect.go
+++ b/libpod/define/container_inspect.go
@@ -659,6 +659,7 @@ type InspectContainerData struct {
Args []string `json:"Args"`
State *InspectContainerState `json:"State"`
Image string `json:"Image"`
+ ImageDigest string `json:"ImageDigest"`
ImageName string `json:"ImageName"`
Rootfs string `json:"Rootfs"`
Pod string `json:"Pod"`
diff --git a/libpod/networking_linux.go b/libpod/networking_linux.go
index 6ea56ade5..5376ff8ad 100644
--- a/libpod/networking_linux.go
+++ b/libpod/networking_linux.go
@@ -695,23 +695,31 @@ func (r *Runtime) teardownNetNS(ctr *Container) error {
// do not return an error otherwise we would prevent network cleanup
logrus.Errorf("failed to free gvproxy machine ports: %v", err)
}
- if err := r.teardownCNI(ctr); err != nil {
- return err
- }
+
+ // Do not check the error here, we want to always umount the netns
+ // This will ensure that the container interface will be deleted
+ // even when there is a CNI or netavark bug.
+ prevErr := r.teardownCNI(ctr)
// First unmount the namespace
if err := netns.UnmountNS(ctr.state.NetNS); err != nil {
+ if prevErr != nil {
+ logrus.Error(prevErr)
+ }
return fmt.Errorf("unmounting network namespace for container %s: %w", ctr.ID(), err)
}
// Now close the open file descriptor
if err := ctr.state.NetNS.Close(); err != nil {
+ if prevErr != nil {
+ logrus.Error(prevErr)
+ }
return fmt.Errorf("closing network namespace for container %s: %w", ctr.ID(), err)
}
ctr.state.NetNS = nil
- return nil
+ return prevErr
}
func getContainerNetNS(ctr *Container) (string, *Container, error) {
diff --git a/pkg/api/handlers/compat/images.go b/pkg/api/handlers/compat/images.go
index cce482441..d61df5232 100644
--- a/pkg/api/handlers/compat/images.go
+++ b/pkg/api/handlers/compat/images.go
@@ -403,7 +403,7 @@ func GetImage(w http.ResponseWriter, r *http.Request) {
}
inspect, err := handlers.ImageDataToImageInspect(r.Context(), newImage)
if err != nil {
- utils.Error(w, http.StatusInternalServerError, fmt.Errorf("failed to convert ImageData to ImageInspect '%s': %w", inspect.ID, err))
+ utils.Error(w, http.StatusInternalServerError, fmt.Errorf("failed to convert ImageData to ImageInspect '%s': %w", name, err))
return
}
utils.WriteResponse(w, http.StatusOK, inspect)
diff --git a/pkg/api/handlers/libpod/containers.go b/pkg/api/handlers/libpod/containers.go
index 854740b17..9d18c9420 100644
--- a/pkg/api/handlers/libpod/containers.go
+++ b/pkg/api/handlers/libpod/containers.go
@@ -305,6 +305,7 @@ func Restore(w http.ResponseWriter, r *http.Request) {
PrintStats bool `schema:"printStats"`
FileLocks bool `schema:"fileLocks"`
PublishPorts string `schema:"publishPorts"`
+ Pod string `schema:"pod"`
}{
// override any golang type defaults
}
@@ -324,6 +325,7 @@ func Restore(w http.ResponseWriter, r *http.Request) {
PrintStats: query.PrintStats,
FileLocks: query.FileLocks,
PublishPorts: strings.Fields(query.PublishPorts),
+ Pod: query.Pod,
}
var names []string
diff --git a/pkg/api/handlers/libpod/manifests.go b/pkg/api/handlers/libpod/manifests.go
index f50bfd360..c96e4936b 100644
--- a/pkg/api/handlers/libpod/manifests.go
+++ b/pkg/api/handlers/libpod/manifests.go
@@ -11,8 +11,8 @@ import (
"strconv"
"strings"
- "github.com/containers/common/libimage"
"github.com/containers/image/v5/docker/reference"
+ "github.com/containers/image/v5/manifest"
"github.com/containers/image/v5/types"
"github.com/containers/podman/v4/libpod"
"github.com/containers/podman/v4/pkg/api/handlers"
@@ -148,7 +148,7 @@ func ManifestInspect(w http.ResponseWriter, r *http.Request) {
return
}
- var schema2List libimage.ManifestListData
+ var schema2List manifest.Schema2List
if err := json.Unmarshal(rawManifest, &schema2List); err != nil {
utils.Error(w, http.StatusInternalServerError, err)
return
diff --git a/pkg/api/server/register_containers.go b/pkg/api/server/register_containers.go
index 311eecd17..2cf5169ba 100644
--- a/pkg/api/server/register_containers.go
+++ b/pkg/api/server/register_containers.go
@@ -1516,6 +1516,10 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
// name: printStats
// type: boolean
// description: add restore statistics to the returned RestoreReport
+ // - in: query
+ // name: pod
+ // type: string
+ // description: pod to restore into
// produces:
// - application/json
// responses:
diff --git a/pkg/bindings/manifests/manifests.go b/pkg/bindings/manifests/manifests.go
index 0da8df709..d987e51d8 100644
--- a/pkg/bindings/manifests/manifests.go
+++ b/pkg/bindings/manifests/manifests.go
@@ -11,7 +11,7 @@ import (
"strconv"
"strings"
- "github.com/containers/common/libimage"
+ "github.com/containers/image/v5/manifest"
imageTypes "github.com/containers/image/v5/types"
"github.com/containers/podman/v4/pkg/auth"
"github.com/containers/podman/v4/pkg/bindings"
@@ -71,7 +71,7 @@ func Exists(ctx context.Context, name string, options *ExistsOptions) (bool, err
}
// Inspect returns a manifest list for a given name.
-func Inspect(ctx context.Context, name string, _ *InspectOptions) (*libimage.ManifestListData, error) {
+func Inspect(ctx context.Context, name string, _ *InspectOptions) (*manifest.Schema2List, error) {
conn, err := bindings.GetClient(ctx)
if err != nil {
return nil, err
@@ -83,7 +83,7 @@ func Inspect(ctx context.Context, name string, _ *InspectOptions) (*libimage.Man
}
defer response.Body.Close()
- var list libimage.ManifestListData
+ var list manifest.Schema2List
return &list, response.Process(&list)
}
diff --git a/pkg/bindings/manifests/types.go b/pkg/bindings/manifests/types.go
index 501feb5a1..fec3f9d13 100644
--- a/pkg/bindings/manifests/types.go
+++ b/pkg/bindings/manifests/types.go
@@ -22,7 +22,7 @@ type ExistsOptions struct {
// AddOptions are optional options for adding manifest lists
type AddOptions struct {
All *bool
- Annotation []string
+ Annotation map[string]string
Arch *string
Features []string
Images []string
@@ -46,12 +46,12 @@ type ModifyOptions struct {
// Operation values are "update", "remove" and "annotate". This allows the service to
// efficiently perform each update on a manifest list.
Operation *string
- All *bool // All when true, operate on all images in a manifest list that may be included in Images
- Annotations []string // Annotations to add to manifest list
- Arch *string // Arch overrides the architecture for the image
- Features []string // Feature list for the image
- Images []string // Images is an optional list of images to add/remove to/from manifest list depending on operation
- OS *string // OS overrides the operating system for the image
+ All *bool // All when true, operate on all images in a manifest list that may be included in Images
+ Annotations map[string]string // Annotations to add to manifest list
+ Arch *string // Arch overrides the architecture for the image
+ Features []string // Feature list for the image
+ Images []string // Images is an optional list of images to add/remove to/from manifest list depending on operation
+ OS *string // OS overrides the operating system for the image
// OS features for the image
OSFeatures []string `json:"os_features" schema:"os_features"`
// OSVersion overrides the operating system for the image
diff --git a/pkg/bindings/manifests/types_add_options.go b/pkg/bindings/manifests/types_add_options.go
index b3e8b8134..5ba1cc5fa 100644
--- a/pkg/bindings/manifests/types_add_options.go
+++ b/pkg/bindings/manifests/types_add_options.go
@@ -33,15 +33,15 @@ func (o *AddOptions) GetAll() bool {
}
// WithAnnotation set field Annotation to given value
-func (o *AddOptions) WithAnnotation(value []string) *AddOptions {
+func (o *AddOptions) WithAnnotation(value map[string]string) *AddOptions {
o.Annotation = value
return o
}
// GetAnnotation returns value of field Annotation
-func (o *AddOptions) GetAnnotation() []string {
+func (o *AddOptions) GetAnnotation() map[string]string {
if o.Annotation == nil {
- var z []string
+ var z map[string]string
return z
}
return o.Annotation
diff --git a/pkg/bindings/manifests/types_modify_options.go b/pkg/bindings/manifests/types_modify_options.go
index 12f549577..ab00cb2c5 100644
--- a/pkg/bindings/manifests/types_modify_options.go
+++ b/pkg/bindings/manifests/types_modify_options.go
@@ -48,15 +48,15 @@ func (o *ModifyOptions) GetAll() bool {
}
// WithAnnotations set annotations to add to manifest list
-func (o *ModifyOptions) WithAnnotations(value []string) *ModifyOptions {
+func (o *ModifyOptions) WithAnnotations(value map[string]string) *ModifyOptions {
o.Annotations = value
return o
}
// GetAnnotations returns value of annotations to add to manifest list
-func (o *ModifyOptions) GetAnnotations() []string {
+func (o *ModifyOptions) GetAnnotations() map[string]string {
if o.Annotations == nil {
- var z []string
+ var z map[string]string
return z
}
return o.Annotations
diff --git a/pkg/domain/entities/manifest.go b/pkg/domain/entities/manifest.go
index 7f4b6c25f..f17079271 100644
--- a/pkg/domain/entities/manifest.go
+++ b/pkg/domain/entities/manifest.go
@@ -36,7 +36,7 @@ type ManifestAddOptions struct {
// ManifestAnnotateOptions provides model for annotating manifest list
type ManifestAnnotateOptions struct {
// Annotation to add to manifest list
- Annotation []string `json:"annotations" schema:"annotations"`
+ Annotation []string `json:"annotation" schema:"annotation"`
// Arch overrides the architecture for the image
Arch string `json:"arch" schema:"arch"`
// Feature list for the image
diff --git a/pkg/domain/infra/abi/containers.go b/pkg/domain/infra/abi/containers.go
index 535c4a613..d88dbd784 100644
--- a/pkg/domain/infra/abi/containers.go
+++ b/pkg/domain/infra/abi/containers.go
@@ -36,7 +36,7 @@ import (
// getContainersAndInputByContext gets containers whether all, latest, or a slice of names/ids
// is specified. It also returns a list of the corresponding input name used to lookup each container.
-func getContainersAndInputByContext(all, latest bool, names []string, filters map[string][]string, runtime *libpod.Runtime) (ctrs []*libpod.Container, rawInput []string, err error) {
+func getContainersAndInputByContext(all, latest, isPod bool, names []string, filters map[string][]string, runtime *libpod.Runtime) (ctrs []*libpod.Container, rawInput []string, err error) {
var ctr *libpod.Container
var filteredCtrs []*libpod.Container
ctrs = []*libpod.Container{}
@@ -77,10 +77,23 @@ func getContainersAndInputByContext(all, latest bool, names []string, filters ma
}
}
case latest:
- ctr, err = runtime.GetLatestContainer()
- if err == nil {
- rawInput = append(rawInput, ctr.ID())
- ctrs = append(ctrs, ctr)
+ if isPod {
+ pod, err := runtime.GetLatestPod()
+ if err == nil {
+ podCtrs, err := pod.AllContainers()
+ if err == nil {
+ for _, c := range podCtrs {
+ rawInput = append(rawInput, c.ID())
+ }
+ ctrs = podCtrs
+ }
+ }
+ } else {
+ ctr, err = runtime.GetLatestContainer()
+ if err == nil {
+ rawInput = append(rawInput, ctr.ID())
+ ctrs = append(ctrs, ctr)
+ }
}
default:
for _, n := range names {
@@ -102,8 +115,8 @@ func getContainersAndInputByContext(all, latest bool, names []string, filters ma
// getContainersByContext gets containers whether all, latest, or a slice of names/ids
// is specified.
-func getContainersByContext(all, latest bool, names []string, runtime *libpod.Runtime) (ctrs []*libpod.Container, err error) {
- ctrs, _, err = getContainersAndInputByContext(all, latest, names, nil, runtime)
+func getContainersByContext(all, latest, isPod bool, names []string, runtime *libpod.Runtime) (ctrs []*libpod.Container, err error) {
+ ctrs, _, err = getContainersAndInputByContext(all, latest, isPod, names, nil, runtime)
return
}
@@ -125,7 +138,7 @@ func (ic *ContainerEngine) ContainerExists(ctx context.Context, nameOrID string,
}
func (ic *ContainerEngine) ContainerWait(ctx context.Context, namesOrIds []string, options entities.WaitOptions) ([]entities.WaitReport, error) {
- ctrs, err := getContainersByContext(false, options.Latest, namesOrIds, ic.Libpod)
+ ctrs, err := getContainersByContext(false, options.Latest, false, namesOrIds, ic.Libpod)
if err != nil {
return nil, err
}
@@ -147,7 +160,7 @@ func (ic *ContainerEngine) ContainerWait(ctx context.Context, namesOrIds []strin
}
func (ic *ContainerEngine) ContainerPause(ctx context.Context, namesOrIds []string, options entities.PauseUnPauseOptions) ([]*entities.PauseUnpauseReport, error) {
- ctrs, rawInputs, err := getContainersAndInputByContext(options.All, options.Latest, namesOrIds, options.Filters, ic.Libpod)
+ ctrs, rawInputs, err := getContainersAndInputByContext(options.All, options.Latest, false, namesOrIds, options.Filters, ic.Libpod)
if err != nil {
return nil, err
}
@@ -174,7 +187,7 @@ func (ic *ContainerEngine) ContainerPause(ctx context.Context, namesOrIds []stri
}
func (ic *ContainerEngine) ContainerUnpause(ctx context.Context, namesOrIds []string, options entities.PauseUnPauseOptions) ([]*entities.PauseUnpauseReport, error) {
- ctrs, rawInputs, err := getContainersAndInputByContext(options.All, options.Latest, namesOrIds, options.Filters, ic.Libpod)
+ ctrs, rawInputs, err := getContainersAndInputByContext(options.All, options.Latest, false, namesOrIds, options.Filters, ic.Libpod)
if err != nil {
return nil, err
}
@@ -201,7 +214,7 @@ func (ic *ContainerEngine) ContainerUnpause(ctx context.Context, namesOrIds []st
}
func (ic *ContainerEngine) ContainerStop(ctx context.Context, namesOrIds []string, options entities.StopOptions) ([]*entities.StopReport, error) {
names := namesOrIds
- ctrs, rawInputs, err := getContainersAndInputByContext(options.All, options.Latest, names, options.Filters, ic.Libpod)
+ ctrs, rawInputs, err := getContainersAndInputByContext(options.All, options.Latest, false, names, options.Filters, ic.Libpod)
if err != nil && !(options.Ignore && errors.Is(err, define.ErrNoSuchCtr)) {
return nil, err
}
@@ -280,7 +293,7 @@ func (ic *ContainerEngine) ContainerKill(ctx context.Context, namesOrIds []strin
if err != nil {
return nil, err
}
- ctrs, rawInputs, err := getContainersAndInputByContext(options.All, options.Latest, namesOrIds, nil, ic.Libpod)
+ ctrs, rawInputs, err := getContainersAndInputByContext(options.All, options.Latest, false, namesOrIds, nil, ic.Libpod)
if err != nil {
return nil, err
}
@@ -323,7 +336,7 @@ func (ic *ContainerEngine) ContainerRestart(ctx context.Context, namesOrIds []st
return nil, err
}
} else {
- ctrs, rawInputs, err = getContainersAndInputByContext(options.All, options.Latest, namesOrIds, options.Filters, ic.Libpod)
+ ctrs, rawInputs, err = getContainersAndInputByContext(options.All, options.Latest, false, namesOrIds, options.Filters, ic.Libpod)
if err != nil {
return nil, err
}
@@ -401,7 +414,7 @@ func (ic *ContainerEngine) ContainerRm(ctx context.Context, namesOrIds []string,
}
names = tmpNames
- ctrs, rawInputs, err := getContainersAndInputByContext(options.All, options.Latest, names, options.Filters, ic.Libpod)
+ ctrs, rawInputs, err := getContainersAndInputByContext(options.All, options.Latest, false, names, options.Filters, ic.Libpod)
if err != nil && !(options.Ignore && errors.Is(err, define.ErrNoSuchCtr)) {
return nil, err
}
@@ -661,7 +674,7 @@ func (ic *ContainerEngine) ContainerCheckpoint(ctx context.Context, namesOrIds [
return nil, err
}
} else {
- ctrs, rawInputs, err = getContainersAndInputByContext(false, options.Latest, namesOrIds, nil, ic.Libpod)
+ ctrs, rawInputs, err = getContainersAndInputByContext(false, options.Latest, false, namesOrIds, nil, ic.Libpod)
if err != nil {
return nil, err
}
@@ -721,7 +734,7 @@ func (ic *ContainerEngine) ContainerRestore(ctx context.Context, namesOrIds []st
case options.All:
ctrs, err = ic.Libpod.GetContainers(filterFuncs...)
case options.Latest:
- ctrs, err = getContainersByContext(false, options.Latest, namesOrIds, ic.Libpod)
+ ctrs, err = getContainersByContext(false, options.Latest, false, namesOrIds, ic.Libpod)
default:
for _, nameOrID := range namesOrIds {
logrus.Debugf("look up container: %q", nameOrID)
@@ -805,7 +818,7 @@ func (ic *ContainerEngine) ContainerCreate(ctx context.Context, s *specgen.SpecG
}
func (ic *ContainerEngine) ContainerAttach(ctx context.Context, nameOrID string, options entities.AttachOptions) error {
- ctrs, err := getContainersByContext(false, options.Latest, []string{nameOrID}, ic.Libpod)
+ ctrs, err := getContainersByContext(false, options.Latest, false, []string{nameOrID}, ic.Libpod)
if err != nil {
return err
}
@@ -886,7 +899,7 @@ func (ic *ContainerEngine) ContainerExec(ctx context.Context, nameOrID string, o
if err != nil {
return ec, err
}
- ctrs, err := getContainersByContext(false, options.Latest, []string{nameOrID}, ic.Libpod)
+ ctrs, err := getContainersByContext(false, options.Latest, false, []string{nameOrID}, ic.Libpod)
if err != nil {
return ec, err
}
@@ -906,7 +919,7 @@ func (ic *ContainerEngine) ContainerExecDetached(ctx context.Context, nameOrID s
if err != nil {
return "", err
}
- ctrs, err := getContainersByContext(false, options.Latest, []string{nameOrID}, ic.Libpod)
+ ctrs, err := getContainersByContext(false, options.Latest, false, []string{nameOrID}, ic.Libpod)
if err != nil {
return "", err
}
@@ -933,7 +946,7 @@ func (ic *ContainerEngine) ContainerExecDetached(ctx context.Context, nameOrID s
func (ic *ContainerEngine) ContainerStart(ctx context.Context, namesOrIds []string, options entities.ContainerStartOptions) ([]*entities.ContainerStartReport, error) {
reports := []*entities.ContainerStartReport{}
var exitCode = define.ExecErrorCodeGeneric
- ctrs, rawInputs, err := getContainersAndInputByContext(options.All, options.Latest, namesOrIds, options.Filters, ic.Libpod)
+ ctrs, rawInputs, err := getContainersAndInputByContext(options.All, options.Latest, false, namesOrIds, options.Filters, ic.Libpod)
if err != nil {
return nil, err
}
@@ -1188,7 +1201,19 @@ func (ic *ContainerEngine) ContainerLogs(ctx context.Context, containers []strin
var wg sync.WaitGroup
- ctrs, err := getContainersByContext(false, options.Latest, containers, ic.Libpod)
+ isPod := false
+ for _, c := range containers {
+ ctr, err := ic.Libpod.LookupContainer(c)
+ if err != nil {
+ return err
+ }
+ if ctr.IsInfra() {
+ isPod = true
+ break
+ }
+ }
+
+ ctrs, err := getContainersByContext(false, options.Latest, isPod, containers, ic.Libpod)
if err != nil {
return err
}
@@ -1229,7 +1254,7 @@ func (ic *ContainerEngine) ContainerLogs(ctx context.Context, containers []strin
}
func (ic *ContainerEngine) ContainerCleanup(ctx context.Context, namesOrIds []string, options entities.ContainerCleanupOptions) ([]*entities.ContainerCleanupReport, error) {
- ctrs, rawInputs, err := getContainersAndInputByContext(options.All, options.Latest, namesOrIds, nil, ic.Libpod)
+ ctrs, rawInputs, err := getContainersAndInputByContext(options.All, options.Latest, false, namesOrIds, nil, ic.Libpod)
if err != nil {
return nil, err
}
@@ -1283,7 +1308,7 @@ func (ic *ContainerEngine) ContainerCleanup(ctx context.Context, namesOrIds []st
}
func (ic *ContainerEngine) ContainerInit(ctx context.Context, namesOrIds []string, options entities.ContainerInitOptions) ([]*entities.ContainerInitReport, error) {
- ctrs, rawInputs, err := getContainersAndInputByContext(options.All, options.Latest, namesOrIds, nil, ic.Libpod)
+ ctrs, rawInputs, err := getContainersAndInputByContext(options.All, options.Latest, false, namesOrIds, nil, ic.Libpod)
if err != nil {
return nil, err
}
@@ -1337,7 +1362,7 @@ func (ic *ContainerEngine) ContainerMount(ctx context.Context, nameOrIDs []strin
}
}
- ctrs, err := getContainersByContext(options.All, options.Latest, names, ic.Libpod)
+ ctrs, err := getContainersByContext(options.All, options.Latest, false, names, ic.Libpod)
if err != nil {
return nil, err
}
@@ -1375,7 +1400,7 @@ func (ic *ContainerEngine) ContainerMount(ctx context.Context, nameOrIDs []strin
}
// No containers were passed, so we send back what is mounted
- ctrs, err = getContainersByContext(true, false, []string{}, ic.Libpod)
+ ctrs, err = getContainersByContext(true, false, false, []string{}, ic.Libpod)
if err != nil {
return nil, err
}
@@ -1427,7 +1452,7 @@ func (ic *ContainerEngine) ContainerUnmount(ctx context.Context, nameOrIDs []str
reports = append(reports, &report)
}
}
- ctrs, err := getContainersByContext(options.All, options.Latest, names, ic.Libpod)
+ ctrs, err := getContainersByContext(options.All, options.Latest, false, names, ic.Libpod)
if err != nil {
return nil, err
}
@@ -1461,7 +1486,7 @@ func (ic *ContainerEngine) Config(_ context.Context) (*config.Config, error) {
}
func (ic *ContainerEngine) ContainerPort(ctx context.Context, nameOrID string, options entities.ContainerPortOptions) ([]*entities.ContainerPortReport, error) {
- ctrs, err := getContainersByContext(options.All, options.Latest, []string{nameOrID}, ic.Libpod)
+ ctrs, err := getContainersByContext(options.All, options.Latest, false, []string{nameOrID}, ic.Libpod)
if err != nil {
return nil, err
}
@@ -1725,7 +1750,7 @@ func (ic *ContainerEngine) ContainerUpdate(ctx context.Context, updateOptions *e
if err != nil {
return "", err
}
- ctrs, err := getContainersByContext(false, false, []string{updateOptions.NameOrID}, ic.Libpod)
+ ctrs, err := getContainersByContext(false, false, false, []string{updateOptions.NameOrID}, ic.Libpod)
if err != nil {
return "", err
}
diff --git a/pkg/domain/infra/abi/network.go b/pkg/domain/infra/abi/network.go
index a29b6818f..300c3ea0f 100644
--- a/pkg/domain/infra/abi/network.go
+++ b/pkg/domain/infra/abi/network.go
@@ -70,7 +70,7 @@ func (ic *ContainerEngine) NetworkInspect(ctx context.Context, namesOrIds []stri
}
func (ic *ContainerEngine) NetworkReload(ctx context.Context, names []string, options entities.NetworkReloadOptions) ([]*entities.NetworkReloadReport, error) {
- ctrs, err := getContainersByContext(options.All, options.Latest, names, ic.Libpod)
+ ctrs, err := getContainersByContext(options.All, options.Latest, false, names, ic.Libpod)
if err != nil {
return nil, err
}
diff --git a/pkg/domain/infra/abi/play.go b/pkg/domain/infra/abi/play.go
index 4a83cb464..bec5c4cb5 100644
--- a/pkg/domain/infra/abi/play.go
+++ b/pkg/domain/infra/abi/play.go
@@ -40,6 +40,9 @@ import (
// container-specific sd-notify modes.
const sdNotifyAnnotation = "io.containers.sdnotify"
+// default network created/used by kube
+const kubeDefaultNetwork = "podman-default-kube-network"
+
// createServiceContainer creates a container that can later on
// be associated with the pods of a K8s yaml. It will be started along with
// the first pod.
@@ -114,6 +117,19 @@ func (ic *ContainerEngine) PlayKube(ctx context.Context, body io.Reader, options
report := &entities.PlayKubeReport{}
validKinds := 0
+ // when no network options are specified, create a common network for all the pods
+ if len(options.Networks) == 0 {
+ _, err := ic.NetworkCreate(
+ ctx, nettypes.Network{
+ Name: kubeDefaultNetwork,
+ DNSEnabled: true,
+ },
+ )
+ if err != nil && !errors.Is(err, nettypes.ErrNetworkExists) {
+ return nil, err
+ }
+ }
+
// read yaml document
content, err := io.ReadAll(body)
if err != nil {
@@ -338,16 +354,17 @@ func (ic *ContainerEngine) playKubePod(ctx context.Context, podName string, podY
return nil, err
}
+ // add kube default network if no network is explicitly added
+ if podOpt.Net.Network.NSMode != "host" && len(options.Networks) == 0 {
+ options.Networks = []string{kubeDefaultNetwork}
+ }
+
if len(options.Networks) > 0 {
ns, networks, netOpts, err := specgen.ParseNetworkFlag(options.Networks)
if err != nil {
return nil, err
}
- if (ns.IsBridge() && len(networks) == 0) || ns.IsHost() {
- return nil, fmt.Errorf("invalid value passed to --network: bridge or host networking must be configured in YAML")
- }
-
podOpt.Net.Network = ns
podOpt.Net.Networks = networks
podOpt.Net.NetworkOptions = netOpts
diff --git a/pkg/domain/infra/tunnel/manifest.go b/pkg/domain/infra/tunnel/manifest.go
index 2fe43aad0..696d0a963 100644
--- a/pkg/domain/infra/tunnel/manifest.go
+++ b/pkg/domain/infra/tunnel/manifest.go
@@ -5,6 +5,7 @@ import (
"encoding/json"
"errors"
"fmt"
+ "strings"
"github.com/containers/image/v5/types"
"github.com/containers/podman/v4/pkg/bindings/images"
@@ -47,9 +48,20 @@ func (ir *ImageEngine) ManifestInspect(_ context.Context, name string) ([]byte,
// ManifestAdd adds images to the manifest list
func (ir *ImageEngine) ManifestAdd(_ context.Context, name string, imageNames []string, opts entities.ManifestAddOptions) (string, error) {
- options := new(manifests.AddOptions).WithAll(opts.All).WithAnnotation(opts.Annotation).WithArch(opts.Arch)
- options.WithVariant(opts.Variant).WithFeatures(opts.Features).WithImages(imageNames).WithOS(opts.OS)
- options.WithOSVersion(opts.OSVersion).WithUsername(opts.Username).WithPassword(opts.Password).WithAuthfile(opts.Authfile)
+ options := new(manifests.AddOptions).WithAll(opts.All).WithArch(opts.Arch).WithVariant(opts.Variant)
+ options.WithFeatures(opts.Features).WithImages(imageNames).WithOS(opts.OS).WithOSVersion(opts.OSVersion)
+ options.WithUsername(opts.Username).WithPassword(opts.Password).WithAuthfile(opts.Authfile)
+ if len(opts.Annotation) != 0 {
+ annotations := make(map[string]string)
+ for _, annotationSpec := range opts.Annotation {
+ spec := strings.SplitN(annotationSpec, "=", 2)
+ if len(spec) != 2 {
+ return "", fmt.Errorf("no value given for annotation %q", spec[0])
+ }
+ annotations[spec[0]] = spec[1]
+ }
+ options.WithAnnotation(annotations)
+ }
if s := opts.SkipTLSVerify; s != types.OptionalBoolUndefined {
if s == types.OptionalBoolTrue {
options.WithSkipTLSVerify(true)
diff --git a/pkg/specgen/generate/kube/volume.go b/pkg/specgen/generate/kube/volume.go
index 2d8085020..beb460d68 100644
--- a/pkg/specgen/generate/kube/volume.go
+++ b/pkg/specgen/generate/kube/volume.go
@@ -56,10 +56,8 @@ func VolumeFromHostPath(hostPath *v1.HostPathVolumeSource) (*KubeVolume, error)
if hostPath.Type != nil {
switch *hostPath.Type {
case v1.HostPathDirectoryOrCreate:
- if _, err := os.Stat(hostPath.Path); os.IsNotExist(err) {
- if err := os.Mkdir(hostPath.Path, kubeDirectoryPermission); err != nil {
- return nil, err
- }
+ if err := os.MkdirAll(hostPath.Path, kubeDirectoryPermission); err != nil {
+ return nil, err
}
// Label a newly created volume
if err := libpod.LabelVolumePath(hostPath.Path); err != nil {
diff --git a/test/e2e/checkpoint_image_test.go b/test/e2e/checkpoint_image_test.go
index 5700802e8..7ab0b5ca5 100644
--- a/test/e2e/checkpoint_image_test.go
+++ b/test/e2e/checkpoint_image_test.go
@@ -295,4 +295,52 @@ var _ = Describe("Podman checkpoint", func() {
Expect(result).Should(Exit(0))
Expect(podmanTest.NumberOfContainersRunning()).To(Equal(0))
})
+
+ It("podman run checkpoint image to restore container", func() {
+ SkipIfContainerized("FIXME: #15015. All checkpoint tests hang when containerized.")
+ // Container image must be lowercase
+ checkpointImage := "alpine-checkpoint-" + strings.ToLower(RandomString(6))
+ containerName := "alpine-container-" + RandomString(6)
+
+ // Create container
+ localRunString := []string{"run", "-d", "--name", containerName, ALPINE, "top"}
+ session := podmanTest.Podman(localRunString)
+ session.WaitWithDefaultTimeout()
+ Expect(session).Should(Exit(0))
+ containerID1 := session.OutputToString()
+
+ // Checkpoint container, create checkpoint image
+ result := podmanTest.Podman([]string{"container", "checkpoint", "--create-image", checkpointImage, "--keep", containerID1})
+ result.WaitWithDefaultTimeout()
+ Expect(result).Should(Exit(0))
+ Expect(podmanTest.NumberOfContainersRunning()).To(Equal(0))
+
+ // Remove existing container
+ result = podmanTest.Podman([]string{"rm", "-t", "1", "-f", containerName})
+ result.WaitWithDefaultTimeout()
+ Expect(result).Should(Exit(0))
+
+ // Restore containers from image using `podman run`
+ result = podmanTest.Podman([]string{"run", checkpointImage})
+ result.WaitWithDefaultTimeout()
+ Expect(result).Should(Exit(0))
+ Expect(podmanTest.NumberOfContainersRunning()).To(Equal(1))
+
+ // Check if the container is running
+ status := podmanTest.Podman([]string{"inspect", containerName, "--format={{.State.Status}}"})
+ status.WaitWithDefaultTimeout()
+ Expect(status).Should(Exit(0))
+ Expect(status.OutputToString()).To(Equal("running"))
+
+ // Clean-up
+ result = podmanTest.Podman([]string{"rm", "-t", "0", "-fa"})
+ result.WaitWithDefaultTimeout()
+ Expect(result).Should(Exit(0))
+ Expect(podmanTest.NumberOfContainersRunning()).To(Equal(0))
+
+ result = podmanTest.Podman([]string{"rmi", checkpointImage})
+ result.WaitWithDefaultTimeout()
+ Expect(result).Should(Exit(0))
+ Expect(podmanTest.NumberOfContainersRunning()).To(Equal(0))
+ })
})
diff --git a/test/e2e/checkpoint_test.go b/test/e2e/checkpoint_test.go
index a33936549..b0c1d36d3 100644
--- a/test/e2e/checkpoint_test.go
+++ b/test/e2e/checkpoint_test.go
@@ -1170,10 +1170,6 @@ var _ = Describe("Podman checkpoint", func() {
share := share // copy into local scope, for use inside function
It(testName, func() {
- if podmanTest.Host.Distribution == "ubuntu" && IsRemote() {
- Skip("FIXME: #15018. Cannot restore --pod under cgroupsV1 and remote")
- }
-
if !criu.CheckForCriu(criu.PodCriuVersion) {
Skip("CRIU is missing or too old.")
}
diff --git a/test/e2e/kill_test.go b/test/e2e/kill_test.go
index 30c82c45d..d789a6595 100644
--- a/test/e2e/kill_test.go
+++ b/test/e2e/kill_test.go
@@ -201,7 +201,7 @@ var _ = Describe("Podman kill", func() {
Expect(wait).Should(Exit(0))
})
- It("podman stop --all", func() {
+ It("podman kill --all", func() {
session := podmanTest.RunTopContainer("")
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
diff --git a/test/e2e/logs_test.go b/test/e2e/logs_test.go
index c680cae2a..93ef54c3a 100644
--- a/test/e2e/logs_test.go
+++ b/test/e2e/logs_test.go
@@ -391,6 +391,78 @@ var _ = Describe("Podman logs", func() {
// see comment above
Expect(string(logs.Out.Contents())).To(Equal(content))
})
+
+ It("podman pod logs -l with newer container created: "+log, func() {
+ skipIfJournaldInContainer()
+
+ podName := "testPod"
+ containerName1 := "container1"
+ containerName2 := "container2"
+ containerName3 := "container3"
+
+ testPod := podmanTest.Podman([]string{"pod", "create", fmt.Sprintf("--name=%s", podName)})
+ testPod.WaitWithDefaultTimeout()
+ Expect(testPod).To(Exit(0))
+
+ log1 := podmanTest.Podman([]string{"run", "--log-driver", log, "--name", containerName1, "-d", "--pod", podName, BB, "/bin/sh", "-c", "echo log1"})
+ log1.WaitWithDefaultTimeout()
+ Expect(log1).To(Exit(0))
+
+ log2 := podmanTest.Podman([]string{"run", "--log-driver", log, "--name", containerName2, "-d", "--pod", podName, BB, "/bin/sh", "-c", "echo log2"})
+ log2.WaitWithDefaultTimeout()
+ Expect(log2).To(Exit(0))
+
+ ctr := podmanTest.Podman([]string{"run", "--log-driver", log, "--name", containerName3, "-d", BB, "date"})
+ ctr.WaitWithDefaultTimeout()
+ Expect(ctr).To(Exit(0))
+
+ results := podmanTest.Podman([]string{"pod", "logs", "-l"})
+ results.WaitWithDefaultTimeout()
+ if IsRemote() {
+ Expect(results).To(Exit(125))
+ } else {
+ Expect(results).To(Exit(0))
+ podOutput := results.OutputToString()
+
+ results = podmanTest.Podman([]string{"logs", "-l"})
+ results.WaitWithDefaultTimeout()
+ Expect(results).To(Exit(0))
+ ctrOutput := results.OutputToString()
+
+ Expect(podOutput).ToNot(Equal(ctrOutput))
+ }
+ })
+
+ It("podman pod logs -l: "+log, func() {
+ skipIfJournaldInContainer()
+
+ podName := "testPod"
+ containerName1 := "container1"
+ containerName2 := "container2"
+
+ testPod := podmanTest.Podman([]string{"pod", "create", fmt.Sprintf("--name=%s", podName)})
+ testPod.WaitWithDefaultTimeout()
+ Expect(testPod).To(Exit(0))
+
+ log1 := podmanTest.Podman([]string{"run", "--log-driver", log, "--name", containerName1, "-d", "--pod", podName, BB, "/bin/sh", "-c", "echo log1"})
+ log1.WaitWithDefaultTimeout()
+ Expect(log1).To(Exit(0))
+
+ log2 := podmanTest.Podman([]string{"run", "--log-driver", log, "--name", containerName2, "-d", "--pod", podName, BB, "/bin/sh", "-c", "echo log2"})
+ log2.WaitWithDefaultTimeout()
+ Expect(log2).To(Exit(0))
+
+ results := podmanTest.Podman([]string{"pod", "logs", "-l"})
+ results.WaitWithDefaultTimeout()
+ if IsRemote() {
+ Expect(results).To(Exit(125))
+ } else {
+ Expect(results).To(Exit(0))
+ output := results.OutputToString()
+ Expect(output).To(ContainSubstring("log1"))
+ Expect(output).To(ContainSubstring("log2"))
+ }
+ })
}
It("using journald for container with container tag", func() {
@@ -490,4 +562,5 @@ var _ = Describe("Podman logs", func() {
Expect(output[0]).To(MatchRegexp(`\x1b\[3[0-9a-z ]+\x1b\[0m`))
Expect(output[1]).To(MatchRegexp(`\x1b\[3[0-9a-z ]+\x1b\[0m`))
})
+
})
diff --git a/test/e2e/manifest_test.go b/test/e2e/manifest_test.go
index 404f2cd3a..b0a5e7d03 100644
--- a/test/e2e/manifest_test.go
+++ b/test/e2e/manifest_test.go
@@ -165,20 +165,6 @@ var _ = Describe("Podman manifest", func() {
))
})
- It("add --annotation", func() {
- session := podmanTest.Podman([]string{"manifest", "create", "foo"})
- session.WaitWithDefaultTimeout()
- Expect(session).Should(Exit(0))
- session = podmanTest.Podman([]string{"manifest", "add", "--annotation", "hoge=fuga", "foo", imageList})
- session.WaitWithDefaultTimeout()
- Expect(session).Should(Exit(0))
- session = podmanTest.Podman([]string{"manifest", "inspect", "foo"})
- session.WaitWithDefaultTimeout()
- Expect(session).Should(Exit(0))
- Expect(session.OutputToString()).To(ContainSubstring(`"annotations"`))
- Expect(session.OutputToString()).To(ContainSubstring(`"hoge": "fuga"`))
- })
-
It("add --os", func() {
session := podmanTest.Podman([]string{"manifest", "create", "foo"})
session.WaitWithDefaultTimeout()
diff --git a/test/e2e/network_test.go b/test/e2e/network_test.go
index b2f50ca55..4366d84aa 100644
--- a/test/e2e/network_test.go
+++ b/test/e2e/network_test.go
@@ -706,7 +706,7 @@ var _ = Describe("Podman network", func() {
})
It("podman network prune --filter", func() {
- // set custom cni directory to prevent flakes
+ // set custom network directory to prevent flakes since the dir is shared with all tests by default
podmanTest.NetworkConfigDir = tempdir
if IsRemote() {
podmanTest.RestartRemoteService()
@@ -754,7 +754,7 @@ var _ = Describe("Podman network", func() {
})
It("podman network prune", func() {
- // set custom cni directory to prevent flakes
+ // set custom network directory to prevent flakes since the dir is shared with all tests by default
podmanTest.NetworkConfigDir = tempdir
if IsRemote() {
podmanTest.RestartRemoteService()
diff --git a/test/e2e/play_kube_test.go b/test/e2e/play_kube_test.go
index 651cb1074..97823e232 100644
--- a/test/e2e/play_kube_test.go
+++ b/test/e2e/play_kube_test.go
@@ -2604,6 +2604,36 @@ spec:
Expect(st.Mode().IsDir()).To(Equal(true))
})
+ It("podman play kube test with DirectoryOrCreate HostPath type volume and non-existent directory path", func() {
+ hostPathLocation := filepath.Join(filepath.Join(tempdir, "dir1"), "dir2")
+
+ pod := getPod(withVolume(getHostPathVolume("DirectoryOrCreate", hostPathLocation)))
+ err := generateKubeYaml("pod", pod, kubeYaml)
+ Expect(err).To(BeNil())
+
+ kube := podmanTest.Podman([]string{"play", "kube", kubeYaml})
+ kube.WaitWithDefaultTimeout()
+ Expect(kube).Should(Exit(0))
+
+ // the full path should have been created
+ st, err := os.Stat(hostPathLocation)
+ Expect(err).To(BeNil())
+ Expect(st.Mode().IsDir()).To(Equal(true))
+ })
+
+ It("podman play kube test with DirectoryOrCreate HostPath type volume and existent directory path", func() {
+ hostPathLocation := filepath.Join(filepath.Join(tempdir, "dir1"), "dir2")
+ Expect(os.MkdirAll(hostPathLocation, os.ModePerm)).To(BeNil())
+
+ pod := getPod(withVolume(getHostPathVolume("DirectoryOrCreate", hostPathLocation)))
+ err := generateKubeYaml("pod", pod, kubeYaml)
+ Expect(err).To(BeNil())
+
+ kube := podmanTest.Podman([]string{"play", "kube", kubeYaml})
+ kube.WaitWithDefaultTimeout()
+ Expect(kube).Should(Exit(0))
+ })
+
It("podman play kube test with Socket HostPath type volume should fail if not socket", func() {
hostPathLocation := filepath.Join(tempdir, "file")
f, err := os.Create(hostPathLocation)
@@ -3000,6 +3030,21 @@ MemoryReservation: {{ .HostConfig.MemoryReservation }}`})
Expect(logs.OutputToString()).To(Equal(netns))
})
+ It("podman play kube test with kube default network", func() {
+ pod := getPod()
+ err := generateKubeYaml("pod", pod, kubeYaml)
+ Expect(err).To(BeNil())
+
+ kube := podmanTest.Podman([]string{"play", "kube", kubeYaml})
+ kube.WaitWithDefaultTimeout()
+ Expect(kube).Should(Exit(0))
+
+ inspect := podmanTest.Podman([]string{"inspect", pod.Name, "--format", "{{ .InfraConfig.Networks }}"})
+ inspect.WaitWithDefaultTimeout()
+ Expect(inspect).Should(Exit(0))
+ Expect(inspect.OutputToString()).To(Equal("[podman-default-kube-network]"))
+ })
+
It("podman play kube persistentVolumeClaim", func() {
volName := "myvol"
volDevice := "tmpfs"
diff --git a/test/e2e/prune_test.go b/test/e2e/prune_test.go
index 0b1d68aea..e91569231 100644
--- a/test/e2e/prune_test.go
+++ b/test/e2e/prune_test.go
@@ -259,6 +259,12 @@ var _ = Describe("Podman prune", func() {
})
It("podman system prune networks", func() {
+ // set custom network directory to prevent flakes since the dir is shared with all tests by default
+ podmanTest.NetworkConfigDir = tempdir
+ if IsRemote() {
+ podmanTest.RestartRemoteService()
+ }
+
// Create new network.
session := podmanTest.Podman([]string{"network", "create", "test"})
session.WaitWithDefaultTimeout()
diff --git a/test/e2e/restart_test.go b/test/e2e/restart_test.go
index 87d20a2e6..effb716a8 100644
--- a/test/e2e/restart_test.go
+++ b/test/e2e/restart_test.go
@@ -321,7 +321,7 @@ var _ = Describe("Podman restart", func() {
Expect(result.ErrorToString()).To(ContainSubstring("cannot be used together"))
})
- It("podman pause --filter", func() {
+ It("podman restart --filter", func() {
session1 := podmanTest.RunTopContainer("")
session1.WaitWithDefaultTimeout()
Expect(session1).Should(Exit(0))
diff --git a/test/system/030-run.bats b/test/system/030-run.bats
index 6847880ab..8de1625b5 100644
--- a/test/system/030-run.bats
+++ b/test/system/030-run.bats
@@ -548,11 +548,23 @@ json-file | f
# prior to #8623 `podman run` would error out on untagged images with:
# Error: both RootfsImageName and RootfsImageID must be set if either is set: invalid argument
run_podman untag $IMAGE
- run_podman run --rm $imageID ls
+ run_podman run --rm $randomname $imageID true
run_podman tag $imageID $IMAGE
}
+@test "podman inspect includes image data" {
+ randomname=$(random_string 30)
+
+ run_podman inspect $IMAGE --format "{{.ID}} {{.Digest}}"
+ expected="$IMAGE $output"
+
+ run_podman run --name $randomname $IMAGE true
+ run_podman container inspect $randomname --format "{{.ImageName}} {{.Image}} {{.ImageDigest}}"
+ is "$output" "$expected"
+ run_podman rm -f -t0 $randomname
+}
+
@test "Verify /run/.containerenv exist" {
# Nonprivileged container: file exists, but must be empty
run_podman run --rm $IMAGE stat -c '%s' /run/.containerenv
@@ -620,10 +632,15 @@ json-file | f
run_podman image mount $IMAGE
romount="$output"
+ randomname=$(random_string 30)
# FIXME FIXME FIXME: Remove :O once (if) #14504 is fixed!
- run_podman run --rm --rootfs $romount:O echo "Hello world"
+ run_podman run --name=$randomname --rootfs $romount:O echo "Hello world"
is "$output" "Hello world"
+ run_podman container inspect $randomname --format "{{.ImageDigest}}"
+ is "$output" "" "Empty image digest for --rootfs container"
+
+ run_podman rm -f -t0 $randomname
run_podman image unmount $IMAGE
fi
}
diff --git a/test/system/251-system-service.bats b/test/system/251-system-service.bats
index 197d1cb18..3af42b455 100644
--- a/test/system/251-system-service.bats
+++ b/test/system/251-system-service.bats
@@ -14,6 +14,14 @@ function teardown() {
basic_teardown
}
+@test "podman systerm service <bad_scheme_uri> returns error" {
+ skip_if_remote "podman system service unavailable over remote"
+ run_podman 125 system service localhost:9292
+ is "$output" "Error: API Service endpoint scheme \"localhost\" is not supported. Try tcp://localhost:9292 or unix:/localhost:9292"
+
+ run_podman 125 system service myunix.sock
+ is "$output" "Error: API Service endpoint scheme \"\" is not supported. Try tcp://myunix.sock or unix:/myunix.sock"
+}
@test "podman-system-service containers survive service stop" {
skip_if_remote "podman system service unavailable over remote"
diff --git a/test/system/700-play.bats b/test/system/700-play.bats
index 578d28394..5f3eb1ef2 100644
--- a/test/system/700-play.bats
+++ b/test/system/700-play.bats
@@ -165,8 +165,14 @@ EOF
TESTDIR=$PODMAN_TMPDIR/testdir
mkdir -p $TESTDIR
echo "$testYaml" | sed "s|TESTDIR|${TESTDIR}|g" > $PODMAN_TMPDIR/test.yaml
- run_podman 125 kube play --network host $PODMAN_TMPDIR/test.yaml
- is "$output" ".*invalid value passed to --network: bridge or host networking must be configured in YAML" "podman plan-network should fail with --network host"
+ run_podman kube play --network host $PODMAN_TMPDIR/test.yaml
+ is "$output" "Pod:.*" "podman kube play should work with --network host"
+
+ run_podman pod inspect --format "{{.InfraConfig.HostNetwork}}" test_pod
+ is "$output" "true" ".InfraConfig.HostNetwork"
+ run_podman stop -a -t 0
+ run_podman pod rm -t 0 -f test_pod
+
run_podman kube play --network slirp4netns:port_handler=slirp4netns $PODMAN_TMPDIR/test.yaml
run_podman pod inspect --format {{.InfraContainerID}} "${lines[1]}"
infraID="$output"
diff --git a/vendor/github.com/containers/buildah/CHANGELOG.md b/vendor/github.com/containers/buildah/CHANGELOG.md
index 667d5f81f..32175538b 100644
--- a/vendor/github.com/containers/buildah/CHANGELOG.md
+++ b/vendor/github.com/containers/buildah/CHANGELOG.md
@@ -2,6 +2,77 @@
# Changelog
+## v1.28.0 (2022-09-30)
+
+ Update vendor containers/(common,image)
+ [CI:DOCS] Add quay-description update reminder
+ vendor: bump c/common to v0.49.2-0.20220929111928-2d1b45ae2423
+ build(deps): bump github.com/opencontainers/selinux
+ Vendor in latest containers/storage
+ Changing shell list operators from `;` to `&&`
+ Fix buildahimage container.conf permissions regression
+ Set sysctls from containers.conf
+ refactor: stop using Normalize directly from containerd package
+ config,builder: process variant while populating image spec
+ Proof of concept: nightly dependency treadmill
+ Run codespell on code
+ Check for unset build args after TARGET args
+ pkg/cli: improve completion test
+ vendor in latest containers/(common,storage,image)
+ copier: work around freebsd bug for "mkdir /"
+ vendor: update c/image
+ test: run in the host cgroup namespace
+ vendor: update c/storage
+ vendor: update c/common
+ cmd: check for user UID instead of privileges
+ run,build: conflict --isolation=chroot and --network
+ Fix broken dns test (from merge collision)
+ Fix stutters
+ Fix broken command completion
+ buildah bud --network=none should have no network
+ build: support --skip-unused-stages for multi-stage builds
+ Prevent use of --dns* options with --net=none
+ buildah: make --cache-ttl=0s equivalent to --no-cache
+ parse: make processing flags in --mount order agnostic
+ Minor test fix for podman-remote
+ build: honor <Containerfile>.containerignore as ignore file
+ Update install.md: Debian 11 (Bullseye) is stable
+ build(deps): bump github.com/docker/docker
+ Use constants from containers/common for finding seccomp.json
+ Don't call os.Exit(1) from manifest exist
+ manifest: add support for buildah manifest exists
+ Buildah should ignore /etc/crio/seccomp.json
+ chroot: Fix cross build break
+ chroot: Move isDevNull to run_common.go
+ chroot: Fix setRlimit build on FreeBSD
+ chroot: Move parseRLimits and setRlimits to run_common.go
+ chroot: Fix runUsingChrootExecMain on FreeBSD
+ chroot: Move runUsingChrootExecMain to run_common.go
+ chroot: Factor out Linux-specific unshare options from runUsingChroot
+ chroot: Move runUsingChroot to run_common.go
+ chroot: Move RunUsingChroot and runUsingChrootMain to run_common.go
+ chroot: Factor out /dev/ptmx pty implementation
+ chroot: Add FreeBSD support for run with chroot isolation
+ build(deps): bump github.com/docker/go-units from 0.4.0 to 0.5.0
+ Replace k8s.gcr.io/pause in tests with registry.k8s.io/pause
+ build(deps): bump github.com/onsi/gomega from 1.20.0 to 1.20.1
+ Cirrus: use image with fewer downloaded dependencies
+ build(deps): bump github.com/opencontainers/runc from 1.1.3 to 1.1.4
+ run: add container gid to additional groups
+ buildah: support for --retry and --retry-delay for push/pull failures
+ Makefile: always call $(GO) instead of `go`
+ build(deps): bump github.com/fsouza/go-dockerclient from 1.8.2 to 1.8.3
+ test: use `T.TempDir` to create temporary test directory
+ mount,cache: enable SElinux shared content label option by default
+ commit: use race-free RemoveNames instead of SetNames
+ Drop util/util.Cause()
+ cmd/buildah: add "manifest create --amend"
+ build(deps): bump github.com/fsouza/go-dockerclient from 1.8.1 to 1.8.2
+ docs: specify git protocol is not supported for github hosted repo
+ Scrub user and group names from layer diffs
+ build(deps): bump github.com/containerd/containerd from 1.6.6 to 1.6.8
+ version: bump to 1.28.0-dev
+
## v1.27.0 (2022-08-01)
build: support filtering cache by duration using `--cache-ttl`.
diff --git a/vendor/github.com/containers/buildah/Makefile b/vendor/github.com/containers/buildah/Makefile
index 7c7bf1596..8b6bb8f44 100644
--- a/vendor/github.com/containers/buildah/Makefile
+++ b/vendor/github.com/containers/buildah/Makefile
@@ -113,7 +113,7 @@ gopath:
test $(shell pwd) = $(shell cd ../../../../src/github.com/containers/buildah ; pwd)
codespell:
- codespell -S Makefile,buildah.spec.rpkg,AUTHORS,bin,vendor,.git,go.mod,go.sum,CHANGELOG.md,changelog.txt,seccomp.json,.cirrus.yml,"*.xz,*.gz,*.tar,*.tgz,*ico,*.png,*.1,*.5,*.orig,*.rej" -L uint,iff,od,ERRO -w
+ codespell -S Makefile,buildah.spec.rpkg,AUTHORS,bin,vendor,.git,go.mod,go.sum,CHANGELOG.md,changelog.txt,seccomp.json,.cirrus.yml,"*.xz,*.gz,*.tar,*.tgz,*ico,*.png,*.1,*.5,*.orig,*.rej" -L uint,iff,od,erro -w
.PHONY: validate
validate: install.tools
@@ -187,7 +187,7 @@ vendor-in-container:
.PHONY: vendor
vendor:
- GO111MODULE=on $(GO) mod tidy
+ GO111MODULE=on $(GO) mod tidy -compat=1.17
GO111MODULE=on $(GO) mod vendor
GO111MODULE=on $(GO) mod verify
diff --git a/vendor/github.com/containers/buildah/changelog.txt b/vendor/github.com/containers/buildah/changelog.txt
index a6fa96acf..1d066f068 100644
--- a/vendor/github.com/containers/buildah/changelog.txt
+++ b/vendor/github.com/containers/buildah/changelog.txt
@@ -1,3 +1,73 @@
+- Changelog for v1.28.0 (2022-09-30)
+ * Update vendor containers/(common,image)
+ * [CI:DOCS] Add quay-description update reminder
+ * vendor: bump c/common to v0.49.2-0.20220929111928-2d1b45ae2423
+ * build(deps): bump github.com/opencontainers/selinux
+ * Vendor in latest containers/storage
+ * Changing shell list operators from `;` to `&&`
+ * Fix buildahimage container.conf permissions regression
+ * Set sysctls from containers.conf
+ * refactor: stop using Normalize directly from containerd package
+ * config,builder: process variant while populating image spec
+ * Proof of concept: nightly dependency treadmill
+ * Run codespell on code
+ * Check for unset build args after TARGET args
+ * pkg/cli: improve completion test
+ * vendor in latest containers/(common,storage,image)
+ * copier: work around freebsd bug for "mkdir /"
+ * vendor: update c/image
+ * test: run in the host cgroup namespace
+ * vendor: update c/storage
+ * vendor: update c/common
+ * cmd: check for user UID instead of privileges
+ * run,build: conflict --isolation=chroot and --network
+ * Fix broken dns test (from merge collision)
+ * Fix stutters
+ * Fix broken command completion
+ * buildah bud --network=none should have no network
+ * build: support --skip-unused-stages for multi-stage builds
+ * Prevent use of --dns* options with --net=none
+ * buildah: make --cache-ttl=0s equivalent to --no-cache
+ * parse: make processing flags in --mount order agnostic
+ * Minor test fix for podman-remote
+ * build: honor <Containerfile>.containerignore as ignore file
+ * Update install.md: Debian 11 (Bullseye) is stable
+ * build(deps): bump github.com/docker/docker
+ * Use constants from containers/common for finding seccomp.json
+ * Don't call os.Exit(1) from manifest exist
+ * manifest: add support for buildah manifest exists
+ * Buildah should ignore /etc/crio/seccomp.json
+ * chroot: Fix cross build break
+ * chroot: Move isDevNull to run_common.go
+ * chroot: Fix setRlimit build on FreeBSD
+ * chroot: Move parseRLimits and setRlimits to run_common.go
+ * chroot: Fix runUsingChrootExecMain on FreeBSD
+ * chroot: Move runUsingChrootExecMain to run_common.go
+ * chroot: Factor out Linux-specific unshare options from runUsingChroot
+ * chroot: Move runUsingChroot to run_common.go
+ * chroot: Move RunUsingChroot and runUsingChrootMain to run_common.go
+ * chroot: Factor out /dev/ptmx pty implementation
+ * chroot: Add FreeBSD support for run with chroot isolation
+ * build(deps): bump github.com/docker/go-units from 0.4.0 to 0.5.0
+ * Replace k8s.gcr.io/pause in tests with registry.k8s.io/pause
+ * build(deps): bump github.com/onsi/gomega from 1.20.0 to 1.20.1
+ * Cirrus: use image with fewer downloaded dependencies
+ * build(deps): bump github.com/opencontainers/runc from 1.1.3 to 1.1.4
+ * run: add container gid to additional groups
+ * buildah: support for --retry and --retry-delay for push/pull failures
+ * Makefile: always call $(GO) instead of `go`
+ * build(deps): bump github.com/fsouza/go-dockerclient from 1.8.2 to 1.8.3
+ * test: use `T.TempDir` to create temporary test directory
+ * mount,cache: enable SElinux shared content label option by default
+ * commit: use race-free RemoveNames instead of SetNames
+ * Drop util/util.Cause()
+ * cmd/buildah: add "manifest create --amend"
+ * build(deps): bump github.com/fsouza/go-dockerclient from 1.8.1 to 1.8.2
+ * docs: specify git protocol is not supported for github hosted repo
+ * Scrub user and group names from layer diffs
+ * build(deps): bump github.com/containerd/containerd from 1.6.6 to 1.6.8
+ * version: bump to 1.28.0-dev
+
- Changelog for v1.27.0 (2022-08-01)
* build: support filtering cache by duration using `--cache-ttl`.
* build: support building from commit when using git repo as build context.
diff --git a/vendor/github.com/containers/buildah/config.go b/vendor/github.com/containers/buildah/config.go
index a9883a595..fde35529a 100644
--- a/vendor/github.com/containers/buildah/config.go
+++ b/vendor/github.com/containers/buildah/config.go
@@ -9,9 +9,9 @@ import (
"strings"
"time"
- "github.com/containerd/containerd/platforms"
"github.com/containers/buildah/define"
"github.com/containers/buildah/docker"
+ internalUtil "github.com/containers/buildah/internal/util"
"github.com/containers/common/pkg/util"
"github.com/containers/image/v5/manifest"
"github.com/containers/image/v5/pkg/compression"
@@ -136,7 +136,16 @@ func (b *Builder) fixupConfig(sys *types.SystemContext) {
b.SetArchitecture(runtime.GOARCH)
}
// in case the arch string we started with was shorthand for a known arch+variant pair, normalize it
- ps := platforms.Normalize(ociv1.Platform{OS: b.OS(), Architecture: b.Architecture(), Variant: b.Variant()})
+ ps := internalUtil.NormalizePlatform(ociv1.Platform{OS: b.OS(), Architecture: b.Architecture(), Variant: b.Variant()})
+ b.SetArchitecture(ps.Architecture)
+ b.SetVariant(ps.Variant)
+ }
+ if b.Variant() == "" {
+ if sys != nil && sys.VariantChoice != "" {
+ b.SetVariant(sys.VariantChoice)
+ }
+ // in case the arch string we started with was shorthand for a known arch+variant pair, normalize it
+ ps := internalUtil.NormalizePlatform(ociv1.Platform{OS: b.OS(), Architecture: b.Architecture(), Variant: b.Variant()})
b.SetArchitecture(ps.Architecture)
b.SetVariant(ps.Variant)
}
diff --git a/vendor/github.com/containers/buildah/copier/copier.go b/vendor/github.com/containers/buildah/copier/copier.go
index fd4c6b394..6d4c81c67 100644
--- a/vendor/github.com/containers/buildah/copier/copier.go
+++ b/vendor/github.com/containers/buildah/copier/copier.go
@@ -1794,7 +1794,9 @@ func copierHandlerPut(bulkReader io.Reader, req request, idMappings *idtools.IDM
}
}
case tar.TypeDir:
- if err = os.Mkdir(path, 0700); err != nil && errors.Is(err, os.ErrExist) {
+ // FreeBSD can return EISDIR for "mkdir /":
+ // https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=59739.
+ if err = os.Mkdir(path, 0700); err != nil && (errors.Is(err, os.ErrExist) || errors.Is(err, syscall.EISDIR)) {
if st, stErr := os.Lstat(path); stErr == nil && !st.IsDir() {
if req.PutOptions.NoOverwriteNonDirDir {
break
diff --git a/vendor/github.com/containers/buildah/define/types.go b/vendor/github.com/containers/buildah/define/types.go
index fb4735baa..ae088a43d 100644
--- a/vendor/github.com/containers/buildah/define/types.go
+++ b/vendor/github.com/containers/buildah/define/types.go
@@ -30,7 +30,7 @@ const (
Package = "buildah"
// Version for the Package. Bump version in contrib/rpm/buildah.spec
// too.
- Version = "1.28.0-dev"
+ Version = "1.28.0"
// DefaultRuntime if containers.conf fails.
DefaultRuntime = "runc"
diff --git a/vendor/github.com/containers/buildah/imagebuildah/build.go b/vendor/github.com/containers/buildah/imagebuildah/build.go
index 293e5bc96..09267f966 100644
--- a/vendor/github.com/containers/buildah/imagebuildah/build.go
+++ b/vendor/github.com/containers/buildah/imagebuildah/build.go
@@ -17,6 +17,7 @@ import (
"github.com/containerd/containerd/platforms"
"github.com/containers/buildah/define"
+ internalUtil "github.com/containers/buildah/internal/util"
"github.com/containers/buildah/util"
"github.com/containers/common/libimage"
"github.com/containers/common/pkg/config"
@@ -216,12 +217,12 @@ func BuildDockerfiles(ctx context.Context, store storage.Store, options define.B
systemContext := options.SystemContext
for _, platform := range options.Platforms {
platformContext := *systemContext
- platformSpec := platforms.Normalize(v1.Platform{
+ platformSpec := internalUtil.NormalizePlatform(v1.Platform{
OS: platform.OS,
Architecture: platform.Arch,
Variant: platform.Variant,
})
- // platforms.Normalize converts an empty os value to GOOS
+ // internalUtil.NormalizePlatform converts an empty os value to GOOS
// so we have to check the original value here to not overwrite the default for no reason
if platform.OS != "" {
platformContext.OSChoice = platformSpec.OS
@@ -248,7 +249,7 @@ func BuildDockerfiles(ctx context.Context, store storage.Store, options define.B
loggerPerPlatform := logger
if platformOptions.LogFile != "" && platformOptions.LogSplitByPlatform {
logFile := platformOptions.LogFile + "_" + platformOptions.OS + "_" + platformOptions.Architecture
- f, err := os.OpenFile(logFile, os.O_CREATE|os.O_TRUNC|os.O_WRONLY, 0600)
+ f, err := os.OpenFile(logFile, os.O_CREATE|os.O_TRUNC|os.O_WRONLY, 0o600)
if err != nil {
return fmt.Errorf("opening logfile: %q: %w", logFile, err)
}
@@ -285,7 +286,7 @@ func BuildDockerfiles(ctx context.Context, store storage.Store, options define.B
return "", nil, merr.ErrorOrNil()
}
- // Reasons for this id, ref assigment w.r.t to use-case:
+ // Reasons for this id, ref assignment w.r.t to use-case:
//
// * Single-platform build: On single platform build we only
// have one built instance i.e on indice 0 of built instances,
@@ -294,7 +295,7 @@ func BuildDockerfiles(ctx context.Context, store storage.Store, options define.B
// * Multi-platform build with manifestList: If this is a build for
// multiple platforms ( more than one platform ) and --manifest
// option then this assignment is insignificant since it will be
- // overriden anyways with the id and ref of manifest list later in
+ // overridden anyways with the id and ref of manifest list later in
// in this code.
//
// * Multi-platform build without manifest list: If this is a build for
@@ -377,8 +378,6 @@ func buildDockerfilesOnce(ctx context.Context, store storage.Store, logger *logr
return "", nil, fmt.Errorf("parsing main Dockerfile: %s: %w", containerFiles[0], err)
}
- warnOnUnsetBuildArgs(logger, mainNode, options.Args)
-
// --platform was explicitly selected for this build
// so set correct TARGETPLATFORM in args if it is not
// already selected by the user.
@@ -413,6 +412,8 @@ func buildDockerfilesOnce(ctx context.Context, store storage.Store, logger *logr
}
}
+ warnOnUnsetBuildArgs(logger, mainNode, options.Args)
+
for i, d := range dockerfilecontents[1:] {
additionalNode, err := imagebuilder.ParseDockerfile(bytes.NewReader(d))
if err != nil {
@@ -622,7 +623,7 @@ func platformsForBaseImages(ctx context.Context, logger *logrus.Logger, dockerfi
if instance.Platform == nil {
continue
}
- platform := platforms.Normalize(*instance.Platform)
+ platform := internalUtil.NormalizePlatform(*instance.Platform)
targetPlatforms[platforms.Format(platform)] = struct{}{}
logger.Debugf("image %q supports %q", baseImage, platforms.Format(platform))
}
@@ -633,7 +634,7 @@ func platformsForBaseImages(ctx context.Context, logger *logrus.Logger, dockerfi
if instance.Platform == nil {
continue
}
- platform := platforms.Normalize(*instance.Platform)
+ platform := internalUtil.NormalizePlatform(*instance.Platform)
imagePlatforms[platforms.Format(platform)] = struct{}{}
logger.Debugf("image %q supports %q", baseImage, platforms.Format(platform))
}
diff --git a/vendor/github.com/containers/buildah/imagebuildah/stage_executor.go b/vendor/github.com/containers/buildah/imagebuildah/stage_executor.go
index de0e16bcc..8c858ea91 100644
--- a/vendor/github.com/containers/buildah/imagebuildah/stage_executor.go
+++ b/vendor/github.com/containers/buildah/imagebuildah/stage_executor.go
@@ -1677,7 +1677,7 @@ func (s *StageExecutor) tagExistingImage(ctx context.Context, cacheID, output st
// generateCacheKey returns a computed digest for the current STEP
// running its history and diff against a hash algorithm and this
// generated CacheKey is further used by buildah to lock and decide
-// tag for the intermeidate image which can be pushed and pulled to/from
+// tag for the intermediate image which can be pushed and pulled to/from
// the remote repository.
func (s *StageExecutor) generateCacheKey(ctx context.Context, currNode *parser.Node, addedContentDigest string, buildAddsLayer bool) (string, error) {
hash := sha256.New()
diff --git a/vendor/github.com/containers/buildah/info.go b/vendor/github.com/containers/buildah/info.go
index 9155bb318..85e570ce7 100644
--- a/vendor/github.com/containers/buildah/info.go
+++ b/vendor/github.com/containers/buildah/info.go
@@ -9,7 +9,7 @@ import (
"strconv"
"strings"
- "github.com/containerd/containerd/platforms"
+ internalUtil "github.com/containers/buildah/internal/util"
putil "github.com/containers/buildah/pkg/util"
"github.com/containers/buildah/util"
"github.com/containers/storage"
@@ -43,7 +43,7 @@ func Info(store storage.Store) ([]InfoData, error) {
func hostInfo() map[string]interface{} {
info := map[string]interface{}{}
- ps := platforms.Normalize(v1.Platform{OS: runtime.GOOS, Architecture: runtime.GOARCH})
+ ps := internalUtil.NormalizePlatform(v1.Platform{OS: runtime.GOOS, Architecture: runtime.GOARCH})
info["os"] = ps.OS
info["arch"] = ps.Architecture
info["variant"] = ps.Variant
diff --git a/vendor/github.com/containers/buildah/internal/util/util.go b/vendor/github.com/containers/buildah/internal/util/util.go
index 7d824ccf2..36fc4daba 100644
--- a/vendor/github.com/containers/buildah/internal/util/util.go
+++ b/vendor/github.com/containers/buildah/internal/util/util.go
@@ -15,6 +15,7 @@ import (
"github.com/containers/storage/pkg/archive"
"github.com/containers/storage/pkg/chrootarchive"
"github.com/containers/storage/pkg/unshare"
+ v1 "github.com/opencontainers/image-spec/specs-go/v1"
)
// LookupImage returns *Image to corresponding imagename or id
@@ -34,6 +35,22 @@ func LookupImage(ctx *types.SystemContext, store storage.Store, image string) (*
return localImage, nil
}
+// NormalizePlatform validates and translate the platform to the canonical value.
+//
+// For example, if "Aarch64" is encountered, we change it to "arm64" or if
+// "x86_64" is encountered, it becomes "amd64".
+//
+// Wrapper around libimage.NormalizePlatform to return and consume
+// v1.Platform instead of independent os, arch and variant.
+func NormalizePlatform(platform v1.Platform) v1.Platform {
+ os, arch, variant := libimage.NormalizePlatform(platform.OS, platform.Architecture, platform.Variant)
+ return v1.Platform{
+ OS: os,
+ Architecture: arch,
+ Variant: variant,
+ }
+}
+
// GetTempDir returns base for a temporary directory on host.
func GetTempDir() string {
if tmpdir, ok := os.LookupEnv("TMPDIR"); ok {
diff --git a/vendor/github.com/containers/buildah/release.sh b/vendor/github.com/containers/buildah/release.sh
index 007f238d8..508ae90d5 100644
--- a/vendor/github.com/containers/buildah/release.sh
+++ b/vendor/github.com/containers/buildah/release.sh
@@ -21,28 +21,6 @@ write_go_version()
sed -i "s/^\(.*Version = \"\).*/\1${LOCAL_VERSION}\"/" define/types.go
}
-write_spec_version()
-{
- LOCAL_VERSION="$1"
- sed -i "s/^\(Version: *\).*/\1${LOCAL_VERSION}/" contrib/rpm/buildah.spec
-}
-
-write_spec_changelog()
-{
- sed '/\*.*-dev-1/d' -i ./contrib/rpm/buildah.spec
- VERSION=$1
- date=$(date "+%a %b %d, %Y")
- name=$(getent passwd $USERNAME | cut -d ':' -f 5)
- echo "* ${date} ${name} <${USER}@redhat.com> ${VERSION}-1" >.changelog.txt
- if [[ "${VERSION}" != *-dev ]]; then
- git log --no-merges --format='- %s' "${LAST_TAG}..HEAD" >>.changelog.txt
- else
- echo "" >>.changelog.txt
- fi
- sed '/^%changelog.*/r .changelog.txt' -i ./contrib/rpm/buildah.spec
- rm -f .changelog.txt
-}
-
write_makefile_epoch()
{
LOCAL_EPOCH="$1"
@@ -68,8 +46,6 @@ write_changelog()
release_commit()
{
write_go_version "${VERSION}" &&
- write_spec_version "${VERSION}" &&
- write_spec_changelog "${VERSION}" &&
write_changelog &&
git commit -asm "Bump to v${VERSION}
@@ -80,8 +56,6 @@ release_commit()
dev_version_commit()
{
write_go_version "${NEXT_VERSION}-dev" &&
- write_spec_version "${NEXT_VERSION}-dev" &&
- write_spec_changelog "${NEXT_VERSION}-dev" &&
git commit -asm "Bump to v${NEXT_VERSION}-dev
[NO TESTS NEEDED]
diff --git a/vendor/github.com/containers/buildah/run_linux.go b/vendor/github.com/containers/buildah/run_linux.go
index d4707e39a..09a3cd066 100644
--- a/vendor/github.com/containers/buildah/run_linux.go
+++ b/vendor/github.com/containers/buildah/run_linux.go
@@ -605,11 +605,37 @@ func runMakeStdioPipe(uid, gid int) ([][]int, error) {
}
func setupNamespaces(logger *logrus.Logger, g *generate.Generator, namespaceOptions define.NamespaceOptions, idmapOptions define.IDMappingOptions, policy define.NetworkConfigurationPolicy) (configureNetwork bool, configureNetworks []string, configureUTS bool, err error) {
+ defaultContainerConfig, err := config.Default()
+ if err != nil {
+ return false, nil, false, fmt.Errorf("failed to get container config: %w", err)
+ }
+
+ addSysctl := func(prefixes []string) error {
+ for _, sysctl := range defaultContainerConfig.Sysctls() {
+ splitn := strings.SplitN(sysctl, "=", 2)
+ if len(splitn) > 2 {
+ return fmt.Errorf("sysctl %q defined in containers.conf must be formatted name=value", sysctl)
+ }
+ for _, prefix := range prefixes {
+ if strings.HasPrefix(splitn[0], prefix) {
+ g.AddLinuxSysctl(splitn[0], splitn[1])
+ }
+ }
+ }
+ return nil
+ }
+
// Set namespace options in the container configuration.
configureUserns := false
specifiedNetwork := false
for _, namespaceOption := range namespaceOptions {
switch namespaceOption.Name {
+ case string(specs.IPCNamespace):
+ if !namespaceOption.Host {
+ if err := addSysctl([]string{"fs.mqueue"}); err != nil {
+ return false, nil, false, err
+ }
+ }
case string(specs.UserNamespace):
configureUserns = false
if !namespaceOption.Host && namespaceOption.Path == "" {
@@ -627,8 +653,13 @@ func setupNamespaces(logger *logrus.Logger, g *generate.Generator, namespaceOpti
}
case string(specs.UTSNamespace):
configureUTS = false
- if !namespaceOption.Host && namespaceOption.Path == "" {
- configureUTS = true
+ if !namespaceOption.Host {
+ if namespaceOption.Path == "" {
+ configureUTS = true
+ }
+ if err := addSysctl([]string{"kernel.hostname", "kernel.domainame"}); err != nil {
+ return false, nil, false, err
+ }
}
}
if namespaceOption.Host {
@@ -684,7 +715,10 @@ func setupNamespaces(logger *logrus.Logger, g *generate.Generator, namespaceOpti
}
}
}
- if configureNetwork && !unshare.IsRootless() {
+ if configureNetwork {
+ if err := addSysctl([]string{"net"}); err != nil {
+ return false, nil, false, err
+ }
for name, val := range define.DefaultNetworkSysctl {
// Check that the sysctl we are adding is actually supported
// by the kernel
diff --git a/vendor/github.com/containers/common/libimage/platform.go b/vendor/github.com/containers/common/libimage/platform.go
index 274b2aa06..4d5dde310 100644
--- a/vendor/github.com/containers/common/libimage/platform.go
+++ b/vendor/github.com/containers/common/libimage/platform.go
@@ -6,6 +6,7 @@ import (
"runtime"
"github.com/containerd/containerd/platforms"
+ v1 "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/sirupsen/logrus"
)
@@ -20,9 +21,18 @@ const (
)
// NormalizePlatform normalizes (according to the OCI spec) the specified os,
-// arch and variant. If left empty, the individual item will not be normalized.
+// arch and variant. If left empty, the individual item will be normalized.
func NormalizePlatform(rawOS, rawArch, rawVariant string) (os, arch, variant string) {
- rawPlatform := toPlatformString(rawOS, rawArch, rawVariant)
+ platformSpec := v1.Platform{
+ OS: rawOS,
+ Architecture: rawArch,
+ Variant: rawVariant,
+ }
+ normalizedSpec := platforms.Normalize(platformSpec)
+ if normalizedSpec.Variant == "" && rawVariant != "" {
+ normalizedSpec.Variant = rawVariant
+ }
+ rawPlatform := toPlatformString(normalizedSpec.OS, normalizedSpec.Architecture, normalizedSpec.Variant)
normalizedPlatform, err := platforms.Parse(rawPlatform)
if err != nil {
logrus.Debugf("Error normalizing platform: %v", err)
@@ -38,7 +48,7 @@ func NormalizePlatform(rawOS, rawArch, rawVariant string) (os, arch, variant str
arch = normalizedPlatform.Architecture
}
variant = rawVariant
- if rawVariant != "" {
+ if rawVariant != "" || (rawVariant == "" && normalizedPlatform.Variant != "") {
variant = normalizedPlatform.Variant
}
return os, arch, variant
diff --git a/vendor/github.com/containers/common/pkg/config/default.go b/vendor/github.com/containers/common/pkg/config/default.go
index eb3f5fb1e..c5fca7f0c 100644
--- a/vendor/github.com/containers/common/pkg/config/default.go
+++ b/vendor/github.com/containers/common/pkg/config/default.go
@@ -180,7 +180,7 @@ func DefaultConfig() (*Config, error) {
}
defaultEngineConfig.SignaturePolicyPath = DefaultSignaturePolicyPath
- if unshare.GetRootlessUID() > 0 {
+ if useUserConfigLocations() {
configHome, err := homedir.GetConfigHome()
if err != nil {
return nil, err
@@ -289,7 +289,7 @@ func defaultConfigFromMemory() (*EngineConfig, error) {
return nil, err
}
}
- storeOpts, err := types.DefaultStoreOptions(unshare.GetRootlessUID() > 0, unshare.GetRootlessUID())
+ storeOpts, err := types.DefaultStoreOptions(useUserConfigLocations(), unshare.GetRootlessUID())
if err != nil {
return nil, err
}
@@ -427,7 +427,7 @@ func defaultConfigFromMemory() (*EngineConfig, error) {
}
func defaultTmpDir() (string, error) {
- if unshare.GetRootlessUID() == 0 {
+ if !useUserConfigLocations() {
return getLibpodTmpDir(), nil
}
@@ -679,3 +679,10 @@ func getDefaultSSHConfig() string {
dirname := homedir.Get()
return filepath.Join(dirname, ".ssh", "config")
}
+
+func useUserConfigLocations() bool {
+ // NOTE: For now we want Windows to use system locations.
+ // GetRootlessUID == -1 on Windows, so exclude negative range
+ return unshare.GetRootlessUID() > 0
+}
+
diff --git a/vendor/github.com/containers/common/pkg/util/util_supported.go b/vendor/github.com/containers/common/pkg/util/util_supported.go
index 6d7060af4..0cd53af53 100644
--- a/vendor/github.com/containers/common/pkg/util/util_supported.go
+++ b/vendor/github.com/containers/common/pkg/util/util_supported.go
@@ -11,6 +11,7 @@ import (
"sync"
"syscall"
+ "github.com/containers/storage/pkg/homedir"
"github.com/containers/storage/pkg/unshare"
"github.com/sirupsen/logrus"
)
@@ -31,7 +32,10 @@ func GetRuntimeDir() (string, error) {
var rootlessRuntimeDirError error
rootlessRuntimeDirOnce.Do(func() {
- runtimeDir := os.Getenv("XDG_RUNTIME_DIR")
+ runtimeDir, err := homedir.GetRuntimeDir()
+ if err != nil {
+ logrus.Debug(err)
+ }
if runtimeDir != "" {
st, err := os.Stat(runtimeDir)
if err != nil {
diff --git a/vendor/github.com/containers/common/version/version.go b/vendor/github.com/containers/common/version/version.go
index 34e9fe6ba..297966b70 100644
--- a/vendor/github.com/containers/common/version/version.go
+++ b/vendor/github.com/containers/common/version/version.go
@@ -1,4 +1,4 @@
package version
// Version is the version of the build.
-const Version = "0.49.2-dev"
+const Version = "0.50.1"
diff --git a/vendor/github.com/containers/image/v5/version/version.go b/vendor/github.com/containers/image/v5/version/version.go
index ca5f4a42d..999673727 100644
--- a/vendor/github.com/containers/image/v5/version/version.go
+++ b/vendor/github.com/containers/image/v5/version/version.go
@@ -6,12 +6,12 @@ const (
// VersionMajor is for an API incompatible changes
VersionMajor = 5
// VersionMinor is for functionality in a backwards-compatible manner
- VersionMinor = 22
+ VersionMinor = 23
// VersionPatch is for backwards-compatible bug fixes
- VersionPatch = 1
+ VersionPatch = 0
// VersionDev indicates development branch. Releases will be empty string.
- VersionDev = "-dev"
+ VersionDev = ""
)
// Version is the specification version that the package types support.
diff --git a/vendor/github.com/containers/storage/VERSION b/vendor/github.com/containers/storage/VERSION
index 6d41d503d..b978278f0 100644
--- a/vendor/github.com/containers/storage/VERSION
+++ b/vendor/github.com/containers/storage/VERSION
@@ -1 +1 @@
-1.42.1-dev
+1.43.0
diff --git a/vendor/github.com/containers/storage/drivers/driver_linux.go b/vendor/github.com/containers/storage/drivers/driver_linux.go
index 7c527d279..b9e57a60d 100644
--- a/vendor/github.com/containers/storage/drivers/driver_linux.go
+++ b/vendor/github.com/containers/storage/drivers/driver_linux.go
@@ -7,6 +7,7 @@ import (
"path/filepath"
"github.com/containers/storage/pkg/mount"
+ "github.com/sirupsen/logrus"
"golang.org/x/sys/unix"
)
@@ -127,9 +128,14 @@ var (
// GetFSMagic returns the filesystem id given the path.
func GetFSMagic(rootpath string) (FsMagic, error) {
var buf unix.Statfs_t
- if err := unix.Statfs(filepath.Dir(rootpath), &buf); err != nil {
+ path := filepath.Dir(rootpath)
+ if err := unix.Statfs(path, &buf); err != nil {
return 0, err
}
+
+ if _, ok := FsNames[FsMagic(buf.Type)]; !ok {
+ logrus.Debugf("Unknown filesystem type %#x reported for %s", buf.Type, path)
+ }
return FsMagic(buf.Type), nil
}
diff --git a/vendor/github.com/containers/storage/layers.go b/vendor/github.com/containers/storage/layers.go
index 18f3630e9..c23f0b26b 100644
--- a/vendor/github.com/containers/storage/layers.go
+++ b/vendor/github.com/containers/storage/layers.go
@@ -563,6 +563,8 @@ func (s *store) newLayerStore(rundir string, layerdir string, driver drivers.Dri
uidMap: copyIDMap(s.uidMap),
gidMap: copyIDMap(s.gidMap),
}
+ rlstore.Lock()
+ defer rlstore.Unlock()
if err := rlstore.Load(); err != nil {
return nil, err
}
@@ -584,6 +586,8 @@ func newROLayerStore(rundir string, layerdir string, driver drivers.Driver) (ROL
bymount: make(map[string]*Layer),
byname: make(map[string]*Layer),
}
+ rlstore.RLock()
+ defer rlstore.Unlock()
if err := rlstore.Load(); err != nil {
return nil, err
}
diff --git a/vendor/github.com/containers/storage/pkg/archive/archive.go b/vendor/github.com/containers/storage/pkg/archive/archive.go
index 1d7bbfa98..82c0adeb7 100644
--- a/vendor/github.com/containers/storage/pkg/archive/archive.go
+++ b/vendor/github.com/containers/storage/pkg/archive/archive.go
@@ -75,6 +75,7 @@ const (
solaris = "solaris"
windows = "windows"
darwin = "darwin"
+ freebsd = "freebsd"
)
var xattrsToIgnore = map[string]interface{}{
@@ -671,7 +672,7 @@ func createTarFile(path, extractDir string, hdr *tar.Header, reader io.Reader, L
if !strings.HasPrefix(targetPath, extractDir) {
return breakoutError(fmt.Errorf("invalid hardlink %q -> %q", targetPath, hdr.Linkname))
}
- if err := os.Link(targetPath, path); err != nil {
+ if err := handleLLink(targetPath, path); err != nil {
return err
}
diff --git a/vendor/github.com/containers/storage/pkg/archive/archive_freebsd.go b/vendor/github.com/containers/storage/pkg/archive/archive_freebsd.go
index fe22eb433..36017c3bf 100644
--- a/vendor/github.com/containers/storage/pkg/archive/archive_freebsd.go
+++ b/vendor/github.com/containers/storage/pkg/archive/archive_freebsd.go
@@ -9,6 +9,7 @@ import (
"os"
"path/filepath"
"syscall"
+ "unsafe"
"github.com/containers/storage/pkg/idtools"
"github.com/containers/storage/pkg/system"
@@ -111,16 +112,18 @@ func handleLChmod(hdr *tar.Header, path string, hdrInfo os.FileInfo, forceMask *
if forceMask != nil {
permissionsMask = *forceMask
}
- if hdr.Typeflag == tar.TypeLink {
- if fi, err := os.Lstat(hdr.Linkname); err == nil && (fi.Mode()&os.ModeSymlink == 0) {
- if err := os.Chmod(path, permissionsMask); err != nil {
- return err
- }
- }
- } else if hdr.Typeflag != tar.TypeSymlink {
- if err := os.Chmod(path, permissionsMask); err != nil {
- return err
- }
+ p, err := unix.BytePtrFromString(path)
+ if err != nil {
+ return err
+ }
+ _, _, e1 := unix.Syscall(unix.SYS_LCHMOD, uintptr(unsafe.Pointer(p)), uintptr(permissionsMask), 0)
+ if e1 != 0 {
+ return e1
}
return nil
}
+
+// Hardlink without following symlinks
+func handleLLink(targetPath string, path string) error {
+ return unix.Linkat(unix.AT_FDCWD, targetPath, unix.AT_FDCWD, path, 0)
+}
diff --git a/vendor/github.com/containers/storage/pkg/archive/archive_unix.go b/vendor/github.com/containers/storage/pkg/archive/archive_unix.go
index 7c3e442da..d0fb33066 100644
--- a/vendor/github.com/containers/storage/pkg/archive/archive_unix.go
+++ b/vendor/github.com/containers/storage/pkg/archive/archive_unix.go
@@ -1,3 +1,4 @@
+//go:build !windows && !freebsd
// +build !windows,!freebsd
package archive
@@ -97,7 +98,7 @@ func handleTarTypeBlockCharFifo(hdr *tar.Header, path string) error {
mode |= unix.S_IFIFO
}
- return system.Mknod(path, mode, int(system.Mkdev(hdr.Devmajor, hdr.Devminor)))
+ return system.Mknod(path, mode, system.Mkdev(hdr.Devmajor, hdr.Devminor))
}
func handleLChmod(hdr *tar.Header, path string, hdrInfo os.FileInfo, forceMask *os.FileMode) error {
@@ -118,3 +119,13 @@ func handleLChmod(hdr *tar.Header, path string, hdrInfo os.FileInfo, forceMask *
}
return nil
}
+
+// Hardlink without symlinks
+func handleLLink(targetPath, path string) error {
+ // Note: on Linux, the link syscall will not follow symlinks.
+ // This behavior is implementation-dependent since
+ // POSIX.1-2008 so to make it clear that we need non-symlink
+ // following here we use the linkat syscall which has a flags
+ // field to select symlink following or not.
+ return unix.Linkat(unix.AT_FDCWD, targetPath, unix.AT_FDCWD, path, 0)
+}
diff --git a/vendor/github.com/containers/storage/pkg/archive/archive_windows.go b/vendor/github.com/containers/storage/pkg/archive/archive_windows.go
index 8e7a2fd02..e44011775 100644
--- a/vendor/github.com/containers/storage/pkg/archive/archive_windows.go
+++ b/vendor/github.com/containers/storage/pkg/archive/archive_windows.go
@@ -78,3 +78,8 @@ func getFileUIDGID(stat interface{}) (idtools.IDPair, error) {
// no notion of file ownership mapping yet on Windows
return idtools.IDPair{0, 0}, nil
}
+
+// Hardlink without following symlinks
+func handleLLink(targetPath string, path string) error {
+ return os.Link(targetPath, path)
+}
diff --git a/vendor/github.com/containers/storage/pkg/homedir/homedir_unix.go b/vendor/github.com/containers/storage/pkg/homedir/homedir_unix.go
index 33177bdf3..37dc9159f 100644
--- a/vendor/github.com/containers/storage/pkg/homedir/homedir_unix.go
+++ b/vendor/github.com/containers/storage/pkg/homedir/homedir_unix.go
@@ -1,3 +1,4 @@
+//go:build !windows
// +build !windows
package homedir
@@ -46,7 +47,7 @@ func GetShortcutString() string {
// See also https://standards.freedesktop.org/basedir-spec/latest/ar01s03.html
func GetRuntimeDir() (string, error) {
if xdgRuntimeDir := os.Getenv("XDG_RUNTIME_DIR"); xdgRuntimeDir != "" {
- return xdgRuntimeDir, nil
+ return filepath.EvalSymlinks(xdgRuntimeDir)
}
return "", errors.New("could not get XDG_RUNTIME_DIR")
}
diff --git a/vendor/github.com/containers/storage/pkg/system/mknod.go b/vendor/github.com/containers/storage/pkg/system/mknod.go
index c276ce8e8..d3d0ed8a1 100644
--- a/vendor/github.com/containers/storage/pkg/system/mknod.go
+++ b/vendor/github.com/containers/storage/pkg/system/mknod.go
@@ -1,3 +1,4 @@
+//go:build !windows && !freebsd
// +build !windows,!freebsd
package system
@@ -8,8 +9,8 @@ import (
// Mknod creates a filesystem node (file, device special file or named pipe) named path
// with attributes specified by mode and dev.
-func Mknod(path string, mode uint32, dev int) error {
- return unix.Mknod(path, mode, dev)
+func Mknod(path string, mode uint32, dev uint32) error {
+ return unix.Mknod(path, mode, int(dev))
}
// Mkdev is used to build the value of linux devices (in /dev/) which specifies major
diff --git a/vendor/github.com/containers/storage/pkg/system/mknod_freebsd.go b/vendor/github.com/containers/storage/pkg/system/mknod_freebsd.go
index d09005589..53c3f2837 100644
--- a/vendor/github.com/containers/storage/pkg/system/mknod_freebsd.go
+++ b/vendor/github.com/containers/storage/pkg/system/mknod_freebsd.go
@@ -1,3 +1,4 @@
+//go:build freebsd
// +build freebsd
package system
@@ -17,6 +18,6 @@ func Mknod(path string, mode uint32, dev uint64) error {
// Linux device nodes are a bit weird due to backwards compat with 16 bit device nodes.
// They are, from low to high: the lower 8 bits of the minor, then 12 bits of the major,
// then the top 12 bits of the minor.
-func Mkdev(major int64, minor int64) uint32 {
- return uint32(((minor & 0xfff00) << 12) | ((major & 0xfff) << 8) | (minor & 0xff))
+func Mkdev(major int64, minor int64) uint64 {
+ return uint64(((minor & 0xfff00) << 12) | ((major & 0xfff) << 8) | (minor & 0xff))
}
diff --git a/vendor/github.com/containers/storage/pkg/system/rm.go b/vendor/github.com/containers/storage/pkg/system/rm.go
index b65121f1d..5d63dc741 100644
--- a/vendor/github.com/containers/storage/pkg/system/rm.go
+++ b/vendor/github.com/containers/storage/pkg/system/rm.go
@@ -35,6 +35,9 @@ func EnsureRemoveAll(dir string) error {
}
for {
+ if err := resetFileFlags(dir); err != nil {
+ return fmt.Errorf("resetting file flags: %w", err)
+ }
err := os.RemoveAll(dir)
if err == nil {
return nil
diff --git a/vendor/github.com/containers/storage/pkg/system/rm_common.go b/vendor/github.com/containers/storage/pkg/system/rm_common.go
new file mode 100644
index 000000000..117eb1d6d
--- /dev/null
+++ b/vendor/github.com/containers/storage/pkg/system/rm_common.go
@@ -0,0 +1,10 @@
+//go:build !freebsd
+// +build !freebsd
+
+package system
+
+// Reset file flags in a directory tree. This allows EnsureRemoveAll
+// to delete trees which have the immutable flag set.
+func resetFileFlags(dir string) error {
+ return nil
+}
diff --git a/vendor/github.com/containers/storage/pkg/system/rm_freebsd.go b/vendor/github.com/containers/storage/pkg/system/rm_freebsd.go
new file mode 100644
index 000000000..35896c11d
--- /dev/null
+++ b/vendor/github.com/containers/storage/pkg/system/rm_freebsd.go
@@ -0,0 +1,32 @@
+package system
+
+import (
+ "io/fs"
+ "path/filepath"
+ "unsafe"
+
+ "golang.org/x/sys/unix"
+)
+
+func lchflags(path string, flags int) (err error) {
+ p, err := unix.BytePtrFromString(path)
+ if err != nil {
+ return err
+ }
+ _, _, e1 := unix.Syscall(unix.SYS_LCHFLAGS, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
+ if e1 != 0 {
+ return e1
+ }
+ return nil
+}
+
+// Reset file flags in a directory tree. This allows EnsureRemoveAll
+// to delete trees which have the immutable flag set.
+func resetFileFlags(dir string) error {
+ return filepath.WalkDir(dir, func(path string, d fs.DirEntry, err error) error {
+ if err := lchflags(path, 0); err != nil {
+ return err
+ }
+ return nil
+ })
+}
diff --git a/vendor/github.com/containers/storage/types/options.go b/vendor/github.com/containers/storage/types/options.go
index 5421c02da..4c873b45f 100644
--- a/vendor/github.com/containers/storage/types/options.go
+++ b/vendor/github.com/containers/storage/types/options.go
@@ -38,17 +38,44 @@ var (
)
func loadDefaultStoreOptions() {
- defaultStoreOptions.RunRoot = defaultRunRoot
- defaultStoreOptions.GraphRoot = defaultGraphRoot
defaultStoreOptions.GraphDriverName = ""
+ setDefaults := func() {
+ // reload could set values to empty for run and graph root if config does not contains anything
+ if defaultStoreOptions.RunRoot == "" {
+ defaultStoreOptions.RunRoot = defaultRunRoot
+ }
+ if defaultStoreOptions.GraphRoot == "" {
+ defaultStoreOptions.GraphRoot = defaultGraphRoot
+ }
+ }
+ setDefaults()
+
if path, ok := os.LookupEnv(storageConfEnv); ok {
defaultOverrideConfigFile = path
if err := ReloadConfigurationFileIfNeeded(path, &defaultStoreOptions); err != nil {
loadDefaultStoreOptionsErr = err
return
}
- } else if _, err := os.Stat(defaultOverrideConfigFile); err == nil {
+ setDefaults()
+ return
+ }
+
+ if path, ok := os.LookupEnv("XDG_CONFIG_HOME"); ok {
+ homeConfigFile := filepath.Join(path, "containers", "storage.conf")
+ if _, err := os.Stat(homeConfigFile); err == nil {
+ // user storage.conf in XDG_CONFIG_HOME if it exists
+ defaultOverrideConfigFile = homeConfigFile
+ } else {
+ if !os.IsNotExist(err) {
+ loadDefaultStoreOptionsErr = err
+ return
+ }
+ }
+ }
+
+ _, err := os.Stat(defaultOverrideConfigFile)
+ if err == nil {
// The DefaultConfigFile(rootless) function returns the path
// of the used storage.conf file, by returning defaultConfigFile
// If override exists containers/storage uses it by default.
@@ -57,22 +84,18 @@ func loadDefaultStoreOptions() {
loadDefaultStoreOptionsErr = err
return
}
- } else {
- if !os.IsNotExist(err) {
- logrus.Warningf("Attempting to use %s, %v", defaultConfigFile, err)
- }
- if err := ReloadConfigurationFileIfNeeded(defaultConfigFile, &defaultStoreOptions); err != nil && !errors.Is(err, os.ErrNotExist) {
- loadDefaultStoreOptionsErr = err
- return
- }
+ setDefaults()
+ return
}
- // reload could set values to empty for run and graph root if config does not contains anything
- if defaultStoreOptions.RunRoot == "" {
- defaultStoreOptions.RunRoot = defaultRunRoot
+
+ if !os.IsNotExist(err) {
+ logrus.Warningf("Attempting to use %s, %v", defaultConfigFile, err)
}
- if defaultStoreOptions.GraphRoot == "" {
- defaultStoreOptions.GraphRoot = defaultGraphRoot
+ if err := ReloadConfigurationFileIfNeeded(defaultConfigFile, &defaultStoreOptions); err != nil && !errors.Is(err, os.ErrNotExist) {
+ loadDefaultStoreOptionsErr = err
+ return
}
+ setDefaults()
}
// defaultStoreOptionsIsolated is an internal implementation detail of DefaultStoreOptions to allow testing.
diff --git a/vendor/github.com/docker/docker-credential-helpers/credentials/credentials.go b/vendor/github.com/docker/docker-credential-helpers/credentials/credentials.go
index da8b594e7..91d9d4bba 100644
--- a/vendor/github.com/docker/docker-credential-helpers/credentials/credentials.go
+++ b/vendor/github.com/docker/docker-credential-helpers/credentials/credentials.go
@@ -169,8 +169,8 @@ func Erase(helper Helper, reader io.Reader) error {
return helper.Delete(serverURL)
}
-//List returns all the serverURLs of keys in
-//the OS store as a list of strings
+// List returns all the serverURLs of keys in
+// the OS store as a list of strings
func List(helper Helper, writer io.Writer) error {
accts, err := helper.List()
if err != nil {
@@ -179,8 +179,8 @@ func List(helper Helper, writer io.Writer) error {
return json.NewEncoder(writer).Encode(accts)
}
-//PrintVersion outputs the current version.
+// PrintVersion outputs the current version.
func PrintVersion(writer io.Writer) error {
- fmt.Fprintln(writer, Version)
+ fmt.Fprintf(writer, "%s (%s) %s\n", Name, Package, Version)
return nil
}
diff --git a/vendor/github.com/docker/docker-credential-helpers/credentials/version.go b/vendor/github.com/docker/docker-credential-helpers/credentials/version.go
index 185e36796..84377c263 100644
--- a/vendor/github.com/docker/docker-credential-helpers/credentials/version.go
+++ b/vendor/github.com/docker/docker-credential-helpers/credentials/version.go
@@ -1,4 +1,16 @@
package credentials
-// Version holds a string describing the current version
-const Version = "0.6.4"
+var (
+ // Name is filled at linking time
+ Name = ""
+
+ // Package is filled at linking time
+ Package = "github.com/docker/docker-credential-helpers"
+
+ // Version holds the complete version number. Filled in at linking time.
+ Version = "v0.0.0+unknown"
+
+ // Revision is filled with the VCS (e.g. git) revision being used to build
+ // the program at linking time.
+ Revision = ""
+)
diff --git a/vendor/github.com/klauspost/compress/README.md b/vendor/github.com/klauspost/compress/README.md
index 2d6b01077..3c00c1af9 100644
--- a/vendor/github.com/klauspost/compress/README.md
+++ b/vendor/github.com/klauspost/compress/README.md
@@ -17,6 +17,17 @@ This package provides various compression algorithms.
# changelog
+* Sept 16, 2022 (v1.15.10)
+
+ * zstd: Add [WithDecodeAllCapLimit](https://pkg.go.dev/github.com/klauspost/compress@v1.15.10/zstd#WithDecodeAllCapLimit) https://github.com/klauspost/compress/pull/649
+ * Add Go 1.19 - deprecate Go 1.16 https://github.com/klauspost/compress/pull/651
+ * flate: Improve level 5+6 compression https://github.com/klauspost/compress/pull/656
+ * zstd: Improve "better" compresssion https://github.com/klauspost/compress/pull/657
+ * s2: Improve "best" compression https://github.com/klauspost/compress/pull/658
+ * s2: Improve "better" compression. https://github.com/klauspost/compress/pull/635
+ * s2: Slightly faster non-assembly decompression https://github.com/klauspost/compress/pull/646
+ * Use arrays for constant size copies https://github.com/klauspost/compress/pull/659
+
* July 21, 2022 (v1.15.9)
* zstd: Fix decoder crash on amd64 (no BMI) on invalid input https://github.com/klauspost/compress/pull/645
@@ -97,15 +108,15 @@ This package provides various compression algorithms.
* gzhttp: Add zstd to transport by @klauspost in [#400](https://github.com/klauspost/compress/pull/400)
* gzhttp: Make content-type optional by @klauspost in [#510](https://github.com/klauspost/compress/pull/510)
-<details>
- <summary>See Details</summary>
Both compression and decompression now supports "synchronous" stream operations. This means that whenever "concurrency" is set to 1, they will operate without spawning goroutines.
Stream decompression is now faster on asynchronous, since the goroutine allocation much more effectively splits the workload. On typical streams this will typically use 2 cores fully for decompression. When a stream has finished decoding no goroutines will be left over, so decoders can now safely be pooled and still be garbage collected.
While the release has been extensively tested, it is recommended to testing when upgrading.
-</details>
+<details>
+ <summary>See changes to v1.14.x</summary>
+
* Feb 22, 2022 (v1.14.4)
* flate: Fix rare huffman only (-2) corruption. [#503](https://github.com/klauspost/compress/pull/503)
* zip: Update deprecated CreateHeaderRaw to correctly call CreateRaw by @saracen in [#502](https://github.com/klauspost/compress/pull/502)
@@ -131,6 +142,7 @@ While the release has been extensively tested, it is recommended to testing when
* zstd: Performance improvement in [#420]( https://github.com/klauspost/compress/pull/420) [#456](https://github.com/klauspost/compress/pull/456) [#437](https://github.com/klauspost/compress/pull/437) [#467](https://github.com/klauspost/compress/pull/467) [#468](https://github.com/klauspost/compress/pull/468)
* zstd: add arm64 xxhash assembly in [#464](https://github.com/klauspost/compress/pull/464)
* Add garbled for binaries for s2 in [#445](https://github.com/klauspost/compress/pull/445)
+</details>
<details>
<summary>See changes to v1.13.x</summary>
diff --git a/vendor/github.com/klauspost/compress/flate/deflate.go b/vendor/github.com/klauspost/compress/flate/deflate.go
index f00da5b21..07265dded 100644
--- a/vendor/github.com/klauspost/compress/flate/deflate.go
+++ b/vendor/github.com/klauspost/compress/flate/deflate.go
@@ -374,6 +374,12 @@ func hash4(b []byte) uint32 {
return hash4u(binary.LittleEndian.Uint32(b), hashBits)
}
+// hash4 returns the hash of u to fit in a hash table with h bits.
+// Preferably h should be a constant and should always be <32.
+func hash4u(u uint32, h uint8) uint32 {
+ return (u * prime4bytes) >> (32 - h)
+}
+
// bulkHash4 will compute hashes using the same
// algorithm as hash4
func bulkHash4(b []byte, dst []uint32) {
diff --git a/vendor/github.com/klauspost/compress/flate/fast_encoder.go b/vendor/github.com/klauspost/compress/flate/fast_encoder.go
index cd77a2cc4..24caf5f70 100644
--- a/vendor/github.com/klauspost/compress/flate/fast_encoder.go
+++ b/vendor/github.com/klauspost/compress/flate/fast_encoder.go
@@ -58,17 +58,6 @@ const (
prime8bytes = 0xcf1bbcdcb7a56463
)
-func load32(b []byte, i int) uint32 {
- // Help the compiler eliminate bounds checks on the read so it can be done in a single read.
- b = b[i:]
- b = b[:4]
- return uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24
-}
-
-func load64(b []byte, i int) uint64 {
- return binary.LittleEndian.Uint64(b[i:])
-}
-
func load3232(b []byte, i int32) uint32 {
return binary.LittleEndian.Uint32(b[i:])
}
@@ -77,10 +66,6 @@ func load6432(b []byte, i int32) uint64 {
return binary.LittleEndian.Uint64(b[i:])
}
-func hash(u uint32) uint32 {
- return (u * 0x1e35a7bd) >> tableShift
-}
-
type tableEntry struct {
offset int32
}
@@ -115,39 +100,36 @@ func (e *fastGen) addBlock(src []byte) int32 {
return s
}
-// hash4 returns the hash of u to fit in a hash table with h bits.
-// Preferably h should be a constant and should always be <32.
-func hash4u(u uint32, h uint8) uint32 {
- return (u * prime4bytes) >> (32 - h)
-}
-
type tableEntryPrev struct {
Cur tableEntry
Prev tableEntry
}
-// hash4x64 returns the hash of the lowest 4 bytes of u to fit in a hash table with h bits.
-// Preferably h should be a constant and should always be <32.
-func hash4x64(u uint64, h uint8) uint32 {
- return (uint32(u) * prime4bytes) >> ((32 - h) & reg8SizeMask32)
-}
-
// hash7 returns the hash of the lowest 7 bytes of u to fit in a hash table with h bits.
// Preferably h should be a constant and should always be <64.
func hash7(u uint64, h uint8) uint32 {
return uint32(((u << (64 - 56)) * prime7bytes) >> ((64 - h) & reg8SizeMask64))
}
-// hash8 returns the hash of u to fit in a hash table with h bits.
-// Preferably h should be a constant and should always be <64.
-func hash8(u uint64, h uint8) uint32 {
- return uint32((u * prime8bytes) >> ((64 - h) & reg8SizeMask64))
-}
-
-// hash6 returns the hash of the lowest 6 bytes of u to fit in a hash table with h bits.
-// Preferably h should be a constant and should always be <64.
-func hash6(u uint64, h uint8) uint32 {
- return uint32(((u << (64 - 48)) * prime6bytes) >> ((64 - h) & reg8SizeMask64))
+// hashLen returns a hash of the lowest mls bytes of with length output bits.
+// mls must be >=3 and <=8. Any other value will return hash for 4 bytes.
+// length should always be < 32.
+// Preferably length and mls should be a constant for inlining.
+func hashLen(u uint64, length, mls uint8) uint32 {
+ switch mls {
+ case 3:
+ return (uint32(u<<8) * prime3bytes) >> (32 - length)
+ case 5:
+ return uint32(((u << (64 - 40)) * prime5bytes) >> (64 - length))
+ case 6:
+ return uint32(((u << (64 - 48)) * prime6bytes) >> (64 - length))
+ case 7:
+ return uint32(((u << (64 - 56)) * prime7bytes) >> (64 - length))
+ case 8:
+ return uint32((u * prime8bytes) >> (64 - length))
+ default:
+ return (uint32(u) * prime4bytes) >> (32 - length)
+ }
}
// matchlen will return the match length between offsets and t in src.
diff --git a/vendor/github.com/klauspost/compress/flate/level1.go b/vendor/github.com/klauspost/compress/flate/level1.go
index 0f14f8d63..703b9a89a 100644
--- a/vendor/github.com/klauspost/compress/flate/level1.go
+++ b/vendor/github.com/klauspost/compress/flate/level1.go
@@ -19,6 +19,7 @@ func (e *fastEncL1) Encode(dst *tokens, src []byte) {
const (
inputMargin = 12 - 1
minNonLiteralBlockSize = 1 + 1 + inputMargin
+ hashBytes = 5
)
if debugDeflate && e.cur < 0 {
panic(fmt.Sprint("e.cur < 0: ", e.cur))
@@ -68,7 +69,7 @@ func (e *fastEncL1) Encode(dst *tokens, src []byte) {
sLimit := int32(len(src) - inputMargin)
// nextEmit is where in src the next emitLiteral should start from.
- cv := load3232(src, s)
+ cv := load6432(src, s)
for {
const skipLog = 5
@@ -77,7 +78,7 @@ func (e *fastEncL1) Encode(dst *tokens, src []byte) {
nextS := s
var candidate tableEntry
for {
- nextHash := hash(cv)
+ nextHash := hashLen(cv, tableBits, hashBytes)
candidate = e.table[nextHash]
nextS = s + doEvery + (s-nextEmit)>>skipLog
if nextS > sLimit {
@@ -86,16 +87,16 @@ func (e *fastEncL1) Encode(dst *tokens, src []byte) {
now := load6432(src, nextS)
e.table[nextHash] = tableEntry{offset: s + e.cur}
- nextHash = hash(uint32(now))
+ nextHash = hashLen(now, tableBits, hashBytes)
offset := s - (candidate.offset - e.cur)
- if offset < maxMatchOffset && cv == load3232(src, candidate.offset-e.cur) {
+ if offset < maxMatchOffset && uint32(cv) == load3232(src, candidate.offset-e.cur) {
e.table[nextHash] = tableEntry{offset: nextS + e.cur}
break
}
// Do one right away...
- cv = uint32(now)
+ cv = now
s = nextS
nextS++
candidate = e.table[nextHash]
@@ -103,11 +104,11 @@ func (e *fastEncL1) Encode(dst *tokens, src []byte) {
e.table[nextHash] = tableEntry{offset: s + e.cur}
offset = s - (candidate.offset - e.cur)
- if offset < maxMatchOffset && cv == load3232(src, candidate.offset-e.cur) {
+ if offset < maxMatchOffset && uint32(cv) == load3232(src, candidate.offset-e.cur) {
e.table[nextHash] = tableEntry{offset: nextS + e.cur}
break
}
- cv = uint32(now)
+ cv = now
s = nextS
}
@@ -198,9 +199,9 @@ func (e *fastEncL1) Encode(dst *tokens, src []byte) {
}
if s >= sLimit {
// Index first pair after match end.
- if int(s+l+4) < len(src) {
- cv := load3232(src, s)
- e.table[hash(cv)] = tableEntry{offset: s + e.cur}
+ if int(s+l+8) < len(src) {
+ cv := load6432(src, s)
+ e.table[hashLen(cv, tableBits, hashBytes)] = tableEntry{offset: s + e.cur}
}
goto emitRemainder
}
@@ -213,16 +214,16 @@ func (e *fastEncL1) Encode(dst *tokens, src []byte) {
// three load32 calls.
x := load6432(src, s-2)
o := e.cur + s - 2
- prevHash := hash(uint32(x))
+ prevHash := hashLen(x, tableBits, hashBytes)
e.table[prevHash] = tableEntry{offset: o}
x >>= 16
- currHash := hash(uint32(x))
+ currHash := hashLen(x, tableBits, hashBytes)
candidate = e.table[currHash]
e.table[currHash] = tableEntry{offset: o + 2}
offset := s - (candidate.offset - e.cur)
if offset > maxMatchOffset || uint32(x) != load3232(src, candidate.offset-e.cur) {
- cv = uint32(x >> 8)
+ cv = x >> 8
s++
break
}
diff --git a/vendor/github.com/klauspost/compress/flate/level2.go b/vendor/github.com/klauspost/compress/flate/level2.go
index 8603fbd55..876dfbe30 100644
--- a/vendor/github.com/klauspost/compress/flate/level2.go
+++ b/vendor/github.com/klauspost/compress/flate/level2.go
@@ -16,6 +16,7 @@ func (e *fastEncL2) Encode(dst *tokens, src []byte) {
const (
inputMargin = 12 - 1
minNonLiteralBlockSize = 1 + 1 + inputMargin
+ hashBytes = 5
)
if debugDeflate && e.cur < 0 {
@@ -66,7 +67,7 @@ func (e *fastEncL2) Encode(dst *tokens, src []byte) {
sLimit := int32(len(src) - inputMargin)
// nextEmit is where in src the next emitLiteral should start from.
- cv := load3232(src, s)
+ cv := load6432(src, s)
for {
// When should we start skipping if we haven't found matches in a long while.
const skipLog = 5
@@ -75,7 +76,7 @@ func (e *fastEncL2) Encode(dst *tokens, src []byte) {
nextS := s
var candidate tableEntry
for {
- nextHash := hash4u(cv, bTableBits)
+ nextHash := hashLen(cv, bTableBits, hashBytes)
s = nextS
nextS = s + doEvery + (s-nextEmit)>>skipLog
if nextS > sLimit {
@@ -84,16 +85,16 @@ func (e *fastEncL2) Encode(dst *tokens, src []byte) {
candidate = e.table[nextHash]
now := load6432(src, nextS)
e.table[nextHash] = tableEntry{offset: s + e.cur}
- nextHash = hash4u(uint32(now), bTableBits)
+ nextHash = hashLen(now, bTableBits, hashBytes)
offset := s - (candidate.offset - e.cur)
- if offset < maxMatchOffset && cv == load3232(src, candidate.offset-e.cur) {
+ if offset < maxMatchOffset && uint32(cv) == load3232(src, candidate.offset-e.cur) {
e.table[nextHash] = tableEntry{offset: nextS + e.cur}
break
}
// Do one right away...
- cv = uint32(now)
+ cv = now
s = nextS
nextS++
candidate = e.table[nextHash]
@@ -101,10 +102,10 @@ func (e *fastEncL2) Encode(dst *tokens, src []byte) {
e.table[nextHash] = tableEntry{offset: s + e.cur}
offset = s - (candidate.offset - e.cur)
- if offset < maxMatchOffset && cv == load3232(src, candidate.offset-e.cur) {
+ if offset < maxMatchOffset && uint32(cv) == load3232(src, candidate.offset-e.cur) {
break
}
- cv = uint32(now)
+ cv = now
}
// A 4-byte match has been found. We'll later see if more than 4 bytes
@@ -154,9 +155,9 @@ func (e *fastEncL2) Encode(dst *tokens, src []byte) {
if s >= sLimit {
// Index first pair after match end.
- if int(s+l+4) < len(src) {
- cv := load3232(src, s)
- e.table[hash4u(cv, bTableBits)] = tableEntry{offset: s + e.cur}
+ if int(s+l+8) < len(src) {
+ cv := load6432(src, s)
+ e.table[hashLen(cv, bTableBits, hashBytes)] = tableEntry{offset: s + e.cur}
}
goto emitRemainder
}
@@ -164,15 +165,15 @@ func (e *fastEncL2) Encode(dst *tokens, src []byte) {
// Store every second hash in-between, but offset by 1.
for i := s - l + 2; i < s-5; i += 7 {
x := load6432(src, i)
- nextHash := hash4u(uint32(x), bTableBits)
+ nextHash := hashLen(x, bTableBits, hashBytes)
e.table[nextHash] = tableEntry{offset: e.cur + i}
// Skip one
x >>= 16
- nextHash = hash4u(uint32(x), bTableBits)
+ nextHash = hashLen(x, bTableBits, hashBytes)
e.table[nextHash] = tableEntry{offset: e.cur + i + 2}
// Skip one
x >>= 16
- nextHash = hash4u(uint32(x), bTableBits)
+ nextHash = hashLen(x, bTableBits, hashBytes)
e.table[nextHash] = tableEntry{offset: e.cur + i + 4}
}
@@ -184,17 +185,17 @@ func (e *fastEncL2) Encode(dst *tokens, src []byte) {
// three load32 calls.
x := load6432(src, s-2)
o := e.cur + s - 2
- prevHash := hash4u(uint32(x), bTableBits)
- prevHash2 := hash4u(uint32(x>>8), bTableBits)
+ prevHash := hashLen(x, bTableBits, hashBytes)
+ prevHash2 := hashLen(x>>8, bTableBits, hashBytes)
e.table[prevHash] = tableEntry{offset: o}
e.table[prevHash2] = tableEntry{offset: o + 1}
- currHash := hash4u(uint32(x>>16), bTableBits)
+ currHash := hashLen(x>>16, bTableBits, hashBytes)
candidate = e.table[currHash]
e.table[currHash] = tableEntry{offset: o + 2}
offset := s - (candidate.offset - e.cur)
if offset > maxMatchOffset || uint32(x>>16) != load3232(src, candidate.offset-e.cur) {
- cv = uint32(x >> 24)
+ cv = x >> 24
s++
break
}
diff --git a/vendor/github.com/klauspost/compress/flate/level3.go b/vendor/github.com/klauspost/compress/flate/level3.go
index 039639f89..7aa2b72a1 100644
--- a/vendor/github.com/klauspost/compress/flate/level3.go
+++ b/vendor/github.com/klauspost/compress/flate/level3.go
@@ -11,10 +11,11 @@ type fastEncL3 struct {
// Encode uses a similar algorithm to level 2, will check up to two candidates.
func (e *fastEncL3) Encode(dst *tokens, src []byte) {
const (
- inputMargin = 8 - 1
+ inputMargin = 12 - 1
minNonLiteralBlockSize = 1 + 1 + inputMargin
tableBits = 16
tableSize = 1 << tableBits
+ hashBytes = 5
)
if debugDeflate && e.cur < 0 {
@@ -69,20 +70,20 @@ func (e *fastEncL3) Encode(dst *tokens, src []byte) {
sLimit := int32(len(src) - inputMargin)
// nextEmit is where in src the next emitLiteral should start from.
- cv := load3232(src, s)
+ cv := load6432(src, s)
for {
- const skipLog = 6
+ const skipLog = 7
nextS := s
var candidate tableEntry
for {
- nextHash := hash4u(cv, tableBits)
+ nextHash := hashLen(cv, tableBits, hashBytes)
s = nextS
nextS = s + 1 + (s-nextEmit)>>skipLog
if nextS > sLimit {
goto emitRemainder
}
candidates := e.table[nextHash]
- now := load3232(src, nextS)
+ now := load6432(src, nextS)
// Safe offset distance until s + 4...
minOffset := e.cur + s - (maxMatchOffset - 4)
@@ -96,8 +97,8 @@ func (e *fastEncL3) Encode(dst *tokens, src []byte) {
continue
}
- if cv == load3232(src, candidate.offset-e.cur) {
- if candidates.Prev.offset < minOffset || cv != load3232(src, candidates.Prev.offset-e.cur) {
+ if uint32(cv) == load3232(src, candidate.offset-e.cur) {
+ if candidates.Prev.offset < minOffset || uint32(cv) != load3232(src, candidates.Prev.offset-e.cur) {
break
}
// Both match and are valid, pick longest.
@@ -112,7 +113,7 @@ func (e *fastEncL3) Encode(dst *tokens, src []byte) {
// We only check if value mismatches.
// Offset will always be invalid in other cases.
candidate = candidates.Prev
- if candidate.offset > minOffset && cv == load3232(src, candidate.offset-e.cur) {
+ if candidate.offset > minOffset && uint32(cv) == load3232(src, candidate.offset-e.cur) {
break
}
}
@@ -164,9 +165,9 @@ func (e *fastEncL3) Encode(dst *tokens, src []byte) {
if s >= sLimit {
t += l
// Index first pair after match end.
- if int(t+4) < len(src) && t > 0 {
- cv := load3232(src, t)
- nextHash := hash4u(cv, tableBits)
+ if int(t+8) < len(src) && t > 0 {
+ cv = load6432(src, t)
+ nextHash := hashLen(cv, tableBits, hashBytes)
e.table[nextHash] = tableEntryPrev{
Prev: e.table[nextHash].Cur,
Cur: tableEntry{offset: e.cur + t},
@@ -176,8 +177,8 @@ func (e *fastEncL3) Encode(dst *tokens, src []byte) {
}
// Store every 5th hash in-between.
- for i := s - l + 2; i < s-5; i += 5 {
- nextHash := hash4u(load3232(src, i), tableBits)
+ for i := s - l + 2; i < s-5; i += 6 {
+ nextHash := hashLen(load6432(src, i), tableBits, hashBytes)
e.table[nextHash] = tableEntryPrev{
Prev: e.table[nextHash].Cur,
Cur: tableEntry{offset: e.cur + i}}
@@ -185,23 +186,23 @@ func (e *fastEncL3) Encode(dst *tokens, src []byte) {
// We could immediately start working at s now, but to improve
// compression we first update the hash table at s-2 to s.
x := load6432(src, s-2)
- prevHash := hash4u(uint32(x), tableBits)
+ prevHash := hashLen(x, tableBits, hashBytes)
e.table[prevHash] = tableEntryPrev{
Prev: e.table[prevHash].Cur,
Cur: tableEntry{offset: e.cur + s - 2},
}
x >>= 8
- prevHash = hash4u(uint32(x), tableBits)
+ prevHash = hashLen(x, tableBits, hashBytes)
e.table[prevHash] = tableEntryPrev{
Prev: e.table[prevHash].Cur,
Cur: tableEntry{offset: e.cur + s - 1},
}
x >>= 8
- currHash := hash4u(uint32(x), tableBits)
+ currHash := hashLen(x, tableBits, hashBytes)
candidates := e.table[currHash]
- cv = uint32(x)
+ cv = x
e.table[currHash] = tableEntryPrev{
Prev: candidates.Cur,
Cur: tableEntry{offset: s + e.cur},
@@ -212,17 +213,17 @@ func (e *fastEncL3) Encode(dst *tokens, src []byte) {
minOffset := e.cur + s - (maxMatchOffset - 4)
if candidate.offset > minOffset {
- if cv == load3232(src, candidate.offset-e.cur) {
+ if uint32(cv) == load3232(src, candidate.offset-e.cur) {
// Found a match...
continue
}
candidate = candidates.Prev
- if candidate.offset > minOffset && cv == load3232(src, candidate.offset-e.cur) {
+ if candidate.offset > minOffset && uint32(cv) == load3232(src, candidate.offset-e.cur) {
// Match at prev...
continue
}
}
- cv = uint32(x >> 8)
+ cv = x >> 8
s++
break
}
diff --git a/vendor/github.com/klauspost/compress/flate/level4.go b/vendor/github.com/klauspost/compress/flate/level4.go
index 1cbffa1ae..23c08b325 100644
--- a/vendor/github.com/klauspost/compress/flate/level4.go
+++ b/vendor/github.com/klauspost/compress/flate/level4.go
@@ -12,6 +12,7 @@ func (e *fastEncL4) Encode(dst *tokens, src []byte) {
const (
inputMargin = 12 - 1
minNonLiteralBlockSize = 1 + 1 + inputMargin
+ hashShortBytes = 4
)
if debugDeflate && e.cur < 0 {
panic(fmt.Sprint("e.cur < 0: ", e.cur))
@@ -80,7 +81,7 @@ func (e *fastEncL4) Encode(dst *tokens, src []byte) {
nextS := s
var t int32
for {
- nextHashS := hash4x64(cv, tableBits)
+ nextHashS := hashLen(cv, tableBits, hashShortBytes)
nextHashL := hash7(cv, tableBits)
s = nextS
@@ -168,7 +169,7 @@ func (e *fastEncL4) Encode(dst *tokens, src []byte) {
// Index first pair after match end.
if int(s+8) < len(src) {
cv := load6432(src, s)
- e.table[hash4x64(cv, tableBits)] = tableEntry{offset: s + e.cur}
+ e.table[hashLen(cv, tableBits, hashShortBytes)] = tableEntry{offset: s + e.cur}
e.bTable[hash7(cv, tableBits)] = tableEntry{offset: s + e.cur}
}
goto emitRemainder
@@ -183,7 +184,7 @@ func (e *fastEncL4) Encode(dst *tokens, src []byte) {
t2 := tableEntry{offset: t.offset + 1}
e.bTable[hash7(cv, tableBits)] = t
e.bTable[hash7(cv>>8, tableBits)] = t2
- e.table[hash4u(uint32(cv>>8), tableBits)] = t2
+ e.table[hashLen(cv>>8, tableBits, hashShortBytes)] = t2
i += 3
for ; i < s-1; i += 3 {
@@ -192,7 +193,7 @@ func (e *fastEncL4) Encode(dst *tokens, src []byte) {
t2 := tableEntry{offset: t.offset + 1}
e.bTable[hash7(cv, tableBits)] = t
e.bTable[hash7(cv>>8, tableBits)] = t2
- e.table[hash4u(uint32(cv>>8), tableBits)] = t2
+ e.table[hashLen(cv>>8, tableBits, hashShortBytes)] = t2
}
}
}
@@ -201,7 +202,7 @@ func (e *fastEncL4) Encode(dst *tokens, src []byte) {
// compression we first update the hash table at s-1 and at s.
x := load6432(src, s-1)
o := e.cur + s - 1
- prevHashS := hash4x64(x, tableBits)
+ prevHashS := hashLen(x, tableBits, hashShortBytes)
prevHashL := hash7(x, tableBits)
e.table[prevHashS] = tableEntry{offset: o}
e.bTable[prevHashL] = tableEntry{offset: o}
diff --git a/vendor/github.com/klauspost/compress/flate/level5.go b/vendor/github.com/klauspost/compress/flate/level5.go
index ef6339d95..83ef50ba4 100644
--- a/vendor/github.com/klauspost/compress/flate/level5.go
+++ b/vendor/github.com/klauspost/compress/flate/level5.go
@@ -12,6 +12,7 @@ func (e *fastEncL5) Encode(dst *tokens, src []byte) {
const (
inputMargin = 12 - 1
minNonLiteralBlockSize = 1 + 1 + inputMargin
+ hashShortBytes = 4
)
if debugDeflate && e.cur < 0 {
panic(fmt.Sprint("e.cur < 0: ", e.cur))
@@ -88,7 +89,7 @@ func (e *fastEncL5) Encode(dst *tokens, src []byte) {
var l int32
var t int32
for {
- nextHashS := hash4x64(cv, tableBits)
+ nextHashS := hashLen(cv, tableBits, hashShortBytes)
nextHashL := hash7(cv, tableBits)
s = nextS
@@ -105,7 +106,7 @@ func (e *fastEncL5) Encode(dst *tokens, src []byte) {
eLong := &e.bTable[nextHashL]
eLong.Cur, eLong.Prev = entry, eLong.Cur
- nextHashS = hash4x64(next, tableBits)
+ nextHashS = hashLen(next, tableBits, hashShortBytes)
nextHashL = hash7(next, tableBits)
t = lCandidate.Cur.offset - e.cur
@@ -257,7 +258,7 @@ func (e *fastEncL5) Encode(dst *tokens, src []byte) {
if i < s-1 {
cv := load6432(src, i)
t := tableEntry{offset: i + e.cur}
- e.table[hash4x64(cv, tableBits)] = t
+ e.table[hashLen(cv, tableBits, hashShortBytes)] = t
eLong := &e.bTable[hash7(cv, tableBits)]
eLong.Cur, eLong.Prev = t, eLong.Cur
@@ -270,7 +271,7 @@ func (e *fastEncL5) Encode(dst *tokens, src []byte) {
// We only have enough bits for a short entry at i+2
cv >>= 8
t = tableEntry{offset: t.offset + 1}
- e.table[hash4x64(cv, tableBits)] = t
+ e.table[hashLen(cv, tableBits, hashShortBytes)] = t
// Skip one - otherwise we risk hitting 's'
i += 4
@@ -280,7 +281,7 @@ func (e *fastEncL5) Encode(dst *tokens, src []byte) {
t2 := tableEntry{offset: t.offset + 1}
eLong := &e.bTable[hash7(cv, tableBits)]
eLong.Cur, eLong.Prev = t, eLong.Cur
- e.table[hash4u(uint32(cv>>8), tableBits)] = t2
+ e.table[hashLen(cv>>8, tableBits, hashShortBytes)] = t2
}
}
}
@@ -289,7 +290,7 @@ func (e *fastEncL5) Encode(dst *tokens, src []byte) {
// compression we first update the hash table at s-1 and at s.
x := load6432(src, s-1)
o := e.cur + s - 1
- prevHashS := hash4x64(x, tableBits)
+ prevHashS := hashLen(x, tableBits, hashShortBytes)
prevHashL := hash7(x, tableBits)
e.table[prevHashS] = tableEntry{offset: o}
eLong := &e.bTable[prevHashL]
diff --git a/vendor/github.com/klauspost/compress/flate/level6.go b/vendor/github.com/klauspost/compress/flate/level6.go
index 85e4b2095..f1e9d98fa 100644
--- a/vendor/github.com/klauspost/compress/flate/level6.go
+++ b/vendor/github.com/klauspost/compress/flate/level6.go
@@ -12,6 +12,7 @@ func (e *fastEncL6) Encode(dst *tokens, src []byte) {
const (
inputMargin = 12 - 1
minNonLiteralBlockSize = 1 + 1 + inputMargin
+ hashShortBytes = 4
)
if debugDeflate && e.cur < 0 {
panic(fmt.Sprint("e.cur < 0: ", e.cur))
@@ -90,7 +91,7 @@ func (e *fastEncL6) Encode(dst *tokens, src []byte) {
var l int32
var t int32
for {
- nextHashS := hash4x64(cv, tableBits)
+ nextHashS := hashLen(cv, tableBits, hashShortBytes)
nextHashL := hash7(cv, tableBits)
s = nextS
nextS = s + doEvery + (s-nextEmit)>>skipLog
@@ -107,7 +108,7 @@ func (e *fastEncL6) Encode(dst *tokens, src []byte) {
eLong.Cur, eLong.Prev = entry, eLong.Cur
// Calculate hashes of 'next'
- nextHashS = hash4x64(next, tableBits)
+ nextHashS = hashLen(next, tableBits, hashShortBytes)
nextHashL = hash7(next, tableBits)
t = lCandidate.Cur.offset - e.cur
@@ -286,7 +287,7 @@ func (e *fastEncL6) Encode(dst *tokens, src []byte) {
// Index after match end.
for i := nextS + 1; i < int32(len(src))-8; i += 2 {
cv := load6432(src, i)
- e.table[hash4x64(cv, tableBits)] = tableEntry{offset: i + e.cur}
+ e.table[hashLen(cv, tableBits, hashShortBytes)] = tableEntry{offset: i + e.cur}
eLong := &e.bTable[hash7(cv, tableBits)]
eLong.Cur, eLong.Prev = tableEntry{offset: i + e.cur}, eLong.Cur
}
@@ -301,7 +302,7 @@ func (e *fastEncL6) Encode(dst *tokens, src []byte) {
t2 := tableEntry{offset: t.offset + 1}
eLong := &e.bTable[hash7(cv, tableBits)]
eLong2 := &e.bTable[hash7(cv>>8, tableBits)]
- e.table[hash4x64(cv, tableBits)] = t
+ e.table[hashLen(cv, tableBits, hashShortBytes)] = t
eLong.Cur, eLong.Prev = t, eLong.Cur
eLong2.Cur, eLong2.Prev = t2, eLong2.Cur
}
diff --git a/vendor/github.com/klauspost/compress/zstd/decoder.go b/vendor/github.com/klauspost/compress/zstd/decoder.go
index 6104eb793..78c10755f 100644
--- a/vendor/github.com/klauspost/compress/zstd/decoder.go
+++ b/vendor/github.com/klauspost/compress/zstd/decoder.go
@@ -35,6 +35,7 @@ type Decoder struct {
br readerWrapper
enabled bool
inFrame bool
+ dstBuf []byte
}
frame *frameDec
@@ -187,21 +188,23 @@ func (d *Decoder) Reset(r io.Reader) error {
}
// If bytes buffer and < 5MB, do sync decoding anyway.
- if bb, ok := r.(byter); ok && bb.Len() < 5<<20 {
+ if bb, ok := r.(byter); ok && bb.Len() < d.o.decodeBufsBelow && !d.o.limitToCap {
bb2 := bb
if debugDecoder {
println("*bytes.Buffer detected, doing sync decode, len:", bb.Len())
}
b := bb2.Bytes()
var dst []byte
- if cap(d.current.b) > 0 {
- dst = d.current.b
+ if cap(d.syncStream.dstBuf) > 0 {
+ dst = d.syncStream.dstBuf[:0]
}
- dst, err := d.DecodeAll(b, dst[:0])
+ dst, err := d.DecodeAll(b, dst)
if err == nil {
err = io.EOF
}
+ // Save output buffer
+ d.syncStream.dstBuf = dst
d.current.b = dst
d.current.err = err
d.current.flushed = true
@@ -216,6 +219,7 @@ func (d *Decoder) Reset(r io.Reader) error {
d.current.err = nil
d.current.flushed = false
d.current.d = nil
+ d.syncStream.dstBuf = nil
// Ensure no-one else is still running...
d.streamWg.Wait()
@@ -680,6 +684,7 @@ func (d *Decoder) startStreamDecoder(ctx context.Context, r io.Reader, output ch
if debugDecoder {
println("Async 1: new history, recent:", block.async.newHist.recentOffsets)
}
+ hist.reset()
hist.decoders = block.async.newHist.decoders
hist.recentOffsets = block.async.newHist.recentOffsets
hist.windowSize = block.async.newHist.windowSize
@@ -711,6 +716,7 @@ func (d *Decoder) startStreamDecoder(ctx context.Context, r io.Reader, output ch
seqExecute <- block
}
close(seqExecute)
+ hist.reset()
}()
var wg sync.WaitGroup
@@ -734,6 +740,7 @@ func (d *Decoder) startStreamDecoder(ctx context.Context, r io.Reader, output ch
if debugDecoder {
println("Async 2: new history")
}
+ hist.reset()
hist.windowSize = block.async.newHist.windowSize
hist.allocFrameBuffer = block.async.newHist.allocFrameBuffer
if block.async.newHist.dict != nil {
@@ -815,13 +822,14 @@ func (d *Decoder) startStreamDecoder(ctx context.Context, r io.Reader, output ch
if debugDecoder {
println("decoder goroutines finished")
}
+ hist.reset()
}()
+ var hist history
decodeStream:
for {
- var hist history
var hasErr bool
-
+ hist.reset()
decodeBlock := func(block *blockDec) {
if hasErr {
if block != nil {
@@ -937,5 +945,6 @@ decodeStream:
}
close(seqDecode)
wg.Wait()
+ hist.reset()
d.frame.history.b = frameHistCache
}
diff --git a/vendor/github.com/klauspost/compress/zstd/decoder_options.go b/vendor/github.com/klauspost/compress/zstd/decoder_options.go
index 666c2715f..f42448e69 100644
--- a/vendor/github.com/klauspost/compress/zstd/decoder_options.go
+++ b/vendor/github.com/klauspost/compress/zstd/decoder_options.go
@@ -14,21 +14,23 @@ type DOption func(*decoderOptions) error
// options retains accumulated state of multiple options.
type decoderOptions struct {
- lowMem bool
- concurrent int
- maxDecodedSize uint64
- maxWindowSize uint64
- dicts []dict
- ignoreChecksum bool
- limitToCap bool
+ lowMem bool
+ concurrent int
+ maxDecodedSize uint64
+ maxWindowSize uint64
+ dicts []dict
+ ignoreChecksum bool
+ limitToCap bool
+ decodeBufsBelow int
}
func (o *decoderOptions) setDefault() {
*o = decoderOptions{
// use less ram: true for now, but may change.
- lowMem: true,
- concurrent: runtime.GOMAXPROCS(0),
- maxWindowSize: MaxWindowSize,
+ lowMem: true,
+ concurrent: runtime.GOMAXPROCS(0),
+ maxWindowSize: MaxWindowSize,
+ decodeBufsBelow: 128 << 10,
}
if o.concurrent > 4 {
o.concurrent = 4
@@ -126,6 +128,18 @@ func WithDecodeAllCapLimit(b bool) DOption {
}
}
+// WithDecodeBuffersBelow will fully decode readers that have a
+// `Bytes() []byte` and `Len() int` interface similar to bytes.Buffer.
+// This typically uses less allocations but will have the full decompressed object in memory.
+// Note that DecodeAllCapLimit will disable this, as well as giving a size of 0 or less.
+// Default is 128KiB.
+func WithDecodeBuffersBelow(size int) DOption {
+ return func(o *decoderOptions) error {
+ o.decodeBufsBelow = size
+ return nil
+ }
+}
+
// IgnoreChecksum allows to forcibly ignore checksum checking.
func IgnoreChecksum(b bool) DOption {
return func(o *decoderOptions) error {
diff --git a/vendor/github.com/klauspost/compress/zstd/enc_best.go b/vendor/github.com/klauspost/compress/zstd/enc_best.go
index 96028ecd8..dbbb88d92 100644
--- a/vendor/github.com/klauspost/compress/zstd/enc_best.go
+++ b/vendor/github.com/klauspost/compress/zstd/enc_best.go
@@ -32,6 +32,7 @@ type match struct {
length int32
rep int32
est int32
+ _ [12]byte // Aligned size to cache line: 4+4+4+4+4 bytes + 12 bytes padding = 32 bytes
}
const highScore = 25000
diff --git a/vendor/github.com/klauspost/compress/zstd/framedec.go b/vendor/github.com/klauspost/compress/zstd/framedec.go
index 1559a2038..b6c505417 100644
--- a/vendor/github.com/klauspost/compress/zstd/framedec.go
+++ b/vendor/github.com/klauspost/compress/zstd/framedec.go
@@ -343,7 +343,7 @@ func (d *frameDec) consumeCRC() error {
return nil
}
-// runDecoder will create a sync decoder that will decode a block of data.
+// runDecoder will run the decoder for the remainder of the frame.
func (d *frameDec) runDecoder(dst []byte, dec *blockDec) ([]byte, error) {
saved := d.history.b
@@ -369,7 +369,7 @@ func (d *frameDec) runDecoder(dst []byte, dec *blockDec) ([]byte, error) {
if debugDecoder {
println("maxSyncLen:", d.history.decoders.maxSyncLen)
}
- if !d.o.limitToCap && uint64(cap(dst)-len(dst)) < d.history.decoders.maxSyncLen {
+ if !d.o.limitToCap && uint64(cap(dst)) < d.history.decoders.maxSyncLen {
// Alloc for output
dst2 := make([]byte, len(dst), d.history.decoders.maxSyncLen+compressedBlockOverAlloc)
copy(dst2, dst)
diff --git a/vendor/github.com/klauspost/compress/zstd/fse_decoder_amd64.go b/vendor/github.com/klauspost/compress/zstd/fse_decoder_amd64.go
index c881d28d8..d04a829b0 100644
--- a/vendor/github.com/klauspost/compress/zstd/fse_decoder_amd64.go
+++ b/vendor/github.com/klauspost/compress/zstd/fse_decoder_amd64.go
@@ -21,7 +21,8 @@ type buildDtableAsmContext struct {
// buildDtable_asm is an x86 assembly implementation of fseDecoder.buildDtable.
// Function returns non-zero exit code on error.
-// go:noescape
+//
+//go:noescape
func buildDtable_asm(s *fseDecoder, ctx *buildDtableAsmContext) int
// please keep in sync with _generate/gen_fse.go
diff --git a/vendor/github.com/klauspost/compress/zstd/history.go b/vendor/github.com/klauspost/compress/zstd/history.go
index 28b40153c..09164856d 100644
--- a/vendor/github.com/klauspost/compress/zstd/history.go
+++ b/vendor/github.com/klauspost/compress/zstd/history.go
@@ -37,24 +37,21 @@ func (h *history) reset() {
h.ignoreBuffer = 0
h.error = false
h.recentOffsets = [3]int{1, 4, 8}
- if f := h.decoders.litLengths.fse; f != nil && !f.preDefined {
- fseDecoderPool.Put(f)
- }
- if f := h.decoders.offsets.fse; f != nil && !f.preDefined {
- fseDecoderPool.Put(f)
- }
- if f := h.decoders.matchLengths.fse; f != nil && !f.preDefined {
- fseDecoderPool.Put(f)
- }
+ h.decoders.freeDecoders()
h.decoders = sequenceDecs{br: h.decoders.br}
+ h.freeHuffDecoder()
+ h.huffTree = nil
+ h.dict = nil
+ //printf("history created: %+v (l: %d, c: %d)", *h, len(h.b), cap(h.b))
+}
+
+func (h *history) freeHuffDecoder() {
if h.huffTree != nil {
if h.dict == nil || h.dict.litEnc != h.huffTree {
huffDecoderPool.Put(h.huffTree)
+ h.huffTree = nil
}
}
- h.huffTree = nil
- h.dict = nil
- //printf("history created: %+v (l: %d, c: %d)", *h, len(h.b), cap(h.b))
}
func (h *history) setDict(dict *dict) {
diff --git a/vendor/github.com/klauspost/compress/zstd/seqdec.go b/vendor/github.com/klauspost/compress/zstd/seqdec.go
index df0447203..f833d1541 100644
--- a/vendor/github.com/klauspost/compress/zstd/seqdec.go
+++ b/vendor/github.com/klauspost/compress/zstd/seqdec.go
@@ -99,6 +99,21 @@ func (s *sequenceDecs) initialize(br *bitReader, hist *history, out []byte) erro
return nil
}
+func (s *sequenceDecs) freeDecoders() {
+ if f := s.litLengths.fse; f != nil && !f.preDefined {
+ fseDecoderPool.Put(f)
+ s.litLengths.fse = nil
+ }
+ if f := s.offsets.fse; f != nil && !f.preDefined {
+ fseDecoderPool.Put(f)
+ s.offsets.fse = nil
+ }
+ if f := s.matchLengths.fse; f != nil && !f.preDefined {
+ fseDecoderPool.Put(f)
+ s.matchLengths.fse = nil
+ }
+}
+
// execute will execute the decoded sequence with the provided history.
// The sequence must be evaluated before being sent.
func (s *sequenceDecs) execute(seqs []seqVals, hist []byte) error {
@@ -299,7 +314,10 @@ func (s *sequenceDecs) decodeSync(hist []byte) error {
}
size := ll + ml + len(out)
if size-startSize > maxBlockSize {
- return fmt.Errorf("output (%d) bigger than max block size (%d)", size-startSize, maxBlockSize)
+ if size-startSize == 424242 {
+ panic("here")
+ }
+ return fmt.Errorf("output bigger than max block size (%d)", maxBlockSize)
}
if size > cap(out) {
// Not enough size, which can happen under high volume block streaming conditions
@@ -411,7 +429,7 @@ func (s *sequenceDecs) decodeSync(hist []byte) error {
// Check if space for literals
if size := len(s.literals) + len(s.out) - startSize; size > maxBlockSize {
- return fmt.Errorf("output (%d) bigger than max block size (%d)", size, maxBlockSize)
+ return fmt.Errorf("output bigger than max block size (%d)", maxBlockSize)
}
// Add final literals
diff --git a/vendor/github.com/klauspost/compress/zstd/seqdec_amd64.go b/vendor/github.com/klauspost/compress/zstd/seqdec_amd64.go
index 1c704d30c..191384adf 100644
--- a/vendor/github.com/klauspost/compress/zstd/seqdec_amd64.go
+++ b/vendor/github.com/klauspost/compress/zstd/seqdec_amd64.go
@@ -139,7 +139,7 @@ func (s *sequenceDecs) decodeSyncSimple(hist []byte) (bool, error) {
if debugDecoder {
println("msl:", s.maxSyncLen, "cap", cap(s.out), "bef:", startSize, "sz:", size-startSize, "mbs:", maxBlockSize, "outsz:", cap(s.out)-startSize)
}
- return true, fmt.Errorf("output (%d) bigger than max block size (%d)", size-startSize, maxBlockSize)
+ return true, fmt.Errorf("output bigger than max block size (%d)", maxBlockSize)
default:
return true, fmt.Errorf("sequenceDecs_decode returned erronous code %d", errCode)
@@ -147,7 +147,8 @@ func (s *sequenceDecs) decodeSyncSimple(hist []byte) (bool, error) {
s.seqSize += ctx.litRemain
if s.seqSize > maxBlockSize {
- return true, fmt.Errorf("output (%d) bigger than max block size (%d)", s.seqSize, maxBlockSize)
+ return true, fmt.Errorf("output bigger than max block size (%d)", maxBlockSize)
+
}
err := br.close()
if err != nil {
@@ -289,7 +290,7 @@ func (s *sequenceDecs) decode(seqs []seqVals) error {
s.seqSize += ctx.litRemain
if s.seqSize > maxBlockSize {
- return fmt.Errorf("output (%d) bigger than max block size (%d)", s.seqSize, maxBlockSize)
+ return fmt.Errorf("output bigger than max block size (%d)", maxBlockSize)
}
err := br.close()
if err != nil {
diff --git a/vendor/github.com/klauspost/compress/zstd/seqdec_generic.go b/vendor/github.com/klauspost/compress/zstd/seqdec_generic.go
index c3452bc3a..ac2a80d29 100644
--- a/vendor/github.com/klauspost/compress/zstd/seqdec_generic.go
+++ b/vendor/github.com/klauspost/compress/zstd/seqdec_generic.go
@@ -111,7 +111,7 @@ func (s *sequenceDecs) decode(seqs []seqVals) error {
}
s.seqSize += ll + ml
if s.seqSize > maxBlockSize {
- return fmt.Errorf("output (%d) bigger than max block size (%d)", s.seqSize, maxBlockSize)
+ return fmt.Errorf("output bigger than max block size (%d)", maxBlockSize)
}
litRemain -= ll
if litRemain < 0 {
@@ -149,7 +149,7 @@ func (s *sequenceDecs) decode(seqs []seqVals) error {
}
s.seqSize += litRemain
if s.seqSize > maxBlockSize {
- return fmt.Errorf("output (%d) bigger than max block size (%d)", s.seqSize, maxBlockSize)
+ return fmt.Errorf("output bigger than max block size (%d)", maxBlockSize)
}
err := br.close()
if err != nil {
diff --git a/vendor/github.com/klauspost/pgzip/.travis.yml b/vendor/github.com/klauspost/pgzip/.travis.yml
index acfec4bb0..34704000e 100644
--- a/vendor/github.com/klauspost/pgzip/.travis.yml
+++ b/vendor/github.com/klauspost/pgzip/.travis.yml
@@ -1,3 +1,7 @@
+
+arch:
+ - amd64
+ - ppc64le
language: go
os:
diff --git a/vendor/github.com/klauspost/pgzip/LICENSE b/vendor/github.com/klauspost/pgzip/LICENSE
index 3909da410..2bdc0d751 100644
--- a/vendor/github.com/klauspost/pgzip/LICENSE
+++ b/vendor/github.com/klauspost/pgzip/LICENSE
@@ -1,4 +1,4 @@
-MIT License
+The MIT License (MIT)
Copyright (c) 2014 Klaus Post
@@ -19,3 +19,4 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+
diff --git a/vendor/github.com/klauspost/pgzip/README.md b/vendor/github.com/klauspost/pgzip/README.md
index 171b978fd..ecc8726fa 100644
--- a/vendor/github.com/klauspost/pgzip/README.md
+++ b/vendor/github.com/klauspost/pgzip/README.md
@@ -104,13 +104,12 @@ Content is [Matt Mahoneys 10GB corpus](http://mattmahoney.net/dc/10gb.html). Com
Compressor | MB/sec | speedup | size | size overhead (lower=better)
------------|----------|---------|------|---------
-[gzip](http://golang.org/pkg/compress/gzip) (golang) | 15.44MB/s (1 thread) | 1.0x | 4781329307 | 0%
-[gzip](http://github.com/klauspost/compress/gzip) (klauspost) | 135.04MB/s (1 thread) | 8.74x | 4894858258 | +2.37%
-[pgzip](https://github.com/klauspost/pgzip) (klauspost) | 1573.23MB/s| 101.9x | 4902285651 | +2.53%
-[bgzf](https://godoc.org/github.com/biogo/hts/bgzf) (biogo) | 361.40MB/s | 23.4x | 4869686090 | +1.85%
-[pargzip](https://godoc.org/github.com/golang/build/pargzip) (builder) | 306.01MB/s | 19.8x | 4786890417 | +0.12%
+[gzip](http://golang.org/pkg/compress/gzip) (golang) | 16.91MB/s (1 thread) | 1.0x | 4781329307 | 0%
+[gzip](http://github.com/klauspost/compress/gzip) (klauspost) | 127.10MB/s (1 thread) | 7.52x | 4885366806 | +2.17%
+[pgzip](https://github.com/klauspost/pgzip) (klauspost) | 2085.35MB/s| 123.34x | 4886132566 | +2.19%
+[pargzip](https://godoc.org/github.com/golang/build/pargzip) (builder) | 334.04MB/s | 19.76x | 4786890417 | +0.12%
-pgzip also contains a [linear time compression](https://github.com/klauspost/compress#linear-time-compression-huffman-only) mode, that will allow compression at ~250MB per core per second, independent of the content.
+pgzip also contains a [huffman only compression](https://github.com/klauspost/compress#linear-time-compression-huffman-only) mode, that will allow compression at ~450MB per core per second, largely independent of the content.
See the [complete sheet](https://docs.google.com/spreadsheets/d/1nuNE2nPfuINCZJRMt6wFWhKpToF95I47XjSsc-1rbPQ/edit?usp=sharing) for different content types and compression settings.
@@ -123,7 +122,7 @@ In the example above, the numbers are as follows on a 4 CPU machine:
Decompressor | Time | Speedup
-------------|------|--------
[gzip](http://golang.org/pkg/compress/gzip) (golang) | 1m28.85s | 0%
-[pgzip](https://github.com/klauspost/pgzip) (golang) | 43.48s | 104%
+[pgzip](https://github.com/klauspost/pgzip) (klauspost) | 43.48s | 104%
But wait, since gzip decompression is inherently singlethreaded (aside from CRC calculation) how can it be more than 100% faster? Because pgzip due to its design also acts as a buffer. When using unbuffered gzip, you are also waiting for io when you are decompressing. If the gzip decoder can keep up, it will always have data ready for your reader, and you will not be waiting for input to the gzip decompressor to complete.
diff --git a/vendor/github.com/klauspost/pgzip/gunzip.go b/vendor/github.com/klauspost/pgzip/gunzip.go
index d1ae730b2..3c4b32f16 100644
--- a/vendor/github.com/klauspost/pgzip/gunzip.go
+++ b/vendor/github.com/klauspost/pgzip/gunzip.go
@@ -513,6 +513,19 @@ func (z *Reader) Read(p []byte) (n int, err error) {
func (z *Reader) WriteTo(w io.Writer) (n int64, err error) {
total := int64(0)
+ avail := z.current[z.roff:]
+ if len(avail) != 0 {
+ n, err := w.Write(avail)
+ if n != len(avail) {
+ return total, io.ErrShortWrite
+ }
+ total += int64(n)
+ if err != nil {
+ return total, err
+ }
+ z.blockPool <- z.current
+ z.current = nil
+ }
for {
if z.err != nil {
return total, z.err
diff --git a/vendor/github.com/opencontainers/image-spec/specs-go/v1/annotations.go b/vendor/github.com/opencontainers/image-spec/specs-go/v1/annotations.go
index 581cf7cdf..6f9e6fd3a 100644
--- a/vendor/github.com/opencontainers/image-spec/specs-go/v1/annotations.go
+++ b/vendor/github.com/opencontainers/image-spec/specs-go/v1/annotations.go
@@ -59,4 +59,13 @@ const (
// AnnotationBaseImageName is the annotation key for the image reference of the image's base image.
AnnotationBaseImageName = "org.opencontainers.image.base.name"
+
+ // AnnotationArtifactCreated is the annotation key for the date and time on which the artifact was built, conforming to RFC 3339.
+ AnnotationArtifactCreated = "org.opencontainers.artifact.created"
+
+ // AnnotationArtifactDescription is the annotation key for the human readable description for the artifact.
+ AnnotationArtifactDescription = "org.opencontainers.artifact.description"
+
+ // AnnotationReferrersFiltersApplied is the annotation key for the comma separated list of filters applied by the registry in the referrers listing.
+ AnnotationReferrersFiltersApplied = "org.opencontainers.referrers.filtersApplied"
)
diff --git a/vendor/github.com/opencontainers/image-spec/specs-go/v1/artifact.go b/vendor/github.com/opencontainers/image-spec/specs-go/v1/artifact.go
new file mode 100644
index 000000000..03d76ce43
--- /dev/null
+++ b/vendor/github.com/opencontainers/image-spec/specs-go/v1/artifact.go
@@ -0,0 +1,34 @@
+// Copyright 2022 The Linux Foundation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package v1
+
+// Artifact describes an artifact manifest.
+// This structure provides `application/vnd.oci.artifact.manifest.v1+json` mediatype when marshalled to JSON.
+type Artifact struct {
+ // MediaType is the media type of the object this schema refers to.
+ MediaType string `json:"mediaType"`
+
+ // ArtifactType is the IANA media type of the artifact this schema refers to.
+ ArtifactType string `json:"artifactType"`
+
+ // Blobs is a collection of blobs referenced by this manifest.
+ Blobs []Descriptor `json:"blobs,omitempty"`
+
+ // Subject (reference) is an optional link from the artifact to another manifest forming an association between the artifact and the other manifest.
+ Subject *Descriptor `json:"subject,omitempty"`
+
+ // Annotations contains arbitrary metadata for the artifact manifest.
+ Annotations map[string]string `json:"annotations,omitempty"`
+}
diff --git a/vendor/github.com/opencontainers/image-spec/specs-go/v1/descriptor.go b/vendor/github.com/opencontainers/image-spec/specs-go/v1/descriptor.go
index 6e442a085..9654aa5af 100644
--- a/vendor/github.com/opencontainers/image-spec/specs-go/v1/descriptor.go
+++ b/vendor/github.com/opencontainers/image-spec/specs-go/v1/descriptor.go
@@ -1,4 +1,4 @@
-// Copyright 2016 The Linux Foundation
+// Copyright 2016-2022 The Linux Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -35,10 +35,18 @@ type Descriptor struct {
// Annotations contains arbitrary metadata relating to the targeted content.
Annotations map[string]string `json:"annotations,omitempty"`
+ // Data is an embedding of the targeted content. This is encoded as a base64
+ // string when marshalled to JSON (automatically, by encoding/json). If
+ // present, Data can be used directly to avoid fetching the targeted content.
+ Data []byte `json:"data,omitempty"`
+
// Platform describes the platform which the image in the manifest runs on.
//
// This should only be used when referring to a manifest.
Platform *Platform `json:"platform,omitempty"`
+
+ // ArtifactType is the IANA media type of this artifact.
+ ArtifactType string `json:"artifactType,omitempty"`
}
// Platform describes the platform which the image in the manifest runs on.
diff --git a/vendor/github.com/opencontainers/image-spec/specs-go/v1/manifest.go b/vendor/github.com/opencontainers/image-spec/specs-go/v1/manifest.go
index 8212d520c..730a09359 100644
--- a/vendor/github.com/opencontainers/image-spec/specs-go/v1/manifest.go
+++ b/vendor/github.com/opencontainers/image-spec/specs-go/v1/manifest.go
@@ -1,4 +1,4 @@
-// Copyright 2016 The Linux Foundation
+// Copyright 2016-2022 The Linux Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -30,6 +30,9 @@ type Manifest struct {
// Layers is an indexed list of layers referenced by the manifest.
Layers []Descriptor `json:"layers"`
+ // Subject is an optional link from the image manifest to another manifest forming an association between the image manifest and the other manifest.
+ Subject *Descriptor `json:"subject,omitempty"`
+
// Annotations contains arbitrary metadata for the image manifest.
Annotations map[string]string `json:"annotations,omitempty"`
}
diff --git a/vendor/github.com/opencontainers/image-spec/specs-go/v1/mediatype.go b/vendor/github.com/opencontainers/image-spec/specs-go/v1/mediatype.go
index 4f35ac134..935b481e3 100644
--- a/vendor/github.com/opencontainers/image-spec/specs-go/v1/mediatype.go
+++ b/vendor/github.com/opencontainers/image-spec/specs-go/v1/mediatype.go
@@ -54,4 +54,7 @@ const (
// MediaTypeImageConfig specifies the media type for the image configuration.
MediaTypeImageConfig = "application/vnd.oci.image.config.v1+json"
+
+ // MediaTypeArtifactManifest specifies the media type for a content descriptor.
+ MediaTypeArtifactManifest = "application/vnd.oci.artifact.manifest.v1+json"
)
diff --git a/vendor/github.com/opencontainers/image-spec/specs-go/version.go b/vendor/github.com/opencontainers/image-spec/specs-go/version.go
index 31f99cf64..d27903579 100644
--- a/vendor/github.com/opencontainers/image-spec/specs-go/version.go
+++ b/vendor/github.com/opencontainers/image-spec/specs-go/version.go
@@ -20,12 +20,12 @@ const (
// VersionMajor is for an API incompatible changes
VersionMajor = 1
// VersionMinor is for functionality in a backwards-compatible manner
- VersionMinor = 0
+ VersionMinor = 1
// VersionPatch is for backwards-compatible bug fixes
- VersionPatch = 2
+ VersionPatch = 0
// VersionDev indicates development branch. Releases will be empty string.
- VersionDev = "-dev"
+ VersionDev = "-rc2"
)
// Version is the specification version that the package types support.
diff --git a/vendor/github.com/opencontainers/selinux/go-selinux/doc.go b/vendor/github.com/opencontainers/selinux/go-selinux/doc.go
index 0ac7d819e..57a15c9a1 100644
--- a/vendor/github.com/opencontainers/selinux/go-selinux/doc.go
+++ b/vendor/github.com/opencontainers/selinux/go-selinux/doc.go
@@ -9,6 +9,5 @@ Usage:
if selinux.EnforceMode() != selinux.Enforcing {
selinux.SetEnforceMode(selinux.Enforcing)
}
-
*/
package selinux
diff --git a/vendor/github.com/opencontainers/selinux/go-selinux/label/label_linux.go b/vendor/github.com/opencontainers/selinux/go-selinux/label/label_linux.go
index 12de0ae5d..f61a56015 100644
--- a/vendor/github.com/opencontainers/selinux/go-selinux/label/label_linux.go
+++ b/vendor/github.com/opencontainers/selinux/go-selinux/label/label_linux.go
@@ -3,8 +3,6 @@ package label
import (
"errors"
"fmt"
- "os"
- "os/user"
"strings"
"github.com/opencontainers/selinux/go-selinux"
@@ -113,50 +111,6 @@ func Relabel(path string, fileLabel string, shared bool) error {
return nil
}
- exclude_paths := map[string]bool{
- "/": true,
- "/bin": true,
- "/boot": true,
- "/dev": true,
- "/etc": true,
- "/etc/passwd": true,
- "/etc/pki": true,
- "/etc/shadow": true,
- "/home": true,
- "/lib": true,
- "/lib64": true,
- "/media": true,
- "/opt": true,
- "/proc": true,
- "/root": true,
- "/run": true,
- "/sbin": true,
- "/srv": true,
- "/sys": true,
- "/tmp": true,
- "/usr": true,
- "/var": true,
- "/var/lib": true,
- "/var/log": true,
- }
-
- if home := os.Getenv("HOME"); home != "" {
- exclude_paths[home] = true
- }
-
- if sudoUser := os.Getenv("SUDO_USER"); sudoUser != "" {
- if usr, err := user.Lookup(sudoUser); err == nil {
- exclude_paths[usr.HomeDir] = true
- }
- }
-
- if path != "/" {
- path = strings.TrimSuffix(path, "/")
- }
- if exclude_paths[path] {
- return fmt.Errorf("SELinux relabeling of %s is not allowed", path)
- }
-
if shared {
c, err := selinux.NewContext(fileLabel)
if err != nil {
diff --git a/vendor/github.com/opencontainers/selinux/go-selinux/label/label_stub.go b/vendor/github.com/opencontainers/selinux/go-selinux/label/label_stub.go
index 02d206239..f21c80c5a 100644
--- a/vendor/github.com/opencontainers/selinux/go-selinux/label/label_stub.go
+++ b/vendor/github.com/opencontainers/selinux/go-selinux/label/label_stub.go
@@ -1,3 +1,4 @@
+//go:build !linux
// +build !linux
package label
diff --git a/vendor/github.com/opencontainers/selinux/go-selinux/rchcon.go b/vendor/github.com/opencontainers/selinux/go-selinux/rchcon.go
index feb739d32..8bff29355 100644
--- a/vendor/github.com/opencontainers/selinux/go-selinux/rchcon.go
+++ b/vendor/github.com/opencontainers/selinux/go-selinux/rchcon.go
@@ -1,3 +1,4 @@
+//go:build linux && go1.16
// +build linux,go1.16
package selinux
@@ -11,7 +12,18 @@ import (
)
func rchcon(fpath, label string) error {
+ fastMode := false
+ // If the current label matches the new label, assume
+ // other labels are correct.
+ if cLabel, err := lFileLabel(fpath); err == nil && cLabel == label {
+ fastMode = true
+ }
return pwalkdir.Walk(fpath, func(p string, _ fs.DirEntry, _ error) error {
+ if fastMode {
+ if cLabel, err := lFileLabel(fpath); err == nil && cLabel == label {
+ return nil
+ }
+ }
e := lSetFileLabel(p, label)
// Walk a file tree can race with removal, so ignore ENOENT.
if errors.Is(e, os.ErrNotExist) {
diff --git a/vendor/github.com/opencontainers/selinux/go-selinux/rchcon_go115.go b/vendor/github.com/opencontainers/selinux/go-selinux/rchcon_go115.go
index ecc7abfac..303cb1890 100644
--- a/vendor/github.com/opencontainers/selinux/go-selinux/rchcon_go115.go
+++ b/vendor/github.com/opencontainers/selinux/go-selinux/rchcon_go115.go
@@ -1,3 +1,4 @@
+//go:build linux && !go1.16
// +build linux,!go1.16
package selinux
diff --git a/vendor/github.com/opencontainers/selinux/go-selinux/selinux_linux.go b/vendor/github.com/opencontainers/selinux/go-selinux/selinux_linux.go
index ee602ab96..4582cc9e0 100644
--- a/vendor/github.com/opencontainers/selinux/go-selinux/selinux_linux.go
+++ b/vendor/github.com/opencontainers/selinux/go-selinux/selinux_linux.go
@@ -11,6 +11,7 @@ import (
"io/ioutil"
"math/big"
"os"
+ "os/user"
"path"
"path/filepath"
"strconv"
@@ -1072,21 +1073,6 @@ func copyLevel(src, dest string) (string, error) {
return tcon.Get(), nil
}
-// Prevent users from relabeling system files
-func badPrefix(fpath string) error {
- if fpath == "" {
- return ErrEmptyPath
- }
-
- badPrefixes := []string{"/usr"}
- for _, prefix := range badPrefixes {
- if strings.HasPrefix(fpath, prefix) {
- return fmt.Errorf("relabeling content in %s is not allowed", prefix)
- }
- }
- return nil
-}
-
// chcon changes the fpath file object to the SELinux label label.
// If fpath is a directory and recurse is true, then chcon walks the
// directory tree setting the label.
@@ -1097,12 +1083,70 @@ func chcon(fpath string, label string, recurse bool) error {
if label == "" {
return nil
}
- if err := badPrefix(fpath); err != nil {
- return err
+
+ exclude_paths := map[string]bool{
+ "/": true,
+ "/bin": true,
+ "/boot": true,
+ "/dev": true,
+ "/etc": true,
+ "/etc/passwd": true,
+ "/etc/pki": true,
+ "/etc/shadow": true,
+ "/home": true,
+ "/lib": true,
+ "/lib64": true,
+ "/media": true,
+ "/opt": true,
+ "/proc": true,
+ "/root": true,
+ "/run": true,
+ "/sbin": true,
+ "/srv": true,
+ "/sys": true,
+ "/tmp": true,
+ "/usr": true,
+ "/var": true,
+ "/var/lib": true,
+ "/var/log": true,
+ }
+
+ if home := os.Getenv("HOME"); home != "" {
+ exclude_paths[home] = true
+ }
+
+ if sudoUser := os.Getenv("SUDO_USER"); sudoUser != "" {
+ if usr, err := user.Lookup(sudoUser); err == nil {
+ exclude_paths[usr.HomeDir] = true
+ }
+ }
+
+ if fpath != "/" {
+ fpath = strings.TrimSuffix(fpath, "/")
+ }
+ if exclude_paths[fpath] {
+ return fmt.Errorf("SELinux relabeling of %s is not allowed", fpath)
}
if !recurse {
- return setFileLabel(fpath, label)
+ err := lSetFileLabel(fpath, label)
+ if err != nil {
+ // Check if file doesn't exist, must have been removed
+ if errors.Is(err, os.ErrNotExist) {
+ return nil
+ }
+ // Check if current label is correct on disk
+ flabel, nerr := lFileLabel(fpath)
+ if nerr == nil && flabel == label {
+ return nil
+ }
+ // Check if file doesn't exist, must have been removed
+ if errors.Is(nerr, os.ErrNotExist) {
+ return nil
+ }
+ return err
+ }
+ return nil
}
return rchcon(fpath, label)
diff --git a/vendor/github.com/opencontainers/selinux/go-selinux/selinux_stub.go b/vendor/github.com/opencontainers/selinux/go-selinux/selinux_stub.go
index 78743b020..20d888031 100644
--- a/vendor/github.com/opencontainers/selinux/go-selinux/selinux_stub.go
+++ b/vendor/github.com/opencontainers/selinux/go-selinux/selinux_stub.go
@@ -1,3 +1,4 @@
+//go:build !linux
// +build !linux
package selinux
diff --git a/vendor/github.com/sigstore/sigstore/pkg/cryptoutils/certificate.go b/vendor/github.com/sigstore/sigstore/pkg/cryptoutils/certificate.go
index 9828192c4..348f47bdc 100644
--- a/vendor/github.com/sigstore/sigstore/pkg/cryptoutils/certificate.go
+++ b/vendor/github.com/sigstore/sigstore/pkg/cryptoutils/certificate.go
@@ -13,7 +13,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-// Package cryptoutils TODO: add meaningfull description
+// Package cryptoutils implements support for working with encoded certificates, public keys, and private keys
package cryptoutils
import (
@@ -59,6 +59,7 @@ func MarshalCertificatesToPEM(certs []*x509.Certificate) ([]byte, error) {
func UnmarshalCertificatesFromPEM(pemBytes []byte) ([]*x509.Certificate, error) {
result := []*x509.Certificate{}
remaining := pemBytes
+ remaining = bytes.TrimSpace(remaining)
for len(remaining) > 0 {
var certDer *pem.Block
@@ -83,6 +84,7 @@ func UnmarshalCertificatesFromPEM(pemBytes []byte) ([]*x509.Certificate, error)
func UnmarshalCertificatesFromPEMLimited(pemBytes []byte, iterations int) ([]*x509.Certificate, error) {
result := []*x509.Certificate{}
remaining := pemBytes
+ remaining = bytes.TrimSpace(remaining)
count := 0
for len(remaining) > 0 {
diff --git a/vendor/github.com/sigstore/sigstore/pkg/cryptoutils/doc.go b/vendor/github.com/sigstore/sigstore/pkg/cryptoutils/doc.go
new file mode 100644
index 000000000..4e7e73d55
--- /dev/null
+++ b/vendor/github.com/sigstore/sigstore/pkg/cryptoutils/doc.go
@@ -0,0 +1,17 @@
+//
+// Copyright 2022 The Sigstore Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// Package cryptoutils contains utilities related to handling cryptographic materials.
+package cryptoutils
diff --git a/vendor/github.com/sigstore/sigstore/pkg/signature/options/context.go b/vendor/github.com/sigstore/sigstore/pkg/signature/options/context.go
index be39c3f76..2282a863e 100644
--- a/vendor/github.com/sigstore/sigstore/pkg/signature/options/context.go
+++ b/vendor/github.com/sigstore/sigstore/pkg/signature/options/context.go
@@ -13,7 +13,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-// Package options TODO: add meaningfull description
+// Package options defines options for KMS clients
package options
import (
diff --git a/vendor/github.com/sigstore/sigstore/pkg/signature/options/doc.go b/vendor/github.com/sigstore/sigstore/pkg/signature/options/doc.go
new file mode 100644
index 000000000..ebdeda22b
--- /dev/null
+++ b/vendor/github.com/sigstore/sigstore/pkg/signature/options/doc.go
@@ -0,0 +1,17 @@
+//
+// Copyright 2022 The Sigstore Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// Package options contains functional options for the various SignerVerifiers
+package options
diff --git a/vendor/github.com/sigstore/sigstore/pkg/signature/payload/doc.go b/vendor/github.com/sigstore/sigstore/pkg/signature/payload/doc.go
new file mode 100644
index 000000000..3664185a0
--- /dev/null
+++ b/vendor/github.com/sigstore/sigstore/pkg/signature/payload/doc.go
@@ -0,0 +1,17 @@
+//
+// Copyright 2022 The Sigstore Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// Package payload contains types and utilities related to the Cosign signature format.
+package payload
diff --git a/vendor/github.com/sigstore/sigstore/pkg/signature/payload/payload.go b/vendor/github.com/sigstore/sigstore/pkg/signature/payload/payload.go
index 422e5cd99..8b61aa15f 100644
--- a/vendor/github.com/sigstore/sigstore/pkg/signature/payload/payload.go
+++ b/vendor/github.com/sigstore/sigstore/pkg/signature/payload/payload.go
@@ -13,7 +13,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-// Package payload TODO: add meaningfull description
+// Package payload defines a container image
package payload
import (
diff --git a/vendor/github.com/sylabs/sif/v2/pkg/sif/descriptor.go b/vendor/github.com/sylabs/sif/v2/pkg/sif/descriptor.go
index 86fac669a..03ed2b042 100644
--- a/vendor/github.com/sylabs/sif/v2/pkg/sif/descriptor.go
+++ b/vendor/github.com/sylabs/sif/v2/pkg/sif/descriptor.go
@@ -56,6 +56,11 @@ type cryptoMessage struct {
Messagetype MessageType
}
+// sbom represents the SIF SBOM data object descriptor.
+type sbom struct {
+ Format SBOMFormat
+}
+
var errNameTooLarge = errors.New("name value too large")
// setName encodes name into the name field of d.
@@ -230,6 +235,22 @@ func (d Descriptor) CryptoMessageMetadata() (FormatType, MessageType, error) {
return m.Formattype, m.Messagetype, nil
}
+// SBOMMetadata gets metadata for a SBOM data object.
+func (d Descriptor) SBOMMetadata() (SBOMFormat, error) {
+ if got, want := d.raw.DataType, DataSBOM; got != want {
+ return 0, &unexpectedDataTypeError{got, []DataType{want}}
+ }
+
+ var s sbom
+
+ b := bytes.NewReader(d.raw.Extra[:])
+ if err := binary.Read(b, binary.LittleEndian, &s); err != nil {
+ return 0, fmt.Errorf("%w", err)
+ }
+
+ return s.Format, nil
+}
+
// GetData returns the data object associated with descriptor d.
func (d Descriptor) GetData() ([]byte, error) {
b := make([]byte, d.raw.Size)
diff --git a/vendor/github.com/sylabs/sif/v2/pkg/sif/descriptor_input.go b/vendor/github.com/sylabs/sif/v2/pkg/sif/descriptor_input.go
index 1b8dda20c..3e81c394f 100644
--- a/vendor/github.com/sylabs/sif/v2/pkg/sif/descriptor_input.go
+++ b/vendor/github.com/sylabs/sif/v2/pkg/sif/descriptor_input.go
@@ -226,6 +226,24 @@ func OptSignatureMetadata(ht crypto.Hash, fp []byte) DescriptorInputOpt {
}
}
+// OptSBOMMetadata sets metadata for a SBOM data object. The SBOM format is set to f.
+//
+// If this option is applied to a data object with an incompatible type, an error is returned.
+func OptSBOMMetadata(f SBOMFormat) DescriptorInputOpt {
+ return func(t DataType, opts *descriptorOpts) error {
+ if got, want := t, DataSBOM; got != want {
+ return &unexpectedDataTypeError{got, []DataType{want}}
+ }
+
+ s := sbom{
+ Format: f,
+ }
+
+ opts.extra = s
+ return nil
+ }
+}
+
// DescriptorInput describes a new data object.
type DescriptorInput struct {
dt DataType
@@ -241,7 +259,7 @@ const DefaultObjectGroup = 1
//
// It is possible (and often necessary) to store additional metadata related to certain types of
// data objects. Consider supplying options such as OptCryptoMessageMetadata, OptPartitionMetadata,
-// and OptSignatureMetadata for this purpose.
+// OptSignatureMetadata, and OptSBOMMetadata for this purpose.
//
// By default, the data object will be placed in the default data object group (1). To override
// this behavior, use OptNoGroup or OptGroupID. To link this data object, use OptLinkedID or
diff --git a/vendor/github.com/sylabs/sif/v2/pkg/sif/sif.go b/vendor/github.com/sylabs/sif/v2/pkg/sif/sif.go
index e0faaedb3..2d1c2091d 100644
--- a/vendor/github.com/sylabs/sif/v2/pkg/sif/sif.go
+++ b/vendor/github.com/sylabs/sif/v2/pkg/sif/sif.go
@@ -132,6 +132,7 @@ const (
DataGenericJSON // generic JSON meta-data
DataGeneric // generic / raw data
DataCryptoMessage // cryptographic message data object
+ DataSBOM // software bill of materials
)
// String returns a human-readable representation of t.
@@ -153,6 +154,8 @@ func (t DataType) String() string {
return "Generic/Raw"
case DataCryptoMessage:
return "Cryptographic Message"
+ case DataSBOM:
+ return "SBOM"
}
return "Unknown"
}
@@ -267,6 +270,44 @@ func (t MessageType) String() string {
return "Unknown"
}
+// SBOMFormat represents the format used to store an SBOM object.
+type SBOMFormat int32
+
+// List of supported SBOM formats.
+const (
+ SBOMFormatCycloneDXJSON SBOMFormat = iota + 1 // CycloneDX (JSON)
+ SBOMFormatCycloneDXXML // CycloneDX (XML)
+ SBOMFormatGitHubJSON // GitHub dependency snapshot (JSON)
+ SBOMFormatSPDXJSON // SPDX (JSON)
+ SBOMFormatSPDXRDF // SPDX (RDF/xml)
+ SBOMFormatSPDXTagValue // SPDX (tag/value)
+ SBOMFormatSPDXYAML // SPDX (YAML)
+ SBOMFormatSyftJSON // Syft (JSON)
+)
+
+// String returns a human-readable representation of f.
+func (f SBOMFormat) String() string {
+ switch f {
+ case SBOMFormatCycloneDXJSON:
+ return "cyclonedx-json"
+ case SBOMFormatCycloneDXXML:
+ return "cyclonedx-xml"
+ case SBOMFormatGitHubJSON:
+ return "github-json"
+ case SBOMFormatSPDXJSON:
+ return "spdx-json"
+ case SBOMFormatSPDXRDF:
+ return "spdx-rdf"
+ case SBOMFormatSPDXTagValue:
+ return "spdx-tag-value"
+ case SBOMFormatSPDXYAML:
+ return "spdx-yaml"
+ case SBOMFormatSyftJSON:
+ return "syft-json"
+ }
+ return "unknown"
+}
+
// header describes a loaded SIF file.
type header struct {
LaunchScript [hdrLaunchLen]byte
diff --git a/vendor/golang.org/x/crypto/openpgp/packet/opaque.go b/vendor/golang.org/x/crypto/openpgp/packet/opaque.go
index 456d807f2..398447731 100644
--- a/vendor/golang.org/x/crypto/openpgp/packet/opaque.go
+++ b/vendor/golang.org/x/crypto/openpgp/packet/opaque.go
@@ -7,7 +7,6 @@ package packet
import (
"bytes"
"io"
- "io/ioutil"
"golang.org/x/crypto/openpgp/errors"
)
@@ -26,7 +25,7 @@ type OpaquePacket struct {
}
func (op *OpaquePacket) parse(r io.Reader) (err error) {
- op.Contents, err = ioutil.ReadAll(r)
+ op.Contents, err = io.ReadAll(r)
return
}
diff --git a/vendor/golang.org/x/crypto/openpgp/packet/private_key.go b/vendor/golang.org/x/crypto/openpgp/packet/private_key.go
index 81abb7cef..192aac376 100644
--- a/vendor/golang.org/x/crypto/openpgp/packet/private_key.go
+++ b/vendor/golang.org/x/crypto/openpgp/packet/private_key.go
@@ -13,7 +13,6 @@ import (
"crypto/rsa"
"crypto/sha1"
"io"
- "io/ioutil"
"math/big"
"strconv"
"time"
@@ -133,7 +132,7 @@ func (pk *PrivateKey) parse(r io.Reader) (err error) {
}
}
- pk.encryptedData, err = ioutil.ReadAll(r)
+ pk.encryptedData, err = io.ReadAll(r)
if err != nil {
return
}
diff --git a/vendor/golang.org/x/crypto/openpgp/packet/symmetrically_encrypted.go b/vendor/golang.org/x/crypto/openpgp/packet/symmetrically_encrypted.go
index 6126030eb..1a1a62964 100644
--- a/vendor/golang.org/x/crypto/openpgp/packet/symmetrically_encrypted.go
+++ b/vendor/golang.org/x/crypto/openpgp/packet/symmetrically_encrypted.go
@@ -236,7 +236,7 @@ func (w *seMDCWriter) Close() (err error) {
return w.w.Close()
}
-// noOpCloser is like an ioutil.NopCloser, but for an io.Writer.
+// noOpCloser is like an io.NopCloser, but for an io.Writer.
type noOpCloser struct {
w io.Writer
}
diff --git a/vendor/golang.org/x/crypto/openpgp/packet/userattribute.go b/vendor/golang.org/x/crypto/openpgp/packet/userattribute.go
index d19ffbc78..ff7ef5307 100644
--- a/vendor/golang.org/x/crypto/openpgp/packet/userattribute.go
+++ b/vendor/golang.org/x/crypto/openpgp/packet/userattribute.go
@@ -9,7 +9,6 @@ import (
"image"
"image/jpeg"
"io"
- "io/ioutil"
)
const UserAttrImageSubpacket = 1
@@ -56,7 +55,7 @@ func NewUserAttribute(contents ...*OpaqueSubpacket) *UserAttribute {
func (uat *UserAttribute) parse(r io.Reader) (err error) {
// RFC 4880, section 5.13
- b, err := ioutil.ReadAll(r)
+ b, err := io.ReadAll(r)
if err != nil {
return
}
diff --git a/vendor/golang.org/x/crypto/openpgp/packet/userid.go b/vendor/golang.org/x/crypto/openpgp/packet/userid.go
index d6bea7d4a..359a462eb 100644
--- a/vendor/golang.org/x/crypto/openpgp/packet/userid.go
+++ b/vendor/golang.org/x/crypto/openpgp/packet/userid.go
@@ -6,7 +6,6 @@ package packet
import (
"io"
- "io/ioutil"
"strings"
)
@@ -66,7 +65,7 @@ func NewUserId(name, comment, email string) *UserId {
func (uid *UserId) parse(r io.Reader) (err error) {
// RFC 4880, section 5.11
- b, err := ioutil.ReadAll(r)
+ b, err := io.ReadAll(r)
if err != nil {
return
}
diff --git a/vendor/golang.org/x/crypto/openpgp/write.go b/vendor/golang.org/x/crypto/openpgp/write.go
index 4ee71784e..b89d48b81 100644
--- a/vendor/golang.org/x/crypto/openpgp/write.go
+++ b/vendor/golang.org/x/crypto/openpgp/write.go
@@ -402,7 +402,7 @@ func (s signatureWriter) Close() error {
return s.encryptedData.Close()
}
-// noOpCloser is like an ioutil.NopCloser, but for an io.Writer.
+// noOpCloser is like an io.NopCloser, but for an io.Writer.
// TODO: we have two of these in OpenPGP packages alone. This probably needs
// to be promoted somewhere more common.
type noOpCloser struct {
diff --git a/vendor/golang.org/x/crypto/ssh/cipher.go b/vendor/golang.org/x/crypto/ssh/cipher.go
index 770e8a663..c3062cfd1 100644
--- a/vendor/golang.org/x/crypto/ssh/cipher.go
+++ b/vendor/golang.org/x/crypto/ssh/cipher.go
@@ -15,7 +15,6 @@ import (
"fmt"
"hash"
"io"
- "io/ioutil"
"golang.org/x/crypto/chacha20"
"golang.org/x/crypto/internal/poly1305"
@@ -497,7 +496,7 @@ func (c *cbcCipher) readCipherPacket(seqNum uint32, r io.Reader) ([]byte, error)
// data, to make distinguishing between
// failing MAC and failing length check more
// difficult.
- io.CopyN(ioutil.Discard, r, int64(c.oracleCamouflage))
+ io.CopyN(io.Discard, r, int64(c.oracleCamouflage))
}
}
return p, err
diff --git a/vendor/golang.org/x/crypto/ssh/session.go b/vendor/golang.org/x/crypto/ssh/session.go
index eca31a22d..acef62259 100644
--- a/vendor/golang.org/x/crypto/ssh/session.go
+++ b/vendor/golang.org/x/crypto/ssh/session.go
@@ -13,7 +13,6 @@ import (
"errors"
"fmt"
"io"
- "io/ioutil"
"sync"
)
@@ -124,7 +123,7 @@ type Session struct {
// output and error.
//
// If either is nil, Run connects the corresponding file
- // descriptor to an instance of ioutil.Discard. There is a
+ // descriptor to an instance of io.Discard. There is a
// fixed amount of buffering that is shared for the two streams.
// If either blocks it may eventually cause the remote
// command to block.
@@ -506,7 +505,7 @@ func (s *Session) stdout() {
return
}
if s.Stdout == nil {
- s.Stdout = ioutil.Discard
+ s.Stdout = io.Discard
}
s.copyFuncs = append(s.copyFuncs, func() error {
_, err := io.Copy(s.Stdout, s.ch)
@@ -519,7 +518,7 @@ func (s *Session) stderr() {
return
}
if s.Stderr == nil {
- s.Stderr = ioutil.Discard
+ s.Stderr = io.Discard
}
s.copyFuncs = append(s.copyFuncs, func() error {
_, err := io.Copy(s.Stderr, s.ch.Stderr())
diff --git a/vendor/golang.org/x/net/context/go17.go b/vendor/golang.org/x/net/context/go17.go
index 0a54bdbcc..2cb9c408f 100644
--- a/vendor/golang.org/x/net/context/go17.go
+++ b/vendor/golang.org/x/net/context/go17.go
@@ -32,7 +32,7 @@ var DeadlineExceeded = context.DeadlineExceeded
// call cancel as soon as the operations running in this Context complete.
func WithCancel(parent Context) (ctx Context, cancel CancelFunc) {
ctx, f := context.WithCancel(parent)
- return ctx, CancelFunc(f)
+ return ctx, f
}
// WithDeadline returns a copy of the parent context with the deadline adjusted
@@ -46,7 +46,7 @@ func WithCancel(parent Context) (ctx Context, cancel CancelFunc) {
// call cancel as soon as the operations running in this Context complete.
func WithDeadline(parent Context, deadline time.Time) (Context, CancelFunc) {
ctx, f := context.WithDeadline(parent, deadline)
- return ctx, CancelFunc(f)
+ return ctx, f
}
// WithTimeout returns WithDeadline(parent, time.Now().Add(timeout)).
diff --git a/vendor/golang.org/x/net/http2/server.go b/vendor/golang.org/x/net/http2/server.go
index aa3b0864e..fd873b9af 100644
--- a/vendor/golang.org/x/net/http2/server.go
+++ b/vendor/golang.org/x/net/http2/server.go
@@ -1371,6 +1371,9 @@ func (sc *serverConn) startGracefulShutdownInternal() {
func (sc *serverConn) goAway(code ErrCode) {
sc.serveG.check()
if sc.inGoAway {
+ if sc.goAwayCode == ErrCodeNo {
+ sc.goAwayCode = code
+ }
return
}
sc.inGoAway = true
diff --git a/vendor/golang.org/x/sys/plan9/syscall.go b/vendor/golang.org/x/sys/plan9/syscall.go
index ea971285f..67e5b0115 100644
--- a/vendor/golang.org/x/sys/plan9/syscall.go
+++ b/vendor/golang.org/x/sys/plan9/syscall.go
@@ -80,8 +80,7 @@ func BytePtrToString(p *byte) string {
ptr = unsafe.Pointer(uintptr(ptr) + 1)
}
- s := unsafe.Slice((*byte)(unsafe.Pointer(p)), n)
- return string(s)
+ return string(unsafe.Slice(p, n))
}
// Single-word zero for use when we need a valid pointer to 0 bytes.
diff --git a/vendor/golang.org/x/sys/unix/mkall.sh b/vendor/golang.org/x/sys/unix/mkall.sh
index 3b2335d5f..1b2b424a7 100644
--- a/vendor/golang.org/x/sys/unix/mkall.sh
+++ b/vendor/golang.org/x/sys/unix/mkall.sh
@@ -214,11 +214,6 @@ esac
if [ "$GOOSARCH" == "aix_ppc64" ]; then
# aix/ppc64 script generates files instead of writing to stdin.
echo "$mksyscall -tags $GOOS,$GOARCH $syscall_goos $GOOSARCH_in && gofmt -w zsyscall_$GOOSARCH.go && gofmt -w zsyscall_"$GOOSARCH"_gccgo.go && gofmt -w zsyscall_"$GOOSARCH"_gc.go " ;
- elif [ "$GOOS" == "darwin" ]; then
- # 1.12 and later, syscalls via libSystem
- echo "$mksyscall -tags $GOOS,$GOARCH,go1.12 $syscall_goos $GOOSARCH_in |gofmt >zsyscall_$GOOSARCH.go";
- # 1.13 and later, syscalls via libSystem (including syscallPtr)
- echo "$mksyscall -tags $GOOS,$GOARCH,go1.13 syscall_darwin.1_13.go |gofmt >zsyscall_$GOOSARCH.1_13.go";
elif [ "$GOOS" == "illumos" ]; then
# illumos code generation requires a --illumos switch
echo "$mksyscall -illumos -tags illumos,$GOARCH syscall_illumos.go |gofmt > zsyscall_illumos_$GOARCH.go";
diff --git a/vendor/golang.org/x/sys/unix/syscall.go b/vendor/golang.org/x/sys/unix/syscall.go
index 9916e5e85..63e8c8383 100644
--- a/vendor/golang.org/x/sys/unix/syscall.go
+++ b/vendor/golang.org/x/sys/unix/syscall.go
@@ -80,8 +80,7 @@ func BytePtrToString(p *byte) string {
ptr = unsafe.Pointer(uintptr(ptr) + 1)
}
- s := unsafe.Slice((*byte)(unsafe.Pointer(p)), n)
- return string(s)
+ return string(unsafe.Slice(p, n))
}
// Single-word zero for use when we need a valid pointer to 0 bytes.
diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin.1_12.go b/vendor/golang.org/x/sys/unix/syscall_darwin.1_12.go
deleted file mode 100644
index b0098607c..000000000
--- a/vendor/golang.org/x/sys/unix/syscall_darwin.1_12.go
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright 2019 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-//go:build darwin && go1.12 && !go1.13
-// +build darwin,go1.12,!go1.13
-
-package unix
-
-import (
- "unsafe"
-)
-
-const _SYS_GETDIRENTRIES64 = 344
-
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
- // To implement this using libSystem we'd need syscall_syscallPtr for
- // fdopendir. However, syscallPtr was only added in Go 1.13, so we fall
- // back to raw syscalls for this func on Go 1.12.
- var p unsafe.Pointer
- if len(buf) > 0 {
- p = unsafe.Pointer(&buf[0])
- } else {
- p = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(_SYS_GETDIRENTRIES64, uintptr(fd), uintptr(p), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- return n, errnoErr(e1)
- }
- return n, nil
-}
diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin.1_13.go b/vendor/golang.org/x/sys/unix/syscall_darwin.1_13.go
deleted file mode 100644
index 1259f6df5..000000000
--- a/vendor/golang.org/x/sys/unix/syscall_darwin.1_13.go
+++ /dev/null
@@ -1,100 +0,0 @@
-// Copyright 2019 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-//go:build darwin && go1.13
-// +build darwin,go1.13
-
-package unix
-
-import "unsafe"
-
-//sys closedir(dir uintptr) (err error)
-//sys readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno)
-
-func fdopendir(fd int) (dir uintptr, err error) {
- r0, _, e1 := syscall_syscallPtr(libc_fdopendir_trampoline_addr, uintptr(fd), 0, 0)
- dir = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-var libc_fdopendir_trampoline_addr uintptr
-
-//go:cgo_import_dynamic libc_fdopendir fdopendir "/usr/lib/libSystem.B.dylib"
-
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
- // Simulate Getdirentries using fdopendir/readdir_r/closedir.
- // We store the number of entries to skip in the seek
- // offset of fd. See issue #31368.
- // It's not the full required semantics, but should handle the case
- // of calling Getdirentries or ReadDirent repeatedly.
- // It won't handle assigning the results of lseek to *basep, or handle
- // the directory being edited underfoot.
- skip, err := Seek(fd, 0, 1 /* SEEK_CUR */)
- if err != nil {
- return 0, err
- }
-
- // We need to duplicate the incoming file descriptor
- // because the caller expects to retain control of it, but
- // fdopendir expects to take control of its argument.
- // Just Dup'ing the file descriptor is not enough, as the
- // result shares underlying state. Use Openat to make a really
- // new file descriptor referring to the same directory.
- fd2, err := Openat(fd, ".", O_RDONLY, 0)
- if err != nil {
- return 0, err
- }
- d, err := fdopendir(fd2)
- if err != nil {
- Close(fd2)
- return 0, err
- }
- defer closedir(d)
-
- var cnt int64
- for {
- var entry Dirent
- var entryp *Dirent
- e := readdir_r(d, &entry, &entryp)
- if e != 0 {
- return n, errnoErr(e)
- }
- if entryp == nil {
- break
- }
- if skip > 0 {
- skip--
- cnt++
- continue
- }
-
- reclen := int(entry.Reclen)
- if reclen > len(buf) {
- // Not enough room. Return for now.
- // The counter will let us know where we should start up again.
- // Note: this strategy for suspending in the middle and
- // restarting is O(n^2) in the length of the directory. Oh well.
- break
- }
-
- // Copy entry into return buffer.
- s := unsafe.Slice((*byte)(unsafe.Pointer(&entry)), reclen)
- copy(buf, s)
-
- buf = buf[reclen:]
- n += reclen
- cnt++
- }
- // Set the seek offset of the input fd to record
- // how many files we've already returned.
- _, err = Seek(fd, cnt, 0 /* SEEK_SET */)
- if err != nil {
- return n, err
- }
-
- return n, nil
-}
diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin.go b/vendor/golang.org/x/sys/unix/syscall_darwin.go
index 4f87f16ea..1f6338218 100644
--- a/vendor/golang.org/x/sys/unix/syscall_darwin.go
+++ b/vendor/golang.org/x/sys/unix/syscall_darwin.go
@@ -19,6 +19,96 @@ import (
"unsafe"
)
+//sys closedir(dir uintptr) (err error)
+//sys readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno)
+
+func fdopendir(fd int) (dir uintptr, err error) {
+ r0, _, e1 := syscall_syscallPtr(libc_fdopendir_trampoline_addr, uintptr(fd), 0, 0)
+ dir = uintptr(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_fdopendir_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fdopendir fdopendir "/usr/lib/libSystem.B.dylib"
+
+func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
+ // Simulate Getdirentries using fdopendir/readdir_r/closedir.
+ // We store the number of entries to skip in the seek
+ // offset of fd. See issue #31368.
+ // It's not the full required semantics, but should handle the case
+ // of calling Getdirentries or ReadDirent repeatedly.
+ // It won't handle assigning the results of lseek to *basep, or handle
+ // the directory being edited underfoot.
+ skip, err := Seek(fd, 0, 1 /* SEEK_CUR */)
+ if err != nil {
+ return 0, err
+ }
+
+ // We need to duplicate the incoming file descriptor
+ // because the caller expects to retain control of it, but
+ // fdopendir expects to take control of its argument.
+ // Just Dup'ing the file descriptor is not enough, as the
+ // result shares underlying state. Use Openat to make a really
+ // new file descriptor referring to the same directory.
+ fd2, err := Openat(fd, ".", O_RDONLY, 0)
+ if err != nil {
+ return 0, err
+ }
+ d, err := fdopendir(fd2)
+ if err != nil {
+ Close(fd2)
+ return 0, err
+ }
+ defer closedir(d)
+
+ var cnt int64
+ for {
+ var entry Dirent
+ var entryp *Dirent
+ e := readdir_r(d, &entry, &entryp)
+ if e != 0 {
+ return n, errnoErr(e)
+ }
+ if entryp == nil {
+ break
+ }
+ if skip > 0 {
+ skip--
+ cnt++
+ continue
+ }
+
+ reclen := int(entry.Reclen)
+ if reclen > len(buf) {
+ // Not enough room. Return for now.
+ // The counter will let us know where we should start up again.
+ // Note: this strategy for suspending in the middle and
+ // restarting is O(n^2) in the length of the directory. Oh well.
+ break
+ }
+
+ // Copy entry into return buffer.
+ s := unsafe.Slice((*byte)(unsafe.Pointer(&entry)), reclen)
+ copy(buf, s)
+
+ buf = buf[reclen:]
+ n += reclen
+ cnt++
+ }
+ // Set the seek offset of the input fd to record
+ // how many files we've already returned.
+ _, err = Seek(fd, cnt, 0 /* SEEK_SET */)
+ if err != nil {
+ return n, err
+ }
+
+ return n, nil
+}
+
// SockaddrDatalink implements the Sockaddr interface for AF_LINK type sockets.
type SockaddrDatalink struct {
Len uint8
diff --git a/vendor/golang.org/x/sys/unix/xattr_bsd.go b/vendor/golang.org/x/sys/unix/xattr_bsd.go
index 25df1e378..663b3779d 100644
--- a/vendor/golang.org/x/sys/unix/xattr_bsd.go
+++ b/vendor/golang.org/x/sys/unix/xattr_bsd.go
@@ -160,13 +160,12 @@ func Lremovexattr(link string, attr string) (err error) {
}
func Listxattr(file string, dest []byte) (sz int, err error) {
- d := initxattrdest(dest, 0)
destsiz := len(dest)
// FreeBSD won't allow you to list xattrs from multiple namespaces
- s := 0
+ s, pos := 0, 0
for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} {
- stmp, e := ExtattrListFile(file, nsid, uintptr(d), destsiz)
+ stmp, e := ListxattrNS(file, nsid, dest[pos:])
/* Errors accessing system attrs are ignored so that
* we can implement the Linux-like behavior of omitting errors that
@@ -175,66 +174,102 @@ func Listxattr(file string, dest []byte) (sz int, err error) {
* Linux will still error if we ask for user attributes on a file that
* we don't have read permissions on, so don't ignore those errors
*/
- if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
- continue
- } else if e != nil {
+ if e != nil {
+ if e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
+ continue
+ }
return s, e
}
s += stmp
- destsiz -= s
- if destsiz < 0 {
- destsiz = 0
+ pos = s
+ if pos > destsiz {
+ pos = destsiz
}
- d = initxattrdest(dest, s)
}
return s, nil
}
-func Flistxattr(fd int, dest []byte) (sz int, err error) {
+func ListxattrNS(file string, nsid int, dest []byte) (sz int, err error) {
d := initxattrdest(dest, 0)
destsiz := len(dest)
- s := 0
+ s, e := ExtattrListFile(file, nsid, uintptr(d), destsiz)
+ if e != nil {
+ return 0, err
+ }
+
+ return s, nil
+}
+
+func Flistxattr(fd int, dest []byte) (sz int, err error) {
+ destsiz := len(dest)
+
+ s, pos := 0, 0
for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} {
- stmp, e := ExtattrListFd(fd, nsid, uintptr(d), destsiz)
- if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
- continue
- } else if e != nil {
+ stmp, e := FlistxattrNS(fd, nsid, dest[pos:])
+
+ if e != nil {
+ if e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
+ continue
+ }
return s, e
}
s += stmp
- destsiz -= s
- if destsiz < 0 {
- destsiz = 0
+ pos = s
+ if pos > destsiz {
+ pos = destsiz
}
- d = initxattrdest(dest, s)
}
return s, nil
}
-func Llistxattr(link string, dest []byte) (sz int, err error) {
+func FlistxattrNS(fd int, nsid int, dest []byte) (sz int, err error) {
d := initxattrdest(dest, 0)
destsiz := len(dest)
- s := 0
+ s, e := ExtattrListFd(fd, nsid, uintptr(d), destsiz)
+ if e != nil {
+ return 0, err
+ }
+
+ return s, nil
+}
+
+func Llistxattr(link string, dest []byte) (sz int, err error) {
+ destsiz := len(dest)
+
+ s, pos := 0, 0
for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} {
- stmp, e := ExtattrListLink(link, nsid, uintptr(d), destsiz)
- if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
- continue
- } else if e != nil {
+ stmp, e := LlistxattrNS(link, nsid, dest[pos:])
+
+ if e != nil {
+ if e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
+ continue
+ }
return s, e
}
s += stmp
- destsiz -= s
- if destsiz < 0 {
- destsiz = 0
+ pos = s
+ if pos > destsiz {
+ pos = destsiz
}
- d = initxattrdest(dest, s)
+ }
+
+ return s, nil
+}
+
+func LlistxattrNS(link string, nsid int, dest []byte) (sz int, err error) {
+ d := initxattrdest(dest, 0)
+ destsiz := len(dest)
+
+ s, e := ExtattrListLink(link, nsid, uintptr(d), destsiz)
+ if e != nil {
+ return 0, err
}
return s, nil
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.go
deleted file mode 100644
index a06eb0932..000000000
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.go
+++ /dev/null
@@ -1,40 +0,0 @@
-// go run mksyscall.go -tags darwin,amd64,go1.13 syscall_darwin.1_13.go
-// Code generated by the command above; see README.md. DO NOT EDIT.
-
-//go:build darwin && amd64 && go1.13
-// +build darwin,amd64,go1.13
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-var _ syscall.Errno
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func closedir(dir uintptr) (err error) {
- _, _, e1 := syscall_syscall(libc_closedir_trampoline_addr, uintptr(dir), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-var libc_closedir_trampoline_addr uintptr
-
-//go:cgo_import_dynamic libc_closedir closedir "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno) {
- r0, _, _ := syscall_syscall(libc_readdir_r_trampoline_addr, uintptr(dir), uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result)))
- res = Errno(r0)
- return
-}
-
-var libc_readdir_r_trampoline_addr uintptr
-
-//go:cgo_import_dynamic libc_readdir_r readdir_r "/usr/lib/libSystem.B.dylib"
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.s b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.s
deleted file mode 100644
index f5bb40eda..000000000
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.s
+++ /dev/null
@@ -1,25 +0,0 @@
-// go run mkasm.go darwin amd64
-// Code generated by the command above; DO NOT EDIT.
-
-//go:build go1.13
-// +build go1.13
-
-#include "textflag.h"
-
-TEXT libc_fdopendir_trampoline<>(SB),NOSPLIT,$0-0
- JMP libc_fdopendir(SB)
-
-GLOBL ·libc_fdopendir_trampoline_addr(SB), RODATA, $8
-DATA ·libc_fdopendir_trampoline_addr(SB)/8, $libc_fdopendir_trampoline<>(SB)
-
-TEXT libc_closedir_trampoline<>(SB),NOSPLIT,$0-0
- JMP libc_closedir(SB)
-
-GLOBL ·libc_closedir_trampoline_addr(SB), RODATA, $8
-DATA ·libc_closedir_trampoline_addr(SB)/8, $libc_closedir_trampoline<>(SB)
-
-TEXT libc_readdir_r_trampoline<>(SB),NOSPLIT,$0-0
- JMP libc_readdir_r(SB)
-
-GLOBL ·libc_readdir_r_trampoline_addr(SB), RODATA, $8
-DATA ·libc_readdir_r_trampoline_addr(SB)/8, $libc_readdir_r_trampoline<>(SB)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
index 467deed76..c2461c496 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
@@ -1,8 +1,8 @@
-// go run mksyscall.go -tags darwin,amd64,go1.12 syscall_bsd.go syscall_darwin.go syscall_darwin_amd64.go
+// go run mksyscall.go -tags darwin,amd64 syscall_bsd.go syscall_darwin.go syscall_darwin_amd64.go
// Code generated by the command above; see README.md. DO NOT EDIT.
-//go:build darwin && amd64 && go1.12
-// +build darwin,amd64,go1.12
+//go:build darwin && amd64
+// +build darwin,amd64
package unix
@@ -463,6 +463,32 @@ var libc_munlockall_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func closedir(dir uintptr) (err error) {
+ _, _, e1 := syscall_syscall(libc_closedir_trampoline_addr, uintptr(dir), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_closedir_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_closedir closedir "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno) {
+ r0, _, _ := syscall_syscall(libc_readdir_r_trampoline_addr, uintptr(dir), uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result)))
+ res = Errno(r0)
+ return
+}
+
+var libc_readdir_r_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_readdir_r readdir_r "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func pipe(p *[2]int32) (err error) {
_, _, e1 := syscall_rawSyscall(libc_pipe_trampoline_addr, uintptr(unsafe.Pointer(p)), 0, 0)
if e1 != 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
index b41467a0e..95fe4c0eb 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
@@ -1,11 +1,14 @@
// go run mkasm.go darwin amd64
// Code generated by the command above; DO NOT EDIT.
-//go:build go1.12
-// +build go1.12
-
#include "textflag.h"
+TEXT libc_fdopendir_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fdopendir(SB)
+
+GLOBL ·libc_fdopendir_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fdopendir_trampoline_addr(SB)/8, $libc_fdopendir_trampoline<>(SB)
+
TEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getgroups(SB)
@@ -174,6 +177,18 @@ TEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_munlockall_trampoline_addr(SB), RODATA, $8
DATA ·libc_munlockall_trampoline_addr(SB)/8, $libc_munlockall_trampoline<>(SB)
+TEXT libc_closedir_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_closedir(SB)
+
+GLOBL ·libc_closedir_trampoline_addr(SB), RODATA, $8
+DATA ·libc_closedir_trampoline_addr(SB)/8, $libc_closedir_trampoline<>(SB)
+
+TEXT libc_readdir_r_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_readdir_r(SB)
+
+GLOBL ·libc_readdir_r_trampoline_addr(SB), RODATA, $8
+DATA ·libc_readdir_r_trampoline_addr(SB)/8, $libc_readdir_r_trampoline<>(SB)
+
TEXT libc_pipe_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_pipe(SB)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.go
deleted file mode 100644
index cec595d55..000000000
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.go
+++ /dev/null
@@ -1,40 +0,0 @@
-// go run mksyscall.go -tags darwin,arm64,go1.13 syscall_darwin.1_13.go
-// Code generated by the command above; see README.md. DO NOT EDIT.
-
-//go:build darwin && arm64 && go1.13
-// +build darwin,arm64,go1.13
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-var _ syscall.Errno
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func closedir(dir uintptr) (err error) {
- _, _, e1 := syscall_syscall(libc_closedir_trampoline_addr, uintptr(dir), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-var libc_closedir_trampoline_addr uintptr
-
-//go:cgo_import_dynamic libc_closedir closedir "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno) {
- r0, _, _ := syscall_syscall(libc_readdir_r_trampoline_addr, uintptr(dir), uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result)))
- res = Errno(r0)
- return
-}
-
-var libc_readdir_r_trampoline_addr uintptr
-
-//go:cgo_import_dynamic libc_readdir_r readdir_r "/usr/lib/libSystem.B.dylib"
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.s b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.s
deleted file mode 100644
index 0c3f76bc2..000000000
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.s
+++ /dev/null
@@ -1,25 +0,0 @@
-// go run mkasm.go darwin arm64
-// Code generated by the command above; DO NOT EDIT.
-
-//go:build go1.13
-// +build go1.13
-
-#include "textflag.h"
-
-TEXT libc_fdopendir_trampoline<>(SB),NOSPLIT,$0-0
- JMP libc_fdopendir(SB)
-
-GLOBL ·libc_fdopendir_trampoline_addr(SB), RODATA, $8
-DATA ·libc_fdopendir_trampoline_addr(SB)/8, $libc_fdopendir_trampoline<>(SB)
-
-TEXT libc_closedir_trampoline<>(SB),NOSPLIT,$0-0
- JMP libc_closedir(SB)
-
-GLOBL ·libc_closedir_trampoline_addr(SB), RODATA, $8
-DATA ·libc_closedir_trampoline_addr(SB)/8, $libc_closedir_trampoline<>(SB)
-
-TEXT libc_readdir_r_trampoline<>(SB),NOSPLIT,$0-0
- JMP libc_readdir_r(SB)
-
-GLOBL ·libc_readdir_r_trampoline_addr(SB), RODATA, $8
-DATA ·libc_readdir_r_trampoline_addr(SB)/8, $libc_readdir_r_trampoline<>(SB)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
index 35938d34f..26a0fdc50 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
@@ -1,8 +1,8 @@
-// go run mksyscall.go -tags darwin,arm64,go1.12 syscall_bsd.go syscall_darwin.go syscall_darwin_arm64.go
+// go run mksyscall.go -tags darwin,arm64 syscall_bsd.go syscall_darwin.go syscall_darwin_arm64.go
// Code generated by the command above; see README.md. DO NOT EDIT.
-//go:build darwin && arm64 && go1.12
-// +build darwin,arm64,go1.12
+//go:build darwin && arm64
+// +build darwin,arm64
package unix
@@ -463,6 +463,32 @@ var libc_munlockall_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func closedir(dir uintptr) (err error) {
+ _, _, e1 := syscall_syscall(libc_closedir_trampoline_addr, uintptr(dir), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_closedir_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_closedir closedir "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno) {
+ r0, _, _ := syscall_syscall(libc_readdir_r_trampoline_addr, uintptr(dir), uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result)))
+ res = Errno(r0)
+ return
+}
+
+var libc_readdir_r_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_readdir_r readdir_r "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func pipe(p *[2]int32) (err error) {
_, _, e1 := syscall_rawSyscall(libc_pipe_trampoline_addr, uintptr(unsafe.Pointer(p)), 0, 0)
if e1 != 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s
index e1f9204a2..efa5b4c98 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s
@@ -1,11 +1,14 @@
// go run mkasm.go darwin arm64
// Code generated by the command above; DO NOT EDIT.
-//go:build go1.12
-// +build go1.12
-
#include "textflag.h"
+TEXT libc_fdopendir_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fdopendir(SB)
+
+GLOBL ·libc_fdopendir_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fdopendir_trampoline_addr(SB)/8, $libc_fdopendir_trampoline<>(SB)
+
TEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getgroups(SB)
@@ -174,6 +177,18 @@ TEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_munlockall_trampoline_addr(SB), RODATA, $8
DATA ·libc_munlockall_trampoline_addr(SB)/8, $libc_munlockall_trampoline<>(SB)
+TEXT libc_closedir_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_closedir(SB)
+
+GLOBL ·libc_closedir_trampoline_addr(SB), RODATA, $8
+DATA ·libc_closedir_trampoline_addr(SB)/8, $libc_closedir_trampoline<>(SB)
+
+TEXT libc_readdir_r_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_readdir_r(SB)
+
+GLOBL ·libc_readdir_r_trampoline_addr(SB), RODATA, $8
+DATA ·libc_readdir_r_trampoline_addr(SB)/8, $libc_readdir_r_trampoline<>(SB)
+
TEXT libc_pipe_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_pipe(SB)
diff --git a/vendor/golang.org/x/sys/windows/syscall.go b/vendor/golang.org/x/sys/windows/syscall.go
index 72074d582..8732cdb95 100644
--- a/vendor/golang.org/x/sys/windows/syscall.go
+++ b/vendor/golang.org/x/sys/windows/syscall.go
@@ -30,8 +30,6 @@ import (
"strings"
"syscall"
"unsafe"
-
- "golang.org/x/sys/internal/unsafeheader"
)
// ByteSliceFromString returns a NUL-terminated slice of bytes
@@ -83,13 +81,7 @@ func BytePtrToString(p *byte) string {
ptr = unsafe.Pointer(uintptr(ptr) + 1)
}
- var s []byte
- h := (*unsafeheader.Slice)(unsafe.Pointer(&s))
- h.Data = unsafe.Pointer(p)
- h.Len = n
- h.Cap = n
-
- return string(s)
+ return string(unsafe.Slice(p, n))
}
// Single-word zero for use when we need a valid pointer to 0 bytes.
diff --git a/vendor/golang.org/x/sys/windows/syscall_windows.go b/vendor/golang.org/x/sys/windows/syscall_windows.go
index e27913817..3f2cbb638 100644
--- a/vendor/golang.org/x/sys/windows/syscall_windows.go
+++ b/vendor/golang.org/x/sys/windows/syscall_windows.go
@@ -138,13 +138,7 @@ func UTF16PtrToString(p *uint16) string {
ptr = unsafe.Pointer(uintptr(ptr) + unsafe.Sizeof(*p))
}
- var s []uint16
- h := (*unsafeheader.Slice)(unsafe.Pointer(&s))
- h.Data = unsafe.Pointer(p)
- h.Len = n
- h.Cap = n
-
- return string(utf16.Decode(s))
+ return string(utf16.Decode(unsafe.Slice(p, n)))
}
func Getpagesize() int { return 4096 }
@@ -364,6 +358,15 @@ func NewCallbackCDecl(fn interface{}) uintptr {
//sys SetCommTimeouts(handle Handle, timeouts *CommTimeouts) (err error)
//sys GetActiveProcessorCount(groupNumber uint16) (ret uint32)
//sys GetMaximumProcessorCount(groupNumber uint16) (ret uint32)
+//sys EnumWindows(enumFunc uintptr, param unsafe.Pointer) (err error) = user32.EnumWindows
+//sys EnumChildWindows(hwnd HWND, enumFunc uintptr, param unsafe.Pointer) = user32.EnumChildWindows
+//sys GetClassName(hwnd HWND, className *uint16, maxCount int32) (copied int32, err error) = user32.GetClassNameW
+//sys GetDesktopWindow() (hwnd HWND) = user32.GetDesktopWindow
+//sys GetForegroundWindow() (hwnd HWND) = user32.GetForegroundWindow
+//sys IsWindow(hwnd HWND) (isWindow bool) = user32.IsWindow
+//sys IsWindowUnicode(hwnd HWND) (isUnicode bool) = user32.IsWindowUnicode
+//sys IsWindowVisible(hwnd HWND) (isVisible bool) = user32.IsWindowVisible
+//sys GetGUIThreadInfo(thread uint32, info *GUIThreadInfo) (err error) = user32.GetGUIThreadInfo
// Volume Management Functions
//sys DefineDosDevice(flags uint32, deviceName *uint16, targetPath *uint16) (err error) = DefineDosDeviceW
@@ -439,6 +442,10 @@ func NewCallbackCDecl(fn interface{}) uintptr {
//sys RtlAddFunctionTable(functionTable *RUNTIME_FUNCTION, entryCount uint32, baseAddress uintptr) (ret bool) = ntdll.RtlAddFunctionTable
//sys RtlDeleteFunctionTable(functionTable *RUNTIME_FUNCTION) (ret bool) = ntdll.RtlDeleteFunctionTable
+// Desktop Window Manager API (Dwmapi)
+//sys DwmGetWindowAttribute(hwnd HWND, attribute uint32, value unsafe.Pointer, size uint32) (ret error) = dwmapi.DwmGetWindowAttribute
+//sys DwmSetWindowAttribute(hwnd HWND, attribute uint32, value unsafe.Pointer, size uint32) (ret error) = dwmapi.DwmSetWindowAttribute
+
// syscall interface implementation for other packages
// GetCurrentProcess returns the handle for the current process.
diff --git a/vendor/golang.org/x/sys/windows/types_windows.go b/vendor/golang.org/x/sys/windows/types_windows.go
index f9eaca528..0c4add974 100644
--- a/vendor/golang.org/x/sys/windows/types_windows.go
+++ b/vendor/golang.org/x/sys/windows/types_windows.go
@@ -3213,3 +3213,48 @@ type ModuleInfo struct {
}
const ALL_PROCESSOR_GROUPS = 0xFFFF
+
+type Rect struct {
+ Left int32
+ Top int32
+ Right int32
+ Bottom int32
+}
+
+type GUIThreadInfo struct {
+ Size uint32
+ Flags uint32
+ Active HWND
+ Focus HWND
+ Capture HWND
+ MenuOwner HWND
+ MoveSize HWND
+ CaretHandle HWND
+ CaretRect Rect
+}
+
+const (
+ DWMWA_NCRENDERING_ENABLED = 1
+ DWMWA_NCRENDERING_POLICY = 2
+ DWMWA_TRANSITIONS_FORCEDISABLED = 3
+ DWMWA_ALLOW_NCPAINT = 4
+ DWMWA_CAPTION_BUTTON_BOUNDS = 5
+ DWMWA_NONCLIENT_RTL_LAYOUT = 6
+ DWMWA_FORCE_ICONIC_REPRESENTATION = 7
+ DWMWA_FLIP3D_POLICY = 8
+ DWMWA_EXTENDED_FRAME_BOUNDS = 9
+ DWMWA_HAS_ICONIC_BITMAP = 10
+ DWMWA_DISALLOW_PEEK = 11
+ DWMWA_EXCLUDED_FROM_PEEK = 12
+ DWMWA_CLOAK = 13
+ DWMWA_CLOAKED = 14
+ DWMWA_FREEZE_REPRESENTATION = 15
+ DWMWA_PASSIVE_UPDATE_MODE = 16
+ DWMWA_USE_HOSTBACKDROPBRUSH = 17
+ DWMWA_USE_IMMERSIVE_DARK_MODE = 20
+ DWMWA_WINDOW_CORNER_PREFERENCE = 33
+ DWMWA_BORDER_COLOR = 34
+ DWMWA_CAPTION_COLOR = 35
+ DWMWA_TEXT_COLOR = 36
+ DWMWA_VISIBLE_FRAME_BORDER_THICKNESS = 37
+)
diff --git a/vendor/golang.org/x/sys/windows/zsyscall_windows.go b/vendor/golang.org/x/sys/windows/zsyscall_windows.go
index 52d4742cb..96ba8559c 100644
--- a/vendor/golang.org/x/sys/windows/zsyscall_windows.go
+++ b/vendor/golang.org/x/sys/windows/zsyscall_windows.go
@@ -40,6 +40,7 @@ var (
modadvapi32 = NewLazySystemDLL("advapi32.dll")
modcrypt32 = NewLazySystemDLL("crypt32.dll")
moddnsapi = NewLazySystemDLL("dnsapi.dll")
+ moddwmapi = NewLazySystemDLL("dwmapi.dll")
modiphlpapi = NewLazySystemDLL("iphlpapi.dll")
modkernel32 = NewLazySystemDLL("kernel32.dll")
modmswsock = NewLazySystemDLL("mswsock.dll")
@@ -175,6 +176,8 @@ var (
procDnsNameCompare_W = moddnsapi.NewProc("DnsNameCompare_W")
procDnsQuery_W = moddnsapi.NewProc("DnsQuery_W")
procDnsRecordListFree = moddnsapi.NewProc("DnsRecordListFree")
+ procDwmGetWindowAttribute = moddwmapi.NewProc("DwmGetWindowAttribute")
+ procDwmSetWindowAttribute = moddwmapi.NewProc("DwmSetWindowAttribute")
procGetAdaptersAddresses = modiphlpapi.NewProc("GetAdaptersAddresses")
procGetAdaptersInfo = modiphlpapi.NewProc("GetAdaptersInfo")
procGetBestInterfaceEx = modiphlpapi.NewProc("GetBestInterfaceEx")
@@ -444,9 +447,18 @@ var (
procCommandLineToArgvW = modshell32.NewProc("CommandLineToArgvW")
procSHGetKnownFolderPath = modshell32.NewProc("SHGetKnownFolderPath")
procShellExecuteW = modshell32.NewProc("ShellExecuteW")
+ procEnumChildWindows = moduser32.NewProc("EnumChildWindows")
+ procEnumWindows = moduser32.NewProc("EnumWindows")
procExitWindowsEx = moduser32.NewProc("ExitWindowsEx")
+ procGetClassNameW = moduser32.NewProc("GetClassNameW")
+ procGetDesktopWindow = moduser32.NewProc("GetDesktopWindow")
+ procGetForegroundWindow = moduser32.NewProc("GetForegroundWindow")
+ procGetGUIThreadInfo = moduser32.NewProc("GetGUIThreadInfo")
procGetShellWindow = moduser32.NewProc("GetShellWindow")
procGetWindowThreadProcessId = moduser32.NewProc("GetWindowThreadProcessId")
+ procIsWindow = moduser32.NewProc("IsWindow")
+ procIsWindowUnicode = moduser32.NewProc("IsWindowUnicode")
+ procIsWindowVisible = moduser32.NewProc("IsWindowVisible")
procMessageBoxW = moduser32.NewProc("MessageBoxW")
procCreateEnvironmentBlock = moduserenv.NewProc("CreateEnvironmentBlock")
procDestroyEnvironmentBlock = moduserenv.NewProc("DestroyEnvironmentBlock")
@@ -1525,6 +1537,22 @@ func DnsRecordListFree(rl *DNSRecord, freetype uint32) {
return
}
+func DwmGetWindowAttribute(hwnd HWND, attribute uint32, value unsafe.Pointer, size uint32) (ret error) {
+ r0, _, _ := syscall.Syscall6(procDwmGetWindowAttribute.Addr(), 4, uintptr(hwnd), uintptr(attribute), uintptr(value), uintptr(size), 0, 0)
+ if r0 != 0 {
+ ret = syscall.Errno(r0)
+ }
+ return
+}
+
+func DwmSetWindowAttribute(hwnd HWND, attribute uint32, value unsafe.Pointer, size uint32) (ret error) {
+ r0, _, _ := syscall.Syscall6(procDwmSetWindowAttribute.Addr(), 4, uintptr(hwnd), uintptr(attribute), uintptr(value), uintptr(size), 0, 0)
+ if r0 != 0 {
+ ret = syscall.Errno(r0)
+ }
+ return
+}
+
func GetAdaptersAddresses(family uint32, flags uint32, reserved uintptr, adapterAddresses *IpAdapterAddresses, sizePointer *uint32) (errcode error) {
r0, _, _ := syscall.Syscall6(procGetAdaptersAddresses.Addr(), 5, uintptr(family), uintptr(flags), uintptr(reserved), uintptr(unsafe.Pointer(adapterAddresses)), uintptr(unsafe.Pointer(sizePointer)), 0)
if r0 != 0 {
@@ -3802,6 +3830,19 @@ func ShellExecute(hwnd Handle, verb *uint16, file *uint16, args *uint16, cwd *ui
return
}
+func EnumChildWindows(hwnd HWND, enumFunc uintptr, param unsafe.Pointer) {
+ syscall.Syscall(procEnumChildWindows.Addr(), 3, uintptr(hwnd), uintptr(enumFunc), uintptr(param))
+ return
+}
+
+func EnumWindows(enumFunc uintptr, param unsafe.Pointer) (err error) {
+ r1, _, e1 := syscall.Syscall(procEnumWindows.Addr(), 2, uintptr(enumFunc), uintptr(param), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
func ExitWindowsEx(flags uint32, reason uint32) (err error) {
r1, _, e1 := syscall.Syscall(procExitWindowsEx.Addr(), 2, uintptr(flags), uintptr(reason), 0)
if r1 == 0 {
@@ -3810,6 +3851,35 @@ func ExitWindowsEx(flags uint32, reason uint32) (err error) {
return
}
+func GetClassName(hwnd HWND, className *uint16, maxCount int32) (copied int32, err error) {
+ r0, _, e1 := syscall.Syscall(procGetClassNameW.Addr(), 3, uintptr(hwnd), uintptr(unsafe.Pointer(className)), uintptr(maxCount))
+ copied = int32(r0)
+ if copied == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func GetDesktopWindow() (hwnd HWND) {
+ r0, _, _ := syscall.Syscall(procGetDesktopWindow.Addr(), 0, 0, 0, 0)
+ hwnd = HWND(r0)
+ return
+}
+
+func GetForegroundWindow() (hwnd HWND) {
+ r0, _, _ := syscall.Syscall(procGetForegroundWindow.Addr(), 0, 0, 0, 0)
+ hwnd = HWND(r0)
+ return
+}
+
+func GetGUIThreadInfo(thread uint32, info *GUIThreadInfo) (err error) {
+ r1, _, e1 := syscall.Syscall(procGetGUIThreadInfo.Addr(), 2, uintptr(thread), uintptr(unsafe.Pointer(info)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
func GetShellWindow() (shellWindow HWND) {
r0, _, _ := syscall.Syscall(procGetShellWindow.Addr(), 0, 0, 0, 0)
shellWindow = HWND(r0)
@@ -3825,6 +3895,24 @@ func GetWindowThreadProcessId(hwnd HWND, pid *uint32) (tid uint32, err error) {
return
}
+func IsWindow(hwnd HWND) (isWindow bool) {
+ r0, _, _ := syscall.Syscall(procIsWindow.Addr(), 1, uintptr(hwnd), 0, 0)
+ isWindow = r0 != 0
+ return
+}
+
+func IsWindowUnicode(hwnd HWND) (isUnicode bool) {
+ r0, _, _ := syscall.Syscall(procIsWindowUnicode.Addr(), 1, uintptr(hwnd), 0, 0)
+ isUnicode = r0 != 0
+ return
+}
+
+func IsWindowVisible(hwnd HWND) (isVisible bool) {
+ r0, _, _ := syscall.Syscall(procIsWindowVisible.Addr(), 1, uintptr(hwnd), 0, 0)
+ isVisible = r0 != 0
+ return
+}
+
func MessageBox(hwnd HWND, text *uint16, caption *uint16, boxtype uint32) (ret int32, err error) {
r0, _, e1 := syscall.Syscall6(procMessageBoxW.Addr(), 4, uintptr(hwnd), uintptr(unsafe.Pointer(text)), uintptr(unsafe.Pointer(caption)), uintptr(boxtype), 0, 0)
ret = int32(r0)
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 04c22c1c9..58dcf0196 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -97,7 +97,7 @@ github.com/containernetworking/cni/pkg/version
# github.com/containernetworking/plugins v1.1.1
## explicit; go 1.17
github.com/containernetworking/plugins/pkg/ns
-# github.com/containers/buildah v1.27.1-0.20220921131114-d3064796af36
+# github.com/containers/buildah v1.28.0
## explicit; go 1.17
github.com/containers/buildah
github.com/containers/buildah/bind
@@ -120,7 +120,7 @@ github.com/containers/buildah/pkg/rusage
github.com/containers/buildah/pkg/sshagent
github.com/containers/buildah/pkg/util
github.com/containers/buildah/util
-# github.com/containers/common v0.49.2-0.20220926195839-590004b80685
+# github.com/containers/common v0.50.1
## explicit; go 1.17
github.com/containers/common/libimage
github.com/containers/common/libimage/define
@@ -174,7 +174,7 @@ github.com/containers/common/version
# github.com/containers/conmon v2.0.20+incompatible
## explicit
github.com/containers/conmon/runner/config
-# github.com/containers/image/v5 v5.22.1-0.20220919112403-fe51f7ffca50
+# github.com/containers/image/v5 v5.23.0
## explicit; go 1.17
github.com/containers/image/v5/copy
github.com/containers/image/v5/directory
@@ -266,7 +266,7 @@ github.com/containers/psgo/internal/dev
github.com/containers/psgo/internal/host
github.com/containers/psgo/internal/proc
github.com/containers/psgo/internal/process
-# github.com/containers/storage v1.42.1-0.20220919112236-8a581aac3bdf
+# github.com/containers/storage v1.43.0
## explicit; go 1.16
github.com/containers/storage
github.com/containers/storage/drivers
@@ -388,8 +388,8 @@ github.com/docker/docker/pkg/parsers
github.com/docker/docker/pkg/pools
github.com/docker/docker/pkg/stdcopy
github.com/docker/docker/pkg/system
-# github.com/docker/docker-credential-helpers v0.6.4
-## explicit; go 1.13
+# github.com/docker/docker-credential-helpers v0.7.0
+## explicit; go 1.18
github.com/docker/docker-credential-helpers/client
github.com/docker/docker-credential-helpers/credentials
# github.com/docker/go-connections v0.4.1-0.20210727194412-58542c764a11
@@ -488,7 +488,7 @@ github.com/jinzhu/copier
# github.com/json-iterator/go v1.1.12
## explicit; go 1.12
github.com/json-iterator/go
-# github.com/klauspost/compress v1.15.10
+# github.com/klauspost/compress v1.15.11
## explicit; go 1.17
github.com/klauspost/compress
github.com/klauspost/compress/flate
@@ -498,7 +498,7 @@ github.com/klauspost/compress/internal/cpuinfo
github.com/klauspost/compress/internal/snapref
github.com/klauspost/compress/zstd
github.com/klauspost/compress/zstd/internal/xxhash
-# github.com/klauspost/pgzip v1.2.5
+# github.com/klauspost/pgzip v1.2.6-0.20220930104621-17e8dac29df8
## explicit
github.com/klauspost/pgzip
# github.com/kr/fs v0.1.0
@@ -611,8 +611,8 @@ github.com/onsi/gomega/types
# github.com/opencontainers/go-digest v1.0.0
## explicit; go 1.13
github.com/opencontainers/go-digest
-# github.com/opencontainers/image-spec v1.0.3-0.20220114050600-8b9d41f48198
-## explicit; go 1.11
+# github.com/opencontainers/image-spec v1.1.0-rc2
+## explicit; go 1.17
github.com/opencontainers/image-spec/specs-go
github.com/opencontainers/image-spec/specs-go/v1
# github.com/opencontainers/runc v1.1.4 => github.com/opencontainers/runc v1.1.1-0.20220617142545-8b9452f75cbc
@@ -638,7 +638,7 @@ github.com/opencontainers/runtime-tools/generate
github.com/opencontainers/runtime-tools/generate/seccomp
github.com/opencontainers/runtime-tools/specerror
github.com/opencontainers/runtime-tools/validate
-# github.com/opencontainers/selinux v1.10.1
+# github.com/opencontainers/selinux v1.10.2
## explicit; go 1.13
github.com/opencontainers/selinux/go-selinux
github.com/opencontainers/selinux/go-selinux/label
@@ -690,8 +690,8 @@ github.com/rootless-containers/rootlesskit/pkg/port/portutil
# github.com/seccomp/libseccomp-golang v0.10.0
## explicit; go 1.14
github.com/seccomp/libseccomp-golang
-# github.com/sigstore/sigstore v1.4.1
-## explicit; go 1.17
+# github.com/sigstore/sigstore v1.4.2
+## explicit; go 1.18
github.com/sigstore/sigstore/pkg/cryptoutils
github.com/sigstore/sigstore/pkg/signature
github.com/sigstore/sigstore/pkg/signature/options
@@ -713,7 +713,7 @@ github.com/stefanberger/go-pkcs11uri
## explicit; go 1.13
github.com/stretchr/testify/assert
github.com/stretchr/testify/require
-# github.com/sylabs/sif/v2 v2.7.2
+# github.com/sylabs/sif/v2 v2.8.0
## explicit; go 1.18
github.com/sylabs/sif/v2/pkg/sif
# github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635
@@ -722,7 +722,7 @@ github.com/syndtr/gocapability/capability
# github.com/tchap/go-patricia v2.3.0+incompatible
## explicit
github.com/tchap/go-patricia/patricia
-# github.com/theupdateframework/go-tuf v0.5.0
+# github.com/theupdateframework/go-tuf v0.5.1
## explicit; go 1.18
github.com/theupdateframework/go-tuf/encrypted
# github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399
@@ -784,7 +784,7 @@ go.opencensus.io/internal
go.opencensus.io/trace
go.opencensus.io/trace/internal
go.opencensus.io/trace/tracestate
-# golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90
+# golang.org/x/crypto v0.0.0-20220919173607-35f4265a4bc0
## explicit; go 1.17
golang.org/x/crypto/blowfish
golang.org/x/crypto/cast5
@@ -810,7 +810,7 @@ golang.org/x/crypto/ssh
golang.org/x/crypto/ssh/agent
golang.org/x/crypto/ssh/internal/bcrypt_pbkdf
golang.org/x/crypto/ssh/knownhosts
-# golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b
+# golang.org/x/net v0.0.0-20220909164309-bea034e7d591
## explicit; go 1.17
golang.org/x/net/context
golang.org/x/net/html
@@ -826,7 +826,7 @@ golang.org/x/net/trace
## explicit
golang.org/x/sync/errgroup
golang.org/x/sync/semaphore
-# golang.org/x/sys v0.0.0-20220909162455-aba9fc2a8ff2
+# golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8
## explicit; go 1.17
golang.org/x/sys/cpu
golang.org/x/sys/execabs