Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package kind for openSUSE:Factory checked in at 2025-02-16 22:42:30 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kind (Old) and /work/SRC/openSUSE:Factory/.kind.new.8181 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kind" Sun Feb 16 22:42:30 2025 rev:4 rq:1246193 version:0.27.0 Changes: -------- --- /work/SRC/openSUSE:Factory/kind/kind.changes 2024-12-17 19:24:31.108310561 +0100 +++ /work/SRC/openSUSE:Factory/.kind.new.8181/kind.changes 2025-02-16 22:51:04.050393870 +0100 @@ -1,0 +2,38 @@ +Sun Feb 16 08:51:43 UTC 2025 - opensuse_buildserv...@ojkastl.de + +- Update to version 0.27.0: + * version v0.27.0 + * update node image with latest base image + * bump local-path-storage to latest + * bump kindnetd to latest + * bump base image to latest + * bump go to 1.23.6 + * update default node image to 1.32.2 + * enhance push-node script + * bump base image with statically linked plugins + * Statically link CNI plugins + * replace dated intial design docs with a clear warning to not + depend on implementation details + * version test cleanup: don't mutate globals, use pre-computed + expected values + * Bump actions/setup-go from 5.2.0 to 5.3.0 in the actions group + * test: upgrade nerdctl to v2 + * TEST: v1.32.1 node image + * wait for containerd to be ready + * retry image pulls once, fail if that doesn't work + * doc: fix typo + * update to latest base image with containerd 2.0.2 + * update containerd to v2.0.2 + * Bump actions/upload-artifact from 4.5.0 to 4.6.0 in the actions + group + * Add description to delete cluster subcommands + * update shellescape to latest with new vanity import + * Bump actions/upload-artifact from 4.4.3 to 4.5.0 in the actions + group + * update install docs for v0.26.0 + * version v0.27.0-alpha + * fix push node having qemu setup reliably + * fix `kind get clusters` via nerdctl + * fix: remove NoArgs positional arguments validation + +------------------------------------------------------------------- Old: ---- kind-0.26.0.obscpio New: ---- kind-0.27.0.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kind.spec ++++++ --- /var/tmp/diff_new_pack.3HTUE0/_old 2025-02-16 22:51:05.294445672 +0100 +++ /var/tmp/diff_new_pack.3HTUE0/_new 2025-02-16 22:51:05.294445672 +0100 @@ -1,7 +1,7 @@ # # spec file for package kind # -# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,23 +16,24 @@ # -%define __arch_install_post export NO_BRP_STRIP_DEBUG=true - Name: kind -Version: 0.26.0 +Version: 0.27.0 Release: 0 Summary: Kubernetes IN Docker - local clusters for testing Kubernetes License: Apache-2.0 URL: https://github.com/kubernetes-sigs/kind/ Source: kind-%{version}.tar.gz Source1: vendor.tar.gz -BuildRequires: go >= 1.16 +BuildRequires: bash-completion +BuildRequires: fish +BuildRequires: go >= 1.17 +BuildRequires: zsh Requires: (docker or podman or nerdctl) %description -kind is a tool for running local Kubernetes clusters using Docker container "nodes". kind was primarily designed for testing Kubernetes itself, but may be used for local development or CI. - -If you have go 1.16+ and docker, podman or nerdctl installed go install sigs.k8s.io/kind@v0.22.0 && kind create cluster is all you need! +kind is a tool for running local Kubernetes clusters using Docker container +"nodes". kind was primarily designed for testing Kubernetes itself, but may be +used for local development or CI. %package -n %{name}-bash-completion Summary: Bash Completion for %{name} @@ -91,8 +92,8 @@ %{buildroot}/%{_bindir}/%{name} completion fish > %{buildroot}%{_datarootdir}/fish/vendor_completions.d/%{name}.fish # create the zsh completion file -mkdir -p %{buildroot}%{_datarootdir}/zsh_completion.d/ -%{buildroot}/%{_bindir}/%{name} completion zsh > %{buildroot}%{_datarootdir}/zsh_completion.d/_%{name} +mkdir -p %{buildroot}%{_datarootdir}/zsh/site-functions/ +%{buildroot}/%{_bindir}/%{name} completion zsh > %{buildroot}%{_datarootdir}/zsh/site-functions/_%{name} %files %doc README.md @@ -100,16 +101,11 @@ %{_bindir}/%{name} %files -n %{name}-bash-completion -%dir %{_datarootdir}/bash-completion/completions/ %{_datarootdir}/bash-completion/completions/%{name} %files -n %{name}-fish-completion -%dir %{_datarootdir}/fish -%dir %{_datarootdir}/fish/vendor_completions.d %{_datarootdir}/fish/vendor_completions.d/%{name}.fish %files -n %{name}-zsh-completion -%defattr(-,root,root) -%dir %{_datarootdir}/zsh_completion.d/ -%{_datarootdir}/zsh_completion.d/_%{name} +%{_datarootdir}/zsh/site-functions/_%{name} ++++++ _service ++++++ --- /var/tmp/diff_new_pack.3HTUE0/_old 2025-02-16 22:51:05.330447171 +0100 +++ /var/tmp/diff_new_pack.3HTUE0/_new 2025-02-16 22:51:05.338447504 +0100 @@ -3,7 +3,7 @@ <param name="url">https://github.com/kubernetes-sigs/kind/</param> <param name="scm">git</param> <param name="exclude">.git</param> - <param name="revision">v0.26.0</param> + <param name="revision">v0.27.0</param> <param name="versionformat">@PARENT_TAG@</param> <param name="changesgenerate">enable</param> <param name="versionrewrite-pattern">v(.*)</param> ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.3HTUE0/_old 2025-02-16 22:51:05.362448504 +0100 +++ /var/tmp/diff_new_pack.3HTUE0/_new 2025-02-16 22:51:05.366448671 +0100 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/kubernetes-sigs/kind/</param> - <param name="changesrevision">c5f516c8b2c4927232074381c980467e393cf965</param></service></servicedata> + <param name="changesrevision">6cb934219ac54aa0ddb1d8313adc05304421ccb6</param></service></servicedata> (No newline at EOF) ++++++ kind-0.26.0.obscpio -> kind-0.27.0.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kind-0.26.0/.github/workflows/docker.yaml new/kind-0.27.0/.github/workflows/docker.yaml --- old/kind-0.26.0/.github/workflows/docker.yaml 2024-12-16 22:54:05.000000000 +0100 +++ new/kind-0.27.0/.github/workflows/docker.yaml 2025-02-15 01:44:56.000000000 +0100 @@ -75,7 +75,7 @@ - name: Upload logs if: always() - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 with: name: kind-logs-${{ env.JOB_NAME }}-${{ github.run_id }} path: /tmp/kind/logs diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kind-0.26.0/.github/workflows/nerdctl.yaml new/kind-0.27.0/.github/workflows/nerdctl.yaml --- old/kind-0.26.0/.github/workflows/nerdctl.yaml 2024-12-16 22:54:05.000000000 +0100 +++ new/kind-0.27.0/.github/workflows/nerdctl.yaml 2025-02-15 01:44:56.000000000 +0100 @@ -26,7 +26,7 @@ env: JOB_NAME: "nerdctl-${{ matrix.deployment }}-${{ matrix.ipFamily }}" IP_FAMILY: ${{ matrix.ipFamily }} - NERDCTL_VERSION: "1.7.4" + NERDCTL_VERSION: "2.0.2" KIND_EXPERIMENTAL_PROVIDER: "nerdctl" steps: - name: Check out code into the Go module directory @@ -91,14 +91,14 @@ - name: Export logs if: always() run: | - sudo cat /etc/cni/net.d/* + sudo find /etc/cni/net.d/ -type f -exec sh -c 'echo "{}" && cat "{}"' \; sudo mkdir -p /tmp/kind/logs sudo /usr/local/bin/kind export logs /tmp/kind/logs sudo chown -R $USER:$USER /tmp/kind/logs - name: Upload logs if: always() - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 with: name: kind-logs-${{ env.JOB_NAME }}-${{ github.run_id }} path: /tmp/kind/logs diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kind-0.26.0/.github/workflows/podman.yml new/kind-0.27.0/.github/workflows/podman.yml --- old/kind-0.26.0/.github/workflows/podman.yml 2024-12-16 22:54:05.000000000 +0100 +++ new/kind-0.27.0/.github/workflows/podman.yml 2025-02-15 01:44:56.000000000 +0100 @@ -101,7 +101,7 @@ - name: Upload logs if: always() - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 with: name: kind-logs-${{ env.JOB_NAME }}-${{ github.run_id }} path: /tmp/kind/logs diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kind-0.26.0/.github/workflows/vm.yaml new/kind-0.27.0/.github/workflows/vm.yaml --- old/kind-0.26.0/.github/workflows/vm.yaml 2024-12-16 22:54:05.000000000 +0100 +++ new/kind-0.27.0/.github/workflows/vm.yaml 2025-02-15 01:44:56.000000000 +0100 @@ -39,7 +39,7 @@ - name: Set up Go id: go - uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 + uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0 with: go-version: ${{ steps.golangversion.outputs.go_version }} check-latest: true @@ -127,7 +127,7 @@ - name: Upload logs if: always() - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 with: name: kind-logs-${{ env.JOB_NAME }}-${{ github.run_id }} path: /tmp/kind/logs diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kind-0.26.0/.go-version new/kind-0.27.0/.go-version --- old/kind-0.26.0/.go-version 2024-12-16 22:54:05.000000000 +0100 +++ new/kind-0.27.0/.go-version 2025-02-15 01:44:56.000000000 +0100 @@ -1 +1 @@ -1.23.4 +1.23.6 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kind-0.26.0/README.md new/kind-0.27.0/README.md --- old/kind-0.26.0/README.md 2024-12-16 22:54:05.000000000 +0100 +++ new/kind-0.27.0/README.md 2025-02-15 01:44:56.000000000 +0100 @@ -5,7 +5,7 @@ kind is a tool for running local Kubernetes clusters using Docker container "nodes". kind was primarily designed for testing Kubernetes itself, but may be used for local development or CI. -If you have [go] 1.16+ and [docker], [podman] or [nerdctl] installed `go install sigs.k8s.io/kind@v0.25.0 && kind create cluster` is all you need! +If you have [go] 1.16+ and [docker], [podman] or [nerdctl] installed `go install sigs.k8s.io/kind@v0.26.0 && kind create cluster` is all you need!  @@ -23,7 +23,7 @@ For a complete [install guide] see [the documentation here][install guide]. -You can install kind with `go install sigs.k8s.io/kind@v0.25.0`. +You can install kind with `go install sigs.k8s.io/kind@v0.26.0`. **NOTE**: please use the latest go to do this. KIND is developed with the latest stable go, see [`.go-version`](./.go-version) for the exact version we're using. @@ -43,9 +43,9 @@ ```console # For AMD64 / x86_64 -[ $(uname -m) = x86_64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.25.0/kind-$(uname)-amd64 +[ $(uname -m) = x86_64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.26.0/kind-$(uname)-amd64 # For ARM64 -[ $(uname -m) = aarch64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.25.0/kind-$(uname)-arm64 +[ $(uname -m) = aarch64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.26.0/kind-$(uname)-arm64 chmod +x ./kind sudo mv ./kind /usr/local/bin/kind ``` @@ -66,9 +66,9 @@ ```console # For Intel Macs -[ $(uname -m) = x86_64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.25.0/kind-darwin-amd64 +[ $(uname -m) = x86_64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.26.0/kind-darwin-amd64 # For M1 / ARM Macs -[ $(uname -m) = arm64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.25.0/kind-darwin-arm64 +[ $(uname -m) = arm64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.26.0/kind-darwin-arm64 chmod +x ./kind mv ./kind /some-dir-in-your-PATH/kind ``` @@ -76,7 +76,7 @@ On Windows: ```powershell -curl.exe -Lo kind-windows-amd64.exe https://kind.sigs.k8s.io/dl/v0.25.0/kind-windows-amd64 +curl.exe -Lo kind-windows-amd64.exe https://kind.sigs.k8s.io/dl/v0.26.0/kind-windows-amd64 Move-Item .\kind-windows-amd64.exe c:\some-dir-in-your-PATH\kind.exe # OR via Chocolatey (https://chocolatey.org/packages/kind) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kind-0.26.0/go.mod new/kind-0.27.0/go.mod --- old/kind-0.26.0/go.mod 2024-12-16 22:54:05.000000000 +0100 +++ new/kind-0.27.0/go.mod 2025-02-15 01:44:56.000000000 +0100 @@ -11,8 +11,8 @@ go 1.17 require ( + al.essio.dev/pkg/shellescape v1.5.1 github.com/BurntSushi/toml v1.4.0 - github.com/alessio/shellescape v1.4.2 github.com/evanphx/json-patch/v5 v5.6.0 github.com/google/safetext v0.0.0-20220905092116-b49f7bc46da2 github.com/mattn/go-isatty v0.0.20 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kind-0.26.0/go.sum new/kind-0.27.0/go.sum --- old/kind-0.26.0/go.sum 2024-12-16 22:54:05.000000000 +0100 +++ new/kind-0.27.0/go.sum 2025-02-15 01:44:56.000000000 +0100 @@ -1,7 +1,7 @@ +al.essio.dev/pkg/shellescape v1.5.1 h1:86HrALUujYS/h+GtqoB26SBEdkWfmMI6FubjXlsXyho= +al.essio.dev/pkg/shellescape v1.5.1/go.mod h1:6sIqp7X2P6mThCQ7twERpZTuigpr6KbZWtls1U8I890= github.com/BurntSushi/toml v1.4.0 h1:kuoIxZQy2WRRk1pttg9asf+WVv6tWQuBNVmK8+nqPr0= github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= -github.com/alessio/shellescape v1.4.2 h1:MHPfaU+ddJ0/bYWpgIeUnQUqKrlJ1S7BfEYPM4uEoM0= -github.com/alessio/shellescape v1.4.2/go.mod h1:PZAiSCk0LJaZkiCSkPv8qIobYglO3FPpyFjDCtHLS30= github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= @@ -10,6 +10,8 @@ github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/safetext v0.0.0-20220905092116-b49f7bc46da2 h1:SJ+NtwL6QaZ21U+IrK7d0gGgpjGGvd2kz+FzTHVzdqI= github.com/google/safetext v0.0.0-20220905092116-b49f7bc46da2/go.mod h1:Tv1PlzqC9t8wNnpPdctvtSUOPUUg4SHeE6vR1Ir2hmg= +github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= +github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kind-0.26.0/hack/build/init-buildx.sh new/kind-0.27.0/hack/build/init-buildx.sh --- old/kind-0.26.0/hack/build/init-buildx.sh 2024-12-16 22:54:05.000000000 +0100 +++ new/kind-0.27.0/hack/build/init-buildx.sh 2025-02-15 01:44:56.000000000 +0100 @@ -15,6 +15,7 @@ set -o errexit -o nounset -o pipefail +# TODO: newer buildx releases ship their own qemu copies and don't need any of this # We can skip setup if the current builder already has multi-arch # AND if it isn't the docker driver, which doesn't work current_builder="$(docker buildx inspect)" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kind-0.26.0/hack/release/build/push-node.sh new/kind-0.27.0/hack/release/build/push-node.sh --- old/kind-0.26.0/hack/release/build/push-node.sh 2024-12-16 22:54:05.000000000 +0100 +++ new/kind-0.27.0/hack/release/build/push-node.sh 2025-02-15 01:44:56.000000000 +0100 @@ -28,8 +28,9 @@ # path to kubernetes sources KUBEROOT="${KUBEROOT:-"$(go env GOPATH)"/src/k8s.io/kubernetes}" -# ensure we have qemu setup (de-duped logic with setting up buildx for multi-arch) -"${REPO_ROOT}/hack/build/init-buildx.sh" +# ensure we have qemu setup so we can run cross-arch images +# TODO: dedupe specifying this image? +docker run --rm --privileged tonistiigi/binfmt:qemu-v7.0.0-28@sha256:66e11bea77a5ea9d6f0fe79b57cd2b189b5d15b93a2bdb925be22949232e4e55 --install all # NOTE: adding platforms is costly in terms of build time # we will consider expanding this in the future, for now the aim is to prove diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kind-0.26.0/hack/release/push-node.sh new/kind-0.27.0/hack/release/push-node.sh --- old/kind-0.26.0/hack/release/push-node.sh 2024-12-16 22:54:05.000000000 +0100 +++ new/kind-0.27.0/hack/release/push-node.sh 2025-02-15 01:44:56.000000000 +0100 @@ -25,13 +25,20 @@ REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." &> /dev/null && pwd -P)" cd "${REPO_ROOT}" -VERSION="$1" +VERSION="${1:-}" +if [[ -z "${VERSION}" ]]; then + echo >&2 "version argument not supplied, looking up current stable ..." + VERSION="$(curl -sL https://dl.k8s.io/release/stable.txt)" +fi +echo >&2 "will build node image for Kubernetes ${VERSION} ..." # ensure we have up to date kind +echo >&2 "building kind ..." make build # ensure we have qemu setup so we can run cross-arch images # TODO: dedupe specifying this image? +echo >&2 "ensuring binfmt_misc ..." docker run --rm --privileged tonistiigi/binfmt:qemu-v7.0.0-28@sha256:66e11bea77a5ea9d6f0fe79b57cd2b189b5d15b93a2bdb925be22949232e4e55 --install all # NOTE: adding platforms is costly in terms of build time @@ -48,6 +55,7 @@ images=() for arch in "${__arches__[@]}"; do image="${REGISTRY}/${IMAGE_NAME}-${arch}:${VERSION}" + echo >&2 "building ${image} ..." "${REPO_ROOT}/bin/kind" build node-image --image="${image}" --arch="${arch}" "${VERSION}" images+=("${image}") done diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kind-0.26.0/images/base/Dockerfile new/kind-0.27.0/images/base/Dockerfile --- old/kind-0.26.0/images/base/Dockerfile 2024-12-16 22:54:05.000000000 +0100 +++ new/kind-0.27.0/images/base/Dockerfile 2025-02-15 01:44:56.000000000 +0100 @@ -122,7 +122,7 @@ # stage for building containerd FROM go-build AS build-containerd ARG TARGETARCH GO_VERSION -ARG CONTAINERD_VERSION="v1.7.24" +ARG CONTAINERD_VERSION="v2.0.2" ARG CONTAINERD_CLONE_URL="https://github.com/containerd/containerd" # we don't build with optional snapshotters, we never select any of these # they're not ideal inside kind anyhow, and we save some disk space @@ -176,7 +176,7 @@ && eval "$(gimme "${GO_VERSION}")" \ && export GOTOOLCHAIN="go${GO_VERSION}" \ && mkdir ./bin \ - && export GOARCH=$TARGETARCH && export CC=$(target-cc) && export CGO_ENABLED=1 \ + && export GOARCH=$TARGETARCH && export CC=$(target-cc) && export CGO_ENABLED=0 \ && go build -o ./bin/host-local -mod=vendor ./plugins/ipam/host-local \ && go build -o ./bin/loopback -mod=vendor ./plugins/main/loopback \ && go build -o ./bin/ptp -mod=vendor ./plugins/main/ptp \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kind-0.26.0/pkg/apis/config/defaults/image.go new/kind-0.27.0/pkg/apis/config/defaults/image.go --- old/kind-0.26.0/pkg/apis/config/defaults/image.go 2024-12-16 22:54:05.000000000 +0100 +++ new/kind-0.27.0/pkg/apis/config/defaults/image.go 2025-02-15 01:44:56.000000000 +0100 @@ -18,4 +18,4 @@ package defaults // Image is the default for the Config.Image field, aka the default node image. -const Image = "kindest/node:v1.32.0@sha256:c48c62eac5da28cdadcf560d1d8616cfa6783b58f0d94cf63ad1bf49600cb027" +const Image = "kindest/node:v1.32.2@sha256:f226345927d7e348497136874b6d207e0b32cc52154ad8323129352923a3142f" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kind-0.26.0/pkg/build/nodeimage/buildcontext.go new/kind-0.27.0/pkg/build/nodeimage/buildcontext.go --- old/kind-0.26.0/pkg/build/nodeimage/buildcontext.go 2024-12-16 22:54:05.000000000 +0100 +++ new/kind-0.27.0/pkg/build/nodeimage/buildcontext.go 2025-02-15 01:44:56.000000000 +0100 @@ -267,18 +267,27 @@ }() fns := []func() error{} + osArch := dockerBuildOsAndArch(c.arch) for _, image := range requiredImages { image := image // https://golang.org/doc/faq#closures_and_goroutines - fns = append(fns, func() error { - if !builtImages.Has(image) { - if err = importer.Pull(image, dockerBuildOsAndArch(c.arch)); err != nil { + if !builtImages.Has(image) { + fns = append(fns, func() error { + if err = importer.Pull(image, osArch); err != nil { c.logger.Warnf("Failed to pull %s with error: %v", image, err) runE := exec.RunErrorForError(err) c.logger.Warn(string(runE.Output)) + c.logger.Warnf("Retrying %s pull after 1s ...", image) + time.Sleep(time.Second) + return importer.Pull(image, osArch) } - } - return nil - }) + return nil + }) + } + } + // Wait for containerd socket to be ready, which may take 1s when running under emulation + if err := importer.WaitForReady(); err != nil { + c.logger.Errorf("Image build failed, containerd did not become ready %v", err) + return nil, err } if err := errors.AggregateConcurrent(fns); err != nil { return nil, err diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kind-0.26.0/pkg/build/nodeimage/const_cni.go new/kind-0.27.0/pkg/build/nodeimage/const_cni.go --- old/kind-0.26.0/pkg/build/nodeimage/const_cni.go 2024-12-16 22:54:05.000000000 +0100 +++ new/kind-0.27.0/pkg/build/nodeimage/const_cni.go 2025-02-15 01:44:56.000000000 +0100 @@ -20,7 +20,7 @@ The default CNI manifest and images are our own tiny kindnet */ -const kindnetdImage = "docker.io/kindest/kindnetd:v20241212-9f82dd49" +const kindnetdImage = "docker.io/kindest/kindnetd:v20250214-acbabc1a" var defaultCNIImages = []string{kindnetdImage} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kind-0.26.0/pkg/build/nodeimage/const_storage.go new/kind-0.27.0/pkg/build/nodeimage/const_storage.go --- old/kind-0.26.0/pkg/build/nodeimage/const_storage.go 2024-12-16 22:54:05.000000000 +0100 +++ new/kind-0.27.0/pkg/build/nodeimage/const_storage.go 2025-02-15 01:44:56.000000000 +0100 @@ -26,7 +26,7 @@ - tolerate control plane scheduling taints */ -const storageProvisionerImage = "docker.io/kindest/local-path-provisioner:v20241212-8ac705d0" +const storageProvisionerImage = "docker.io/kindest/local-path-provisioner:v20250214-acbabc1a" const storageHelperImage = "docker.io/kindest/local-path-helper:v20241212-8ac705d0" // image we need to preload diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kind-0.26.0/pkg/build/nodeimage/defaults.go new/kind-0.27.0/pkg/build/nodeimage/defaults.go --- old/kind-0.26.0/pkg/build/nodeimage/defaults.go 2024-12-16 22:54:05.000000000 +0100 +++ new/kind-0.27.0/pkg/build/nodeimage/defaults.go 2025-02-15 01:44:56.000000000 +0100 @@ -22,4 +22,4 @@ // DefaultBaseImage is the default base image used // TODO: come up with a reasonable solution to digest pinning // https://github.com/moby/moby/issues/43188 -const DefaultBaseImage = "docker.io/kindest/base:v20241212-9f82dd49" +const DefaultBaseImage = "docker.io/kindest/base:v20250214-acbabc1a" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kind-0.26.0/pkg/build/nodeimage/imageimporter.go new/kind-0.27.0/pkg/build/nodeimage/imageimporter.go --- old/kind-0.26.0/pkg/build/nodeimage/imageimporter.go 2024-12-16 22:54:05.000000000 +0100 +++ new/kind-0.27.0/pkg/build/nodeimage/imageimporter.go 2025-02-15 01:44:56.000000000 +0100 @@ -19,6 +19,7 @@ import ( "io" + "sigs.k8s.io/kind/pkg/errors" "sigs.k8s.io/kind/pkg/exec" ) @@ -38,7 +39,28 @@ ).Run(); err != nil { return err } - // TODO(bentheelder): some healthcheck? + return nil +} + +func (c *containerdImporter) WaitForReady() error { + // ctr doesn't respect timeouts when the socket doesn't exist + // so we'll look for the socket to exist ourselves, THEN attempt ctr info + // TODO: we are assuming the socket path, and this is kind of hacky + if err := c.containerCmder.Command( + "bash", "-c", `set -e +# wait for socket to exist +for i in {0..3}; do + if [ -S /run/containerd/containerd.sock ]; then + break + fi + sleep "$i" +done +# check healthy +ctr info +`, + ).Run(); err != nil { + return errors.Wrap(err, "failed to wait for containerd to become ready") + } return nil } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kind-0.26.0/pkg/build/nodeimage/internal/kube/source.go new/kind-0.27.0/pkg/build/nodeimage/internal/kube/source.go --- old/kind-0.26.0/pkg/build/nodeimage/internal/kube/source.go 2024-12-16 22:54:05.000000000 +0100 +++ new/kind-0.27.0/pkg/build/nodeimage/internal/kube/source.go 2025-02-15 01:44:56.000000000 +0100 @@ -23,7 +23,7 @@ "path/filepath" "strings" - "github.com/alessio/shellescape" + "al.essio.dev/pkg/shellescape" "sigs.k8s.io/kind/pkg/errors" "sigs.k8s.io/kind/pkg/exec" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kind-0.26.0/pkg/cluster/internal/create/create.go new/kind-0.27.0/pkg/cluster/internal/create/create.go --- old/kind-0.26.0/pkg/cluster/internal/create/create.go 2024-12-16 22:54:05.000000000 +0100 +++ new/kind-0.27.0/pkg/cluster/internal/create/create.go 2025-02-15 01:44:56.000000000 +0100 @@ -21,7 +21,7 @@ "math/rand" "time" - "github.com/alessio/shellescape" + "al.essio.dev/pkg/shellescape" "sigs.k8s.io/kind/pkg/cluster/internal/delete" "sigs.k8s.io/kind/pkg/cluster/internal/providers" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kind-0.26.0/pkg/cluster/internal/logs/logs.go new/kind-0.27.0/pkg/cluster/internal/logs/logs.go --- old/kind-0.26.0/pkg/cluster/internal/logs/logs.go 2024-12-16 22:54:05.000000000 +0100 +++ new/kind-0.27.0/pkg/cluster/internal/logs/logs.go 2025-02-15 01:44:56.000000000 +0100 @@ -24,7 +24,7 @@ "path" "path/filepath" - "github.com/alessio/shellescape" + "al.essio.dev/pkg/shellescape" "sigs.k8s.io/kind/pkg/cluster/nodes" "sigs.k8s.io/kind/pkg/errors" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kind-0.26.0/pkg/cluster/internal/providers/nerdctl/provider.go new/kind-0.27.0/pkg/cluster/internal/providers/nerdctl/provider.go --- old/kind-0.26.0/pkg/cluster/internal/providers/nerdctl/provider.go 2024-12-16 22:54:05.000000000 +0100 +++ new/kind-0.27.0/pkg/cluster/internal/providers/nerdctl/provider.go 2025-02-15 01:44:56.000000000 +0100 @@ -125,7 +125,7 @@ // filter for nodes with the cluster label "--filter", "label="+clusterLabelKey, // format to include the cluster name - "--format", fmt.Sprintf(`{{index .Labels "%s"}}`, clusterLabelKey), + "--format", fmt.Sprintf(`{{.Label "%s"}}`, clusterLabelKey), ) lines, err := exec.OutputLines(cmd) if err != nil { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kind-0.26.0/pkg/cluster/nodeutils/util.go new/kind-0.27.0/pkg/cluster/nodeutils/util.go --- old/kind-0.26.0/pkg/cluster/nodeutils/util.go 2024-12-16 22:54:05.000000000 +0100 +++ new/kind-0.27.0/pkg/cluster/nodeutils/util.go 2025-02-15 01:44:56.000000000 +0100 @@ -19,6 +19,7 @@ import ( "bytes" "encoding/json" + "fmt" "io" "path" "strings" @@ -102,9 +103,24 @@ if err != nil { return "", errors.Wrap(err, "failed to detect containerd snapshotter") } - snapshotter, ok := parsed.GetPath([]string{"plugins", "io.containerd.grpc.v1.cri", "containerd", "snapshotter"}).(string) + configVersion, ok := parsed.Get("version").(int64) if !ok { - return "", errors.New("failed to detect containerd snapshotter") + return "", errors.New("failed to detect containerd config version") + } + var snapshotter string + switch configVersion { + case 2: // Introduced in containerd v1.3. Still supported in containerd v2. + snapshotter, ok = parsed.GetPath([]string{"plugins", "io.containerd.grpc.v1.cri", "containerd", "snapshotter"}).(string) + if !ok { + return "", errors.New("failed to detect containerd snapshotter (config version 2)") + } + case 3: // Introduced in containerd v2.0. + snapshotter, ok = parsed.GetPath([]string{"plugins", "io.containerd.cri.v1.images", "snapshotter"}).(string) + if !ok { + return "", errors.New("failed to detect containerd snapshotter (config version 3)") + } + default: + return "", fmt.Errorf("unknown containerd config version: %d (supported versions: 2 and 3)", configVersion) } return snapshotter, nil } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kind-0.26.0/pkg/cmd/kind/build/build.go new/kind-0.27.0/pkg/cmd/kind/build/build.go --- old/kind-0.26.0/pkg/cmd/kind/build/build.go 2024-12-16 22:54:05.000000000 +0100 +++ new/kind-0.27.0/pkg/cmd/kind/build/build.go 2025-02-15 01:44:56.000000000 +0100 @@ -30,7 +30,6 @@ // NewCommand returns a new cobra.Command for building func NewCommand(logger log.Logger, streams cmd.IOStreams) *cobra.Command { cmd := &cobra.Command{ - Args: cobra.NoArgs, // TODO(bentheelder): more detailed usage Use: "build", Short: "Build one of [node-image]", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kind-0.26.0/pkg/cmd/kind/completion/completion.go new/kind-0.27.0/pkg/cmd/kind/completion/completion.go --- old/kind-0.26.0/pkg/cmd/kind/completion/completion.go 2024-12-16 22:54:05.000000000 +0100 +++ new/kind-0.27.0/pkg/cmd/kind/completion/completion.go 2025-02-15 01:44:56.000000000 +0100 @@ -33,7 +33,6 @@ // NewCommand returns a new cobra.Command for cluster creation func NewCommand(logger log.Logger, streams cmd.IOStreams) *cobra.Command { cmd := &cobra.Command{ - Args: cobra.NoArgs, Use: "completion", Short: "Output shell completion code for the specified shell (bash, zsh or fish)", Long: longDescription, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kind-0.26.0/pkg/cmd/kind/create/create.go new/kind-0.27.0/pkg/cmd/kind/create/create.go --- old/kind-0.26.0/pkg/cmd/kind/create/create.go 2024-12-16 22:54:05.000000000 +0100 +++ new/kind-0.27.0/pkg/cmd/kind/create/create.go 2025-02-15 01:44:56.000000000 +0100 @@ -30,7 +30,6 @@ // NewCommand returns a new cobra.Command for cluster creation func NewCommand(logger log.Logger, streams cmd.IOStreams) *cobra.Command { cmd := &cobra.Command{ - Args: cobra.NoArgs, Use: "create", Short: "Creates one of [cluster]", Long: "Creates one of local Kubernetes cluster (cluster)", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kind-0.26.0/pkg/cmd/kind/delete/cluster/deletecluster.go new/kind-0.27.0/pkg/cmd/kind/delete/cluster/deletecluster.go --- old/kind-0.26.0/pkg/cmd/kind/delete/cluster/deletecluster.go 2024-12-16 22:54:05.000000000 +0100 +++ new/kind-0.27.0/pkg/cmd/kind/delete/cluster/deletecluster.go 2025-02-15 01:44:56.000000000 +0100 @@ -38,11 +38,17 @@ func NewCommand(logger log.Logger, streams cmd.IOStreams) *cobra.Command { flags := &flagpole{} cmd := &cobra.Command{ - Args: cobra.NoArgs, - // TODO(bentheelder): more detailed usage + Args: cobra.NoArgs, Use: "cluster", Short: "Deletes a cluster", - Long: "Deletes a resource", + Long: `Deletes a Kind cluster from the system. + +This is an idempotent operation, meaning it may be called multiple times without +failing (like "rm -f"). If the cluster resources exist they will be deleted, and +if the cluster is already gone it will just return success. + +Errors will only occur if the cluster resources exist and are not able to be deleted. +`, RunE: func(cmd *cobra.Command, args []string) error { cli.OverrideDefaultName(cmd.Flags()) return deleteCluster(logger, flags) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kind-0.26.0/pkg/cmd/kind/delete/clusters/deleteclusters.go new/kind-0.27.0/pkg/cmd/kind/delete/clusters/deleteclusters.go --- old/kind-0.26.0/pkg/cmd/kind/delete/clusters/deleteclusters.go 2024-12-16 22:54:05.000000000 +0100 +++ new/kind-0.27.0/pkg/cmd/kind/delete/clusters/deleteclusters.go 2025-02-15 01:44:56.000000000 +0100 @@ -37,11 +37,17 @@ func NewCommand(logger log.Logger, streams cmd.IOStreams) *cobra.Command { flags := &flagpole{} cmd := &cobra.Command{ - Args: cobra.MinimumNArgs(0), - // TODO(bentheelder): more detailed usage + Args: cobra.MinimumNArgs(0), Use: "clusters", Short: "Deletes one or more clusters", - Long: "Deletes a resource", + Long: `Deletes one or more Kind clusters from the system. + +This is an idempotent operation, meaning it may be called multiple times without +failing (like "rm -f"). If the cluster resources exist they will be deleted, and +if the cluster is already gone it will just return success. + +Errors will only occur if the cluster resources exist and are not able to be deleted. +`, RunE: func(cmd *cobra.Command, args []string) error { if !flags.All && len(args) == 0 { return errors.New("no cluster names provided") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kind-0.26.0/pkg/cmd/kind/delete/delete.go new/kind-0.27.0/pkg/cmd/kind/delete/delete.go --- old/kind-0.26.0/pkg/cmd/kind/delete/delete.go 2024-12-16 22:54:05.000000000 +0100 +++ new/kind-0.27.0/pkg/cmd/kind/delete/delete.go 2025-02-15 01:44:56.000000000 +0100 @@ -31,7 +31,6 @@ // NewCommand returns a new cobra.Command for cluster deletion func NewCommand(logger log.Logger, streams cmd.IOStreams) *cobra.Command { cmd := &cobra.Command{ - Args: cobra.NoArgs, // TODO(bentheelder): more detailed usage Use: "delete", Short: "Deletes one of [cluster]", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kind-0.26.0/pkg/cmd/kind/export/export.go new/kind-0.27.0/pkg/cmd/kind/export/export.go --- old/kind-0.26.0/pkg/cmd/kind/export/export.go 2024-12-16 22:54:05.000000000 +0100 +++ new/kind-0.27.0/pkg/cmd/kind/export/export.go 2025-02-15 01:44:56.000000000 +0100 @@ -31,7 +31,6 @@ // NewCommand returns a new cobra.Command for export func NewCommand(logger log.Logger, streams cmd.IOStreams) *cobra.Command { cmd := &cobra.Command{ - Args: cobra.NoArgs, // TODO(bentheelder): more detailed usage Use: "export", Short: "Exports one of [kubeconfig, logs]", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kind-0.26.0/pkg/cmd/kind/get/get.go new/kind-0.27.0/pkg/cmd/kind/get/get.go --- old/kind-0.26.0/pkg/cmd/kind/get/get.go 2024-12-16 22:54:05.000000000 +0100 +++ new/kind-0.27.0/pkg/cmd/kind/get/get.go 2025-02-15 01:44:56.000000000 +0100 @@ -32,7 +32,6 @@ // NewCommand returns a new cobra.Command for get func NewCommand(logger log.Logger, streams cmd.IOStreams) *cobra.Command { cmd := &cobra.Command{ - Args: cobra.NoArgs, // TODO(bentheelder): more detailed usage Use: "get", Short: "Gets one of [clusters, nodes, kubeconfig]", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kind-0.26.0/pkg/cmd/kind/root.go new/kind-0.27.0/pkg/cmd/kind/root.go --- old/kind-0.26.0/pkg/cmd/kind/root.go 2024-12-16 22:54:05.000000000 +0100 +++ new/kind-0.27.0/pkg/cmd/kind/root.go 2025-02-15 01:44:56.000000000 +0100 @@ -43,7 +43,6 @@ func NewCommand(logger log.Logger, streams cmd.IOStreams) *cobra.Command { flags := &flagpole{} cmd := &cobra.Command{ - Args: cobra.NoArgs, Use: "kind", Short: "kind is a tool for managing local Kubernetes clusters", Long: "kind creates and manages local Kubernetes clusters using Docker container 'nodes'", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kind-0.26.0/pkg/cmd/kind/version/version.go new/kind-0.27.0/pkg/cmd/kind/version/version.go --- old/kind-0.26.0/pkg/cmd/kind/version/version.go 2024-12-16 22:54:05.000000000 +0100 +++ new/kind-0.27.0/pkg/cmd/kind/version/version.go 2025-02-15 01:44:56.000000000 +0100 @@ -29,19 +29,23 @@ // Version returns the kind CLI Semantic Version func Version() string { - v := versionCore + return version(versionCore, versionPreRelease, gitCommit, gitCommitCount) +} + +func version(core, preRelease, commit, commitCount string) string { + v := core // add pre-release version info if we have it - if versionPreRelease != "" { - v += "-" + versionPreRelease - // If gitCommitCount was set, add to the pre-release version - if gitCommitCount != "" { - v += "." + gitCommitCount + if preRelease != "" { + v += "-" + preRelease + // If commitCount was set, add to the pre-release version + if commitCount != "" { + v += "." + commitCount } // if commit was set, add the + <build> // we only do this for pre-release versions - if gitCommit != "" { + if commit != "" { // NOTE: use 14 character short hash, like Kubernetes - v += "+" + truncate(gitCommit, 14) + v += "+" + truncate(commit, 14) } } return v @@ -54,7 +58,7 @@ } // versionCore is the core portion of the kind CLI version per Semantic Versioning 2.0.0 -const versionCore = "0.26.0" +const versionCore = "0.27.0" // versionPreRelease is the base pre-release portion of the kind CLI version per // Semantic Versioning 2.0.0 @@ -71,7 +75,6 @@ // NewCommand returns a new cobra.Command for version func NewCommand(logger log.Logger, streams cmd.IOStreams) *cobra.Command { cmd := &cobra.Command{ - Args: cobra.NoArgs, Use: "version", Short: "Prints the kind CLI version", Long: "Prints the kind CLI version", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kind-0.26.0/pkg/cmd/kind/version/version_test.go new/kind-0.27.0/pkg/cmd/kind/version/version_test.go --- old/kind-0.26.0/pkg/cmd/kind/version/version_test.go 2024-12-16 22:54:05.000000000 +0100 +++ new/kind-0.27.0/pkg/cmd/kind/version/version_test.go 2025-02-15 01:44:56.000000000 +0100 @@ -64,6 +64,7 @@ func TestVersion(t *testing.T) { tests := []struct { name string + version string versionPreRelease string gitCommit string gitCommitCount string @@ -71,71 +72,59 @@ }{ { name: "With git commit count and with commit hash", + version: "v0.27.0", versionPreRelease: "alpha", gitCommit: "mocked-hash", gitCommitCount: "mocked-count", - want: versionCore + "-" + "alpha" + "." + "mocked-count" + "+" + "mocked-hash", + want: "v0.27.0-alpha.mocked-count+mocked-hash", }, { name: "Without git commit count and and with hash", + version: "v0.27.0", versionPreRelease: "beta", gitCommit: "mocked-hash", gitCommitCount: "", - want: versionCore + "-" + "beta" + "+" + "mocked-hash", + want: "v0.27.0-beta+mocked-hash", }, { name: "Without git commit hash and with commit count", + version: "v0.30.0", versionPreRelease: "alpha", gitCommit: "", gitCommitCount: "mocked-count", - want: versionCore + "-" + "alpha" + "." + "mocked-count", + want: "v0.30.0-alpha.mocked-count", }, { name: "Without git commit hash and without commit count", + version: "v0.27.0", versionPreRelease: "alpha", gitCommit: "", gitCommitCount: "", - want: versionCore + "-" + "alpha", + want: "v0.27.0-alpha", }, { name: "Without pre release version", + version: "v0.27.0", versionPreRelease: "", gitCommit: "", gitCommitCount: "", - want: versionCore, + want: "v0.27.0", }, { name: "Without pre release version and with git commit hash and count", + version: "v0.27.0", versionPreRelease: "", gitCommit: "mocked-commit", gitCommitCount: "mocked-count", - want: versionCore, + want: "v0.27.0", }, } for _, tt := range tests { + // TODO: this won't be necessary when we require go 1.22+ + tt := tt t.Run(tt.name, func(t *testing.T) { - if tt.gitCommit != "" { - gitCommitBackup := gitCommit - gitCommit = tt.gitCommit - defer func() { - gitCommit = gitCommitBackup - }() - } - - if tt.gitCommitCount != "" { - gitCommitCountBackup := gitCommitCount - gitCommitCount = tt.gitCommitCount - defer func() { - gitCommitCount = gitCommitCountBackup - }() - } - - versionPreReleaseBackup := versionPreRelease - versionPreRelease = tt.versionPreRelease - defer func() { - versionPreRelease = versionPreReleaseBackup - }() - if got := Version(); got != tt.want { + t.Parallel() + if got := version(tt.version, tt.versionPreRelease, tt.gitCommit, tt.gitCommitCount); got != tt.want { t.Errorf("Version() = %v, want %v", got, tt.want) } }) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kind-0.26.0/pkg/exec/helpers.go new/kind-0.27.0/pkg/exec/helpers.go --- old/kind-0.26.0/pkg/exec/helpers.go 2024-12-16 22:54:05.000000000 +0100 +++ new/kind-0.27.0/pkg/exec/helpers.go 2025-02-15 01:44:56.000000000 +0100 @@ -23,7 +23,7 @@ "os" "strings" - "github.com/alessio/shellescape" + "al.essio.dev/pkg/shellescape" "sigs.k8s.io/kind/pkg/errors" ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kind-0.26.0/site/config.toml new/kind-0.27.0/site/config.toml --- old/kind-0.26.0/site/config.toml 2024-12-16 22:54:05.000000000 +0100 +++ new/kind-0.27.0/site/config.toml 2025-02-15 01:44:56.000000000 +0100 @@ -67,7 +67,7 @@ home = ["HTML", "REDIRECTS"] [params] -stable = "v0.25.0" +stable = "v0.26.0" # privacy settings [privacy] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kind-0.26.0/site/content/docs/design/base-image.md new/kind-0.27.0/site/content/docs/design/base-image.md --- old/kind-0.26.0/site/content/docs/design/base-image.md 2024-12-16 22:54:05.000000000 +0100 +++ new/kind-0.27.0/site/content/docs/design/base-image.md 2025-02-15 01:44:56.000000000 +0100 @@ -6,31 +6,19 @@ identifier: "base-image" --- -> **NOTE**: This may not completely cover the current implementation. +This page used to host a doc about the initial design, this has been found confusing +so we've updated it to clarify the current expectations. While the sources of the project +are fully open, depending on the specifics of the node image internals is not supported. -The ["base" image][base image] is a small-ish Docker image for running -nested containers, systemd, and kubernetes components. +We only support that base images will create a working node image with `kind build node-image` at the kind release they were shipped with. -To do this we need to set up an environment that will meet the CRI -(currently containerd and runc) and systemd's particular needs. Documentation for each -step we take is inline to the image's [Dockerfile][dockerfile], -but essentially: +The contents and implemlentation of the images are subject to change at any time +to fix bugs, improve reliability, performance, or maintainability. -- we preinstall tools / packages expected by systemd / containerd / Kubernetes other -than Kubernetes itself +DO NOT DEPEND ON THE INTERNALS OF THE BASE IMAGES. -- we install a custom entrypoint that allows us to perform some actions before -the container truly boots +KIND provides [conformant][conformance] Kubernetes, anything else is an implementation detail. -- we set up a systemd service to forward journal logs to the container tty +We will not accept bugs about "breaking changes" to base images and you depend on the implementation details at your own peril. -- we do a few tricks to minimize unnecessary services and inform systemd that it -is in docker (see the [Dockerfile][dockerfile]) - -This image is based on the `debian-slim` image which starts relatively small for -a Kubernetes node image, has near exclusively packages we need, and has -relatively up to date packages. -We strive to minimize the image size where possible. - -[base image]: https://sigs.k8s.io/kind/images/base -[dockerfile]: https://sigs.k8s.io/kind/images/base/Dockerfile +[conformance]: https://www.cncf.io/training/certification/software-conformance/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kind-0.26.0/site/content/docs/design/node-image.md new/kind-0.27.0/site/content/docs/design/node-image.md --- old/kind-0.26.0/site/content/docs/design/node-image.md 2024-12-16 22:54:05.000000000 +0100 +++ new/kind-0.27.0/site/content/docs/design/node-image.md 2025-02-15 01:44:56.000000000 +0100 @@ -6,43 +6,20 @@ identifier: "node-image" --- -> **NOTE**: This may not completely cover the current implementation. +This page used to host a doc about the initial design, this has been found confusing +so we've updated it to clarify the current expectations. While the sources of the project +are fully open, depending on the specifics of the node image internals is not supported. -The ["node" image][node image] is a Docker image for running -nested containers, systemd, and Kubernetes components. +We only support that node images will create a working Kubernetes node at the advertised version with the kind version they +were released with (and best effort with other releases), see the release notes. -This image is built on top of the ["base" image][base image]. +The contents and implemlentation of the images are subject to change at any time +to fix bugs, improve reliability, performance, or maintainability. -Logic for building the ["node" image][node image] can be found in [`pkg/build`][build package], -and it can be built with `kind build node-image` respectively. +DO NOT DEPEND ON THE INTERNALS OF THE NODE IMAGES. -## Design +KIND provides [conformant][conformance] Kubernetes, anything else is an implementation detail. -Other than the requirements that this image inherits from the "base" image, which -provides most of the tools statically needed for a Kubernetes deployment -(eg `systemd`), variants of this image have the following properties: +We will not accept bugs about "breaking changes" to node images and you depend on the implementation details at your own peril. -- `/kind/images/` contains various `*.tar` files which are -[Docker image archives][docker image archives], -these images will be loaded by the cluster tooling prior to running `kubeadm` - -- `kubeadm`, `kubectl`, `kubelet` are in the path - -- A [systemd service][systemd service] is enabled for `kubelet`, and is -configured to not fail on swap being enabled. (we must do the latter because -swap is inherited from the host and we don't want to force users to disable swap -before using `kind`) - -- `/kind/version` is a regular text file containing the `gitVersion` of the -installed Kubernetes build - -These properties are used by the [cluster][cluster package] tooling to boot -each "node" container with [kubeadm][kubeadm]. - -[node image]: https://sigs.k8s.io/kind/images/node -[base image]: /docs/design/base-image -[build package]: https://sigs.k8s.io/kind/pkg/build -[cluster package]: https://sigs.k8s.io/kind/pkg/cluster -[docker image archives]: https://docs.docker.com/engine/reference/commandline/save/ -[systemd service]: https://www.freedesktop.org/software/systemd/man/systemd.service.html -[kubeadm]: https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm/ +[conformance]: https://www.cncf.io/training/certification/software-conformance/ \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kind-0.26.0/site/content/docs/user/quick-start.md new/kind-0.27.0/site/content/docs/user/quick-start.md --- old/kind-0.26.0/site/content/docs/user/quick-start.md 2024-12-16 22:54:05.000000000 +0100 +++ new/kind-0.27.0/site/content/docs/user/quick-start.md 2025-02-15 01:44:56.000000000 +0100 @@ -233,7 +233,7 @@ ``` docker build -t my-custom-image:unique-tag ./my-image-dir kind load docker-image my-custom-image:unique-tag -kubectl apply -f my-manifest-using-my-image:unique-tag +kubectl apply -f my-manifest-using-my-image.yaml ``` > **NOTE**: You can get a list of images present on a cluster node by ++++++ kind.obsinfo ++++++ --- /var/tmp/diff_new_pack.3HTUE0/_old 2025-02-16 22:51:05.674461496 +0100 +++ /var/tmp/diff_new_pack.3HTUE0/_new 2025-02-16 22:51:05.678461662 +0100 @@ -1,5 +1,5 @@ name: kind -version: 0.26.0 -mtime: 1734386045 -commit: c5f516c8b2c4927232074381c980467e393cf965 +version: 0.27.0 +mtime: 1739580296 +commit: 6cb934219ac54aa0ddb1d8313adc05304421ccb6 ++++++ vendor.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/al.essio.dev/pkg/shellescape/.gitignore new/vendor/al.essio.dev/pkg/shellescape/.gitignore --- old/vendor/al.essio.dev/pkg/shellescape/.gitignore 1970-01-01 01:00:00.000000000 +0100 +++ new/vendor/al.essio.dev/pkg/shellescape/.gitignore 2025-02-16 09:51:44.000000000 +0100 @@ -0,0 +1,32 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof + +.idea/ + +escargs + +config.hcl + +.DS_Store diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/al.essio.dev/pkg/shellescape/.golangci.yml new/vendor/al.essio.dev/pkg/shellescape/.golangci.yml --- old/vendor/al.essio.dev/pkg/shellescape/.golangci.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/vendor/al.essio.dev/pkg/shellescape/.golangci.yml 2025-02-16 09:51:44.000000000 +0100 @@ -0,0 +1,59 @@ +# run: +# # timeout for analysis, e.g. 30s, 5m, default is 1m +# timeout: 5m + +linters: + disable-all: true + enable: + - bodyclose + - dogsled + - goconst + - gocritic + - gofmt + - goimports + - gosec + - gosimple + - govet + - ineffassign + - misspell + - prealloc + - exportloopref + - revive + - staticcheck + - stylecheck + - typecheck + - unconvert + - unparam + - unused + - misspell + - wsl + +issues: + exclude-rules: + - text: "Use of weak random number generator" + linters: + - gosec + - text: "comment on exported var" + linters: + - golint + - text: "don't use an underscore in package name" + linters: + - golint + - text: "ST1003:" + linters: + - stylecheck + # FIXME: Disabled until golangci-lint updates stylecheck with this fix: + # https://github.com/dominikh/go-tools/issues/389 + - text: "ST1016:" + linters: + - stylecheck + +linters-settings: + dogsled: + max-blank-identifiers: 3 + maligned: + # print struct with more effective memory layout or not, false by default + suggest-new: true + +run: + tests: false diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/al.essio.dev/pkg/shellescape/.goreleaser.yml new/vendor/al.essio.dev/pkg/shellescape/.goreleaser.yml --- old/vendor/al.essio.dev/pkg/shellescape/.goreleaser.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/vendor/al.essio.dev/pkg/shellescape/.goreleaser.yml 2025-02-16 09:51:44.000000000 +0100 @@ -0,0 +1,54 @@ +# This is an example goreleaser.yaml file with some sane defaults. +# Make sure to check the documentation at http://goreleaser.com +before: + hooks: + # You may remove this if you don't use go modules. + - go mod download + # you may remove this if you don't need go generate + - go generate ./... +builds: + - env: + - CGO_ENABLED=0 + - >- + {{- if eq .Os "darwin" }} + {{- if eq .Arch "amd64"}}CC=o64-clang{{- end }} + {{- if eq .Arch "arm64"}}CC=aarch64-apple-darwin20.2-clang{{- end }} + {{- end }} + {{- if eq .Os "windows" }} + {{- if eq .Arch "amd64" }}CC=x86_64-w64-mingw32-gcc{{- end }} + {{- end }} + main: ./cmd/escargs + goos: + - linux + - windows + - darwin + - freebsd + goarch: + - amd64 + - arm64 + - arm + goarm: + - 6 + - 7 + goamd64: + - v2 + - v3 + ignore: + - goos: darwin + goarch: 386 + - goos: linux + goarch: arm + goarm: 7 + - goarm: mips64 + - gomips: hardfloat + - goamd64: v4 +checksum: + name_template: 'checksums.txt' +snapshot: + name_template: "{{ .Tag }}-next" +changelog: + sort: asc + filters: + exclude: + - '^docs:' + - '^test:' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/al.essio.dev/pkg/shellescape/AUTHORS new/vendor/al.essio.dev/pkg/shellescape/AUTHORS --- old/vendor/al.essio.dev/pkg/shellescape/AUTHORS 1970-01-01 01:00:00.000000000 +0100 +++ new/vendor/al.essio.dev/pkg/shellescape/AUTHORS 2025-02-16 09:51:44.000000000 +0100 @@ -0,0 +1 @@ +Alessio Treglia <ales...@debian.org> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/al.essio.dev/pkg/shellescape/CODE_OF_CONDUCT.md new/vendor/al.essio.dev/pkg/shellescape/CODE_OF_CONDUCT.md --- old/vendor/al.essio.dev/pkg/shellescape/CODE_OF_CONDUCT.md 1970-01-01 01:00:00.000000000 +0100 +++ new/vendor/al.essio.dev/pkg/shellescape/CODE_OF_CONDUCT.md 2025-02-16 09:51:44.000000000 +0100 @@ -0,0 +1,76 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, sex characteristics, gender identity and expression, +level of experience, education, socio-economic status, nationality, personal +appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at ales...@debian.org. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see +https://www.contributor-covenant.org/faq diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/al.essio.dev/pkg/shellescape/LICENSE new/vendor/al.essio.dev/pkg/shellescape/LICENSE --- old/vendor/al.essio.dev/pkg/shellescape/LICENSE 1970-01-01 01:00:00.000000000 +0100 +++ new/vendor/al.essio.dev/pkg/shellescape/LICENSE 2025-02-16 09:51:44.000000000 +0100 @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Alessio Treglia + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/al.essio.dev/pkg/shellescape/Makefile new/vendor/al.essio.dev/pkg/shellescape/Makefile --- old/vendor/al.essio.dev/pkg/shellescape/Makefile 1970-01-01 01:00:00.000000000 +0100 +++ new/vendor/al.essio.dev/pkg/shellescape/Makefile 2025-02-16 09:51:44.000000000 +0100 @@ -0,0 +1,25 @@ + +#!/usr/bin/make -f + +VERSION := $(shell git describe) + +all: build + +build: + go build -a -v + +install: + go install ./cmd/escargs + +escargs: build + go build -v \ + -ldflags="-X 'main.version=$(VERSION)'" \ + ./cmd/escargs + +clean: + rm -rfv escargs + +uninstall: + rm -v $(shell go env GOPATH)/bin/escargs + +.PHONY: build clean install uninstall diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/al.essio.dev/pkg/shellescape/README.md new/vendor/al.essio.dev/pkg/shellescape/README.md --- old/vendor/al.essio.dev/pkg/shellescape/README.md 1970-01-01 01:00:00.000000000 +0100 +++ new/vendor/al.essio.dev/pkg/shellescape/README.md 2025-02-16 09:51:44.000000000 +0100 @@ -0,0 +1,61 @@ + +[](https://pkg.go.dev/github.com/alessio/shellescape?tab=overview) +[](https://sourcegraph.com/github.com/alessio/shellescape) +[](https://codecov.io/gh/alessio/shellescape) +[](https://gocover.io/github.com/alessio/shellescape) +[](https://goreportcard.com/report/github.com/alessio/shellescape) + +# shellescape +Escape arbitrary strings for safe use as command line arguments. +## Contents of the package + +This package provides the `shellescape.Quote()` function that returns a +shell-escaped copy of a string. This functionality could be helpful +in those cases where it is known that the output of a Go program will +be appended to/used in the context of shell programs' command line arguments. + +This work was inspired by the Python original package +[shellescape](https://pypi.python.org/pypi/shellescape). + +## Usage + +The following snippet shows a typical unsafe idiom: + +```go +package main + +import ( + "fmt" + "os" +) + +func main() { + fmt.Printf("ls -l %s\n", os.Args[1]) +} +``` +_[See in Go Playground](https://play.golang.org/p/Wj2WoUfH_d)_ + +Especially when creating pipeline of commands which might end up being +executed by a shell interpreter, it is particularly unsafe to not +escape arguments. + +`shellescape.Quote()` comes in handy and to safely escape strings: + +```go +package main + +import ( + "fmt" + "os" + + "al.essio.dev/pkg/shellescape" +) + +func main() { + fmt.Printf("ls -l %s\n", shellescape.Quote(os.Args[1])) +} +``` +_[See in Go Playground](https://go.dev/play/p/GeguukpSUTk)_ + +## The escargs utility +__escargs__ reads lines from the standard input and prints shell-escaped versions. Unlinke __xargs__, blank lines on the standard input are not discarded. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/al.essio.dev/pkg/shellescape/shellescape.go new/vendor/al.essio.dev/pkg/shellescape/shellescape.go --- old/vendor/al.essio.dev/pkg/shellescape/shellescape.go 1970-01-01 01:00:00.000000000 +0100 +++ new/vendor/al.essio.dev/pkg/shellescape/shellescape.go 2025-02-16 09:51:44.000000000 +0100 @@ -0,0 +1,66 @@ +/* +Package shellescape provides the shellescape.Quote to escape arbitrary +strings for a safe use as command line arguments in the most common +POSIX shells. + +The original Python package which this work was inspired by can be found +at https://pypi.python.org/pypi/shellescape. +*/ +package shellescape // "import al.essio.dev/pkg/shellescape" + +/* +The functionality provided by shellescape.Quote could be helpful +in those cases where it is known that the output of a Go program will +be appended to/used in the context of shell programs' command line arguments. +*/ + +import ( + "regexp" + "strings" + "unicode" +) + +var pattern *regexp.Regexp + +func init() { + pattern = regexp.MustCompile(`[^\w@%+=:,./-]`) +} + +// Quote returns a shell-escaped version of the string s. The returned value +// is a string that can safely be used as one token in a shell command line. +func Quote(s string) string { + if len(s) == 0 { + return "''" + } + + if pattern.MatchString(s) { + return "'" + strings.ReplaceAll(s, "'", "'\"'\"'") + "'" + } + + return s +} + +// QuoteCommand returns a shell-escaped version of the slice of strings. +// The returned value is a string that can safely be used as shell command arguments. +func QuoteCommand(args []string) string { + l := make([]string, len(args)) + + for i, s := range args { + l[i] = Quote(s) + } + + return strings.Join(l, " ") +} + +// StripUnsafe remove non-printable runes, e.g. control characters in +// a string that is meant for consumption by terminals that support +// control characters. +func StripUnsafe(s string) string { + return strings.Map(func(r rune) rune { + if unicode.IsPrint(r) { + return r + } + + return -1 + }, s) +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/github.com/alessio/shellescape/.gitignore new/vendor/github.com/alessio/shellescape/.gitignore --- old/vendor/github.com/alessio/shellescape/.gitignore 2024-12-17 06:43:39.000000000 +0100 +++ new/vendor/github.com/alessio/shellescape/.gitignore 1970-01-01 01:00:00.000000000 +0100 @@ -1,28 +0,0 @@ -# Compiled Object files, Static and Dynamic libs (Shared Objects) -*.o -*.a -*.so - -# Folders -_obj -_test - -# Architecture specific extensions/prefixes -*.[568vq] -[568vq].out - -*.cgo1.go -*.cgo2.c -_cgo_defun.c -_cgo_gotypes.go -_cgo_export.* - -_testmain.go - -*.exe -*.test -*.prof - -.idea/ - -escargs diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/github.com/alessio/shellescape/.golangci.yml new/vendor/github.com/alessio/shellescape/.golangci.yml --- old/vendor/github.com/alessio/shellescape/.golangci.yml 2024-12-17 06:43:39.000000000 +0100 +++ new/vendor/github.com/alessio/shellescape/.golangci.yml 1970-01-01 01:00:00.000000000 +0100 @@ -1,59 +0,0 @@ -# run: -# # timeout for analysis, e.g. 30s, 5m, default is 1m -# timeout: 5m - -linters: - disable-all: true - enable: - - bodyclose - - dogsled - - goconst - - gocritic - - gofmt - - goimports - - gosec - - gosimple - - govet - - ineffassign - - misspell - - prealloc - - exportloopref - - revive - - staticcheck - - stylecheck - - typecheck - - unconvert - - unparam - - unused - - misspell - - wsl - -issues: - exclude-rules: - - text: "Use of weak random number generator" - linters: - - gosec - - text: "comment on exported var" - linters: - - golint - - text: "don't use an underscore in package name" - linters: - - golint - - text: "ST1003:" - linters: - - stylecheck - # FIXME: Disabled until golangci-lint updates stylecheck with this fix: - # https://github.com/dominikh/go-tools/issues/389 - - text: "ST1016:" - linters: - - stylecheck - -linters-settings: - dogsled: - max-blank-identifiers: 3 - maligned: - # print struct with more effective memory layout or not, false by default - suggest-new: true - -run: - tests: false diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/github.com/alessio/shellescape/.goreleaser.yml new/vendor/github.com/alessio/shellescape/.goreleaser.yml --- old/vendor/github.com/alessio/shellescape/.goreleaser.yml 2024-12-17 06:43:39.000000000 +0100 +++ new/vendor/github.com/alessio/shellescape/.goreleaser.yml 1970-01-01 01:00:00.000000000 +0100 @@ -1,54 +0,0 @@ -# This is an example goreleaser.yaml file with some sane defaults. -# Make sure to check the documentation at http://goreleaser.com -before: - hooks: - # You may remove this if you don't use go modules. - - go mod download - # you may remove this if you don't need go generate - - go generate ./... -builds: - - env: - - CGO_ENABLED=0 - - >- - {{- if eq .Os "darwin" }} - {{- if eq .Arch "amd64"}}CC=o64-clang{{- end }} - {{- if eq .Arch "arm64"}}CC=aarch64-apple-darwin20.2-clang{{- end }} - {{- end }} - {{- if eq .Os "windows" }} - {{- if eq .Arch "amd64" }}CC=x86_64-w64-mingw32-gcc{{- end }} - {{- end }} - main: ./cmd/escargs - goos: - - linux - - windows - - darwin - - freebsd - goarch: - - amd64 - - arm64 - - arm - goarm: - - 6 - - 7 - goamd64: - - v2 - - v3 - ignore: - - goos: darwin - goarch: 386 - - goos: linux - goarch: arm - goarm: 7 - - goarm: mips64 - - gomips: hardfloat - - goamd64: v4 -checksum: - name_template: 'checksums.txt' -snapshot: - name_template: "{{ .Tag }}-next" -changelog: - sort: asc - filters: - exclude: - - '^docs:' - - '^test:' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/github.com/alessio/shellescape/AUTHORS new/vendor/github.com/alessio/shellescape/AUTHORS --- old/vendor/github.com/alessio/shellescape/AUTHORS 2024-12-17 06:43:39.000000000 +0100 +++ new/vendor/github.com/alessio/shellescape/AUTHORS 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -Alessio Treglia <ales...@debian.org> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/github.com/alessio/shellescape/CODE_OF_CONDUCT.md new/vendor/github.com/alessio/shellescape/CODE_OF_CONDUCT.md --- old/vendor/github.com/alessio/shellescape/CODE_OF_CONDUCT.md 2024-12-17 06:43:39.000000000 +0100 +++ new/vendor/github.com/alessio/shellescape/CODE_OF_CONDUCT.md 1970-01-01 01:00:00.000000000 +0100 @@ -1,76 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -In the interest of fostering an open and welcoming environment, we as -contributors and maintainers pledge to making participation in our project and -our community a harassment-free experience for everyone, regardless of age, body -size, disability, ethnicity, sex characteristics, gender identity and expression, -level of experience, education, socio-economic status, nationality, personal -appearance, race, religion, or sexual identity and orientation. - -## Our Standards - -Examples of behavior that contributes to creating a positive environment -include: - -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery and unwelcome sexual attention or - advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic - address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a - professional setting - -## Our Responsibilities - -Project maintainers are responsible for clarifying the standards of acceptable -behavior and are expected to take appropriate and fair corrective action in -response to any instances of unacceptable behavior. - -Project maintainers have the right and responsibility to remove, edit, or -reject comments, commits, code, wiki edits, issues, and other contributions -that are not aligned to this Code of Conduct, or to ban temporarily or -permanently any contributor for other behaviors that they deem inappropriate, -threatening, offensive, or harmful. - -## Scope - -This Code of Conduct applies both within project spaces and in public spaces -when an individual is representing the project or its community. Examples of -representing a project or community include using an official project e-mail -address, posting via an official social media account, or acting as an appointed -representative at an online or offline event. Representation of a project may be -further defined and clarified by project maintainers. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported by contacting the project team at ales...@debian.org. All -complaints will be reviewed and investigated and will result in a response that -is deemed necessary and appropriate to the circumstances. The project team is -obligated to maintain confidentiality with regard to the reporter of an incident. -Further details of specific enforcement policies may be posted separately. - -Project maintainers who do not follow or enforce the Code of Conduct in good -faith may face temporary or permanent repercussions as determined by other -members of the project's leadership. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, -available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html - -[homepage]: https://www.contributor-covenant.org - -For answers to common questions about this code of conduct, see -https://www.contributor-covenant.org/faq diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/github.com/alessio/shellescape/LICENSE new/vendor/github.com/alessio/shellescape/LICENSE --- old/vendor/github.com/alessio/shellescape/LICENSE 2024-12-17 06:43:39.000000000 +0100 +++ new/vendor/github.com/alessio/shellescape/LICENSE 1970-01-01 01:00:00.000000000 +0100 @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 Alessio Treglia - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/github.com/alessio/shellescape/README.md new/vendor/github.com/alessio/shellescape/README.md --- old/vendor/github.com/alessio/shellescape/README.md 2024-12-17 06:43:39.000000000 +0100 +++ new/vendor/github.com/alessio/shellescape/README.md 1970-01-01 01:00:00.000000000 +0100 @@ -1,61 +0,0 @@ - -[](https://pkg.go.dev/github.com/alessio/shellescape?tab=overview) -[](https://sourcegraph.com/github.com/alessio/shellescape) -[](https://codecov.io/gh/alessio/shellescape) -[](https://gocover.io/github.com/alessio/shellescape) -[](https://goreportcard.com/report/github.com/alessio/shellescape) - -# shellescape -Escape arbitrary strings for safe use as command line arguments. -## Contents of the package - -This package provides the `shellescape.Quote()` function that returns a -shell-escaped copy of a string. This functionality could be helpful -in those cases where it is known that the output of a Go program will -be appended to/used in the context of shell programs' command line arguments. - -This work was inspired by the Python original package -[shellescape](https://pypi.python.org/pypi/shellescape). - -## Usage - -The following snippet shows a typical unsafe idiom: - -```go -package main - -import ( - "fmt" - "os" -) - -func main() { - fmt.Printf("ls -l %s\n", os.Args[1]) -} -``` -_[See in Go Playground](https://play.golang.org/p/Wj2WoUfH_d)_ - -Especially when creating pipeline of commands which might end up being -executed by a shell interpreter, it is particularly unsafe to not -escape arguments. - -`shellescape.Quote()` comes in handy and to safely escape strings: - -```go -package main - -import ( - "fmt" - "os" - - "gopkg.in/alessio/shellescape.v1" -) - -func main() { - fmt.Printf("ls -l %s\n", shellescape.Quote(os.Args[1])) -} -``` -_[See in Go Playground](https://play.golang.org/p/HJ_CXgSrmp)_ - -## The escargs utility -__escargs__ reads lines from the standard input and prints shell-escaped versions. Unlinke __xargs__, blank lines on the standard input are not discarded. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/github.com/alessio/shellescape/shellescape.go new/vendor/github.com/alessio/shellescape/shellescape.go --- old/vendor/github.com/alessio/shellescape/shellescape.go 2024-12-17 06:43:39.000000000 +0100 +++ new/vendor/github.com/alessio/shellescape/shellescape.go 1970-01-01 01:00:00.000000000 +0100 @@ -1,66 +0,0 @@ -/* -Package shellescape provides the shellescape.Quote to escape arbitrary -strings for a safe use as command line arguments in the most common -POSIX shells. - -The original Python package which this work was inspired by can be found -at https://pypi.python.org/pypi/shellescape. -*/ -package shellescape // "import gopkg.in/alessio/shellescape.v1" - -/* -The functionality provided by shellescape.Quote could be helpful -in those cases where it is known that the output of a Go program will -be appended to/used in the context of shell programs' command line arguments. -*/ - -import ( - "regexp" - "strings" - "unicode" -) - -var pattern *regexp.Regexp - -func init() { - pattern = regexp.MustCompile(`[^\w@%+=:,./-]`) -} - -// Quote returns a shell-escaped version of the string s. The returned value -// is a string that can safely be used as one token in a shell command line. -func Quote(s string) string { - if len(s) == 0 { - return "''" - } - - if pattern.MatchString(s) { - return "'" + strings.ReplaceAll(s, "'", "'\"'\"'") + "'" - } - - return s -} - -// QuoteCommand returns a shell-escaped version of the slice of strings. -// The returned value is a string that can safely be used as shell command arguments. -func QuoteCommand(args []string) string { - l := make([]string, len(args)) - - for i, s := range args { - l[i] = Quote(s) - } - - return strings.Join(l, " ") -} - -// StripUnsafe remove non-printable runes, e.g. control characters in -// a string that is meant for consumption by terminals that support -// control characters. -func StripUnsafe(s string) string { - return strings.Map(func(r rune) rune { - if unicode.IsPrint(r) { - return r - } - - return -1 - }, s) -} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/modules.txt new/vendor/modules.txt --- old/vendor/modules.txt 2024-12-17 06:43:39.000000000 +0100 +++ new/vendor/modules.txt 2025-02-16 09:51:44.000000000 +0100 @@ -1,10 +1,10 @@ +# al.essio.dev/pkg/shellescape v1.5.1 +## explicit; go 1.18 +al.essio.dev/pkg/shellescape # github.com/BurntSushi/toml v1.4.0 ## explicit; go 1.18 github.com/BurntSushi/toml github.com/BurntSushi/toml/internal -# github.com/alessio/shellescape v1.4.2 -## explicit; go 1.14 -github.com/alessio/shellescape # github.com/evanphx/json-patch/v5 v5.6.0 ## explicit; go 1.12 github.com/evanphx/json-patch/v5