From 16fb193c8cae1a7c3a765e5faf7f062f814ef270 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Mon, 12 Sep 2022 16:22:31 -0400 Subject: [PATCH 001/105] Fix goreleaser configuration --- .github/workflows/release.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index df3257059..6f0450908 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,7 +16,8 @@ jobs: - name: Checkout uses: actions/checkout@v3 - name: GoReleaser - uses: goreleaser/goreleaser-action@v3.0.0 - args: "release" + uses: goreleaser/goreleaser-action@v3 + with: + args: "release" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 54a995c473e79fce8f30841100b6e021838d41c1 Mon Sep 17 00:00:00 2001 From: "hashicorp-copywrite[bot]" Date: Wed, 12 Oct 2022 21:02:36 +0000 Subject: [PATCH 002/105] [COMPLIANCE] Update MPL 2.0 LICENSE --- LICENSE | 2 ++ 1 file changed, 2 insertions(+) diff --git a/LICENSE b/LICENSE index a612ad981..c121cee6e 100644 --- a/LICENSE +++ b/LICENSE @@ -1,3 +1,5 @@ +Copyright (c) 2020 HashiCorp, Inc. + Mozilla Public License Version 2.0 ================================== From 33e82fac964ae5df4afbf1f4354f737d19100e73 Mon Sep 17 00:00:00 2001 From: Sylvia Moss Date: Fri, 28 Oct 2022 18:28:33 +0200 Subject: [PATCH 003/105] update links (#138) --- .../packer-plugin-sdk/communicator/WinRM-not-required.mdx | 2 +- .../packer-plugin-sdk/multistep/commonsteps/FloppyConfig.mdx | 2 +- communicator/config.go | 2 +- multistep/commonsteps/floppy_config.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/packer-sdc/internal/renderdocs/docs-partials/packer-plugin-sdk/communicator/WinRM-not-required.mdx b/cmd/packer-sdc/internal/renderdocs/docs-partials/packer-plugin-sdk/communicator/WinRM-not-required.mdx index 5c3910d16..f6b5de07d 100644 --- a/cmd/packer-sdc/internal/renderdocs/docs-partials/packer-plugin-sdk/communicator/WinRM-not-required.mdx +++ b/cmd/packer-sdc/internal/renderdocs/docs-partials/packer-plugin-sdk/communicator/WinRM-not-required.mdx @@ -8,7 +8,7 @@ NOTE: If using an Amazon EBS builder, you can specify the interface WinRM connects to via - [`ssh_interface`](/docs/builders/amazon-ebs#ssh_interface) + [`ssh_interface`](/packer/plugins/builders/amazon/ebs#ssh_interface) - `winrm_no_proxy` (bool) - Setting this to `true` adds the remote `host:port` to the `NO_PROXY` environment variable. This has the effect of diff --git a/cmd/packer-sdc/internal/renderdocs/docs-partials/packer-plugin-sdk/multistep/commonsteps/FloppyConfig.mdx b/cmd/packer-sdc/internal/renderdocs/docs-partials/packer-plugin-sdk/multistep/commonsteps/FloppyConfig.mdx index 0c653cc3d..2b38ab7a1 100644 --- a/cmd/packer-sdc/internal/renderdocs/docs-partials/packer-plugin-sdk/multistep/commonsteps/FloppyConfig.mdx +++ b/cmd/packer-sdc/internal/renderdocs/docs-partials/packer-plugin-sdk/multistep/commonsteps/FloppyConfig.mdx @@ -7,6 +7,6 @@ this setting get placed into the root directory of the floppy and the floppy is attached as the first floppy device. The summary size of the listed files must not exceed 1.44 MB. The supported ways to move large files into the OS are using `http_directory` or [the file -provisioner](/docs/provisioners/file). +provisioner](/packer/plugins/provisioners/file). diff --git a/communicator/config.go b/communicator/config.go index 92b20318c..81745b800 100644 --- a/communicator/config.go +++ b/communicator/config.go @@ -221,7 +221,7 @@ type WinRM struct { // // NOTE: If using an Amazon EBS builder, you can specify the interface // WinRM connects to via - // [`ssh_interface`](/docs/builders/amazon-ebs#ssh_interface) + // [`ssh_interface`](/packer/plugins/builders/amazon/ebs#ssh_interface) WinRMHost string `mapstructure:"winrm_host"` // Setting this to `true` adds the remote // `host:port` to the `NO_PROXY` environment variable. This has the effect of diff --git a/multistep/commonsteps/floppy_config.go b/multistep/commonsteps/floppy_config.go index 2eb81de67..c8c60ba83 100644 --- a/multistep/commonsteps/floppy_config.go +++ b/multistep/commonsteps/floppy_config.go @@ -18,7 +18,7 @@ import ( // is attached as the first floppy device. The summary size of the listed files // must not exceed 1.44 MB. The supported ways to move large files into the OS // are using `http_directory` or [the file -// provisioner](/docs/provisioners/file). +// provisioner](/packer/plugins/provisioners/file). type FloppyConfig struct { // A list of files to place onto a floppy disk that is attached when the VM // is booted. Currently, no support exists for creating sub-directories on From b493aeac8c5636d06ba60a5058cf9917efb7e5ff Mon Sep 17 00:00:00 2001 From: "hashicorp-copywrite[bot]" <110428419+hashicorp-copywrite[bot]@users.noreply.github.com> Date: Mon, 12 Dec 2022 16:05:12 +0000 Subject: [PATCH 004/105] [COMPLIANCE] Add Copyright and License Headers --- .circleci/config.yml | 3 +++ .github/dependabot.yml | 3 +++ .github/release.yml | 3 +++ .goreleaser.yml | 3 +++ acctest/doc.go | 3 +++ acctest/pluginacc.go | 3 +++ acctest/provisioneracc/builders.go | 3 +++ acctest/provisioneracc/provisioners.go | 3 +++ acctest/testutils/utils.go | 3 +++ adapter/adapter.go | 3 +++ adapter/adapter_test.go | 3 +++ adapter/doc.go | 3 +++ adapter/scp.go | 3 +++ bootcommand/boot_command_ast.go | 3 +++ bootcommand/boot_command_ast_test.go | 3 +++ bootcommand/config.go | 3 +++ bootcommand/config_test.go | 3 +++ bootcommand/doc.go | 3 +++ bootcommand/driver.go | 3 +++ bootcommand/gen.go | 3 +++ bootcommand/pc_xt_driver.go | 3 +++ bootcommand/pc_xt_driver_test.go | 3 +++ bootcommand/usb_driver.go | 3 +++ bootcommand/usb_driver_test.go | 3 +++ bootcommand/vnc_driver.go | 3 +++ bootcommand/vnc_driver_test.go | 3 +++ chroot/cleanup.go | 3 +++ chroot/communicator.go | 3 +++ chroot/communicator_test.go | 3 +++ chroot/doc.go | 3 +++ chroot/interpolate_context_provider.go | 3 +++ chroot/run_local_commands.go | 3 +++ chroot/step_chroot_provision.go | 3 +++ chroot/step_copy_files.go | 3 +++ chroot/step_copy_files_test.go | 3 +++ chroot/step_early_cleanup.go | 3 +++ chroot/step_mount_extra.go | 3 +++ chroot/step_mount_extra_test.go | 3 +++ chroot/step_post_mount_commands.go | 3 +++ chroot/step_pre_mount_commands.go | 3 +++ cmd/packer-sdc/internal/cmd/utils.go | 3 +++ cmd/packer-sdc/internal/fs/sync.go | 3 +++ cmd/packer-sdc/internal/fs/sync_test.go | 3 +++ .../internal/mapstructure-to-hcl2/mapstructure-to-hcl2.go | 3 +++ .../internal/mapstructure-to-hcl2/mapstructure-to-hcl2_test.go | 3 +++ cmd/packer-sdc/internal/plugincheck/cmd.go | 3 +++ cmd/packer-sdc/internal/renderdocs/renderdocs.go | 3 +++ cmd/packer-sdc/internal/renderdocs/renderdocs_test.go | 3 +++ cmd/packer-sdc/internal/struct-markdown/struct_markdown.go | 3 +++ .../internal/struct-markdown/struct_markdown_test.go | 3 +++ cmd/packer-sdc/internal/struct-markdown/template.go | 3 +++ .../packer-plugin-happycloud/builder/happycloud/config.go | 3 +++ cmd/packer-sdc/main.go | 3 +++ common/command.go | 3 +++ common/packer_config.go | 3 +++ communicator/comm_host.go | 3 +++ communicator/config.go | 3 +++ communicator/config_test.go | 3 +++ communicator/doc.go | 3 +++ communicator/ssh/key_pair.go | 3 +++ communicator/ssh/key_pair_test.go | 3 +++ communicator/ssh/ssh.go | 3 +++ communicator/ssh/tunnel.go | 3 +++ communicator/ssh/tunnel_test.go | 3 +++ communicator/sshkey/generate.go | 3 +++ communicator/sshkey/generate_test.go | 3 +++ communicator/sshkey/pubkey.go | 3 +++ communicator/sshkey/pubkey_test.go | 3 +++ communicator/step_connect.go | 3 +++ communicator/step_connect_ssh.go | 3 +++ communicator/step_connect_test.go | 3 +++ communicator/step_connect_winrm.go | 3 +++ communicator/step_debug_ssh_keys.go | 3 +++ communicator/step_ssh_keygen.go | 3 +++ communicator/testing.go | 3 +++ communicator/winrm.go | 3 +++ didyoumean/name_suggestion.go | 3 +++ filelock/doc.go | 3 +++ filelock/filelock.go | 3 +++ filelock/filelock_solaris.go | 3 +++ filelock/noop.go | 3 +++ guestexec/doc.go | 3 +++ guestexec/elevated.go | 3 +++ guestexec/elevated_test.go | 3 +++ guestexec/guest_commands.go | 3 +++ guestexec/guest_commands_test.go | 3 +++ hcl2helper/doc.go | 3 +++ hcl2helper/mock.go | 3 +++ hcl2helper/values.go | 3 +++ hcl2helper/values_test.go | 3 +++ json/unmarshal.go | 3 +++ multistep/basic_runner.go | 3 +++ multistep/basic_runner_test.go | 3 +++ multistep/commonsteps/doc.go | 3 +++ multistep/commonsteps/extra_iso_config.go | 3 +++ multistep/commonsteps/extra_iso_config_test.go | 3 +++ multistep/commonsteps/floppy_config.go | 3 +++ multistep/commonsteps/floppy_config_test.go | 3 +++ multistep/commonsteps/http_config.go | 3 +++ multistep/commonsteps/http_config_test.go | 3 +++ multistep/commonsteps/iso_config.go | 3 +++ multistep/commonsteps/iso_config_test.go | 3 +++ multistep/commonsteps/multistep_debug.go | 3 +++ multistep/commonsteps/multistep_runner.go | 3 +++ multistep/commonsteps/step_cleanup_temp_keys.go | 3 +++ multistep/commonsteps/step_create_cdrom.go | 3 +++ multistep/commonsteps/step_create_cdrom_test.go | 3 +++ multistep/commonsteps/step_create_floppy.go | 3 +++ multistep/commonsteps/step_create_floppy_test.go | 3 +++ multistep/commonsteps/step_download.go | 3 +++ multistep/commonsteps/step_download_test.go | 3 +++ multistep/commonsteps/step_http_server.go | 3 +++ multistep/commonsteps/step_http_server_test.go | 3 +++ multistep/commonsteps/step_output_dir.go | 3 +++ multistep/commonsteps/step_output_dir_test.go | 3 +++ multistep/commonsteps/step_provision.go | 3 +++ multistep/commonsteps/step_provision_test.go | 3 +++ multistep/debug_runner.go | 3 +++ multistep/debug_runner_test.go | 3 +++ multistep/doc.go | 3 +++ multistep/if.go | 3 +++ multistep/multistep.go | 3 +++ multistep/multistep_test.go | 3 +++ multistep/statebag.go | 3 +++ multistep/statebag_test.go | 3 +++ net/configure_port.go | 3 +++ net/configure_port_test.go | 3 +++ net/default_client.go | 3 +++ packer/artifact.go | 3 +++ packer/artifact_mock.go | 3 +++ packer/artifact_test.go | 3 +++ packer/build.go | 3 +++ packer/builder.go | 3 +++ packer/builder_mock.go | 3 +++ packer/cache.go | 3 +++ packer/cache_config_unix.go | 3 +++ packer/cache_config_unix_test.go | 3 +++ packer/cache_config_windows.go | 3 +++ packer/cache_config_windows_test.go | 3 +++ packer/communicator.go | 3 +++ packer/communicator_mock.go | 3 +++ packer/communicator_mock_test.go | 3 +++ packer/communicator_test.go | 3 +++ packer/datasource.go | 3 +++ packer/datasource_mock.go | 3 +++ packer/doc.go | 3 +++ packer/hcl2spec.go | 3 +++ packer/hook.go | 3 +++ packer/hook_mock.go | 3 +++ packer/hook_test.go | 3 +++ packer/logs.go | 3 +++ packer/maps.go | 3 +++ packer/multi_error.go | 3 +++ packer/multi_error_test.go | 3 +++ packer/post_processor.go | 3 +++ packer/provisioner.go | 3 +++ packer/provisioner_mock.go | 3 +++ packer/registry/image/fromartifact_example_test.go | 3 +++ packer/registry/image/frommappeddata_example_test.go | 3 +++ packer/registry/image/image.go | 3 +++ packer/registry/image/image_test.go | 3 +++ packer/ui.go | 3 +++ packer/ui_mock.go | 3 +++ packerbuilderdata/generated_data.go | 3 +++ packerbuilderdata/generated_data_test.go | 3 +++ pathing/config_file.go | 3 +++ pathing/config_file_test.go | 3 +++ pathing/config_file_unix.go | 3 +++ pathing/config_file_unix_test.go | 3 +++ pathing/config_file_windows.go | 3 +++ pathing/config_file_windows_test.go | 3 +++ plugin/server.go | 3 +++ plugin/server_test.go | 3 +++ plugin/set.go | 3 +++ plugin/set_test.go | 3 +++ random/string.go | 3 +++ retry/retry.go | 3 +++ retry/retry_test.go | 3 +++ retry/utils_test.go | 3 +++ rpc/artifact.go | 3 +++ rpc/artifact_test.go | 3 +++ rpc/build.go | 3 +++ rpc/build_test.go | 3 +++ rpc/builder.go | 3 +++ rpc/builder_test.go | 3 +++ rpc/client.go | 3 +++ rpc/client_test.go | 3 +++ rpc/common.go | 3 +++ rpc/communicator.go | 3 +++ rpc/communicator_test.go | 3 +++ rpc/cty_encode.go | 3 +++ rpc/datasource.go | 3 +++ rpc/datasource_test.go | 3 +++ rpc/error.go | 3 +++ rpc/error_test.go | 3 +++ rpc/fileinfo.go | 3 +++ rpc/fileinfo_test.go | 3 +++ rpc/hook.go | 3 +++ rpc/hook_test.go | 3 +++ rpc/init.go | 3 +++ rpc/mux_broker.go | 3 +++ rpc/mux_broker_test.go | 3 +++ rpc/post_processor.go | 3 +++ rpc/post_processor_test.go | 3 +++ rpc/provisioner.go | 3 +++ rpc/provisioner_test.go | 3 +++ rpc/server.go | 3 +++ rpc/server_test.go | 3 +++ rpc/ui.go | 3 +++ rpc/ui_progress_tracking.go | 3 +++ rpc/ui_test.go | 3 +++ sdk-internals/communicator/none/communicator.go | 3 +++ sdk-internals/communicator/none/communicator_test.go | 3 +++ sdk-internals/communicator/ssh/communicator.go | 3 +++ sdk-internals/communicator/ssh/communicator_test.go | 3 +++ sdk-internals/communicator/ssh/connect.go | 3 +++ sdk-internals/communicator/ssh/connect_test.go | 3 +++ sdk-internals/communicator/ssh/connection.go | 3 +++ sdk-internals/communicator/ssh/keyboard_interactive.go | 3 +++ sdk-internals/communicator/ssh/keyboard_interactive_test.go | 3 +++ sdk-internals/communicator/ssh/password.go | 3 +++ sdk-internals/communicator/ssh/password_test.go | 3 +++ sdk-internals/communicator/ssh/tunnel.go | 3 +++ sdk-internals/communicator/winrm/communicator.go | 3 +++ sdk-internals/communicator/winrm/communicator_test.go | 3 +++ sdk-internals/communicator/winrm/config.go | 3 +++ sdk-internals/communicator/winrm/time.go | 3 +++ sdk-internals/communicator/winrm/time_test.go | 3 +++ shell-local/communicator.go | 3 +++ shell-local/communicator_test.go | 3 +++ shell-local/config.go | 3 +++ shell-local/config_test.go | 3 +++ shell-local/doc.go | 3 +++ shell-local/localexec/run_and_stream.go | 3 +++ shell-local/localexec/run_and_stream_test.go | 3 +++ shell-local/run.go | 3 +++ shell/exit_code.go | 3 +++ shell/exit_code_test.go | 3 +++ shell/shell.go | 3 +++ shutdowncommand/config.go | 3 +++ shutdowncommand/config_test.go | 3 +++ template/config/custom_types.go | 3 +++ template/config/custom_types_test.go | 3 +++ template/config/decode.go | 3 +++ template/config/decode_test.go | 3 +++ template/config/deprecated_options.go | 3 +++ template/doc.go | 3 +++ template/funcs.go | 3 +++ template/interpolate/aws/secretsmanager/secretsmanager.go | 3 +++ template/interpolate/aws/secretsmanager/secretsmanager_test.go | 3 +++ template/interpolate/aws/secretsmanager/types.go | 3 +++ template/interpolate/funcs.go | 3 +++ template/interpolate/funcs_test.go | 3 +++ template/interpolate/i.go | 3 +++ template/interpolate/i_test.go | 3 +++ template/interpolate/parse.go | 3 +++ template/interpolate/parse_test.go | 3 +++ template/interpolate/render.go | 3 +++ template/interpolate/render_test.go | 3 +++ template/parse.go | 3 +++ template/parse_test.go | 3 +++ template/template.go | 3 +++ template/template_test.go | 3 +++ test-fixtures/floppies/foo.ps1 | 3 +++ tmp/tmp.go | 3 +++ useragent/useragent.go | 3 +++ useragent/useragent_test.go | 3 +++ uuid/uuid.go | 3 +++ uuid/uuid_test.go | 3 +++ version/version.go | 3 +++ 270 files changed, 810 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index f3786037e..da3855ae5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + orbs: win: circleci/windows@1.0.0 diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 73057e8b6..691d4e14f 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + # To get started with Dependabot version updates, you'll need to specify which # package ecosystems to update and where the package manifests are located. # Please see the documentation for all configuration options: diff --git a/.github/release.yml b/.github/release.yml index 1f3a89f91..029406c4a 100644 --- a/.github/release.yml +++ b/.github/release.yml @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + changelog: categories: - title: Breaking Changes 🛠 diff --git a/.goreleaser.yml b/.goreleaser.yml index f1585ec9c..dc7c141b6 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + project_name: packer-plugin-sdk build: skip: true diff --git a/acctest/doc.go b/acctest/doc.go index 56f4edddd..e90b720fb 100644 --- a/acctest/doc.go +++ b/acctest/doc.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + /* Package acctest provides an acceptance testing framework for testing builders and provisioners. diff --git a/acctest/pluginacc.go b/acctest/pluginacc.go index d2dc531d1..4f8c52355 100644 --- a/acctest/pluginacc.go +++ b/acctest/pluginacc.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package acctest import ( diff --git a/acctest/provisioneracc/builders.go b/acctest/provisioneracc/builders.go index 84010c07e..4fcf1620c 100644 --- a/acctest/provisioneracc/builders.go +++ b/acctest/provisioneracc/builders.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + /* Package provisioneracc creates a framework for provisioner acceptance testing. For builder acceptance testing, use the top level tooling in the diff --git a/acctest/provisioneracc/provisioners.go b/acctest/provisioneracc/provisioners.go index 8473ced8b..29043e1d8 100644 --- a/acctest/provisioneracc/provisioners.go +++ b/acctest/provisioneracc/provisioners.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package provisioneracc import ( diff --git a/acctest/testutils/utils.go b/acctest/testutils/utils.go index 2a493618e..e483b51e1 100644 --- a/acctest/testutils/utils.go +++ b/acctest/testutils/utils.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + // Package testutils provides some simple ease-of-use tools for implementing // acceptance testing. package testutils diff --git a/adapter/adapter.go b/adapter/adapter.go index 5d9adf455..0e27952ec 100644 --- a/adapter/adapter.go +++ b/adapter/adapter.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package adapter import ( diff --git a/adapter/adapter_test.go b/adapter/adapter_test.go index 30f6cbe52..197c12c6c 100644 --- a/adapter/adapter_test.go +++ b/adapter/adapter_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package adapter import ( diff --git a/adapter/doc.go b/adapter/doc.go index bf6254089..64fc1564f 100644 --- a/adapter/doc.go +++ b/adapter/doc.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + /* Package adapter helps command line tools connect to the guest via a Packer communicator. diff --git a/adapter/scp.go b/adapter/scp.go index ccf2c1fb0..e65c56053 100644 --- a/adapter/scp.go +++ b/adapter/scp.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package adapter import ( diff --git a/bootcommand/boot_command_ast.go b/bootcommand/boot_command_ast.go index f680345c4..ad1eefc11 100644 --- a/bootcommand/boot_command_ast.go +++ b/bootcommand/boot_command_ast.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package bootcommand import ( diff --git a/bootcommand/boot_command_ast_test.go b/bootcommand/boot_command_ast_test.go index 49bbb5cd4..21b6f44d2 100644 --- a/bootcommand/boot_command_ast_test.go +++ b/bootcommand/boot_command_ast_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package bootcommand import ( diff --git a/bootcommand/config.go b/bootcommand/config.go index 2ef5d926f..4ba9f878f 100644 --- a/bootcommand/config.go +++ b/bootcommand/config.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + //go:generate packer-sdc struct-markdown package bootcommand diff --git a/bootcommand/config_test.go b/bootcommand/config_test.go index a8297c17f..85aa88c70 100644 --- a/bootcommand/config_test.go +++ b/bootcommand/config_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package bootcommand import ( diff --git a/bootcommand/doc.go b/bootcommand/doc.go index 2bfa3d8bd..440ec699f 100644 --- a/bootcommand/doc.go +++ b/bootcommand/doc.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + // Package bootcommand generates and sends boot commands to the remote instance. // // This package is relevant to people who want to create new builders, particularly diff --git a/bootcommand/driver.go b/bootcommand/driver.go index 04b0eecd6..cc49b1672 100644 --- a/bootcommand/driver.go +++ b/bootcommand/driver.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package bootcommand const shiftedChars = "~!@#$%^&*()_+{}|:\"<>?" diff --git a/bootcommand/gen.go b/bootcommand/gen.go index f4e3fa964..b811f98ce 100644 --- a/bootcommand/gen.go +++ b/bootcommand/gen.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + //go:generate pigeon -o boot_command.go boot_command.pigeon package bootcommand diff --git a/bootcommand/pc_xt_driver.go b/bootcommand/pc_xt_driver.go index f39b02e89..cf2c7cab0 100644 --- a/bootcommand/pc_xt_driver.go +++ b/bootcommand/pc_xt_driver.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package bootcommand import ( diff --git a/bootcommand/pc_xt_driver_test.go b/bootcommand/pc_xt_driver_test.go index 95c469d27..68d668c5b 100644 --- a/bootcommand/pc_xt_driver_test.go +++ b/bootcommand/pc_xt_driver_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package bootcommand import ( diff --git a/bootcommand/usb_driver.go b/bootcommand/usb_driver.go index b81c47c90..5ebbb80ed 100644 --- a/bootcommand/usb_driver.go +++ b/bootcommand/usb_driver.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package bootcommand import ( diff --git a/bootcommand/usb_driver_test.go b/bootcommand/usb_driver_test.go index df370e6a3..a156d1e1b 100644 --- a/bootcommand/usb_driver_test.go +++ b/bootcommand/usb_driver_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package bootcommand import ( diff --git a/bootcommand/vnc_driver.go b/bootcommand/vnc_driver.go index 2c5bbf950..9dc7a15a7 100644 --- a/bootcommand/vnc_driver.go +++ b/bootcommand/vnc_driver.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package bootcommand import ( diff --git a/bootcommand/vnc_driver_test.go b/bootcommand/vnc_driver_test.go index e0e429472..bce40992e 100644 --- a/bootcommand/vnc_driver_test.go +++ b/bootcommand/vnc_driver_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package bootcommand import ( diff --git a/chroot/cleanup.go b/chroot/cleanup.go index d31d25ffd..60f2da4eb 100644 --- a/chroot/cleanup.go +++ b/chroot/cleanup.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package chroot import ( diff --git a/chroot/communicator.go b/chroot/communicator.go index 23a785249..9a1f867ee 100644 --- a/chroot/communicator.go +++ b/chroot/communicator.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package chroot import ( diff --git a/chroot/communicator_test.go b/chroot/communicator_test.go index dabff5024..c6b6febca 100644 --- a/chroot/communicator_test.go +++ b/chroot/communicator_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package chroot import ( diff --git a/chroot/doc.go b/chroot/doc.go index 26e8259fb..9133b79f9 100644 --- a/chroot/doc.go +++ b/chroot/doc.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + /* Package chroot provides convenience tooling specific to chroot builders. diff --git a/chroot/interpolate_context_provider.go b/chroot/interpolate_context_provider.go index 9aab670b5..37ddec00d 100644 --- a/chroot/interpolate_context_provider.go +++ b/chroot/interpolate_context_provider.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package chroot import "github.com/hashicorp/packer-plugin-sdk/template/interpolate" diff --git a/chroot/run_local_commands.go b/chroot/run_local_commands.go index 946ecda8e..6e597dc01 100644 --- a/chroot/run_local_commands.go +++ b/chroot/run_local_commands.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package chroot import ( diff --git a/chroot/step_chroot_provision.go b/chroot/step_chroot_provision.go index 4730619e6..af851b622 100644 --- a/chroot/step_chroot_provision.go +++ b/chroot/step_chroot_provision.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package chroot import ( diff --git a/chroot/step_copy_files.go b/chroot/step_copy_files.go index 869acb2bf..55e168e8c 100644 --- a/chroot/step_copy_files.go +++ b/chroot/step_copy_files.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package chroot import ( diff --git a/chroot/step_copy_files_test.go b/chroot/step_copy_files_test.go index 9eccb6552..c0f71eee4 100644 --- a/chroot/step_copy_files_test.go +++ b/chroot/step_copy_files_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package chroot import ( diff --git a/chroot/step_early_cleanup.go b/chroot/step_early_cleanup.go index f91681a11..df686d36f 100644 --- a/chroot/step_early_cleanup.go +++ b/chroot/step_early_cleanup.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package chroot import ( diff --git a/chroot/step_mount_extra.go b/chroot/step_mount_extra.go index 843a385cc..c26c5cd04 100644 --- a/chroot/step_mount_extra.go +++ b/chroot/step_mount_extra.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package chroot import ( diff --git a/chroot/step_mount_extra_test.go b/chroot/step_mount_extra_test.go index d53cc7056..f6cfe4a89 100644 --- a/chroot/step_mount_extra_test.go +++ b/chroot/step_mount_extra_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package chroot import "testing" diff --git a/chroot/step_post_mount_commands.go b/chroot/step_post_mount_commands.go index 803c61f20..1b7330067 100644 --- a/chroot/step_post_mount_commands.go +++ b/chroot/step_post_mount_commands.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package chroot import ( diff --git a/chroot/step_pre_mount_commands.go b/chroot/step_pre_mount_commands.go index 8434dd27f..19d61472f 100644 --- a/chroot/step_pre_mount_commands.go +++ b/chroot/step_pre_mount_commands.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package chroot import ( diff --git a/cmd/packer-sdc/internal/cmd/utils.go b/cmd/packer-sdc/internal/cmd/utils.go index ba45dd80c..fd9c82e96 100644 --- a/cmd/packer-sdc/internal/cmd/utils.go +++ b/cmd/packer-sdc/internal/cmd/utils.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package cmd import ( diff --git a/cmd/packer-sdc/internal/fs/sync.go b/cmd/packer-sdc/internal/fs/sync.go index 18d00a124..8cccfa541 100644 --- a/cmd/packer-sdc/internal/fs/sync.go +++ b/cmd/packer-sdc/internal/fs/sync.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package fs import ( diff --git a/cmd/packer-sdc/internal/fs/sync_test.go b/cmd/packer-sdc/internal/fs/sync_test.go index 911978de8..d0eb30ea5 100644 --- a/cmd/packer-sdc/internal/fs/sync_test.go +++ b/cmd/packer-sdc/internal/fs/sync_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package fs import ( diff --git a/cmd/packer-sdc/internal/mapstructure-to-hcl2/mapstructure-to-hcl2.go b/cmd/packer-sdc/internal/mapstructure-to-hcl2/mapstructure-to-hcl2.go index 453642700..7e2b4fb23 100644 --- a/cmd/packer-sdc/internal/mapstructure-to-hcl2/mapstructure-to-hcl2.go +++ b/cmd/packer-sdc/internal/mapstructure-to-hcl2/mapstructure-to-hcl2.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + // mapstructure-to-hcl2 fills the gaps between hcl2 and mapstructure for Packer // // By generating a struct that the HCL2 ecosystem understands making use of diff --git a/cmd/packer-sdc/internal/mapstructure-to-hcl2/mapstructure-to-hcl2_test.go b/cmd/packer-sdc/internal/mapstructure-to-hcl2/mapstructure-to-hcl2_test.go index 5e1a9cd35..658849c8a 100644 --- a/cmd/packer-sdc/internal/mapstructure-to-hcl2/mapstructure-to-hcl2_test.go +++ b/cmd/packer-sdc/internal/mapstructure-to-hcl2/mapstructure-to-hcl2_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + // mapstructure-to-hcl2 fills the gaps between hcl2 and mapstructure for Packer // // By generating a struct that the HCL2 ecosystem understands making use of diff --git a/cmd/packer-sdc/internal/plugincheck/cmd.go b/cmd/packer-sdc/internal/plugincheck/cmd.go index cfc0f93ea..a0d0183c2 100644 --- a/cmd/packer-sdc/internal/plugincheck/cmd.go +++ b/cmd/packer-sdc/internal/plugincheck/cmd.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package plugincheck import ( diff --git a/cmd/packer-sdc/internal/renderdocs/renderdocs.go b/cmd/packer-sdc/internal/renderdocs/renderdocs.go index e51b24d19..3e6c3c335 100644 --- a/cmd/packer-sdc/internal/renderdocs/renderdocs.go +++ b/cmd/packer-sdc/internal/renderdocs/renderdocs.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package renderdocs import ( diff --git a/cmd/packer-sdc/internal/renderdocs/renderdocs_test.go b/cmd/packer-sdc/internal/renderdocs/renderdocs_test.go index 795b4a6bc..60dd002df 100644 --- a/cmd/packer-sdc/internal/renderdocs/renderdocs_test.go +++ b/cmd/packer-sdc/internal/renderdocs/renderdocs_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package renderdocs import ( diff --git a/cmd/packer-sdc/internal/struct-markdown/struct_markdown.go b/cmd/packer-sdc/internal/struct-markdown/struct_markdown.go index c5fca3928..df0f91099 100644 --- a/cmd/packer-sdc/internal/struct-markdown/struct_markdown.go +++ b/cmd/packer-sdc/internal/struct-markdown/struct_markdown.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package struct_markdown import ( diff --git a/cmd/packer-sdc/internal/struct-markdown/struct_markdown_test.go b/cmd/packer-sdc/internal/struct-markdown/struct_markdown_test.go index 7909c6008..528150c6e 100644 --- a/cmd/packer-sdc/internal/struct-markdown/struct_markdown_test.go +++ b/cmd/packer-sdc/internal/struct-markdown/struct_markdown_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package struct_markdown import ( diff --git a/cmd/packer-sdc/internal/struct-markdown/template.go b/cmd/packer-sdc/internal/struct-markdown/template.go index 40aaab1cd..58407a4cd 100644 --- a/cmd/packer-sdc/internal/struct-markdown/template.go +++ b/cmd/packer-sdc/internal/struct-markdown/template.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package struct_markdown import ( diff --git a/cmd/packer-sdc/internal/test-data/packer-plugin-happycloud/builder/happycloud/config.go b/cmd/packer-sdc/internal/test-data/packer-plugin-happycloud/builder/happycloud/config.go index e1ee091c2..66d9e6e43 100644 --- a/cmd/packer-sdc/internal/test-data/packer-plugin-happycloud/builder/happycloud/config.go +++ b/cmd/packer-sdc/internal/test-data/packer-plugin-happycloud/builder/happycloud/config.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + //go:generate packer-sdc struct-markdown //go:generate packer-sdc mapstructure-to-hcl2 -type Config,CustomerEncryptionKey diff --git a/cmd/packer-sdc/main.go b/cmd/packer-sdc/main.go index 266538470..a5e6b7f03 100644 --- a/cmd/packer-sdc/main.go +++ b/cmd/packer-sdc/main.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package main import ( diff --git a/common/command.go b/common/command.go index aa9d2d308..16522d1cd 100644 --- a/common/command.go +++ b/common/command.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + // Package common provides the PackerConfig structure that gets passed to every // plugin and contains information populated by the Packer core. This config // contains data about command line flags that were used, as well as template diff --git a/common/packer_config.go b/common/packer_config.go index 34c3091a9..c5fcd46f4 100644 --- a/common/packer_config.go +++ b/common/packer_config.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package common const ( diff --git a/communicator/comm_host.go b/communicator/comm_host.go index a07b0b400..707876400 100644 --- a/communicator/comm_host.go +++ b/communicator/comm_host.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package communicator import ( diff --git a/communicator/config.go b/communicator/config.go index 81745b800..e75820503 100644 --- a/communicator/config.go +++ b/communicator/config.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + //go:generate packer-sdc struct-markdown //go:generate packer-sdc mapstructure-to-hcl2 -type Config,SSH,WinRM,SSHTemporaryKeyPair diff --git a/communicator/config_test.go b/communicator/config_test.go index 0607f12d5..a6371592e 100644 --- a/communicator/config_test.go +++ b/communicator/config_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package communicator import ( diff --git a/communicator/doc.go b/communicator/doc.go index e5990c9a6..fa91fe9f4 100644 --- a/communicator/doc.go +++ b/communicator/doc.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + /* Package communicator provides common steps for connecting to an instance using the Packer communicator. These steps can be implemented by builders. diff --git a/communicator/ssh/key_pair.go b/communicator/ssh/key_pair.go index 0ca6b95ec..e6eea53f8 100644 --- a/communicator/ssh/key_pair.go +++ b/communicator/ssh/key_pair.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package ssh import ( diff --git a/communicator/ssh/key_pair_test.go b/communicator/ssh/key_pair_test.go index 3c0e08ee6..e9656c8ae 100644 --- a/communicator/ssh/key_pair_test.go +++ b/communicator/ssh/key_pair_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package ssh import ( diff --git a/communicator/ssh/ssh.go b/communicator/ssh/ssh.go index 9c330bc27..510ed583c 100644 --- a/communicator/ssh/ssh.go +++ b/communicator/ssh/ssh.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + // Package SSH provides tooling for generating a temporary SSH keypair, and // provides tooling for connecting to an instance via a tunnel. package ssh diff --git a/communicator/ssh/tunnel.go b/communicator/ssh/tunnel.go index 7e30f0ef5..efc4f78f8 100644 --- a/communicator/ssh/tunnel.go +++ b/communicator/ssh/tunnel.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package ssh import ( diff --git a/communicator/ssh/tunnel_test.go b/communicator/ssh/tunnel_test.go index 99f75fdfb..e89227668 100644 --- a/communicator/ssh/tunnel_test.go +++ b/communicator/ssh/tunnel_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package ssh import ( diff --git a/communicator/sshkey/generate.go b/communicator/sshkey/generate.go index f6302015f..030d2f6e2 100644 --- a/communicator/sshkey/generate.go +++ b/communicator/sshkey/generate.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package sshkey import ( diff --git a/communicator/sshkey/generate_test.go b/communicator/sshkey/generate_test.go index 1de705a50..336efcbd4 100644 --- a/communicator/sshkey/generate_test.go +++ b/communicator/sshkey/generate_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package sshkey import ( diff --git a/communicator/sshkey/pubkey.go b/communicator/sshkey/pubkey.go index c80a5ca5f..c24b8dd47 100644 --- a/communicator/sshkey/pubkey.go +++ b/communicator/sshkey/pubkey.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package sshkey import ( diff --git a/communicator/sshkey/pubkey_test.go b/communicator/sshkey/pubkey_test.go index 1980602dd..9fac14710 100644 --- a/communicator/sshkey/pubkey_test.go +++ b/communicator/sshkey/pubkey_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package sshkey import ( diff --git a/communicator/step_connect.go b/communicator/step_connect.go index d28236f06..f53649414 100644 --- a/communicator/step_connect.go +++ b/communicator/step_connect.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package communicator import ( diff --git a/communicator/step_connect_ssh.go b/communicator/step_connect_ssh.go index fce6175f6..10b8a5092 100644 --- a/communicator/step_connect_ssh.go +++ b/communicator/step_connect_ssh.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package communicator import ( diff --git a/communicator/step_connect_test.go b/communicator/step_connect_test.go index 5a62a7b86..48c54cf6f 100644 --- a/communicator/step_connect_test.go +++ b/communicator/step_connect_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package communicator import ( diff --git a/communicator/step_connect_winrm.go b/communicator/step_connect_winrm.go index 5545b4152..8673f3e63 100644 --- a/communicator/step_connect_winrm.go +++ b/communicator/step_connect_winrm.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package communicator import ( diff --git a/communicator/step_debug_ssh_keys.go b/communicator/step_debug_ssh_keys.go index baf58a0cc..faf0789e9 100644 --- a/communicator/step_debug_ssh_keys.go +++ b/communicator/step_debug_ssh_keys.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package communicator import ( diff --git a/communicator/step_ssh_keygen.go b/communicator/step_ssh_keygen.go index 313b4c222..a277b2b13 100644 --- a/communicator/step_ssh_keygen.go +++ b/communicator/step_ssh_keygen.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package communicator import ( diff --git a/communicator/testing.go b/communicator/testing.go index d45a59c3d..d8abf0618 100644 --- a/communicator/testing.go +++ b/communicator/testing.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package communicator import ( diff --git a/communicator/winrm.go b/communicator/winrm.go index afdf2569d..a722af596 100644 --- a/communicator/winrm.go +++ b/communicator/winrm.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package communicator // WinRMConfig is configuration that can be returned at runtime to diff --git a/didyoumean/name_suggestion.go b/didyoumean/name_suggestion.go index 333811fc4..7e6a79a35 100644 --- a/didyoumean/name_suggestion.go +++ b/didyoumean/name_suggestion.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package didyoumean import ( diff --git a/filelock/doc.go b/filelock/doc.go index 0a89b5030..6b93d0a88 100644 --- a/filelock/doc.go +++ b/filelock/doc.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + /* Package filelock makes it easy to create and check file locks for concurrent processes. diff --git a/filelock/filelock.go b/filelock/filelock.go index 0949ded60..d24978325 100644 --- a/filelock/filelock.go +++ b/filelock/filelock.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + //go:build !solaris // +build !solaris diff --git a/filelock/filelock_solaris.go b/filelock/filelock_solaris.go index 06685254c..bc2a0af03 100644 --- a/filelock/filelock_solaris.go +++ b/filelock/filelock_solaris.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + // build solaris package filelock diff --git a/filelock/noop.go b/filelock/noop.go index ebf8f1967..ba3333f2c 100644 --- a/filelock/noop.go +++ b/filelock/noop.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package filelock // this lock does nothing diff --git a/guestexec/doc.go b/guestexec/doc.go index fb9e6e8c4..d63e4fca2 100644 --- a/guestexec/doc.go +++ b/guestexec/doc.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + /* Package guestexec provides a shim for running common operating system commands on the guest/remote instance that is being provisioned. It helps provisioners diff --git a/guestexec/elevated.go b/guestexec/elevated.go index 1a03a64b2..94d987fe6 100644 --- a/guestexec/elevated.go +++ b/guestexec/elevated.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package guestexec import ( diff --git a/guestexec/elevated_test.go b/guestexec/elevated_test.go index b81d0c55f..930034942 100644 --- a/guestexec/elevated_test.go +++ b/guestexec/elevated_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package guestexec import ( diff --git a/guestexec/guest_commands.go b/guestexec/guest_commands.go index 549ba3ccb..dfc315747 100644 --- a/guestexec/guest_commands.go +++ b/guestexec/guest_commands.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package guestexec import ( diff --git a/guestexec/guest_commands_test.go b/guestexec/guest_commands_test.go index d6300c8e3..b29eec06b 100644 --- a/guestexec/guest_commands_test.go +++ b/guestexec/guest_commands_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package guestexec import ( diff --git a/hcl2helper/doc.go b/hcl2helper/doc.go index d213fe8da..b12083941 100644 --- a/hcl2helper/doc.go +++ b/hcl2helper/doc.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + /* Package hcl2helper provides helper functions for parsing or getting hcl2 types to and from a Packer plugin config. */ diff --git a/hcl2helper/mock.go b/hcl2helper/mock.go index e2017c25b..5e2e49e0e 100644 --- a/hcl2helper/mock.go +++ b/hcl2helper/mock.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + //go:generate packer-sdc mapstructure-to-hcl2 -type MockConfig,NestedMockConfig,MockTag package hcl2helper diff --git a/hcl2helper/values.go b/hcl2helper/values.go index 882fc3988..345b33ce4 100644 --- a/hcl2helper/values.go +++ b/hcl2helper/values.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hcl2helper import ( diff --git a/hcl2helper/values_test.go b/hcl2helper/values_test.go index 35b613194..b5c4e3c8c 100644 --- a/hcl2helper/values_test.go +++ b/hcl2helper/values_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hcl2helper import ( diff --git a/json/unmarshal.go b/json/unmarshal.go index cbb27f487..2958d909c 100644 --- a/json/unmarshal.go +++ b/json/unmarshal.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package json import ( diff --git a/multistep/basic_runner.go b/multistep/basic_runner.go index 308894042..733f0c1b6 100644 --- a/multistep/basic_runner.go +++ b/multistep/basic_runner.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package multistep import ( diff --git a/multistep/basic_runner_test.go b/multistep/basic_runner_test.go index 51fbc54a9..b2502200c 100644 --- a/multistep/basic_runner_test.go +++ b/multistep/basic_runner_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package multistep import ( diff --git a/multistep/commonsteps/doc.go b/multistep/commonsteps/doc.go index d3f2717fe..aaaba8bd9 100644 --- a/multistep/commonsteps/doc.go +++ b/multistep/commonsteps/doc.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + /* The commonsteps package contains the multistep runner that comprises the main architectural convention of Packer builder plugins. It enables builders diff --git a/multistep/commonsteps/extra_iso_config.go b/multistep/commonsteps/extra_iso_config.go index 649ef4321..9d5bb3dc9 100644 --- a/multistep/commonsteps/extra_iso_config.go +++ b/multistep/commonsteps/extra_iso_config.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + //go:generate packer-sdc struct-markdown package commonsteps diff --git a/multistep/commonsteps/extra_iso_config_test.go b/multistep/commonsteps/extra_iso_config_test.go index 70b87057f..c3d23a9b7 100644 --- a/multistep/commonsteps/extra_iso_config_test.go +++ b/multistep/commonsteps/extra_iso_config_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package commonsteps import ( diff --git a/multistep/commonsteps/floppy_config.go b/multistep/commonsteps/floppy_config.go index c8c60ba83..40099e5f8 100644 --- a/multistep/commonsteps/floppy_config.go +++ b/multistep/commonsteps/floppy_config.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + //go:generate packer-sdc struct-markdown package commonsteps diff --git a/multistep/commonsteps/floppy_config_test.go b/multistep/commonsteps/floppy_config_test.go index 235652e24..dfa55cc48 100644 --- a/multistep/commonsteps/floppy_config_test.go +++ b/multistep/commonsteps/floppy_config_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package commonsteps import ( diff --git a/multistep/commonsteps/http_config.go b/multistep/commonsteps/http_config.go index d85d25780..202c97d4c 100644 --- a/multistep/commonsteps/http_config.go +++ b/multistep/commonsteps/http_config.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + //go:generate packer-sdc struct-markdown package commonsteps diff --git a/multistep/commonsteps/http_config_test.go b/multistep/commonsteps/http_config_test.go index add5c9304..29165b4d7 100644 --- a/multistep/commonsteps/http_config_test.go +++ b/multistep/commonsteps/http_config_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package commonsteps import ( diff --git a/multistep/commonsteps/iso_config.go b/multistep/commonsteps/iso_config.go index 1f2be7574..cf6f671cc 100644 --- a/multistep/commonsteps/iso_config.go +++ b/multistep/commonsteps/iso_config.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + //go:generate packer-sdc struct-markdown package commonsteps diff --git a/multistep/commonsteps/iso_config_test.go b/multistep/commonsteps/iso_config_test.go index 6cb674991..e75c7dd0a 100644 --- a/multistep/commonsteps/iso_config_test.go +++ b/multistep/commonsteps/iso_config_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + //go:build !windows // +build !windows diff --git a/multistep/commonsteps/multistep_debug.go b/multistep/commonsteps/multistep_debug.go index a53071bb9..84e46bb5f 100644 --- a/multistep/commonsteps/multistep_debug.go +++ b/multistep/commonsteps/multistep_debug.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package commonsteps import ( diff --git a/multistep/commonsteps/multistep_runner.go b/multistep/commonsteps/multistep_runner.go index b4d823a8e..e47dd1f3e 100644 --- a/multistep/commonsteps/multistep_runner.go +++ b/multistep/commonsteps/multistep_runner.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package commonsteps import ( diff --git a/multistep/commonsteps/step_cleanup_temp_keys.go b/multistep/commonsteps/step_cleanup_temp_keys.go index ce643f3d1..7439b2a98 100644 --- a/multistep/commonsteps/step_cleanup_temp_keys.go +++ b/multistep/commonsteps/step_cleanup_temp_keys.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package commonsteps import ( diff --git a/multistep/commonsteps/step_create_cdrom.go b/multistep/commonsteps/step_create_cdrom.go index 4da3d3906..7de45e95d 100644 --- a/multistep/commonsteps/step_create_cdrom.go +++ b/multistep/commonsteps/step_create_cdrom.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package commonsteps import ( diff --git a/multistep/commonsteps/step_create_cdrom_test.go b/multistep/commonsteps/step_create_cdrom_test.go index d384a5387..93942cfa6 100644 --- a/multistep/commonsteps/step_create_cdrom_test.go +++ b/multistep/commonsteps/step_create_cdrom_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package commonsteps import ( diff --git a/multistep/commonsteps/step_create_floppy.go b/multistep/commonsteps/step_create_floppy.go index 8097aaf7c..1757ca748 100644 --- a/multistep/commonsteps/step_create_floppy.go +++ b/multistep/commonsteps/step_create_floppy.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package commonsteps import ( diff --git a/multistep/commonsteps/step_create_floppy_test.go b/multistep/commonsteps/step_create_floppy_test.go index 507c0c798..57292ce3c 100644 --- a/multistep/commonsteps/step_create_floppy_test.go +++ b/multistep/commonsteps/step_create_floppy_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package commonsteps import ( diff --git a/multistep/commonsteps/step_download.go b/multistep/commonsteps/step_download.go index a9c7cd561..26a00285f 100644 --- a/multistep/commonsteps/step_download.go +++ b/multistep/commonsteps/step_download.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package commonsteps import ( diff --git a/multistep/commonsteps/step_download_test.go b/multistep/commonsteps/step_download_test.go index 95cf02a4e..bead7cc73 100644 --- a/multistep/commonsteps/step_download_test.go +++ b/multistep/commonsteps/step_download_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package commonsteps import ( diff --git a/multistep/commonsteps/step_http_server.go b/multistep/commonsteps/step_http_server.go index 3b4f7dc5b..884f0fbb6 100644 --- a/multistep/commonsteps/step_http_server.go +++ b/multistep/commonsteps/step_http_server.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package commonsteps import ( diff --git a/multistep/commonsteps/step_http_server_test.go b/multistep/commonsteps/step_http_server_test.go index 6634a0235..34d30cb0f 100644 --- a/multistep/commonsteps/step_http_server_test.go +++ b/multistep/commonsteps/step_http_server_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package commonsteps import ( diff --git a/multistep/commonsteps/step_output_dir.go b/multistep/commonsteps/step_output_dir.go index 94bc6fe1d..0b5d54dae 100644 --- a/multistep/commonsteps/step_output_dir.go +++ b/multistep/commonsteps/step_output_dir.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package commonsteps import ( diff --git a/multistep/commonsteps/step_output_dir_test.go b/multistep/commonsteps/step_output_dir_test.go index 5b723c5dd..2bb458b9b 100644 --- a/multistep/commonsteps/step_output_dir_test.go +++ b/multistep/commonsteps/step_output_dir_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package commonsteps import ( diff --git a/multistep/commonsteps/step_provision.go b/multistep/commonsteps/step_provision.go index 3b02dcea5..77d7340aa 100644 --- a/multistep/commonsteps/step_provision.go +++ b/multistep/commonsteps/step_provision.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package commonsteps import ( diff --git a/multistep/commonsteps/step_provision_test.go b/multistep/commonsteps/step_provision_test.go index 18a809041..eb1ebe3c3 100644 --- a/multistep/commonsteps/step_provision_test.go +++ b/multistep/commonsteps/step_provision_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package commonsteps import ( diff --git a/multistep/debug_runner.go b/multistep/debug_runner.go index 48b509a7f..e61c263a0 100644 --- a/multistep/debug_runner.go +++ b/multistep/debug_runner.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package multistep import ( diff --git a/multistep/debug_runner_test.go b/multistep/debug_runner_test.go index 5cd744139..02ad2e181 100644 --- a/multistep/debug_runner_test.go +++ b/multistep/debug_runner_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package multistep import ( diff --git a/multistep/doc.go b/multistep/doc.go index 002069fc9..a171eabc8 100644 --- a/multistep/doc.go +++ b/multistep/doc.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + /* multistep is a Go library for building up complex actions using discrete, individual "steps." These steps are strung together and run in sequence diff --git a/multistep/if.go b/multistep/if.go index f9705af62..ddbb4289b 100644 --- a/multistep/if.go +++ b/multistep/if.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package multistep // if returns step only if on is true. diff --git a/multistep/multistep.go b/multistep/multistep.go index a3e427c0c..e7912b685 100644 --- a/multistep/multistep.go +++ b/multistep/multistep.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + // multistep is a library for building up complex actions using individual, // discrete steps. package multistep diff --git a/multistep/multistep_test.go b/multistep/multistep_test.go index 592990184..360b5b809 100644 --- a/multistep/multistep_test.go +++ b/multistep/multistep_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package multistep import "context" diff --git a/multistep/statebag.go b/multistep/statebag.go index 02a69871f..8bc4012b6 100644 --- a/multistep/statebag.go +++ b/multistep/statebag.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package multistep import "sync" diff --git a/multistep/statebag_test.go b/multistep/statebag_test.go index 1793ee6e2..09ed626a7 100644 --- a/multistep/statebag_test.go +++ b/multistep/statebag_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package multistep import ( diff --git a/net/configure_port.go b/net/configure_port.go index 6cc3d3d6c..c0c4e981a 100644 --- a/net/configure_port.go +++ b/net/configure_port.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + // Package net contains some helper wrapping functions for the http and net // golang libraries that meet Packer-specific needs. package net diff --git a/net/configure_port_test.go b/net/configure_port_test.go index 2d81afdc9..7aeac2738 100644 --- a/net/configure_port_test.go +++ b/net/configure_port_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package net import ( diff --git a/net/default_client.go b/net/default_client.go index ae9b30b29..a090f33ec 100644 --- a/net/default_client.go +++ b/net/default_client.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package net import ( diff --git a/packer/artifact.go b/packer/artifact.go index 8eaf3bcd5..2f897343a 100644 --- a/packer/artifact.go +++ b/packer/artifact.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package packer // An Artifact is the result of a build, and is the metadata that documents diff --git a/packer/artifact_mock.go b/packer/artifact_mock.go index 8f195c571..d914ae402 100644 --- a/packer/artifact_mock.go +++ b/packer/artifact_mock.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package packer // MockArtifact is an implementation of Artifact that can be used for tests. diff --git a/packer/artifact_test.go b/packer/artifact_test.go index 2bbb172a6..5b100712d 100644 --- a/packer/artifact_test.go +++ b/packer/artifact_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package packer type TestArtifact struct { diff --git a/packer/build.go b/packer/build.go index 7bfbb1420..15e8c977f 100644 --- a/packer/build.go +++ b/packer/build.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package packer import "context" diff --git a/packer/builder.go b/packer/builder.go index 11bdc3046..0954ea13a 100644 --- a/packer/builder.go +++ b/packer/builder.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package packer import ( diff --git a/packer/builder_mock.go b/packer/builder_mock.go index f76ca6d44..f53141efa 100644 --- a/packer/builder_mock.go +++ b/packer/builder_mock.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + //go:generate packer-sdc mapstructure-to-hcl2 -type MockBuilder package packer diff --git a/packer/cache.go b/packer/cache.go index 70f381b11..e08c6bc45 100644 --- a/packer/cache.go +++ b/packer/cache.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package packer import ( diff --git a/packer/cache_config_unix.go b/packer/cache_config_unix.go index f05dd1677..f61fad677 100644 --- a/packer/cache_config_unix.go +++ b/packer/cache_config_unix.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + //go:build darwin || freebsd || linux || netbsd || openbsd || solaris // +build darwin freebsd linux netbsd openbsd solaris diff --git a/packer/cache_config_unix_test.go b/packer/cache_config_unix_test.go index ec7cb1bb0..72dd6d775 100644 --- a/packer/cache_config_unix_test.go +++ b/packer/cache_config_unix_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + //go:build darwin || freebsd || linux || netbsd || openbsd || solaris // +build darwin freebsd linux netbsd openbsd solaris diff --git a/packer/cache_config_windows.go b/packer/cache_config_windows.go index a5b128c28..666ce7b3a 100644 --- a/packer/cache_config_windows.go +++ b/packer/cache_config_windows.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + //go:build windows // +build windows diff --git a/packer/cache_config_windows_test.go b/packer/cache_config_windows_test.go index 92e8dcb50..7dbbb608b 100644 --- a/packer/cache_config_windows_test.go +++ b/packer/cache_config_windows_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + //go:build windows // +build windows diff --git a/packer/communicator.go b/packer/communicator.go index 026737d4b..0317aa5aa 100644 --- a/packer/communicator.go +++ b/packer/communicator.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package packer import ( diff --git a/packer/communicator_mock.go b/packer/communicator_mock.go index 00b043a91..e27a6c162 100644 --- a/packer/communicator_mock.go +++ b/packer/communicator_mock.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package packer import ( diff --git a/packer/communicator_mock_test.go b/packer/communicator_mock_test.go index 7aa92b070..5558a149d 100644 --- a/packer/communicator_mock_test.go +++ b/packer/communicator_mock_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package packer import ( diff --git a/packer/communicator_test.go b/packer/communicator_test.go index e334d0d52..25e475a21 100644 --- a/packer/communicator_test.go +++ b/packer/communicator_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package packer import ( diff --git a/packer/datasource.go b/packer/datasource.go index 556aac22f..d68e12e29 100644 --- a/packer/datasource.go +++ b/packer/datasource.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package packer import ( diff --git a/packer/datasource_mock.go b/packer/datasource_mock.go index 65b11ba6b..18c030cd0 100644 --- a/packer/datasource_mock.go +++ b/packer/datasource_mock.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + //go:generate packer-sdc mapstructure-to-hcl2 -type MockDatasource,MockDatasourceResponse package packer diff --git a/packer/doc.go b/packer/doc.go index ada2bbd4c..6f7704c09 100644 --- a/packer/doc.go +++ b/packer/doc.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + /* Package packer contains all of the interfaces for key Packer objects. diff --git a/packer/hcl2spec.go b/packer/hcl2spec.go index bbba47ec3..6ea525b28 100644 --- a/packer/hcl2spec.go +++ b/packer/hcl2spec.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package packer import "github.com/hashicorp/hcl/v2/hcldec" diff --git a/packer/hook.go b/packer/hook.go index ee8104ac9..3270a6565 100644 --- a/packer/hook.go +++ b/packer/hook.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package packer import ( diff --git a/packer/hook_mock.go b/packer/hook_mock.go index 16571f1fe..e56e0b627 100644 --- a/packer/hook_mock.go +++ b/packer/hook_mock.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package packer import ( diff --git a/packer/hook_test.go b/packer/hook_test.go index efe0f0fd0..7574b9ce9 100644 --- a/packer/hook_test.go +++ b/packer/hook_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package packer import ( diff --git a/packer/logs.go b/packer/logs.go index 209b66ca3..0d5ad89b8 100644 --- a/packer/logs.go +++ b/packer/logs.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package packer import ( diff --git a/packer/maps.go b/packer/maps.go index 86ef6ab28..470e3aa97 100644 --- a/packer/maps.go +++ b/packer/maps.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package packer import ( diff --git a/packer/multi_error.go b/packer/multi_error.go index 5880612d5..4bddd7bf1 100644 --- a/packer/multi_error.go +++ b/packer/multi_error.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package packer import ( diff --git a/packer/multi_error_test.go b/packer/multi_error_test.go index 05463e690..0029c0e9a 100644 --- a/packer/multi_error_test.go +++ b/packer/multi_error_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package packer import ( diff --git a/packer/post_processor.go b/packer/post_processor.go index e99bcdd8a..c125d403f 100644 --- a/packer/post_processor.go +++ b/packer/post_processor.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package packer import ( diff --git a/packer/provisioner.go b/packer/provisioner.go index 1f70e70a9..4a3619d89 100644 --- a/packer/provisioner.go +++ b/packer/provisioner.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package packer import "context" diff --git a/packer/provisioner_mock.go b/packer/provisioner_mock.go index 73bae6b8a..b4b667a5b 100644 --- a/packer/provisioner_mock.go +++ b/packer/provisioner_mock.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + //go:generate packer-sdc mapstructure-to-hcl2 -type MockProvisioner package packer diff --git a/packer/registry/image/fromartifact_example_test.go b/packer/registry/image/fromartifact_example_test.go index b6c1e7390..b8b239a8e 100644 --- a/packer/registry/image/fromartifact_example_test.go +++ b/packer/registry/image/fromartifact_example_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package image_test import ( diff --git a/packer/registry/image/frommappeddata_example_test.go b/packer/registry/image/frommappeddata_example_test.go index 4e1489c3f..c8acdef82 100644 --- a/packer/registry/image/frommappeddata_example_test.go +++ b/packer/registry/image/frommappeddata_example_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package image_test import ( diff --git a/packer/registry/image/image.go b/packer/registry/image/image.go index 9c86e16b4..834a603d8 100644 --- a/packer/registry/image/image.go +++ b/packer/registry/image/image.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + /* Package image allows for the management of image metadata that can be stored in a HCP Packer registry. */ package image diff --git a/packer/registry/image/image_test.go b/packer/registry/image/image_test.go index 57b0479fd..e1192f027 100644 --- a/packer/registry/image/image_test.go +++ b/packer/registry/image/image_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package image import ( diff --git a/packer/ui.go b/packer/ui.go index 7d75fc5a8..3cce1c775 100644 --- a/packer/ui.go +++ b/packer/ui.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package packer import ( diff --git a/packer/ui_mock.go b/packer/ui_mock.go index fcf935fa9..48242146f 100644 --- a/packer/ui_mock.go +++ b/packer/ui_mock.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package packer import ( diff --git a/packerbuilderdata/generated_data.go b/packerbuilderdata/generated_data.go index ba78fbbac..3f8e982d3 100644 --- a/packerbuilderdata/generated_data.go +++ b/packerbuilderdata/generated_data.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + // Package packerbuilderdata provides tooling for setting and getting special // builder-generated data that will be passed to the provisioners. This data // should be limited to runtime data like instance id, ip address, and other diff --git a/packerbuilderdata/generated_data_test.go b/packerbuilderdata/generated_data_test.go index 0f47b00ad..666a0816a 100644 --- a/packerbuilderdata/generated_data_test.go +++ b/packerbuilderdata/generated_data_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package packerbuilderdata import ( diff --git a/pathing/config_file.go b/pathing/config_file.go index f21deff2f..8256176e7 100644 --- a/pathing/config_file.go +++ b/pathing/config_file.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + // Package pathing determines where to put the Packer config directory based on // host OS architecture and user environment variables. package pathing diff --git a/pathing/config_file_test.go b/pathing/config_file_test.go index 26db9997e..6f9dbf666 100644 --- a/pathing/config_file_test.go +++ b/pathing/config_file_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package pathing import ( diff --git a/pathing/config_file_unix.go b/pathing/config_file_unix.go index 8396e9f62..b3b5276de 100644 --- a/pathing/config_file_unix.go +++ b/pathing/config_file_unix.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + //go:build darwin || freebsd || linux || netbsd || openbsd || solaris // +build darwin freebsd linux netbsd openbsd solaris diff --git a/pathing/config_file_unix_test.go b/pathing/config_file_unix_test.go index a6b1ad910..7cb99f532 100644 --- a/pathing/config_file_unix_test.go +++ b/pathing/config_file_unix_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + //go:build darwin || freebsd || linux || netbsd || openbsd || solaris // +build darwin freebsd linux netbsd openbsd solaris diff --git a/pathing/config_file_windows.go b/pathing/config_file_windows.go index b19f73c5a..1c2eff10c 100644 --- a/pathing/config_file_windows.go +++ b/pathing/config_file_windows.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + //go:build windows // +build windows diff --git a/pathing/config_file_windows_test.go b/pathing/config_file_windows_test.go index 1e03c9157..d92d24612 100644 --- a/pathing/config_file_windows_test.go +++ b/pathing/config_file_windows_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + //go:build windows // +build windows diff --git a/plugin/server.go b/plugin/server.go index d7395e40b..5c657efab 100644 --- a/plugin/server.go +++ b/plugin/server.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + // The plugin package provides the functionality to both expose a Packer // plugin binary and to connect to an existing Packer plugin binary. // diff --git a/plugin/server_test.go b/plugin/server_test.go index 027c8d897..4fc032928 100644 --- a/plugin/server_test.go +++ b/plugin/server_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package plugin import ( diff --git a/plugin/set.go b/plugin/set.go index 0555b26d0..20e6dd296 100644 --- a/plugin/set.go +++ b/plugin/set.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package plugin import ( diff --git a/plugin/set_test.go b/plugin/set_test.go index 980b91c47..0a974e88f 100644 --- a/plugin/set_test.go +++ b/plugin/set_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package plugin import ( diff --git a/random/string.go b/random/string.go index 21c286532..508f64952 100644 --- a/random/string.go +++ b/random/string.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + // Package random is a helper for generating random alphanumeric strings. package random diff --git a/retry/retry.go b/retry/retry.go index 7b36f3c61..072c572cb 100644 --- a/retry/retry.go +++ b/retry/retry.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + // Package retry provides tooling to retry API calls which are known to be // vulnerable to throttling or flakiness due to eventual consistency. package retry diff --git a/retry/retry_test.go b/retry/retry_test.go index 41ecc16c3..5ed73a3ef 100644 --- a/retry/retry_test.go +++ b/retry/retry_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package retry import ( diff --git a/retry/utils_test.go b/retry/utils_test.go index a23a7d578..7ac24b235 100644 --- a/retry/utils_test.go +++ b/retry/utils_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package retry import ( diff --git a/rpc/artifact.go b/rpc/artifact.go index dde49c8fe..285fd6764 100644 --- a/rpc/artifact.go +++ b/rpc/artifact.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package rpc import ( diff --git a/rpc/artifact_test.go b/rpc/artifact_test.go index 7a0fb8fa3..668226858 100644 --- a/rpc/artifact_test.go +++ b/rpc/artifact_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package rpc import ( diff --git a/rpc/build.go b/rpc/build.go index b5eb851ed..30af72c9d 100644 --- a/rpc/build.go +++ b/rpc/build.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package rpc import ( diff --git a/rpc/build_test.go b/rpc/build_test.go index 2f35eb34a..1ac54191f 100644 --- a/rpc/build_test.go +++ b/rpc/build_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package rpc import ( diff --git a/rpc/builder.go b/rpc/builder.go index 99761d42e..d6d5530d7 100644 --- a/rpc/builder.go +++ b/rpc/builder.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package rpc import ( diff --git a/rpc/builder_test.go b/rpc/builder_test.go index 0cf1c4ba8..4589ed256 100644 --- a/rpc/builder_test.go +++ b/rpc/builder_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package rpc import ( diff --git a/rpc/client.go b/rpc/client.go index 90e3244da..5c660c638 100644 --- a/rpc/client.go +++ b/rpc/client.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package rpc import ( diff --git a/rpc/client_test.go b/rpc/client_test.go index d38d88d0e..52e6f4acd 100644 --- a/rpc/client_test.go +++ b/rpc/client_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package rpc import ( diff --git a/rpc/common.go b/rpc/common.go index 7044ebcaf..c16841691 100644 --- a/rpc/common.go +++ b/rpc/common.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package rpc import ( diff --git a/rpc/communicator.go b/rpc/communicator.go index 02b55eeca..8a8808eff 100644 --- a/rpc/communicator.go +++ b/rpc/communicator.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package rpc import ( diff --git a/rpc/communicator_test.go b/rpc/communicator_test.go index ade2bda8b..4d490213c 100644 --- a/rpc/communicator_test.go +++ b/rpc/communicator_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package rpc import ( diff --git a/rpc/cty_encode.go b/rpc/cty_encode.go index 570e0ee13..429abc4db 100644 --- a/rpc/cty_encode.go +++ b/rpc/cty_encode.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package rpc import ( diff --git a/rpc/datasource.go b/rpc/datasource.go index 53ee90553..443eeee85 100644 --- a/rpc/datasource.go +++ b/rpc/datasource.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package rpc import ( diff --git a/rpc/datasource_test.go b/rpc/datasource_test.go index 520fb80e0..73e901f55 100644 --- a/rpc/datasource_test.go +++ b/rpc/datasource_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package rpc import ( diff --git a/rpc/error.go b/rpc/error.go index c3ab7b1a4..c9a831e5b 100644 --- a/rpc/error.go +++ b/rpc/error.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package rpc // This is a type that wraps error types so that they can be messaged diff --git a/rpc/error_test.go b/rpc/error_test.go index 8c5cbd7fa..991c38833 100644 --- a/rpc/error_test.go +++ b/rpc/error_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package rpc import ( diff --git a/rpc/fileinfo.go b/rpc/fileinfo.go index 299a93138..3e9a17a86 100644 --- a/rpc/fileinfo.go +++ b/rpc/fileinfo.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package rpc import ( diff --git a/rpc/fileinfo_test.go b/rpc/fileinfo_test.go index 8eefd0f57..ed9da3907 100644 --- a/rpc/fileinfo_test.go +++ b/rpc/fileinfo_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package rpc import ( diff --git a/rpc/hook.go b/rpc/hook.go index 7971501ff..bd9cd42e1 100644 --- a/rpc/hook.go +++ b/rpc/hook.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package rpc import ( diff --git a/rpc/hook_test.go b/rpc/hook_test.go index ddf996580..22be0ffef 100644 --- a/rpc/hook_test.go +++ b/rpc/hook_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package rpc import ( diff --git a/rpc/init.go b/rpc/init.go index eeeb9e0c1..6e8b49b85 100644 --- a/rpc/init.go +++ b/rpc/init.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + /* Package rpc contains the implementation of the remote procedure call code that the Packer core uses to communicate with packer plugins. As a plugin maintainer, diff --git a/rpc/mux_broker.go b/rpc/mux_broker.go index 64653b1ed..6d0b10593 100644 --- a/rpc/mux_broker.go +++ b/rpc/mux_broker.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package rpc import ( diff --git a/rpc/mux_broker_test.go b/rpc/mux_broker_test.go index 9f3f7bcd9..12fbc5f6b 100644 --- a/rpc/mux_broker_test.go +++ b/rpc/mux_broker_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package rpc import ( diff --git a/rpc/post_processor.go b/rpc/post_processor.go index 9c2de87b6..04c87db9d 100644 --- a/rpc/post_processor.go +++ b/rpc/post_processor.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package rpc import ( diff --git a/rpc/post_processor_test.go b/rpc/post_processor_test.go index 3dd4d874b..c8ef15303 100644 --- a/rpc/post_processor_test.go +++ b/rpc/post_processor_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package rpc import ( diff --git a/rpc/provisioner.go b/rpc/provisioner.go index ebf6b640f..8bd98e783 100644 --- a/rpc/provisioner.go +++ b/rpc/provisioner.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package rpc import ( diff --git a/rpc/provisioner_test.go b/rpc/provisioner_test.go index 1ac4e64c3..e9be74a6d 100644 --- a/rpc/provisioner_test.go +++ b/rpc/provisioner_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package rpc import ( diff --git a/rpc/server.go b/rpc/server.go index 2c2863f84..3e1a241cc 100644 --- a/rpc/server.go +++ b/rpc/server.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package rpc import ( diff --git a/rpc/server_test.go b/rpc/server_test.go index 9ab1e3e8e..ac74610e6 100644 --- a/rpc/server_test.go +++ b/rpc/server_test.go @@ -1 +1,4 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package rpc diff --git a/rpc/ui.go b/rpc/ui.go index 61032413a..ed3e673d3 100644 --- a/rpc/ui.go +++ b/rpc/ui.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package rpc import ( diff --git a/rpc/ui_progress_tracking.go b/rpc/ui_progress_tracking.go index 92fd5dd59..27d1b5477 100644 --- a/rpc/ui_progress_tracking.go +++ b/rpc/ui_progress_tracking.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package rpc import ( diff --git a/rpc/ui_test.go b/rpc/ui_test.go index a3df10df1..5b3c2abf6 100644 --- a/rpc/ui_test.go +++ b/rpc/ui_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package rpc import ( diff --git a/sdk-internals/communicator/none/communicator.go b/sdk-internals/communicator/none/communicator.go index d37804961..c0232bba7 100644 --- a/sdk-internals/communicator/none/communicator.go +++ b/sdk-internals/communicator/none/communicator.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + // Package none implements the 'none' communicator. Plugin maintainers should not // import this package directly, instead using the tooling in the // "packer-plugin-sdk/communicator" module. diff --git a/sdk-internals/communicator/none/communicator_test.go b/sdk-internals/communicator/none/communicator_test.go index 4a73a6c8d..fb7c3d9f4 100644 --- a/sdk-internals/communicator/none/communicator_test.go +++ b/sdk-internals/communicator/none/communicator_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package none import ( diff --git a/sdk-internals/communicator/ssh/communicator.go b/sdk-internals/communicator/ssh/communicator.go index 9b08af181..a6b789cd2 100644 --- a/sdk-internals/communicator/ssh/communicator.go +++ b/sdk-internals/communicator/ssh/communicator.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + // Package ssh implements the SSH communicator. Plugin maintainers should not // import this package directly, instead using the tooling in the // "packer-plugin-sdk/communicator" module. diff --git a/sdk-internals/communicator/ssh/communicator_test.go b/sdk-internals/communicator/ssh/communicator_test.go index 9d1680755..9f1781204 100644 --- a/sdk-internals/communicator/ssh/communicator_test.go +++ b/sdk-internals/communicator/ssh/communicator_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + //go:build !race // +build !race diff --git a/sdk-internals/communicator/ssh/connect.go b/sdk-internals/communicator/ssh/connect.go index 4216ec35d..4e134c9aa 100644 --- a/sdk-internals/communicator/ssh/connect.go +++ b/sdk-internals/communicator/ssh/connect.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package ssh import ( diff --git a/sdk-internals/communicator/ssh/connect_test.go b/sdk-internals/communicator/ssh/connect_test.go index a241eeb44..ac288cfb5 100644 --- a/sdk-internals/communicator/ssh/connect_test.go +++ b/sdk-internals/communicator/ssh/connect_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package ssh_test import ( diff --git a/sdk-internals/communicator/ssh/connection.go b/sdk-internals/communicator/ssh/connection.go index c3df04543..9d9e88cae 100644 --- a/sdk-internals/communicator/ssh/connection.go +++ b/sdk-internals/communicator/ssh/connection.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package ssh import ( diff --git a/sdk-internals/communicator/ssh/keyboard_interactive.go b/sdk-internals/communicator/ssh/keyboard_interactive.go index 417ab00ae..e7d58c6e7 100644 --- a/sdk-internals/communicator/ssh/keyboard_interactive.go +++ b/sdk-internals/communicator/ssh/keyboard_interactive.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package ssh import ( diff --git a/sdk-internals/communicator/ssh/keyboard_interactive_test.go b/sdk-internals/communicator/ssh/keyboard_interactive_test.go index fc1bbfd45..00968a9f8 100644 --- a/sdk-internals/communicator/ssh/keyboard_interactive_test.go +++ b/sdk-internals/communicator/ssh/keyboard_interactive_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package ssh import ( diff --git a/sdk-internals/communicator/ssh/password.go b/sdk-internals/communicator/ssh/password.go index 774be47f1..865e5618e 100644 --- a/sdk-internals/communicator/ssh/password.go +++ b/sdk-internals/communicator/ssh/password.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package ssh import ( diff --git a/sdk-internals/communicator/ssh/password_test.go b/sdk-internals/communicator/ssh/password_test.go index 47a4c7782..985d36e7a 100644 --- a/sdk-internals/communicator/ssh/password_test.go +++ b/sdk-internals/communicator/ssh/password_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package ssh import ( diff --git a/sdk-internals/communicator/ssh/tunnel.go b/sdk-internals/communicator/ssh/tunnel.go index c99a1d1d8..cf8037433 100644 --- a/sdk-internals/communicator/ssh/tunnel.go +++ b/sdk-internals/communicator/ssh/tunnel.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package ssh import ( diff --git a/sdk-internals/communicator/winrm/communicator.go b/sdk-internals/communicator/winrm/communicator.go index 11398c994..8b18aa4fa 100644 --- a/sdk-internals/communicator/winrm/communicator.go +++ b/sdk-internals/communicator/winrm/communicator.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + // Package winrm implements the WinRM communicator. Plugin maintainers should not // import this package directly, instead using the tooling in the // "packer-plugin-sdk/communicator" module. diff --git a/sdk-internals/communicator/winrm/communicator_test.go b/sdk-internals/communicator/winrm/communicator_test.go index 207f0b075..2355a3a03 100644 --- a/sdk-internals/communicator/winrm/communicator_test.go +++ b/sdk-internals/communicator/winrm/communicator_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package winrm import ( diff --git a/sdk-internals/communicator/winrm/config.go b/sdk-internals/communicator/winrm/config.go index 728336734..a7e1bfd31 100644 --- a/sdk-internals/communicator/winrm/config.go +++ b/sdk-internals/communicator/winrm/config.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package winrm import ( diff --git a/sdk-internals/communicator/winrm/time.go b/sdk-internals/communicator/winrm/time.go index f8fb6fe8d..d5eccd3ca 100644 --- a/sdk-internals/communicator/winrm/time.go +++ b/sdk-internals/communicator/winrm/time.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package winrm import ( diff --git a/sdk-internals/communicator/winrm/time_test.go b/sdk-internals/communicator/winrm/time_test.go index 4daf4cedf..56f2cc732 100644 --- a/sdk-internals/communicator/winrm/time_test.go +++ b/sdk-internals/communicator/winrm/time_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package winrm import ( diff --git a/shell-local/communicator.go b/shell-local/communicator.go index 4c2cc0c98..01c996cde 100644 --- a/shell-local/communicator.go +++ b/shell-local/communicator.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package shell_local import ( diff --git a/shell-local/communicator_test.go b/shell-local/communicator_test.go index fb75de6a7..05d5229a7 100644 --- a/shell-local/communicator_test.go +++ b/shell-local/communicator_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package shell_local import ( diff --git a/shell-local/config.go b/shell-local/config.go index cb04e62b2..4e3f1d2fc 100644 --- a/shell-local/config.go +++ b/shell-local/config.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + //go:generate packer-sdc mapstructure-to-hcl2 -type Config package shell_local diff --git a/shell-local/config_test.go b/shell-local/config_test.go index 7c74581ae..4e74c8117 100644 --- a/shell-local/config_test.go +++ b/shell-local/config_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package shell_local import ( diff --git a/shell-local/doc.go b/shell-local/doc.go index 1c7a21ead..c1c57f108 100644 --- a/shell-local/doc.go +++ b/shell-local/doc.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + /* Package shell-local is designed to make it easier to shell out locally on the machine running Packer. The top level tools in this package are probably not diff --git a/shell-local/localexec/run_and_stream.go b/shell-local/localexec/run_and_stream.go index b4c595309..2691a7ec5 100644 --- a/shell-local/localexec/run_and_stream.go +++ b/shell-local/localexec/run_and_stream.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package localexec import ( diff --git a/shell-local/localexec/run_and_stream_test.go b/shell-local/localexec/run_and_stream_test.go index 533b72801..a290e9379 100644 --- a/shell-local/localexec/run_and_stream_test.go +++ b/shell-local/localexec/run_and_stream_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package localexec import ( diff --git a/shell-local/run.go b/shell-local/run.go index 71404db7c..cc97cc76a 100644 --- a/shell-local/run.go +++ b/shell-local/run.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package shell_local import ( diff --git a/shell/exit_code.go b/shell/exit_code.go index f39ac1940..4e620289c 100644 --- a/shell/exit_code.go +++ b/shell/exit_code.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package shell import "fmt" diff --git a/shell/exit_code_test.go b/shell/exit_code_test.go index c0ce58e99..3ce90f929 100644 --- a/shell/exit_code_test.go +++ b/shell/exit_code_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package shell import ( diff --git a/shell/shell.go b/shell/shell.go index 0e69cd955..ca3ed87be 100644 --- a/shell/shell.go +++ b/shell/shell.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + // Package shell defines configuration fields that are common to many different // kinds of shell. For example, this common configuration is imported by the // "shell", "shell-local", and "powershell" provisioners. This provides diff --git a/shutdowncommand/config.go b/shutdowncommand/config.go index 64def8c3e..50e5b1fbc 100644 --- a/shutdowncommand/config.go +++ b/shutdowncommand/config.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + //go:generate packer-sdc struct-markdown //Package shutdowncommand is a helper module for builder plugin configuration. diff --git a/shutdowncommand/config_test.go b/shutdowncommand/config_test.go index e5ff042ec..7323f918d 100644 --- a/shutdowncommand/config_test.go +++ b/shutdowncommand/config_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package shutdowncommand import ( diff --git a/template/config/custom_types.go b/template/config/custom_types.go index d252e3f4f..a95858897 100644 --- a/template/config/custom_types.go +++ b/template/config/custom_types.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + //go:generate packer-sdc mapstructure-to-hcl2 -type KeyValue,KeyValues,KeyValueFilter,NameValue,NameValues,NameValueFilter package config diff --git a/template/config/custom_types_test.go b/template/config/custom_types_test.go index 2a7cb933a..1b214c230 100644 --- a/template/config/custom_types_test.go +++ b/template/config/custom_types_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package config import ( diff --git a/template/config/decode.go b/template/config/decode.go index 96b5a553a..a9417e73a 100644 --- a/template/config/decode.go +++ b/template/config/decode.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package config import ( diff --git a/template/config/decode_test.go b/template/config/decode_test.go index 3776e0aae..3ca94e65a 100644 --- a/template/config/decode_test.go +++ b/template/config/decode_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package config import ( diff --git a/template/config/deprecated_options.go b/template/config/deprecated_options.go index bb53c7d01..1572b5511 100644 --- a/template/config/deprecated_options.go +++ b/template/config/deprecated_options.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + // package config diff --git a/template/doc.go b/template/doc.go index 355460e5b..a7036b20c 100644 --- a/template/doc.go +++ b/template/doc.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + /* Package template helps plugins parse the Packer template into golang structures. diff --git a/template/funcs.go b/template/funcs.go index cf1e691dd..13cd2e344 100644 --- a/template/funcs.go +++ b/template/funcs.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package template import ( diff --git a/template/interpolate/aws/secretsmanager/secretsmanager.go b/template/interpolate/aws/secretsmanager/secretsmanager.go index b7e77ab5e..856a88e85 100644 --- a/template/interpolate/aws/secretsmanager/secretsmanager.go +++ b/template/interpolate/aws/secretsmanager/secretsmanager.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + // Package secretsmanager provide methods to get data from // AWS Secret Manager package secretsmanager diff --git a/template/interpolate/aws/secretsmanager/secretsmanager_test.go b/template/interpolate/aws/secretsmanager/secretsmanager_test.go index eacd41f83..a2d872a5a 100644 --- a/template/interpolate/aws/secretsmanager/secretsmanager_test.go +++ b/template/interpolate/aws/secretsmanager/secretsmanager_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package secretsmanager import ( diff --git a/template/interpolate/aws/secretsmanager/types.go b/template/interpolate/aws/secretsmanager/types.go index 6cd1dc46e..37a30cbc7 100644 --- a/template/interpolate/aws/secretsmanager/types.go +++ b/template/interpolate/aws/secretsmanager/types.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package secretsmanager // AWSConfig store configuration used to initialize diff --git a/template/interpolate/funcs.go b/template/interpolate/funcs.go index f2878742c..930c4832f 100644 --- a/template/interpolate/funcs.go +++ b/template/interpolate/funcs.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package interpolate import ( diff --git a/template/interpolate/funcs_test.go b/template/interpolate/funcs_test.go index 5be7298fd..7eec8c3f3 100644 --- a/template/interpolate/funcs_test.go +++ b/template/interpolate/funcs_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package interpolate import ( diff --git a/template/interpolate/i.go b/template/interpolate/i.go index 8ad4e50df..ef092695f 100644 --- a/template/interpolate/i.go +++ b/template/interpolate/i.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package interpolate import ( diff --git a/template/interpolate/i_test.go b/template/interpolate/i_test.go index a678afbc4..a71e105a3 100644 --- a/template/interpolate/i_test.go +++ b/template/interpolate/i_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package interpolate import ( diff --git a/template/interpolate/parse.go b/template/interpolate/parse.go index b18079510..a4c9bfcb3 100644 --- a/template/interpolate/parse.go +++ b/template/interpolate/parse.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package interpolate import ( diff --git a/template/interpolate/parse_test.go b/template/interpolate/parse_test.go index abe499e54..916e89eca 100644 --- a/template/interpolate/parse_test.go +++ b/template/interpolate/parse_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package interpolate import ( diff --git a/template/interpolate/render.go b/template/interpolate/render.go index 7893e8745..64f0d258a 100644 --- a/template/interpolate/render.go +++ b/template/interpolate/render.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package interpolate import ( diff --git a/template/interpolate/render_test.go b/template/interpolate/render_test.go index ae9ff2474..f6d98221e 100644 --- a/template/interpolate/render_test.go +++ b/template/interpolate/render_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package interpolate import ( diff --git a/template/parse.go b/template/parse.go index 5d1f04cc1..4fae27f5d 100644 --- a/template/parse.go +++ b/template/parse.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package template import ( diff --git a/template/parse_test.go b/template/parse_test.go index b79dc59f2..b5a44c966 100644 --- a/template/parse_test.go +++ b/template/parse_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + //go:build !windows // +build !windows diff --git a/template/template.go b/template/template.go index d7f0eb981..1118d061e 100644 --- a/template/template.go +++ b/template/template.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + //go:generate packer-sdc mapstructure-to-hcl2 -type Provisioner package template diff --git a/template/template_test.go b/template/template_test.go index 7dc5b87d6..d4cd84812 100644 --- a/template/template_test.go +++ b/template/template_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package template import ( diff --git a/test-fixtures/floppies/foo.ps1 b/test-fixtures/floppies/foo.ps1 index 672daeb89..8c70081fb 100644 --- a/test-fixtures/floppies/foo.ps1 +++ b/test-fixtures/floppies/foo.ps1 @@ -1 +1,4 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + Write-Host "I am a floppy with some Powershell" \ No newline at end of file diff --git a/tmp/tmp.go b/tmp/tmp.go index 147673b9f..687e351c8 100644 --- a/tmp/tmp.go +++ b/tmp/tmp.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + // Package tmp provides temporary directory helpers. // // tmp stores temporary items in the system's diff --git a/useragent/useragent.go b/useragent/useragent.go index bbb72f47b..dedff0dbe 100644 --- a/useragent/useragent.go +++ b/useragent/useragent.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + // Package useragent creates a user agent for builders to use when calling out // to cloud APIs or other addresses. package useragent diff --git a/useragent/useragent_test.go b/useragent/useragent_test.go index 639e1b4fb..f3b74a286 100644 --- a/useragent/useragent_test.go +++ b/useragent/useragent_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package useragent import ( diff --git a/uuid/uuid.go b/uuid/uuid.go index bf5d922ab..10f705adb 100644 --- a/uuid/uuid.go +++ b/uuid/uuid.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + // Package uuid provides helper functions for creating time-ordered UUIDs. package uuid diff --git a/uuid/uuid_test.go b/uuid/uuid_test.go index 8a853f1be..5588f62ee 100644 --- a/uuid/uuid_test.go +++ b/uuid/uuid_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package uuid import ( diff --git a/version/version.go b/version/version.go index 98973aea4..c8afb5f32 100644 --- a/version/version.go +++ b/version/version.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + // Package version helps plugin creators set and track the plugin version using // the same convenience functions used by the Packer core. package version From 5012fd5dcf6b761a5422f5ff2a0c91b17b72a565 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet <105649352+lbajolet-hashicorp@users.noreply.github.com> Date: Wed, 11 Jan 2023 15:40:32 -0500 Subject: [PATCH 005/105] ssh: fix DownloadDir empty response check (#147) We used to check if a ssh server returns an empty payload with a len(fi) < 0, which can never succeed as len never returns negative values. This commit changes the condition to an == instead. --- sdk-internals/communicator/ssh/communicator.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk-internals/communicator/ssh/communicator.go b/sdk-internals/communicator/ssh/communicator.go index a6b789cd2..7d0f771b4 100644 --- a/sdk-internals/communicator/ssh/communicator.go +++ b/sdk-internals/communicator/ssh/communicator.go @@ -207,7 +207,7 @@ func (c *comm) DownloadDir(src string, dst string, excl []string) error { return err } - if len(fi) < 0 { + if len(fi) == 0 { return fmt.Errorf("empty response from server") } From 1f4d6a9ea8f2b1f94ec099127fbed8e064292606 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Tue, 10 Jan 2023 10:34:05 -0500 Subject: [PATCH 006/105] communicator: add note to docs on protocol/Windows Recently, an update to Windows's default SSH implementation added an extra check for the mark-of-the-web to their code, which if in verbose mode, ends-up producing an error log, and terminates the process with a non-zero error code, even if the transfer is successful. Because of this, scp transfers fail all the time in such an environment, and the recommended workaround for now is to set sftp as the transfer protocol, as this one sets the mark-of-the-web successfully, and therefore ends with a 0 error code. Since this is surprising behaviour to users, we add a paragraph to the docs, so they know about this workaround. --- .../packer-plugin-sdk/communicator/SSH-not-required.mdx | 5 +++++ communicator/config.go | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/cmd/packer-sdc/internal/renderdocs/docs-partials/packer-plugin-sdk/communicator/SSH-not-required.mdx b/cmd/packer-sdc/internal/renderdocs/docs-partials/packer-plugin-sdk/communicator/SSH-not-required.mdx index b1a8652f6..d00366b6f 100644 --- a/cmd/packer-sdc/internal/renderdocs/docs-partials/packer-plugin-sdk/communicator/SSH-not-required.mdx +++ b/cmd/packer-sdc/internal/renderdocs/docs-partials/packer-plugin-sdk/communicator/SSH-not-required.mdx @@ -74,6 +74,11 @@ - `ssh_file_transfer_method` (string) - `scp` or `sftp` - How to transfer files, Secure copy (default) or SSH File Transfer Protocol. + + **NOTE**: Guests using Windows with Win32-OpenSSH v9.1.0.0p1-Beta, scp + (the default protocol for copying data) returns a a non-zero error code since the MOTW + cannot be set, which cause any file transfer to fail. As a workaround you can override the transfer protocol + with SFTP instead `ssh_file_transfer_protocol = "sftp"`. - `ssh_proxy_host` (string) - A SOCKS proxy host to use for SSH connection diff --git a/communicator/config.go b/communicator/config.go index e75820503..f68190e2c 100644 --- a/communicator/config.go +++ b/communicator/config.go @@ -165,6 +165,11 @@ type SSH struct { SSHBastionCertificateFile string `mapstructure:"ssh_bastion_certificate_file"` // `scp` or `sftp` - How to transfer files, Secure copy (default) or SSH // File Transfer Protocol. + // + // **NOTE**: Guests using Windows with Win32-OpenSSH v9.1.0.0p1-Beta, scp + // (the default protocol for copying data) returns a a non-zero error code since the MOTW + // cannot be set, which cause any file transfer to fail. As a workaround you can override the transfer protocol + // with SFTP instead `ssh_file_transfer_protocol = "sftp"`. SSHFileTransferMethod string `mapstructure:"ssh_file_transfer_method"` // A SOCKS proxy host to use for SSH connection SSHProxyHost string `mapstructure:"ssh_proxy_host"` From 34ed5d90315ee53e5ebdea1a7c2a68a95b7812b6 Mon Sep 17 00:00:00 2001 From: Ross MacLean Date: Fri, 13 Jan 2023 19:16:06 +0000 Subject: [PATCH 007/105] Fix some linting warnings. (#149) --- acctest/pluginacc.go | 4 +- adapter/adapter.go | 4 +- adapter/scp.go | 38 +++++++++---------- chroot/communicator_test.go | 1 + communicator/config.go | 2 +- multistep/commonsteps/iso_config_test.go | 32 +--------------- multistep/commonsteps/step_create_floppy.go | 4 +- .../commonsteps/step_create_floppy_test.go | 2 +- multistep/commonsteps/step_download.go | 7 ++-- multistep/commonsteps/step_provision.go | 2 +- multistep/if.go | 2 +- packer/logs.go | 9 ----- rpc/server.go | 20 +++++----- rpc/ui_progress_tracking.go | 2 +- .../communicator/ssh/communicator.go | 5 +-- .../communicator/winrm/communicator.go | 3 +- shell-local/config.go | 8 +--- shell-local/run.go | 2 +- template/config/custom_types.go | 12 ++---- template/config/decode.go | 2 +- .../aws/secretsmanager/secretsmanager.go | 2 +- 21 files changed, 54 insertions(+), 109 deletions(-) diff --git a/acctest/pluginacc.go b/acctest/pluginacc.go index 4f8c52355..579e9aee8 100644 --- a/acctest/pluginacc.go +++ b/acctest/pluginacc.go @@ -59,9 +59,7 @@ type TestTeardownFunc func() error //nolint:errcheck func TestPlugin(t *testing.T, testCase *PluginTestCase) { if os.Getenv(TestEnvVar) == "" { - t.Skip(fmt.Sprintf( - "Acceptance tests skipped unless env '%s' set", - TestEnvVar)) + t.Skipf("Acceptance tests skipped unless env '%s' set", TestEnvVar) return } diff --git a/adapter/adapter.go b/adapter/adapter.go index 0e27952ec..6b387ace6 100644 --- a/adapter/adapter.go +++ b/adapter/adapter.go @@ -105,7 +105,6 @@ func (c *Adapter) handleSession(newChannel ssh.NewChannel) error { // Sessions have requests such as "pty-req", "shell", "env", and "exec". // see RFC 4254, section 6 go func(in <-chan *ssh.Request) { - env := make([]envRequestPayload, 4) for req := range in { switch req.Type { case "pty-req": @@ -120,7 +119,6 @@ func (c *Adapter) handleSession(newChannel ssh.NewChannel) error { req.Reply(false, nil) continue } - env = append(env, req.Payload) log.Printf("new env request: %s", req.Payload) req.Reply(true, nil) case "exec": @@ -207,7 +205,7 @@ func (c *Adapter) exec(command string, in io.Reader, out io.Writer, err io.Write func serveSCP(args string) bool { opts, _ := scpOptions(args) - return bytes.IndexAny(opts, "tf") >= 0 + return bytes.ContainsAny(opts, "tf") } func (c *Adapter) scpExec(args string, in io.Reader, out io.Writer) error { diff --git a/adapter/scp.go b/adapter/scp.go index e65c56053..0b34c2937 100644 --- a/adapter/scp.go +++ b/adapter/scp.go @@ -42,13 +42,13 @@ well. func scpUploadSession(opts []byte, rest string, in io.Reader, out io.Writer, comm packersdk.Communicator) error { rest = strings.TrimSpace(rest) if len(rest) == 0 { - fmt.Fprintf(out, scpEmptyError) + fmt.Fprint(out, scpEmptyError) return errors.New("no scp target specified") } d, err := tmp.Dir("ansible-upload") if err != nil { - fmt.Fprintf(out, scpEmptyError) + fmt.Fprint(out, scpEmptyError) return err } defer os.RemoveAll(d) @@ -60,20 +60,20 @@ func scpUploadSession(opts []byte, rest string, in io.Reader, out io.Writer, com // irrelevant. state := &scpUploadState{target: rest, srcRoot: d, comm: comm} - fmt.Fprintf(out, scpOK) // signal the client to start the transfer. + fmt.Fprint(out, scpOK) // signal the client to start the transfer. return state.Protocol(bufio.NewReader(in), out) } func scpDownloadSession(opts []byte, rest string, in io.Reader, out io.Writer, comm packersdk.Communicator) error { rest = strings.TrimSpace(rest) if len(rest) == 0 { - fmt.Fprintf(out, scpEmptyError) + fmt.Fprint(out, scpEmptyError) return errors.New("no scp source specified") } d, err := tmp.Dir("ansible-download") if err != nil { - fmt.Fprintf(out, scpEmptyError) + fmt.Fprint(out, scpEmptyError) return err } defer os.RemoveAll(d) @@ -81,20 +81,20 @@ func scpDownloadSession(opts []byte, rest string, in io.Reader, out io.Writer, c if bytes.Contains([]byte{'d'}, opts) { // the only ansible module that supports downloading via scp is fetch, // fetch only supports file downloads as of Ansible 2.1. - fmt.Fprintf(out, scpEmptyError) + fmt.Fprint(out, scpEmptyError) return errors.New("directory downloads not supported") } f, err := os.Create(filepath.Join(d, filepath.Base(rest))) if err != nil { - fmt.Fprintf(out, scpEmptyError) + fmt.Fprint(out, scpEmptyError) return err } defer f.Close() err = comm.Download(rest, f) if err != nil { - fmt.Fprintf(out, scpEmptyError) + fmt.Fprint(out, scpEmptyError) return err } @@ -118,7 +118,7 @@ func (state *scpDownloadState) FileProtocol(path string, info os.FileInfo, in *b defer f.Close() io.CopyN(out, f, size) - fmt.Fprintf(out, scpOK) + fmt.Fprint(out, scpOK) return scpResponse(in) } @@ -157,12 +157,12 @@ func (state *scpUploadState) Protocol(in *bufio.Reader, out io.Writer) error { return state.FileProtocol(in, out) case 'E': state.dir = filepath.Dir(state.dir) - fmt.Fprintf(out, scpOK) + fmt.Fprint(out, scpOK) return nil case 'D': return state.DirProtocol(in, out) default: - fmt.Fprintf(out, scpEmptyError) + fmt.Fprint(out, scpEmptyError) return fmt.Errorf("unexpected message: %c", b) } } @@ -178,10 +178,10 @@ func (state *scpUploadState) FileProtocol(in *bufio.Reader, out io.Writer) error var name string _, err := fmt.Fscanf(in, "%04o %d %s\n", &mode, &size, &name) if err != nil { - fmt.Fprintf(out, scpEmptyError) + fmt.Fprint(out, scpEmptyError) return fmt.Errorf("invalid file message: %v", err) } - fmt.Fprintf(out, scpOK) + fmt.Fprint(out, scpOK) var fi os.FileInfo = fileInfo{name: name, size: size, mode: mode, mtime: state.mtime} @@ -192,7 +192,7 @@ func (state *scpUploadState) FileProtocol(in *bufio.Reader, out io.Writer) error err = state.comm.Upload(dest, io.LimitReader(in, fi.Size()), &fi) if err != nil { - fmt.Fprintf(out, scpEmptyError) + fmt.Fprint(out, scpEmptyError) return err } @@ -200,17 +200,17 @@ func (state *scpUploadState) FileProtocol(in *bufio.Reader, out io.Writer) error return err } - fmt.Fprintf(out, scpOK) + fmt.Fprint(out, scpOK) return nil } func (state *scpUploadState) TimeProtocol(in *bufio.Reader, out io.Writer) error { var m, a int64 if _, err := fmt.Fscanf(in, "%d 0 %d 0\n", &m, &a); err != nil { - fmt.Fprintf(out, scpEmptyError) + fmt.Fprint(out, scpEmptyError) return err } - fmt.Fprintf(out, scpOK) + fmt.Fprint(out, scpOK) state.atime = time.Unix(a, 0) state.mtime = time.Unix(m, 0) @@ -223,10 +223,10 @@ func (state *scpUploadState) DirProtocol(in *bufio.Reader, out io.Writer) error var name string if _, err := fmt.Fscanf(in, "%04o %d %s\n", &mode, &length, &name); err != nil { - fmt.Fprintf(out, scpEmptyError) + fmt.Fprint(out, scpEmptyError) return fmt.Errorf("invalid directory message: %v", err) } - fmt.Fprintf(out, scpOK) + fmt.Fprint(out, scpOK) path := filepath.Join(state.dir, name) if err := os.Mkdir(path, mode); err != nil { diff --git a/chroot/communicator_test.go b/chroot/communicator_test.go index c6b6febca..0e8c383cb 100644 --- a/chroot/communicator_test.go +++ b/chroot/communicator_test.go @@ -12,6 +12,7 @@ import ( func TestCommunicator_ImplementsCommunicator(t *testing.T) { var raw interface{} raw = &Communicator{} + if _, ok := raw.(packersdk.Communicator); !ok { t.Fatalf("Communicator should be a communicator") } diff --git a/communicator/config.go b/communicator/config.go index f68190e2c..a63949159 100644 --- a/communicator/config.go +++ b/communicator/config.go @@ -627,7 +627,7 @@ func (c *Config) prepareWinRM(ctx *interpolate.Context) (errs []error) { c.WinRMTimeout = 30 * time.Minute } - if c.WinRMUseNTLM == true { + if c.WinRMUseNTLM { c.WinRMTransportDecorator = func() winrm.Transporter { return &winrm.ClientNTLM{} } } diff --git a/multistep/commonsteps/iso_config_test.go b/multistep/commonsteps/iso_config_test.go index e75c7dd0a..c2d0489bf 100644 --- a/multistep/commonsteps/iso_config_test.go +++ b/multistep/commonsteps/iso_config_test.go @@ -23,34 +23,6 @@ func testISOConfig() ISOConfig { } } -var cs_bsd_style = ` -MD5 (other.iso) = bAr -MD5 (the-OS.iso) = baZ -` - -var cs_bsd_style_subdir = ` -MD5 (other.iso) = bAr -MD5 (./subdir/the-OS.iso) = baZ -` - -var cs_gnu_style = ` -bAr0 *the-OS.iso -baZ0 other.iso -` - -var cs_gnu_style_subdir = ` -bAr0 *./subdir/the-OS.iso -baZ0 other.iso -` - -var cs_bsd_style_no_newline = ` -MD5 (other.iso) = bAr -MD5 (the-OS.iso) = baZ` - -var cs_gnu_style_no_newline = ` -bAr0 *the-OS.iso -baZ0 other.iso` - func TestISOConfigPrepare_ISOChecksum(t *testing.T) { i := testISOConfig() @@ -89,10 +61,8 @@ func TestISOConfigPrepare_ISOChecksumURLBad(t *testing.T) { } func TestISOConfigPrepare_ISOChecksumType(t *testing.T) { - i := testISOConfig() - // Test none - i = testISOConfig() + i := testISOConfig() i.ISOChecksum = "none" warns, err := i.Prepare(nil) if len(warns) == 0 { diff --git a/multistep/commonsteps/step_create_floppy.go b/multistep/commonsteps/step_create_floppy.go index 1757ca748..e5e2e3419 100644 --- a/multistep/commonsteps/step_create_floppy.go +++ b/multistep/commonsteps/step_create_floppy.go @@ -199,9 +199,7 @@ func (s *StepCreateFloppy) Run(ctx context.Context, state multistep.StateBag) mu return multistep.ActionHalt } - for _, filename := range matches { - pathqueue = append(pathqueue, filename) - } + pathqueue = append(pathqueue, matches...) continue } pathqueue = append(pathqueue, filename) diff --git a/multistep/commonsteps/step_create_floppy_test.go b/multistep/commonsteps/step_create_floppy_test.go index 57292ce3c..49f2babb2 100644 --- a/multistep/commonsteps/step_create_floppy_test.go +++ b/multistep/commonsteps/step_create_floppy_test.go @@ -248,7 +248,7 @@ func TestStepCreateFloppyDirectories(t *testing.T) { for _, c := range test.dirs { step.Directories = append(step.Directories, filepath.Join(dir, filepath.FromSlash(c))) } - log.Println(fmt.Sprintf("Trying against floppy_dirs : %v", step.Directories)) + log.Printf("Trying against floppy_dirs : %v\n", step.Directories) // run the step if action := step.Run(context.Background(), state); action != multistep.ActionContinue { diff --git a/multistep/commonsteps/step_download.go b/multistep/commonsteps/step_download.go index 26a00285f..e0a4272cd 100644 --- a/multistep/commonsteps/step_download.go +++ b/multistep/commonsteps/step_download.go @@ -31,8 +31,9 @@ import ( // progress reporting, interrupt handling, etc. // // Uses: -// cache packer.Cache -// ui packersdk.Ui +// +// cache packer.Cache +// ui packersdk.Ui type StepDownload struct { // The checksum and the type of the checksum for the download Checksum string @@ -124,7 +125,7 @@ func (s *StepDownload) Run(ctx context.Context, state multistep.StateBag) multis // TODO(adrien): make go-getter allow using files in place. // ovf files usually point to a file in the same directory, so // using them in place is the only way. - ui.Say(fmt.Sprintf("Using ovf inplace")) + ui.Say("Using ovf inplace") dst = source } else { dst, err = s.download(ctx, ui, source) diff --git a/multistep/commonsteps/step_provision.go b/multistep/commonsteps/step_provision.go index 77d7340aa..b132a80a1 100644 --- a/multistep/commonsteps/step_provision.go +++ b/multistep/commonsteps/step_provision.go @@ -107,7 +107,7 @@ func (s *StepProvision) runWithHook(ctx context.Context, state multistep.StateBa if comm == nil { raw, ok := state.Get("communicator").(packersdk.Communicator) if ok { - comm = raw.(packersdk.Communicator) + comm = raw } } diff --git a/multistep/if.go b/multistep/if.go index ddbb4289b..b2d406afb 100644 --- a/multistep/if.go +++ b/multistep/if.go @@ -5,7 +5,7 @@ package multistep // if returns step only if on is true. func If(on bool, step Step) Step { - if on == false { + if !on { return &nullStep{} } return step diff --git a/packer/logs.go b/packer/logs.go index 0d5ad89b8..2445cb0ac 100644 --- a/packer/logs.go +++ b/packer/logs.go @@ -50,15 +50,6 @@ func (l *secretFilter) FilterString(message string) string { return message } -func (l *secretFilter) get() (s []string) { - l.m.Lock() - defer l.m.Unlock() - for k := range l.s { - s = append(s, k) - } - return -} - var LogSecretFilter secretFilter func init() { diff --git a/rpc/server.go b/rpc/server.go index 3e1a241cc..759f0594f 100644 --- a/rpc/server.go +++ b/rpc/server.go @@ -14,16 +14,16 @@ import ( const ( DefaultArtifactEndpoint string = "Artifact" - DefaultBuildEndpoint = "Build" - DefaultBuilderEndpoint = "Builder" - DefaultCacheEndpoint = "Cache" - DefaultCommandEndpoint = "Command" - DefaultCommunicatorEndpoint = "Communicator" - DefaultHookEndpoint = "Hook" - DefaultPostProcessorEndpoint = "PostProcessor" - DefaultProvisionerEndpoint = "Provisioner" - DefaultDatasourceEndpoint = "Datasource" - DefaultUiEndpoint = "Ui" + DefaultBuildEndpoint string = "Build" + DefaultBuilderEndpoint string = "Builder" + DefaultCacheEndpoint string = "Cache" + DefaultCommandEndpoint string = "Command" + DefaultCommunicatorEndpoint string = "Communicator" + DefaultHookEndpoint string = "Hook" + DefaultPostProcessorEndpoint string = "PostProcessor" + DefaultProvisionerEndpoint string = "Provisioner" + DefaultDatasourceEndpoint string = "Datasource" + DefaultUiEndpoint string = "Ui" ) // PluginServer represents an RPC server for Packer. This must be paired on the diff --git a/rpc/ui_progress_tracking.go b/rpc/ui_progress_tracking.go index 27d1b5477..c66a7911a 100644 --- a/rpc/ui_progress_tracking.go +++ b/rpc/ui_progress_tracking.go @@ -85,7 +85,7 @@ type ProgressTrackingServer struct { } func (t *ProgressTrackingServer) Add(size int, _ *interface{}) error { - stubBytes := make([]byte, size, size) + stubBytes := make([]byte, size) t.stream.Read(stubBytes) return nil } diff --git a/sdk-internals/communicator/ssh/communicator.go b/sdk-internals/communicator/ssh/communicator.go index 7d0f771b4..2cdc13d83 100644 --- a/sdk-internals/communicator/ssh/communicator.go +++ b/sdk-internals/communicator/ssh/communicator.go @@ -161,9 +161,9 @@ func (c *comm) Start(ctx context.Context, cmd *packersdk.RemoteCmd) (err error) err := session.Wait() exitStatus := 0 if err != nil { - switch err.(type) { + switch err := err.(type) { case *ssh.ExitError: - exitStatus = err.(*ssh.ExitError).ExitStatus() + exitStatus = err.ExitStatus() log.Printf("[ERROR] Remote command exited with '%d': %s", exitStatus, cmd.Command) case *ssh.ExitMissingError: log.Printf("[ERROR] Remote command exited without exit status or exit signal.") @@ -490,7 +490,6 @@ func (c *comm) connectToAgent() { } log.Printf("[INFO] agent forwarding enabled") - return } func (c *comm) sftpUploadSession(path string, input io.Reader, fi *os.FileInfo) error { diff --git a/sdk-internals/communicator/winrm/communicator.go b/sdk-internals/communicator/winrm/communicator.go index 8b18aa4fa..6d398b8bc 100644 --- a/sdk-internals/communicator/winrm/communicator.go +++ b/sdk-internals/communicator/winrm/communicator.go @@ -207,8 +207,7 @@ func (c *Communicator) newWinRMClient() (*winrm.Client, error) { // winrmcp uses even we we aren't using winrmcp. This ensures similar // behavior between upload, download, and copy functions. We can't use the // one generated by winrmcp because it isn't exported. - var endpoint *winrm.Endpoint - endpoint = &winrm.Endpoint{ + var endpoint = &winrm.Endpoint{ Host: c.endpoint.Host, Port: c.endpoint.Port, HTTPS: conf.Https, diff --git a/shell-local/config.go b/shell-local/config.go index 4e3f1d2fc..69f555a97 100644 --- a/shell-local/config.go +++ b/shell-local/config.go @@ -150,7 +150,7 @@ func Validate(config *Config) error { break } } - if supported_os != true { + if supported_os { return fmt.Errorf("Invalid OS specified in only_on: '%s'\n"+ "Supported OS names: %s", provided_os, strings.Join(supportedSyslist, ", ")) } @@ -188,11 +188,7 @@ func Validate(config *Config) error { } // drop unnecessary "." in extension; we add this later. - if config.TempfileExtension != "" { - if strings.HasPrefix(config.TempfileExtension, ".") { - config.TempfileExtension = config.TempfileExtension[1:] - } - } + config.TempfileExtension = strings.TrimPrefix(config.TempfileExtension, ".") // Do a check for bad environment variables, such as '=foo', 'foobar' for _, kv := range config.Vars { diff --git a/shell-local/run.go b/shell-local/run.go index cc97cc76a..99e734f70 100644 --- a/shell-local/run.go +++ b/shell-local/run.go @@ -39,7 +39,7 @@ func Run(ctx context.Context, ui packersdk.Ui, config *Config, generatedData map } } if !runCommand { - ui.Say(fmt.Sprintf("Skipping shell-local due to runtime OS")) + ui.Say("Skipping shell-local due to runtime OS") log.Printf("[INFO] (shell-local): skipping shell-local due to missing runtime OS") return true, nil } diff --git a/template/config/custom_types.go b/template/config/custom_types.go index a95858897..e709cc526 100644 --- a/template/config/custom_types.go +++ b/template/config/custom_types.go @@ -36,17 +36,11 @@ func (t Trilean) ToBoolPointer() *bool { } func (t Trilean) True() bool { - if t == TriTrue { - return true - } - return false + return t == TriTrue } func (t Trilean) False() bool { - if t == TriFalse { - return true - } - return false + return t == TriFalse } func TrileanFromString(s string) (Trilean, error) { @@ -57,7 +51,7 @@ func TrileanFromString(s string) (Trilean, error) { b, err := strconv.ParseBool(s) if err != nil { return TriUnset, err - } else if b == true { + } else if b { return TriTrue, nil } else { return TriFalse, nil diff --git a/template/config/decode.go b/template/config/decode.go index a9417e73a..902ee21fa 100644 --- a/template/config/decode.go +++ b/template/config/decode.go @@ -189,7 +189,7 @@ func Decode(target interface{}, config *DecodeOpts, raws ...interface{}) error { } } } - if fixable == true { + if fixable { break } } diff --git a/template/interpolate/aws/secretsmanager/secretsmanager.go b/template/interpolate/aws/secretsmanager/secretsmanager.go index 856a88e85..9fd0d18f3 100644 --- a/template/interpolate/aws/secretsmanager/secretsmanager.go +++ b/template/interpolate/aws/secretsmanager/secretsmanager.go @@ -84,7 +84,7 @@ func getSecretValue(s *SecretString, spec *SecretSpec) (string, error) { blob := []byte(s.SecretString) //For those plaintext secrets just return the value - if json.Valid(blob) != true { + if !json.Valid(blob) { return s.SecretString, nil } From 4a11ef9e59570bb46a28b9db96c817860a960ff4 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Thu, 26 Jan 2023 16:30:44 -0500 Subject: [PATCH 008/105] Update links used in embedded documentation partials - Migrates the formats of links in Markdown content as part of the [Docs Content Link Rewrites project](https://docs.google.com/document/d/1WaSyvoVPS-YCNiSPX0ynGpvc1gySEcpbrRoQVhimQCA/edit) --- bootcommand/config.go | 2 +- .../packer-plugin-sdk/bootcommand/BootConfig.mdx | 2 +- .../packer-plugin-sdk/communicator/SSH-not-required.mdx | 4 ++-- .../packer-plugin-sdk/multistep/commonsteps/FloppyConfig.mdx | 2 +- communicator/config.go | 4 ++-- multistep/commonsteps/floppy_config.go | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/bootcommand/config.go b/bootcommand/config.go index 4ba9f878f..78291e12a 100644 --- a/bootcommand/config.go +++ b/bootcommand/config.go @@ -147,7 +147,7 @@ const PackerKeyDefault = 100 * time.Millisecond // ``` // // For more examples of various boot commands, see the sample projects from our -// [community templates page](/community-tools#templates). +// [community templates page](https://packer.io/community-tools#templates). type BootConfig struct { // Time to wait after sending a group of key pressses. The value of this // should be a duration. Examples are `5s` and `1m30s` which will cause diff --git a/cmd/packer-sdc/internal/renderdocs/docs-partials/packer-plugin-sdk/bootcommand/BootConfig.mdx b/cmd/packer-sdc/internal/renderdocs/docs-partials/packer-plugin-sdk/bootcommand/BootConfig.mdx index efab62bb5..3faa491f0 100644 --- a/cmd/packer-sdc/internal/renderdocs/docs-partials/packer-plugin-sdk/bootcommand/BootConfig.mdx +++ b/cmd/packer-sdc/internal/renderdocs/docs-partials/packer-plugin-sdk/bootcommand/BootConfig.mdx @@ -125,6 +125,6 @@ boot_command = [ ``` For more examples of various boot commands, see the sample projects from our -[community templates page](/community-tools#templates). +[community templates page](https://packer.io/community-tools#templates). diff --git a/cmd/packer-sdc/internal/renderdocs/docs-partials/packer-plugin-sdk/communicator/SSH-not-required.mdx b/cmd/packer-sdc/internal/renderdocs/docs-partials/packer-plugin-sdk/communicator/SSH-not-required.mdx index d00366b6f..99706b6ae 100644 --- a/cmd/packer-sdc/internal/renderdocs/docs-partials/packer-plugin-sdk/communicator/SSH-not-required.mdx +++ b/cmd/packer-sdc/internal/renderdocs/docs-partials/packer-plugin-sdk/communicator/SSH-not-required.mdx @@ -9,7 +9,7 @@ - `ssh_password` (string) - A plaintext password to use to authenticate with SSH. -- `ssh_ciphers` ([]string) - This overrides the value of ciphers supported by default by golang. +- `ssh_ciphers` ([]string) - This overrides the value of ciphers supported by default by Golang. The default value is [ "aes128-gcm@openssh.com", "chacha20-poly1305@openssh.com", @@ -29,7 +29,7 @@ currently only works on guests with `sed` installed. - `ssh_key_exchange_algorithms` ([]string) - If set, Packer will override the value of key exchange (kex) algorithms - supported by default by golang. Acceptable values include: + supported by default by Golang. Acceptable values include: "curve25519-sha256@libssh.org", "ecdh-sha2-nistp256", "ecdh-sha2-nistp384", "ecdh-sha2-nistp521", "diffie-hellman-group14-sha1", and "diffie-hellman-group1-sha1". diff --git a/cmd/packer-sdc/internal/renderdocs/docs-partials/packer-plugin-sdk/multistep/commonsteps/FloppyConfig.mdx b/cmd/packer-sdc/internal/renderdocs/docs-partials/packer-plugin-sdk/multistep/commonsteps/FloppyConfig.mdx index 2b38ab7a1..b7c307c32 100644 --- a/cmd/packer-sdc/internal/renderdocs/docs-partials/packer-plugin-sdk/multistep/commonsteps/FloppyConfig.mdx +++ b/cmd/packer-sdc/internal/renderdocs/docs-partials/packer-plugin-sdk/multistep/commonsteps/FloppyConfig.mdx @@ -7,6 +7,6 @@ this setting get placed into the root directory of the floppy and the floppy is attached as the first floppy device. The summary size of the listed files must not exceed 1.44 MB. The supported ways to move large files into the OS are using `http_directory` or [the file -provisioner](/packer/plugins/provisioners/file). +provisioner](/packer/docs/provisioners/file). diff --git a/communicator/config.go b/communicator/config.go index a63949159..f8446d999 100644 --- a/communicator/config.go +++ b/communicator/config.go @@ -87,7 +87,7 @@ type SSH struct { // a 36 character unique identifier. SSHTemporaryKeyPairName string `mapstructure:"temporary_key_pair_name" undocumented:"true"` SSHTemporaryKeyPair `mapstructure:",squash"` - // This overrides the value of ciphers supported by default by golang. + // This overrides the value of ciphers supported by default by Golang. // The default value is [ // "aes128-gcm@openssh.com", // "chacha20-poly1305@openssh.com", @@ -107,7 +107,7 @@ type SSH struct { // currently only works on guests with `sed` installed. SSHClearAuthorizedKeys bool `mapstructure:"ssh_clear_authorized_keys"` // If set, Packer will override the value of key exchange (kex) algorithms - // supported by default by golang. Acceptable values include: + // supported by default by Golang. Acceptable values include: // "curve25519-sha256@libssh.org", "ecdh-sha2-nistp256", // "ecdh-sha2-nistp384", "ecdh-sha2-nistp521", // "diffie-hellman-group14-sha1", and "diffie-hellman-group1-sha1". diff --git a/multistep/commonsteps/floppy_config.go b/multistep/commonsteps/floppy_config.go index 40099e5f8..a80eb6bfc 100644 --- a/multistep/commonsteps/floppy_config.go +++ b/multistep/commonsteps/floppy_config.go @@ -21,7 +21,7 @@ import ( // is attached as the first floppy device. The summary size of the listed files // must not exceed 1.44 MB. The supported ways to move large files into the OS // are using `http_directory` or [the file -// provisioner](/packer/plugins/provisioners/file). +// provisioner](/packer/docs/provisioners/file). type FloppyConfig struct { // A list of files to place onto a floppy disk that is attached when the VM // is booted. Currently, no support exists for creating sub-directories on From 404e1f92de406c18d0373f7ef2c5fc3eb4b868f2 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Thu, 26 Jan 2023 17:19:55 -0500 Subject: [PATCH 009/105] Bump version for next release --- version/version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version/version.go b/version/version.go index c8afb5f32..28b00ea43 100644 --- a/version/version.go +++ b/version/version.go @@ -16,7 +16,7 @@ import ( var GitCommit string // Package version helps plugin creators set and track the sdk version using -var Version = "0.3.2" +var Version = "0.3.3" // A pre-release marker for the version. If this is "" (empty string) // then it means that it is a final release. Otherwise, this is a pre-release From 6f32b7f4138618221ff63b16c5807db7e9ace8a3 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Fri, 27 Jan 2023 08:54:55 -0500 Subject: [PATCH 010/105] shell-local: fix supported_os error check Commit 34ed5d9031 which consists of linting fixes essentially had an error in the code and the error check for `supported_os' was inverted in this commit, making shell-local fail on all supported OSes now. We re-invert this condition so it behaves as it used to. --- shell-local/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell-local/config.go b/shell-local/config.go index 69f555a97..f4c51a795 100644 --- a/shell-local/config.go +++ b/shell-local/config.go @@ -150,7 +150,7 @@ func Validate(config *Config) error { break } } - if supported_os { + if !supported_os { return fmt.Errorf("Invalid OS specified in only_on: '%s'\n"+ "Supported OS names: %s", provided_os, strings.Join(supportedSyslist, ", ")) } From cc05a3ab1ec20319754a57428cc16da7b3ce2b98 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Fri, 27 Jan 2023 11:49:23 -0500 Subject: [PATCH 011/105] version: release v0.3.4 of the SDK --- version/version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version/version.go b/version/version.go index 28b00ea43..8233858e7 100644 --- a/version/version.go +++ b/version/version.go @@ -16,7 +16,7 @@ import ( var GitCommit string // Package version helps plugin creators set and track the sdk version using -var Version = "0.3.3" +var Version = "0.3.4" // A pre-release marker for the version. If this is "" (empty string) // then it means that it is a final release. Otherwise, this is a pre-release From fd628a59a8878b7ca53e9c4f8a78271684262bcf Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Wed, 1 Feb 2023 14:44:05 -0500 Subject: [PATCH 012/105] Update environment variables URL in error message Closes https://github.com/hashicorp/packer-plugin-sdk/issues/142 --- sdk-internals/communicator/ssh/communicator.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk-internals/communicator/ssh/communicator.go b/sdk-internals/communicator/ssh/communicator.go index 2cdc13d83..061c307ad 100644 --- a/sdk-internals/communicator/ssh/communicator.go +++ b/sdk-internals/communicator/ssh/communicator.go @@ -899,7 +899,7 @@ func scpUploadFile(dst string, src io.Reader, w io.Writer, r *bufio.Reader, fi * if _, err := io.Copy(tf, src); err != nil { return fmt.Errorf("Error copying input data into local temporary "+ "file. Check that TEMPDIR has enough space. Please see "+ - "https://www.packer.io/docs/other/environment-variables#tmpdir"+ + "https://developer.hashicorp.com/packer/docs/configure#tmpdir"+ "for more info. Error: %s", err) } From 0ab9c86565296390f9061dc93934e757cfa1ad20 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Wed, 1 Feb 2023 14:24:10 -0500 Subject: [PATCH 013/105] ssh: add warnings on DSA usage The DSA signature algorithm is not considered secure anymore, and is actively deprecated in the Go crypto libs. To let users know that they should not use that anymore, we add a notice in the comments for the SSH private key options. --- .../communicator/SSHTemporaryKeyPair-not-required.mdx | 6 ++++++ communicator/config.go | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/cmd/packer-sdc/internal/renderdocs/docs-partials/packer-plugin-sdk/communicator/SSHTemporaryKeyPair-not-required.mdx b/cmd/packer-sdc/internal/renderdocs/docs-partials/packer-plugin-sdk/communicator/SSHTemporaryKeyPair-not-required.mdx index f0f5813ab..582d13870 100644 --- a/cmd/packer-sdc/internal/renderdocs/docs-partials/packer-plugin-sdk/communicator/SSHTemporaryKeyPair-not-required.mdx +++ b/cmd/packer-sdc/internal/renderdocs/docs-partials/packer-plugin-sdk/communicator/SSHTemporaryKeyPair-not-required.mdx @@ -4,6 +4,9 @@ Specifies the type of key to create. The possible values are 'dsa', 'ecdsa', 'ed25519', or 'rsa'. + + NOTE: DSA is deprecated and no longer recognized as secure, please + consider other alternatives like RSA or ED25519. - `temporary_key_pair_bits` (int) - Specifies the number of bits in the key to create. For RSA keys, the minimum size is 1024 bits and the default is 4096 bits. Generally, 3072 @@ -13,5 +16,8 @@ bits. Attempting to use bit lengths other than these three values for ECDSA keys will fail. Ed25519 keys have a fixed length and bits will be ignored. + + NOTE: DSA is deprecated and no longer recognized as secure as specified + by FIPS 186-5, please consider other alternatives like RSA or ED25519. diff --git a/communicator/config.go b/communicator/config.go index f8446d999..6e4a2f572 100644 --- a/communicator/config.go +++ b/communicator/config.go @@ -207,6 +207,9 @@ type SSHTemporaryKeyPair struct { // // Specifies the type of key to create. The possible values are 'dsa', // 'ecdsa', 'ed25519', or 'rsa'. + // + // NOTE: DSA is deprecated and no longer recognized as secure, please + // consider other alternatives like RSA or ED25519. SSHTemporaryKeyPairType string `mapstructure:"temporary_key_pair_type"` // Specifies the number of bits in the key to create. For RSA keys, the // minimum size is 1024 bits and the default is 4096 bits. Generally, 3072 @@ -216,6 +219,9 @@ type SSHTemporaryKeyPair struct { // bits. Attempting to use bit lengths other than these three values for // ECDSA keys will fail. Ed25519 keys have a fixed length and bits will be // ignored. + // + // NOTE: DSA is deprecated and no longer recognized as secure as specified + // by FIPS 186-5, please consider other alternatives like RSA or ED25519. SSHTemporaryKeyPairBits int `mapstructure:"temporary_key_pair_bits"` } From 45e46139232a47868cdeb2968745aecdc15ad4fa Mon Sep 17 00:00:00 2001 From: Ross MacLean Date: Fri, 27 Jan 2023 11:54:24 +0000 Subject: [PATCH 014/105] Remove ioutil in favour of io and os packages and exclude crypto/dsa from linting as the warning is not relevant. --- acctest/provisioneracc/provisioners.go | 4 ++-- acctest/testutils/utils.go | 3 +-- chroot/communicator_test.go | 3 +-- chroot/step_copy_files_test.go | 13 +++++-------- chroot/step_mount_extra_test.go | 3 +-- cmd/packer-sdc/internal/cmd/utils.go | 3 +-- cmd/packer-sdc/internal/fs/sync.go | 5 ++--- cmd/packer-sdc/internal/renderdocs/renderdocs.go | 7 ++++--- .../internal/struct-markdown/struct_markdown.go | 3 +-- .../struct-markdown/struct_markdown_test.go | 4 ++-- communicator/config.go | 3 +-- communicator/ssh/key_pair.go | 10 +++++----- communicator/ssh/key_pair_test.go | 2 +- communicator/ssh/ssh.go | 6 +++--- communicator/sshkey/generate.go | 2 +- communicator/step_connect_ssh.go | 5 ++--- communicator/step_debug_ssh_keys.go | 4 ++-- multistep/basic_runner_test.go | 3 +-- multistep/commonsteps/step_create_cdrom.go | 3 +-- multistep/commonsteps/step_create_cdrom_test.go | 12 +++++------- multistep/commonsteps/step_create_floppy.go | 7 ++----- multistep/commonsteps/step_create_floppy_test.go | 10 ++++------ multistep/commonsteps/step_download_test.go | 3 +-- multistep/commonsteps/step_http_server_test.go | 4 ++-- multistep/commonsteps/step_output_dir_test.go | 3 +-- multistep/commonsteps/step_provision_test.go | 3 +-- multistep/debug_runner_test.go | 3 +-- multistep/statebag_test.go | 3 +-- packer/cache_config_unix_test.go | 5 ++--- packer/communicator_mock_test.go | 3 +-- packer/multi_error_test.go | 3 +-- packer/ui_mock.go | 5 ++--- pathing/config_file_unix_test.go | 9 ++++----- rpc/builder.go | 5 ++++- rpc/communicator_test.go | 3 +-- rpc/datasource_test.go | 3 +-- rpc/post_processor_test.go | 3 +-- rpc/ui_test.go | 3 +-- .../communicator/none/communicator_test.go | 3 +-- sdk-internals/communicator/ssh/communicator.go | 5 ++--- sdk-internals/communicator/ssh/communicator_test.go | 3 +-- .../communicator/ssh/keyboard_interactive.go | 6 +++--- sdk-internals/communicator/ssh/password_test.go | 3 +-- sdk-internals/communicator/winrm/communicator.go | 5 ++--- tmp/tmp.go | 5 ++--- 45 files changed, 85 insertions(+), 121 deletions(-) diff --git a/acctest/provisioneracc/provisioners.go b/acctest/provisioneracc/provisioners.go index 29043e1d8..045b2500c 100644 --- a/acctest/provisioneracc/provisioners.go +++ b/acctest/provisioneracc/provisioners.go @@ -6,7 +6,7 @@ package provisioneracc import ( "bytes" "fmt" - "io/ioutil" + "io" "log" "os" "os/exec" @@ -157,7 +157,7 @@ func LoadBuilderFragment(templateFragmentPath string) (string, error) { } defer fragmentFile.Close() - fragmentString, err := ioutil.ReadAll(fragmentFile) + fragmentString, err := io.ReadAll(fragmentFile) if err != nil { return "", fmt.Errorf("Unable to read %s", fragmentAbsPath) } diff --git a/acctest/testutils/utils.go b/acctest/testutils/utils.go index e483b51e1..dde030783 100644 --- a/acctest/testutils/utils.go +++ b/acctest/testutils/utils.go @@ -8,7 +8,6 @@ package testutils import ( "encoding/json" "fmt" - "io/ioutil" "os" ) @@ -48,7 +47,7 @@ func GetArtifact(manifestfilepath string) (ManifestFile, error) { // "last_run_uuid": "81fc083f-0b78-d815-ed3a-2e5f53b36bff" // } manifest := ManifestFile{} - data, err := ioutil.ReadFile(manifestfilepath) + data, err := os.ReadFile(manifestfilepath) if err != nil { return manifest, fmt.Errorf("failed to open manifest file %s", manifestfilepath) } diff --git a/chroot/communicator_test.go b/chroot/communicator_test.go index 0e8c383cb..d563d01ff 100644 --- a/chroot/communicator_test.go +++ b/chroot/communicator_test.go @@ -10,8 +10,7 @@ import ( ) func TestCommunicator_ImplementsCommunicator(t *testing.T) { - var raw interface{} - raw = &Communicator{} + var raw interface{} = &Communicator{} if _, ok := raw.(packersdk.Communicator); !ok { t.Fatalf("Communicator should be a communicator") diff --git a/chroot/step_copy_files_test.go b/chroot/step_copy_files_test.go index c0f71eee4..6a53c4539 100644 --- a/chroot/step_copy_files_test.go +++ b/chroot/step_copy_files_test.go @@ -6,7 +6,7 @@ package chroot import ( "context" "fmt" - "io/ioutil" + "io" "path" "runtime" "strings" @@ -23,15 +23,14 @@ func testUI() (packersdk.Ui, func() string) { errorBuffer := &strings.Builder{} ui := &packersdk.BasicUi{ Reader: strings.NewReader(""), - Writer: ioutil.Discard, + Writer: io.Discard, ErrorWriter: errorBuffer, } return ui, errorBuffer.String } func TestCopyFilesCleanupFunc_ImplementsCleanupFunc(t *testing.T) { - var raw interface{} - raw = new(StepCopyFiles) + var raw interface{} = new(StepCopyFiles) if _, ok := raw.(Cleanup); !ok { t.Fatalf("cleanup func should be a CleanupFunc") } @@ -50,8 +49,7 @@ func TestCopyFiles_Run(t *testing.T) { var gotCommand string commandRunCount := 0 - var wrapper common.CommandWrapper - wrapper = func(ran string) (string, error) { + var wrapper common.CommandWrapper = func(ran string) (string, error) { gotCommand = ran commandRunCount++ return "", nil @@ -101,8 +99,7 @@ func TestCopyFiles_CopyNothing(t *testing.T) { } commandRunCount := 0 - var wrapper common.CommandWrapper - wrapper = func(ran string) (string, error) { + var wrapper common.CommandWrapper = func(ran string) (string, error) { commandRunCount++ return "", nil } diff --git a/chroot/step_mount_extra_test.go b/chroot/step_mount_extra_test.go index f6cfe4a89..1d406be88 100644 --- a/chroot/step_mount_extra_test.go +++ b/chroot/step_mount_extra_test.go @@ -6,8 +6,7 @@ package chroot import "testing" func TestMountExtraCleanupFunc_ImplementsCleanupFunc(t *testing.T) { - var raw interface{} - raw = new(StepMountExtra) + var raw interface{} = new(StepMountExtra) if _, ok := raw.(Cleanup); !ok { t.Fatalf("cleanup func should be a CleanupFunc") } diff --git a/cmd/packer-sdc/internal/cmd/utils.go b/cmd/packer-sdc/internal/cmd/utils.go index fd9c82e96..1e0a76811 100644 --- a/cmd/packer-sdc/internal/cmd/utils.go +++ b/cmd/packer-sdc/internal/cmd/utils.go @@ -4,7 +4,6 @@ package cmd import ( - "io/ioutil" "os" "path/filepath" "testing" @@ -46,7 +45,7 @@ func (fc FileCheck) Verify(t *testing.T, dir string) { } } for file, expectedContent := range fc.ExpectedContent { - content, err := ioutil.ReadFile(filepath.Join(dir, file)) + content, err := os.ReadFile(filepath.Join(dir, file)) if err != nil { t.Fatalf("ioutil.ReadFile: %v", err) } diff --git a/cmd/packer-sdc/internal/fs/sync.go b/cmd/packer-sdc/internal/fs/sync.go index 8cccfa541..daddc9fb3 100644 --- a/cmd/packer-sdc/internal/fs/sync.go +++ b/cmd/packer-sdc/internal/fs/sync.go @@ -6,7 +6,6 @@ package fs import ( "bytes" "io" - "io/ioutil" "os" "path/filepath" "runtime" @@ -44,7 +43,7 @@ func SyncDir(src, dst string) error { return errors.Wrapf(err, "cannot mkdir %s", dst) } - entries, err := ioutil.ReadDir(src) + entries, err := os.ReadDir(src) if err != nil { return errors.Wrapf(err, "cannot read directory %s", dst) } @@ -67,7 +66,7 @@ func SyncDir(src, dst string) error { } // Remove files in dst that aren't in src - entries, err = ioutil.ReadDir(dst) + entries, err = os.ReadDir(dst) if err != nil { return errors.Wrapf(err, "cannot read directory %s", dst) } diff --git a/cmd/packer-sdc/internal/renderdocs/renderdocs.go b/cmd/packer-sdc/internal/renderdocs/renderdocs.go index 3e6c3c335..4d3710329 100644 --- a/cmd/packer-sdc/internal/renderdocs/renderdocs.go +++ b/cmd/packer-sdc/internal/renderdocs/renderdocs.go @@ -7,7 +7,6 @@ import ( "bytes" "embed" "flag" - "io/ioutil" "log" "os" "path/filepath" @@ -67,7 +66,7 @@ func (cmd *Command) run(args []string) error { } func RenderDocsFolder(folder, partials string) error { - entries, err := ioutil.ReadDir(folder) + entries, err := os.ReadDir(folder) if err != nil { return errors.Wrapf(err, "cannot read directory %s", folder) } @@ -129,7 +128,9 @@ var partialFiles embed.FS // getPartial will first try to look for partials in the // renderdocs/docs-partials dir. This makes common/shared partials available to // all docs with for example: -// @include 'packer-plugin-sdk/communicator/Config.mdx' +// +// @include 'packer-plugin-sdk/communicator/Config.mdx' +// // Otherwise it tries to find a partial in/ the actual filesystem. func getPartial(partialsDir, partialPath string) ([]byte, error) { if partial, err := partialFiles.ReadFile(strings.Join([]string{"docs-partials", partialPath}, "/")); err == nil { diff --git a/cmd/packer-sdc/internal/struct-markdown/struct_markdown.go b/cmd/packer-sdc/internal/struct-markdown/struct_markdown.go index df0f91099..29a441ee4 100644 --- a/cmd/packer-sdc/internal/struct-markdown/struct_markdown.go +++ b/cmd/packer-sdc/internal/struct-markdown/struct_markdown.go @@ -8,7 +8,6 @@ import ( "go/ast" "go/parser" "go/token" - "io/ioutil" "log" "os" "path/filepath" @@ -72,7 +71,7 @@ func (cmd *Command) Run(args []string) int { log.Fatal("Failed to guess project ROOT. If this is a Packer plugin project please make sure the root directory begins with`packer-plugin-*`") } - b, err := ioutil.ReadFile(fname) + b, err := os.ReadFile(fname) if err != nil { log.Fatalf("ReadFile: %+v", err) } diff --git a/cmd/packer-sdc/internal/struct-markdown/struct_markdown_test.go b/cmd/packer-sdc/internal/struct-markdown/struct_markdown_test.go index 528150c6e..00b651240 100644 --- a/cmd/packer-sdc/internal/struct-markdown/struct_markdown_test.go +++ b/cmd/packer-sdc/internal/struct-markdown/struct_markdown_test.go @@ -5,7 +5,7 @@ package struct_markdown import ( "fmt" - "io/ioutil" + "os" "strings" "testing" @@ -42,7 +42,7 @@ func TestCommand_Run(t *testing.T) { } targetedPath := strings.TrimPrefix(tt.args[0], "../test-data/packer-plugin-happycloud/") for _, p := range tt.FileCheck.ExpectedFiles() { - raw, _ := ioutil.ReadFile(p) + raw, _ := os.ReadFile(p) content := string(raw) if !strings.Contains(content, targetedPath) { t.Errorf("%s must contain '%s'. Its content is:\n%s", p, targetedPath, content) diff --git a/communicator/config.go b/communicator/config.go index 6e4a2f572..331104b3e 100644 --- a/communicator/config.go +++ b/communicator/config.go @@ -9,7 +9,6 @@ package communicator import ( "errors" "fmt" - "io/ioutil" "net" "os" "time" @@ -317,7 +316,7 @@ func (c *Config) ReadSSHPrivateKeyFile() ([]byte, error) { return []byte{}, fmt.Errorf("Error expanding path for SSH private key: %s", err) } - privateKey, err = ioutil.ReadFile(keyPath) + privateKey, err = os.ReadFile(keyPath) if err != nil { return privateKey, fmt.Errorf("Error on reading SSH private key: %s", err) } diff --git a/communicator/ssh/key_pair.go b/communicator/ssh/key_pair.go index e6eea53f8..de511128f 100644 --- a/communicator/ssh/key_pair.go +++ b/communicator/ssh/key_pair.go @@ -6,7 +6,7 @@ package ssh import ( "bytes" "crypto" - "crypto/dsa" + "crypto/dsa" //nolint:all "crypto/ecdsa" "crypto/elliptic" "crypto/rand" @@ -60,10 +60,10 @@ type KeyPair struct { // KeyPairFromPrivateKey returns a KeyPair loaded from an existing private key. // // Supported key pair types include: -// - DSA -// - ECDSA -// - ED25519 -// - RSA +// - DSA +// - ECDSA +// - ED25519 +// - RSA func KeyPairFromPrivateKey(config FromPrivateKeyConfig) (KeyPair, error) { privateKey, err := gossh.ParseRawPrivateKey(config.RawPrivateKeyPemBlock) if err != nil { diff --git a/communicator/ssh/key_pair_test.go b/communicator/ssh/key_pair_test.go index e9656c8ae..c2fa3afb1 100644 --- a/communicator/ssh/key_pair_test.go +++ b/communicator/ssh/key_pair_test.go @@ -5,7 +5,7 @@ package ssh import ( "bytes" - "crypto/dsa" + "crypto/dsa" //nolint:all "crypto/ecdsa" "crypto/rsa" "fmt" diff --git a/communicator/ssh/ssh.go b/communicator/ssh/ssh.go index 510ed583c..66b972a2e 100644 --- a/communicator/ssh/ssh.go +++ b/communicator/ssh/ssh.go @@ -8,7 +8,7 @@ package ssh import ( "encoding/pem" "fmt" - "io/ioutil" + "io" "os" "time" @@ -22,7 +22,7 @@ func parseKeyFile(path string) ([]byte, error) { } defer f.Close() - keyBytes, err := ioutil.ReadAll(f) + keyBytes, err := io.ReadAll(f) if err != nil { return nil, err } @@ -65,7 +65,7 @@ func ReadCertificate(certificatePath string, keySigner ssh.Signer) (ssh.Signer, } // Load the certificate - cert, err := ioutil.ReadFile(certificatePath) + cert, err := os.ReadFile(certificatePath) if err != nil { return nil, fmt.Errorf("unable to read certificate file: %v", err) } diff --git a/communicator/sshkey/generate.go b/communicator/sshkey/generate.go index 030d2f6e2..8b69f6d2d 100644 --- a/communicator/sshkey/generate.go +++ b/communicator/sshkey/generate.go @@ -4,7 +4,7 @@ package sshkey import ( - "crypto/dsa" + "crypto/dsa" //nolint:all "crypto/ecdsa" "crypto/ed25519" "crypto/elliptic" diff --git a/communicator/step_connect_ssh.go b/communicator/step_connect_ssh.go index 10b8a5092..a1bb57515 100644 --- a/communicator/step_connect_ssh.go +++ b/communicator/step_connect_ssh.go @@ -7,6 +7,7 @@ import ( "context" "errors" "fmt" + "golang.org/x/term" "io" "log" "net" @@ -14,8 +15,6 @@ import ( "strings" "time" - "golang.org/x/crypto/ssh/terminal" - helperssh "github.com/hashicorp/packer-plugin-sdk/communicator/ssh" "github.com/hashicorp/packer-plugin-sdk/multistep" packersdk "github.com/hashicorp/packer-plugin-sdk/packer" @@ -261,7 +260,7 @@ func sshBastionConfig(config *Config) (*gossh.ClientConfig, error) { if config.SSHBastionInteractive { var c io.ReadWriteCloser - if terminal.IsTerminal(int(os.Stdin.Fd())) { + if term.IsTerminal(int(os.Stdin.Fd())) { c = os.Stdin } else { tty, err := os.Open("/dev/tty") diff --git a/communicator/step_debug_ssh_keys.go b/communicator/step_debug_ssh_keys.go index faf0789e9..2e6826f11 100644 --- a/communicator/step_debug_ssh_keys.go +++ b/communicator/step_debug_ssh_keys.go @@ -6,7 +6,7 @@ package communicator import ( "context" "fmt" - "io/ioutil" + "os" "github.com/hashicorp/packer-plugin-sdk/multistep" packersdk "github.com/hashicorp/packer-plugin-sdk/packer" @@ -24,7 +24,7 @@ func (s *StepDumpSSHKey) Run(_ context.Context, state multistep.StateBag) multis ui.Message(fmt.Sprintf("Saving key for debug purposes: %s", s.Path)) - err := ioutil.WriteFile(s.Path, s.SSH.SSHPrivateKey, 0700) + err := os.WriteFile(s.Path, s.SSH.SSHPrivateKey, 0700) if err != nil { state.Put("error", fmt.Errorf("Error saving debug key: %s", err)) return multistep.ActionHalt diff --git a/multistep/basic_runner_test.go b/multistep/basic_runner_test.go index b2502200c..ee36e44ff 100644 --- a/multistep/basic_runner_test.go +++ b/multistep/basic_runner_test.go @@ -10,8 +10,7 @@ import ( ) func TestBasicRunner_ImplRunner(t *testing.T) { - var raw interface{} - raw = &BasicRunner{} + var raw interface{} = &BasicRunner{} if _, ok := raw.(Runner); !ok { t.Fatalf("BasicRunner must be a Runner") } diff --git a/multistep/commonsteps/step_create_cdrom.go b/multistep/commonsteps/step_create_cdrom.go index 7de45e95d..0396c3bb3 100644 --- a/multistep/commonsteps/step_create_cdrom.go +++ b/multistep/commonsteps/step_create_cdrom.go @@ -7,7 +7,6 @@ import ( "context" "fmt" "io" - "io/ioutil" "log" "os" "os/exec" @@ -316,7 +315,7 @@ func (s *StepCreateCD) AddContent(dst, path, content string) error { if err != nil { return fmt.Errorf("error creating new directory %s: %s", dstDir, err) } - err = ioutil.WriteFile(dstPath, []byte(content), 0666) + err = os.WriteFile(dstPath, []byte(content), 0666) if err != nil { return fmt.Errorf("Error writing file %s on CD: %s", path, err) } diff --git a/multistep/commonsteps/step_create_cdrom_test.go b/multistep/commonsteps/step_create_cdrom_test.go index 93942cfa6..bae43facc 100644 --- a/multistep/commonsteps/step_create_cdrom_test.go +++ b/multistep/commonsteps/step_create_cdrom_test.go @@ -7,7 +7,6 @@ import ( "bytes" "context" "io/fs" - "io/ioutil" "os" "path/filepath" "testing" @@ -17,8 +16,7 @@ import ( ) func TestStepCreateCD_Impl(t *testing.T) { - var raw interface{} - raw = new(StepCreateCD) + var raw interface{} = new(StepCreateCD) if _, ok := raw.(multistep.Step); !ok { t.Fatalf("StepCreateCD should be a step") } @@ -40,7 +38,7 @@ func createFiles(t *testing.T, rootFolder string, expected map[string]string) { if err != nil { t.Fatalf("mkdir -p: %s", err) } - err = ioutil.WriteFile(path, []byte(content), 0666) + err = os.WriteFile(path, []byte(content), 0666) if err != nil { t.Fatalf("writing file: %s", err) } @@ -61,7 +59,7 @@ func checkFiles(t *testing.T, rootFolder string, expected map[string]string) { t.Fatalf("unexpected file: %s", nameSlashSafe) } - content, err := ioutil.ReadFile(path) + content, err := os.ReadFile(path) if err != nil { t.Fatalf("reading file: %s", err) } @@ -89,7 +87,7 @@ func TestStepCreateCD(t *testing.T) { state := testStepCreateCDState(t) step := new(StepCreateCD) - dir, err := ioutil.TempDir("", "packer") + dir, err := os.MkdirTemp("", "packer") if err != nil { t.Fatalf("err: %s", err) } @@ -172,7 +170,7 @@ func TestStepCreateCD_missing(t *testing.T) { state := testStepCreateCDState(t) step := new(StepCreateCD) - dir, err := ioutil.TempDir("", "packer") + dir, err := os.MkdirTemp("", "packer") if err != nil { t.Fatalf("err: %s", err) } diff --git a/multistep/commonsteps/step_create_floppy.go b/multistep/commonsteps/step_create_floppy.go index e5e2e3419..b066a9a2b 100644 --- a/multistep/commonsteps/step_create_floppy.go +++ b/multistep/commonsteps/step_create_floppy.go @@ -139,8 +139,7 @@ func (s *StepCreateFloppy) Run(ctx context.Context, state multistep.StateBag) mu crawlDirectoryFiles = []string{} // Collect files and copy them flatly...because floppy_files is broken on purpose. - var filelist chan string - filelist = make(chan string) + var filelist = make(chan string) go globFiles(s.Files, filelist) ui.Message("Copying files flatly from floppy_files") @@ -394,9 +393,7 @@ func removeBase(base string, path string) (string, error) { type directoryCache func(string) (fs.Directory, error) func fsDirectoryCache(rootDirectory fs.Directory) directoryCache { - var cache map[string]fs.Directory - - cache = make(map[string]fs.Directory) + var cache = make(map[string]fs.Directory) cache[""] = rootDirectory Input, Output, Error := make(chan string), make(chan fs.Directory), make(chan error) diff --git a/multistep/commonsteps/step_create_floppy_test.go b/multistep/commonsteps/step_create_floppy_test.go index 49f2babb2..d67dd39e3 100644 --- a/multistep/commonsteps/step_create_floppy_test.go +++ b/multistep/commonsteps/step_create_floppy_test.go @@ -7,7 +7,6 @@ import ( "bytes" "context" "fmt" - "io/ioutil" "log" "os" "path" @@ -22,8 +21,7 @@ import ( const TestFixtures = "test-fixtures" func TestStepCreateFloppy_Impl(t *testing.T) { - var raw interface{} - raw = new(StepCreateFloppy) + var raw interface{} = new(StepCreateFloppy) if _, ok := raw.(multistep.Step); !ok { t.Fatalf("StepCreateFloppy should be a step") } @@ -42,7 +40,7 @@ func TestStepCreateFloppy(t *testing.T) { state := testStepCreateFloppyState(t) step := new(StepCreateFloppy) - dir, err := ioutil.TempDir("", "packer") + dir, err := os.MkdirTemp("", "packer") if err != nil { t.Fatalf("err: %s", err) } @@ -105,7 +103,7 @@ func TestStepCreateFloppy_missing(t *testing.T) { state := testStepCreateFloppyState(t) step := new(StepCreateFloppy) - dir, err := ioutil.TempDir("", "packer") + dir, err := os.MkdirTemp("", "packer") if err != nil { t.Fatalf("err: %s", err) } @@ -150,7 +148,7 @@ func TestStepCreateFloppy_notfound(t *testing.T) { state := testStepCreateFloppyState(t) step := new(StepCreateFloppy) - dir, err := ioutil.TempDir("", "packer") + dir, err := os.MkdirTemp("", "packer") if err != nil { t.Fatalf("err: %s", err) } diff --git a/multistep/commonsteps/step_download_test.go b/multistep/commonsteps/step_download_test.go index bead7cc73..2534e4f63 100644 --- a/multistep/commonsteps/step_download_test.go +++ b/multistep/commonsteps/step_download_test.go @@ -8,7 +8,6 @@ import ( "context" "crypto/sha1" "encoding/hex" - "io/ioutil" "log" "net/http" "net/http/httptest" @@ -326,7 +325,7 @@ func createTempDir(t *testing.T) string { } func listFiles(t *testing.T, dir string) []string { - fs, err := ioutil.ReadDir(dir) + fs, err := os.ReadDir(dir) if err != nil { log.Fatal(err) } diff --git a/multistep/commonsteps/step_http_server_test.go b/multistep/commonsteps/step_http_server_test.go index 34d30cb0f..29e97ab5a 100644 --- a/multistep/commonsteps/step_http_server_test.go +++ b/multistep/commonsteps/step_http_server_test.go @@ -6,7 +6,7 @@ package commonsteps import ( "context" "fmt" - "io/ioutil" + "io" "net/http" "reflect" "testing" @@ -73,7 +73,7 @@ func TestStepHTTPServer_Run(t *testing.T) { if err != nil { t.Fatalf("http.Get: %v", err) } - b, err := ioutil.ReadAll(resp.Body) + b, err := io.ReadAll(resp.Body) if err != nil { t.Fatalf("readall: %v", err) } diff --git a/multistep/commonsteps/step_output_dir_test.go b/multistep/commonsteps/step_output_dir_test.go index 2bb458b9b..9d9368661 100644 --- a/multistep/commonsteps/step_output_dir_test.go +++ b/multistep/commonsteps/step_output_dir_test.go @@ -6,7 +6,6 @@ package commonsteps import ( "bytes" "context" - "io/ioutil" "os" "testing" @@ -25,7 +24,7 @@ func testState(t *testing.T) multistep.StateBag { } func testStepOutputDir(t *testing.T) *StepOutputDir { - td, err := ioutil.TempDir("", "packer") + td, err := os.MkdirTemp("", "packer") if err != nil { t.Fatalf("err: %s", err) } diff --git a/multistep/commonsteps/step_provision_test.go b/multistep/commonsteps/step_provision_test.go index eb1ebe3c3..f8984afa0 100644 --- a/multistep/commonsteps/step_provision_test.go +++ b/multistep/commonsteps/step_provision_test.go @@ -29,8 +29,7 @@ func testCommConfig() *communicator.Config { } func TestStepProvision_Impl(t *testing.T) { - var raw interface{} - raw = new(StepProvision) + var raw interface{} = new(StepProvision) if _, ok := raw.(multistep.Step); !ok { t.Fatalf("provision should be a step") } diff --git a/multistep/debug_runner_test.go b/multistep/debug_runner_test.go index 02ad2e181..7407e0fff 100644 --- a/multistep/debug_runner_test.go +++ b/multistep/debug_runner_test.go @@ -12,8 +12,7 @@ import ( ) func TestDebugRunner_Impl(t *testing.T) { - var raw interface{} - raw = &DebugRunner{} + var raw interface{} = &DebugRunner{} if _, ok := raw.(Runner); !ok { t.Fatal("DebugRunner must be a runner.") } diff --git a/multistep/statebag_test.go b/multistep/statebag_test.go index 09ed626a7..76eb1004e 100644 --- a/multistep/statebag_test.go +++ b/multistep/statebag_test.go @@ -8,8 +8,7 @@ import ( ) func TestBasicStateBag_ImplRunner(t *testing.T) { - var raw interface{} - raw = &BasicStateBag{} + var raw interface{} = &BasicStateBag{} if _, ok := raw.(StateBag); !ok { t.Fatalf("must be a StateBag") } diff --git a/packer/cache_config_unix_test.go b/packer/cache_config_unix_test.go index 72dd6d775..fa6841173 100644 --- a/packer/cache_config_unix_test.go +++ b/packer/cache_config_unix_test.go @@ -7,7 +7,6 @@ package packer import ( - "io/ioutil" "os" "path/filepath" "testing" @@ -15,12 +14,12 @@ import ( func TestCachePath(t *testing.T) { // temporary directories for env vars - xdgCacheHomeTempDir, err := ioutil.TempDir(os.TempDir(), "*") + xdgCacheHomeTempDir, err := os.MkdirTemp(os.TempDir(), "*") if err != nil { t.Fatalf("Failed to create temp test directory: failing test: %v", err) } defer os.RemoveAll(xdgCacheHomeTempDir) - packerCacheTempDir, err := ioutil.TempDir(os.TempDir(), "*") + packerCacheTempDir, err := os.MkdirTemp(os.TempDir(), "*") if err != nil { t.Fatalf("Failed to create temp test directory: failing test: %v", err) } diff --git a/packer/communicator_mock_test.go b/packer/communicator_mock_test.go index 5558a149d..6fe40de47 100644 --- a/packer/communicator_mock_test.go +++ b/packer/communicator_mock_test.go @@ -8,8 +8,7 @@ import ( ) func TestMockCommunicator_impl(t *testing.T) { - var raw interface{} - raw = new(MockCommunicator) + var raw interface{} = new(MockCommunicator) if _, ok := raw.(Communicator); !ok { t.Fatal("should be a communicator") } diff --git a/packer/multi_error_test.go b/packer/multi_error_test.go index 0029c0e9a..8e0880cdf 100644 --- a/packer/multi_error_test.go +++ b/packer/multi_error_test.go @@ -9,8 +9,7 @@ import ( ) func TestMultiError_Impl(t *testing.T) { - var raw interface{} - raw = &MultiError{} + var raw interface{} = &MultiError{} if _, ok := raw.(error); !ok { t.Fatal("MultiError must implement error") } diff --git a/packer/ui_mock.go b/packer/ui_mock.go index 48242146f..75767a8c0 100644 --- a/packer/ui_mock.go +++ b/packer/ui_mock.go @@ -6,7 +6,6 @@ package packer import ( "bytes" "io" - "io/ioutil" "testing" "time" ) @@ -17,8 +16,8 @@ func TestUi(t *testing.T) Ui { var buf bytes.Buffer return &BasicUi{ Reader: &buf, - Writer: ioutil.Discard, - ErrorWriter: ioutil.Discard, + Writer: io.Discard, + ErrorWriter: io.Discard, PB: &NoopProgressTracker{}, } } diff --git a/pathing/config_file_unix_test.go b/pathing/config_file_unix_test.go index 7cb99f532..1726c5b91 100644 --- a/pathing/config_file_unix_test.go +++ b/pathing/config_file_unix_test.go @@ -7,7 +7,6 @@ package pathing import ( - "io/ioutil" "os" "path/filepath" "testing" @@ -15,25 +14,25 @@ import ( func TestConfigPath(t *testing.T) { // temporary directories for env vars - xdgConfigHomeTempDir, err := ioutil.TempDir(os.TempDir(), "*") + xdgConfigHomeTempDir, err := os.MkdirTemp(os.TempDir(), "*") if err != nil { t.Fatalf("Failed to create temp test directory: failing test: %v", err) } defer os.RemoveAll(xdgConfigHomeTempDir) - packerConfigTempDir, err := ioutil.TempDir(os.TempDir(), "*") + packerConfigTempDir, err := os.MkdirTemp(os.TempDir(), "*") if err != nil { t.Fatalf("Failed to create temp test directory: failing test: %v", err) } defer os.RemoveAll(packerConfigTempDir) - homeTempDir, err := ioutil.TempDir(os.TempDir(), "*") + homeTempDir, err := os.MkdirTemp(os.TempDir(), "*") if err != nil { t.Fatalf("Failed to create temp test directory: failing test: %v", err) } defer os.RemoveAll(homeTempDir) - homeDirDefaultConfigTempDir, err := ioutil.TempDir(os.TempDir(), "*") + homeDirDefaultConfigTempDir, err := os.MkdirTemp(os.TempDir(), "*") if err != nil { t.Fatalf("Failed to create temp test directory: failing test: %v", err) } diff --git a/rpc/builder.go b/rpc/builder.go index d6d5530d7..3b73b4b25 100644 --- a/rpc/builder.go +++ b/rpc/builder.go @@ -126,7 +126,10 @@ func (b *BuilderServer) Run(streamId uint32, reply *uint32) error { if artifact != nil { streamId = b.mux.NextId() artifactServer := newServerWithMux(b.mux, streamId) - artifactServer.RegisterArtifact(artifact) + err := artifactServer.RegisterArtifact(artifact) + if err != nil { + return err + } go artifactServer.Serve() *reply = streamId } diff --git a/rpc/communicator_test.go b/rpc/communicator_test.go index 4d490213c..966daae74 100644 --- a/rpc/communicator_test.go +++ b/rpc/communicator_test.go @@ -164,8 +164,7 @@ func TestCommunicatorRPC(t *testing.T) { } func TestCommunicator_ImplementsCommunicator(t *testing.T) { - var raw interface{} - raw = Communicator(nil) + var raw interface{} = Communicator(nil) if _, ok := raw.(packersdk.Communicator); !ok { t.Fatal("should be a Communicator") } diff --git a/rpc/datasource_test.go b/rpc/datasource_test.go index 73e901f55..bc98a2780 100644 --- a/rpc/datasource_test.go +++ b/rpc/datasource_test.go @@ -83,8 +83,7 @@ func TestDatasource(t *testing.T) { } func TestDatasource_Implements(t *testing.T) { - var raw interface{} - raw = new(datasource) + var raw interface{} = new(datasource) if _, ok := raw.(packer.Datasource); !ok { t.Fatal("not a datasource") } diff --git a/rpc/post_processor_test.go b/rpc/post_processor_test.go index c8ef15303..77f6831e7 100644 --- a/rpc/post_processor_test.go +++ b/rpc/post_processor_test.go @@ -134,8 +134,7 @@ func TestPostProcessorRPC_cancel(t *testing.T) { } func TestPostProcessor_Implements(t *testing.T) { - var raw interface{} - raw = new(postProcessor) + var raw interface{} = new(postProcessor) if _, ok := raw.(packersdk.PostProcessor); !ok { t.Fatal("not a postprocessor") } diff --git a/rpc/ui_test.go b/rpc/ui_test.go index 5b3c2abf6..58ae15072 100644 --- a/rpc/ui_test.go +++ b/rpc/ui_test.go @@ -6,7 +6,6 @@ package rpc import ( "bytes" "io" - "io/ioutil" "reflect" "testing" ) @@ -122,7 +121,7 @@ func TestUiRPC(t *testing.T) { } ctt := []byte("foo bar baz !!!") - rc := ioutil.NopCloser(bytes.NewReader(ctt)) + rc := io.NopCloser(bytes.NewReader(ctt)) stream := uiClient.TrackProgress("stuff.txt", 0, int64(len(ctt)), rc) if ui.trackProgressCalled != true { diff --git a/sdk-internals/communicator/none/communicator_test.go b/sdk-internals/communicator/none/communicator_test.go index fb7c3d9f4..20a7d12ac 100644 --- a/sdk-internals/communicator/none/communicator_test.go +++ b/sdk-internals/communicator/none/communicator_test.go @@ -10,8 +10,7 @@ import ( ) func TestCommIsCommunicator(t *testing.T) { - var raw interface{} - raw = &comm{} + var raw interface{} = &comm{} if _, ok := raw.(packersdk.Communicator); !ok { t.Fatalf("comm must be a communicator") } diff --git a/sdk-internals/communicator/ssh/communicator.go b/sdk-internals/communicator/ssh/communicator.go index 061c307ad..ed46dd89d 100644 --- a/sdk-internals/communicator/ssh/communicator.go +++ b/sdk-internals/communicator/ssh/communicator.go @@ -13,7 +13,6 @@ import ( "errors" "fmt" "io" - "io/ioutil" "log" "net" "os" @@ -715,7 +714,7 @@ func (c *comm) scpDownloadSession(path string, output io.Writer) error { return err } - if len(fi) < 0 { + if len(fi) == 0 { return fmt.Errorf("empty response from server") } @@ -821,7 +820,7 @@ func (c *comm) scpSession(scpCommand string, f func(io.Writer, *bufio.Reader) er // Otherwise, we have an ExitError, meaning we can just read the // exit status log.Printf("[DEBUG] non-zero exit status: %d, %v", exitErr.ExitStatus(), err) - stdoutB, err := ioutil.ReadAll(stdoutR) + stdoutB, err := io.ReadAll(stdoutR) if err != nil { return err } diff --git a/sdk-internals/communicator/ssh/communicator_test.go b/sdk-internals/communicator/ssh/communicator_test.go index 9f1781204..11d0077c5 100644 --- a/sdk-internals/communicator/ssh/communicator_test.go +++ b/sdk-internals/communicator/ssh/communicator_test.go @@ -124,8 +124,7 @@ func newMockBrokenServer(t *testing.T) string { } func TestCommIsCommunicator(t *testing.T) { - var raw interface{} - raw = &comm{} + var raw interface{} = &comm{} if _, ok := raw.(packersdk.Communicator); !ok { t.Fatalf("comm must be a communicator") } diff --git a/sdk-internals/communicator/ssh/keyboard_interactive.go b/sdk-internals/communicator/ssh/keyboard_interactive.go index e7d58c6e7..19cbbaecd 100644 --- a/sdk-internals/communicator/ssh/keyboard_interactive.go +++ b/sdk-internals/communicator/ssh/keyboard_interactive.go @@ -4,15 +4,15 @@ package ssh import ( + "golang.org/x/term" "io" "log" "golang.org/x/crypto/ssh" - "golang.org/x/crypto/ssh/terminal" ) func KeyboardInteractive(c io.ReadWriter) ssh.KeyboardInteractiveChallenge { - t := terminal.NewTerminal(c, "") + t := term.NewTerminal(c, "") return func(user, instruction string, questions []string, echos []bool) ([]string, error) { if len(questions) == 0 { return []string{}, nil @@ -29,7 +29,7 @@ func KeyboardInteractive(c io.ReadWriter) ssh.KeyboardInteractiveChallenge { if err != nil { return nil, err } - answers[i] = string(s) + answers[i] = s } return answers, nil } diff --git a/sdk-internals/communicator/ssh/password_test.go b/sdk-internals/communicator/ssh/password_test.go index 985d36e7a..37901cf5e 100644 --- a/sdk-internals/communicator/ssh/password_test.go +++ b/sdk-internals/communicator/ssh/password_test.go @@ -11,8 +11,7 @@ import ( ) func TestPasswordKeyboardInteractive_Impl(t *testing.T) { - var raw interface{} - raw = PasswordKeyboardInteractive("foo") + var raw interface{} = PasswordKeyboardInteractive("foo") if _, ok := raw.(ssh.KeyboardInteractiveChallenge); !ok { t.Fatal("PasswordKeyboardInteractive must implement KeyboardInteractiveChallenge") } diff --git a/sdk-internals/communicator/winrm/communicator.go b/sdk-internals/communicator/winrm/communicator.go index 6d398b8bc..1ca4e95c3 100644 --- a/sdk-internals/communicator/winrm/communicator.go +++ b/sdk-internals/communicator/winrm/communicator.go @@ -11,7 +11,6 @@ import ( "encoding/base64" "fmt" "io" - "io/ioutil" "log" "os" "path/filepath" @@ -170,7 +169,7 @@ func (c *Communicator) Download(src string, dst io.Writer) error { base64DecodePipe := &Base64Pipe{w: dst} cmd := winrm.Powershell(fmt.Sprintf(encodeScript, src)) - _, err = client.Run(cmd, base64DecodePipe, ioutil.Discard) + _, err = client.Run(cmd, base64DecodePipe, io.Discard) return err } @@ -235,7 +234,7 @@ type Base64Pipe struct { } func (d *Base64Pipe) ReadFrom(r io.Reader) (int64, error) { - b, err := ioutil.ReadAll(r) + b, err := io.ReadAll(r) if err != nil { return 0, err } diff --git a/tmp/tmp.go b/tmp/tmp.go index 687e351c8..9c6e72a26 100644 --- a/tmp/tmp.go +++ b/tmp/tmp.go @@ -17,7 +17,6 @@ package tmp import ( - "io/ioutil" "os" ) @@ -31,7 +30,7 @@ var tmpDir = os.TempDir() // It is the caller's responsibility // to remove the file when no longer needed. func Dir(prefix string) (string, error) { - return ioutil.TempDir(tmpDir, prefix) + return os.MkdirTemp(tmpDir, prefix) } // File creates a new temporary file in the system temporary @@ -45,5 +44,5 @@ func Dir(prefix string) (string, error) { // to find the pathname of the file. It is the caller's responsibility // to remove the file when no longer needed. func File(pattern string) (*os.File, error) { - return ioutil.TempFile(tmpDir, pattern) + return os.CreateTemp(tmpDir, pattern) } From aa0cffe71a7cfb1ea09598fc75f395dd1031d04c Mon Sep 17 00:00:00 2001 From: Ross MacLean Date: Fri, 3 Feb 2023 10:39:13 +0000 Subject: [PATCH 015/105] Add deprecation warning for DSA Co-authored-by: Lucas Bajolet <105649352+lbajolet-hashicorp@users.noreply.github.com> --- communicator/ssh/key_pair.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/communicator/ssh/key_pair.go b/communicator/ssh/key_pair.go index de511128f..522a552d8 100644 --- a/communicator/ssh/key_pair.go +++ b/communicator/ssh/key_pair.go @@ -60,7 +60,7 @@ type KeyPair struct { // KeyPairFromPrivateKey returns a KeyPair loaded from an existing private key. // // Supported key pair types include: -// - DSA +// - DSA (NOTE: deprecated from Go as DSA is not regarded as secure anymore, please consider RSA or ED25519 instead) // - ECDSA // - ED25519 // - RSA From 2085e33835351774ec922faf0f92cad01d51ef4d Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Tue, 14 Feb 2023 14:32:22 -0500 Subject: [PATCH 016/105] Update hashicorp/go-getter pkg to address CVE-2023-0475 --- go.mod | 49 +++--- go.sum | 478 ++++++++------------------------------------------------- 2 files changed, 87 insertions(+), 440 deletions(-) diff --git a/go.mod b/go.mod index 1a3aa3f6f..b64d409b5 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,8 @@ module github.com/hashicorp/packer-plugin-sdk require ( - cloud.google.com/go v0.94.0 // indirect - cloud.google.com/go/storage v1.16.1 // indirect + cloud.google.com/go v0.105.0 // indirect + cloud.google.com/go/storage v1.27.0 // indirect github.com/Azure/go-ntlmssp v0.0.0-20200615164410-66371956d46c // indirect github.com/ChrisTrenkamp/goxpath v0.0.0-20210404020558-97928f7e12b6 // indirect github.com/Masterminds/goutils v1.1.1 // indirect @@ -10,7 +10,7 @@ require ( github.com/antchfx/xpath v1.1.11 // indirect github.com/antchfx/xquery v0.0.0-20180515051857-ad5b8c7a47b0 // indirect github.com/armon/go-metrics v0.3.9 // indirect - github.com/aws/aws-sdk-go v1.40.34 + github.com/aws/aws-sdk-go v1.44.114 github.com/cenkalti/backoff/v3 v3.2.2 // indirect github.com/dylanmei/iso8601 v0.1.0 // indirect github.com/dylanmei/winrmtest v0.0.0-20170819153634-c2fbb09e6c08 @@ -21,21 +21,21 @@ require ( github.com/gofrs/uuid v4.0.0+incompatible // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/snappy v0.0.4 // indirect - github.com/google/go-cmp v0.5.6 + github.com/google/go-cmp v0.5.9 github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 github.com/google/uuid v1.3.0 github.com/hashicorp/consul/api v1.10.1 github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-getter/gcs/v2 v2.1.0 - github.com/hashicorp/go-getter/s3/v2 v2.1.0 - github.com/hashicorp/go-getter/v2 v2.1.0 + github.com/hashicorp/go-getter/gcs/v2 v2.2.0 + github.com/hashicorp/go-getter/s3/v2 v2.2.0 + github.com/hashicorp/go-getter/v2 v2.2.0 github.com/hashicorp/go-hclog v0.16.2 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-msgpack v0.5.5 // indirect github.com/hashicorp/go-multierror v1.1.1 github.com/hashicorp/go-retryablehttp v0.7.0 // indirect - github.com/hashicorp/go-version v1.3.0 + github.com/hashicorp/go-version v1.6.0 github.com/hashicorp/golang-lru v0.5.4 // indirect github.com/hashicorp/hcl/v2 v2.13.0 github.com/hashicorp/vault/api v1.1.1 @@ -65,20 +65,23 @@ require ( github.com/zclconf/go-cty v1.10.0 golang.org/x/crypto v0.0.0-20220517005047-85d78b3ac167 golang.org/x/mobile v0.0.0-20210901025245-1fde1d6c3ca1 - golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 - golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 - golang.org/x/sync v0.0.0-20210220032951-036812b2e83c - golang.org/x/sys v0.0.0-20211019181941-9d821ace8654 // indirect - golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b // indirect - golang.org/x/text v0.3.7 // indirect + golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 + golang.org/x/net v0.1.0 + golang.org/x/sync v0.1.0 + golang.org/x/sys v0.1.0 // indirect + golang.org/x/term v0.1.0 + golang.org/x/text v0.4.0 // indirect golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect - golang.org/x/tools v0.1.10 - google.golang.org/api v0.56.0 // indirect + golang.org/x/tools v0.1.12 + google.golang.org/api v0.101.0 // indirect gopkg.in/square/go-jose.v2 v2.6.0 // indirect gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect ) require ( + cloud.google.com/go/compute v1.12.1 // indirect + cloud.google.com/go/compute/metadata v0.1.1 // indirect + cloud.google.com/go/iam v0.6.0 // indirect github.com/Masterminds/semver v1.5.0 // indirect github.com/Masterminds/sprig v2.22.0+incompatible // indirect github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect @@ -87,7 +90,8 @@ require ( github.com/bgentry/speakeasy v0.1.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/golang/protobuf v1.5.2 // indirect - github.com/googleapis/gax-go/v2 v2.1.0 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.2.0 // indirect + github.com/googleapis/gax-go/v2 v2.6.0 // indirect github.com/hashicorp/go-rootcerts v1.0.2 // indirect github.com/hashicorp/go-safetemp v1.0.0 // indirect github.com/hashicorp/go-sockaddr v1.0.2 // indirect @@ -96,6 +100,7 @@ require ( github.com/hashicorp/vault/sdk v0.2.1 // indirect github.com/huandu/xstrings v1.3.2 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect + github.com/klauspost/compress v1.11.2 // indirect github.com/kr/fs v0.1.0 // indirect github.com/mattn/go-colorable v0.1.8 // indirect github.com/mitchellh/copystructure v1.0.0 // indirect @@ -103,12 +108,12 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/posener/complete v1.2.3 // indirect go.opencensus.io v0.23.0 // indirect - golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f // indirect - golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect + golang.org/x/oauth2 v0.1.0 // indirect + golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2 // indirect - google.golang.org/grpc v1.40.0 // indirect - google.golang.org/protobuf v1.27.1 // indirect + google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c // indirect + google.golang.org/grpc v1.50.1 // indirect + google.golang.org/protobuf v1.28.1 // indirect ) go 1.18 diff --git a/go.sum b/go.sum index 6c4ac2c37..08e949169 100644 --- a/go.sum +++ b/go.sum @@ -1,51 +1,16 @@ bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= -cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= -cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= -cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= -cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= -cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= -cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= -cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= -cloud.google.com/go v0.94.0 h1:QDB2MZHqjTt0hGKnoEWyG/iWykue/lvkLdogLgrg10U= -cloud.google.com/go v0.94.0/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.16.1 h1:sMEIc4wxvoY3NXG7Rn9iP7jb/2buJgWR1vNXCR/UPfs= -cloud.google.com/go/storage v1.16.1/go.mod h1:LaNorbty3ehnU3rEjXSNV/NRgQA0O8Y+uh6bPe5UOk4= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +cloud.google.com/go v0.105.0 h1:DNtEKRBAAzeS4KyIory52wWHuClNaXJ5x1F7xa4q+5Y= +cloud.google.com/go v0.105.0/go.mod h1:PrLgOJNe5nfE9UMxKxgXj4mD3voiP+YQ6gdt6KMFOKM= +cloud.google.com/go/compute v1.12.1 h1:gKVJMEyqV5c/UnpzjjQbo3Rjvvqpr9B1DFSbJC4OXr0= +cloud.google.com/go/compute v1.12.1/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x/6PIIOocU= +cloud.google.com/go/compute/metadata v0.1.1 h1:/sxEbyrm6cw+XOUw1YxBHlatV71z4vpnmO7z2IZ0h3I= +cloud.google.com/go/compute/metadata v0.1.1/go.mod h1:Z1VN+bulIf6bt4P/C37K4DyZYZEXYonfTBHHFPO/4UU= +cloud.google.com/go/iam v0.6.0 h1:nsqQC88kT5Iwlm4MeNGTpfMWddp6NB/UOLFTH6m1QfQ= +cloud.google.com/go/iam v0.6.0/go.mod h1:+1AH33ueBne5MzYccyMHtEKqLE4/kJOibtffMHDMFMc= +cloud.google.com/go/longrunning v0.1.1 h1:y50CXG4j0+qvEukslYFBCrzaXX0qpFbBzc3PchSu/LE= +cloud.google.com/go/storage v1.27.0 h1:YOO045NZI9RKfCj1c5A/ZtuuENUc8OAW+gHdGnDgyMQ= +cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-ntlmssp v0.0.0-20180810175552-4a21cbd618b4/go.mod h1:chxPXzSsl7ZWRAuOIE23GDNzjWuZquvFlgA8xmpunjU= github.com/Azure/go-ntlmssp v0.0.0-20200615164410-66371956d46c h1:/IBSNwUN8+eKzUzbJPqhK839ygXJ82sde8x3ogr6R28= @@ -65,7 +30,6 @@ github.com/Masterminds/sprig v2.22.0+incompatible h1:z4yfnGrZ7netVz+0EDJ0Wi+5VZC github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= github.com/Microsoft/hcsshim v0.8.9/go.mod h1:5692vkUqntj1idxauYlpoINNKeqCiG6Sg38RRsjT5y8= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= @@ -76,7 +40,6 @@ github.com/antchfx/xpath v1.1.11 h1:WOFtK8TVAjLm3lbgqeP0arlHpvCEeTANeWZ/csPpJkQ= github.com/antchfx/xpath v1.1.11/go.mod h1:i54GszH55fYfBmoZXapTHN8T8tkcHfRgLyVwwqzXNcs= github.com/antchfx/xquery v0.0.0-20180515051857-ad5b8c7a47b0 h1:JaCC8jz0zdMLk2m+qCCVLLLM/PL93p84w4pK3aJWj60= github.com/antchfx/xquery v0.0.0-20180515051857-ad5b8c7a47b0/go.mod h1:LzD22aAzDP8/dyiCKFp31He4m2GPjl0AFyzDtZzUu9M= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3 h1:ZSTrOEhiM5J5RFxEaFvMZVEAM1KvT1YzbEOwB2EAGjA= github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6iT90AvPUL1NNfNw= github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo= @@ -90,10 +53,9 @@ github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj github.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aws/aws-sdk-go v1.25.37/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.30.8/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= github.com/aws/aws-sdk-go v1.30.27/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= -github.com/aws/aws-sdk-go v1.40.34 h1:SBYmodndE2d4AYucuuJnOXk4MD1SFbucoIdpwKVKeSA= -github.com/aws/aws-sdk-go v1.40.34/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q= +github.com/aws/aws-sdk-go v1.44.114 h1:plIkWc/RsHr3DXBj4MEw9sEW4CcL/e2ryokc+CKyq1I= +github.com/aws/aws-sdk-go v1.44.114/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= @@ -105,18 +67,11 @@ github.com/cenkalti/backoff/v3 v3.0.0/go.mod h1:cIeZDE3IrqwwJl6VUwCN6trj1oXrTS4r github.com/cenkalti/backoff/v3 v3.2.2 h1:cfUAAO3yvKMYKPrvhDuHSwQnhZNk/RMHKdZqKTxfm6M= github.com/cenkalti/backoff/v3 v3.2.2/go.mod h1:cIeZDE3IrqwwJl6VUwCN6trj1oXrTS4rc0ij+ULvLYs= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko= github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= github.com/containerd/containerd v1.3.2/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= @@ -144,10 +99,6 @@ github.com/dylanmei/winrmtest v0.0.0-20170819153634-c2fbb09e6c08/go.mod h1:VBVDF github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= -github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/fatih/camelcase v1.0.0 h1:hxNvNX/xYBp0ovncs8WyWZrOrpBNub/JfaMvbURyft8= github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= @@ -161,11 +112,7 @@ github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4 github.com/frankban/quicktest v1.10.0 h1:Gfh+GAJZOAoKZsIZeZbdn2JF10kN1XHNvjsvQK8gVkE= github.com/frankban/quicktest v1.10.0/go.mod h1:ui7WezCLWMWxVWr1GETZY3smRy0G4KWq9vcPtJmFl7Y= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-asn1-ber/asn1-ber v1.3.1/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-ldap/ldap/v3 v3.1.3/go.mod h1:3rbOH3jRS2u6jg2rJnKAMLE/xQyCKIveG2Sa/Cohzb8= @@ -187,26 +134,15 @@ github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7a github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= -github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= @@ -216,62 +152,34 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c h1:964Od4U6p2jUkFxvCydnIczKteheJEzHRToSGK3Bnlw= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= -github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.2.1 h1:d8MncMlErDFTwQGBK1xhv026j9kqhvw1Qv9IbWT1VLQ= -github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= 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/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gax-go/v2 v2.1.0 h1:6DWmvNpomjL1+3liNSZbVns3zsYzzCjm6pRBO1tLeso= -github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= +github.com/googleapis/enterprise-certificate-proxy v0.2.0 h1:y8Yozv7SZtlU//QXbezB6QkpuE6jMD2/gfzk4AftXjs= +github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= +github.com/googleapis/gax-go/v2 v2.6.0 h1:SXk3ABtQYDT/OH8jAyvEOQ58mgawq5C4o/4/89qN2ZU= +github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= github.com/gorilla/mux v1.7.4/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/hashicorp/consul/api v1.10.1 h1:MwZJp86nlnL+6+W1Zly4JUuVn9YHhMggBirMpHGD7kw= github.com/hashicorp/consul/api v1.10.1/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= github.com/hashicorp/consul/sdk v0.8.0 h1:OJtKBtEjboEZvG6AOUdh4Z1Zbyu0WcxQ0qatRrZHTVU= @@ -283,12 +191,12 @@ github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtng github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-getter/gcs/v2 v2.1.0 h1:1S1hvWgHrhUihP/Y4FVbjCWwE7EwxpksKoRcC7g+Hgs= -github.com/hashicorp/go-getter/gcs/v2 v2.1.0/go.mod h1:dVyTnX1BynHAjbumB4Pk14GoJ+v3VbDUJtbI7G0oOlU= -github.com/hashicorp/go-getter/s3/v2 v2.1.0 h1:8uwuP97zEQ7y7H4bLzRqiN4T8vmpXeJthigqSEjX+08= -github.com/hashicorp/go-getter/s3/v2 v2.1.0/go.mod h1:rwzJPQaBuc5riYOucPx84DOE74xIhKENOWgBjK3XVEs= -github.com/hashicorp/go-getter/v2 v2.1.0 h1:MsLbi7yFKGFPVmpK+un4/k5HFry0tqvo9JppsCmIutU= -github.com/hashicorp/go-getter/v2 v2.1.0/go.mod h1:w65fE5glbccYjndAuj1kA5lnVBGZYEaH0e5qA1kpIks= +github.com/hashicorp/go-getter/gcs/v2 v2.2.0 h1:oo6LVXva9I4CZzv531mn/FY5gtRx540I6eWwJVPWA4o= +github.com/hashicorp/go-getter/gcs/v2 v2.2.0/go.mod h1:oDHNhZN2Gf6UqfIol4S9PkbzMFlf8rBctrJvAHDTtOM= +github.com/hashicorp/go-getter/s3/v2 v2.2.0 h1:JGZihrdkZnuw+bDf8BnxuRLPwi0cfL2mwRlWA2lREAg= +github.com/hashicorp/go-getter/s3/v2 v2.2.0/go.mod h1:hj0uM2nGIi0rln/VcvxjaQYQg3WGssfUh/ya5jA555g= +github.com/hashicorp/go-getter/v2 v2.2.0 h1:vLenCsJqB5oNE141xKtT6cajhwAE8dneiNgzZA3oOqs= +github.com/hashicorp/go-getter/v2 v2.2.0/go.mod h1:EcJx6oZE8hmGuRR1l38QrfnyiujQbwsEAn11eHv6l2M= github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd/go.mod h1:9bjs9uLqI8l75knNv3lV1kA55veR+WUPSiKIWcQHudI= github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= @@ -329,8 +237,8 @@ github.com/hashicorp/go-uuid v1.0.2 h1:cfejS+Tpcp13yd5nYHWDI6qVCny6wyX2Mt5SGur2I github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go-version v1.3.0 h1:McDWVJIU/y+u1BRV06dPaLfLCaT7fUTJLp5r04x7iNw= -github.com/hashicorp/go-version v1.3.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= +github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= @@ -358,8 +266,6 @@ github.com/hashicorp/yamux v0.0.0-20210826001029-26ff87cf9493/go.mod h1:CtWFDAQg github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/xstrings v1.3.2 h1:L18LIDzqlW6xN2rEkpdV8+oL/IXWJ1APd+vsdYy4Wdw= github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= @@ -374,12 +280,12 @@ github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGw github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/compress v1.11.2 h1:MiK62aErc3gIiVEtyzKfeOHgW7atJb5g/KNX5m3c2nQ= +github.com/klauspost/compress v1.11.2/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0 h1:Jskdu9ieNAYnjxsi0LbQp1ulIKZV1LAFgK1tWhpZgl8= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= @@ -420,7 +326,6 @@ github.com/mitchellh/copystructure v1.0.0 h1:Laisrj+bAB6b/yJwB5Bt3ITZhGJdqmxquMK github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/go-fs v0.0.0-20180402235330-b7b9ca407fff h1:bFJ74ac7ZK/jyislqiWdzrnENesFt43sNEBRh1xk/+g= github.com/mitchellh/go-fs v0.0.0-20180402235330-b7b9ca407fff/go.mod h1:g7SZj7ABpStq3tM4zqHiVEG5un/DZ1+qJJKO7qx1EvU= -github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= @@ -495,8 +400,6 @@ github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= -github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/go-glob v1.0.0 h1:iQh3xXAumdQ+4Ufa5b25cRpC5TYKlno6hsv6Cb3pkBk= @@ -509,7 +412,6 @@ github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvH github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= @@ -527,28 +429,17 @@ github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqri github.com/ugorji/go v1.2.6/go.mod h1:anCg0y61KIhDlPZmnH+so+RQbysYVyDko0IMgJv0Nn0= github.com/ugorji/go/codec v1.2.6 h1:7kbGefxLoDBuYXOms4yD7223OpNMMPNPZxXk5TvFcyQ= github.com/ugorji/go/codec v1.2.6/go.mod h1:V6TCNZ4PHqoHGFZuSG1W8nrCzzdgA2DozYxWFFpvxTw= -github.com/ulikunitz/xz v0.5.8/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/ulikunitz/xz v0.5.10 h1:t92gobL9l3HE202wg3rlk19F6X+JOxl9BBrCCMYEYd8= github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4= github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/zclconf/go-cty v1.10.0 h1:mp9ZXQeIcN8kAwuqorjH+Q+njbJKjLrvB2yIh4q7U+0= github.com/zclconf/go-cty v1.10.0/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -557,7 +448,6 @@ golang.org/x/crypto v0.0.0-20190222235706-ffb98f73852f/go.mod h1:6SG95UA2DQfeDnf golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190418165655-df01cb2cc480/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200604202706-70a84ac30bf9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -567,120 +457,57 @@ golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm golang.org/x/crypto v0.0.0-20220517005047-85d78b3ac167 h1:O8uGbHCqlTp2P6QJSLmCojM4mN6UemYv8K+dCnmHmu0= golang.org/x/crypto v0.0.0-20220517005047-85d78b3ac167/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= golang.org/x/exp v0.0.0-20190731235908-ec7cb31e5a56/go.mod h1:JhuoJpWY28nO4Vef9tZUw9qufEGTyX1+7lmHxV5q5G4= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mobile v0.0.0-20210901025245-1fde1d6c3ca1 h1:t3ZHqovedSY8DEAUmZA99fPJhUhOb176PLACYA1sJ8Y= golang.org/x/mobile v0.0.0-20210901025245-1fde1d6c3ca1/go.mod h1:jFTmtFYCV0MFtXBU+J5V/+5AUeVS0ON/0WkE/KSrl6E= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 h1:kQgndtyPBW/JIYERgdxfwMYh3AVStj88WQTlNDi2a+o= -golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/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-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-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200602114024-627f9648deb9/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-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 h1:CIJ76btIcR3eFI5EgSo6k1qKw9KJexJuRLI9G7Hp5wE= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.1.0 h1:hZ/3BUoy5aId7sCpA/Tc5lt8DkFgdVS2onTpJsZ/fl0= +golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= 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= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f h1:Qmd2pbz05z7z6lm0DrgQVVPuBm92jqujBKMHMOlOQEw= -golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.1.0 h1:isLCZuhj4v+tYv7eskaN4v/TM+A1begWWgyVJDdl1+Y= +golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -690,78 +517,43 @@ golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190514135907-3a4b5fb9f71f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/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-20211019181941-9d821ace8654 h1:id054HUawV2/6IGm2IV8KZQjqtwAOo2CYlOToYqa0d0= -golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.1.0 h1:kunALQeHf1/185U1i0GOB/fy1IPRDDpuoOOqRReG57U= +golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b h1:9zKuko04nR4gjZ4+DNjHqRlAJqbJETHwiNKDqTfOjfE= -golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.1.0 h1:g6Z6vPFA9dYBAF7DWcH6sCcOntplXsDKcliusYijMlw= +golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/text v0.4.0 h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac h1:7zkz7BUtwNFFqcowJ+RIgu2MaV/MapERkDIy+mwPyjs= golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -772,185 +564,46 @@ golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.10 h1:QjFRCZxdOhBJ/UNgnBZLbNV13DlbnK0quyivTnXJM20= -golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= +golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.21.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= -google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= -google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= -google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= -google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= -google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= -google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= -google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= -google.golang.org/api v0.56.0 h1:08F9XVYTLOGeSQb3xI9C0gXMuQanhdGed0cWFhDozbI= -google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= +golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +google.golang.org/api v0.101.0 h1:lJPPeEBIRxGpGLwnBTam1NPEM8Z2BmmXEd3z812pjwM= +google.golang.org/api v0.101.0/go.mod h1:CjxAAWWt3A3VrUE2IGDY2bgK5qhoG/OkyWVlYcP05MY= 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= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= -google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= -google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= -google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210825212027-de86158e7fda/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2 h1:NHN4wOCScVzKhPenJ2dt+BTs3X/XkBVI/Rh4iDt55T8= -google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c h1:QgY/XxIAIeccR+Ca/rDdKubLIU9rcJ3xfy1DC/Wd2Oo= +google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c/go.mod h1:CGI5F/G+E5bKwmfYo09AXuVN4dD894kIKUFmVbP2/Fo= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.40.0 h1:AGJ0Ih4mHjSeibYkFGh1dD9KJ/eOtZ93I6hoHhukQ5Q= -google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= +google.golang.org/grpc v1.50.1 h1:DS/BukOZWp8s6p4Dt/tOaJaTQyPyOoCcrjroHuCeLzY= +google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -959,19 +612,17 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= -google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= @@ -981,7 +632,6 @@ gopkg.in/square/go-jose.v2 v2.6.0/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76 gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -993,12 +643,4 @@ gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= From a124fa70d6dda90548239781589ae4a4d8c0ac75 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Tue, 7 Mar 2023 11:35:56 -0500 Subject: [PATCH 017/105] Add go-test action for SDK --- .github/workflows/go-test.yml | 136 ++++++++++++++++++++++++++++++++++ 1 file changed, 136 insertions(+) create mode 100644 .github/workflows/go-test.yml diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml new file mode 100644 index 000000000..254443a1f --- /dev/null +++ b/.github/workflows/go-test.yml @@ -0,0 +1,136 @@ +name: go-test + +on: + push: + branches: + - main + pull_request: + branches: + - main + + +env: + TEST_RESULTS_PATH: /tmp/test-results + +jobs: + + linux-tests: + runs-on: ubuntu-latest + strategy: + matrix: + go-version: + - 1.18 + - 1.19 + directory: + - . + permissions: + id-token: write + contents: read + steps: + - name: Setup go + uses: actions/setup-go@v3 + with: + go-version: ${{ matrix.go-version }} + + - name: Checkout code + uses: actions/checkout@v3 + + - name: Create test directory + run: | + mkdir -p ${{ env.TEST_RESULTS_PATH }}/packer-plugin-sdk + + - name: Setup cache for go modules + uses: actions/cache@v3 + with: + path: | + ~/.cache/go-build + ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + + - name: Download go modules + run: go mod download + + - name: Run gofmt + run: | + make fmt-check + + - name: Run Go Generate Check + run: | + make generate-check + + - name: Install gotestsum + run: go install gotest.tools/gotestsum@v1.8.2 + + - name: Run Go tests + working-directory: ${{ matrix.directory }} + run: | + PACKAGE_NAMES=$(go list ./...) + echo "Running $(echo $PACKAGE_NAMES | wc -w) packages" + echo $PACKAGE_NAMES + gotestsum --format=short-verbose --junitfile $TEST_RESULTS_PATH/packer-plugin-sdk/gotestsum-report.xml -- -p 2 $PACKAGE_NAMES + + # Save coverage report parts + - name: Upload and save artifacts + uses: actions/upload-artifact@v3 + with: + name: linux test results + path: ${{ env.TEST_RESULTS_PATH }} + + windows-tests: + runs-on: windows-latest + strategy: + matrix: + go-version: + - 1.18 + - 1.19 + directory: + - . + permissions: + id-token: write + contents: read + steps: + - name: Run git config #Windows-only + run: git config --global core.autocrlf false + + - name: Setup Go + uses: actions/setup-go@v3 + with: + go-version: ${{ matrix.go-version }} + + - name: Checkout code + uses: actions/checkout@v3 + + - name: Setup cache for go modules + uses: actions/cache@v3 + with: + path: | + ~\AppData\Local\go-build + ~\go\pkg\mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + + - name: Download go modules + run: go mod download + + - name: Install gotestsum + shell: bash + run: go install gotest.tools/gotestsum@v1.8.2 + + - name: Run Go tests + shell: bash + working-directory: ${{ matrix.directory }} + run: | + PACKAGE_NAMES=$(go list ./...) + echo "Running $(echo $PACKAGE_NAMES | wc -w) packages" + echo $PACKAGE_NAMES + gotestsum --format=short-verbose --junitfile $TEST_RESULTS_PATH/packer-plugin-sdk/gotestsum-report.xml -- -p 2 $PACKAGE_NAMES + + # Save coverage report parts + - name: Upload and save artifacts + uses: actions/upload-artifact@v3 + with: + name: windows test results + path: ${{ env.TEST_RESULTS_PATH }} From 4754c3bc33547a89e2d4085032660b13d6c73530 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Tue, 7 Mar 2023 11:43:57 -0500 Subject: [PATCH 018/105] Update working directory for go checks --- .github/workflows/go-test.yml | 3 +- acctest/doc.go | 366 +++++++++--------- bootcommand/boot_command.go | 23 +- bootcommand/config.go | 76 ++-- chroot/step_copy_files.go | 5 +- chroot/step_mount_extra.go | 3 +- .../mapstructure-to-hcl2.go | 12 +- .../mapstructure-to-hcl2_test.go | 12 +- common/command.go | 8 +- communicator/sshkey/algorithm_enumer.go | 1 - communicator/step_connect_winrm.go | 6 +- multistep/commonsteps/http_config.go | 2 +- multistep/commonsteps/iso_config.go | 49 ++- multistep/commonsteps/step_http_server.go | 6 +- multistep/doc.go | 63 +-- packer/cache.go | 23 +- pathing/config_file.go | 14 +- plugin/set.go | 10 +- retry/retry.go | 17 +- shutdowncommand/config.go | 2 +- template/doc.go | 58 +-- 21 files changed, 405 insertions(+), 354 deletions(-) diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml index 254443a1f..acdf34c93 100644 --- a/.github/workflows/go-test.yml +++ b/.github/workflows/go-test.yml @@ -53,10 +53,12 @@ jobs: run: go mod download - name: Run gofmt + working-directory: ${{ matrix.directory }} run: | make fmt-check - name: Run Go Generate Check + working-directory: ${{ matrix.directory }} run: | make generate-check @@ -111,7 +113,6 @@ jobs: key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} restore-keys: | ${{ runner.os }}-go- - - name: Download go modules run: go mod download diff --git a/acctest/doc.go b/acctest/doc.go index e90b720fb..fea0ca787 100644 --- a/acctest/doc.go +++ b/acctest/doc.go @@ -5,78 +5,79 @@ Package acctest provides an acceptance testing framework for testing builders and provisioners. -Writing Provisioner Acceptance Tests +# Writing Provisioner Acceptance Tests Packer has implemented a `ProvisionerTestCase` structure to help write provisioner acceptance tests. ```go -type ProvisionerTestCase struct { - // Check is called after this step is executed in order to test that - // the step executed successfully. If this is not set, then the next - // step will be called - Check func(*exec.Cmd, string) error - // IsCompatible checks whether a provisioner is able to run against a - // given builder type and guest operating system, and returns a boolean. - // if it returns true, the test combination is okay to run. If false, the - // test combination is not okay to run. - IsCompatible func(builderType string, BuilderGuestOS string) bool - // Name is the name of the test case. Be simple but unique and descriptive. - Name string - // Setup, if non-nil, will be called once before the test case - // runs. This can be used for some setup like setting environment - // variables, or for validation prior to the - // test running. For example, you can use this to make sure certain - // binaries are installed, or text fixtures are in place. - Setup func() error - // Teardown will be called before the test case is over regardless - // of if the test succeeded or failed. This should return an error - // in the case that the test can't guarantee all resources were - // properly cleaned up. - Teardown builderT.TestTeardownFunc - // Template is the provisioner template to use. - // The provisioner template fragment must be a json-formatted string - // containing the provisioner definition but no other portions of a packer - // template. For - // example: - // - // ```json - // { - // "type": "shell-local", - // "inline", ["echo hello world"] - // } - //``` - // - // is a valid entry for "template" here, but the complete Packer template: - // - // ```json - // { - // "provisioners": [ - // { - // "type": "shell-local", - // "inline", ["echo hello world"] - // } - // ] - // } - // ``` - // - // is invalid as input. - // - // You may provide multiple provisioners in the same template. For example: - // ```json - // { - // "type": "shell-local", - // "inline", ["echo hello world"] - // }, - // { - // "type": "shell-local", - // "inline", ["echo hello world 2"] - // } - // ``` - Template string - // Type is the type of provisioner. - Type string -} + + type ProvisionerTestCase struct { + // Check is called after this step is executed in order to test that + // the step executed successfully. If this is not set, then the next + // step will be called + Check func(*exec.Cmd, string) error + // IsCompatible checks whether a provisioner is able to run against a + // given builder type and guest operating system, and returns a boolean. + // if it returns true, the test combination is okay to run. If false, the + // test combination is not okay to run. + IsCompatible func(builderType string, BuilderGuestOS string) bool + // Name is the name of the test case. Be simple but unique and descriptive. + Name string + // Setup, if non-nil, will be called once before the test case + // runs. This can be used for some setup like setting environment + // variables, or for validation prior to the + // test running. For example, you can use this to make sure certain + // binaries are installed, or text fixtures are in place. + Setup func() error + // Teardown will be called before the test case is over regardless + // of if the test succeeded or failed. This should return an error + // in the case that the test can't guarantee all resources were + // properly cleaned up. + Teardown builderT.TestTeardownFunc + // Template is the provisioner template to use. + // The provisioner template fragment must be a json-formatted string + // containing the provisioner definition but no other portions of a packer + // template. For + // example: + // + // ```json + // { + // "type": "shell-local", + // "inline", ["echo hello world"] + // } + //``` + // + // is a valid entry for "template" here, but the complete Packer template: + // + // ```json + // { + // "provisioners": [ + // { + // "type": "shell-local", + // "inline", ["echo hello world"] + // } + // ] + // } + // ``` + // + // is invalid as input. + // + // You may provide multiple provisioners in the same template. For example: + // ```json + // { + // "type": "shell-local", + // "inline", ["echo hello world"] + // }, + // { + // "type": "shell-local", + // "inline", ["echo hello world 2"] + // } + // ``` + Template string + // Type is the type of provisioner. + Type string + } ``` @@ -89,62 +90,65 @@ The following example has been adapted from a shell-local provisioner test: ``` import ( - "github.com/hashicorp/packer-plugin-sdk/acctest/provisioneracc" - "github.com/hashicorp/packer-plugin-sdk/acctest/testutils" + + "github.com/hashicorp/packer-plugin-sdk/acctest/provisioneracc" + "github.com/hashicorp/packer-plugin-sdk/acctest/testutils" + ) // ... -func TestAccShellProvisioner_basic(t *testing.T) { - // Create a json template fragment containing just the provisioners you want - // to run. - templateString := `{ - "type": "shell-local", - "script": "test-fixtures/script.sh", - "max_retries" : 5 -}` - - // instantiate a test case. - testCase := &provisioneracc.ProvisionerTestCase{ - IsCompatible: func() bool {return true}, - Name: "shell-local-provisioner-basic", - Teardown: func() error { - testutils.CleanupFiles("test-fixtures/file.txt") - return nil - }, - Template: templateString, - Type: "shell-local", - Check: func(buildcommand *exec.Cmd, logfile string) error { - if buildcommand.ProcessState != nil { - if buildcommand.ProcessState.ExitCode() != 0 { - return fmt.Errorf("Bad exit code. Logfile: %s", logfile) - } - } - filecontents, err := loadFile("file.txt") - if err != nil { - return err - } - if !strings.Contains(filecontents, "hello") { - return fmt.Errorf("file contents were wrong: %s", filecontents) - } - return nil - }, - } - - provisioneracc.TestProvisionersAgainstBuilders(testCase, t) -} + func TestAccShellProvisioner_basic(t *testing.T) { + // Create a json template fragment containing just the provisioners you want + // to run. + templateString := `{ + "type": "shell-local", + "script": "test-fixtures/script.sh", + "max_retries" : 5 + }` + + // instantiate a test case. + testCase := &provisioneracc.ProvisionerTestCase{ + IsCompatible: func() bool {return true}, + Name: "shell-local-provisioner-basic", + Teardown: func() error { + testutils.CleanupFiles("test-fixtures/file.txt") + return nil + }, + Template: templateString, + Type: "shell-local", + Check: func(buildcommand *exec.Cmd, logfile string) error { + if buildcommand.ProcessState != nil { + if buildcommand.ProcessState.ExitCode() != 0 { + return fmt.Errorf("Bad exit code. Logfile: %s", logfile) + } + } + filecontents, err := loadFile("file.txt") + if err != nil { + return err + } + if !strings.Contains(filecontents, "hello") { + return fmt.Errorf("file contents were wrong: %s", filecontents) + } + return nil + }, + } + + provisioneracc.TestProvisionersAgainstBuilders(testCase, t) + } ``` - After writing the struct and implementing the interface, now is time to write the test that will run all of this code you wrote. Your test should be like: ```go -func TestShellProvisioner(t *testing.T) { - acc.TestProvisionersPreCheck("shell", t) - acc.TestProvisionersAgainstBuilders(new(ShellProvisionerAccTest), t) -} + + func TestShellProvisioner(t *testing.T) { + acc.TestProvisionersPreCheck("shell", t) + acc.TestProvisionersAgainstBuilders(new(ShellProvisionerAccTest), t) + } + ``` The method `TestProvisionersAgainstBuilders` will run the provisioner against @@ -157,26 +161,28 @@ builder fragment. For example, one of our amazon-ebs builders is defined in provisioneracc/test-fixtures/amazon-ebs/amazon-ebs.txt and contains: ```json -{ - "type": "amazon-ebs", - "ami_name": "packer-acc-test", - "instance_type": "t2.micro", - "region": "us-east-1", - "ssh_username": "ubuntu", - "source_ami_filter": { - "filters": { - "virtualization-type": "hvm", - "name": "ubuntu/images/*ubuntu-xenial-16.04-amd64-server-*", - "root-device-type": "ebs" - }, - "owners": ["099720109477"], - "most_recent": true - }, - "force_deregister" : true, - "tags": { - "packer-test": "true" - } -} + + { + "type": "amazon-ebs", + "ami_name": "packer-acc-test", + "instance_type": "t2.micro", + "region": "us-east-1", + "ssh_username": "ubuntu", + "source_ami_filter": { + "filters": { + "virtualization-type": "hvm", + "name": "ubuntu/images/*ubuntu-xenial-16.04-amd64-server-*", + "root-device-type": "ebs" + }, + "owners": ["099720109477"], + "most_recent": true + }, + "force_deregister" : true, + "tags": { + "packer-test": "true" + } + } + ``` note that this fragment does not contain anything other than a single builder @@ -187,53 +193,55 @@ In order to tell the testing framework how to use this builder fragment, you need to implement a `BuilderFixture` struct: ```go -type BuilderFixture struct { - // Name is the name of the builder fixture. - // Be simple and descriptive. - Name string - // Setup creates necessary extra test fixtures, and renders their values - // into the BuilderFixture.Template. - Setup func() - // Template is the path to a builder template fragment. - // The builder template fragment must be a json-formatted file containing - // the builder definition but no other portions of a packer template. For - // example: - // - // ```json - // { - // "type": "null", - // "communicator", "none" - // } - //``` - // - // is a valid entry for "template" here, but the complete Packer template: - // - // ```json - // { - // "builders": [ - // "type": "null", - // "communicator": "none" - // ] - // } - // ``` - // - // is invalid as input. - // - // Only provide one builder template fragment per file. - TemplatePath string - - // GuestOS says what guest os type the builder template fragment creates. - // Valid values are "windows", "linux" or "darwin" guests. - GuestOS string - - // HostOS says what host os type the builder is capable of running on. - // Valid values are "any", windows", or "posix". If you set "posix", then - // this builder can run on a "linux" or "darwin" platform. If you set - // "any", then this builder can be used on any platform. - HostOS string - - Teardown builderT.TestTeardownFunc -} + + type BuilderFixture struct { + // Name is the name of the builder fixture. + // Be simple and descriptive. + Name string + // Setup creates necessary extra test fixtures, and renders their values + // into the BuilderFixture.Template. + Setup func() + // Template is the path to a builder template fragment. + // The builder template fragment must be a json-formatted file containing + // the builder definition but no other portions of a packer template. For + // example: + // + // ```json + // { + // "type": "null", + // "communicator", "none" + // } + //``` + // + // is a valid entry for "template" here, but the complete Packer template: + // + // ```json + // { + // "builders": [ + // "type": "null", + // "communicator": "none" + // ] + // } + // ``` + // + // is invalid as input. + // + // Only provide one builder template fragment per file. + TemplatePath string + + // GuestOS says what guest os type the builder template fragment creates. + // Valid values are "windows", "linux" or "darwin" guests. + GuestOS string + + // HostOS says what host os type the builder is capable of running on. + // Valid values are "any", windows", or "posix". If you set "posix", then + // this builder can run on a "linux" or "darwin" platform. If you set + // "any", then this builder can be used on any platform. + HostOS string + + Teardown builderT.TestTeardownFunc + } + ``` Implement this struct to the file "provisioneracc/builders.go", then add the new implementation to the `BuildersAccTest` map in diff --git a/bootcommand/boot_command.go b/bootcommand/boot_command.go index 940b8561e..79ac27134 100644 --- a/bootcommand/boot_command.go +++ b/bootcommand/boot_command.go @@ -897,18 +897,17 @@ func Entrypoint(ruleName string) Option { // // Example usage: // -// input := "input" -// stats := Stats{} -// _, err := Parse("input-file", []byte(input), Statistics(&stats, "no match")) -// if err != nil { -// log.Panicln(err) -// } -// b, err := json.MarshalIndent(stats.ChoiceAltCnt, "", " ") -// if err != nil { -// log.Panicln(err) -// } -// fmt.Println(string(b)) -// +// input := "input" +// stats := Stats{} +// _, err := Parse("input-file", []byte(input), Statistics(&stats, "no match")) +// if err != nil { +// log.Panicln(err) +// } +// b, err := json.MarshalIndent(stats.ChoiceAltCnt, "", " ") +// if err != nil { +// log.Panicln(err) +// } +// fmt.Println(string(b)) func Statistics(stats *Stats, choiceNoMatch string) Option { return func(p *parser) Option { oldStats := p.Stats diff --git a/bootcommand/config.go b/bootcommand/config.go index 78291e12a..6cf77dbcb 100644 --- a/bootcommand/config.go +++ b/bootcommand/config.go @@ -53,7 +53,7 @@ const PackerKeyDefault = 100 * time.Millisecond // // - ` ` - Simulates pressing the home and end keys. // -// - ` ` - Simulates pressing the page up and page down +// - ` ` - Simulates pressing the page up and page down // keys. // // - `` - Simulates pressing the Menu key. @@ -66,24 +66,24 @@ const PackerKeyDefault = 100 * time.Millisecond // // - ` ` - Simulates pressing the ⌘ or Windows key. // -// - ` ` - Adds a 1, 5 or 10 second pause before +// - ` ` - Adds a 1, 5 or 10 second pause before // sending any additional keys. This is useful if you have to generally // wait for the UI to update before typing more. // -// - `` - Add an arbitrary pause before sending any additional keys. +// - `` - Add an arbitrary pause before sending any additional keys. // The format of `XX` is a sequence of positive decimal numbers, each with // optional fraction and a unit suffix, such as `300ms`, `1.5h` or `2h45m`. // Valid time units are `ns`, `us` (or `µs`), `ms`, `s`, `m`, `h`. For // example `` or ``. // -// - ` ` - Any printable keyboard character, and of these -// "special" expressions, with the exception of the `` types, can -// also be toggled on or off. For example, to simulate ctrl+c, use -// `c`. Be sure to release them, otherwise they -// will be held down until the machine reboots. To hold the `c` key down, -// you would use ``. Likewise, `` to release. +// - ` ` - Any printable keyboard character, and of these +// "special" expressions, with the exception of the `` types, can +// also be toggled on or off. For example, to simulate ctrl+c, use +// `c`. Be sure to release them, otherwise they +// will be held down until the machine reboots. To hold the `c` key down, +// you would use ``. Likewise, `` to release. // -// - `{{ .HTTPIP }} {{ .HTTPPort }}` - The IP and port, respectively of an +// - `{{ .HTTPIP }} {{ .HTTPPort }}` - The IP and port, respectively of an // HTTP server that is started serving the directory specified by the // `http_directory` configuration parameter. If `http_directory` isn't // specified, these will be blank! @@ -97,18 +97,22 @@ const PackerKeyDefault = 100 * time.Millisecond // // ```json // "boot_command": [ -// "", -// " ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/centos6-ks.cfg" -// ] +// +// "", +// " ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/centos6-ks.cfg" +// ] +// // ``` // // In HCL2: // // ```hcl // boot_command = [ -// "", -// " ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/centos6-ks.cfg" -// ] +// +// "", +// " ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/centos6-ks.cfg" +// ] +// // ``` // // The example shown below is a working boot command used to start an Ubuntu @@ -118,15 +122,17 @@ const PackerKeyDefault = 100 * time.Millisecond // // ```json // "boot_command": [ -// "", -// "/install/vmlinuz noapic ", -// "preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg ", -// "debian-installer=en_US auto locale=en_US kbd-chooser/method=us ", -// "hostname={{ .Name }} ", -// "fb=false debconf/frontend=noninteractive ", -// "keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA ", -// "keyboard-configuration/variant=USA console-setup/ask_detect=false ", -// "initrd=/install/initrd.gz -- " +// +// "", +// "/install/vmlinuz noapic ", +// "preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg ", +// "debian-installer=en_US auto locale=en_US kbd-chooser/method=us ", +// "hostname={{ .Name }} ", +// "fb=false debconf/frontend=noninteractive ", +// "keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA ", +// "keyboard-configuration/variant=USA console-setup/ask_detect=false ", +// "initrd=/install/initrd.gz -- " +// // ] // ``` // @@ -134,15 +140,17 @@ const PackerKeyDefault = 100 * time.Millisecond // // ```hcl // boot_command = [ -// "", -// "/install/vmlinuz noapic ", -// "preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg ", -// "debian-installer=en_US auto locale=en_US kbd-chooser/method=us ", -// "hostname={{ .Name }} ", -// "fb=false debconf/frontend=noninteractive ", -// "keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA ", -// "keyboard-configuration/variant=USA console-setup/ask_detect=false ", -// "initrd=/install/initrd.gz -- " +// +// "", +// "/install/vmlinuz noapic ", +// "preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg ", +// "debian-installer=en_US auto locale=en_US kbd-chooser/method=us ", +// "hostname={{ .Name }} ", +// "fb=false debconf/frontend=noninteractive ", +// "keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA ", +// "keyboard-configuration/variant=USA console-setup/ask_detect=false ", +// "initrd=/install/initrd.gz -- " +// // ] // ``` // diff --git a/chroot/step_copy_files.go b/chroot/step_copy_files.go index 55e168e8c..c3f612ecb 100644 --- a/chroot/step_copy_files.go +++ b/chroot/step_copy_files.go @@ -19,8 +19,9 @@ import ( // StepCopyFiles copies some files from the host into the chroot environment. // // Produces: -// copy_files_cleanup CleanupFunc - A function to clean up the copied files -// early. +// +// copy_files_cleanup CleanupFunc - A function to clean up the copied files +// early. type StepCopyFiles struct { Files []string files []string diff --git a/chroot/step_mount_extra.go b/chroot/step_mount_extra.go index c26c5cd04..a8207bcd0 100644 --- a/chroot/step_mount_extra.go +++ b/chroot/step_mount_extra.go @@ -19,7 +19,8 @@ import ( // StepMountExtra mounts the attached device. // // Produces: -// mount_extra_cleanup CleanupFunc - To perform early cleanup +// +// mount_extra_cleanup CleanupFunc - To perform early cleanup type StepMountExtra struct { ChrootMounts [][]string mounts []string diff --git a/cmd/packer-sdc/internal/mapstructure-to-hcl2/mapstructure-to-hcl2.go b/cmd/packer-sdc/internal/mapstructure-to-hcl2/mapstructure-to-hcl2.go index 7e2b4fb23..5a541483e 100644 --- a/cmd/packer-sdc/internal/mapstructure-to-hcl2/mapstructure-to-hcl2.go +++ b/cmd/packer-sdc/internal/mapstructure-to-hcl2/mapstructure-to-hcl2.go @@ -11,13 +11,13 @@ // // Here are a few differences/gaps betweens hcl2 and mapstructure: // -// * in HCL2 all basic struct fields (string/int/struct) that are not pointers -// are required ( must be set ). In mapstructure everything is optional. +// - in HCL2 all basic struct fields (string/int/struct) that are not pointers +// are required ( must be set ). In mapstructure everything is optional. // -// * mapstructure allows to 'squash' fields -// (ex: Field CommonStructType `mapstructure:",squash"`) this allows to -// decorate structs and reuse configuration code. HCL2 parsing libs don't have -// anything similar. +// - mapstructure allows to 'squash' fields +// (ex: Field CommonStructType `mapstructure:",squash"`) this allows to +// decorate structs and reuse configuration code. HCL2 parsing libs don't have +// anything similar. // // mapstructure-to-hcl2 will parse Packer's config files and generate the HCL2 // compliant code that will allow to not change any of the current builders in diff --git a/cmd/packer-sdc/internal/mapstructure-to-hcl2/mapstructure-to-hcl2_test.go b/cmd/packer-sdc/internal/mapstructure-to-hcl2/mapstructure-to-hcl2_test.go index 658849c8a..aa50e2fe1 100644 --- a/cmd/packer-sdc/internal/mapstructure-to-hcl2/mapstructure-to-hcl2_test.go +++ b/cmd/packer-sdc/internal/mapstructure-to-hcl2/mapstructure-to-hcl2_test.go @@ -11,13 +11,13 @@ // // Here are a few differences/gaps betweens hcl2 and mapstructure: // -// * in HCL2 all basic struct fields (string/int/struct) that are not pointers -// are required ( must be set ). In mapstructure everything is optional. +// - in HCL2 all basic struct fields (string/int/struct) that are not pointers +// are required ( must be set ). In mapstructure everything is optional. // -// * mapstructure allows to 'squash' fields -// (ex: Field CommonStructType `mapstructure:",squash"`) this allows to -// decorate structs and reuse configuration code. HCL2 parsing libs don't have -// anything similar. +// - mapstructure allows to 'squash' fields +// (ex: Field CommonStructType `mapstructure:",squash"`) this allows to +// decorate structs and reuse configuration code. HCL2 parsing libs don't have +// anything similar. // // mapstructure-to-hcl2 will parse Packer's config files and generate the HCL2 // compliant code that will allow to not change any of the current builders in diff --git a/common/command.go b/common/command.go index 16522d1cd..115995846 100644 --- a/common/command.go +++ b/common/command.go @@ -15,9 +15,11 @@ import ( // CommandWrapper is a type that given a command, will modify that // command in-flight. This might return an error. // For example, your command could be `foo` and your CommandWrapper could be -// func(s string) (string, error) { -// return fmt.Sprintf("/bin/sh/ %s", s) -// } +// +// func(s string) (string, error) { +// return fmt.Sprintf("/bin/sh/ %s", s) +// } +// // Using the CommandWrapper, you can set environment variables or perform // string interpolation once rather than many times, to save some lines of code // if similar wrapping needs to be performed many times during a plugin run. diff --git a/communicator/sshkey/algorithm_enumer.go b/communicator/sshkey/algorithm_enumer.go index 1a300735b..2d95b10a1 100644 --- a/communicator/sshkey/algorithm_enumer.go +++ b/communicator/sshkey/algorithm_enumer.go @@ -1,6 +1,5 @@ // Code generated by "enumer -type Algorithm -transform snake"; DO NOT EDIT. -// package sshkey import ( diff --git a/communicator/step_connect_winrm.go b/communicator/step_connect_winrm.go index 8673f3e63..d7427b666 100644 --- a/communicator/step_connect_winrm.go +++ b/communicator/step_connect_winrm.go @@ -28,10 +28,12 @@ import ( // configuration when creating the step. // // Uses: -// ui packersdk.Ui +// +// ui packersdk.Ui // // Produces: -// communicator packersdk.Communicator +// +// communicator packersdk.Communicator type StepConnectWinRM struct { // All the fields below are documented on StepConnect Config *Config diff --git a/multistep/commonsteps/http_config.go b/multistep/commonsteps/http_config.go index 202c97d4c..0f5d68ace 100644 --- a/multistep/commonsteps/http_config.go +++ b/multistep/commonsteps/http_config.go @@ -17,7 +17,7 @@ import ( // // Example usage from a builder: // -// `wget http://{{ .HTTPIP }}:{{ .HTTPPort }}/foo/bar/preseed.cfg` +// `wget http://{{ .HTTPIP }}:{{ .HTTPPort }}/foo/bar/preseed.cfg` type HTTPConfig struct { // Path to a directory to serve using an HTTP server. The files in this // directory will be available over HTTP that will be requestable from the diff --git a/multistep/commonsteps/iso_config.go b/multistep/commonsteps/iso_config.go index cf6f671cc..eb7ba112f 100644 --- a/multistep/commonsteps/iso_config.go +++ b/multistep/commonsteps/iso_config.go @@ -38,47 +38,62 @@ import ( // In JSON: // // ```json -// "iso_checksum": "946a6077af6f5f95a51f82fdc44051c7aa19f9cfc5f737954845a6050543d7c2", -// "iso_url": "ubuntu.org/.../ubuntu-14.04.1-server-amd64.iso" +// +// "iso_checksum": "946a6077af6f5f95a51f82fdc44051c7aa19f9cfc5f737954845a6050543d7c2", +// "iso_url": "ubuntu.org/.../ubuntu-14.04.1-server-amd64.iso" +// // ``` // // ```json -// "iso_checksum": "file:ubuntu.org/..../ubuntu-14.04.1-server-amd64.iso.sum", -// "iso_url": "ubuntu.org/.../ubuntu-14.04.1-server-amd64.iso" +// +// "iso_checksum": "file:ubuntu.org/..../ubuntu-14.04.1-server-amd64.iso.sum", +// "iso_url": "ubuntu.org/.../ubuntu-14.04.1-server-amd64.iso" +// // ``` // // ```json -// "iso_checksum": "file://./shasums.txt", -// "iso_url": "ubuntu.org/.../ubuntu-14.04.1-server-amd64.iso" +// +// "iso_checksum": "file://./shasums.txt", +// "iso_url": "ubuntu.org/.../ubuntu-14.04.1-server-amd64.iso" +// // ``` // // ```json -// "iso_checksum": "file:./shasums.txt", -// "iso_url": "ubuntu.org/.../ubuntu-14.04.1-server-amd64.iso" +// +// "iso_checksum": "file:./shasums.txt", +// "iso_url": "ubuntu.org/.../ubuntu-14.04.1-server-amd64.iso" +// // ``` // // In HCL2: // // ```hcl -// iso_checksum = "946a6077af6f5f95a51f82fdc44051c7aa19f9cfc5f737954845a6050543d7c2" -// iso_url = "ubuntu.org/.../ubuntu-14.04.1-server-amd64.iso" +// +// iso_checksum = "946a6077af6f5f95a51f82fdc44051c7aa19f9cfc5f737954845a6050543d7c2" +// iso_url = "ubuntu.org/.../ubuntu-14.04.1-server-amd64.iso" +// // ``` // // ```hcl -// iso_checksum = "file:ubuntu.org/..../ubuntu-14.04.1-server-amd64.iso.sum" -// iso_url = "ubuntu.org/.../ubuntu-14.04.1-server-amd64.iso" +// +// iso_checksum = "file:ubuntu.org/..../ubuntu-14.04.1-server-amd64.iso.sum" +// iso_url = "ubuntu.org/.../ubuntu-14.04.1-server-amd64.iso" +// // ``` // // ```hcl -// iso_checksum = "file://./shasums.txt" -// iso_url = "ubuntu.org/.../ubuntu-14.04.1-server-amd64.iso" +// +// iso_checksum = "file://./shasums.txt" +// iso_url = "ubuntu.org/.../ubuntu-14.04.1-server-amd64.iso" +// // ``` // // ```hcl -// iso_checksum = "file:./shasums.txt", -// iso_url = "ubuntu.org/.../ubuntu-14.04.1-server-amd64.iso" -// ``` // +// iso_checksum = "file:./shasums.txt", +// iso_url = "ubuntu.org/.../ubuntu-14.04.1-server-amd64.iso" +// +// ``` type ISOConfig struct { // The checksum for the ISO file or virtual hard drive file. The type of // the checksum is specified within the checksum field as a prefix, ex: diff --git a/multistep/commonsteps/step_http_server.go b/multistep/commonsteps/step_http_server.go index 884f0fbb6..43462aac6 100644 --- a/multistep/commonsteps/step_http_server.go +++ b/multistep/commonsteps/step_http_server.go @@ -33,10 +33,12 @@ func HTTPServerFromHTTPConfig(cfg *HTTPConfig) *StepHTTPServer { // template. // // Uses: -// ui packersdk.Ui +// +// ui packersdk.Ui // // Produces: -// http_port int - The port the HTTP server started on. +// +// http_port int - The port the HTTP server started on. type StepHTTPServer struct { HTTPDir string HTTPContent map[string]string diff --git a/multistep/doc.go b/multistep/doc.go index a171eabc8..c751d5129 100644 --- a/multistep/doc.go +++ b/multistep/doc.go @@ -15,41 +15,44 @@ which is passed between steps by the runner. ```go type stepAdd struct{} -func (s *stepAdd) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction { - // Read our value and assert that it is they type we want - value := state.Get("value").(int) - fmt.Printf("Value is %d\n", value) - - // Store some state back - state.Put("value", value + 1) - return multistep.ActionContinue -} - -func (s *stepAdd) Cleanup(multistep.StateBag) { - // This is called after all the steps have run or if the runner is - // cancelled so that cleanup can be performed. -} + func (s *stepAdd) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction { + // Read our value and assert that it is they type we want + value := state.Get("value").(int) + fmt.Printf("Value is %d\n", value) + + // Store some state back + state.Put("value", value + 1) + return multistep.ActionContinue + } + + func (s *stepAdd) Cleanup(multistep.StateBag) { + // This is called after all the steps have run or if the runner is + // cancelled so that cleanup can be performed. + } + ``` Make a runner and call your array of Steps. ```go -func main() { - // Our "bag of state" that we read the value from - state := new(multistep.BasicStateBag) - state.Put("value", 0) - - steps := []multistep.Step{ - &stepAdd{}, - &stepAdd{}, - &stepAdd{}, - } - - runner := &multistep.BasicRunner{Steps: steps} - - // Executes the steps - runner.Run(context.Background(), state) -} + + func main() { + // Our "bag of state" that we read the value from + state := new(multistep.BasicStateBag) + state.Put("value", 0) + + steps := []multistep.Step{ + &stepAdd{}, + &stepAdd{}, + &stepAdd{}, + } + + runner := &multistep.BasicRunner{Steps: steps} + + // Executes the steps + runner.Run(context.Background(), state) + } + ``` This will produce: diff --git a/packer/cache.go b/packer/cache.go index e08c6bc45..7b367e7b3 100644 --- a/packer/cache.go +++ b/packer/cache.go @@ -15,18 +15,21 @@ import ( // // NOTE: cache directory will change depending on operating system dependent // For Windows: -// PACKER_CACHE_DIR="" CacheDir() => "./packer_cache/ -// PACKER_CACHE_DIR="" CacheDir("foo") => "./packer_cache/foo -// PACKER_CACHE_DIR="bar" CacheDir("foo") => "./bar/foo -// PACKER_CACHE_DIR="/home/there" CacheDir("foo", "bar") => "/home/there/foo/bar +// +// PACKER_CACHE_DIR="" CacheDir() => "./packer_cache/ +// PACKER_CACHE_DIR="" CacheDir("foo") => "./packer_cache/foo +// PACKER_CACHE_DIR="bar" CacheDir("foo") => "./bar/foo +// PACKER_CACHE_DIR="/home/there" CacheDir("foo", "bar") => "/home/there/foo/bar +// // For Unix: // NOTE: PACKER_CACHE_DIR will be used over XDG_CACHE_HOME environment variable -// PACKER_CACHE_DIR="", XDG_CACHE_HOME="", CacheDir() => "$HOME/cache/packer" -// PACKER_CACHE_DIR="", XDG_CACHE_HOME="", CacheDir("foo") => "$HOME/cache/packer/foo" -// PACKER_CACHE_DIR="bar", XDG_CACHE_HOME="", CacheDir("foo") => "./bar/foo" -// PACKER_CACHE_DIR="/home/there", XDG_CACHE_HOME="", CacheDir("foo", "bar") => "/home/there/foo/bar" -// PACKER_CACHE_DIR="", XDG_CACHE_HOME="/home/there", CacheDir("foo", "bar") => "/home/there/foo/bar" -// PACKER_CACHE_DIR="/foo", XDG_CACHE_HOME="/bar", CacheDir("a", "b") => "/foo/a/b" +// +// PACKER_CACHE_DIR="", XDG_CACHE_HOME="", CacheDir() => "$HOME/cache/packer" +// PACKER_CACHE_DIR="", XDG_CACHE_HOME="", CacheDir("foo") => "$HOME/cache/packer/foo" +// PACKER_CACHE_DIR="bar", XDG_CACHE_HOME="", CacheDir("foo") => "./bar/foo" +// PACKER_CACHE_DIR="/home/there", XDG_CACHE_HOME="", CacheDir("foo", "bar") => "/home/there/foo/bar" +// PACKER_CACHE_DIR="", XDG_CACHE_HOME="/home/there", CacheDir("foo", "bar") => "/home/there/foo/bar" +// PACKER_CACHE_DIR="/foo", XDG_CACHE_HOME="/bar", CacheDir("a", "b") => "/foo/a/b" func CachePath(paths ...string) (path string, err error) { defer func() { // create the dir based on return path if it doesn't exist diff --git a/pathing/config_file.go b/pathing/config_file.go index 8256176e7..120a6d3e5 100644 --- a/pathing/config_file.go +++ b/pathing/config_file.go @@ -24,17 +24,19 @@ func ConfigFile() (string, error) { // ConfigDir returns the configuration directory for Packer. // NOTE: config directory will change depending on operating system dependent // For Windows: -// PACKER_CONFIG_DIR="" ConfigDir() => "/{homeDir()}/packer.config/ -// PACKER_CONFIG_DIR="bar" ConfigDir() => "/bar/packer.config/ +// +// PACKER_CONFIG_DIR="" ConfigDir() => "/{homeDir()}/packer.config/ +// PACKER_CONFIG_DIR="bar" ConfigDir() => "/bar/packer.config/ // // NOTE: Default_config_present=TRUE means that there is configuration directory at old location => $HOME/.packer.d // NOTE: This is not list all permutations, just some examples, view the // configDir function for your OS for the exact logic // For Unix: -// PACKER_CONFIG_DIR="" Default_config_present=FALSE XDG_CONFIG_HOME="" ConfigDir() => "$HOME/.config/packer -// PACKER_CONFIG_DIR="bar" Default_config_present=FALSE XDG_CONFIG_HOME="" ConfigDir() => "/bar/.packer.d/ -// PACKER_CONFIG_DIR="" Default_config_present=TRUE XDG_CONFIG_HOME="" ConfigDir() => "/$HOME/.packer.d/ -// PACKER_CONFIG_DIR="" Default_config_present=TRUE XDG_CONFIG_HOME="bar" ConfigDir() => "/bar/.packer.d/ +// +// PACKER_CONFIG_DIR="" Default_config_present=FALSE XDG_CONFIG_HOME="" ConfigDir() => "$HOME/.config/packer +// PACKER_CONFIG_DIR="bar" Default_config_present=FALSE XDG_CONFIG_HOME="" ConfigDir() => "/bar/.packer.d/ +// PACKER_CONFIG_DIR="" Default_config_present=TRUE XDG_CONFIG_HOME="" ConfigDir() => "/$HOME/.packer.d/ +// PACKER_CONFIG_DIR="" Default_config_present=TRUE XDG_CONFIG_HOME="bar" ConfigDir() => "/bar/.packer.d/ func ConfigDir() (string, error) { return configDir() } diff --git a/plugin/set.go b/plugin/set.go index 20e6dd296..9211e7ea5 100644 --- a/plugin/set.go +++ b/plugin/set.go @@ -18,7 +18,9 @@ import ( // Use this name to make the name of the plugin in the packer template match // the multiplugin suffix, instead of requiring a second part. // For example, calling : -// pps.RegisterProvisioner(plugin.DEFAULT_NAME, new(CommentProvisioner)) +// +// pps.RegisterProvisioner(plugin.DEFAULT_NAME, new(CommentProvisioner)) +// // On a plugin named `packer-plugin-foo`, will make the `foo` provisioner available // with your CommentProvisioner doing that. There can only be one unnamed // plugin per plugin type. @@ -96,9 +98,9 @@ func (i *Set) RegisterDatasource(name string, datasource packersdk.Datasource) { } // Run takes the os Args and runs a packer plugin command from it. -// * "describe" command makes the plugin set describe itself. -// * "start builder builder-name" starts the builder "builder-name" -// * "start post-processor example" starts the post-processor "example" +// - "describe" command makes the plugin set describe itself. +// - "start builder builder-name" starts the builder "builder-name" +// - "start post-processor example" starts the post-processor "example" func (i *Set) Run() error { args := os.Args[1:] return i.RunCommand(args...) diff --git a/retry/retry.go b/retry/retry.go index 072c572cb..3675a6959 100644 --- a/retry/retry.go +++ b/retry/retry.go @@ -43,12 +43,13 @@ func (err *RetryExhaustedError) Error() string { // Run will repeatedly retry the proivided fn within the constraints set in the // retry Config. It will retry until one of the following conditions is met: -// - The provided context is cancelled. -// - The Config.StartTimeout time has passed. -// - The function returns without an error. -// - The maximum number of tries, Config.Tries is exceeded. -// - The function returns with an error that does not satisfy conditions -// set in the Config.ShouldRetry function. +// - The provided context is cancelled. +// - The Config.StartTimeout time has passed. +// - The function returns without an error. +// - The maximum number of tries, Config.Tries is exceeded. +// - The function returns with an error that does not satisfy conditions +// set in the Config.ShouldRetry function. +// // If the given function (fn) does not return an error, then Run will return // nil. Otherwise, Run will return a relevant error. func (cfg Config) Run(ctx context.Context, fn func(context.Context) error) error { @@ -105,7 +106,9 @@ type Backoff struct { } // Linear Backoff returns a linearly increasing Duration. -// n = n * Multiplier. +// +// n = n * Multiplier. +// // the first value of n is InitialBackoff. n is maxed by MaxBackoff. func (lb *Backoff) Linear() time.Duration { wait := lb.InitialBackoff diff --git a/shutdowncommand/config.go b/shutdowncommand/config.go index 50e5b1fbc..5727ff51e 100644 --- a/shutdowncommand/config.go +++ b/shutdowncommand/config.go @@ -3,7 +3,7 @@ //go:generate packer-sdc struct-markdown -//Package shutdowncommand is a helper module for builder plugin configuration. +// Package shutdowncommand is a helper module for builder plugin configuration. package shutdowncommand import ( diff --git a/template/doc.go b/template/doc.go index a7036b20c..f69fc0c0f 100644 --- a/template/doc.go +++ b/template/doc.go @@ -11,35 +11,35 @@ validation, custom type decoding, and template variable interpolation. A simple usage example that defines a config and then unpacks a user-provided json template into the provided config: - import ( - // ... - "github.com/hashicorp/packer-plugin-sdk/template/config" - "github.com/hashicorp/packer-plugin-sdk/template/interpolate" - ) - - type Config struct { - Field1 string `mapstructure:"field_1"` - Field2 bool `mapstructure:"field_2"` - Field3 bool `mapstructure:"field_3"` - - ctx interpolate.Context - } - - type Provisioner struct { - config Config - } - - func (p *CommentProvisioner) Prepare(raws ...interface{}) error { - err := config.Decode(&p.config, &config.DecodeOpts{ - Interpolate: true, - InterpolateContext: &p.config.ctx, - }, raws...) - if err != nil { - return err - } - - return nil - } + import ( + // ... + "github.com/hashicorp/packer-plugin-sdk/template/config" + "github.com/hashicorp/packer-plugin-sdk/template/interpolate" + ) + + type Config struct { + Field1 string `mapstructure:"field_1"` + Field2 bool `mapstructure:"field_2"` + Field3 bool `mapstructure:"field_3"` + + ctx interpolate.Context + } + + type Provisioner struct { + config Config + } + + func (p *CommentProvisioner) Prepare(raws ...interface{}) error { + err := config.Decode(&p.config, &config.DecodeOpts{ + Interpolate: true, + InterpolateContext: &p.config.ctx, + }, raws...) + if err != nil { + return err + } + + return nil + } More implementation details for plugins can be found in the [extending packer](https://www.packer.io/docs/extending) section of the website. From dcc669ef6f01b79584fc4da641d68f6950014e49 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Tue, 7 Mar 2023 12:20:11 -0500 Subject: [PATCH 019/105] Update generated files --- .../bootcommand/BootConfig.mdx | 76 ++++++++++--------- .../multistep/commonsteps/HTTPConfig.mdx | 2 +- .../multistep/commonsteps/ISOConfig.mdx | 48 ++++++++---- 3 files changed, 75 insertions(+), 51 deletions(-) diff --git a/cmd/packer-sdc/internal/renderdocs/docs-partials/packer-plugin-sdk/bootcommand/BootConfig.mdx b/cmd/packer-sdc/internal/renderdocs/docs-partials/packer-plugin-sdk/bootcommand/BootConfig.mdx index 3faa491f0..c6bb41f96 100644 --- a/cmd/packer-sdc/internal/renderdocs/docs-partials/packer-plugin-sdk/bootcommand/BootConfig.mdx +++ b/cmd/packer-sdc/internal/renderdocs/docs-partials/packer-plugin-sdk/bootcommand/BootConfig.mdx @@ -31,7 +31,7 @@ command, they will be replaced by the proper key: - ` ` - Simulates pressing the home and end keys. -- ` ` - Simulates pressing the page up and page down + - ` ` - Simulates pressing the page up and page down keys. - `` - Simulates pressing the Menu key. @@ -44,24 +44,24 @@ command, they will be replaced by the proper key: - ` ` - Simulates pressing the ⌘ or Windows key. -- ` ` - Adds a 1, 5 or 10 second pause before + - ` ` - Adds a 1, 5 or 10 second pause before sending any additional keys. This is useful if you have to generally wait for the UI to update before typing more. -- `` - Add an arbitrary pause before sending any additional keys. + - `` - Add an arbitrary pause before sending any additional keys. The format of `XX` is a sequence of positive decimal numbers, each with optional fraction and a unit suffix, such as `300ms`, `1.5h` or `2h45m`. Valid time units are `ns`, `us` (or `µs`), `ms`, `s`, `m`, `h`. For example `` or ``. -- ` ` - Any printable keyboard character, and of these - "special" expressions, with the exception of the `` types, can - also be toggled on or off. For example, to simulate ctrl+c, use - `c`. Be sure to release them, otherwise they - will be held down until the machine reboots. To hold the `c` key down, - you would use ``. Likewise, `` to release. + - ` ` - Any printable keyboard character, and of these + "special" expressions, with the exception of the `` types, can + also be toggled on or off. For example, to simulate ctrl+c, use + `c`. Be sure to release them, otherwise they + will be held down until the machine reboots. To hold the `c` key down, + you would use ``. Likewise, `` to release. -- `{{ .HTTPIP }} {{ .HTTPPort }}` - The IP and port, respectively of an + - `{{ .HTTPIP }} {{ .HTTPPort }}` - The IP and port, respectively of an HTTP server that is started serving the directory specified by the `http_directory` configuration parameter. If `http_directory` isn't specified, these will be blank! @@ -75,18 +75,22 @@ In JSON: ```json "boot_command": [ - "", - " ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/centos6-ks.cfg" - ] + + "", + " ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/centos6-ks.cfg" + ] + ``` In HCL2: ```hcl boot_command = [ - "", - " ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/centos6-ks.cfg" - ] + + "", + " ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/centos6-ks.cfg" + ] + ``` The example shown below is a working boot command used to start an Ubuntu @@ -96,15 +100,17 @@ In JSON: ```json "boot_command": [ - "", - "/install/vmlinuz noapic ", - "preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg ", - "debian-installer=en_US auto locale=en_US kbd-chooser/method=us ", - "hostname={{ .Name }} ", - "fb=false debconf/frontend=noninteractive ", - "keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA ", - "keyboard-configuration/variant=USA console-setup/ask_detect=false ", - "initrd=/install/initrd.gz -- " + + "", + "/install/vmlinuz noapic ", + "preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg ", + "debian-installer=en_US auto locale=en_US kbd-chooser/method=us ", + "hostname={{ .Name }} ", + "fb=false debconf/frontend=noninteractive ", + "keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA ", + "keyboard-configuration/variant=USA console-setup/ask_detect=false ", + "initrd=/install/initrd.gz -- " + ] ``` @@ -112,15 +118,17 @@ In HCL2: ```hcl boot_command = [ - "", - "/install/vmlinuz noapic ", - "preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg ", - "debian-installer=en_US auto locale=en_US kbd-chooser/method=us ", - "hostname={{ .Name }} ", - "fb=false debconf/frontend=noninteractive ", - "keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA ", - "keyboard-configuration/variant=USA console-setup/ask_detect=false ", - "initrd=/install/initrd.gz -- " + + "", + "/install/vmlinuz noapic ", + "preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg ", + "debian-installer=en_US auto locale=en_US kbd-chooser/method=us ", + "hostname={{ .Name }} ", + "fb=false debconf/frontend=noninteractive ", + "keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA ", + "keyboard-configuration/variant=USA console-setup/ask_detect=false ", + "initrd=/install/initrd.gz -- " + ] ``` diff --git a/cmd/packer-sdc/internal/renderdocs/docs-partials/packer-plugin-sdk/multistep/commonsteps/HTTPConfig.mdx b/cmd/packer-sdc/internal/renderdocs/docs-partials/packer-plugin-sdk/multistep/commonsteps/HTTPConfig.mdx index b3cdfc96a..169be88ef 100644 --- a/cmd/packer-sdc/internal/renderdocs/docs-partials/packer-plugin-sdk/multistep/commonsteps/HTTPConfig.mdx +++ b/cmd/packer-sdc/internal/renderdocs/docs-partials/packer-plugin-sdk/multistep/commonsteps/HTTPConfig.mdx @@ -6,6 +6,6 @@ referenced will be available in your builder. Example usage from a builder: - `wget http://{{ .HTTPIP }}:{{ .HTTPPort }}/foo/bar/preseed.cfg` + `wget http://{{ .HTTPIP }}:{{ .HTTPPort }}/foo/bar/preseed.cfg` diff --git a/cmd/packer-sdc/internal/renderdocs/docs-partials/packer-plugin-sdk/multistep/commonsteps/ISOConfig.mdx b/cmd/packer-sdc/internal/renderdocs/docs-partials/packer-plugin-sdk/multistep/commonsteps/ISOConfig.mdx index 58293cd77..1c3b269df 100644 --- a/cmd/packer-sdc/internal/renderdocs/docs-partials/packer-plugin-sdk/multistep/commonsteps/ISOConfig.mdx +++ b/cmd/packer-sdc/internal/renderdocs/docs-partials/packer-plugin-sdk/multistep/commonsteps/ISOConfig.mdx @@ -20,45 +20,61 @@ also possible to specify the checksum type. In JSON: ```json - "iso_checksum": "946a6077af6f5f95a51f82fdc44051c7aa19f9cfc5f737954845a6050543d7c2", - "iso_url": "ubuntu.org/.../ubuntu-14.04.1-server-amd64.iso" + + "iso_checksum": "946a6077af6f5f95a51f82fdc44051c7aa19f9cfc5f737954845a6050543d7c2", + "iso_url": "ubuntu.org/.../ubuntu-14.04.1-server-amd64.iso" + ``` ```json - "iso_checksum": "file:ubuntu.org/..../ubuntu-14.04.1-server-amd64.iso.sum", - "iso_url": "ubuntu.org/.../ubuntu-14.04.1-server-amd64.iso" + + "iso_checksum": "file:ubuntu.org/..../ubuntu-14.04.1-server-amd64.iso.sum", + "iso_url": "ubuntu.org/.../ubuntu-14.04.1-server-amd64.iso" + ``` ```json - "iso_checksum": "file://./shasums.txt", - "iso_url": "ubuntu.org/.../ubuntu-14.04.1-server-amd64.iso" + + "iso_checksum": "file://./shasums.txt", + "iso_url": "ubuntu.org/.../ubuntu-14.04.1-server-amd64.iso" + ``` ```json - "iso_checksum": "file:./shasums.txt", - "iso_url": "ubuntu.org/.../ubuntu-14.04.1-server-amd64.iso" + + "iso_checksum": "file:./shasums.txt", + "iso_url": "ubuntu.org/.../ubuntu-14.04.1-server-amd64.iso" + ``` In HCL2: ```hcl - iso_checksum = "946a6077af6f5f95a51f82fdc44051c7aa19f9cfc5f737954845a6050543d7c2" - iso_url = "ubuntu.org/.../ubuntu-14.04.1-server-amd64.iso" + + iso_checksum = "946a6077af6f5f95a51f82fdc44051c7aa19f9cfc5f737954845a6050543d7c2" + iso_url = "ubuntu.org/.../ubuntu-14.04.1-server-amd64.iso" + ``` ```hcl - iso_checksum = "file:ubuntu.org/..../ubuntu-14.04.1-server-amd64.iso.sum" - iso_url = "ubuntu.org/.../ubuntu-14.04.1-server-amd64.iso" + + iso_checksum = "file:ubuntu.org/..../ubuntu-14.04.1-server-amd64.iso.sum" + iso_url = "ubuntu.org/.../ubuntu-14.04.1-server-amd64.iso" + ``` ```hcl - iso_checksum = "file://./shasums.txt" - iso_url = "ubuntu.org/.../ubuntu-14.04.1-server-amd64.iso" + + iso_checksum = "file://./shasums.txt" + iso_url = "ubuntu.org/.../ubuntu-14.04.1-server-amd64.iso" + ``` ```hcl - iso_checksum = "file:./shasums.txt", - iso_url = "ubuntu.org/.../ubuntu-14.04.1-server-amd64.iso" + + iso_checksum = "file:./shasums.txt", + iso_url = "ubuntu.org/.../ubuntu-14.04.1-server-amd64.iso" + ``` From e5ba35c4f5dc2b0bf917ce4653d4b74779b0e387 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Tue, 7 Mar 2023 12:39:48 -0500 Subject: [PATCH 020/105] Remove directory from matrix --- .github/workflows/go-test.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml index acdf34c93..b1d69048a 100644 --- a/.github/workflows/go-test.yml +++ b/.github/workflows/go-test.yml @@ -21,8 +21,6 @@ jobs: go-version: - 1.18 - 1.19 - directory: - - . permissions: id-token: write contents: read @@ -53,12 +51,10 @@ jobs: run: go mod download - name: Run gofmt - working-directory: ${{ matrix.directory }} run: | make fmt-check - name: Run Go Generate Check - working-directory: ${{ matrix.directory }} run: | make generate-check @@ -66,7 +62,6 @@ jobs: run: go install gotest.tools/gotestsum@v1.8.2 - name: Run Go tests - working-directory: ${{ matrix.directory }} run: | PACKAGE_NAMES=$(go list ./...) echo "Running $(echo $PACKAGE_NAMES | wc -w) packages" @@ -122,7 +117,6 @@ jobs: - name: Run Go tests shell: bash - working-directory: ${{ matrix.directory }} run: | PACKAGE_NAMES=$(go list ./...) echo "Running $(echo $PACKAGE_NAMES | wc -w) packages" From 47e77fe4959c950e45734404dda6b1c8736fdee0 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Tue, 7 Mar 2023 12:46:35 -0500 Subject: [PATCH 021/105] Update go generate with Go 1.18 --- bootcommand/boot_command.go | 23 ++++++++++++----------- communicator/sshkey/algorithm_enumer.go | 1 + 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/bootcommand/boot_command.go b/bootcommand/boot_command.go index 79ac27134..940b8561e 100644 --- a/bootcommand/boot_command.go +++ b/bootcommand/boot_command.go @@ -897,17 +897,18 @@ func Entrypoint(ruleName string) Option { // // Example usage: // -// input := "input" -// stats := Stats{} -// _, err := Parse("input-file", []byte(input), Statistics(&stats, "no match")) -// if err != nil { -// log.Panicln(err) -// } -// b, err := json.MarshalIndent(stats.ChoiceAltCnt, "", " ") -// if err != nil { -// log.Panicln(err) -// } -// fmt.Println(string(b)) +// input := "input" +// stats := Stats{} +// _, err := Parse("input-file", []byte(input), Statistics(&stats, "no match")) +// if err != nil { +// log.Panicln(err) +// } +// b, err := json.MarshalIndent(stats.ChoiceAltCnt, "", " ") +// if err != nil { +// log.Panicln(err) +// } +// fmt.Println(string(b)) +// func Statistics(stats *Stats, choiceNoMatch string) Option { return func(p *parser) Option { oldStats := p.Stats diff --git a/communicator/sshkey/algorithm_enumer.go b/communicator/sshkey/algorithm_enumer.go index 2d95b10a1..1a300735b 100644 --- a/communicator/sshkey/algorithm_enumer.go +++ b/communicator/sshkey/algorithm_enumer.go @@ -1,5 +1,6 @@ // Code generated by "enumer -type Algorithm -transform snake"; DO NOT EDIT. +// package sshkey import ( From e2f3241e321449c294e709b377c9a604267ce68b Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Tue, 7 Mar 2023 12:50:23 -0500 Subject: [PATCH 022/105] Remove Go 1.19 from test matrix Go 1.19 has different formatting directives that appears to be causing conflicts with 1.18. --- .github/workflows/go-test.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml index b1d69048a..7e370c6eb 100644 --- a/.github/workflows/go-test.yml +++ b/.github/workflows/go-test.yml @@ -20,7 +20,6 @@ jobs: matrix: go-version: - 1.18 - - 1.19 permissions: id-token: write contents: read @@ -81,7 +80,6 @@ jobs: matrix: go-version: - 1.18 - - 1.19 directory: - . permissions: From d160ce0d79866fb62d9ca383ba04db5963009e38 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Fri, 24 Feb 2023 09:38:59 -0500 Subject: [PATCH 023/105] packer-sdc: return errors on duplicate tag/field When generating the flattened structures for a HCL2-compatible config, we didn't prevent users from defining duplicate fields or tags, instead warning them. The warning in itself did not prevent the resulting structures from being generated, leading into a situation where the first definition of the arg/tag would have precedence over the subsequent definitions, leading to shadowing their definitions. To prevent this in the future, we immediately return an error when such a conflict is introduced, and signal to the user which attribute is problematic. --- .../mapstructure-to-hcl2.go | 80 ++++++++++++++----- .../mapstructure-to-hcl2_test.go | 10 +++ .../test_mapstructure_field_conflict.go | 14 ++++ .../test_mapstructure_tag_conflict.go | 14 ++++ 4 files changed, 98 insertions(+), 20 deletions(-) create mode 100644 cmd/packer-sdc/internal/test-data/field-conflict/test_mapstructure_field_conflict.go create mode 100644 cmd/packer-sdc/internal/test-data/tag-conflict/test_mapstructure_tag_conflict.go diff --git a/cmd/packer-sdc/internal/mapstructure-to-hcl2/mapstructure-to-hcl2.go b/cmd/packer-sdc/internal/mapstructure-to-hcl2/mapstructure-to-hcl2.go index 5a541483e..3cd69a8bc 100644 --- a/cmd/packer-sdc/internal/mapstructure-to-hcl2/mapstructure-to-hcl2.go +++ b/cmd/packer-sdc/internal/mapstructure-to-hcl2/mapstructure-to-hcl2.go @@ -146,8 +146,18 @@ func (cmd *Command) Run(args []string) int { } // make sure each type is found once where somehow sometimes they can be found twice typeNames = append(typeNames[:pos], typeNames[pos+1:]...) - flatenedStruct := getMapstructureSquashedStruct(obj.Pkg(), utStruct) - flatenedStruct = addCtyTagToStruct(flatenedStruct) + flatenedStruct, err := getMapstructureSquashedStruct(obj.Pkg(), utStruct) + if err != nil { + log.Printf("%s.%s: %s", obj.Pkg().Name(), obj.Id(), err) + return 1 + } + + flatenedStruct, err = addCtyTagToStruct(flatenedStruct) + if err != nil { + log.Printf("%s.%s: %s", obj.Pkg().Name(), obj.Id(), err) + return 1 + } + newStructName := "Flat" + id.Name structs = append(structs, StructDef{ OriginalStructName: id.Name, @@ -422,7 +432,7 @@ func getUsedImports(s *types.Struct) map[NamePath]*types.Package { return res } -func addCtyTagToStruct(s *types.Struct) *types.Struct { +func addCtyTagToStruct(s *types.Struct) (*types.Struct, error) { vars, tags := structFields(s) for i := range tags { field, tag := vars[i], tags[i] @@ -437,10 +447,16 @@ func addCtyTagToStruct(s *types.Struct) *types.Struct { _ = st.Set(&structtag.Tag{Key: "hcl", Name: ctyAccessor}) tags[i] = st.String() } - return types.NewStruct(uniqueTags("cty", vars, tags)) + + vars, tags, err := uniqueTags("cty", vars, tags) + if err != nil { + return nil, fmt.Errorf("failed to add tag to struct: %s", err) + } + + return types.NewStruct(vars, tags), nil } -func uniqueTags(tagName string, fields []*types.Var, tags []string) ([]*types.Var, []string) { +func uniqueTags(tagName string, fields []*types.Var, tags []string) ([]*types.Var, []string, error) { outVars := []*types.Var{} outTags := []string{} uniqueTags := map[string]bool{} @@ -450,20 +466,19 @@ func uniqueTags(tagName string, fields []*types.Var, tags []string) ([]*types.Va h, err := structtag.Get(tagName) if err == nil { if uniqueTags[h.Name] { - log.Printf("skipping field %s ( duplicate `%s` %s tag )", field.Name(), h.Name, tagName) - continue + return nil, nil, fmt.Errorf("field %q: duplicate tag %q", field.Name(), tagName) } uniqueTags[h.Name] = true } outVars = append(outVars, field) outTags = append(outTags, tag) } - return outVars, outTags + return outVars, outTags, nil } // getMapstructureSquashedStruct will return the same struct but embedded // fields with a `mapstructure:",squash"` tag will be un-nested. -func getMapstructureSquashedStruct(topPkg *types.Package, utStruct *types.Struct) *types.Struct { +func getMapstructureSquashedStruct(topPkg *types.Package, utStruct *types.Struct) (*types.Struct, error) { res := &types.Struct{} for i := 0; i < utStruct.NumFields(); i++ { field, tag := utStruct.Field(i), utStruct.Tag(i) @@ -498,7 +513,16 @@ func getMapstructureSquashedStruct(topPkg *types.Package, utStruct *types.Struct continue } - res = squashStructs(res, getMapstructureSquashedStruct(topPkg, utStruct)) + sqStr, err := getMapstructureSquashedStruct(topPkg, utStruct) + if err != nil { + return nil, err + } + + res, err = squashStructs(res, sqStr) + if err != nil { + return nil, err + } + continue } } @@ -553,9 +577,12 @@ func getMapstructureSquashedStruct(topPkg *types.Package, utStruct *types.Struct // non optional fields should be non pointers. field = makePointer(field) } - res = addFieldToStruct(res, field, tag) + res, err = addFieldToStruct(res, field, tag) + if err != nil { + return nil, err + } } - return res + return res, nil } func flattenNamed(f *types.Named, underlying types.Type) *types.Named { @@ -568,32 +595,45 @@ func makePointer(field *types.Var) *types.Var { return types.NewField(field.Pos(), field.Pkg(), field.Name(), types.NewPointer(field.Type()), field.Embedded()) } -func addFieldToStruct(s *types.Struct, field *types.Var, tag string) *types.Struct { +func addFieldToStruct(s *types.Struct, field *types.Var, tag string) (*types.Struct, error) { sf, st := structFields(s) - return types.NewStruct(uniqueFields(append(sf, field), append(st, tag))) + + vars, tags, err := uniqueFields(append(sf, field), append(st, tag)) + if err != nil { + return nil, err + } + + str := types.NewStruct(vars, tags) + return str, nil } -func squashStructs(a, b *types.Struct) *types.Struct { +func squashStructs(a, b *types.Struct) (*types.Struct, error) { va, ta := structFields(a) vb, tb := structFields(b) - return types.NewStruct(uniqueFields(append(va, vb...), append(ta, tb...))) + + vars, tags, err := uniqueFields(append(va, vb...), append(ta, tb...)) + if err != nil { + return nil, fmt.Errorf("failed to squash struct: %s", err) + } + + str := types.NewStruct(vars, tags) + return str, nil } -func uniqueFields(fields []*types.Var, tags []string) ([]*types.Var, []string) { +func uniqueFields(fields []*types.Var, tags []string) ([]*types.Var, []string, error) { outVars := []*types.Var{} outTags := []string{} fieldNames := map[string]bool{} for i := range fields { field, tag := fields[i], tags[i] if fieldNames[field.Name()] { - log.Printf("skipping duplicate %s field", field.Name()) - continue + return nil, nil, fmt.Errorf("duplicate field %q", field.Name()) } fieldNames[field.Name()] = true outVars = append(outVars, field) outTags = append(outTags, tag) } - return outVars, outTags + return outVars, outTags, nil } func structFields(s *types.Struct) (vars []*types.Var, tags []string) { diff --git a/cmd/packer-sdc/internal/mapstructure-to-hcl2/mapstructure-to-hcl2_test.go b/cmd/packer-sdc/internal/mapstructure-to-hcl2/mapstructure-to-hcl2_test.go index aa50e2fe1..6c72213ee 100644 --- a/cmd/packer-sdc/internal/mapstructure-to-hcl2/mapstructure-to-hcl2_test.go +++ b/cmd/packer-sdc/internal/mapstructure-to-hcl2/mapstructure-to-hcl2_test.go @@ -45,6 +45,16 @@ func TestCommand_Run(t *testing.T) { Expected: []string{"../test-data/packer-plugin-happycloud/builder/happycloud/config.hcl2spec.go"}, }, }, + { + []string{"-type", "Config", "../test-data/field-conflict/test_mapstructure_field_conflict.go"}, + 1, + FileCheck{}, + }, + { + []string{"-type", "Config", "../test-data/tag-conflict/test_mapstructure_tag_conflict.go"}, + 1, + FileCheck{}, + }, } for _, tt := range tests { t.Run(fmt.Sprintf("%s", tt.args), func(t *testing.T) { diff --git a/cmd/packer-sdc/internal/test-data/field-conflict/test_mapstructure_field_conflict.go b/cmd/packer-sdc/internal/test-data/field-conflict/test_mapstructure_field_conflict.go new file mode 100644 index 000000000..9d720566e --- /dev/null +++ b/cmd/packer-sdc/internal/test-data/field-conflict/test_mapstructure_field_conflict.go @@ -0,0 +1,14 @@ +package test + +type NestedOne struct { + Arg int `mapstructure:"test"` +} + +type NestedTwo struct { + Arg int `mapstructure:"test"` +} + +type Config struct { + NestedOne `mapstructure:",squash"` + NestedTwo `mapstructure:",squash"` +} diff --git a/cmd/packer-sdc/internal/test-data/tag-conflict/test_mapstructure_tag_conflict.go b/cmd/packer-sdc/internal/test-data/tag-conflict/test_mapstructure_tag_conflict.go new file mode 100644 index 000000000..5c974b380 --- /dev/null +++ b/cmd/packer-sdc/internal/test-data/tag-conflict/test_mapstructure_tag_conflict.go @@ -0,0 +1,14 @@ +package test + +type NestedOne struct { + Arg int `mapstructure:"test"` +} + +type NestedTwo struct { + Args int `mapstructure:"test"` +} + +type Config struct { + NestedOne `mapstructure:",squash"` + NestedTwo `mapstructure:",squash"` +} From 62bcc50882c985d76c27471b48004a6b49c19cbf Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Mon, 6 Mar 2023 14:52:52 -0500 Subject: [PATCH 024/105] Update golang.org/x/net to address GO-2023-1571 --- go.mod | 12 ++++++------ go.sum | 24 ++++++++++++------------ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/go.mod b/go.mod index b64d409b5..bf044f0f5 100644 --- a/go.mod +++ b/go.mod @@ -65,14 +65,14 @@ require ( github.com/zclconf/go-cty v1.10.0 golang.org/x/crypto v0.0.0-20220517005047-85d78b3ac167 golang.org/x/mobile v0.0.0-20210901025245-1fde1d6c3ca1 - golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 - golang.org/x/net v0.1.0 + golang.org/x/mod v0.8.0 + golang.org/x/net v0.8.0 golang.org/x/sync v0.1.0 - golang.org/x/sys v0.1.0 // indirect - golang.org/x/term v0.1.0 - golang.org/x/text v0.4.0 // indirect + golang.org/x/sys v0.6.0 // indirect + golang.org/x/term v0.6.0 + golang.org/x/text v0.8.0 // indirect golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect - golang.org/x/tools v0.1.12 + golang.org/x/tools v0.6.0 google.golang.org/api v0.101.0 // indirect gopkg.in/square/go-jose.v2 v2.6.0 // indirect gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect diff --git a/go.sum b/go.sum index 08e949169..648876534 100644 --- a/go.sum +++ b/go.sum @@ -469,8 +469,8 @@ golang.org/x/mobile v0.0.0-20210901025245-1fde1d6c3ca1 h1:t3ZHqovedSY8DEAUmZA99f golang.org/x/mobile v0.0.0-20210901025245-1fde1d6c3ca1/go.mod h1:jFTmtFYCV0MFtXBU+J5V/+5AUeVS0ON/0WkE/KSrl6E= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -494,8 +494,8 @@ golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.1.0 h1:hZ/3BUoy5aId7sCpA/Tc5lt8DkFgdVS2onTpJsZ/fl0= -golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= +golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ= +golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.1.0 h1:isLCZuhj4v+tYv7eskaN4v/TM+A1begWWgyVJDdl1+Y= golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= @@ -540,19 +540,19 @@ golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.1.0 h1:kunALQeHf1/185U1i0GOB/fy1IPRDDpuoOOqRReG57U= -golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.1.0 h1:g6Z6vPFA9dYBAF7DWcH6sCcOntplXsDKcliusYijMlw= -golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.6.0 h1:clScbb1cHjoCkyRbWwBEUZ5H/tIFu5TAXIqaZD0Gcjw= +golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.4.0 h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg= -golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68= +golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac h1:7zkz7BUtwNFFqcowJ+RIgu2MaV/MapERkDIy+mwPyjs= @@ -570,8 +570,8 @@ golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= From ac3abdcb14b24ff6d00d66f7f19d601fc733cd01 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Tue, 7 Mar 2023 13:22:28 -0500 Subject: [PATCH 025/105] Use login user name when available --- pathing/config_file_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pathing/config_file_test.go b/pathing/config_file_test.go index 6f9dbf666..3286e3f81 100644 --- a/pathing/config_file_test.go +++ b/pathing/config_file_test.go @@ -5,6 +5,7 @@ package pathing import ( "fmt" + "os" "os/user" "path/filepath" "runtime" @@ -17,6 +18,9 @@ func platform_user() string { // on the windows platform, whereas the correct way is to use // the api or to scrape `net user`. if runtime.GOOS == "windows" { + if loginUser := os.Getenv("USERNAME"); loginUser != "" { + return loginUser + } return "Administrator" } return "root" From a11399a2a43ee96b9bbe979988ff0390d315083b Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Tue, 7 Mar 2023 15:49:13 -0500 Subject: [PATCH 026/105] Remove circle-ci jobs in favor of GHA --- .circleci/config.yml | 104 ------------------------------------------- 1 file changed, 104 deletions(-) delete mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index da3855ae5..000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,104 +0,0 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - -orbs: - win: circleci/windows@1.0.0 - -version: 2.1 - -environment: &ENVIRONMENT - EMAIL: 62970560+packer-ci@users.noreply.github.com - GIT_AUTHOR_NAME: packer-ci - GIT_COMMITTER_NAME: packer-ci - -executors: - golang: - docker: - - image: docker.mirror.hashicorp.services/cimg/go:1.18 - resource_class: medium+ - darwin: - macos: - xcode: "13.4.1" - -commands: - install-go-run-tests-unix: - parameters: - GOOS: - type: string - GOVERSION: - type: string - steps: - - checkout - - run: curl https://dl.google.com/go/go<< parameters.GOVERSION >>.<< parameters.GOOS >>-amd64.tar.gz | tar -C ~/ -xz - - run: GO111MODULE=on PATH="$PATH:$HOME/go/bin/" ~/go/bin/go test ./... -race -coverprofile=coverage.txt -covermode=atomic - install-go-run-tests-windows: - parameters: - GOVERSION: - type: string - steps: - - checkout - - run: curl https://dl.google.com/go/go<< parameters.GOVERSION >>.windows-amd64.zip --output ~/go<< parameters.GOVERSION >>.windows-amd64.zip - - run: unzip ~/go<< parameters.GOVERSION >>.windows-amd64.zip -d ~/ - - run: GO111MODULE=on PATH="$PATH:$HOME/go/bin/" ~/go/bin/go test ./... -coverprofile=coverage.txt -covermode=atomic - -# Golang CircleCI 2.0 configuration file -# -# Check https://circleci.com/docs/2.0/language-go/ for more details -jobs: - test-linux: - executor: golang - resource_class: large - working_directory: ~/go/src/github.com/hashicorp/packer-plugin-sdk - steps: - - checkout - - run: make vet - - run: TESTARGS="-coverprofile=coverage.txt -covermode=atomic" make ci - test-darwin: - executor: darwin - working_directory: ~/go/src/github.com/hashicorp/packer-plugin-sdk - environment: - GO111MODULE: "off" - steps: - - install-go-run-tests-unix: - GOOS: darwin - GOVERSION: "1.18.5" - test-windows: - executor: - name: win/vs2019 - shell: bash.exe - steps: - - install-go-run-tests-windows: - GOVERSION: "1.18.5" - check-lint: - executor: golang - resource_class: xlarge - steps: - - checkout - - run: git fetch --all - - run: - command: make ci-lint - no_output_timeout: 30m - check-fmt: - executor: golang - steps: - - checkout - - run: make fmt-check - check-generate: - executor: golang - working_directory: ~/go/src/github.com/hashicorp/packer-plugin-sdk - steps: - - checkout - - run: make generate-check - -workflows: - version: 2 - test: - jobs: - - test-linux - - test-darwin - - test-windows - check-code: - jobs: - - check-lint - - check-fmt - - check-generate From ba0cbeb8e7daf5db716bb4bea472d9123e4e97dc Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Tue, 7 Mar 2023 15:50:06 -0500 Subject: [PATCH 027/105] Add test to runner for Darwin Os * Remove directory from matrix build for Windows config --- .github/workflows/go-test.yml | 54 +++++++++++++++++++++++++++++++++-- 1 file changed, 52 insertions(+), 2 deletions(-) diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml index 7e370c6eb..526e07710 100644 --- a/.github/workflows/go-test.yml +++ b/.github/workflows/go-test.yml @@ -80,8 +80,6 @@ jobs: matrix: go-version: - 1.18 - directory: - - . permissions: id-token: write contents: read @@ -127,3 +125,55 @@ jobs: with: name: windows test results path: ${{ env.TEST_RESULTS_PATH }} + + darwin-tests: + runs-on: macos-latest + strategy: + matrix: + go-version: + - 1.18 + permissions: + id-token: write + contents: read + steps: + - name: Setup go + uses: actions/setup-go@v3 + with: + go-version: ${{ matrix.go-version }} + + - name: Checkout code + uses: actions/checkout@v3 + + - name: Create test directory + run: | + mkdir -p ${{ env.TEST_RESULTS_PATH }}/packer-plugin-sdk + + - name: Setup cache for go modules + uses: actions/cache@v3 + with: + path: | + ~/.cache/go-build + ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + + - name: Download go modules + run: go mod download + + - name: Install gotestsum + run: go install gotest.tools/gotestsum@v1.8.2 + + - name: Run Go tests + run: | + PACKAGE_NAMES=$(go list ./...) + echo "Running $(echo $PACKAGE_NAMES | wc -w) packages" + echo $PACKAGE_NAMES + gotestsum --format=short-verbose --junitfile $TEST_RESULTS_PATH/packer-plugin-sdk/gotestsum-report.xml -- -p 2 $PACKAGE_NAMES + + # Save coverage report parts + - name: Upload and save artifacts + uses: actions/upload-artifact@v3 + with: + name: macos test results + path: ${{ env.TEST_RESULTS_PATH }} From 75fe3631e41f5ab5c08fbe7193dd2a5c6ca43579 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Wed, 8 Mar 2023 11:25:24 -0500 Subject: [PATCH 028/105] cut release v0.4.0 --- version/version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version/version.go b/version/version.go index 8233858e7..add289bab 100644 --- a/version/version.go +++ b/version/version.go @@ -16,7 +16,7 @@ import ( var GitCommit string // Package version helps plugin creators set and track the sdk version using -var Version = "0.3.4" +var Version = "0.4.0" // A pre-release marker for the version. If this is "" (empty string) // then it means that it is a final release. Otherwise, this is a pre-release From b03e2b6b7bbc38ca6b92770b33873860e796a5e0 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Mon, 10 Apr 2023 15:35:41 +0000 Subject: [PATCH 029/105] Update link to latest releases in CHANGELOG --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 502f9b139..e6da20a0e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ - See [Releases](https://github.com/hashicorp/packer-plugin-sdk/releases) for latest CHANGELOG information. + # Latest Release + Please refer to [releases](https://github.com/hashicorp/packer-plugin-sdk/releases) for latest CHANGELOG information. ## 0.3.1 (July 28, 2022) From e0635ce760fe96888cb073863dd137dd31951b88 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Wed, 12 Apr 2023 10:28:53 -0400 Subject: [PATCH 030/105] workflows: pin external actions --- .github/workflows/go-test.yml | 24 ++++++++++++------------ .github/workflows/release.yml | 4 ++-- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml index 526e07710..9bae84988 100644 --- a/.github/workflows/go-test.yml +++ b/.github/workflows/go-test.yml @@ -25,19 +25,19 @@ jobs: contents: read steps: - name: Setup go - uses: actions/setup-go@v3 + uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0 with: go-version: ${{ matrix.go-version }} - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0 - name: Create test directory run: | mkdir -p ${{ env.TEST_RESULTS_PATH }}/packer-plugin-sdk - name: Setup cache for go modules - uses: actions/cache@v3 + uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 with: path: | ~/.cache/go-build @@ -69,7 +69,7 @@ jobs: # Save coverage report parts - name: Upload and save artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 with: name: linux test results path: ${{ env.TEST_RESULTS_PATH }} @@ -88,15 +88,15 @@ jobs: run: git config --global core.autocrlf false - name: Setup Go - uses: actions/setup-go@v3 + uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0 with: go-version: ${{ matrix.go-version }} - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0 - name: Setup cache for go modules - uses: actions/cache@v3 + uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 with: path: | ~\AppData\Local\go-build @@ -121,7 +121,7 @@ jobs: # Save coverage report parts - name: Upload and save artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 with: name: windows test results path: ${{ env.TEST_RESULTS_PATH }} @@ -137,19 +137,19 @@ jobs: contents: read steps: - name: Setup go - uses: actions/setup-go@v3 + uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0 with: go-version: ${{ matrix.go-version }} - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0 - name: Create test directory run: | mkdir -p ${{ env.TEST_RESULTS_PATH }}/packer-plugin-sdk - name: Setup cache for go modules - uses: actions/cache@v3 + uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 with: path: | ~/.cache/go-build @@ -173,7 +173,7 @@ jobs: # Save coverage report parts - name: Upload and save artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 with: name: macos test results path: ${{ env.TEST_RESULTS_PATH }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6f0450908..4d8eac03c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,9 +14,9 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0 - name: GoReleaser - uses: goreleaser/goreleaser-action@v3 + uses: goreleaser/goreleaser-action@f82d6c1c344bcacabba2c841718984797f664a6b # v4.2.0 with: args: "release" env: From 85465e89d986c840bf3743b7afd2e967f4eb5186 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Wed, 12 Apr 2023 10:36:41 -0400 Subject: [PATCH 031/105] workflows/go-test: add permissions to workflow --- .github/workflows/go-test.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml index 9bae84988..b7d34ff7e 100644 --- a/.github/workflows/go-test.yml +++ b/.github/workflows/go-test.yml @@ -1,5 +1,4 @@ name: go-test - on: push: branches: @@ -7,13 +6,11 @@ on: pull_request: branches: - main - - env: TEST_RESULTS_PATH: /tmp/test-results - +permissions: + contents: read jobs: - linux-tests: runs-on: ubuntu-latest strategy: From 5249eb011026f3faa89f48b478b256fecd57281f Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Wed, 12 Apr 2023 10:51:28 -0400 Subject: [PATCH 032/105] workflows: add actionlint workflow --- .github/workflows/actionlint.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .github/workflows/actionlint.yml diff --git a/.github/workflows/actionlint.yml b/.github/workflows/actionlint.yml new file mode 100644 index 000000000..f4cb01069 --- /dev/null +++ b/.github/workflows/actionlint.yml @@ -0,0 +1,13 @@ +name: Lint GitHub Actions Workflows +on: + push: + pull_request: +permissions: + contents: read +jobs: + actionlint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0 + - name: "Check workflow files" + uses: docker://docker.mirror.hashicorp.services/rhysd/actionlint:latest From 9b87bcd755118d050b7481ca4d16f00aade700b2 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Wed, 12 Apr 2023 10:44:19 -0400 Subject: [PATCH 033/105] go-test: fix lint/shellcheck quoting issues --- .github/workflows/go-test.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml index b7d34ff7e..020fca52b 100644 --- a/.github/workflows/go-test.yml +++ b/.github/workflows/go-test.yml @@ -59,10 +59,10 @@ jobs: - name: Run Go tests run: | - PACKAGE_NAMES=$(go list ./...) - echo "Running $(echo $PACKAGE_NAMES | wc -w) packages" - echo $PACKAGE_NAMES - gotestsum --format=short-verbose --junitfile $TEST_RESULTS_PATH/packer-plugin-sdk/gotestsum-report.xml -- -p 2 $PACKAGE_NAMES + PACKAGE_NAMES="$(go list ./...)" + echo "Running $(echo "$PACKAGE_NAMES" | wc -w) packages" + echo "$PACKAGE_NAMES" + echo "$PACKAGE_NAMES" | xargs -I {} gotestsum --format=short-verbose --junitfile "$TEST_RESULTS_PATH"/packer-plugin-sdk/gotestsum-report.xml -- -count 1 -p 2 {}; # Save coverage report parts - name: Upload and save artifacts @@ -111,10 +111,10 @@ jobs: - name: Run Go tests shell: bash run: | - PACKAGE_NAMES=$(go list ./...) - echo "Running $(echo $PACKAGE_NAMES | wc -w) packages" - echo $PACKAGE_NAMES - gotestsum --format=short-verbose --junitfile $TEST_RESULTS_PATH/packer-plugin-sdk/gotestsum-report.xml -- -p 2 $PACKAGE_NAMES + PACKAGE_NAMES="$(go list ./...)" + echo "Running $(echo "$PACKAGE_NAMES" | wc -w) packages" + echo "$PACKAGE_NAMES" + echo "$PACKAGE_NAMES" | xargs -I {} gotestsum --format=short-verbose --junitfile "$TEST_RESULTS_PATH"/packer-plugin-sdk/gotestsum-report.xml -- -count 1 -p 2 {}; # Save coverage report parts - name: Upload and save artifacts @@ -163,10 +163,10 @@ jobs: - name: Run Go tests run: | - PACKAGE_NAMES=$(go list ./...) - echo "Running $(echo $PACKAGE_NAMES | wc -w) packages" - echo $PACKAGE_NAMES - gotestsum --format=short-verbose --junitfile $TEST_RESULTS_PATH/packer-plugin-sdk/gotestsum-report.xml -- -p 2 $PACKAGE_NAMES + PACKAGE_NAMES="$(go list ./...)" + echo "Running $(echo "$PACKAGE_NAMES" | wc -w) packages" + echo "$PACKAGE_NAMES" + echo "$PACKAGE_NAMES" | xargs -I {} gotestsum --format=short-verbose --junitfile "$TEST_RESULTS_PATH"/packer-plugin-sdk/gotestsum-report.xml -- -count 1 -p 2 {}; # Save coverage report parts - name: Upload and save artifacts From 10b594a323899f4be73e98e643a3114e02b1538d Mon Sep 17 00:00:00 2001 From: "hashicorp-tsccr[bot]" Date: Fri, 21 Apr 2023 12:22:36 +0100 Subject: [PATCH 034/105] Result of tsccr-helper -pin-all-workflows . --- .github/workflows/actionlint.yml | 2 +- .github/workflows/go-test.yml | 6 +++--- .github/workflows/release.yml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/actionlint.yml b/.github/workflows/actionlint.yml index f4cb01069..68c03d050 100644 --- a/.github/workflows/actionlint.yml +++ b/.github/workflows/actionlint.yml @@ -8,6 +8,6 @@ jobs: actionlint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - name: "Check workflow files" uses: docker://docker.mirror.hashicorp.services/rhysd/actionlint:latest diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml index 020fca52b..0f6ef8bd4 100644 --- a/.github/workflows/go-test.yml +++ b/.github/workflows/go-test.yml @@ -27,7 +27,7 @@ jobs: go-version: ${{ matrix.go-version }} - name: Checkout code - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0 + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - name: Create test directory run: | @@ -90,7 +90,7 @@ jobs: go-version: ${{ matrix.go-version }} - name: Checkout code - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0 + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - name: Setup cache for go modules uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 @@ -139,7 +139,7 @@ jobs: go-version: ${{ matrix.go-version }} - name: Checkout code - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0 + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - name: Create test directory run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4d8eac03c..46a91a3dd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0 + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - name: GoReleaser uses: goreleaser/goreleaser-action@f82d6c1c344bcacabba2c841718984797f664a6b # v4.2.0 with: From 9a0710c19b84339bff4937b06ce9d688bc22cc93 Mon Sep 17 00:00:00 2001 From: "hashicorp-copywrite[bot]" <110428419+hashicorp-copywrite[bot]@users.noreply.github.com> Date: Mon, 17 Apr 2023 16:30:25 +0000 Subject: [PATCH 035/105] [COMPLIANCE] Add Copyright and License Headers --- .../field-conflict/test_mapstructure_field_conflict.go | 3 +++ .../test-data/tag-conflict/test_mapstructure_tag_conflict.go | 3 +++ 2 files changed, 6 insertions(+) diff --git a/cmd/packer-sdc/internal/test-data/field-conflict/test_mapstructure_field_conflict.go b/cmd/packer-sdc/internal/test-data/field-conflict/test_mapstructure_field_conflict.go index 9d720566e..4a6a95588 100644 --- a/cmd/packer-sdc/internal/test-data/field-conflict/test_mapstructure_field_conflict.go +++ b/cmd/packer-sdc/internal/test-data/field-conflict/test_mapstructure_field_conflict.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package test type NestedOne struct { diff --git a/cmd/packer-sdc/internal/test-data/tag-conflict/test_mapstructure_tag_conflict.go b/cmd/packer-sdc/internal/test-data/tag-conflict/test_mapstructure_tag_conflict.go index 5c974b380..172b5a829 100644 --- a/cmd/packer-sdc/internal/test-data/tag-conflict/test_mapstructure_tag_conflict.go +++ b/cmd/packer-sdc/internal/test-data/tag-conflict/test_mapstructure_tag_conflict.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package test type NestedOne struct { From e5dc31bc63268d618acdbb1f58eb2f019fd09b4b Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Fri, 21 Apr 2023 11:43:06 -0400 Subject: [PATCH 036/105] Add basic test for commonServer.ConfigSpec The Packer SDK relies on encoding/gob for serializing hcldec.ObjectSpec over RPC. The added test check that types implementing the HCL2Speccer interface can be encoded/decoded without issue. Starting in go-cty v1.11.0 support for encoding/gob was removed, which causes the added tests to fail. This is expected and is meant to help catch potential regressions moving forward. Test results running go-cty v1.10.0 ``` --- PASS: TestCommonServer_ConfigSpec (0.00s) --- PASS: TestCommonServer_ConfigSpec/Builder_Component_Server (0.00s) --- PASS: TestCommonServer_ConfigSpec/Datasource_Component_Server (0.00s) --- PASS: TestCommonServer_ConfigSpec/Provisioner_Component_Server (0.00s) === RUN TestCommunicatorRPC ``` Test results running go-cty v1.13.1 ``` 2023/04/21 11:28:05 [WARN] Client is closing mux --- FAIL: TestCommonServer_ConfigSpec (0.00s) --- FAIL: TestCommonServer_ConfigSpec/Builder_Component_Server (0.00s) panic: ConfigSpec failed: gob: type cty.Type has no exported fields [recovered] panic: ConfigSpec failed: gob: type cty.Type has no exported fields goroutine 299 [running]: testing.tRunner.func1.2({0x10524fb60, 0x14000486530}) /usr/local/go/src/testing/testing.go:1389 +0x1c8 testing.tRunner.func1() /usr/local/go/src/testing/testing.go:1392 +0x384 panic({0x10524fb60, 0x14000486530}) /usr/local/go/src/runtime/panic.go:838 +0x204 github.com/hashicorp/packer-plugin-sdk/rpc.(*commonClient).ConfigSpec(0x14000475f08) /Users/dev/Development/packer-plugin-sdk/rpc/common.go:48 +0x24c github.com/hashicorp/packer-plugin-sdk/rpc.TestCommonServer_ConfigSpec.func1(0x140004e5860) /Users/dev/Development/packer-plugin-sdk/rpc/common_test.go:44 +0x10c testing.tRunner(0x140004e5860, 0x14000483dd0) /usr/local/go/src/testing/testing.go:1439 +0x110 created by testing.(*T).Run /usr/local/go/src/testing/testing.go:1486 +0x300 FAIL github.com/hashicorp/packer-plugin-sdk/rpc 0.796s ``` --- rpc/common.go | 5 ++-- rpc/common_test.go | 68 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+), 2 deletions(-) create mode 100644 rpc/common_test.go diff --git a/rpc/common.go b/rpc/common.go index c16841691..2a0dadc34 100644 --- a/rpc/common.go +++ b/rpc/common.go @@ -14,7 +14,7 @@ import ( ) // commonClient allows to rpc call funcs that can be defined on the different -// build blocks of packer +// build blocks of Packer. type commonClient struct { // endpoint is usually the type of build block we are connecting to. // @@ -25,7 +25,8 @@ type commonClient struct { } type commonServer struct { - mux *muxBroker + mux *muxBroker + // a HCL2 enabled component such as a Builder selfConfigurable interface { ConfigSpec() hcldec.ObjectSpec } diff --git a/rpc/common_test.go b/rpc/common_test.go new file mode 100644 index 000000000..31ebad671 --- /dev/null +++ b/rpc/common_test.go @@ -0,0 +1,68 @@ +package rpc + +import ( + "testing" + + "github.com/hashicorp/hcl/v2/hcldec" + packersdk "github.com/hashicorp/packer-plugin-sdk/packer" +) + +var b testing.B + +func TestCommonServer_ConfigSpec(t *testing.T) { + tt := []struct { + name string + component packersdk.HCL2Speccer + }{ + { + name: "Builder Component Server", + component: new(packersdk.MockBuilder), + }, + { + name: "Datasource Component Server", + component: new(packersdk.MockDatasource), + }, + { + name: "Provisioner Component Server", + component: new(packersdk.MockProvisioner), + }, + } + + for _, tc := range tt { + tc := tc + t.Run(tc.name, func(t *testing.T) { + // Start the server + client, server := testClientServer(t) + defer client.Close() + defer server.Close() + + var spec hcldec.ObjectSpec + switch v := tc.component.(type) { + case packersdk.Builder: + server.RegisterBuilder(v) + remote := client.Builder() + spec = remote.ConfigSpec() + case packersdk.Datasource: + server.RegisterDatasource(v) + remote := client.Datasource() + spec = remote.ConfigSpec() + case packersdk.Provisioner: + server.RegisterProvisioner(v) + remote := client.Provisioner() + spec = remote.ConfigSpec() + case packersdk.PostProcessor: + server.RegisterPostProcessor(v) + remote := client.PostProcessor() + spec = remote.ConfigSpec() + default: + t.Fatalf("Unknown component type %T", v) + } + + if len(spec) == 0 { + t.Errorf("expected remote.ConfigSpec for %T to return a valid hcldec.ObjectSpec, but return %v", tc.component, spec) + } + + }) + } + +} From 21a1e5e2865186e2806ddc448627b0ec7e9f8289 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Fri, 21 Apr 2023 14:32:32 -0400 Subject: [PATCH 037/105] Add recover to fail test on panic ``` ~> go get github.com/zclconf/go-cty@v1.13.1 ~> go test ./rpc/... -v -run=TestCommonServer === RUN TestCommonServer_ConfigSpec === RUN TestCommonServer_ConfigSpec/Builder_Component_Server common_test.go:75: Call to ConfigSpec for Builder Component Server panicked: ConfigSpec failed: gob: type cty.Type has no exported fields 2023/04/21 14:31:27 [WARN] Shutting down mux conn in Server 2023/04/21 14:31:27 [WARN] Client is closing mux === RUN TestCommonServer_ConfigSpec/Datasource_Component_Server common_test.go:75: Call to ConfigSpec for Datasource Component Server panicked: ConfigSpec failed: gob: type cty.Type has no exported fields 2023/04/21 14:31:27 [WARN] Shutting down mux conn in Server 2023/04/21 14:31:27 [WARN] Client is closing mux === RUN TestCommonServer_ConfigSpec/Provisioner_Component_Server common_test.go:75: Call to ConfigSpec for Provisioner Component Server panicked: ConfigSpec failed: gob: type cty.Type has no exported fields 2023/04/21 14:31:27 [WARN] Shutting down mux conn in Server 2023/04/21 14:31:27 [WARN] Client is closing mux --- FAIL: TestCommonServer_ConfigSpec (0.00s) --- FAIL: TestCommonServer_ConfigSpec/Builder_Component_Server (0.00s) --- FAIL: TestCommonServer_ConfigSpec/Datasource_Component_Server (0.00s) --- FAIL: TestCommonServer_ConfigSpec/Provisioner_Component_Server (0.00s) FAIL FAIL github.com/hashicorp/packer-plugin-sdk/rpc 0.278s FAIL ``` --- rpc/common_test.go | 45 ++++++++++++++++++++++++++++++++------------- 1 file changed, 32 insertions(+), 13 deletions(-) diff --git a/rpc/common_test.go b/rpc/common_test.go index 31ebad671..3dce764b4 100644 --- a/rpc/common_test.go +++ b/rpc/common_test.go @@ -36,28 +36,47 @@ func TestCommonServer_ConfigSpec(t *testing.T) { defer client.Close() defer server.Close() - var spec hcldec.ObjectSpec + var configSpecTestFn func() hcldec.ObjectSpec switch v := tc.component.(type) { case packersdk.Builder: - server.RegisterBuilder(v) - remote := client.Builder() - spec = remote.ConfigSpec() + configSpecTestFn = func() hcldec.ObjectSpec { + server.RegisterBuilder(v) + remote := client.Builder() + spec := remote.ConfigSpec() + return spec + } case packersdk.Datasource: - server.RegisterDatasource(v) - remote := client.Datasource() - spec = remote.ConfigSpec() + configSpecTestFn = func() hcldec.ObjectSpec { + server.RegisterDatasource(v) + remote := client.Datasource() + spec := remote.ConfigSpec() + return spec + } case packersdk.Provisioner: - server.RegisterProvisioner(v) - remote := client.Provisioner() - spec = remote.ConfigSpec() + configSpecTestFn = func() hcldec.ObjectSpec { + server.RegisterProvisioner(v) + remote := client.Provisioner() + spec := remote.ConfigSpec() + return spec + } case packersdk.PostProcessor: - server.RegisterPostProcessor(v) - remote := client.PostProcessor() - spec = remote.ConfigSpec() + configSpecTestFn = func() hcldec.ObjectSpec { + server.RegisterPostProcessor(v) + remote := client.PostProcessor() + spec := remote.ConfigSpec() + return spec + } default: t.Fatalf("Unknown component type %T", v) } + defer func() { + if r := recover(); r != nil { + t.Errorf("Call to ConfigSpec for %s panicked: %v", tc.name, r) + } + }() + + spec := configSpecTestFn() if len(spec) == 0 { t.Errorf("expected remote.ConfigSpec for %T to return a valid hcldec.ObjectSpec, but return %v", tc.component, spec) } From b08070ccb01cd4046d70d24c6f393a6143dede2d Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Fri, 21 Apr 2023 14:36:30 -0400 Subject: [PATCH 038/105] Add recover to fail datasource test on cty panic --- rpc/common_test.go | 2 -- rpc/datasource_test.go | 6 ++++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/rpc/common_test.go b/rpc/common_test.go index 3dce764b4..12ffe0e7e 100644 --- a/rpc/common_test.go +++ b/rpc/common_test.go @@ -7,8 +7,6 @@ import ( packersdk "github.com/hashicorp/packer-plugin-sdk/packer" ) -var b testing.B - func TestCommonServer_ConfigSpec(t *testing.T) { tt := []struct { name string diff --git a/rpc/datasource_test.go b/rpc/datasource_test.go index bc98a2780..180adae2f 100644 --- a/rpc/datasource_test.go +++ b/rpc/datasource_test.go @@ -66,6 +66,12 @@ func TestDatasource(t *testing.T) { d.outputSpec = map[string]hcldec.Spec{ "foo": &hcldec.AttrSpec{Name: "foo", Type: cty.String, Required: false}, } + + defer func() { + if r := recover(); r != nil { + t.Errorf("Call to ConfigSpec for datasource panicked: %v", r) + } + }() spec := dsClient.OutputSpec() if !reflect.DeepEqual(spec, d.outputSpec) { t.Fatalf("unknown outputSpec value: %#v", spec) From a27f60a4df724e94685043ed8b15130466f3af4c Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Wed, 19 Apr 2023 17:40:17 -0400 Subject: [PATCH 039/105] communicator: don't set bastion cert if key is set When attempting to set the bastion key/certificate for authenticating with the bastion, we generally fallback to the ones defined by the SSH configuration. However, if the bastion SSH key is set, and not the certificate, but the SSH connection's are, since the conditions are separate, we end-up in a situation where the bastion's SSH key uses the one from the config, and the certificate fall backs to the one from the SSH connection. This in turn fails, as the certificate's public key matches the private key from the SSH connection, and not the bastion's. To avoid a situation like this, we only fallback to the SSH connection's certificate if the bastion's SSH key isn't set. --- communicator/config.go | 16 +- communicator/config_test.go | 364 ++++++++++++++++++++++++++++++++++-- 2 files changed, 360 insertions(+), 20 deletions(-) diff --git a/communicator/config.go b/communicator/config.go index 331104b3e..16b3eb498 100644 --- a/communicator/config.go +++ b/communicator/config.go @@ -496,6 +496,16 @@ func (c *Config) prepareSSH(ctx *interpolate.Context) []error { c.SSHKeepAliveInterval = 5 * time.Second } + // Validation + var errs []error + if c.SSHPrivateKeyFile == "" && c.SSHCertificateFile != "" { + errs = append(errs, fmt.Errorf("ssh_private_key_file must be specified if ssh_certificate_file is specified")) + } + + if c.SSHBastionPrivateKeyFile == "" && c.SSHBastionCertificateFile != "" { + errs = append(errs, fmt.Errorf("ssh_bastion_private_key_file must be specified if ssh_bastion_certificate_file is specified")) + } + if c.SSHBastionHost != "" { if c.SSHBastionPort == 0 { c.SSHBastionPort = 22 @@ -503,12 +513,8 @@ func (c *Config) prepareSSH(ctx *interpolate.Context) []error { if c.SSHBastionPrivateKeyFile == "" && c.SSHPrivateKeyFile != "" { c.SSHBastionPrivateKeyFile = c.SSHPrivateKeyFile - } - - if c.SSHBastionCertificateFile == "" && c.SSHCertificateFile != "" { c.SSHBastionCertificateFile = c.SSHCertificateFile } - } if c.SSHProxyHost != "" { @@ -526,8 +532,6 @@ func (c *Config) prepareSSH(ctx *interpolate.Context) []error { c.SSHTimeout = c.SSHWaitTimeout } - // Validation - var errs []error if c.SSHUsername == "" { errs = append(errs, errors.New("An ssh_username must be specified\n Note: some builders used to default ssh_username to \"root\".")) } diff --git a/communicator/config_test.go b/communicator/config_test.go index a6371592e..654515e14 100644 --- a/communicator/config_test.go +++ b/communicator/config_test.go @@ -4,12 +4,21 @@ package communicator import ( + "crypto/rand" + "crypto/rsa" + "crypto/x509" + "encoding/pem" + "fmt" + "os" "reflect" "testing" + "time" + "github.com/google/go-cmp/cmp" "github.com/hashicorp/packer-plugin-sdk/multistep" "github.com/hashicorp/packer-plugin-sdk/template/interpolate" "github.com/masterzen/winrm" + "golang.org/x/crypto/ssh" ) func testConfig() *Config { @@ -142,28 +151,355 @@ func TestConfig_winrm_use_ntlm(t *testing.T) { } -func TestSSHBastion(t *testing.T) { - c := &Config{ - Type: "ssh", - SSH: SSH{ - SSHUsername: "root", - SSHBastionHost: "mybastionhost.company.com", - SSHBastionPassword: "test", - }, +// generateSSHPrivateKey generates a new RSA SSH private key for use in tests +// +// It returns the path in which the key was created. +// Removing the key after testing is the caller's responsibility. +func generateSSHPrivateKey() (path string, signer ssh.Signer, err error) { + pk, err := rsa.GenerateKey(rand.Reader, 4096) + if err != nil { + err = fmt.Errorf("failed to generate key: %s", err) + return } - if err := c.Prepare(testContext(t)); len(err) > 0 { - t.Fatalf("bad: %#v", err) + sshKeyFile, err := os.CreateTemp("", "") + if err != nil { + err = fmt.Errorf("failed to open a temp file: %s", err) + return } - if c.SSHBastionCertificateFile != "" { - t.Fatalf("Identity certificate somehow set") + defer sshKeyFile.Close() + + path = sshKeyFile.Name() + + rawPkey := x509.MarshalPKCS1PrivateKey(pk) + + err = pem.Encode(sshKeyFile, &pem.Block{ + Type: "RSA PRIVATE KEY", + Bytes: rawPkey, + }) + if err != nil { + err = fmt.Errorf("failed to encode to PEM: %s", err) + return + } + + signer, err = ssh.NewSignerFromKey(pk) + if err != nil { + err = fmt.Errorf("failed to create SSH signer: %s", err) + return + } + + return +} + +// generateSSHKeys generates a new SSH key, the CA key and a cert linked to the SSH key for use in tests +// +// It returns the paths in which the keys and cert were created. +// Removing the keys and certs after testing is the caller's responsibility. +func generateSSHKeys() ( + privKeyPath string, + certKeyPath string, + certPath string, + err error, +) { + var sshPrivKey, certSSHKey ssh.Signer + + privKeyPath, sshPrivKey, err = generateSSHPrivateKey() + if err != nil { + err = fmt.Errorf("failed to generate private key: %s", err) + return + } + + certKeyPath, certSSHKey, err = generateSSHPrivateKey() + if err != nil { + err = fmt.Errorf("failed to generate CA private key: %s", err) + return + } + + cert := &ssh.Certificate{ + CertType: ssh.HostCert, + Key: sshPrivKey.PublicKey(), + ValidAfter: 0, + ValidBefore: ssh.CertTimeInfinity, + KeyId: "TestSSHCert", + ValidPrincipals: []string{"authority.example.com"}, } - if c.SSHPrivateKeyFile != "" { - t.Fatalf("Private key file somehow set") + certFile, err := os.CreateTemp("", "") + if err != nil { + err = fmt.Errorf("failed to create cert file: %s", err) + return } + defer certFile.Close() + certPath = certFile.Name() + + err = cert.SignCert(rand.Reader, certSSHKey) + if err != nil { + err = fmt.Errorf("failed to sign cert: %s", err) + return + } + + rawCert := ssh.MarshalAuthorizedKey(cert) + + _, err = certFile.Write(rawCert) + if err != nil { + err = fmt.Errorf("failed to write marshalled certificate: %s", err) + } + + return +} + +func TestSSHBastion(t *testing.T) { + privKeyPath, certKeyPath, certPath, err := generateSSHKeys() + if err != nil { + t.Fatalf("failed to generate SSH keys and certificates: %s", err) + } + + defer func() { + os.Remove(privKeyPath) + os.Remove(certKeyPath) + os.Remove(certPath) + }() + + t.Logf("generated private key (%q), CA key (%q), certificate (%q)", privKeyPath, certKeyPath, certPath) + + bastionPrivKeyPath, bastionCertKeyPath, bastionCertPath, err := generateSSHKeys() + if err != nil { + t.Fatalf("failed to generate bastion SSH keys and certificates: %s", err) + } + + defer func() { + os.Remove(bastionPrivKeyPath) + os.Remove(bastionCertKeyPath) + os.Remove(bastionCertPath) + }() + + t.Logf("generated bastion private key (%q), CA key (%q), certificate (%q)", bastionPrivKeyPath, bastionCertKeyPath, bastionCertPath) + + testcases := []struct { + name string + config *Config + expectedConfig *Config + expectError bool + }{ + { + "OK - with host and password", + &Config{ + Type: "ssh", + SSH: SSH{ + SSHUsername: "root", + SSHBastionHost: "mybastionhost.company.com", + SSHBastionPassword: "test", + }, + }, + &Config{ + Type: "ssh", + SSH: SSH{ + SSHUsername: "root", + SSHBastionHost: "mybastionhost.company.com", + SSHBastionPassword: "test", + SSHPort: 22, + SSHTimeout: time.Minute * 5, + SSHFileTransferMethod: "scp", + SSHKeepAliveInterval: time.Second * 5, + SSHHandshakeAttempts: 10, + SSHBastionPort: 22, + }, + }, + false, + }, + { + "OK - bastion config with bastion SSH private key", + &Config{ + Type: "ssh", + SSH: SSH{ + SSHUsername: "root", + SSHBastionHost: "my.bastion", + SSHBastionPrivateKeyFile: bastionPrivKeyPath, + }, + }, + &Config{ + Type: "ssh", + SSH: SSH{ + SSHUsername: "root", + SSHBastionHost: "my.bastion", + SSHBastionPrivateKeyFile: bastionPrivKeyPath, + SSHPort: 22, + SSHTimeout: time.Minute * 5, + SSHFileTransferMethod: "scp", + SSHKeepAliveInterval: time.Second * 5, + SSHHandshakeAttempts: 10, + SSHBastionPort: 22, + }, + }, + false, + }, + { + "OK - bastion config with SSH private key, bastion key should be the same as SSH key", + &Config{ + Type: "ssh", + SSH: SSH{ + SSHUsername: "root", + SSHBastionHost: "my.bastion", + SSHPrivateKeyFile: privKeyPath, + }, + }, + &Config{ + Type: "ssh", + SSH: SSH{ + SSHUsername: "root", + SSHBastionHost: "my.bastion", + SSHBastionPrivateKeyFile: privKeyPath, + SSHPort: 22, + SSHTimeout: time.Minute * 5, + SSHFileTransferMethod: "scp", + SSHKeepAliveInterval: time.Second * 5, + SSHHandshakeAttempts: 10, + SSHBastionPort: 22, + SSHPrivateKeyFile: privKeyPath, + }, + }, + false, + }, + { + "OK - bastion config with SSH private key and cert, bastion should have both set", + &Config{ + Type: "ssh", + SSH: SSH{ + SSHUsername: "root", + SSHBastionHost: "my.bastion", + SSHPrivateKeyFile: privKeyPath, + SSHCertificateFile: certPath, + }, + }, + &Config{ + Type: "ssh", + SSH: SSH{ + SSHUsername: "root", + SSHBastionHost: "my.bastion", + SSHBastionPrivateKeyFile: privKeyPath, + SSHBastionCertificateFile: certPath, + SSHPort: 22, + SSHTimeout: time.Minute * 5, + SSHFileTransferMethod: "scp", + SSHKeepAliveInterval: time.Second * 5, + SSHHandshakeAttempts: 10, + SSHBastionPort: 22, + SSHPrivateKeyFile: privKeyPath, + SSHCertificateFile: certPath, + }, + }, + false, + }, + { + "OK - bastion config with SSH private key and cert, and a bastion private key, bastion cert should not be set", + &Config{ + Type: "ssh", + SSH: SSH{ + SSHUsername: "root", + SSHBastionHost: "my.bastion", + SSHBastionPrivateKeyFile: bastionPrivKeyPath, + SSHPrivateKeyFile: privKeyPath, + SSHCertificateFile: certPath, + }, + }, + &Config{ + Type: "ssh", + SSH: SSH{ + SSHUsername: "root", + SSHBastionHost: "my.bastion", + SSHBastionPrivateKeyFile: bastionPrivKeyPath, + SSHPort: 22, + SSHTimeout: time.Minute * 5, + SSHFileTransferMethod: "scp", + SSHKeepAliveInterval: time.Second * 5, + SSHHandshakeAttempts: 10, + SSHBastionPort: 22, + SSHPrivateKeyFile: privKeyPath, + SSHCertificateFile: certPath, + }, + }, + false, + }, + { + "OK - bastion config with SSH private key and cert, and a bastion private key and cert", + &Config{ + Type: "ssh", + SSH: SSH{ + SSHUsername: "root", + SSHBastionHost: "my.bastion", + SSHBastionPrivateKeyFile: bastionPrivKeyPath, + SSHBastionCertificateFile: bastionCertPath, + SSHPrivateKeyFile: privKeyPath, + SSHCertificateFile: certPath, + }, + }, + &Config{ + Type: "ssh", + SSH: SSH{ + SSHUsername: "root", + SSHBastionHost: "my.bastion", + SSHBastionPrivateKeyFile: bastionPrivKeyPath, + SSHBastionCertificateFile: bastionCertPath, + SSHPort: 22, + SSHTimeout: time.Minute * 5, + SSHFileTransferMethod: "scp", + SSHKeepAliveInterval: time.Second * 5, + SSHHandshakeAttempts: 10, + SSHBastionPort: 22, + SSHPrivateKeyFile: privKeyPath, + SSHCertificateFile: certPath, + }, + }, + false, + }, + { + "Fail - ssh certificate file specified without an ssh private key file", + &Config{ + Type: "ssh", + SSH: SSH{ + SSHUsername: "root", + SSHCertificateFile: certPath, + }, + }, + nil, + true, + }, + { + "Fail - ssh bastion certificate file specified without an ssh bastion private key file", + &Config{ + Type: "ssh", + SSH: SSH{ + SSHUsername: "root", + SSHBastionCertificateFile: certPath, + }, + }, + nil, + true, + }, + } + + for _, tt := range testcases { + t.Run(tt.name, func(t *testing.T) { + errs := tt.config.Prepare(testContext(t)) + + for _, err := range errs { + t.Logf("%s", err) + } + if (len(errs) != 0) != tt.expectError { + t.Fatalf("Expected %t error, got %d", tt.expectError, len(errs)) + } + if tt.expectError { + return + } + + diff := cmp.Diff(tt.config, tt.expectedConfig) + if diff != "" { + t.Errorf(diff) + } + }) + } } func TestSSHConfigFunc_ciphers(t *testing.T) { From cb843aafc028c04700729b8cb6485aa6f4594ade Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Thu, 27 Apr 2023 13:43:32 -0400 Subject: [PATCH 040/105] Bump Go version to 1.20 * Remove module cache --- .github/workflows/go-test.yml | 44 +++-------------------------------- .github/workflows/release.yml | 2 +- go.mod | 2 +- 3 files changed, 5 insertions(+), 43 deletions(-) diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml index 0f6ef8bd4..ac013e679 100644 --- a/.github/workflows/go-test.yml +++ b/.github/workflows/go-test.yml @@ -16,7 +16,7 @@ jobs: strategy: matrix: go-version: - - 1.18 + - 1.20.3 permissions: id-token: write contents: read @@ -33,19 +33,6 @@ jobs: run: | mkdir -p ${{ env.TEST_RESULTS_PATH }}/packer-plugin-sdk - - name: Setup cache for go modules - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 - with: - path: | - ~/.cache/go-build - ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- - - - name: Download go modules - run: go mod download - - name: Run gofmt run: | make fmt-check @@ -76,7 +63,7 @@ jobs: strategy: matrix: go-version: - - 1.18 + - 1.20.3 permissions: id-token: write contents: read @@ -92,18 +79,6 @@ jobs: - name: Checkout code uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - - name: Setup cache for go modules - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 - with: - path: | - ~\AppData\Local\go-build - ~\go\pkg\mod - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- - - name: Download go modules - run: go mod download - - name: Install gotestsum shell: bash run: go install gotest.tools/gotestsum@v1.8.2 @@ -128,7 +103,7 @@ jobs: strategy: matrix: go-version: - - 1.18 + - 1.20.3 permissions: id-token: write contents: read @@ -145,19 +120,6 @@ jobs: run: | mkdir -p ${{ env.TEST_RESULTS_PATH }}/packer-plugin-sdk - - name: Setup cache for go modules - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 - with: - path: | - ~/.cache/go-build - ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- - - - name: Download go modules - run: go mod download - - name: Install gotestsum run: go install gotest.tools/gotestsum@v1.8.2 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 46a91a3dd..8a62e0bc7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,7 +16,7 @@ jobs: - name: Checkout uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - name: GoReleaser - uses: goreleaser/goreleaser-action@f82d6c1c344bcacabba2c841718984797f664a6b # v4.2.0 + uses: goreleaser/goreleaser-action@f82d6c1c344bcacabba2c841718984797f664a6b# v4.2.0 with: args: "release" env: diff --git a/go.mod b/go.mod index bf044f0f5..47ccf9584 100644 --- a/go.mod +++ b/go.mod @@ -116,4 +116,4 @@ require ( google.golang.org/protobuf v1.28.1 // indirect ) -go 1.18 +go 1.20 From 3028bde411afc22b71b1ae7d5d70915f3cb9abec Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Thu, 27 Apr 2023 13:58:45 -0400 Subject: [PATCH 041/105] Fix formatting generated with 1.20 --- bootcommand/boot_command.go | 23 +++++++++++------------ communicator/sshkey/algorithm_enumer.go | 1 - 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/bootcommand/boot_command.go b/bootcommand/boot_command.go index 940b8561e..79ac27134 100644 --- a/bootcommand/boot_command.go +++ b/bootcommand/boot_command.go @@ -897,18 +897,17 @@ func Entrypoint(ruleName string) Option { // // Example usage: // -// input := "input" -// stats := Stats{} -// _, err := Parse("input-file", []byte(input), Statistics(&stats, "no match")) -// if err != nil { -// log.Panicln(err) -// } -// b, err := json.MarshalIndent(stats.ChoiceAltCnt, "", " ") -// if err != nil { -// log.Panicln(err) -// } -// fmt.Println(string(b)) -// +// input := "input" +// stats := Stats{} +// _, err := Parse("input-file", []byte(input), Statistics(&stats, "no match")) +// if err != nil { +// log.Panicln(err) +// } +// b, err := json.MarshalIndent(stats.ChoiceAltCnt, "", " ") +// if err != nil { +// log.Panicln(err) +// } +// fmt.Println(string(b)) func Statistics(stats *Stats, choiceNoMatch string) Option { return func(p *parser) Option { oldStats := p.Stats diff --git a/communicator/sshkey/algorithm_enumer.go b/communicator/sshkey/algorithm_enumer.go index 1a300735b..2d95b10a1 100644 --- a/communicator/sshkey/algorithm_enumer.go +++ b/communicator/sshkey/algorithm_enumer.go @@ -1,6 +1,5 @@ // Code generated by "enumer -type Algorithm -transform snake"; DO NOT EDIT. -// package sshkey import ( From 097c92405e2e777d1d3a7d5be9ad43b5b315eba8 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Fri, 28 Apr 2023 13:41:03 -0400 Subject: [PATCH 042/105] ssh: improve debug logging When trying to figure out the exact behaviour of the ssh communicator when copying directories, I found myself wondering what each log was conveying. To make it clearer what's happening on each step, we add some more logs during the copy steps, and make the `creating directory' log a bit more explicit, so we understand what's happening. --- sdk-internals/communicator/ssh/communicator.go | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/sdk-internals/communicator/ssh/communicator.go b/sdk-internals/communicator/ssh/communicator.go index ed46dd89d..5dc682c47 100644 --- a/sdk-internals/communicator/ssh/communicator.go +++ b/sdk-internals/communicator/ssh/communicator.go @@ -526,8 +526,9 @@ func (c *comm) sftpUploadDirSession(dst string, src string, excl []string) error sftpFunc := func(client *sftp.Client) error { rootDst := dst if src[len(src)-1] != '/' { - log.Printf("[DEBUG] No trailing slash, creating the source directory name") - rootDst = filepath.Join(dst, filepath.Base(src)) + srcBase := filepath.Base(src) + log.Printf("[DEBUG] sftp: No trailing slash, creating directory %s/%s", dst, srcBase) + rootDst = filepath.Join(dst, srcBase) } walkFunc := func(path string, info os.FileInfo, err error) error { if err != nil { @@ -545,9 +546,12 @@ func (c *comm) sftpUploadDirSession(dst string, src string, excl []string) error // to the sftp server finalDst = filepath.ToSlash(finalDst) + log.Printf("[DEBUG] sftp: uploading %q to %q", relSrc, finalDst) + // Skip the creation of the target destination directory since // it should exist and we might not even own it if finalDst == dst { + log.Printf("[DEBUG] sftp: skipping creation of %q", dst) return nil } @@ -689,12 +693,13 @@ func (c *comm) scpUploadDirSession(dst string, src string, excl []string) error } if src[len(src)-1] != '/' { - log.Printf("[DEBUG] No trailing slash, creating the source directory name") + srcBase := filepath.Base(src) + log.Printf("[DEBUG] scp: No trailing slash, creating directory %s/%s", dst, srcBase) fi, err := os.Stat(src) if err != nil { return err } - return scpUploadDirProtocol(filepath.Base(src), w, r, uploadEntries, fi) + return scpUploadDirProtocol(srcBase, w, r, uploadEntries, fi) } else { // Trailing slash, so only upload the contents return uploadEntries() @@ -961,6 +966,8 @@ func scpUploadDirProtocol(name string, w io.Writer, r *bufio.Reader, f func() er } func scpUploadDir(root string, fs []os.FileInfo, w io.Writer, r *bufio.Reader) error { + log.Printf("[DEBUG] scp: uploading directory %s", root) + for _, fi := range fs { realPath := filepath.Join(root, fi.Name()) From 8331daf9a68be731b67b59621179cd3909458986 Mon Sep 17 00:00:00 2001 From: "hashicorp-copywrite[bot]" <110428419+hashicorp-copywrite[bot]@users.noreply.github.com> Date: Mon, 1 May 2023 16:31:28 +0000 Subject: [PATCH 043/105] [COMPLIANCE] Add Copyright and License Headers --- rpc/common_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rpc/common_test.go b/rpc/common_test.go index 12ffe0e7e..b4b508a88 100644 --- a/rpc/common_test.go +++ b/rpc/common_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package rpc import ( From 7c81952d41cce9a83a36127fd481cc5a83c6a8f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Thu, 25 May 2023 19:55:22 +0200 Subject: [PATCH 044/105] Fix menu boot command vnc key stroke (#184) * boot_command: add menu special key * Add menu special key * Add menu special key * vnc_driver: test menu key * vnc_driver: test menu key * Fix formatting generated with 1.20.3 --- bootcommand/boot_command.go | 44 ++++++++++++++++------------ bootcommand/boot_command.pigeon | 2 +- bootcommand/boot_command_ast_test.go | 3 +- bootcommand/vnc_driver_test.go | 4 ++- 4 files changed, 31 insertions(+), 22 deletions(-) diff --git a/bootcommand/boot_command.go b/bootcommand/boot_command.go index 79ac27134..5fbfeee66 100644 --- a/bootcommand/boot_command.go +++ b/bootcommand/boot_command.go @@ -611,14 +611,20 @@ var g = &grammar{ ignoreCase: true, want: "\"right\"i", }, + &litMatcher{ + pos: position{line: 71, col: 32, offset: 1699}, + val: "menu", + ignoreCase: true, + want: "\"menu\"i", + }, }, }, }, { name: "NonZeroDigit", - pos: position{line: 73, col: 1, offset: 1698}, + pos: position{line: 73, col: 1, offset: 1708}, expr: &charClassMatcher{ - pos: position{line: 73, col: 16, offset: 1713}, + pos: position{line: 73, col: 16, offset: 1723}, val: "[1-9]", ranges: []rune{'1', '9'}, ignoreCase: false, @@ -627,9 +633,9 @@ var g = &grammar{ }, { name: "Digit", - pos: position{line: 74, col: 1, offset: 1719}, + pos: position{line: 74, col: 1, offset: 1729}, expr: &charClassMatcher{ - pos: position{line: 74, col: 9, offset: 1727}, + pos: position{line: 74, col: 9, offset: 1737}, val: "[0-9]", ranges: []rune{'0', '9'}, ignoreCase: false, @@ -638,48 +644,48 @@ var g = &grammar{ }, { name: "TimeUnit", - pos: position{line: 75, col: 1, offset: 1733}, + pos: position{line: 75, col: 1, offset: 1743}, expr: &choiceExpr{ - pos: position{line: 75, col: 13, offset: 1745}, + pos: position{line: 75, col: 13, offset: 1755}, alternatives: []interface{}{ &litMatcher{ - pos: position{line: 75, col: 13, offset: 1745}, + pos: position{line: 75, col: 13, offset: 1755}, val: "ns", ignoreCase: false, want: "\"ns\"", }, &litMatcher{ - pos: position{line: 75, col: 20, offset: 1752}, + pos: position{line: 75, col: 20, offset: 1762}, val: "us", ignoreCase: false, want: "\"us\"", }, &litMatcher{ - pos: position{line: 75, col: 27, offset: 1759}, + pos: position{line: 75, col: 27, offset: 1769}, val: "µs", ignoreCase: false, want: "\"µs\"", }, &litMatcher{ - pos: position{line: 75, col: 34, offset: 1767}, + pos: position{line: 75, col: 34, offset: 1777}, val: "ms", ignoreCase: false, want: "\"ms\"", }, &litMatcher{ - pos: position{line: 75, col: 41, offset: 1774}, + pos: position{line: 75, col: 41, offset: 1784}, val: "s", ignoreCase: false, want: "\"s\"", }, &litMatcher{ - pos: position{line: 75, col: 47, offset: 1780}, + pos: position{line: 75, col: 47, offset: 1790}, val: "m", ignoreCase: false, want: "\"m\"", }, &litMatcher{ - pos: position{line: 75, col: 53, offset: 1786}, + pos: position{line: 75, col: 53, offset: 1796}, val: "h", ignoreCase: false, want: "\"h\"", @@ -690,11 +696,11 @@ var g = &grammar{ { name: "_", displayName: "\"whitespace\"", - pos: position{line: 77, col: 1, offset: 1792}, + pos: position{line: 77, col: 1, offset: 1802}, expr: &zeroOrMoreExpr{ - pos: position{line: 77, col: 19, offset: 1810}, + pos: position{line: 77, col: 19, offset: 1820}, expr: &charClassMatcher{ - pos: position{line: 77, col: 19, offset: 1810}, + pos: position{line: 77, col: 19, offset: 1820}, val: "[ \\n\\t\\r]", chars: []rune{' ', '\n', '\t', '\r'}, ignoreCase: false, @@ -704,11 +710,11 @@ var g = &grammar{ }, { name: "EOF", - pos: position{line: 79, col: 1, offset: 1822}, + pos: position{line: 79, col: 1, offset: 1832}, expr: ¬Expr{ - pos: position{line: 79, col: 8, offset: 1829}, + pos: position{line: 79, col: 8, offset: 1839}, expr: &anyMatcher{ - line: 79, col: 9, offset: 1830, + line: 79, col: 9, offset: 1840, }, }, }, diff --git a/bootcommand/boot_command.pigeon b/bootcommand/boot_command.pigeon index fdfbba0cf..982e8f98d 100644 --- a/bootcommand/boot_command.pigeon +++ b/bootcommand/boot_command.pigeon @@ -68,7 +68,7 @@ SpecialKey = "bs"i / "del"i / "enter"i / "esc"i / "f10"i / "f11"i / "f12"i / "return"i / "tab"i / "up"i / "down"i / "spacebar"i / "insert"i / "home"i / "end"i / "pageUp"i / "pageDown"i / "leftAlt"i / "leftCtrl"i / "leftShift"i / "rightAlt"i / "rightCtrl"i / "rightShift"i / "leftSuper"i / "rightSuper"i - / "left"i / "right"i + / "left"i / "right"i / "menu"i NonZeroDigit = [1-9] Digit = [0-9] diff --git a/bootcommand/boot_command_ast_test.go b/bootcommand/boot_command_ast_test.go index 21b6f44d2..fd2a4b4ec 100644 --- a/bootcommand/boot_command_ast_test.go +++ b/bootcommand/boot_command_ast_test.go @@ -15,7 +15,7 @@ func Test_parse(t *testing.T) { in := "" in += "foo/bar > one ç•Œ" in += " b" - in += "" + in += "" expected := []string{ "Wait<1s>", "Wait<20s>", @@ -51,6 +51,7 @@ func Test_parse(t *testing.T) { "Spec-Press(leftalt)", "Spec-Press(rightshift)", "Spec-Press(rightsuper)", + "Spec-Press(menu)", } seq, err := GenerateExpressionSequence(in) diff --git a/bootcommand/vnc_driver_test.go b/bootcommand/vnc_driver_test.go index bce40992e..64692424e 100644 --- a/bootcommand/vnc_driver_test.go +++ b/bootcommand/vnc_driver_test.go @@ -26,12 +26,14 @@ func (s *sender) KeyEvent(u uint32, down bool) error { } func Test_vncSpecialLookup(t *testing.T) { - in := "" + in := "" expected := []event{ {0xFFE2, true}, {0xFFE2, false}, {0xFFE2, false}, {0xFFE2, true}, + {0xFF67, true}, + {0xFF67, false}, } s := &sender{} d := NewVNCDriver(s, time.Duration(0)) From 0c09c89eef8f72a8c1182f2e2de26afdf14abaa6 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Mon, 24 Apr 2023 11:35:49 -0400 Subject: [PATCH 045/105] Add compile time check for go-cty In v1.11.0, the go-cty package dropped support for encoding/gob. Gob support is used by the SDK to serialize HCL2 object specs over the wire. If a plugin or Packer upgrades their version of zclconf/go-cty to one that does not contain Gob support the plugin will build but crash when trying to run a build on an HCL2 template. By adding this check, a consumer of the SDK will fail to compile if they are using an unsupported version of go-cty. This check is being added as a guard to prevent Packer SDK consumers from becoming out of sync with unsupported go-cty versions. ``` ~> go get github.com/hashicorp/go-cty v1.13.0 ~> make dev rpc/cty_encode.go:15:24 cannot use cty.Value{} (value of type cty.Value) as type gob.GobEncoder ``` --- rpc/cty_encode.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/rpc/cty_encode.go b/rpc/cty_encode.go index 429abc4db..175728e88 100644 --- a/rpc/cty_encode.go +++ b/rpc/cty_encode.go @@ -4,10 +4,16 @@ package rpc import ( + "encoding/gob" + "github.com/zclconf/go-cty/cty" "github.com/zclconf/go-cty/cty/json" ) +// Test that cty types implement the gob.GobEncoder interface. +// Support for encoding/gob was removed in github.com/zclconf/go-cty@v1.11.0. +var _ gob.GobEncoder = cty.Value{} + // cty.Value is does not know how to encode itself through the wire so we // transform it to bytes. func encodeCTYValues(config []interface{}) ([]interface{}, error) { From df9931387626d162f6d068bdce307841ab9f1c3c Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Wed, 14 Jun 2023 17:22:36 +0000 Subject: [PATCH 046/105] Move check into rpc/init * Add link to GitHub Issue --- rpc/cty_encode.go | 6 ------ rpc/init.go | 11 ++++++++++- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/rpc/cty_encode.go b/rpc/cty_encode.go index 175728e88..429abc4db 100644 --- a/rpc/cty_encode.go +++ b/rpc/cty_encode.go @@ -4,16 +4,10 @@ package rpc import ( - "encoding/gob" - "github.com/zclconf/go-cty/cty" "github.com/zclconf/go-cty/cty/json" ) -// Test that cty types implement the gob.GobEncoder interface. -// Support for encoding/gob was removed in github.com/zclconf/go-cty@v1.11.0. -var _ gob.GobEncoder = cty.Value{} - // cty.Value is does not know how to encode itself through the wire so we // transform it to bytes. func encodeCTYValues(config []interface{}) ([]interface{}, error) { diff --git a/rpc/init.go b/rpc/init.go index 6e8b49b85..23fe95a59 100644 --- a/rpc/init.go +++ b/rpc/init.go @@ -9,7 +9,16 @@ underpins the packer server that all plugins must implement. */ package rpc -import "encoding/gob" +import ( + "encoding/gob" + + "github.com/zclconf/go-cty/cty" +) + +// Test that cty types implement the gob.GobEncoder interface. +// Support for encoding/gob was removed in github.com/zclconf/go-cty@v1.11.0. +// Refer to issue https://github.com/hashicorp/packer-plugin-sdk/issues/187 +var _ gob.GobEncoder = cty.Value{} func init() { gob.Register(new(map[string]string)) From 2853bc046dfa20093f5576a51896b6388dd3bf7a Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Tue, 20 Jun 2023 14:35:33 -0400 Subject: [PATCH 047/105] Replace gitub.com/zclconf/go-cty@1.12.1 with fork github.com/nywilken/go-cty In an effort to provide Packer plugins access to the github.com/zclconf/go-cty enhancements, while still providing access to encoding/gob support the Packer team has forked the go-cty package under github.com/nywilken/go-cty. This is a temporary fork that will be removed once it is no longer needed. Refer to https://github.com/hashicorp/packer-plugin-sdk/issues/187 --- go.mod | 5 ++++- go.sum | 5 ++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 47ccf9584..da32e0bc4 100644 --- a/go.mod +++ b/go.mod @@ -1,5 +1,8 @@ module github.com/hashicorp/packer-plugin-sdk +// As described in https://github.com/hashicorp/packer-plugin-sdk/issues/187 +replace github.com/zclconf/go-cty => github.com/nywilken/go-cty v1.12.1 + require ( cloud.google.com/go v0.105.0 // indirect cloud.google.com/go/storage v1.27.0 // indirect @@ -62,7 +65,7 @@ require ( github.com/stretchr/testify v1.7.0 github.com/ugorji/go/codec v1.2.6 github.com/ulikunitz/xz v0.5.10 // indirect - github.com/zclconf/go-cty v1.10.0 + github.com/zclconf/go-cty v1.12.1 golang.org/x/crypto v0.0.0-20220517005047-85d78b3ac167 golang.org/x/mobile v0.0.0-20210901025245-1fde1d6c3ca1 golang.org/x/mod v0.8.0 diff --git a/go.sum b/go.sum index 648876534..5ae1c50e7 100644 --- a/go.sum +++ b/go.sum @@ -352,6 +352,8 @@ github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7P github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d h1:VhgPp6v9qf9Agr/56bj7Y/xa04UccTW04VP0Qed4vnQ= github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d/go.mod h1:YUTz3bUH2ZwIWBy3CJBeOBEugqcmXREj14T+iG/4k4U= +github.com/nywilken/go-cty v1.12.1 h1:4dEeVqhsX1RVfdLgu3CIMeft4ELm9qygMk7/kcpnfCs= +github.com/nywilken/go-cty v1.12.1/go.mod h1:jQhMnBcOB2DrBaV2awY4z+oSZTPc2dnnwGqYqFo86G0= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -435,8 +437,6 @@ github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4= github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/zclconf/go-cty v1.10.0 h1:mp9ZXQeIcN8kAwuqorjH+Q+njbJKjLrvB2yIh4q7U+0= -github.com/zclconf/go-cty v1.10.0/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= @@ -549,7 +549,6 @@ golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= From 8c4e43c59676825b9e9937ea43e22411a1b9c25e Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Tue, 20 Jun 2023 14:46:35 -0400 Subject: [PATCH 048/105] Bump github.com/hashicorp/hcl/v2 to v2.16.2 This commit updates github.com/hashicorp/hcl/v2 to the last known release of HCL/v2 that does not rely on v1.13.0 of github.com/zclconf/go-cty. --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index da32e0bc4..14b289f69 100644 --- a/go.mod +++ b/go.mod @@ -40,7 +40,7 @@ require ( github.com/hashicorp/go-retryablehttp v0.7.0 // indirect github.com/hashicorp/go-version v1.6.0 github.com/hashicorp/golang-lru v0.5.4 // indirect - github.com/hashicorp/hcl/v2 v2.13.0 + github.com/hashicorp/hcl/v2 v2.16.2 github.com/hashicorp/vault/api v1.1.1 github.com/hashicorp/yamux v0.0.0-20210826001029-26ff87cf9493 github.com/imdario/mergo v0.3.12 // indirect diff --git a/go.sum b/go.sum index 5ae1c50e7..1b95da008 100644 --- a/go.sum +++ b/go.sum @@ -246,8 +246,8 @@ github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+l github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hashicorp/hcl/v2 v2.13.0 h1:0Apadu1w6M11dyGFxWnmhhcMjkbAiKCv7G1r/2QgCNc= -github.com/hashicorp/hcl/v2 v2.13.0/go.mod h1:e4z5nxYlWNPdDSNYX+ph14EvWYMFm3eP0zIUqPc2jr0= +github.com/hashicorp/hcl/v2 v2.16.2 h1:mpkHZh/Tv+xet3sy3F9Ld4FyI2tUpWe9x3XtPx9f1a0= +github.com/hashicorp/hcl/v2 v2.16.2/go.mod h1:JRmR89jycNkrrqnMmvPDMd56n1rQJ2Q6KocSLCMCXng= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.1/go.mod h1:4gW7WsVCke5TE7EPeYliwHlRUyBtfCwuFwuMg2DmyNY= github.com/hashicorp/memberlist v0.2.2 h1:5+RffWKwqJ71YPu9mWsF7ZOscZmwfasdA8kbdC7AO2g= From 5e4aae7b4e2d04687937b17f87661748fa01c0ba Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Tue, 20 Jun 2023 14:41:43 -0400 Subject: [PATCH 049/105] Fix buildtags ``` ~> go fix ./... filelock/filelock.go: fixed buildtag multistep/commonsteps/iso_config_test.go: fixed buildtag packer/cache_config_unix.go: fixed buildtag packer/cache_config_unix_test.go: fixed buildtag packer/cache_config_windows.go: fixed buildtag packer/cache_config_windows_test.go: fixed buildtag pathing/config_file_unix.go: fixed buildtag pathing/config_file_unix_test.go: fixed buildtag pathing/config_file_windows.go: fixed buildtag pathing/config_file_windows_test.go: fixed buildtag sdk-internals/communicator/ssh/communicator_test.go: fixed buildtag template/parse_test.go: fixed buildtag ``` --- filelock/filelock.go | 1 - multistep/commonsteps/iso_config_test.go | 1 - packer/cache_config_unix.go | 1 - packer/cache_config_unix_test.go | 1 - packer/cache_config_windows.go | 1 - packer/cache_config_windows_test.go | 1 - pathing/config_file_unix.go | 1 - pathing/config_file_unix_test.go | 1 - pathing/config_file_windows.go | 1 - pathing/config_file_windows_test.go | 1 - sdk-internals/communicator/ssh/communicator_test.go | 1 - template/parse_test.go | 1 - 12 files changed, 12 deletions(-) diff --git a/filelock/filelock.go b/filelock/filelock.go index d24978325..e3e6d8363 100644 --- a/filelock/filelock.go +++ b/filelock/filelock.go @@ -2,7 +2,6 @@ // SPDX-License-Identifier: MPL-2.0 //go:build !solaris -// +build !solaris package filelock diff --git a/multistep/commonsteps/iso_config_test.go b/multistep/commonsteps/iso_config_test.go index c2d0489bf..3dae752ed 100644 --- a/multistep/commonsteps/iso_config_test.go +++ b/multistep/commonsteps/iso_config_test.go @@ -2,7 +2,6 @@ // SPDX-License-Identifier: MPL-2.0 //go:build !windows -// +build !windows package commonsteps diff --git a/packer/cache_config_unix.go b/packer/cache_config_unix.go index f61fad677..4037c9588 100644 --- a/packer/cache_config_unix.go +++ b/packer/cache_config_unix.go @@ -2,7 +2,6 @@ // SPDX-License-Identifier: MPL-2.0 //go:build darwin || freebsd || linux || netbsd || openbsd || solaris -// +build darwin freebsd linux netbsd openbsd solaris package packer diff --git a/packer/cache_config_unix_test.go b/packer/cache_config_unix_test.go index fa6841173..df75e951d 100644 --- a/packer/cache_config_unix_test.go +++ b/packer/cache_config_unix_test.go @@ -2,7 +2,6 @@ // SPDX-License-Identifier: MPL-2.0 //go:build darwin || freebsd || linux || netbsd || openbsd || solaris -// +build darwin freebsd linux netbsd openbsd solaris package packer diff --git a/packer/cache_config_windows.go b/packer/cache_config_windows.go index 666ce7b3a..d0d031fc8 100644 --- a/packer/cache_config_windows.go +++ b/packer/cache_config_windows.go @@ -2,7 +2,6 @@ // SPDX-License-Identifier: MPL-2.0 //go:build windows -// +build windows package packer diff --git a/packer/cache_config_windows_test.go b/packer/cache_config_windows_test.go index 7dbbb608b..585f2ce93 100644 --- a/packer/cache_config_windows_test.go +++ b/packer/cache_config_windows_test.go @@ -2,7 +2,6 @@ // SPDX-License-Identifier: MPL-2.0 //go:build windows -// +build windows package packer diff --git a/pathing/config_file_unix.go b/pathing/config_file_unix.go index b3b5276de..fcdb458d0 100644 --- a/pathing/config_file_unix.go +++ b/pathing/config_file_unix.go @@ -2,7 +2,6 @@ // SPDX-License-Identifier: MPL-2.0 //go:build darwin || freebsd || linux || netbsd || openbsd || solaris -// +build darwin freebsd linux netbsd openbsd solaris package pathing diff --git a/pathing/config_file_unix_test.go b/pathing/config_file_unix_test.go index 1726c5b91..13b44081f 100644 --- a/pathing/config_file_unix_test.go +++ b/pathing/config_file_unix_test.go @@ -2,7 +2,6 @@ // SPDX-License-Identifier: MPL-2.0 //go:build darwin || freebsd || linux || netbsd || openbsd || solaris -// +build darwin freebsd linux netbsd openbsd solaris package pathing diff --git a/pathing/config_file_windows.go b/pathing/config_file_windows.go index 1c2eff10c..62b01f45f 100644 --- a/pathing/config_file_windows.go +++ b/pathing/config_file_windows.go @@ -2,7 +2,6 @@ // SPDX-License-Identifier: MPL-2.0 //go:build windows -// +build windows package pathing diff --git a/pathing/config_file_windows_test.go b/pathing/config_file_windows_test.go index d92d24612..81c44da5c 100644 --- a/pathing/config_file_windows_test.go +++ b/pathing/config_file_windows_test.go @@ -2,7 +2,6 @@ // SPDX-License-Identifier: MPL-2.0 //go:build windows -// +build windows package pathing diff --git a/sdk-internals/communicator/ssh/communicator_test.go b/sdk-internals/communicator/ssh/communicator_test.go index 11d0077c5..059f486ca 100644 --- a/sdk-internals/communicator/ssh/communicator_test.go +++ b/sdk-internals/communicator/ssh/communicator_test.go @@ -2,7 +2,6 @@ // SPDX-License-Identifier: MPL-2.0 //go:build !race -// +build !race package ssh diff --git a/template/parse_test.go b/template/parse_test.go index b5a44c966..f79ca665d 100644 --- a/template/parse_test.go +++ b/template/parse_test.go @@ -2,7 +2,6 @@ // SPDX-License-Identifier: MPL-2.0 //go:build !windows -// +build !windows package template From af18c71b82348bb26a7fc6b7764f6cda7c4ccd99 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Wed, 21 Jun 2023 21:02:16 -0400 Subject: [PATCH 050/105] Reset Go to version 1.18 in module file --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 14b289f69..d42f13c9a 100644 --- a/go.mod +++ b/go.mod @@ -119,4 +119,4 @@ require ( google.golang.org/protobuf v1.28.1 // indirect ) -go 1.20 +go 1.18 From 2a6d85241c3d4a7bfaca8e0468ae3e416cf1f560 Mon Sep 17 00:00:00 2001 From: Nikolay Edigaryev Date: Thu, 6 Jul 2023 18:53:59 +0400 Subject: [PATCH 051/105] Remove extra backticks from HTTP server documentation (#191) * Remove extra backticks from HTTP server documentation * $ make generate --- .../packer-plugin-sdk/multistep/commonsteps/HTTPConfig.mdx | 4 +++- multistep/commonsteps/http_config.go | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/cmd/packer-sdc/internal/renderdocs/docs-partials/packer-plugin-sdk/multistep/commonsteps/HTTPConfig.mdx b/cmd/packer-sdc/internal/renderdocs/docs-partials/packer-plugin-sdk/multistep/commonsteps/HTTPConfig.mdx index 169be88ef..0e09e80ac 100644 --- a/cmd/packer-sdc/internal/renderdocs/docs-partials/packer-plugin-sdk/multistep/commonsteps/HTTPConfig.mdx +++ b/cmd/packer-sdc/internal/renderdocs/docs-partials/packer-plugin-sdk/multistep/commonsteps/HTTPConfig.mdx @@ -6,6 +6,8 @@ referenced will be available in your builder. Example usage from a builder: - `wget http://{{ .HTTPIP }}:{{ .HTTPPort }}/foo/bar/preseed.cfg` +``` +wget http://{{ .HTTPIP }}:{{ .HTTPPort }}/foo/bar/preseed.cfg +``` diff --git a/multistep/commonsteps/http_config.go b/multistep/commonsteps/http_config.go index 0f5d68ace..c5577f370 100644 --- a/multistep/commonsteps/http_config.go +++ b/multistep/commonsteps/http_config.go @@ -17,7 +17,9 @@ import ( // // Example usage from a builder: // -// `wget http://{{ .HTTPIP }}:{{ .HTTPPort }}/foo/bar/preseed.cfg` +// ``` +// wget http://{{ .HTTPIP }}:{{ .HTTPPort }}/foo/bar/preseed.cfg +// ``` type HTTPConfig struct { // Path to a directory to serve using an HTTP server. The files in this // directory will be available over HTTP that will be requestable from the From 7d3a4b2b55e5fc2f22df8baedd2c179862c81bfe Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Fri, 14 Jul 2023 13:13:48 -0400 Subject: [PATCH 052/105] [HPR-1190] Add `packer-sdc fix` command (#190) * packer-sdc: Add fix sub-command Fix rewrites parts of the plugin codebase to address known issues or common workarounds used within plugins consuming the Packer plugin SDK. ``` ~> ./packer-sdc fix -check ../../../packer-plugin-tencentcloud Found the working directory /Users/wilken/Development/linux-dev/packer-plugin-tencentcloud gocty Unfixed! ``` * Update fix command This change is major refactor of the fix command, and it's underlying fixer interface. This change adds support for the `-diff` flag which displays the diff between the unfixed and fixed files, if available. Along with the refactor the ability to apply multiple fixes to the same file without potential write conflicts where previous changes were removed after reprocessing. * Add a scan function that returns a list of files to apply a fix on to provide flexibility in the future for collecting a list of files. * Replace cmp.Diff with github.com/pkg/diff for better file diffs * Return error when missing directory argument * Add error handling when trying to read any scanned files --- cmd/packer-sdc/README.md | 1 + cmd/packer-sdc/internal/fix/README.md | 16 ++ cmd/packer-sdc/internal/fix/cmd.go | 158 ++++++++++++++++++ cmd/packer-sdc/internal/fix/fix.go | 27 +++ cmd/packer-sdc/internal/fix/gocty.go | 114 +++++++++++++ cmd/packer-sdc/internal/fix/gocty_test.go | 156 +++++++++++++++++ .../internal/fix/testdata/empty/go.mod | 3 + .../internal/fix/testdata/fixed/basic/go.mod | 11 ++ .../fix/testdata/fixed/many-replace/go.mod | 13 ++ .../internal/fix/testdata/invalid/go.mod | 11 ++ .../fix/testdata/missing-requires/both/go.mod | 18 ++ .../testdata/missing-requires/go-cty/go.mod | 19 +++ .../missing-requires/packer-plugin-sdk/go.mod | 19 +++ .../fix/testdata/unfixed/basic/fixed.go.mod | 11 ++ .../fix/testdata/unfixed/basic/go.mod | 9 + .../unfixed/many-replace/fixed.go.mod | 13 ++ .../fix/testdata/unfixed/many-replace/go.mod | 11 ++ .../fix/testdata/unfixed/version/fixed.go.mod | 11 ++ .../fix/testdata/unfixed/version/go.mod | 11 ++ cmd/packer-sdc/main.go | 4 + go.mod | 1 + go.sum | 2 + 22 files changed, 639 insertions(+) create mode 100644 cmd/packer-sdc/internal/fix/README.md create mode 100644 cmd/packer-sdc/internal/fix/cmd.go create mode 100644 cmd/packer-sdc/internal/fix/fix.go create mode 100644 cmd/packer-sdc/internal/fix/gocty.go create mode 100644 cmd/packer-sdc/internal/fix/gocty_test.go create mode 100644 cmd/packer-sdc/internal/fix/testdata/empty/go.mod create mode 100644 cmd/packer-sdc/internal/fix/testdata/fixed/basic/go.mod create mode 100644 cmd/packer-sdc/internal/fix/testdata/fixed/many-replace/go.mod create mode 100644 cmd/packer-sdc/internal/fix/testdata/invalid/go.mod create mode 100644 cmd/packer-sdc/internal/fix/testdata/missing-requires/both/go.mod create mode 100644 cmd/packer-sdc/internal/fix/testdata/missing-requires/go-cty/go.mod create mode 100644 cmd/packer-sdc/internal/fix/testdata/missing-requires/packer-plugin-sdk/go.mod create mode 100644 cmd/packer-sdc/internal/fix/testdata/unfixed/basic/fixed.go.mod create mode 100644 cmd/packer-sdc/internal/fix/testdata/unfixed/basic/go.mod create mode 100644 cmd/packer-sdc/internal/fix/testdata/unfixed/many-replace/fixed.go.mod create mode 100644 cmd/packer-sdc/internal/fix/testdata/unfixed/many-replace/go.mod create mode 100644 cmd/packer-sdc/internal/fix/testdata/unfixed/version/fixed.go.mod create mode 100644 cmd/packer-sdc/internal/fix/testdata/unfixed/version/go.mod diff --git a/cmd/packer-sdc/README.md b/cmd/packer-sdc/README.md index 5140e950f..381bcd9b4 100644 --- a/cmd/packer-sdc/README.md +++ b/cmd/packer-sdc/README.md @@ -19,3 +19,4 @@ specific help commands: * `packer-sdc plugin-check -h` * `packer-sdc struct-markdown -h` * `packer-sdc renderdocs -h` +* `packer-sdc fix -h` diff --git a/cmd/packer-sdc/internal/fix/README.md b/cmd/packer-sdc/internal/fix/README.md new file mode 100644 index 000000000..a1ecb208e --- /dev/null +++ b/cmd/packer-sdc/internal/fix/README.md @@ -0,0 +1,16 @@ +## `packer-sdc fix` + +Fix rewrites parts of the plugin codebase to address known issues or common workarounds used within plugins consuming the Packer plugin SDK. + +Options: + + -diff If the -diff flag is set, no files are rewritten. Instead, fix prints the differences a rewrite would introduce. + +Available Fixes: + + gocty Adds a replace directive for github.com/zclconf/go-cty to github.com/nywilken/go-cty + + +### Related Issues +Use `packer-sdc fix` to resolve the [cty.Value does not implement gob.GobEncoder](https://github.com/hashicorp/packer-plugin-sdk/issues/187) + diff --git a/cmd/packer-sdc/internal/fix/cmd.go b/cmd/packer-sdc/internal/fix/cmd.go new file mode 100644 index 000000000..d1bc6ef6d --- /dev/null +++ b/cmd/packer-sdc/internal/fix/cmd.go @@ -0,0 +1,158 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package fix + +import ( + "bytes" + "errors" + "flag" + "fmt" + "os" + "path/filepath" + "strings" + + "github.com/pkg/diff" +) + +const cmdPrefix string = "fix" + +// Command is the base entry for the fix sub-command. +type Command struct { + Dir string + Diff bool +} + +// Flags contain the default flags for the fix sub-command. +func (cmd *Command) Flags() *flag.FlagSet { + fs := flag.NewFlagSet(cmdPrefix, flag.ExitOnError) + fs.BoolVar(&cmd.Diff, "diff", false, "if set prints the differences a rewrite would introduce.") + return fs +} + +// Help displays usage for the command. +func (cmd *Command) Help() string { + var s strings.Builder + for _, fix := range availableFixes { + s.WriteString(fmt.Sprintf(" %s\t\t%s\n", fix.name, fix.description)) + } + + helpText := ` +Usage: packer-sdc fix [options] directory + + Fix rewrites parts of the plugin codebase to address known issues or + common workarounds used within plugins consuming the Packer plugin SDK. + +Options: + -diff If the -diff flag is set fix prints the differences an applied fix would introduce. + +Available fixes: +%s` + return fmt.Sprintf(helpText, s.String()) +} + +// Run executes the command +func (cmd *Command) Run(args []string) int { + if err := cmd.run(args); err != nil { + fmt.Printf("%v", err) + return 1 + } + return 0 +} + +func (cmd *Command) run(args []string) error { + f := cmd.Flags() + err := f.Parse(args) + if err != nil { + return errors.New("unable to parse flags for fix command") + } + + if f.NArg() != 1 { + err := fmt.Errorf("packer-sdc fix: missing directory argument\n%s", cmd.Help()) + return err + } + + dir := f.Arg(0) + if dir == "." || dir == "./..." { + dir, _ = os.Getwd() + } + + info, err := os.Stat(dir) + if err != nil && os.IsNotExist(err) { + return errors.New("a plugin root directory must be specified or a dot for the current directory") + } + + if !info.IsDir() { + return errors.New("a plugin root directory must be specified or a dot for the current directory") + } + + dir, err = filepath.Abs(dir) + if err != nil { + return errors.New("unable to determine the absolute path for the provided plugin root directory") + } + cmd.Dir = dir + + return processFiles(cmd.Dir, cmd.Diff) +} + +func (cmd *Command) Synopsis() string { + return "Rewrites parts of the plugin codebase to address known issues or common workarounds within plugins consuming the Packer plugin SDK." +} + +func processFiles(rootDir string, showDiff bool) error { + srcFiles := make(map[string][]byte) + fixedFiles := make(map[string][]byte) + + var hasErrors error + for _, f := range availableFixes { + matches, err := f.scan(rootDir) + if err != nil { + return fmt.Errorf("failed to apply %s fix: %s", f.name, err) + } + + //matches contains all files to apply the said fix on + for _, filename := range matches { + if _, ok := srcFiles[filename]; !ok { + bs, err := os.ReadFile(filename) + if err != nil { + hasErrors = errors.Join(hasErrors, err) + } + srcFiles[filename] = bytes.Clone(bs) + } + + fixedData, ok := fixedFiles[filename] + if !ok { + fixedData = bytes.Clone(srcFiles[filename]) + } + + fixedData, err := f.fix(filename, fixedData) + if err != nil { + hasErrors = errors.Join(hasErrors, err) + continue + } + if bytes.Equal(fixedData, srcFiles[filename]) { + continue + } + fixedFiles[filename] = bytes.Clone(fixedData) + } + } + + if hasErrors != nil { + return hasErrors + } + + if showDiff { + for filename, fixedData := range fixedFiles { + diff.Text(filename, filename+"fixed", string(srcFiles[filename]), string(fixedData), os.Stdout) + } + return nil + } + + for filename, fixedData := range fixedFiles { + fmt.Println(filename) + info, _ := os.Stat(filename) + os.WriteFile(filename, fixedData, info.Mode()) + } + + return nil +} diff --git a/cmd/packer-sdc/internal/fix/fix.go b/cmd/packer-sdc/internal/fix/fix.go new file mode 100644 index 000000000..c1dede85b --- /dev/null +++ b/cmd/packer-sdc/internal/fix/fix.go @@ -0,0 +1,27 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package fix + +// Fixer applies all defined fixes on a plugin dir; a Fixer should be idempotent. +// The caller of any fix is responsible for checking if the file context have changed. +type fixer interface { + fix(filename string, data []byte) ([]byte, error) +} + +type fix struct { + name, description string + scan func(dir string) ([]string, error) + fixer +} + +var ( + // availableFixes to apply to a plugin - refer to init func + availableFixes []fix +) + +func init() { + availableFixes = []fix{ + goctyFix, + } +} diff --git a/cmd/packer-sdc/internal/fix/gocty.go b/cmd/packer-sdc/internal/fix/gocty.go new file mode 100644 index 000000000..8bd4507a8 --- /dev/null +++ b/cmd/packer-sdc/internal/fix/gocty.go @@ -0,0 +1,114 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package fix + +import ( + "fmt" + "os" + "path" + + "golang.org/x/mod/modfile" +) + +const ( + sdkPath string = "github.com/hashicorp/packer-plugin-sdk" + oldPath string = "github.com/zclconf/go-cty" + newPath string = "github.com/nywilken/go-cty" + newVersion string = "1.12.1" + modFilename string = "go.mod" +) + +var goctyFix = fix{ + name: "gocty", + description: "Adds a replace directive for github.com/zclconf/go-cty to github.com/nywilken/go-cty", + scan: modPaths, + fixer: goCtyFix{ + OldPath: oldPath, + NewPath: newPath, + NewVersion: newVersion, + }, +} + +// modPaths scans the incoming dir for potential go.mod files to fix. +func modPaths(dir string) ([]string, error) { + paths := []string{ + path.Join(dir, modFilename), + } + return paths, nil + +} + +type goCtyFix struct { + OldPath, NewPath, NewVersion string +} + +func (f goCtyFix) modFileFormattedVersion() string { + return fmt.Sprintf("v%s", f.NewVersion) +} + +// Fix applies a replace directive in a projects go.mod file for f.OldPath to f.NewPath. +// This fix applies to the replacement of github.com/zclconf/go-cty, as described in https://github.com/hashicorp/packer-plugin-sdk/issues/187 +// The return data contains the data file with the applied fix. In cases where the fix is already applied or not needed the original data is returned. +func (f goCtyFix) fix(modFilePath string, data []byte) ([]byte, error) { + if _, err := os.Stat(modFilePath); err != nil { + return nil, fmt.Errorf("failed to find go.mod file %s", modFilePath) + } + + mf, err := modfile.Parse(modFilePath, data, nil) + if err != nil { + return nil, fmt.Errorf("%s: failed to parse go.mod file: %v", modFilePath, err) + } + + // fix doesn't apply to go.mod with no module dependencies + if len(mf.Require) == 0 { + return data, nil + } + + var requiresSDK, requiresGoCty bool + for _, req := range mf.Require { + if req.Mod.Path == sdkPath { + requiresSDK = true + } + if req.Mod.Path == f.OldPath { + requiresGoCty = true + } + + if requiresSDK && requiresGoCty { + break + } + } + + if !(requiresSDK && requiresGoCty) { + return data, nil + } + + for _, r := range mf.Replace { + if r.Old.Path != f.OldPath { + continue + } + + if r.New.Path != f.NewPath { + return nil, fmt.Errorf("%s: found unexpected replace for %s", modFilePath, r.Old.Path) + } + + if r.New.Version == f.modFileFormattedVersion() { + return data, nil + } + } + + if err := mf.DropReplace(f.OldPath, ""); err != nil { + return nil, fmt.Errorf("%s: failed to drop previously added replacement fix %v", modFilePath, err) + } + + commentSuffix := " // added by packer-sdc fix as noted in github.com/hashicorp/packer-plugin-sdk/issues/187" + if err := mf.AddReplace(f.OldPath, "", f.NewPath, f.modFileFormattedVersion()+commentSuffix); err != nil { + return nil, fmt.Errorf("%s: failed to apply go-cty fix: %v", modFilePath, err) + } + + newData, err := mf.Format() + if err != nil { + return nil, err + } + return newData, nil +} diff --git a/cmd/packer-sdc/internal/fix/gocty_test.go b/cmd/packer-sdc/internal/fix/gocty_test.go new file mode 100644 index 000000000..132898edb --- /dev/null +++ b/cmd/packer-sdc/internal/fix/gocty_test.go @@ -0,0 +1,156 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package fix + +import ( + "os" + "path/filepath" + "testing" + + "github.com/google/go-cmp/cmp" +) + +func copyToTempFile(t testing.TB, data []byte) string { + t.Helper() + dir := t.TempDir() + fn := filepath.Join(dir, "go.mod") + err := os.WriteFile(fn, data, os.ModePerm) + if err != nil { + t.Fatalf("Failed to create test mod file: %s", err) + } + return dir +} + +func goctyTestFixer() goCtyFix { + return goCtyFix{ + OldPath: oldPath, + NewPath: newPath, + NewVersion: newVersion, + } +} + +func TestFixGoCty_FixNotNeeded(t *testing.T) { + tt := []struct { + name string + fixtureDir string + }{ + { + name: "empty mod file", + fixtureDir: filepath.Join("testdata", "empty"), + }, + { + name: "no requires for go-cty or packer-plugin-sdk modules", + fixtureDir: filepath.Join("testdata", "missing-requires", "both"), + }, + { + name: "no go-cty module dependency", + fixtureDir: filepath.Join("testdata", "missing-requires", "go-cty"), + }, + { + name: "no packer-plugin-sdk module dependency", + fixtureDir: filepath.Join("testdata", "missing-requires", "packer-plugin-sdk"), + }, + { + name: "previously fixed mod file", + fixtureDir: filepath.Join("testdata", "fixed", "basic"), + }, + { + name: "fixed mod file with other replace directives", + fixtureDir: filepath.Join("testdata", "fixed", "many-replace"), + }, + } + for _, tc := range tt { + t.Run(tc.name, func(t *testing.T) { + testFixer := goctyTestFixer() + testFixtureDir := tc.fixtureDir + expectedFn := filepath.Join(testFixtureDir, modFilename) + expected, err := os.ReadFile(expectedFn) + if err != nil { + t.Fatalf("failed while reading text fixture: %s", err) + } + + outFileDir := copyToTempFile(t, expected) + outFileFn := filepath.Join(outFileDir, "go.mod") + fixed, err := testFixer.fix(outFileFn, expected) + if err != nil { + t.Fatalf("expected fix to not err but it did: %v", err) + } + + if diff := cmp.Diff(expected, fixed); diff != "" { + t.Errorf("expected no differences but got %q", diff) + } + + }) + } +} + +func TestFixGoCty_Unfixed(t *testing.T) { + tt := []struct { + name string + versionStr string + fixtureDir string + }{ + { + name: "basic unfixed mod file", + fixtureDir: filepath.Join("testdata", "unfixed", "basic"), + }, + { + name: "unfixed mod file with other replace directives", + fixtureDir: filepath.Join("testdata", "unfixed", "many-replace"), + }, + { + name: "out of date fix", + versionStr: "1.13.1", + fixtureDir: filepath.Join("testdata", "unfixed", "version"), + }, + } + for _, tc := range tt { + t.Run(tc.name, func(t *testing.T) { + testFixer := goctyTestFixer() + if tc.versionStr != "" { + testFixer.NewVersion = tc.versionStr + } + testFixtureDir := tc.fixtureDir + unfixedFn := filepath.Join(testFixtureDir, "go.mod") + unfixed, err := os.ReadFile(unfixedFn) + if err != nil { + t.Fatalf("failed while reading text fixture: %s", err) + } + + outFileDir := copyToTempFile(t, unfixed) + outFileFn := filepath.Join(outFileDir, modFilename) + fixed, err := testFixer.fix(outFileFn, unfixed) + if err != nil { + t.Fatalf("expected fix to not err but it did: %v", err) + } + + expectedFn := filepath.Join(testFixtureDir, "fixed.go.mod") + expected, err := os.ReadFile(expectedFn) + if err != nil { + t.Fatalf("failed while reading text fixture: %s", err) + } + + if diff := cmp.Diff(expected, fixed); diff != "" { + t.Errorf("expected differences but got %q", diff) + } + + }) + } +} + +func TestFixGoCty_InvalidReplacePath(t *testing.T) { + testFixer := goctyTestFixer() + testFixtureDir := filepath.Join("testdata", "invalid") + expectedFn := filepath.Join(testFixtureDir, modFilename) + expected, err := os.ReadFile(expectedFn) + if err != nil { + t.Fatalf("failed while reading text fixture: %s", err) + } + + outFileDir := copyToTempFile(t, expected) + outFileFn := filepath.Join(outFileDir, modFilename) + if _, err := testFixer.fix(outFileFn, expected); err == nil { + t.Fatalf("expected fix to err but it didn't: %v", err) + } +} diff --git a/cmd/packer-sdc/internal/fix/testdata/empty/go.mod b/cmd/packer-sdc/internal/fix/testdata/empty/go.mod new file mode 100644 index 000000000..c364a0d1b --- /dev/null +++ b/cmd/packer-sdc/internal/fix/testdata/empty/go.mod @@ -0,0 +1,3 @@ +module github.com/hashicorp/example + +go 1.20 diff --git a/cmd/packer-sdc/internal/fix/testdata/fixed/basic/go.mod b/cmd/packer-sdc/internal/fix/testdata/fixed/basic/go.mod new file mode 100644 index 000000000..4247f0444 --- /dev/null +++ b/cmd/packer-sdc/internal/fix/testdata/fixed/basic/go.mod @@ -0,0 +1,11 @@ +module packer-plugin-scaffolding + +go 1.17 + +require ( + github.com/hashicorp/hcl/v2 v2.13.0 + github.com/hashicorp/packer-plugin-sdk v0.3.1 + github.com/zclconf/go-cty v1.10.0 +) + +replace github.com/zclconf/go-cty => github.com/nywilken/go-cty v1.12.1 diff --git a/cmd/packer-sdc/internal/fix/testdata/fixed/many-replace/go.mod b/cmd/packer-sdc/internal/fix/testdata/fixed/many-replace/go.mod new file mode 100644 index 000000000..b011417ab --- /dev/null +++ b/cmd/packer-sdc/internal/fix/testdata/fixed/many-replace/go.mod @@ -0,0 +1,13 @@ +module packer-plugin-scaffolding + +go 1.20 + +require ( + github.com/hashicorp/hcl/v2 v2.13.0 + github.com/hashicorp/packer-plugin-sdk v0.3.1 + github.com/zclconf/go-cty v1.10.0 +) + +replace github.com/hashicorp/packer-plugin-sdk => github.com/example/packer-plugin-sdk v0.5.0 + +replace github.com/zclconf/go-cty => github.com/nywilken/go-cty v1.12.1 // added by packer-sdc fix as noted in github.com/hashicorp/packer-plugin-sdk/issues/187 diff --git a/cmd/packer-sdc/internal/fix/testdata/invalid/go.mod b/cmd/packer-sdc/internal/fix/testdata/invalid/go.mod new file mode 100644 index 000000000..bec402a4e --- /dev/null +++ b/cmd/packer-sdc/internal/fix/testdata/invalid/go.mod @@ -0,0 +1,11 @@ +module packer-plugin-scaffolding + +go 1.20 + +require ( + github.com/hashicorp/hcl/v2 v2.13.0 + github.com/hashicorp/packer-plugin-sdk v0.3.1 + github.com/zclconf/go-cty v1.10.0 +) + +replace github.com/zclconf/go-cty => github.com/random/go-cty v1.14.1 diff --git a/cmd/packer-sdc/internal/fix/testdata/missing-requires/both/go.mod b/cmd/packer-sdc/internal/fix/testdata/missing-requires/both/go.mod new file mode 100644 index 000000000..966657efd --- /dev/null +++ b/cmd/packer-sdc/internal/fix/testdata/missing-requires/both/go.mod @@ -0,0 +1,18 @@ +module example + +require ( + github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d + github.com/google/go-cmp v0.3.0 + github.com/hashicorp/go-cleanhttp v0.5.0 + github.com/hashicorp/go-multierror v1.1.0 + github.com/hashicorp/go-safetemp v1.0.0 + github.com/hashicorp/go-version v1.1.0 + github.com/klauspost/compress v1.11.2 + github.com/mitchellh/go-homedir v1.0.0 + github.com/mitchellh/go-testing-interface v1.0.0 + github.com/ulikunitz/xz v0.5.8 +) + +require github.com/hashicorp/errwrap v1.0.0 // indirect + +go 1.18 diff --git a/cmd/packer-sdc/internal/fix/testdata/missing-requires/go-cty/go.mod b/cmd/packer-sdc/internal/fix/testdata/missing-requires/go-cty/go.mod new file mode 100644 index 000000000..ad38b4bd0 --- /dev/null +++ b/cmd/packer-sdc/internal/fix/testdata/missing-requires/go-cty/go.mod @@ -0,0 +1,19 @@ +module example + +require ( + github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d + github.com/google/go-cmp v0.3.0 + github.com/hashicorp/go-cleanhttp v0.5.0 + github.com/hashicorp/go-multierror v1.1.0 + github.com/hashicorp/go-safetemp v1.0.0 + github.com/hashicorp/go-version v1.1.0 + github.com/hashicorp/packer-plugin-sdk v0.4.0 + github.com/klauspost/compress v1.11.2 + github.com/mitchellh/go-homedir v1.0.0 + github.com/mitchellh/go-testing-interface v1.0.0 + github.com/ulikunitz/xz v0.5.8 +) + +require github.com/hashicorp/errwrap v1.0.0 // indirect + +go 1.18 diff --git a/cmd/packer-sdc/internal/fix/testdata/missing-requires/packer-plugin-sdk/go.mod b/cmd/packer-sdc/internal/fix/testdata/missing-requires/packer-plugin-sdk/go.mod new file mode 100644 index 000000000..aace57136 --- /dev/null +++ b/cmd/packer-sdc/internal/fix/testdata/missing-requires/packer-plugin-sdk/go.mod @@ -0,0 +1,19 @@ +module example + +require ( + github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d + github.com/google/go-cmp v0.3.0 + github.com/hashicorp/go-cleanhttp v0.5.0 + github.com/hashicorp/go-multierror v1.1.0 + github.com/hashicorp/go-safetemp v1.0.0 + github.com/hashicorp/go-version v1.1.0 + github.com/klauspost/compress v1.11.2 + github.com/mitchellh/go-homedir v1.0.0 + github.com/mitchellh/go-testing-interface v1.0.0 + github.com/ulikunitz/xz v0.5.8 + github.com/zclconf/go-cty v1.13.1 +) + +require github.com/hashicorp/errwrap v1.0.0 // indirect + +go 1.18 diff --git a/cmd/packer-sdc/internal/fix/testdata/unfixed/basic/fixed.go.mod b/cmd/packer-sdc/internal/fix/testdata/unfixed/basic/fixed.go.mod new file mode 100644 index 000000000..da456395d --- /dev/null +++ b/cmd/packer-sdc/internal/fix/testdata/unfixed/basic/fixed.go.mod @@ -0,0 +1,11 @@ +module packer-plugin-scaffolding + +go 1.20 + +require ( + github.com/hashicorp/hcl/v2 v2.13.0 + github.com/hashicorp/packer-plugin-sdk v0.3.1 + github.com/zclconf/go-cty v1.10.0 +) + +replace github.com/zclconf/go-cty => github.com/nywilken/go-cty v1.12.1 // added by packer-sdc fix as noted in github.com/hashicorp/packer-plugin-sdk/issues/187 diff --git a/cmd/packer-sdc/internal/fix/testdata/unfixed/basic/go.mod b/cmd/packer-sdc/internal/fix/testdata/unfixed/basic/go.mod new file mode 100644 index 000000000..8a509b792 --- /dev/null +++ b/cmd/packer-sdc/internal/fix/testdata/unfixed/basic/go.mod @@ -0,0 +1,9 @@ +module packer-plugin-scaffolding + +go 1.20 + +require ( + github.com/hashicorp/hcl/v2 v2.13.0 + github.com/hashicorp/packer-plugin-sdk v0.3.1 + github.com/zclconf/go-cty v1.10.0 +) diff --git a/cmd/packer-sdc/internal/fix/testdata/unfixed/many-replace/fixed.go.mod b/cmd/packer-sdc/internal/fix/testdata/unfixed/many-replace/fixed.go.mod new file mode 100644 index 000000000..b011417ab --- /dev/null +++ b/cmd/packer-sdc/internal/fix/testdata/unfixed/many-replace/fixed.go.mod @@ -0,0 +1,13 @@ +module packer-plugin-scaffolding + +go 1.20 + +require ( + github.com/hashicorp/hcl/v2 v2.13.0 + github.com/hashicorp/packer-plugin-sdk v0.3.1 + github.com/zclconf/go-cty v1.10.0 +) + +replace github.com/hashicorp/packer-plugin-sdk => github.com/example/packer-plugin-sdk v0.5.0 + +replace github.com/zclconf/go-cty => github.com/nywilken/go-cty v1.12.1 // added by packer-sdc fix as noted in github.com/hashicorp/packer-plugin-sdk/issues/187 diff --git a/cmd/packer-sdc/internal/fix/testdata/unfixed/many-replace/go.mod b/cmd/packer-sdc/internal/fix/testdata/unfixed/many-replace/go.mod new file mode 100644 index 000000000..10c40e72a --- /dev/null +++ b/cmd/packer-sdc/internal/fix/testdata/unfixed/many-replace/go.mod @@ -0,0 +1,11 @@ +module packer-plugin-scaffolding + +go 1.20 + +require ( + github.com/hashicorp/hcl/v2 v2.13.0 + github.com/hashicorp/packer-plugin-sdk v0.3.1 + github.com/zclconf/go-cty v1.10.0 +) + +replace github.com/hashicorp/packer-plugin-sdk => github.com/example/packer-plugin-sdk v0.5.0 diff --git a/cmd/packer-sdc/internal/fix/testdata/unfixed/version/fixed.go.mod b/cmd/packer-sdc/internal/fix/testdata/unfixed/version/fixed.go.mod new file mode 100644 index 000000000..90da23380 --- /dev/null +++ b/cmd/packer-sdc/internal/fix/testdata/unfixed/version/fixed.go.mod @@ -0,0 +1,11 @@ +module packer-plugin-scaffolding + +go 1.20 + +require ( + github.com/hashicorp/hcl/v2 v2.13.0 + github.com/hashicorp/packer-plugin-sdk v0.3.1 + github.com/zclconf/go-cty v1.10.0 +) + +replace github.com/zclconf/go-cty => github.com/nywilken/go-cty v1.13.1 // added by packer-sdc fix as noted in github.com/hashicorp/packer-plugin-sdk/issues/187 diff --git a/cmd/packer-sdc/internal/fix/testdata/unfixed/version/go.mod b/cmd/packer-sdc/internal/fix/testdata/unfixed/version/go.mod new file mode 100644 index 000000000..90da23380 --- /dev/null +++ b/cmd/packer-sdc/internal/fix/testdata/unfixed/version/go.mod @@ -0,0 +1,11 @@ +module packer-plugin-scaffolding + +go 1.20 + +require ( + github.com/hashicorp/hcl/v2 v2.13.0 + github.com/hashicorp/packer-plugin-sdk v0.3.1 + github.com/zclconf/go-cty v1.10.0 +) + +replace github.com/zclconf/go-cty => github.com/nywilken/go-cty v1.13.1 // added by packer-sdc fix as noted in github.com/hashicorp/packer-plugin-sdk/issues/187 diff --git a/cmd/packer-sdc/main.go b/cmd/packer-sdc/main.go index a5e6b7f03..5855a3b25 100644 --- a/cmd/packer-sdc/main.go +++ b/cmd/packer-sdc/main.go @@ -8,6 +8,7 @@ import ( "log" "os" + "github.com/hashicorp/packer-plugin-sdk/cmd/packer-sdc/internal/fix" mapstructure_to_hcl2 "github.com/hashicorp/packer-plugin-sdk/cmd/packer-sdc/internal/mapstructure-to-hcl2" "github.com/hashicorp/packer-plugin-sdk/cmd/packer-sdc/internal/plugincheck" "github.com/hashicorp/packer-plugin-sdk/cmd/packer-sdc/internal/renderdocs" @@ -44,6 +45,9 @@ func main() { "plugin-check": func() (cli.Command, error) { return &plugincheck.Command{}, nil }, + "fix": func() (cli.Command, error) { + return &fix.Command{}, nil + }, } exitStatus, err := c.Run() diff --git a/go.mod b/go.mod index d42f13c9a..c5c590c63 100644 --- a/go.mod +++ b/go.mod @@ -58,6 +58,7 @@ require ( github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d // indirect github.com/packer-community/winrmcp v0.0.0-20180921211025-c76d91c1e7db github.com/pierrec/lz4 v2.6.1+incompatible // indirect + github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e github.com/pkg/errors v0.9.1 github.com/pkg/sftp v1.13.2 github.com/ryanuber/go-glob v1.0.0 diff --git a/go.sum b/go.sum index 1b95da008..1a8fe2887 100644 --- a/go.sum +++ b/go.sum @@ -374,6 +374,8 @@ github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi github.com/pierrec/lz4 v2.5.2+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pierrec/lz4 v2.6.1+incompatible h1:9UY3+iC23yxF0UfGaYrGplQ+79Rg+h/q9FV9ix19jjM= github.com/pierrec/lz4 v2.6.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e h1:aoZm08cpOy4WuID//EZDgcC4zIxODThtZNPirFr42+A= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1-0.20171018195549-f15c970de5b7/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= From 2b9991b3e95074677649bf551578522806dc6ab0 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Tue, 18 Jul 2023 15:50:02 +0000 Subject: [PATCH 053/105] Fix diff header for fix command Old Output ``` ~> ./packer-sdc fix -diff ../../../packer --- /home/vagrant/Development/packer/go.mod +++ /home/vagrant/Development/packer/go.mod-fixed @@ -213,3 +213,5 @@ ) ``` New Output ``` ~> ./packer-sdc fix -diff ../../../packer --- /home/vagrant/Development/packer/go.mod +++ Fixed: /home/vagrant/Development/packer/go.mod @@ -213,3 +213,5 @@ ) ``` --- cmd/packer-sdc/internal/fix/cmd.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/packer-sdc/internal/fix/cmd.go b/cmd/packer-sdc/internal/fix/cmd.go index d1bc6ef6d..7cdfb950f 100644 --- a/cmd/packer-sdc/internal/fix/cmd.go +++ b/cmd/packer-sdc/internal/fix/cmd.go @@ -143,7 +143,7 @@ func processFiles(rootDir string, showDiff bool) error { if showDiff { for filename, fixedData := range fixedFiles { - diff.Text(filename, filename+"fixed", string(srcFiles[filename]), string(fixedData), os.Stdout) + diff.Text(filename, "Fixed: "+filename, string(srcFiles[filename]), string(fixedData), os.Stdout) } return nil } From f014f4e9b3e40be504458f5eceec2c51ad5ee279 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Fri, 28 Jul 2023 10:30:45 -0400 Subject: [PATCH 054/105] Update pinned actions to latest trusted versions --- .github/workflows/actionlint.yml | 2 +- .github/workflows/go-test.yml | 12 ++++++------ .github/workflows/release.yml | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/actionlint.yml b/.github/workflows/actionlint.yml index 68c03d050..50dead389 100644 --- a/.github/workflows/actionlint.yml +++ b/.github/workflows/actionlint.yml @@ -8,6 +8,6 @@ jobs: actionlint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - name: "Check workflow files" uses: docker://docker.mirror.hashicorp.services/rhysd/actionlint:latest diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml index ac013e679..0e1ddcfb1 100644 --- a/.github/workflows/go-test.yml +++ b/.github/workflows/go-test.yml @@ -22,12 +22,12 @@ jobs: contents: read steps: - name: Setup go - uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0 + uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 with: go-version: ${{ matrix.go-version }} - name: Checkout code - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - name: Create test directory run: | @@ -72,12 +72,12 @@ jobs: run: git config --global core.autocrlf false - name: Setup Go - uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0 + uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 with: go-version: ${{ matrix.go-version }} - name: Checkout code - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - name: Install gotestsum shell: bash @@ -109,12 +109,12 @@ jobs: contents: read steps: - name: Setup go - uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0 + uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 with: go-version: ${{ matrix.go-version }} - name: Checkout code - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - name: Create test directory run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8a62e0bc7..344b4ef37 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,9 +14,9 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - name: GoReleaser - uses: goreleaser/goreleaser-action@f82d6c1c344bcacabba2c841718984797f664a6b# v4.2.0 + uses: goreleaser/goreleaser-action@336e29918d653399e599bfca99fadc1d7ffbc9f7 # v4.3.0 with: args: "release" env: From 9115d648b0a5ad49ff982befb25c690211c420e9 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Fri, 28 Jul 2023 12:58:42 -0400 Subject: [PATCH 055/105] Cut release v0.5.0 --- version/version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version/version.go b/version/version.go index add289bab..2c6f5be79 100644 --- a/version/version.go +++ b/version/version.go @@ -16,7 +16,7 @@ import ( var GitCommit string // Package version helps plugin creators set and track the sdk version using -var Version = "0.4.0" +var Version = "0.5.0" // A pre-release marker for the version. If this is "" (empty string) // then it means that it is a final release. Otherwise, this is a pre-release From 7be7944012c78117f6e6eb31ff8975d434d32da6 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Mon, 31 Jul 2023 10:40:14 -0400 Subject: [PATCH 056/105] github: remove trailing whitespaces --- .github/workflows/go-test.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml index 0e1ddcfb1..d5b9b98f5 100644 --- a/.github/workflows/go-test.yml +++ b/.github/workflows/go-test.yml @@ -1,5 +1,5 @@ name: go-test -on: +on: push: branches: - main @@ -25,14 +25,14 @@ jobs: uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 with: go-version: ${{ matrix.go-version }} - + - name: Checkout code uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - name: Create test directory run: | mkdir -p ${{ env.TEST_RESULTS_PATH }}/packer-plugin-sdk - + - name: Run gofmt run: | make fmt-check @@ -40,7 +40,7 @@ jobs: - name: Run Go Generate Check run: | make generate-check - + - name: Install gotestsum run: go install gotest.tools/gotestsum@v1.8.2 @@ -90,7 +90,7 @@ jobs: echo "Running $(echo "$PACKAGE_NAMES" | wc -w) packages" echo "$PACKAGE_NAMES" echo "$PACKAGE_NAMES" | xargs -I {} gotestsum --format=short-verbose --junitfile "$TEST_RESULTS_PATH"/packer-plugin-sdk/gotestsum-report.xml -- -count 1 -p 2 {}; - + # Save coverage report parts - name: Upload and save artifacts uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 From f4e55998f22cb8a17bc3375ffc8504c072dc0ece Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Mon, 31 Jul 2023 10:41:02 -0400 Subject: [PATCH 057/105] go.mod: remove replace statement for go-cty The way we install the SDK and its dependencies in plugins, using go install, is incompatible with replace statements. Therefore, we remove that statement from the go.mod, and leave the responsibility of including that replace to plugins that import the SDK. --- go.mod | 3 --- go.sum | 9 ++------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/go.mod b/go.mod index c5c590c63..49323dfae 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,5 @@ module github.com/hashicorp/packer-plugin-sdk -// As described in https://github.com/hashicorp/packer-plugin-sdk/issues/187 -replace github.com/zclconf/go-cty => github.com/nywilken/go-cty v1.12.1 - require ( cloud.google.com/go v0.105.0 // indirect cloud.google.com/go/storage v1.27.0 // indirect diff --git a/go.sum b/go.sum index 1a8fe2887..5032929f7 100644 --- a/go.sum +++ b/go.sum @@ -142,7 +142,6 @@ github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5y github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= @@ -352,8 +351,6 @@ github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7P github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d h1:VhgPp6v9qf9Agr/56bj7Y/xa04UccTW04VP0Qed4vnQ= github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d/go.mod h1:YUTz3bUH2ZwIWBy3CJBeOBEugqcmXREj14T+iG/4k4U= -github.com/nywilken/go-cty v1.12.1 h1:4dEeVqhsX1RVfdLgu3CIMeft4ELm9qygMk7/kcpnfCs= -github.com/nywilken/go-cty v1.12.1/go.mod h1:jQhMnBcOB2DrBaV2awY4z+oSZTPc2dnnwGqYqFo86G0= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -436,9 +433,9 @@ github.com/ugorji/go/codec v1.2.6/go.mod h1:V6TCNZ4PHqoHGFZuSG1W8nrCzzdgA2DozYxW github.com/ulikunitz/xz v0.5.10 h1:t92gobL9l3HE202wg3rlk19F6X+JOxl9BBrCCMYEYd8= github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= -github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4= -github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/zclconf/go-cty v1.12.1 h1:PcupnljUm9EIvbgSHQnHhUr3fO6oFmkOrvs2BAFNXXY= +github.com/zclconf/go-cty v1.12.1/go.mod h1:s9IfD1LK5ccNMSWCVFCE2rJfHiZgi7JijgeWIMfhLvA= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= @@ -490,7 +487,6 @@ golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= @@ -583,7 +579,6 @@ google.golang.org/api v0.101.0 h1:lJPPeEBIRxGpGLwnBTam1NPEM8Z2BmmXEd3z812pjwM= google.golang.org/api v0.101.0/go.mod h1:CjxAAWWt3A3VrUE2IGDY2bgK5qhoG/OkyWVlYcP05MY= 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.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= From 1008a3b43499d2541cf58f48eae0b2d3eb96d84f Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Mon, 31 Jul 2023 10:42:31 -0400 Subject: [PATCH 058/105] cmd: allow packer-sdc fix on the SDK Before this commit, `packer-sdc fix' would only work on plugins that import the SDK, but we also need to make `packer-sdc fix' compatible with the SDK itself, so we add an extra check to packer-sdc so it doesn't ignore the SDK when applying the replace fix. --- cmd/packer-sdc/internal/fix/gocty.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/packer-sdc/internal/fix/gocty.go b/cmd/packer-sdc/internal/fix/gocty.go index 8bd4507a8..d12c269de 100644 --- a/cmd/packer-sdc/internal/fix/gocty.go +++ b/cmd/packer-sdc/internal/fix/gocty.go @@ -67,7 +67,7 @@ func (f goCtyFix) fix(modFilePath string, data []byte) ([]byte, error) { var requiresSDK, requiresGoCty bool for _, req := range mf.Require { - if req.Mod.Path == sdkPath { + if req.Mod.Path == sdkPath || mf.Module.Mod.Path == sdkPath { requiresSDK = true } if req.Mod.Path == f.OldPath { From 98985e1a3b7892dbf878aebebc5ad926569f02a7 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Mon, 31 Jul 2023 11:15:08 -0400 Subject: [PATCH 059/105] README: add note on local testing --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index c0a0a531a..5682ad187 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,11 @@ See the [Extending Packer](https://www.packer.io/docs/plugins/creation#extending See the [Extending Packer](https://www.packer.io/docs/plugins/creation#extending-packer) section on the Packer website. +## Testing + +The SDK embeds tests to ensure we don't introduce a regression in the future. Up to version 0.5.0 of the SDK, tests would be runnable with `make test` on their own but since we removed the `replace` statement for `go-cty` tests won't work out-of-the-box. Users will need to invoke `packer-sdc fix .` in order to fix the `go.mod` and `go.sum` files before running tests. +Please do not commit these changes, as adding this `replace` section to the `go.mod` file will make it impossible for dependents to run `go install` for `packer-sdc` afterwards. + ## Packer Scope (Plugins VS Core) ### Packer Core From d7581760de712a094f0fa3195cfce0a1cc4e47e7 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Mon, 31 Jul 2023 10:43:47 -0400 Subject: [PATCH 060/105] workflows: add packer-sdc fix to the test workflow Since we remove the `replace' statement from the go.mod, tests will fail as the updated version of go-cty does not support gob, and some tests rely on that by default as we init RPC to work with gob-encoded payloads. To avoid this failure in CI, we add an extra step to the go-test workflow so that it amends the go.mod, tidies it to resolve missing sums, and continues with testing afterwards --- .github/workflows/go-test.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml index d5b9b98f5..d66055690 100644 --- a/.github/workflows/go-test.yml +++ b/.github/workflows/go-test.yml @@ -44,6 +44,14 @@ jobs: - name: Install gotestsum run: go install gotest.tools/gotestsum@v1.8.2 + # Required for passing tests as we need to have a replace in the go.mod + # otherwise we'll get compile-time errors when running them + - name: Fix gocty + run: | + make install-gen-deps + packer-sdc fix . + go mod tidy + - name: Run Go tests run: | PACKAGE_NAMES="$(go list ./...)" @@ -83,6 +91,14 @@ jobs: shell: bash run: go install gotest.tools/gotestsum@v1.8.2 + # Required for passing tests as we need to have a replace in the go.mod + # otherwise we'll get compile-time errors when running them + - name: Fix gocty + run: | + make install-gen-deps + packer-sdc fix . + go mod tidy + - name: Run Go tests shell: bash run: | @@ -123,6 +139,14 @@ jobs: - name: Install gotestsum run: go install gotest.tools/gotestsum@v1.8.2 + # Required for passing tests as we need to have a replace in the go.mod + # otherwise we'll get compile-time errors when running them + - name: Fix gocty + run: | + make install-gen-deps + packer-sdc fix . + go mod tidy + - name: Run Go tests run: | PACKAGE_NAMES="$(go list ./...)" From 57c8858af8130e5d1f95bf04546486097c323a43 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Mon, 31 Jul 2023 13:48:33 -0400 Subject: [PATCH 061/105] workflows: ensure we dont commit replace in go.mod --- .github/workflows/go-test.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml index d66055690..f97477bdd 100644 --- a/.github/workflows/go-test.yml +++ b/.github/workflows/go-test.yml @@ -29,6 +29,13 @@ jobs: - name: Checkout code uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - name: Check that go.mod does not contain a replace + run: | + if grep -q "replace" &2 + false + fi + - name: Create test directory run: | mkdir -p ${{ env.TEST_RESULTS_PATH }}/packer-plugin-sdk From 5c5098730ed94075c08fddbba2a95838a9d09bac Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Mon, 31 Jul 2023 14:06:10 -0400 Subject: [PATCH 062/105] go.mod: separate go-cty out of require block --- go.mod | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 49323dfae..f2c9096b9 100644 --- a/go.mod +++ b/go.mod @@ -1,5 +1,7 @@ module github.com/hashicorp/packer-plugin-sdk +require github.com/zclconf/go-cty v1.12.1 // go-cty v1.11.0 removed gob encoding support so it cannot work with the Packer SDK as-is, you need to run `packer-sdc fix .' to change that + require ( cloud.google.com/go v0.105.0 // indirect cloud.google.com/go/storage v1.27.0 // indirect @@ -63,7 +65,6 @@ require ( github.com/stretchr/testify v1.7.0 github.com/ugorji/go/codec v1.2.6 github.com/ulikunitz/xz v0.5.10 // indirect - github.com/zclconf/go-cty v1.12.1 golang.org/x/crypto v0.0.0-20220517005047-85d78b3ac167 golang.org/x/mobile v0.0.0-20210901025245-1fde1d6c3ca1 golang.org/x/mod v0.8.0 From 28a0063df8a1eaef4d7a110846c49f01f10d51af Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Mon, 31 Jul 2023 20:43:12 -0400 Subject: [PATCH 063/105] Remove use of Go 1.20 language features --- cmd/packer-sdc/internal/fix/cmd.go | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/cmd/packer-sdc/internal/fix/cmd.go b/cmd/packer-sdc/internal/fix/cmd.go index 7cdfb950f..54fd3f529 100644 --- a/cmd/packer-sdc/internal/fix/cmd.go +++ b/cmd/packer-sdc/internal/fix/cmd.go @@ -12,6 +12,7 @@ import ( "path/filepath" "strings" + "github.com/hashicorp/go-multierror" "github.com/pkg/diff" ) @@ -103,7 +104,7 @@ func processFiles(rootDir string, showDiff bool) error { srcFiles := make(map[string][]byte) fixedFiles := make(map[string][]byte) - var hasErrors error + var cmdApplyErrs error for _, f := range availableFixes { matches, err := f.scan(rootDir) if err != nil { @@ -115,30 +116,30 @@ func processFiles(rootDir string, showDiff bool) error { if _, ok := srcFiles[filename]; !ok { bs, err := os.ReadFile(filename) if err != nil { - hasErrors = errors.Join(hasErrors, err) + cmdApplyErrs = multierror.Append(cmdApplyErrs, err) } - srcFiles[filename] = bytes.Clone(bs) + srcFiles[filename] = append([]byte{}, bs...) } fixedData, ok := fixedFiles[filename] if !ok { - fixedData = bytes.Clone(srcFiles[filename]) + fixedData = append([]byte{}, srcFiles[filename]...) } fixedData, err := f.fix(filename, fixedData) if err != nil { - hasErrors = errors.Join(hasErrors, err) + cmdApplyErrs = multierror.Append(cmdApplyErrs, err) continue } if bytes.Equal(fixedData, srcFiles[filename]) { continue } - fixedFiles[filename] = bytes.Clone(fixedData) + fixedFiles[filename] = fixedData } } - if hasErrors != nil { - return hasErrors + if cmdApplyErrs != nil { + return cmdApplyErrs } if showDiff { From 04cbbf4104a71371f63ff37868362298e0c8e715 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Mon, 31 Jul 2023 20:46:30 -0400 Subject: [PATCH 064/105] Add matrix builds for supported Go versions --- .github/workflows/go-test.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml index f97477bdd..9182ad9d2 100644 --- a/.github/workflows/go-test.yml +++ b/.github/workflows/go-test.yml @@ -16,7 +16,8 @@ jobs: strategy: matrix: go-version: - - 1.20.3 + - '1.19' + - '1.20' permissions: id-token: write contents: read @@ -78,7 +79,8 @@ jobs: strategy: matrix: go-version: - - 1.20.3 + - '1.19' + - '1.20' permissions: id-token: write contents: read @@ -126,7 +128,8 @@ jobs: strategy: matrix: go-version: - - 1.20.3 + - '1.19' + - '1.20' permissions: id-token: write contents: read From 9be5b0f4fc7b59b6fdc36b194d7534e9bc84c507 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Mon, 31 Jul 2023 20:56:29 -0400 Subject: [PATCH 065/105] Bump Go module minimum version to 1.19 In go 1.19 changes to go fmt resulted in slightly different comment formatting for generated code. Bumping to Go 1.19 ensures that the correct version of Go tooling is used formatting the generated code. --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index f2c9096b9..de1f50371 100644 --- a/go.mod +++ b/go.mod @@ -118,4 +118,4 @@ require ( google.golang.org/protobuf v1.28.1 // indirect ) -go 1.18 +go 1.19 From 4c19df06f796f147c2324eb46e0f639c79ed1636 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Tue, 1 Aug 2023 14:25:03 -0400 Subject: [PATCH 066/105] go.mod: retract v0.5.0 Since the SDK in v0.5.0 contains a release statement in its go.mod, this makes it impossible to go install packer-sdc from a plugin. Since those plugins rely on their Makefile to do this, we cannot change them all at once, so we fixed the problem in the SDK code itself, and v0.5.0 is broken, so we retract it in this commit. --- go.mod | 2 ++ 1 file changed, 2 insertions(+) diff --git a/go.mod b/go.mod index de1f50371..391f37e72 100644 --- a/go.mod +++ b/go.mod @@ -119,3 +119,5 @@ require ( ) go 1.19 + +retract v0.5.0 // v0.5.0 of the SDK was broken because of the replace statement for go-cty From b74d50856f716f4b6d1af0bdeab376975fa54ac0 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Tue, 1 Aug 2023 14:39:55 -0400 Subject: [PATCH 067/105] workflows: improve replace check in go.mod Since the latest comment introduces a retract statement, with a comment that contains `replace', the check failed, so we improve it to only consider `replace' if they're the first thing on a line. --- .github/workflows/go-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml index 9182ad9d2..64f6c3b0a 100644 --- a/.github/workflows/go-test.yml +++ b/.github/workflows/go-test.yml @@ -32,7 +32,7 @@ jobs: - name: Check that go.mod does not contain a replace run: | - if grep -q "replace" &2 false fi From 3a3e3a1c0f85bcfc41d7e38ca0e2f9d7ed046a8f Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Tue, 1 Aug 2023 15:30:03 -0400 Subject: [PATCH 068/105] Cut release v0.5.1 --- version/version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version/version.go b/version/version.go index 2c6f5be79..38fc251bc 100644 --- a/version/version.go +++ b/version/version.go @@ -16,7 +16,7 @@ import ( var GitCommit string // Package version helps plugin creators set and track the sdk version using -var Version = "0.5.0" +var Version = "0.5.1" // A pre-release marker for the version. If this is "" (empty string) // then it means that it is a final release. Otherwise, this is a pre-release From 4328d73fa2e073f7cb6d727870bff2791bf85e92 Mon Sep 17 00:00:00 2001 From: Zhiwei Liang Date: Tue, 1 Aug 2023 23:39:32 -0400 Subject: [PATCH 069/105] Bump go-getter to v2.2.1 --- go.mod | 6 +++--- go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index 391f37e72..4c27f27ff 100644 --- a/go.mod +++ b/go.mod @@ -29,9 +29,9 @@ require ( github.com/hashicorp/consul/api v1.10.1 github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-getter/gcs/v2 v2.2.0 - github.com/hashicorp/go-getter/s3/v2 v2.2.0 - github.com/hashicorp/go-getter/v2 v2.2.0 + github.com/hashicorp/go-getter/gcs/v2 v2.2.1 + github.com/hashicorp/go-getter/s3/v2 v2.2.1 + github.com/hashicorp/go-getter/v2 v2.2.1 github.com/hashicorp/go-hclog v0.16.2 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-msgpack v0.5.5 // indirect diff --git a/go.sum b/go.sum index 5032929f7..81cc03dc8 100644 --- a/go.sum +++ b/go.sum @@ -190,12 +190,12 @@ github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtng github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-getter/gcs/v2 v2.2.0 h1:oo6LVXva9I4CZzv531mn/FY5gtRx540I6eWwJVPWA4o= -github.com/hashicorp/go-getter/gcs/v2 v2.2.0/go.mod h1:oDHNhZN2Gf6UqfIol4S9PkbzMFlf8rBctrJvAHDTtOM= -github.com/hashicorp/go-getter/s3/v2 v2.2.0 h1:JGZihrdkZnuw+bDf8BnxuRLPwi0cfL2mwRlWA2lREAg= -github.com/hashicorp/go-getter/s3/v2 v2.2.0/go.mod h1:hj0uM2nGIi0rln/VcvxjaQYQg3WGssfUh/ya5jA555g= -github.com/hashicorp/go-getter/v2 v2.2.0 h1:vLenCsJqB5oNE141xKtT6cajhwAE8dneiNgzZA3oOqs= -github.com/hashicorp/go-getter/v2 v2.2.0/go.mod h1:EcJx6oZE8hmGuRR1l38QrfnyiujQbwsEAn11eHv6l2M= +github.com/hashicorp/go-getter/gcs/v2 v2.2.1 h1:yZgDXYy5m4xogJV8hXzX5S/fM/rjJnBz+EzTeFrfLEM= +github.com/hashicorp/go-getter/gcs/v2 v2.2.1/go.mod h1:xzT3sNmGRipCRMpWz24fYHMvgb4MRn/smg5k2mhJ7Bo= +github.com/hashicorp/go-getter/s3/v2 v2.2.1 h1:Psuhz6iuCxJOd3kGinK46x+4BzcJgwff8BId7CuGPYU= +github.com/hashicorp/go-getter/s3/v2 v2.2.1/go.mod h1:KDqfEPgpwZIy+1sAplFX231CE+M6wdL5Q/j6OMbKSnw= +github.com/hashicorp/go-getter/v2 v2.2.1 h1:2JXqPZs1Jej67RtdTi0YZaEB2hEFB3fkBA4cPYKQwFQ= +github.com/hashicorp/go-getter/v2 v2.2.1/go.mod h1:EcJx6oZE8hmGuRR1l38QrfnyiujQbwsEAn11eHv6l2M= github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd/go.mod h1:9bjs9uLqI8l75knNv3lV1kA55veR+WUPSiKIWcQHudI= github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= From 84dd3ab64624952cd435cfd8c14841825858b5de Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Tue, 22 Aug 2023 10:25:28 -0400 Subject: [PATCH 070/105] acctest: add capability to add args to build When running an acceptance test, we may need to invoke Packer with extra flags to ensure it behaves as expected. Therefore, we add this capability to the TestCase structure so it injects them verbatim in the command-line. --- acctest/pluginacc.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/acctest/pluginacc.go b/acctest/pluginacc.go index 579e9aee8..7d5e13ee9 100644 --- a/acctest/pluginacc.go +++ b/acctest/pluginacc.go @@ -25,6 +25,10 @@ const TestEnvVar = "PACKER_ACC" type PluginTestCase struct { // Init, if true `packer init` will be executed prior to `packer build`. Init bool + // BuildExtraArgs is the list of arguments to be passed as extra to the packer build + // command. + // These arguments are injected before the already present `--machine-readable` option. + BuildExtraArgs []string // CheckInit is called after packer init step is executed in order to test that // the step executed successfully. If this is not set, then the next // step will be called @@ -118,8 +122,14 @@ func TestPlugin(t *testing.T, testCase *PluginTestCase) { } } + buildArgs := []string{"build"} + for _, arg := range testCase.BuildExtraArgs { + buildArgs = append(buildArgs, arg) + } + buildArgs = append(buildArgs, "--machine-readable", templatePath) + // Run build - buildCommand := exec.Command(packerbin, "build", "--machine-readable", templatePath) + buildCommand := exec.Command(packerbin, buildArgs...) buildCommand.Env = append(buildCommand.Env, os.Environ()...) buildCommand.Env = append(buildCommand.Env, "PACKER_LOG=1", fmt.Sprintf("PACKER_LOG_PATH=%s", logfile)) From e244605e6ce5a2c39629300c5380418d4117bf1a Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Fri, 25 Aug 2023 16:54:46 -0400 Subject: [PATCH 071/105] hcl2helper: preemptively panic on nil hcl spec When the code from a plugin differs from its generated FlatConfig, we may encounter a nil object spec for the values in the output of a component. This translates as a nil dereferencing panic within the hcl library, caused by a config and tags being out-of-sync. To avoid users the hassle of delving in this code, and the hcl library's, we preemptively panic in the SDK code, with a message suggesting regenerating the code for the component's specs. --- hcl2helper/values.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/hcl2helper/values.go b/hcl2helper/values.go index 345b33ce4..e296264fc 100644 --- a/hcl2helper/values.go +++ b/hcl2helper/values.go @@ -77,6 +77,26 @@ func HCL2ValueFromConfig(conf interface{}, configSpec map[string]hcldec.Spec) ct for k, v := range c { spec := configSpec[k] + // During testing, I hit this problem and this felt bad to debug + // as I was working on other parts of the code at the same time. + // + // In the end, this may happen when the generated flat configs and + // the structures returned by the plugin are not synchronised, which + // causes the object spec to be out-of-sync with the data expected. + // + // Rather than letting the hcl library panic on a nil pointer problem, + // we do it here, with suggestions for users on how to potentially + // fix the problem, without needing to delve into the behaviour of + // the SDK and the HCL libraries. + if spec == nil { + panic(`The converted value failed to have its spec inferred from it, and will panic later down the process. +This is likely due to an object spec being out of date in the plugin's code. +You may retry this configuration with an up-to-date plugin, or if this is the latest version, please report this, as it is likely a bug to be fixed. +If you are developing the plugin, please regenerate the HCL-related code with 'make generate', then rebuild the plugin with the up-to-date structures. + +If this doesn't fix your problem, this is likely a Packer bug, please consider opening an issue on the project so the team can look at it.`) + } + switch st := spec.(type) { case *hcldec.BlockListSpec: // This should be a slice of objects, so we need to take a special care From 69dbb1e4699801e54e781651df4b0ff2ab573291 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Mon, 2 Oct 2023 15:07:57 +0000 Subject: [PATCH 072/105] Update gopkg.in/yaml.v3 to address CVE-2022-28948 This change address the yaml.v3 advisory reported for v0.5.1 https://deps.dev/go/github.com%2Fhashicorp%2Fpacker-plugin-sdk/v0.5.1 --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 4c27f27ff..5ffbbe4a7 100644 --- a/go.mod +++ b/go.mod @@ -77,7 +77,7 @@ require ( golang.org/x/tools v0.6.0 google.golang.org/api v0.101.0 // indirect gopkg.in/square/go-jose.v2 v2.6.0 // indirect - gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect ) require ( diff --git a/go.sum b/go.sum index 81cc03dc8..f608b2642 100644 --- a/go.sum +++ b/go.sum @@ -634,8 +634,8 @@ gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= From 19d1c81188eba9f8679787c2a45304e6827baac7 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Mon, 2 Oct 2023 15:13:55 +0000 Subject: [PATCH 073/105] Bump github.com/dylanmei/winrmtest to address CVE-2021-3538 The latest available release of github.com/dylanmei/winrmtest removes its dependency on github.com/satori/go.uuid, which was affected by CVE-2021-3539 https://deps.dev/advisory/osv/GO-2020-0018 --- go.mod | 5 ++--- go.sum | 12 ++++++------ 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index 5ffbbe4a7..b165c8cb4 100644 --- a/go.mod +++ b/go.mod @@ -10,12 +10,11 @@ require ( github.com/Masterminds/goutils v1.1.1 // indirect github.com/agext/levenshtein v1.2.3 github.com/antchfx/xpath v1.1.11 // indirect - github.com/antchfx/xquery v0.0.0-20180515051857-ad5b8c7a47b0 // indirect github.com/armon/go-metrics v0.3.9 // indirect github.com/aws/aws-sdk-go v1.44.114 github.com/cenkalti/backoff/v3 v3.2.2 // indirect github.com/dylanmei/iso8601 v0.1.0 // indirect - github.com/dylanmei/winrmtest v0.0.0-20170819153634-c2fbb09e6c08 + github.com/dylanmei/winrmtest v0.0.0-20210303004826-fbc9ae56efb6 github.com/fatih/camelcase v1.0.0 github.com/fatih/color v1.12.0 // indirect github.com/fatih/structtag v1.2.0 @@ -61,7 +60,6 @@ require ( github.com/pkg/errors v0.9.1 github.com/pkg/sftp v1.13.2 github.com/ryanuber/go-glob v1.0.0 - github.com/satori/go.uuid v1.2.0 // indirect github.com/stretchr/testify v1.7.0 github.com/ugorji/go/codec v1.2.6 github.com/ulikunitz/xz v0.5.10 // indirect @@ -86,6 +84,7 @@ require ( cloud.google.com/go/iam v0.6.0 // indirect github.com/Masterminds/semver v1.5.0 // indirect github.com/Masterminds/sprig v2.22.0+incompatible // indirect + github.com/antchfx/xmlquery v1.3.5 // indirect github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect github.com/armon/go-radix v1.0.0 // indirect github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect diff --git a/go.sum b/go.sum index f608b2642..bc49b3036 100644 --- a/go.sum +++ b/go.sum @@ -36,10 +36,11 @@ github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuy github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/antchfx/xmlquery v1.3.5 h1:I7TuBRqsnfFuL11ruavGm911Awx9IqSdiU6W/ztSmVw= +github.com/antchfx/xmlquery v1.3.5/go.mod h1:64w0Xesg2sTaawIdNqMB+7qaW/bSqkQm+ssPaCMWNnc= +github.com/antchfx/xpath v1.1.10/go.mod h1:Yee4kTMuNiPYJ7nSNorELQMr1J33uOpXDMByNYhvtNk= github.com/antchfx/xpath v1.1.11 h1:WOFtK8TVAjLm3lbgqeP0arlHpvCEeTANeWZ/csPpJkQ= github.com/antchfx/xpath v1.1.11/go.mod h1:i54GszH55fYfBmoZXapTHN8T8tkcHfRgLyVwwqzXNcs= -github.com/antchfx/xquery v0.0.0-20180515051857-ad5b8c7a47b0 h1:JaCC8jz0zdMLk2m+qCCVLLLM/PL93p84w4pK3aJWj60= -github.com/antchfx/xquery v0.0.0-20180515051857-ad5b8c7a47b0/go.mod h1:LzD22aAzDP8/dyiCKFp31He4m2GPjl0AFyzDtZzUu9M= github.com/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3 h1:ZSTrOEhiM5J5RFxEaFvMZVEAM1KvT1YzbEOwB2EAGjA= github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6iT90AvPUL1NNfNw= github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo= @@ -94,8 +95,8 @@ github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDD github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dylanmei/iso8601 v0.1.0 h1:812NGQDBcqquTfH5Yeo7lwR0nzx/cKdsmf3qMjPURUI= github.com/dylanmei/iso8601 v0.1.0/go.mod h1:w9KhXSgIyROl1DefbMYIE7UVSIvELTbMrCfx+QkYnoQ= -github.com/dylanmei/winrmtest v0.0.0-20170819153634-c2fbb09e6c08 h1:0bp6/GrNOrTDtSXe9YYGCwf8jp5Fb/b+4a6MTRm4qzY= -github.com/dylanmei/winrmtest v0.0.0-20170819153634-c2fbb09e6c08/go.mod h1:VBVDFSBXCIW8JaHQpI8lldSKfYaLMzP9oyq6IJ4fhzY= +github.com/dylanmei/winrmtest v0.0.0-20210303004826-fbc9ae56efb6 h1:zWydSUQBJApHwpQ4guHi+mGyQN/8yN6xbKWdDtL3ZNM= +github.com/dylanmei/winrmtest v0.0.0-20210303004826-fbc9ae56efb6/go.mod h1:6BLLhzn1VEiJ4veuAGhINBTrBlV889Wd+aU4auxKOww= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -405,8 +406,6 @@ github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/go-glob v1.0.0 h1:iQh3xXAumdQ+4Ufa5b25cRpC5TYKlno6hsv6Cb3pkBk= github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= -github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= -github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= @@ -488,6 +487,7 @@ golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= From 10cf15c5800894e7ad5e90abb78ce1fa79e7c039 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Mon, 2 Oct 2023 15:18:10 +0000 Subject: [PATCH 074/105] Bump golang.org/x/net to address CVE-2023-3978 Addresses vulnerability with improper rendering of text nodes in golang.org/x/net/html --- go.mod | 10 +++++----- go.sum | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/go.mod b/go.mod index b165c8cb4..22440e680 100644 --- a/go.mod +++ b/go.mod @@ -63,14 +63,14 @@ require ( github.com/stretchr/testify v1.7.0 github.com/ugorji/go/codec v1.2.6 github.com/ulikunitz/xz v0.5.10 // indirect - golang.org/x/crypto v0.0.0-20220517005047-85d78b3ac167 + golang.org/x/crypto v0.13.0 golang.org/x/mobile v0.0.0-20210901025245-1fde1d6c3ca1 golang.org/x/mod v0.8.0 - golang.org/x/net v0.8.0 + golang.org/x/net v0.15.0 golang.org/x/sync v0.1.0 - golang.org/x/sys v0.6.0 // indirect - golang.org/x/term v0.6.0 - golang.org/x/text v0.8.0 // indirect + golang.org/x/sys v0.12.0 // indirect + golang.org/x/term v0.12.0 + golang.org/x/text v0.13.0 // indirect golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect golang.org/x/tools v0.6.0 google.golang.org/api v0.101.0 // indirect diff --git a/go.sum b/go.sum index bc49b3036..2dc086696 100644 --- a/go.sum +++ b/go.sum @@ -452,8 +452,8 @@ golang.org/x/crypto v0.0.0-20200604202706-70a84ac30bf9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20220517005047-85d78b3ac167 h1:O8uGbHCqlTp2P6QJSLmCojM4mN6UemYv8K+dCnmHmu0= -golang.org/x/crypto v0.0.0-20220517005047-85d78b3ac167/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck= +golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190731235908-ec7cb31e5a56/go.mod h1:JhuoJpWY28nO4Vef9tZUw9qufEGTyX1+7lmHxV5q5G4= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= @@ -492,8 +492,8 @@ golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ= -golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= +golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= +golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.1.0 h1:isLCZuhj4v+tYv7eskaN4v/TM+A1begWWgyVJDdl1+Y= golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= @@ -538,18 +538,18 @@ golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ= -golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.6.0 h1:clScbb1cHjoCkyRbWwBEUZ5H/tIFu5TAXIqaZD0Gcjw= -golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= +golang.org/x/term v0.12.0 h1:/ZfYdc3zq+q02Rv9vGqTeSItdzZTSNDmfTi0mBAuidU= +golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68= -golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac h1:7zkz7BUtwNFFqcowJ+RIgu2MaV/MapERkDIy+mwPyjs= From 1840b5f3720915cbd6704866bd76519179d650f8 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Mon, 2 Oct 2023 15:30:17 +0000 Subject: [PATCH 075/105] Add 1.21.x to testing matrix --- .github/workflows/go-test.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml index 64f6c3b0a..6b7f1c845 100644 --- a/.github/workflows/go-test.yml +++ b/.github/workflows/go-test.yml @@ -18,12 +18,13 @@ jobs: go-version: - '1.19' - '1.20' + - '1.21.x' permissions: id-token: write contents: read steps: - name: Setup go - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 + uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe #v4.1.0 with: go-version: ${{ matrix.go-version }} @@ -81,6 +82,7 @@ jobs: go-version: - '1.19' - '1.20' + - '1.21.x' permissions: id-token: write contents: read @@ -89,7 +91,7 @@ jobs: run: git config --global core.autocrlf false - name: Setup Go - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 + uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe #v4.1.0 with: go-version: ${{ matrix.go-version }} @@ -130,12 +132,13 @@ jobs: go-version: - '1.19' - '1.20' + - '1.21.x' permissions: id-token: write contents: read steps: - name: Setup go - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 + uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe #v4.1.0 with: go-version: ${{ matrix.go-version }} From 7128c8ad9c47c411250efc96dcc53d3d43c6190e Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Mon, 2 Oct 2023 15:47:05 +0000 Subject: [PATCH 076/105] Bump Go tool chain to 1.20 This change was made to address a number of vulnerabilities reported by govulncheck in Go 1.19.13 Support for Go1.19 is removed with this change. Moving forward the minimum Go version will be bumped after a new Go minor version is released. ``` ~> govulncheck ./... Scanning your code and 599 packages across 99 dependent modules for known vulnerabilities... Vulnerability #1: GO-2023-2043 Improper handling of special tags within script contexts in html/template More info: https://pkg.go.dev/vuln/GO-2023-2043 Standard library Found in: html/template@go1.19.13 Fixed in: html/template@go1.21.1 Example traces found: #1: multistep/commonsteps/step_http_server.go:123:2: commonsteps.StepHTTPServer.Run calls http.Server.Serve, which eventually calls template.Template.Execute #2: multistep/commonsteps/step_http_server.go:123:2: commonsteps.StepHTTPServer.Run calls http.Server.Serve, which eventually calls template.Template.ExecuteTemplate Vulnerability #2: GO-2023-2041 Improper handling of HTML-like comments in script contexts in html/template More info: https://pkg.go.dev/vuln/GO-2023-2041 Standard library Found in: html/template@go1.19.13 Fixed in: html/template@go1.21.1 Example traces found: #1: multistep/commonsteps/step_http_server.go:123:2: commonsteps.StepHTTPServer.Run calls http.Server.Serve, which eventually calls template.Template.Execute #2: multistep/commonsteps/step_http_server.go:123:2: commonsteps.StepHTTPServer.Run calls http.Server.Serve, which eventually calls template.Template.ExecuteTemplate Your code is affected by 2 vulnerabilities from the Go standard library. ``` --- .github/workflows/go-test.yml | 3 --- go.mod | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml index 6b7f1c845..99bf9b694 100644 --- a/.github/workflows/go-test.yml +++ b/.github/workflows/go-test.yml @@ -16,7 +16,6 @@ jobs: strategy: matrix: go-version: - - '1.19' - '1.20' - '1.21.x' permissions: @@ -80,7 +79,6 @@ jobs: strategy: matrix: go-version: - - '1.19' - '1.20' - '1.21.x' permissions: @@ -130,7 +128,6 @@ jobs: strategy: matrix: go-version: - - '1.19' - '1.20' - '1.21.x' permissions: diff --git a/go.mod b/go.mod index 22440e680..af5e90bec 100644 --- a/go.mod +++ b/go.mod @@ -117,6 +117,6 @@ require ( google.golang.org/protobuf v1.28.1 // indirect ) -go 1.19 +go 1.20 retract v0.5.0 // v0.5.0 of the SDK was broken because of the replace statement for go-cty From a68554d75459e36d6cbb6d01d550c0297efe75e3 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Fri, 13 Oct 2023 12:22:48 -0400 Subject: [PATCH 077/105] Fix filepath.Clean for file prefixed URLs --- multistep/commonsteps/step_download.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/multistep/commonsteps/step_download.go b/multistep/commonsteps/step_download.go index e0a4272cd..8daa8ab40 100644 --- a/multistep/commonsteps/step_download.go +++ b/multistep/commonsteps/step_download.go @@ -221,11 +221,16 @@ func (s *StepDownload) download(ctx context.Context, ui packersdk.Ui, source str } src := u.String() if u.Scheme == "" || strings.ToLower(u.Scheme) == "file" { - // If a local filepath, then we need to preprocess to make sure the - // path doens't have any multiple successive path separators; if it + // If a local filepath, then we need to pre-process to make sure the + // path doesn't have any multiple successive path separators; if it // does, go-getter will read this as a specialized go-getter-specific // subdirectory command, which it most likely isn't. src = filepath.Clean(u.String()) + // Starting with Go 1.21.0 filepath.Clean on Windows treats paths containing file: as invalid + // so they are prefixed with a dot (.) followed by the os.PathSeparator + if runtime.GOOS == "windows" && (src[0] == '.' && os.IsPathSeparator(src[1])) { + src = src[2:] + } if _, err := os.Stat(filepath.Clean(u.Path)); err != nil { // Cleaned path isn't present on system so it must be some other // scheme. Don't error right away; see if go-getter can figure it From 85bbc31e3ea648f532d4d55e3262fbcf086a3e7d Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Tue, 17 Oct 2023 13:47:15 -0400 Subject: [PATCH 078/105] Bump dev version --- version/version.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/version/version.go b/version/version.go index 38fc251bc..1670fd777 100644 --- a/version/version.go +++ b/version/version.go @@ -16,12 +16,12 @@ import ( var GitCommit string // Package version helps plugin creators set and track the sdk version using -var Version = "0.5.1" +var Version = "0.5.2" // A pre-release marker for the version. If this is "" (empty string) // then it means that it is a final release. Otherwise, this is a pre-release // such as "dev" (in development), "beta", "rc1", etc. -var VersionPrerelease = "" +var VersionPrerelease = "dev" // SDKVersion is used by the plugin set to allow Packer to recognize // what version of the sdk the plugin is. From a7f1f5ca354667d61a41aa19e2551bb75a4377ac Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Tue, 17 Oct 2023 13:49:19 -0400 Subject: [PATCH 079/105] Bump golang.org/x/tools for Go 1.20 fixes --- go.mod | 14 +++++++------- go.sum | 28 ++++++++++++++-------------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/go.mod b/go.mod index af5e90bec..f9c0cb84f 100644 --- a/go.mod +++ b/go.mod @@ -63,16 +63,16 @@ require ( github.com/stretchr/testify v1.7.0 github.com/ugorji/go/codec v1.2.6 github.com/ulikunitz/xz v0.5.10 // indirect - golang.org/x/crypto v0.13.0 + golang.org/x/crypto v0.14.0 golang.org/x/mobile v0.0.0-20210901025245-1fde1d6c3ca1 - golang.org/x/mod v0.8.0 - golang.org/x/net v0.15.0 - golang.org/x/sync v0.1.0 - golang.org/x/sys v0.12.0 // indirect - golang.org/x/term v0.12.0 + golang.org/x/mod v0.13.0 + golang.org/x/net v0.16.0 + golang.org/x/sync v0.4.0 + golang.org/x/sys v0.13.0 // indirect + golang.org/x/term v0.13.0 golang.org/x/text v0.13.0 // indirect golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect - golang.org/x/tools v0.6.0 + golang.org/x/tools v0.14.0 google.golang.org/api v0.101.0 // indirect gopkg.in/square/go-jose.v2 v2.6.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index 2dc086696..3623cc293 100644 --- a/go.sum +++ b/go.sum @@ -452,8 +452,8 @@ golang.org/x/crypto v0.0.0-20200604202706-70a84ac30bf9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck= -golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= +golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190731235908-ec7cb31e5a56/go.mod h1:JhuoJpWY28nO4Vef9tZUw9qufEGTyX1+7lmHxV5q5G4= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= @@ -467,8 +467,8 @@ golang.org/x/mobile v0.0.0-20210901025245-1fde1d6c3ca1 h1:t3ZHqovedSY8DEAUmZA99f golang.org/x/mobile v0.0.0-20210901025245-1fde1d6c3ca1/go.mod h1:jFTmtFYCV0MFtXBU+J5V/+5AUeVS0ON/0WkE/KSrl6E= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8= -golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY= +golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -492,8 +492,8 @@ golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= -golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= +golang.org/x/net v0.16.0 h1:7eBu7KsSvFDtSXUIDbh3aqlK4DPsZ1rByC8PFfBThos= +golang.org/x/net v0.16.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.1.0 h1:isLCZuhj4v+tYv7eskaN4v/TM+A1begWWgyVJDdl1+Y= golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= @@ -504,8 +504,8 @@ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= -golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ= +golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -538,12 +538,12 @@ golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= -golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.12.0 h1:/ZfYdc3zq+q02Rv9vGqTeSItdzZTSNDmfTi0mBAuidU= -golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= +golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= +golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -567,8 +567,8 @@ golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= -golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/tools v0.14.0 h1:jvNa2pY0M4r62jkRQ6RwEZZyPcymeL9XZMLBbV7U2nc= +golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= From 6961c20ff334d13d885583aff83b93d7308146b5 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Wed, 18 Oct 2023 11:37:59 -0400 Subject: [PATCH 080/105] deps: bump github.com/mitchellh/cli to v1.1.5 for security fix --- go.mod | 8 +++++--- go.sum | 20 +++++++++++++------- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/go.mod b/go.mod index f9c0cb84f..fdd5063cd 100644 --- a/go.mod +++ b/go.mod @@ -46,7 +46,7 @@ require ( github.com/masterzen/simplexml v0.0.0-20190410153822-31eea3082786 // indirect github.com/masterzen/winrm v0.0.0-20210623064412-3b76017826b0 github.com/mattn/go-isatty v0.0.13 // indirect - github.com/mitchellh/cli v1.1.2 + github.com/mitchellh/cli v1.1.5 github.com/mitchellh/go-fs v0.0.0-20180402235330-b7b9ca407fff github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/go-wordwrap v1.0.1 // indirect @@ -82,8 +82,8 @@ require ( cloud.google.com/go/compute v1.12.1 // indirect cloud.google.com/go/compute/metadata v0.1.1 // indirect cloud.google.com/go/iam v0.6.0 // indirect - github.com/Masterminds/semver v1.5.0 // indirect - github.com/Masterminds/sprig v2.22.0+incompatible // indirect + github.com/Masterminds/semver/v3 v3.1.1 // indirect + github.com/Masterminds/sprig/v3 v3.2.1 // indirect github.com/antchfx/xmlquery v1.3.5 // indirect github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect github.com/armon/go-radix v1.0.0 // indirect @@ -108,6 +108,8 @@ require ( github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/posener/complete v1.2.3 // indirect + github.com/shopspring/decimal v1.2.0 // indirect + github.com/spf13/cast v1.3.1 // indirect go.opencensus.io v0.23.0 // indirect golang.org/x/oauth2 v0.1.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect diff --git a/go.sum b/go.sum index 3623cc293..ef585460a 100644 --- a/go.sum +++ b/go.sum @@ -21,13 +21,12 @@ github.com/ChrisTrenkamp/goxpath v0.0.0-20170922090931-c385f95c6022/go.mod h1:nu github.com/ChrisTrenkamp/goxpath v0.0.0-20210404020558-97928f7e12b6 h1:w0E0fgc1YafGEh5cROhlROMWXiNoZqApk2PDN0M1+Ns= github.com/ChrisTrenkamp/goxpath v0.0.0-20210404020558-97928f7e12b6/go.mod h1:nuWgzSkT5PnyOd+272uUmV0dnAnAn42Mk7PiQC5VzN4= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= -github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= -github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= -github.com/Masterminds/sprig v2.22.0+incompatible h1:z4yfnGrZ7netVz+0EDJ0Wi+5VZCSYp4Z0m2dk6cEM60= -github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= +github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc= +github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= +github.com/Masterminds/sprig/v3 v3.2.1 h1:n6EPaDyLSvCEa3frruQvAiHuNp2dhBlMSmkEr+HuzGc= +github.com/Masterminds/sprig/v3 v3.2.1/go.mod h1:UoaO7Yp8KlPnJIYWTFkMaqPUYKTfGFPhxNuwnnxkKlk= github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= github.com/Microsoft/hcsshim v0.8.9/go.mod h1:5692vkUqntj1idxauYlpoINNKeqCiG6Sg38RRsjT5y8= github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= @@ -172,6 +171,7 @@ github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/ github.com/google/martian/v3 v3.2.1 h1:d8MncMlErDFTwQGBK1xhv026j9kqhvw1Qv9IbWT1VLQ= 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/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -264,6 +264,7 @@ github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKe github.com/hashicorp/yamux v0.0.0-20210826001029-26ff87cf9493 h1:brI5vBRUlAlM34VFmnLPwjnCL/FxAJp9XvOdX6Zt+XE= github.com/hashicorp/yamux v0.0.0-20210826001029-26ff87cf9493/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/huandu/xstrings v1.3.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/huandu/xstrings v1.3.2 h1:L18LIDzqlW6xN2rEkpdV8+oL/IXWJ1APd+vsdYy4Wdw= github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= @@ -320,8 +321,8 @@ github.com/miekg/dns v1.1.26 h1:gPxPSwALAeHJSjarOs00QjVdV9QoBvc1D2ujQUr5BzU= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= -github.com/mitchellh/cli v1.1.2 h1:PvH+lL2B7IQ101xQL63Of8yFS2y+aDlsFcsqNc+u/Kw= -github.com/mitchellh/cli v1.1.2/go.mod h1:6iaV0fGdElS6dPBx0EApTxHrcWvmJphyh2n8YBLPPZ4= +github.com/mitchellh/cli v1.1.5 h1:OxRIeJXpAMztws/XHlN2vu6imG5Dpq+j61AzAX5fLng= +github.com/mitchellh/cli v1.1.5/go.mod h1:v8+iFts2sPIKUV1ltktPXMCC8fumSKFItNcD2cLtRR4= github.com/mitchellh/copystructure v1.0.0 h1:Laisrj+bAB6b/yJwB5Bt3ITZhGJdqmxquMKeZ+mmkFQ= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/go-fs v0.0.0-20180402235330-b7b9ca407fff h1:bFJ74ac7ZK/jyislqiWdzrnENesFt43sNEBRh1xk/+g= @@ -408,10 +409,14 @@ github.com/ryanuber/go-glob v1.0.0 h1:iQh3xXAumdQ+4Ufa5b25cRpC5TYKlno6hsv6Cb3pkB github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ= +github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng= +github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= @@ -448,6 +453,7 @@ golang.org/x/crypto v0.0.0-20190418165655-df01cb2cc480/go.mod h1:WFFai1msRO1wXaE golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200414173820-0848c9571904/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200604202706-70a84ac30bf9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= From 9e65ca16a7ec5bd671a17be25c91d2e7026b43cf Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Wed, 18 Oct 2023 11:43:30 -0400 Subject: [PATCH 081/105] deps: bump github.com/hashicorp/yamux to v0.1.1 --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index fdd5063cd..6f6eb01fb 100644 --- a/go.mod +++ b/go.mod @@ -40,7 +40,7 @@ require ( github.com/hashicorp/golang-lru v0.5.4 // indirect github.com/hashicorp/hcl/v2 v2.16.2 github.com/hashicorp/vault/api v1.1.1 - github.com/hashicorp/yamux v0.0.0-20210826001029-26ff87cf9493 + github.com/hashicorp/yamux v0.1.1 github.com/imdario/mergo v0.3.12 // indirect github.com/jehiah/go-strftime v0.0.0-20171201141054-1d33003b3869 github.com/masterzen/simplexml v0.0.0-20190410153822-31eea3082786 // indirect diff --git a/go.sum b/go.sum index ef585460a..340f38068 100644 --- a/go.sum +++ b/go.sum @@ -261,8 +261,8 @@ github.com/hashicorp/vault/sdk v0.1.14-0.20200519221530-14615acda45f/go.mod h1:W github.com/hashicorp/vault/sdk v0.2.1 h1:S4O6Iv/dyKlE9AUTXGa7VOvZmsCvg36toPKgV4f2P4M= github.com/hashicorp/vault/sdk v0.2.1/go.mod h1:WfUiO1vYzfBkz1TmoE4ZGU7HD0T0Cl/rZwaxjBkgN4U= github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= -github.com/hashicorp/yamux v0.0.0-20210826001029-26ff87cf9493 h1:brI5vBRUlAlM34VFmnLPwjnCL/FxAJp9XvOdX6Zt+XE= -github.com/hashicorp/yamux v0.0.0-20210826001029-26ff87cf9493/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= +github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= +github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/xstrings v1.3.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/huandu/xstrings v1.3.2 h1:L18LIDzqlW6xN2rEkpdV8+oL/IXWJ1APd+vsdYy4Wdw= From 4d8c19979f9206cbb118c17637b50d7ce7f34331 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Wed, 18 Oct 2023 12:56:39 -0400 Subject: [PATCH 082/105] deps: bump github.com/hashicorp/consul/api to v1.25.1 for security fixes --- go.mod | 24 ++++++++--------- go.sum | 81 ++++++++++++++++++++++++++++++++++------------------------ 2 files changed, 59 insertions(+), 46 deletions(-) diff --git a/go.mod b/go.mod index 6f6eb01fb..26be1024e 100644 --- a/go.mod +++ b/go.mod @@ -10,13 +10,13 @@ require ( github.com/Masterminds/goutils v1.1.1 // indirect github.com/agext/levenshtein v1.2.3 github.com/antchfx/xpath v1.1.11 // indirect - github.com/armon/go-metrics v0.3.9 // indirect + github.com/armon/go-metrics v0.4.1 // indirect github.com/aws/aws-sdk-go v1.44.114 github.com/cenkalti/backoff/v3 v3.2.2 // indirect github.com/dylanmei/iso8601 v0.1.0 // indirect github.com/dylanmei/winrmtest v0.0.0-20210303004826-fbc9ae56efb6 github.com/fatih/camelcase v1.0.0 - github.com/fatih/color v1.12.0 // indirect + github.com/fatih/color v1.14.1 // indirect github.com/fatih/structtag v1.2.0 github.com/gofrs/flock v0.8.1 github.com/gofrs/uuid v4.0.0+incompatible // indirect @@ -25,15 +25,14 @@ require ( github.com/google/go-cmp v0.5.9 github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 github.com/google/uuid v1.3.0 - github.com/hashicorp/consul/api v1.10.1 + github.com/hashicorp/consul/api v1.25.1 github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-getter/gcs/v2 v2.2.1 github.com/hashicorp/go-getter/s3/v2 v2.2.1 github.com/hashicorp/go-getter/v2 v2.2.1 - github.com/hashicorp/go-hclog v0.16.2 // indirect + github.com/hashicorp/go-hclog v1.5.0 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect - github.com/hashicorp/go-msgpack v0.5.5 // indirect github.com/hashicorp/go-multierror v1.1.1 github.com/hashicorp/go-retryablehttp v0.7.0 // indirect github.com/hashicorp/go-version v1.6.0 @@ -45,13 +44,13 @@ require ( github.com/jehiah/go-strftime v0.0.0-20171201141054-1d33003b3869 github.com/masterzen/simplexml v0.0.0-20190410153822-31eea3082786 // indirect github.com/masterzen/winrm v0.0.0-20210623064412-3b76017826b0 - github.com/mattn/go-isatty v0.0.13 // indirect + github.com/mattn/go-isatty v0.0.17 // indirect github.com/mitchellh/cli v1.1.5 github.com/mitchellh/go-fs v0.0.0-20180402235330-b7b9ca407fff github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/go-wordwrap v1.0.1 // indirect github.com/mitchellh/iochan v1.0.0 - github.com/mitchellh/mapstructure v1.4.1 + github.com/mitchellh/mapstructure v1.5.0 github.com/mitchellh/reflectwalk v1.0.0 github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d // indirect github.com/packer-community/winrmcp v0.0.0-20180921211025-c76d91c1e7db @@ -60,7 +59,7 @@ require ( github.com/pkg/errors v0.9.1 github.com/pkg/sftp v1.13.2 github.com/ryanuber/go-glob v1.0.0 - github.com/stretchr/testify v1.7.0 + github.com/stretchr/testify v1.8.3 github.com/ugorji/go/codec v1.2.6 github.com/ulikunitz/xz v0.5.10 // indirect golang.org/x/crypto v0.14.0 @@ -89,7 +88,7 @@ require ( github.com/armon/go-radix v1.0.0 // indirect github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect github.com/bgentry/speakeasy v0.1.0 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/golang/protobuf v1.5.2 // indirect github.com/googleapis/enterprise-certificate-proxy v0.2.0 // indirect github.com/googleapis/gax-go/v2 v2.6.0 // indirect @@ -97,20 +96,21 @@ require ( github.com/hashicorp/go-safetemp v1.0.0 // indirect github.com/hashicorp/go-sockaddr v1.0.2 // indirect github.com/hashicorp/hcl v1.0.0 // indirect - github.com/hashicorp/serf v0.9.5 // indirect + github.com/hashicorp/serf v0.10.1 // indirect github.com/hashicorp/vault/sdk v0.2.1 // indirect github.com/huandu/xstrings v1.3.2 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/klauspost/compress v1.11.2 // indirect github.com/kr/fs v0.1.0 // indirect - github.com/mattn/go-colorable v0.1.8 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect github.com/mitchellh/copystructure v1.0.0 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/posener/complete v1.2.3 // indirect github.com/shopspring/decimal v1.2.0 // indirect github.com/spf13/cast v1.3.1 // indirect go.opencensus.io v0.23.0 // indirect + golang.org/x/exp v0.0.0-20230321023759-10a507213a29 // indirect golang.org/x/oauth2 v0.1.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/appengine v1.6.7 // indirect diff --git a/go.sum b/go.sum index 340f38068..27d12373c 100644 --- a/go.sum +++ b/go.sum @@ -47,8 +47,8 @@ github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hC github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-metrics v0.3.0/go.mod h1:zXjbSimjXTd7vOpY8B0/2LpvNvDoXBuplAD+gJD3GYs= github.com/armon/go-metrics v0.3.3/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= -github.com/armon/go-metrics v0.3.9 h1:O2sNqxBdvq8Eq5xmzljcYzAORli6RWCvEym4cJf9m18= -github.com/armon/go-metrics v0.3.9/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= +github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= +github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= @@ -85,8 +85,9 @@ github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd/go.mod h1:Cm3kw github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= 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= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v1.4.2-0.20200319182547-c7ad2b866182/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= @@ -104,8 +105,9 @@ github.com/fatih/camelcase v1.0.0 h1:hxNvNX/xYBp0ovncs8WyWZrOrpBNub/JfaMvbURyft8 github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= -github.com/fatih/color v1.12.0 h1:mRhaKNwANqRgUBGKmnI5ZxEk7QXmjQeCcuYFMX2bfcc= -github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= +github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/fatih/color v1.14.1 h1:qfhVLaG5s+nCROl1zJsZRxFeYrHLqWroPOQ8BWiNb4w= +github.com/fatih/color v1.14.1/go.mod h1:2oHN61fhTpgcxD3TSWCgKDiH1+x4OiDVVGH8WlgGZGg= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= @@ -156,8 +158,8 @@ github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c h1:964Od4U6p2jUkFxvCydnIczKteheJEzHRToSGK3Bnlw= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -180,10 +182,9 @@ github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/ github.com/googleapis/gax-go/v2 v2.6.0 h1:SXk3ABtQYDT/OH8jAyvEOQ58mgawq5C4o/4/89qN2ZU= github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= github.com/gorilla/mux v1.7.4/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= -github.com/hashicorp/consul/api v1.10.1 h1:MwZJp86nlnL+6+W1Zly4JUuVn9YHhMggBirMpHGD7kw= -github.com/hashicorp/consul/api v1.10.1/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= -github.com/hashicorp/consul/sdk v0.8.0 h1:OJtKBtEjboEZvG6AOUdh4Z1Zbyu0WcxQ0qatRrZHTVU= -github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= +github.com/hashicorp/consul/api v1.25.1 h1:CqrdhYzc8XZuPnhIYZWH45toM0LB9ZeYr/gvpLVI3PE= +github.com/hashicorp/consul/api v1.25.1/go.mod h1:iiLVwR/htV7mas/sy0O+XSuEnrdBUUydemjxcUrAt4g= +github.com/hashicorp/consul/sdk v0.14.1 h1:ZiwE2bKb+zro68sWzZ1SgHF3kRMBZ94TwOCFRF4ylPs= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -202,8 +203,8 @@ github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrj github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-hclog v0.14.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-hclog v0.16.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-hclog v0.16.2 h1:K4ev2ib4LdQETX5cSZBG0DVLk1jwGqSPXBjdah3veNs= -github.com/hashicorp/go-hclog v0.16.2/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= +github.com/hashicorp/go-hclog v1.5.0/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.1.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= @@ -211,7 +212,6 @@ github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjh github.com/hashicorp/go-kms-wrapping/entropy v0.1.0/go.mod h1:d1g9WGtAunDNpek8jUIEJnBlbgKS1N2Q61QkHiZyR1g= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-msgpack v0.5.5 h1:i9R9JSrqIz0QVLz3sz+i3YJdT7TTSLcfLLzJi9aZTuI= -github.com/hashicorp/go-msgpack v0.5.5/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= @@ -233,8 +233,8 @@ github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjG github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.2 h1:cfejS+Tpcp13yd5nYHWDI6qVCny6wyX2Mt5SGur2IGE= github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= @@ -249,11 +249,11 @@ github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T github.com/hashicorp/hcl/v2 v2.16.2 h1:mpkHZh/Tv+xet3sy3F9Ld4FyI2tUpWe9x3XtPx9f1a0= github.com/hashicorp/hcl/v2 v2.16.2/go.mod h1:JRmR89jycNkrrqnMmvPDMd56n1rQJ2Q6KocSLCMCXng= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/mdns v1.0.1/go.mod h1:4gW7WsVCke5TE7EPeYliwHlRUyBtfCwuFwuMg2DmyNY= -github.com/hashicorp/memberlist v0.2.2 h1:5+RffWKwqJ71YPu9mWsF7ZOscZmwfasdA8kbdC7AO2g= -github.com/hashicorp/memberlist v0.2.2/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= -github.com/hashicorp/serf v0.9.5 h1:EBWvyu9tcRszt3Bxp3KNssBMP1KuHWyO51lz9+786iM= -github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk= +github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= +github.com/hashicorp/memberlist v0.5.0 h1:EtYPN8DpAURiapus508I4n9CzHs2W+8NZGbmmR/prTM= +github.com/hashicorp/memberlist v0.5.0/go.mod h1:yvyXLpo0QaGE59Y7hDTsTzDD25JYBZ4mHgHUZ8lrOI0= +github.com/hashicorp/serf v0.10.1 h1:Z1H2J60yRKvfDYAOZLd2MU0ND4AH/WDz7xYHDWQsIPY= +github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= github.com/hashicorp/vault/api v1.0.5-0.20200519221902-385fac77e20f/go.mod h1:euTFbi2YJgwcju3imEt919lhJKF68nN1cQPq3aA+kBE= github.com/hashicorp/vault/api v1.1.1 h1:907ld+Z9cALyvbZK2qUX9cLwvSaEQsMVQB3x2KE8+AI= github.com/hashicorp/vault/api v1.1.1/go.mod h1:29UXcn/1cLOPHQNMWA7bCz2By4PSd0VKPAydKXS5yN0= @@ -306,19 +306,23 @@ github.com/masterzen/winrm v0.0.0-20210623064412-3b76017826b0/go.mod h1:l31LCh9V github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8= -github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.13 h1:qdl+GuBjcsKKDco5BsxPJlId98mSWNKqYA+Co0SC1yA= -github.com/mattn/go-isatty v0.0.13/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= +github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/miekg/dns v1.1.26 h1:gPxPSwALAeHJSjarOs00QjVdV9QoBvc1D2ujQUr5BzU= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= +github.com/miekg/dns v1.1.41 h1:WMszZWJG0XmzbK9FEmzH2TVcqYzFesusSIB41b8KHxY= +github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= github.com/mitchellh/cli v1.1.5 h1:OxRIeJXpAMztws/XHlN2vu6imG5Dpq+j61AzAX5fLng= @@ -341,8 +345,8 @@ github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0Qu github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.3.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag= -github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.0 h1:9D+8oIskB4VJBN5SFlmc27fSlIBZaov1Wpk/IfikLNY= github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -382,8 +386,9 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/sftp v1.13.2 h1:taJnKntsWgU+qae21Rx52lIwndAdKrj0mfUNQsz1z4Q= github.com/pkg/sftp v1.13.2/go.mod h1:LzqnAvaD5TWeNBsZpfKxSYn1MbjWwOsCIAFFJbpIsK8= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/posener/complete v1.2.3 h1:NP0eAhjcjImqslEwo/1hq7gpajME0fTLTezBKDqfXqo= github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= @@ -421,15 +426,17 @@ github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKv github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= +github.com/stretchr/testify v1.8.3 h1:RP3t2pwF7cMEbC1dqtB6poj3niw/9gnV4Cjg5oW5gtY= +github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/ugorji/go v1.2.6/go.mod h1:anCg0y61KIhDlPZmnH+so+RQbysYVyDko0IMgJv0Nn0= github.com/ugorji/go/codec v1.2.6 h1:7kbGefxLoDBuYXOms4yD7223OpNMMPNPZxXk5TvFcyQ= @@ -446,7 +453,6 @@ go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190222235706-ffb98f73852f/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190418165655-df01cb2cc480/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= @@ -462,6 +468,8 @@ golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190731235908-ec7cb31e5a56/go.mod h1:JhuoJpWY28nO4Vef9tZUw9qufEGTyX1+7lmHxV5q5G4= +golang.org/x/exp v0.0.0-20230321023759-10a507213a29 h1:ooxPy7fPvB4kwsA2h+iBNHkAbp/4JxTSwCmvdjEYmug= +golang.org/x/exp v0.0.0-20230321023759-10a507213a29/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -478,7 +486,6 @@ golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -497,6 +504,7 @@ golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.16.0 h1:7eBu7KsSvFDtSXUIDbh3aqlK4DPsZ1rByC8PFfBThos= golang.org/x/net v0.16.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= @@ -516,7 +524,6 @@ golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -533,17 +540,22 @@ golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +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.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -553,6 +565,7 @@ golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= From 530fc82f7348c235e4544000980379566ee13bf7 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Thu, 19 Oct 2023 14:27:38 -0400 Subject: [PATCH 083/105] deps: bump github.com/hashicorp/vault/api to 1.10.0 for security fixes --- go.mod | 10 ++-- go.sum | 163 ++++----------------------------------------------------- 2 files changed, 16 insertions(+), 157 deletions(-) diff --git a/go.mod b/go.mod index 26be1024e..1ef837cc1 100644 --- a/go.mod +++ b/go.mod @@ -21,7 +21,6 @@ require ( github.com/gofrs/flock v0.8.1 github.com/gofrs/uuid v4.0.0+incompatible // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/snappy v0.0.4 // indirect github.com/google/go-cmp v0.5.9 github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 github.com/google/uuid v1.3.0 @@ -38,7 +37,7 @@ require ( github.com/hashicorp/go-version v1.6.0 github.com/hashicorp/golang-lru v0.5.4 // indirect github.com/hashicorp/hcl/v2 v2.16.2 - github.com/hashicorp/vault/api v1.1.1 + github.com/hashicorp/vault/api v1.10.0 github.com/hashicorp/yamux v0.1.1 github.com/imdario/mergo v0.3.12 // indirect github.com/jehiah/go-strftime v0.0.0-20171201141054-1d33003b3869 @@ -54,7 +53,6 @@ require ( github.com/mitchellh/reflectwalk v1.0.0 github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d // indirect github.com/packer-community/winrmcp v0.0.0-20180921211025-c76d91c1e7db - github.com/pierrec/lz4 v2.6.1+incompatible // indirect github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e github.com/pkg/errors v0.9.1 github.com/pkg/sftp v1.13.2 @@ -73,7 +71,6 @@ require ( golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect golang.org/x/tools v0.14.0 google.golang.org/api v0.101.0 // indirect - gopkg.in/square/go-jose.v2 v2.6.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) @@ -89,19 +86,22 @@ require ( github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect github.com/bgentry/speakeasy v0.1.0 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/go-jose/go-jose/v3 v3.0.0 // indirect github.com/golang/protobuf v1.5.2 // indirect github.com/googleapis/enterprise-certificate-proxy v0.2.0 // indirect github.com/googleapis/gax-go/v2 v2.6.0 // indirect github.com/hashicorp/go-rootcerts v1.0.2 // indirect github.com/hashicorp/go-safetemp v1.0.0 // indirect + github.com/hashicorp/go-secure-stdlib/parseutil v0.1.6 // indirect + github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 // indirect github.com/hashicorp/go-sockaddr v1.0.2 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/hashicorp/serf v0.10.1 // indirect - github.com/hashicorp/vault/sdk v0.2.1 // indirect github.com/huandu/xstrings v1.3.2 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/klauspost/compress v1.11.2 // indirect github.com/kr/fs v0.1.0 // indirect + github.com/kr/pretty v0.2.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mitchellh/copystructure v1.0.0 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect diff --git a/go.sum b/go.sum index 27d12373c..6d8f5184c 100644 --- a/go.sum +++ b/go.sum @@ -1,4 +1,3 @@ -bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.105.0 h1:DNtEKRBAAzeS4KyIory52wWHuClNaXJ5x1F7xa4q+5Y= cloud.google.com/go v0.105.0/go.mod h1:PrLgOJNe5nfE9UMxKxgXj4mD3voiP+YQ6gdt6KMFOKM= @@ -11,7 +10,6 @@ cloud.google.com/go/iam v0.6.0/go.mod h1:+1AH33ueBne5MzYccyMHtEKqLE4/kJOibtffMHD cloud.google.com/go/longrunning v0.1.1 h1:y50CXG4j0+qvEukslYFBCrzaXX0qpFbBzc3PchSu/LE= cloud.google.com/go/storage v1.27.0 h1:YOO045NZI9RKfCj1c5A/ZtuuENUc8OAW+gHdGnDgyMQ= cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= -github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-ntlmssp v0.0.0-20180810175552-4a21cbd618b4/go.mod h1:chxPXzSsl7ZWRAuOIE23GDNzjWuZquvFlgA8xmpunjU= github.com/Azure/go-ntlmssp v0.0.0-20200615164410-66371956d46c h1:/IBSNwUN8+eKzUzbJPqhK839ygXJ82sde8x3ogr6R28= github.com/Azure/go-ntlmssp v0.0.0-20200615164410-66371956d46c/go.mod h1:chxPXzSsl7ZWRAuOIE23GDNzjWuZquvFlgA8xmpunjU= @@ -27,8 +25,6 @@ github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030I github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= github.com/Masterminds/sprig/v3 v3.2.1 h1:n6EPaDyLSvCEa3frruQvAiHuNp2dhBlMSmkEr+HuzGc= github.com/Masterminds/sprig/v3 v3.2.1/go.mod h1:UoaO7Yp8KlPnJIYWTFkMaqPUYKTfGFPhxNuwnnxkKlk= -github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= -github.com/Microsoft/hcsshim v0.8.9/go.mod h1:5692vkUqntj1idxauYlpoINNKeqCiG6Sg38RRsjT5y8= github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= @@ -45,15 +41,11 @@ github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6 github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-metrics v0.3.0/go.mod h1:zXjbSimjXTd7vOpY8B0/2LpvNvDoXBuplAD+gJD3GYs= -github.com/armon/go-metrics v0.3.3/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/aws/aws-sdk-go v1.25.37/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.30.27/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= github.com/aws/aws-sdk-go v1.44.114 h1:plIkWc/RsHr3DXBj4MEw9sEW4CcL/e2ryokc+CKyq1I= github.com/aws/aws-sdk-go v1.44.114/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -63,7 +55,6 @@ github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d h1:xDfNPAt8lFiC1U github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ00z/TKoufEY6K/a0k6AhaJrQKdFe6OfVXsa4= github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/cenkalti/backoff/v3 v3.0.0/go.mod h1:cIeZDE3IrqwwJl6VUwCN6trj1oXrTS4rc0ij+ULvLYs= github.com/cenkalti/backoff/v3 v3.2.2 h1:cfUAAO3yvKMYKPrvhDuHSwQnhZNk/RMHKdZqKTxfm6M= github.com/cenkalti/backoff/v3 v3.2.2/go.mod h1:cIeZDE3IrqwwJl6VUwCN6trj1oXrTS4rc0ij+ULvLYs= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= @@ -72,27 +63,10 @@ github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6D github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko= -github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= -github.com/containerd/containerd v1.3.2/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.3.4/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= -github.com/containerd/continuity v0.0.0-20200709052629-daa8e1ccc0bc/go.mod h1:cECdGN1O8G9bgKTlLhuPJimka6Xb/Gg7vYzCTNVxhvo= -github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= -github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0= -github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= -github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v1.4.2-0.20200319182547-c7ad2b866182/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= -github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dylanmei/iso8601 v0.1.0 h1:812NGQDBcqquTfH5Yeo7lwR0nzx/cKdsmf3qMjPURUI= github.com/dylanmei/iso8601 v0.1.0/go.mod h1:w9KhXSgIyROl1DefbMYIE7UVSIvELTbMrCfx+QkYnoQ= github.com/dylanmei/winrmtest v0.0.0-20210303004826-fbc9ae56efb6 h1:zWydSUQBJApHwpQ4guHi+mGyQN/8yN6xbKWdDtL3ZNM= @@ -108,33 +82,22 @@ github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.14.1 h1:qfhVLaG5s+nCROl1zJsZRxFeYrHLqWroPOQ8BWiNb4w= github.com/fatih/color v1.14.1/go.mod h1:2oHN61fhTpgcxD3TSWCgKDiH1+x4OiDVVGH8WlgGZGg= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= -github.com/frankban/quicktest v1.10.0 h1:Gfh+GAJZOAoKZsIZeZbdn2JF10kN1XHNvjsvQK8gVkE= -github.com/frankban/quicktest v1.10.0/go.mod h1:ui7WezCLWMWxVWr1GETZY3smRy0G4KWq9vcPtJmFl7Y= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/go-asn1-ber/asn1-ber v1.3.1/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0= +github.com/go-jose/go-jose/v3 v3.0.0 h1:s6rrhirfEP/CGIoc6p+PZAeogN2SxKav6Wp7+dyMWVo= +github.com/go-jose/go-jose/v3 v3.0.0/go.mod h1:RNkWWRld676jZEYoV3+XK8L2ZnNSvIsxFMht0mSX+u8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-ldap/ldap/v3 v3.1.3/go.mod h1:3rbOH3jRS2u6jg2rJnKAMLE/xQyCKIveG2Sa/Cohzb8= -github.com/go-ldap/ldap/v3 v3.1.10/go.mod h1:5Zun81jBTabRaI8lzN7E1JjyEl1g6zI6u9pd8luAK4Q= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= -github.com/go-test/deep v1.0.2/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68= -github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gofrs/uuid v4.0.0+incompatible h1:1SD/1F5pU8p29ybwgQSwpQk+mwdRrXCYuPhW6m+TnJw= github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= @@ -143,21 +106,16 @@ github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfb github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= -github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -181,7 +139,6 @@ github.com/googleapis/enterprise-certificate-proxy v0.2.0 h1:y8Yozv7SZtlU//QXbez github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= github.com/googleapis/gax-go/v2 v2.6.0 h1:SXk3ABtQYDT/OH8jAyvEOQ58mgawq5C4o/4/89qN2ZU= github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= -github.com/gorilla/mux v1.7.4/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/hashicorp/consul/api v1.25.1 h1:CqrdhYzc8XZuPnhIYZWH45toM0LB9ZeYr/gvpLVI3PE= github.com/hashicorp/consul/api v1.25.1/go.mod h1:iiLVwR/htV7mas/sy0O+XSuEnrdBUUydemjxcUrAt4g= github.com/hashicorp/consul/sdk v0.14.1 h1:ZiwE2bKb+zro68sWzZ1SgHF3kRMBZ94TwOCFRF4ylPs= @@ -198,50 +155,40 @@ github.com/hashicorp/go-getter/s3/v2 v2.2.1 h1:Psuhz6iuCxJOd3kGinK46x+4BzcJgwff8 github.com/hashicorp/go-getter/s3/v2 v2.2.1/go.mod h1:KDqfEPgpwZIy+1sAplFX231CE+M6wdL5Q/j6OMbKSnw= github.com/hashicorp/go-getter/v2 v2.2.1 h1:2JXqPZs1Jej67RtdTi0YZaEB2hEFB3fkBA4cPYKQwFQ= github.com/hashicorp/go-getter/v2 v2.2.1/go.mod h1:EcJx6oZE8hmGuRR1l38QrfnyiujQbwsEAn11eHv6l2M= -github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd/go.mod h1:9bjs9uLqI8l75knNv3lV1kA55veR+WUPSiKIWcQHudI= github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= -github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-hclog v0.14.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-hclog v0.16.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= github.com/hashicorp/go-hclog v1.5.0/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.1.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= 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-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-msgpack v0.5.5 h1:i9R9JSrqIz0QVLz3sz+i3YJdT7TTSLcfLLzJi9aZTuI= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= -github.com/hashicorp/go-plugin v1.0.1/go.mod h1:++UyYGoz3o5w9ZzAdZxtQKrWWP+iqPBn3cQptSMzBuY= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= -github.com/hashicorp/go-retryablehttp v0.6.2/go.mod h1:gEx6HMUGxYYhJScX7W1Il64m6cc2C1mDaW3NQ9sY1FY= -github.com/hashicorp/go-retryablehttp v0.6.6/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= github.com/hashicorp/go-retryablehttp v0.7.0 h1:eu1EI/mbirUgP5C8hVsTNaGZreBDlYiwC1FZWkvQPQ4= github.com/hashicorp/go-retryablehttp v0.7.0/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= -github.com/hashicorp/go-rootcerts v1.0.1/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc= github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo= github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoDHxNAB65b+Rj1I= +github.com/hashicorp/go-secure-stdlib/parseutil v0.1.6 h1:om4Al8Oy7kCm/B86rLCLah4Dt5Aa0Fr5rYBG60OzwHQ= +github.com/hashicorp/go-secure-stdlib/parseutil v0.1.6/go.mod h1:QmrqtbKuxxSWTN3ETMPuB+VtEiBJ/A9XhoYGv8E1uD8= +github.com/hashicorp/go-secure-stdlib/strutil v0.1.1/go.mod h1:gKOamz3EwoIoJq7mlMIRBpVTAUn8qPCrEclOKKWhD3U= +github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 h1:kes8mmyCpxJsI7FTwtzRqEy9CdjCtrXrXGuOpxEA7Ts= +github.com/hashicorp/go-secure-stdlib/strutil v0.1.2/go.mod h1:Gou2R9+il93BqX25LAKCLuM+y9U2T4hlwvT1yprcna4= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= github.com/hashicorp/go-sockaddr v1.0.2 h1:ztczhD1jLxIRjVejw8gFomI1BQZOe2WoVOu0SyteCQc= github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= -github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= @@ -254,27 +201,18 @@ github.com/hashicorp/memberlist v0.5.0 h1:EtYPN8DpAURiapus508I4n9CzHs2W+8NZGbmmR github.com/hashicorp/memberlist v0.5.0/go.mod h1:yvyXLpo0QaGE59Y7hDTsTzDD25JYBZ4mHgHUZ8lrOI0= github.com/hashicorp/serf v0.10.1 h1:Z1H2J60yRKvfDYAOZLd2MU0ND4AH/WDz7xYHDWQsIPY= github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= -github.com/hashicorp/vault/api v1.0.5-0.20200519221902-385fac77e20f/go.mod h1:euTFbi2YJgwcju3imEt919lhJKF68nN1cQPq3aA+kBE= -github.com/hashicorp/vault/api v1.1.1 h1:907ld+Z9cALyvbZK2qUX9cLwvSaEQsMVQB3x2KE8+AI= -github.com/hashicorp/vault/api v1.1.1/go.mod h1:29UXcn/1cLOPHQNMWA7bCz2By4PSd0VKPAydKXS5yN0= -github.com/hashicorp/vault/sdk v0.1.14-0.20200519221530-14615acda45f/go.mod h1:WX57W2PwkrOPQ6rVQk+dy5/htHIaB4aBM70EwKThu10= -github.com/hashicorp/vault/sdk v0.2.1 h1:S4O6Iv/dyKlE9AUTXGa7VOvZmsCvg36toPKgV4f2P4M= -github.com/hashicorp/vault/sdk v0.2.1/go.mod h1:WfUiO1vYzfBkz1TmoE4ZGU7HD0T0Cl/rZwaxjBkgN4U= -github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= +github.com/hashicorp/vault/api v1.10.0 h1:/US7sIjWN6Imp4o/Rj1Ce2Nr5bki/AXi9vAW3p2tOJQ= +github.com/hashicorp/vault/api v1.10.0/go.mod h1:jo5Y/ET+hNyz+JnKDt8XLAdKs+AM0G5W0Vp1IrFI8N8= github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/xstrings v1.3.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/huandu/xstrings v1.3.2 h1:L18LIDzqlW6xN2rEkpdV8+oL/IXWJ1APd+vsdYy4Wdw= github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/jehiah/go-strftime v0.0.0-20171201141054-1d33003b3869 h1:IPJ3dvxmJ4uczJe5YQdrYB16oTJlGSC/OyZDqUk9xX4= github.com/jehiah/go-strftime v0.0.0-20171201141054-1d33003b3869/go.mod h1:cJ6Cj7dQo+O6GJNiMx+Pa94qKj+TG8ONdKHgMNIyyag= -github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= -github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= @@ -282,9 +220,6 @@ github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfC github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= -github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.11.2 h1:MiK62aErc3gIiVEtyzKfeOHgW7atJb5g/KNX5m3c2nQ= github.com/klauspost/compress v1.11.2/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= @@ -297,7 +232,6 @@ github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfn github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/masterzen/simplexml v0.0.0-20160608183007-4572e39b1ab9/go.mod h1:kCEbxUJlNDEBNbdQMkPSp6yaKcRXVI6f4ddk8Riv4bc= github.com/masterzen/simplexml v0.0.0-20190410153822-31eea3082786 h1:2ZKn+w/BJeL43sCxI2jhPLRv73oVVOjEKZjKkflyqxg= github.com/masterzen/simplexml v0.0.0-20190410153822-31eea3082786/go.mod h1:kCEbxUJlNDEBNbdQMkPSp6yaKcRXVI6f4ddk8Riv4bc= @@ -312,7 +246,6 @@ github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxec github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= @@ -333,8 +266,6 @@ github.com/mitchellh/go-fs v0.0.0-20180402235330-b7b9ca407fff h1:bFJ74ac7ZK/jyis github.com/mitchellh/go-fs v0.0.0-20180402235330-b7b9ca407fff/go.mod h1:g7SZj7ABpStq3tM4zqHiVEG5un/DZ1+qJJKO7qx1EvU= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= @@ -343,8 +274,7 @@ github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTS github.com/mitchellh/iochan v1.0.0 h1:C+X3KsSTLFVBr/tK1eYN/vs4rJcvsiLU338UhYPJWeY= github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.3.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.0 h1:9D+8oIskB4VJBN5SFlmc27fSlIBZaov1Wpk/IfikLNY= @@ -353,34 +283,17 @@ github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d h1:VhgPp6v9qf9Agr/56bj7Y/xa04UccTW04VP0Qed4vnQ= github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d/go.mod h1:YUTz3bUH2ZwIWBy3CJBeOBEugqcmXREj14T+iG/4k4U= -github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= -github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= -github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= -github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= -github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/packer-community/winrmcp v0.0.0-20180921211025-c76d91c1e7db h1:9uViuKtx1jrlXLBW/pMnhOfzn3iSEdLase/But/IZRU= github.com/packer-community/winrmcp v0.0.0-20180921211025-c76d91c1e7db/go.mod h1:f6Izs6JvFTdnRbziASagjZ2vmf55NSIkC/weStxCHqk= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= -github.com/pierrec/lz4 v2.5.2+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= -github.com/pierrec/lz4 v2.6.1+incompatible h1:9UY3+iC23yxF0UfGaYrGplQ+79Rg+h/q9FV9ix19jjM= -github.com/pierrec/lz4 v2.6.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e h1:aoZm08cpOy4WuID//EZDgcC4zIxODThtZNPirFr42+A= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1-0.20171018195549-f15c970de5b7/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -393,19 +306,15 @@ github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndr github.com/posener/complete v1.2.3 h1:NP0eAhjcjImqslEwo/1hq7gpajME0fTLTezBKDqfXqo= github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4xf/QclQDMrYNZzcM= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= -github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= @@ -416,15 +325,10 @@ github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUt github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ= github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= -github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= @@ -443,24 +347,19 @@ github.com/ugorji/go/codec v1.2.6 h1:7kbGefxLoDBuYXOms4yD7223OpNMMPNPZxXk5TvFcyQ github.com/ugorji/go/codec v1.2.6/go.mod h1:V6TCNZ4PHqoHGFZuSG1W8nrCzzdgA2DozYxWFFpvxTw= github.com/ulikunitz/xz v0.5.10 h1:t92gobL9l3HE202wg3rlk19F6X+JOxl9BBrCCMYEYd8= github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= -github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/zclconf/go-cty v1.12.1 h1:PcupnljUm9EIvbgSHQnHhUr3fO6oFmkOrvs2BAFNXXY= github.com/zclconf/go-cty v1.12.1/go.mod h1:s9IfD1LK5ccNMSWCVFCE2rJfHiZgi7JijgeWIMfhLvA= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190222235706-ffb98f73852f/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190418165655-df01cb2cc480/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200414173820-0848c9571904/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200604202706-70a84ac30bf9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= @@ -475,7 +374,6 @@ golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+o golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20210901025245-1fde1d6c3ca1 h1:t3ZHqovedSY8DEAUmZA99fPJhUhOb176PLACYA1sJ8Y= golang.org/x/mobile v0.0.0-20210901025245-1fde1d6c3ca1/go.mod h1:jFTmtFYCV0MFtXBU+J5V/+5AUeVS0ON/0WkE/KSrl6E= @@ -485,21 +383,14 @@ golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY= golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= @@ -514,7 +405,6 @@ golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -523,26 +413,18 @@ golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190514135907-3a4b5fb9f71f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -569,21 +451,15 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac h1:7zkz7BUtwNFFqcowJ+RIgu2MaV/MapERkDIy+mwPyjs= golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.14.0 h1:jvNa2pY0M4r62jkRQ6RwEZZyPcymeL9XZMLBbV7U2nc= @@ -601,21 +477,14 @@ google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c h1:QgY/XxIAIeccR+Ca/rDdKubLIU9rcJ3xfy1DC/Wd2Oo= google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c/go.mod h1:CGI5F/G+E5bKwmfYo09AXuVN4dD894kIKUFmVbP2/Fo= -google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.50.1 h1:DS/BukOZWp8s6p4Dt/tOaJaTQyPyOoCcrjroHuCeLzY= google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= @@ -632,19 +501,11 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= -gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= -gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= -gopkg.in/square/go-jose.v2 v2.6.0 h1:NGk74WTnPKBNUhNzQX7PYcTLUjoq7mzKk2OKbvwk2iI= -gopkg.in/square/go-jose.v2 v2.6.0/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -655,7 +516,5 @@ gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= -gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= From 3327058760ca32340bb5be4b72ab52533a8c3597 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Thu, 19 Oct 2023 14:32:26 -0400 Subject: [PATCH 084/105] depg: bump golang.org/x/net to 0.17.0 for security fixes --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 1ef837cc1..18e51a748 100644 --- a/go.mod +++ b/go.mod @@ -63,7 +63,7 @@ require ( golang.org/x/crypto v0.14.0 golang.org/x/mobile v0.0.0-20210901025245-1fde1d6c3ca1 golang.org/x/mod v0.13.0 - golang.org/x/net v0.16.0 + golang.org/x/net v0.17.0 golang.org/x/sync v0.4.0 golang.org/x/sys v0.13.0 // indirect golang.org/x/term v0.13.0 diff --git a/go.sum b/go.sum index 6d8f5184c..d06e5d11c 100644 --- a/go.sum +++ b/go.sum @@ -397,8 +397,8 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.16.0 h1:7eBu7KsSvFDtSXUIDbh3aqlK4DPsZ1rByC8PFfBThos= -golang.org/x/net v0.16.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.1.0 h1:isLCZuhj4v+tYv7eskaN4v/TM+A1begWWgyVJDdl1+Y= golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= From fe7beb7a9364f4cc1badf8a87618a7bf3bb25a8f Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Thu, 26 Oct 2023 10:56:05 -0400 Subject: [PATCH 085/105] Bump upstream modules to support latest hcl/v2 offerrings --- go.mod | 5 +++-- go.sum | 11 +++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 18e51a748..f33ae0427 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/hashicorp/packer-plugin-sdk -require github.com/zclconf/go-cty v1.12.1 // go-cty v1.11.0 removed gob encoding support so it cannot work with the Packer SDK as-is, you need to run `packer-sdc fix .' to change that +require github.com/zclconf/go-cty v1.13.3 // go-cty v1.11.0 removed gob encoding support so it cannot work with the Packer SDK as-is, you need to run `packer-sdc fix .' to change that require ( cloud.google.com/go v0.105.0 // indirect @@ -36,7 +36,7 @@ require ( github.com/hashicorp/go-retryablehttp v0.7.0 // indirect github.com/hashicorp/go-version v1.6.0 github.com/hashicorp/golang-lru v0.5.4 // indirect - github.com/hashicorp/hcl/v2 v2.16.2 + github.com/hashicorp/hcl/v2 v2.19.1 github.com/hashicorp/vault/api v1.10.0 github.com/hashicorp/yamux v0.1.1 github.com/imdario/mergo v0.3.12 // indirect @@ -82,6 +82,7 @@ require ( github.com/Masterminds/sprig/v3 v3.2.1 // indirect github.com/antchfx/xmlquery v1.3.5 // indirect github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect + github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect github.com/armon/go-radix v1.0.0 // indirect github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect github.com/bgentry/speakeasy v0.1.0 // indirect diff --git a/go.sum b/go.sum index d06e5d11c..07c24b689 100644 --- a/go.sum +++ b/go.sum @@ -39,6 +39,8 @@ github.com/antchfx/xpath v1.1.11/go.mod h1:i54GszH55fYfBmoZXapTHN8T8tkcHfRgLyVww github.com/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3 h1:ZSTrOEhiM5J5RFxEaFvMZVEAM1KvT1YzbEOwB2EAGjA= github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6iT90AvPUL1NNfNw= github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo= +github.com/apparentlymart/go-textseg/v15 v15.0.0 h1:uYvfpb3DyLSCGWnctWKGj857c6ew1u1fNQOlOtuGxQY= +github.com/apparentlymart/go-textseg/v15 v15.0.0/go.mod h1:K8XmNZdhEBkdlyDdvbmmsvpAG721bKi0joRfFdHIWJ4= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= @@ -193,8 +195,8 @@ github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+l github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hashicorp/hcl/v2 v2.16.2 h1:mpkHZh/Tv+xet3sy3F9Ld4FyI2tUpWe9x3XtPx9f1a0= -github.com/hashicorp/hcl/v2 v2.16.2/go.mod h1:JRmR89jycNkrrqnMmvPDMd56n1rQJ2Q6KocSLCMCXng= +github.com/hashicorp/hcl/v2 v2.19.1 h1://i05Jqznmb2EXqa39Nsvyan2o5XyMowW5fnCKW5RPI= +github.com/hashicorp/hcl/v2 v2.19.1/go.mod h1:ThLC89FV4p9MPW804KVbe/cEXoQ8NZEh+JtMeeGErHE= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= github.com/hashicorp/memberlist v0.5.0 h1:EtYPN8DpAURiapus508I4n9CzHs2W+8NZGbmmR/prTM= @@ -348,8 +350,9 @@ github.com/ugorji/go/codec v1.2.6/go.mod h1:V6TCNZ4PHqoHGFZuSG1W8nrCzzdgA2DozYxW github.com/ulikunitz/xz v0.5.10 h1:t92gobL9l3HE202wg3rlk19F6X+JOxl9BBrCCMYEYd8= github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/zclconf/go-cty v1.12.1 h1:PcupnljUm9EIvbgSHQnHhUr3fO6oFmkOrvs2BAFNXXY= -github.com/zclconf/go-cty v1.12.1/go.mod h1:s9IfD1LK5ccNMSWCVFCE2rJfHiZgi7JijgeWIMfhLvA= +github.com/zclconf/go-cty v1.13.3 h1:m+b9q3YDbg6Bec5rr+KGy1MzEVzY/jC2X+YX4yqKtHI= +github.com/zclconf/go-cty v1.13.3/go.mod h1:YKQzy/7pZ7iq2jNFzy5go57xdxdWoLLpaEp4u238AE0= +github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b h1:FosyBZYxY34Wul7O/MSKey3txpPYyCqVO5ZyceuQJEI= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= From c170d73c625e86e2537fdc3f06b3f930c3acd0d3 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Thu, 26 Oct 2023 11:05:27 -0400 Subject: [PATCH 086/105] Update go-cty fixer replace directive to github.com/nywilken/go-cty v1.13.3 --- cmd/packer-sdc/internal/fix/gocty.go | 2 +- cmd/packer-sdc/internal/fix/gocty_test.go | 1 - cmd/packer-sdc/internal/fix/testdata/fixed/basic/go.mod | 2 +- cmd/packer-sdc/internal/fix/testdata/fixed/many-replace/go.mod | 2 +- cmd/packer-sdc/internal/fix/testdata/unfixed/basic/fixed.go.mod | 2 +- .../internal/fix/testdata/unfixed/many-replace/fixed.go.mod | 2 +- .../internal/fix/testdata/unfixed/version/fixed.go.mod | 2 +- cmd/packer-sdc/internal/fix/testdata/unfixed/version/go.mod | 2 +- 8 files changed, 7 insertions(+), 8 deletions(-) diff --git a/cmd/packer-sdc/internal/fix/gocty.go b/cmd/packer-sdc/internal/fix/gocty.go index d12c269de..ebb243d0b 100644 --- a/cmd/packer-sdc/internal/fix/gocty.go +++ b/cmd/packer-sdc/internal/fix/gocty.go @@ -15,7 +15,7 @@ const ( sdkPath string = "github.com/hashicorp/packer-plugin-sdk" oldPath string = "github.com/zclconf/go-cty" newPath string = "github.com/nywilken/go-cty" - newVersion string = "1.12.1" + newVersion string = "1.13.3" modFilename string = "go.mod" ) diff --git a/cmd/packer-sdc/internal/fix/gocty_test.go b/cmd/packer-sdc/internal/fix/gocty_test.go index 132898edb..5ec0c1cf1 100644 --- a/cmd/packer-sdc/internal/fix/gocty_test.go +++ b/cmd/packer-sdc/internal/fix/gocty_test.go @@ -101,7 +101,6 @@ func TestFixGoCty_Unfixed(t *testing.T) { }, { name: "out of date fix", - versionStr: "1.13.1", fixtureDir: filepath.Join("testdata", "unfixed", "version"), }, } diff --git a/cmd/packer-sdc/internal/fix/testdata/fixed/basic/go.mod b/cmd/packer-sdc/internal/fix/testdata/fixed/basic/go.mod index 4247f0444..d88f7979e 100644 --- a/cmd/packer-sdc/internal/fix/testdata/fixed/basic/go.mod +++ b/cmd/packer-sdc/internal/fix/testdata/fixed/basic/go.mod @@ -8,4 +8,4 @@ require ( github.com/zclconf/go-cty v1.10.0 ) -replace github.com/zclconf/go-cty => github.com/nywilken/go-cty v1.12.1 +replace github.com/zclconf/go-cty => github.com/nywilken/go-cty v1.13.3 diff --git a/cmd/packer-sdc/internal/fix/testdata/fixed/many-replace/go.mod b/cmd/packer-sdc/internal/fix/testdata/fixed/many-replace/go.mod index b011417ab..00dc509ec 100644 --- a/cmd/packer-sdc/internal/fix/testdata/fixed/many-replace/go.mod +++ b/cmd/packer-sdc/internal/fix/testdata/fixed/many-replace/go.mod @@ -10,4 +10,4 @@ require ( replace github.com/hashicorp/packer-plugin-sdk => github.com/example/packer-plugin-sdk v0.5.0 -replace github.com/zclconf/go-cty => github.com/nywilken/go-cty v1.12.1 // added by packer-sdc fix as noted in github.com/hashicorp/packer-plugin-sdk/issues/187 +replace github.com/zclconf/go-cty => github.com/nywilken/go-cty v1.13.3 // added by packer-sdc fix as noted in github.com/hashicorp/packer-plugin-sdk/issues/187 diff --git a/cmd/packer-sdc/internal/fix/testdata/unfixed/basic/fixed.go.mod b/cmd/packer-sdc/internal/fix/testdata/unfixed/basic/fixed.go.mod index da456395d..9554e74f6 100644 --- a/cmd/packer-sdc/internal/fix/testdata/unfixed/basic/fixed.go.mod +++ b/cmd/packer-sdc/internal/fix/testdata/unfixed/basic/fixed.go.mod @@ -8,4 +8,4 @@ require ( github.com/zclconf/go-cty v1.10.0 ) -replace github.com/zclconf/go-cty => github.com/nywilken/go-cty v1.12.1 // added by packer-sdc fix as noted in github.com/hashicorp/packer-plugin-sdk/issues/187 +replace github.com/zclconf/go-cty => github.com/nywilken/go-cty v1.13.3 // added by packer-sdc fix as noted in github.com/hashicorp/packer-plugin-sdk/issues/187 diff --git a/cmd/packer-sdc/internal/fix/testdata/unfixed/many-replace/fixed.go.mod b/cmd/packer-sdc/internal/fix/testdata/unfixed/many-replace/fixed.go.mod index b011417ab..00dc509ec 100644 --- a/cmd/packer-sdc/internal/fix/testdata/unfixed/many-replace/fixed.go.mod +++ b/cmd/packer-sdc/internal/fix/testdata/unfixed/many-replace/fixed.go.mod @@ -10,4 +10,4 @@ require ( replace github.com/hashicorp/packer-plugin-sdk => github.com/example/packer-plugin-sdk v0.5.0 -replace github.com/zclconf/go-cty => github.com/nywilken/go-cty v1.12.1 // added by packer-sdc fix as noted in github.com/hashicorp/packer-plugin-sdk/issues/187 +replace github.com/zclconf/go-cty => github.com/nywilken/go-cty v1.13.3 // added by packer-sdc fix as noted in github.com/hashicorp/packer-plugin-sdk/issues/187 diff --git a/cmd/packer-sdc/internal/fix/testdata/unfixed/version/fixed.go.mod b/cmd/packer-sdc/internal/fix/testdata/unfixed/version/fixed.go.mod index 90da23380..9554e74f6 100644 --- a/cmd/packer-sdc/internal/fix/testdata/unfixed/version/fixed.go.mod +++ b/cmd/packer-sdc/internal/fix/testdata/unfixed/version/fixed.go.mod @@ -8,4 +8,4 @@ require ( github.com/zclconf/go-cty v1.10.0 ) -replace github.com/zclconf/go-cty => github.com/nywilken/go-cty v1.13.1 // added by packer-sdc fix as noted in github.com/hashicorp/packer-plugin-sdk/issues/187 +replace github.com/zclconf/go-cty => github.com/nywilken/go-cty v1.13.3 // added by packer-sdc fix as noted in github.com/hashicorp/packer-plugin-sdk/issues/187 diff --git a/cmd/packer-sdc/internal/fix/testdata/unfixed/version/go.mod b/cmd/packer-sdc/internal/fix/testdata/unfixed/version/go.mod index 90da23380..da456395d 100644 --- a/cmd/packer-sdc/internal/fix/testdata/unfixed/version/go.mod +++ b/cmd/packer-sdc/internal/fix/testdata/unfixed/version/go.mod @@ -8,4 +8,4 @@ require ( github.com/zclconf/go-cty v1.10.0 ) -replace github.com/zclconf/go-cty => github.com/nywilken/go-cty v1.13.1 // added by packer-sdc fix as noted in github.com/hashicorp/packer-plugin-sdk/issues/187 +replace github.com/zclconf/go-cty => github.com/nywilken/go-cty v1.12.1 // added by packer-sdc fix as noted in github.com/hashicorp/packer-plugin-sdk/issues/187 From 4fb8273a56f0e5b27596bde9196f274242fe95b2 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Wed, 18 Oct 2023 07:19:26 -0400 Subject: [PATCH 087/105] Initial fix for underlying struct mis-match bug Update cmd/packer-sdc/internal/mapstructure-to-hcl2/mapstructure-to-hcl2.go Co-authored-by: Lucas Bajolet <105649352+lbajolet-hashicorp@users.noreply.github.com> --- .../internal/mapstructure-to-hcl2/mapstructure-to-hcl2.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmd/packer-sdc/internal/mapstructure-to-hcl2/mapstructure-to-hcl2.go b/cmd/packer-sdc/internal/mapstructure-to-hcl2/mapstructure-to-hcl2.go index 3cd69a8bc..167f95d7b 100644 --- a/cmd/packer-sdc/internal/mapstructure-to-hcl2/mapstructure-to-hcl2.go +++ b/cmd/packer-sdc/internal/mapstructure-to-hcl2/mapstructure-to-hcl2.go @@ -140,10 +140,16 @@ func (cmd *Command) Run(args []string) int { if !utOk { continue } + pos := sort.SearchStrings(typeNames, id.Name) if pos >= len(typeNames) || typeNames[pos] != id.Name { continue // not a struct we care about } + // Sometimes we see the underlying struct for a similar named type, which results + // in an incorrect FlatMap. If the type names are not exactly the same skip. + if nt.Obj().Name() != id.Name { + continue // not the struct we are looking for + } // make sure each type is found once where somehow sometimes they can be found twice typeNames = append(typeNames[:pos], typeNames[pos+1:]...) flatenedStruct, err := getMapstructureSquashedStruct(obj.Pkg(), utStruct) From e5997459f48300b8cda72a7a1f7c4aae7744b556 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Mon, 13 Nov 2023 09:00:12 -0500 Subject: [PATCH 088/105] packer-sdc/struct-markdown: Allow packer-internal as project directory for testing purposes This change is being made to allow the invocation of struct-markdown to work against the internal Packer testing repo. The purpose of the repo is to allow for automated testing against unreleased versions of the Packer SDK. --- cmd/packer-sdc/internal/struct-markdown/struct_markdown.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/packer-sdc/internal/struct-markdown/struct_markdown.go b/cmd/packer-sdc/internal/struct-markdown/struct_markdown.go index 29a441ee4..966078d65 100644 --- a/cmd/packer-sdc/internal/struct-markdown/struct_markdown.go +++ b/cmd/packer-sdc/internal/struct-markdown/struct_markdown.go @@ -47,7 +47,7 @@ func (cmd *Command) Run(args []string) int { for dir := filepath.Dir(absFilePath); len(dir) > 0 && projectRoot == ""; dir = filepath.Dir(dir) { base := filepath.Base(dir) - if base == "packer" { + if base == "packer" || base == "packer-internal" { projectRoot = dir filePath, _ = filepath.Rel(projectRoot, absFilePath) docsFolder = filepath.Join("website", "content", "partials") From eac3a5f9e45cc356e833ad5f07df62ac622df10d Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Tue, 28 Nov 2023 05:33:06 -0500 Subject: [PATCH 089/105] Cut release v0.5.2 --- .../test-data/mismatch-structs/test.sh | 18 ++++++++ mods.sh | 41 +++++++++++++++++++ version/version.go | 2 +- 3 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 cmd/packer-sdc/internal/test-data/mismatch-structs/test.sh create mode 100644 mods.sh diff --git a/cmd/packer-sdc/internal/test-data/mismatch-structs/test.sh b/cmd/packer-sdc/internal/test-data/mismatch-structs/test.sh new file mode 100644 index 000000000..2a05fa0b1 --- /dev/null +++ b/cmd/packer-sdc/internal/test-data/mismatch-structs/test.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +# + +for x in {1..100}; +do + + packer-sdc -v + echo "Run ${x}" + go generate ./... + git diff --exit-code > /dev/null + if [[ $? -ne 0 ]] + then + echo "bad generate on ${x}" + git status + exit 1 + fi + echo "==========" +done diff --git a/mods.sh b/mods.sh new file mode 100644 index 000000000..e893a1dde --- /dev/null +++ b/mods.sh @@ -0,0 +1,41 @@ +go list -m -u github.com/hashicorp/packer-plugin-sdk +go list -m -u github.com/agext/levenshtein +go list -m -u github.com/aws/aws-sdk-go +go list -m -u github.com/dylanmei/winrmtest +go list -m -u github.com/fatih/camelcase +go list -m -u github.com/fatih/structtag +go list -m -u github.com/gofrs/flock +go list -m -u github.com/google/go-cmp +go list -m -u github.com/google/shlex +go list -m -u github.com/google/uuid +go list -m -u github.com/hashicorp/consul/api +go list -m -u github.com/hashicorp/go-getter/gcs/v2 +go list -m -u github.com/hashicorp/go-getter/s3/v2 +go list -m -u github.com/hashicorp/go-getter/v2 +go list -m -u github.com/hashicorp/go-multierror +go list -m -u github.com/hashicorp/go-version +go list -m -u github.com/hashicorp/hcl/v2 +go list -m -u github.com/hashicorp/vault/api +go list -m -u github.com/hashicorp/yamux +go list -m -u github.com/jehiah/go-strftime +go list -m -u github.com/masterzen/winrm +go list -m -u github.com/mitchellh/cli +go list -m -u github.com/mitchellh/go-fs +go list -m -u github.com/mitchellh/iochan +go list -m -u github.com/mitchellh/mapstructure +go list -m -u github.com/mitchellh/reflectwalk +go list -m -u github.com/packer-community/winrmcp +go list -m -u github.com/pkg/diff +go list -m -u github.com/pkg/errors +go list -m -u github.com/pkg/sftp +go list -m -u github.com/ryanuber/go-glob +go list -m -u github.com/stretchr/testify +go list -m -u github.com/ugorji/go/codec +go list -m -u github.com/zclconf/go-cty +go list -m -u golang.org/x/crypto +go list -m -u golang.org/x/mobile +go list -m -u golang.org/x/mod +go list -m -u golang.org/x/net +go list -m -u golang.org/x/sync +go list -m -u golang.org/x/term +go list -m -u golang.org/x/tools diff --git a/version/version.go b/version/version.go index 1670fd777..6bb60d8f8 100644 --- a/version/version.go +++ b/version/version.go @@ -21,7 +21,7 @@ var Version = "0.5.2" // A pre-release marker for the version. If this is "" (empty string) // then it means that it is a final release. Otherwise, this is a pre-release // such as "dev" (in development), "beta", "rc1", etc. -var VersionPrerelease = "dev" +var VersionPrerelease = "" // SDKVersion is used by the plugin set to allow Packer to recognize // what version of the sdk the plugin is. From 4362ef58488ada9eb3a02af640b1b8a8f253c42d Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Tue, 28 Nov 2023 06:17:06 -0500 Subject: [PATCH 090/105] Prepare for v0.5.3 dev * Remove helper script used for checking go mods * Remove helper script for testing mismatch struct changes --- .../test-data/mismatch-structs/test.sh | 18 -------- mods.sh | 41 ------------------- version/version.go | 4 +- 3 files changed, 2 insertions(+), 61 deletions(-) delete mode 100644 cmd/packer-sdc/internal/test-data/mismatch-structs/test.sh delete mode 100644 mods.sh diff --git a/cmd/packer-sdc/internal/test-data/mismatch-structs/test.sh b/cmd/packer-sdc/internal/test-data/mismatch-structs/test.sh deleted file mode 100644 index 2a05fa0b1..000000000 --- a/cmd/packer-sdc/internal/test-data/mismatch-structs/test.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env bash -# - -for x in {1..100}; -do - - packer-sdc -v - echo "Run ${x}" - go generate ./... - git diff --exit-code > /dev/null - if [[ $? -ne 0 ]] - then - echo "bad generate on ${x}" - git status - exit 1 - fi - echo "==========" -done diff --git a/mods.sh b/mods.sh deleted file mode 100644 index e893a1dde..000000000 --- a/mods.sh +++ /dev/null @@ -1,41 +0,0 @@ -go list -m -u github.com/hashicorp/packer-plugin-sdk -go list -m -u github.com/agext/levenshtein -go list -m -u github.com/aws/aws-sdk-go -go list -m -u github.com/dylanmei/winrmtest -go list -m -u github.com/fatih/camelcase -go list -m -u github.com/fatih/structtag -go list -m -u github.com/gofrs/flock -go list -m -u github.com/google/go-cmp -go list -m -u github.com/google/shlex -go list -m -u github.com/google/uuid -go list -m -u github.com/hashicorp/consul/api -go list -m -u github.com/hashicorp/go-getter/gcs/v2 -go list -m -u github.com/hashicorp/go-getter/s3/v2 -go list -m -u github.com/hashicorp/go-getter/v2 -go list -m -u github.com/hashicorp/go-multierror -go list -m -u github.com/hashicorp/go-version -go list -m -u github.com/hashicorp/hcl/v2 -go list -m -u github.com/hashicorp/vault/api -go list -m -u github.com/hashicorp/yamux -go list -m -u github.com/jehiah/go-strftime -go list -m -u github.com/masterzen/winrm -go list -m -u github.com/mitchellh/cli -go list -m -u github.com/mitchellh/go-fs -go list -m -u github.com/mitchellh/iochan -go list -m -u github.com/mitchellh/mapstructure -go list -m -u github.com/mitchellh/reflectwalk -go list -m -u github.com/packer-community/winrmcp -go list -m -u github.com/pkg/diff -go list -m -u github.com/pkg/errors -go list -m -u github.com/pkg/sftp -go list -m -u github.com/ryanuber/go-glob -go list -m -u github.com/stretchr/testify -go list -m -u github.com/ugorji/go/codec -go list -m -u github.com/zclconf/go-cty -go list -m -u golang.org/x/crypto -go list -m -u golang.org/x/mobile -go list -m -u golang.org/x/mod -go list -m -u golang.org/x/net -go list -m -u golang.org/x/sync -go list -m -u golang.org/x/term -go list -m -u golang.org/x/tools diff --git a/version/version.go b/version/version.go index 6bb60d8f8..32802db96 100644 --- a/version/version.go +++ b/version/version.go @@ -16,12 +16,12 @@ import ( var GitCommit string // Package version helps plugin creators set and track the sdk version using -var Version = "0.5.2" +var Version = "0.5.3" // A pre-release marker for the version. If this is "" (empty string) // then it means that it is a final release. Otherwise, this is a pre-release // such as "dev" (in development), "beta", "rc1", etc. -var VersionPrerelease = "" +var VersionPrerelease = "dev" // SDKVersion is used by the plugin set to allow Packer to recognize // what version of the sdk the plugin is. From f9edec769189217e727b2267606cc2a32385e12a Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Mon, 8 Jan 2024 12:58:36 -0500 Subject: [PATCH 091/105] Bump golang.org/x/crypto to address CVE-2023-48795 --- go.mod | 8 ++++---- go.sum | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index f33ae0427..70f3f37be 100644 --- a/go.mod +++ b/go.mod @@ -60,14 +60,14 @@ require ( github.com/stretchr/testify v1.8.3 github.com/ugorji/go/codec v1.2.6 github.com/ulikunitz/xz v0.5.10 // indirect - golang.org/x/crypto v0.14.0 + golang.org/x/crypto v0.17.0 golang.org/x/mobile v0.0.0-20210901025245-1fde1d6c3ca1 golang.org/x/mod v0.13.0 golang.org/x/net v0.17.0 golang.org/x/sync v0.4.0 - golang.org/x/sys v0.13.0 // indirect - golang.org/x/term v0.13.0 - golang.org/x/text v0.13.0 // indirect + golang.org/x/sys v0.15.0 // indirect + golang.org/x/term v0.15.0 + golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect golang.org/x/tools v0.14.0 google.golang.org/api v0.101.0 // indirect diff --git a/go.sum b/go.sum index 07c24b689..366761cea 100644 --- a/go.sum +++ b/go.sum @@ -366,8 +366,8 @@ golang.org/x/crypto v0.0.0-20200414173820-0848c9571904/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= -golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= +golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= +golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190731235908-ec7cb31e5a56/go.mod h1:JhuoJpWY28nO4Vef9tZUw9qufEGTyX1+7lmHxV5q5G4= golang.org/x/exp v0.0.0-20230321023759-10a507213a29 h1:ooxPy7fPvB4kwsA2h+iBNHkAbp/4JxTSwCmvdjEYmug= @@ -441,19 +441,19 @@ golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 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.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= -golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= -golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= +golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= +golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac h1:7zkz7BUtwNFFqcowJ+RIgu2MaV/MapERkDIy+mwPyjs= golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= From d970fb960bbc35886a9d412ad697b7a98c092f2c Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Tue, 12 Mar 2024 17:16:00 -0400 Subject: [PATCH 092/105] Ui: add format-string alternatives to functions The say/error/ask methods on Ui only accept formatted strings, which is a bit cumbersome to do at callsite every time we need to print out something formatted with dynamic information. To reduce that cumbersomness, we add some convenience alternatives to the Ui implementations in the SDK, so they now expose Sayf, Askf and Errorf in addition to the rest. --- packer/ui.go | 32 ++++++++++++++++++++++++++++++++ packer/ui_mock.go | 10 ++++++++++ rpc/ui.go | 10 ++++++++++ rpc/ui_test.go | 10 ++++++++++ 4 files changed, 62 insertions(+) diff --git a/packer/ui.go b/packer/ui.go index 3cce1c775..eb16239e0 100644 --- a/packer/ui.go +++ b/packer/ui.go @@ -27,9 +27,12 @@ type TTY interface { // is formatted and various levels of output. type Ui interface { Ask(string) (string, error) + Askf(string, ...any) (string, error) Say(string) + Sayf(string, ...any) Message(string) Error(string) + Errorf(string, ...any) Machine(string, ...string) // TrackProgress(src string, currentSize, totalSize int64, stream io.ReadCloser) (body io.ReadCloser) getter.ProgressTracker @@ -52,6 +55,10 @@ type BasicUi struct { var _ Ui = new(BasicUi) +func (rw *BasicUi) Askf(query string, args ...any) (string, error) { + return rw.Ask(fmt.Sprintf(query, args...)) +} + func (rw *BasicUi) Ask(query string) (string, error) { rw.l.Lock() defer rw.l.Unlock() @@ -99,6 +106,10 @@ func (rw *BasicUi) Ask(query string) (string, error) { } } +func (rw *BasicUi) Sayf(message string, args ...any) { + rw.Say(fmt.Sprintf(message, args...)) +} + func (rw *BasicUi) Say(message string) { rw.l.Lock() defer rw.l.Unlock() @@ -127,6 +138,10 @@ func (rw *BasicUi) Message(message string) { } } +func (rw *BasicUi) Errorf(message string, args ...any) { + rw.Error(fmt.Sprintf(message, args...)) +} + func (rw *BasicUi) Error(message string) { rw.l.Lock() defer rw.l.Unlock() @@ -164,6 +179,13 @@ type SafeUi struct { var _ Ui = new(SafeUi) +func (u *SafeUi) Askf(s string, args ...any) (string, error) { + u.Sem <- 1 + ret, err := u.Ui.Askf(s, args...) + <-u.Sem + + return ret, err +} func (u *SafeUi) Ask(s string) (string, error) { u.Sem <- 1 ret, err := u.Ui.Ask(s) @@ -172,6 +194,11 @@ func (u *SafeUi) Ask(s string) (string, error) { return ret, err } +func (u *SafeUi) Sayf(s string, args ...any) { + u.Sem <- 1 + u.Ui.Sayf(s, args...) + <-u.Sem +} func (u *SafeUi) Say(s string) { u.Sem <- 1 u.Ui.Say(s) @@ -184,6 +211,11 @@ func (u *SafeUi) Message(s string) { <-u.Sem } +func (u *SafeUi) Errorf(s string, args ...any) { + u.Sem <- 1 + u.Ui.Errorf(s, args...) + <-u.Sem +} func (u *SafeUi) Error(s string) { u.Sem <- 1 u.Ui.Error(s) diff --git a/packer/ui_mock.go b/packer/ui_mock.go index 75767a8c0..a5467d769 100644 --- a/packer/ui_mock.go +++ b/packer/ui_mock.go @@ -5,6 +5,7 @@ package packer import ( "bytes" + "fmt" "io" "testing" "time" @@ -45,12 +46,18 @@ type MockUi struct { ProgressBarCloseCalled bool } +func (u *MockUi) Askf(query string, args ...any) (string, error) { + return u.Ask(fmt.Sprintf(query, args...)) +} func (u *MockUi) Ask(query string) (string, error) { u.AskCalled = true u.AskQuery = query return "foo", nil } +func (u *MockUi) Errorf(message string, args ...any) { + u.Error(fmt.Sprintf(message, args...)) +} func (u *MockUi) Error(message string) { u.ErrorCalled = true u.ErrorMessage = message @@ -67,6 +74,9 @@ func (u *MockUi) Message(message string) { u.MessageMessage = message } +func (u *MockUi) Sayf(message string, args ...any) { + u.Say(fmt.Sprintf(message, args...)) +} func (u *MockUi) Say(message string) { u.SayCalled = true sayMessage := SayMessage{ diff --git a/rpc/ui.go b/rpc/ui.go index ed3e673d3..3b5a951c4 100644 --- a/rpc/ui.go +++ b/rpc/ui.go @@ -4,6 +4,7 @@ package rpc import ( + "fmt" "log" packersdk "github.com/hashicorp/packer-plugin-sdk/packer" @@ -31,11 +32,17 @@ type UiMachineArgs struct { Args []string } +func (u *Ui) Askf(query string, args ...any) (string, error) { + return u.Ask(fmt.Sprintf(query, args...)) +} func (u *Ui) Ask(query string) (result string, err error) { err = u.client.Call("Ui.Ask", query, &result) return } +func (u *Ui) Errorf(message string, args ...any) { + u.Error(fmt.Sprintf(message, args...)) +} func (u *Ui) Error(message string) { if err := u.client.Call("Ui.Error", message, new(interface{})); err != nil { log.Printf("Error in Ui.Error RPC call: %s", err) @@ -59,6 +66,9 @@ func (u *Ui) Message(message string) { } } +func (u *Ui) Sayf(message string, args ...any) { + u.Say(fmt.Sprintf(message, args...)) +} func (u *Ui) Say(message string) { if err := u.client.Call("Ui.Say", message, new(interface{})); err != nil { log.Printf("Error in Ui.Say RPC call: %s", err) diff --git a/rpc/ui_test.go b/rpc/ui_test.go index 58ae15072..aacf8d279 100644 --- a/rpc/ui_test.go +++ b/rpc/ui_test.go @@ -5,6 +5,7 @@ package rpc import ( "bytes" + "fmt" "io" "reflect" "testing" @@ -28,12 +29,18 @@ type testUi struct { progressBarCloseCalled bool } +func (u *testUi) Askf(query string, args ...any) (string, error) { + return u.Ask(fmt.Sprintf(query, args...)) +} func (u *testUi) Ask(query string) (string, error) { u.askCalled = true u.askQuery = query return "foo", nil } +func (u *testUi) Errorf(message string, args ...any) { + u.Error(fmt.Sprintf(message, args...)) +} func (u *testUi) Error(message string) { u.errorCalled = true u.errorMessage = message @@ -50,6 +57,9 @@ func (u *testUi) Message(message string) { u.messageMessage = message } +func (u *testUi) Sayf(message string, args ...any) { + u.Say(fmt.Sprintf(message, args...)) +} func (u *testUi) Say(message string) { u.sayCalled = true u.sayMessage = message From b33ea9e139e9d424b3fea195711422cde3bb5518 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Thu, 21 Mar 2024 17:21:28 -0400 Subject: [PATCH 093/105] version: add testing for version creation --- version/version_test.go | 106 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 version/version_test.go diff --git a/version/version_test.go b/version/version_test.go new file mode 100644 index 000000000..1c67497fa --- /dev/null +++ b/version/version_test.go @@ -0,0 +1,106 @@ +package version + +import ( + "fmt" + "testing" +) + +func Test_PluginVersionCreate(t *testing.T) { + tests := []struct { + name string + coreVersion string + preVersion string + metaVersion string + expectError bool + expectVersionString string + }{ + { + "Valid semver core only version", + "1.0.0", + "", + "", + false, + "1.0.0", + }, + { + "Valid semver, should get canonical version", + "01.001.001", + "", + "", + false, + "1.1.1", + }, + { + "Valid semver with prerelease, should get canonical version", + "1.001.010", + "dev", + "", + false, + "1.1.10-dev", + }, + { + "Valid semver with metadata, should get canonical version", + "1.001.010", + "", + "123abcdef", + false, + "1.1.10+123abcdef", + }, + { + "Valid semver with prerelease and metadata, should get canonical version", + "1.001.010", + "dev", + "123abcdef", + false, + "1.1.10-dev+123abcdef", + }, + { + "Invalid version, should fail", + ".1.1", + "", + "", + true, + "", + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + defer func() { + panicMsg := recover() + if !tt.expectError && panicMsg != nil { + t.Errorf("creating version panicked, should not have.") + } + + if tt.expectError && panicMsg == nil { + t.Errorf("creating version should have panicked, but did not.") + } + + if panicMsg != nil { + t.Logf("panic message was: %v", panicMsg) + } + }() + + ver := NewPluginVersion(tt.coreVersion, tt.preVersion, tt.metaVersion) + verStr := ver.String() + if verStr != tt.expectVersionString { + t.Errorf("string format mismatch, version created is %q, expected %q", verStr, tt.expectVersionString) + } + }) + } +} + +func TestFormattedVersionString(t *testing.T) { + GitCommit = "abcdef12345" + defer func() { + GitCommit = "" + }() + + expectedVersion := fmt.Sprintf("1.0.0-dev (%s)", GitCommit) + + ver := InitializePluginVersion("1.0.0", "dev") + formatted := ver.FormattedVersion() + if formatted != expectedVersion { + t.Fatalf("Expected formatted version %q; got %q", expectedVersion, formatted) + } +} From 2a28d487390bcc5257d847984a6395fe09b766f8 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Thu, 21 Mar 2024 17:07:36 -0400 Subject: [PATCH 094/105] version: introduce metadata to PluginVersion As it stands now, plugin developers can only specify a version's core semver-compatible version, and a prerelease. In usage though, some plugins use metadata to add some extra context on the binary that was built, like the git commit, or the delta between the last release and the current HEAD from which a plugin was built. This, coupled with the 1.11.0 changes to plugin loading and version support, means that we cannot support such a workflow with the current code, as we will now start enforcing proper semver for plugins, so we are at risk of having plugins either not load, or lose information when releasing. Therefore as an attempt to address those issues, we are adding official support in the SDK for metadata in versions. That change introduces two new functions: `NewPluginVersion` and `NewRawVersion`. Both are intended as replacements for the now deprecated `InitializePluginVersion`. --- version/version.go | 88 +++++++++++++++++++++++++++++++++++++--------- 1 file changed, 71 insertions(+), 17 deletions(-) diff --git a/version/version.go b/version/version.go index 32802db96..d03214716 100644 --- a/version/version.go +++ b/version/version.go @@ -23,29 +23,74 @@ var Version = "0.5.3" // such as "dev" (in development), "beta", "rc1", etc. var VersionPrerelease = "dev" +// The metadata for the version, this is optional information to add around +// a particular release. +// +// This has no impact on the ordering of plugins, and is ignored for non-human eyes. +var VersionMetadata = "" + // SDKVersion is used by the plugin set to allow Packer to recognize // what version of the sdk the plugin is. -var SDKVersion = InitializePluginVersion(Version, VersionPrerelease) +var SDKVersion = NewPluginVersion(Version, VersionPrerelease, VersionMetadata) // InitializePluginVersion initializes the SemVer and returns a version var. -// If the provided "version" string is not valid, the call to version.Must -// will panic. Therefore, this function should always be called in a package -// init() function to make sure that plugins are following proper semantic -// versioning and to make sure that plugins which aren't following proper -// semantic versioning crash immediately rather than later. +// +// Deprecated: InitializePluginVersion does not support metadata out of the +// box, and should be replaced by either NewPluginVersion or NewRawVersion. func InitializePluginVersion(vers, versionPrerelease string) *PluginVersion { - if vers == "" { + return NewPluginVersion(vers, versionPrerelease, "") +} + +// NewRawVersion is made for more freeform version strings. It won't accept +// much more than what `NewPluginVersion` already does, but is another +// convenient form to create a version if preferred. +// +// As NewRawVersion, if the version is invalid, it will panic. +func NewRawVersion(rawSemVer string) *PluginVersion { + vers := version.Must(version.NewVersion(rawSemVer)) + return &PluginVersion{ + version: vers.Core().String(), + versionPrerelease: vers.Prerelease(), + versionMetadata: vers.Metadata(), + semVer: vers, + } +} + +// NewPluginVersion initializes the SemVer and returns a PluginVersion from it. +// If the provided "version" string is not valid, the call to version.Must +// will panic. +// +// This function should always be called in a package init() function to make +// sure that plugins are following proper semantic versioning and to make sure +// that plugins which aren't following proper semantic versioning crash +// immediately rather than later. +// +// If the core version number is empty, it will default to 0.0.0. +func NewPluginVersion(vers, versionPrerelease, versionMetadata string) *PluginVersion { + var versionRawString = vers + + if versionRawString == "" { // Defaults to "0.0.0". Useful when binary is created for development purpose. - vers = "0.0.0" + versionRawString = "0.0.0" } - pv := PluginVersion{ - version: vers, - versionPrerelease: versionPrerelease, + + if versionPrerelease != "" { + versionRawString = fmt.Sprintf("%s-%s", versionRawString, versionPrerelease) + } + + if versionMetadata != "" { + versionRawString = fmt.Sprintf("%s+%s", versionRawString, versionMetadata) } // This call initializes the SemVer to make sure that if Packer crashes due // to an invalid SemVer it's at the very beginning of the Packer run. - pv.semVer = version.Must(version.NewVersion(vers)) - return &pv + semVer := version.Must(version.NewVersion(versionRawString)) + + return &PluginVersion{ + version: semVer.Core().String(), + versionPrerelease: semVer.Prerelease(), + versionMetadata: semVer.Metadata(), + semVer: semVer, + } } type PluginVersion struct { @@ -55,10 +100,18 @@ type PluginVersion struct { // then it means that it is a final release. Otherwise, this is a pre-release // such as "dev" (in development), "beta", "rc1", etc. versionPrerelease string + // Extra metadata that can be part of the version. + // + // This is legal in semver, and has to be the last part of the version + // string, starting with a `+`. + versionMetadata string // The Semantic Version of the plugin. Used for version constraint comparisons semVer *version.Version } +func (p *PluginVersion) SetMetadata(meta string) { + p.versionMetadata = meta +} func (p *PluginVersion) FormattedVersion() string { var versionString bytes.Buffer fmt.Fprintf(&versionString, "%s", p.version) @@ -91,10 +144,11 @@ func (p *PluginVersion) GetVersionPrerelease() string { return p.versionPrerelease } +func (p *PluginVersion) GetMetadata() string { + return p.versionMetadata +} + // String returns the complete version string, including prerelease func (p *PluginVersion) String() string { - if p.versionPrerelease != "" { - return fmt.Sprintf("%s-%s", p.version, p.versionPrerelease) - } - return p.version + return p.semVer.String() } From ddbda65efa3147963a646d6808e561c7881ba3a5 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Thu, 21 Mar 2024 17:20:32 -0400 Subject: [PATCH 095/105] version: adapt FormatedVersion to use String Since FormatedVersion was essentially the same thing as `String` with the extra GitCommit if defined, we change its implementation to rely on the code committed for String. --- plugin/set_test.go | 6 +++--- version/version.go | 20 ++++++++++---------- version/version_test.go | 9 ++++++++- 3 files changed, 21 insertions(+), 14 deletions(-) diff --git a/plugin/set_test.go b/plugin/set_test.go index 0a974e88f..f29ecc8f4 100644 --- a/plugin/set_test.go +++ b/plugin/set_test.go @@ -45,12 +45,12 @@ func TestSet(t *testing.T) { set.RegisterProvisioner("example-2", new(MockProvisioner)) set.RegisterDatasource("example", new(MockDatasource)) set.RegisterDatasource("example-2", new(MockDatasource)) - set.SetVersion(pluginVersion.InitializePluginVersion( - "1.1.1", "")) + set.SetVersion(pluginVersion.NewPluginVersion( + "1.1.1", "", "")) outputDesc := set.description() - sdkVersion := pluginVersion.InitializePluginVersion(pluginVersion.Version, pluginVersion.VersionPrerelease) + sdkVersion := pluginVersion.NewPluginVersion(pluginVersion.Version, pluginVersion.VersionPrerelease, "") if diff := cmp.Diff(SetDescription{ Version: "1.1.1", SDKVersion: sdkVersion.String(), diff --git a/version/version.go b/version/version.go index d03214716..36bd9149a 100644 --- a/version/version.go +++ b/version/version.go @@ -6,7 +6,6 @@ package version import ( - "bytes" "fmt" "github.com/hashicorp/go-version" @@ -81,6 +80,7 @@ func NewPluginVersion(vers, versionPrerelease, versionMetadata string) *PluginVe if versionMetadata != "" { versionRawString = fmt.Sprintf("%s+%s", versionRawString, versionMetadata) } + // This call initializes the SemVer to make sure that if Packer crashes due // to an invalid SemVer it's at the very beginning of the Packer run. semVer := version.Must(version.NewVersion(versionRawString)) @@ -112,18 +112,18 @@ type PluginVersion struct { func (p *PluginVersion) SetMetadata(meta string) { p.versionMetadata = meta } + func (p *PluginVersion) FormattedVersion() string { - var versionString bytes.Buffer - fmt.Fprintf(&versionString, "%s", p.version) - if p.versionPrerelease != "" { - fmt.Fprintf(&versionString, "-%s", p.versionPrerelease) - - if GitCommit != "" { - fmt.Fprintf(&versionString, " (%s)", GitCommit) - } + versionString := p.semVer.String() + + // Given there could be some metadata already, we add the commit to the + // reported version as part of the metadata, with a `-` spearator if + // the metadata is already there, otherwise we make it the metadata + if GitCommit != "" { + versionString = fmt.Sprintf("%s (%s)", versionString, GitCommit) } - return versionString.String() + return versionString } func (p *PluginVersion) SemVer() *version.Version { diff --git a/version/version_test.go b/version/version_test.go index 1c67497fa..55e46a00b 100644 --- a/version/version_test.go +++ b/version/version_test.go @@ -101,6 +101,13 @@ func TestFormattedVersionString(t *testing.T) { ver := InitializePluginVersion("1.0.0", "dev") formatted := ver.FormattedVersion() if formatted != expectedVersion { - t.Fatalf("Expected formatted version %q; got %q", expectedVersion, formatted) + t.Errorf("Expected formatted version %q; got %q", expectedVersion, formatted) + } + + expectedVersion = fmt.Sprintf("1.0.0-dev+meta (%s)", GitCommit) + ver = NewPluginVersion("1.0.0", "dev", "meta") + formatted = ver.FormattedVersion() + if formatted != expectedVersion { + t.Errorf("Expected formatted version %q; got %q", expectedVersion, formatted) } } From 92242bea09211a4f88ca3359f09a7acd52ea5cd0 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Thu, 21 Mar 2024 17:28:28 -0400 Subject: [PATCH 096/105] version: limit core version to 3 segments The go-version library we use for parsing versions from the plugin supports 4-segmented versions. This may not be ideal for us, as we want to limit the sprawling nature of plugin installations, which if we start accepting sub-patch version bumps, may become quite strange. The release workflows we offer as template does not take that into account, and I'm not sure our docs do as well. Since there are many unknowns here, 4-segmented version numbers are not semver-valid, and we do not know how tooling will react, we ultimately decide not to allow those in the SDK. If a developer tries to define a 4-segmented version number, the plugin will crash instantly, at least giving users a message quickly that the version number is invalid, and that they need to limit themselves to a 3-segment version number. --- version/version.go | 16 ++++++---------- version/version_test.go | 8 ++++++++ 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/version/version.go b/version/version.go index 36bd9149a..d78bc8158 100644 --- a/version/version.go +++ b/version/version.go @@ -47,6 +47,11 @@ func InitializePluginVersion(vers, versionPrerelease string) *PluginVersion { // As NewRawVersion, if the version is invalid, it will panic. func NewRawVersion(rawSemVer string) *PluginVersion { vers := version.Must(version.NewVersion(rawSemVer)) + + if len(vers.Segments()) != 3 { + panic(fmt.Sprintf("versions should only have 3 segments, %q had %d", rawSemVer, len(vers.Segments()))) + } + return &PluginVersion{ version: vers.Core().String(), versionPrerelease: vers.Prerelease(), @@ -81,16 +86,7 @@ func NewPluginVersion(vers, versionPrerelease, versionMetadata string) *PluginVe versionRawString = fmt.Sprintf("%s+%s", versionRawString, versionMetadata) } - // This call initializes the SemVer to make sure that if Packer crashes due - // to an invalid SemVer it's at the very beginning of the Packer run. - semVer := version.Must(version.NewVersion(versionRawString)) - - return &PluginVersion{ - version: semVer.Core().String(), - versionPrerelease: semVer.Prerelease(), - versionMetadata: semVer.Metadata(), - semVer: semVer, - } + return NewRawVersion(versionRawString) } type PluginVersion struct { diff --git a/version/version_test.go b/version/version_test.go index 55e46a00b..a1f538f15 100644 --- a/version/version_test.go +++ b/version/version_test.go @@ -62,6 +62,14 @@ func Test_PluginVersionCreate(t *testing.T) { true, "", }, + { + "4-parts version, should not be accepted", + "1.1.1.1", + "", + "", + true, + "", + }, } for _, tt := range tests { From 38ffab00d97117338d7ff8dad40197d43d73ced6 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Tue, 16 Apr 2024 10:10:32 -0400 Subject: [PATCH 097/105] version: cut release v0.5.3 --- version/version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version/version.go b/version/version.go index d78bc8158..c3fb0e970 100644 --- a/version/version.go +++ b/version/version.go @@ -20,7 +20,7 @@ var Version = "0.5.3" // A pre-release marker for the version. If this is "" (empty string) // then it means that it is a final release. Otherwise, this is a pre-release // such as "dev" (in development), "beta", "rc1", etc. -var VersionPrerelease = "dev" +var VersionPrerelease = "" // The metadata for the version, this is optional information to add around // a particular release. From 3b2d07c372b86bd5c2a624966371546ec97005f6 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Tue, 16 Apr 2024 10:11:02 -0400 Subject: [PATCH 098/105] version: prepare v0.5.4-dev --- version/version.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/version/version.go b/version/version.go index c3fb0e970..6b6f140bf 100644 --- a/version/version.go +++ b/version/version.go @@ -15,12 +15,12 @@ import ( var GitCommit string // Package version helps plugin creators set and track the sdk version using -var Version = "0.5.3" +var Version = "0.5.4" // A pre-release marker for the version. If this is "" (empty string) // then it means that it is a final release. Otherwise, this is a pre-release // such as "dev" (in development), "beta", "rc1", etc. -var VersionPrerelease = "" +var VersionPrerelease = "dev" // The metadata for the version, this is optional information to add around // a particular release. From 63450392f1f0289be955de4c58e8213a2ae04bec Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Tue, 16 Apr 2024 15:25:17 -0400 Subject: [PATCH 099/105] version: don't remake semVer if not nil The SemVer function of a PluginVersion returns the version.Version instance bound to the PluginVersion. In former implementations of the structure, this could be nil in some cases, as only the version components were being registered, and the code would make sure that they were a valid semver version. Recent changes reorganised this code by making the semVer attribute always present, so while theoretically it could be nil, this would indicate a manipulation error. Therefore, we don't need to perform this check to re-create the semVer attribute, and by that change we fix the underlying issue that made semVer drop its pre-release/metadata parts when doing so. --- version/version.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/version/version.go b/version/version.go index 6b6f140bf..c21fd0ee7 100644 --- a/version/version.go +++ b/version/version.go @@ -123,12 +123,6 @@ func (p *PluginVersion) FormattedVersion() string { } func (p *PluginVersion) SemVer() *version.Version { - if p.semVer != nil { - // SemVer is an instance of version.Version. This has the secondary - // benefit of verifying during tests and init time that our version is a - // proper semantic version, which should always be the case. - p.semVer = version.Must(version.NewVersion(p.version)) - } return p.semVer } From a4700a2972175aa53641449feee1e689bf36232e Mon Sep 17 00:00:00 2001 From: "hashicorp-copywrite[bot]" <110428419+hashicorp-copywrite[bot]@users.noreply.github.com> Date: Mon, 22 Apr 2024 16:26:10 +0000 Subject: [PATCH 100/105] [COMPLIANCE] Add Copyright and License Headers --- version/version_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/version/version_test.go b/version/version_test.go index a1f538f15..c6c175f0b 100644 --- a/version/version_test.go +++ b/version/version_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package version import ( From bb4ca5b1d3d6101dc2d01d62959fc27db9ceff3a Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Tue, 7 May 2024 12:54:11 -0400 Subject: [PATCH 101/105] Bump actions/checkout to address Node.js 16 deprecation issues (#237) --- .github/workflows/actionlint.yml | 2 +- .github/workflows/go-test.yml | 6 +++--- .github/workflows/release.yml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/actionlint.yml b/.github/workflows/actionlint.yml index 50dead389..b79be740d 100644 --- a/.github/workflows/actionlint.yml +++ b/.github/workflows/actionlint.yml @@ -8,6 +8,6 @@ jobs: actionlint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # 4.1.4 - name: "Check workflow files" uses: docker://docker.mirror.hashicorp.services/rhysd/actionlint:latest diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml index 99bf9b694..5fcd942b1 100644 --- a/.github/workflows/go-test.yml +++ b/.github/workflows/go-test.yml @@ -28,7 +28,7 @@ jobs: go-version: ${{ matrix.go-version }} - name: Checkout code - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # 4.1.4 - name: Check that go.mod does not contain a replace run: | @@ -94,7 +94,7 @@ jobs: go-version: ${{ matrix.go-version }} - name: Checkout code - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # 4.1.4 - name: Install gotestsum shell: bash @@ -140,7 +140,7 @@ jobs: go-version: ${{ matrix.go-version }} - name: Checkout code - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # 4.1.4 - name: Create test directory run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 344b4ef37..ba7da548d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # 4.1.4 - name: GoReleaser uses: goreleaser/goreleaser-action@336e29918d653399e599bfca99fadc1d7ffbc9f7 # v4.3.0 with: From 11fc3c989ddf93aabb27994e9e62b3c00f043b1a Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Tue, 7 May 2024 12:54:27 -0400 Subject: [PATCH 102/105] Bump actions/setup-go to address Node.js 16 deprecation issues (#238) --- .github/workflows/go-test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml index 5fcd942b1..34eccd9bc 100644 --- a/.github/workflows/go-test.yml +++ b/.github/workflows/go-test.yml @@ -23,7 +23,7 @@ jobs: contents: read steps: - name: Setup go - uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe #v4.1.0 + uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # 5.0.0 with: go-version: ${{ matrix.go-version }} @@ -89,7 +89,7 @@ jobs: run: git config --global core.autocrlf false - name: Setup Go - uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe #v4.1.0 + uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # 5.0.0 with: go-version: ${{ matrix.go-version }} @@ -135,7 +135,7 @@ jobs: contents: read steps: - name: Setup go - uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe #v4.1.0 + uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # 5.0.0 with: go-version: ${{ matrix.go-version }} From 61d973c47c93a8eaa887ec443391fcd4b3ec4e72 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Tue, 7 May 2024 12:54:43 -0400 Subject: [PATCH 103/105] Bump goreleaser action to address Node.js 16 deprecation issues (#239) --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ba7da548d..fb779cfca 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,7 +16,7 @@ jobs: - name: Checkout uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # 4.1.4 - name: GoReleaser - uses: goreleaser/goreleaser-action@336e29918d653399e599bfca99fadc1d7ffbc9f7 # v4.3.0 + uses: goreleaser/goreleaser-action@7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8 # 5.0.0 with: args: "release" env: From 8b23f58ff65014d824e751a6c8e4441fc869cb8a Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Tue, 7 May 2024 18:02:35 -0400 Subject: [PATCH 104/105] Update all tsccr approved actions (#240) * Update all tsccr approved actions ```shell tsccr-helper gha update -latest . ``` * Remove unused test coverage files --- .github/workflows/actionlint.yml | 2 +- .github/workflows/go-test.yml | 33 ++++++-------------------------- .github/workflows/release.yml | 4 ++-- 3 files changed, 9 insertions(+), 30 deletions(-) diff --git a/.github/workflows/actionlint.yml b/.github/workflows/actionlint.yml index b79be740d..615e2e63e 100644 --- a/.github/workflows/actionlint.yml +++ b/.github/workflows/actionlint.yml @@ -8,6 +8,6 @@ jobs: actionlint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # 4.1.4 + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - name: "Check workflow files" uses: docker://docker.mirror.hashicorp.services/rhysd/actionlint:latest diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml index 34eccd9bc..85b845073 100644 --- a/.github/workflows/go-test.yml +++ b/.github/workflows/go-test.yml @@ -23,12 +23,12 @@ jobs: contents: read steps: - name: Setup go - uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # 5.0.0 + uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 with: go-version: ${{ matrix.go-version }} - name: Checkout code - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # 4.1.4 + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - name: Check that go.mod does not contain a replace run: | @@ -67,13 +67,6 @@ jobs: echo "$PACKAGE_NAMES" echo "$PACKAGE_NAMES" | xargs -I {} gotestsum --format=short-verbose --junitfile "$TEST_RESULTS_PATH"/packer-plugin-sdk/gotestsum-report.xml -- -count 1 -p 2 {}; - # Save coverage report parts - - name: Upload and save artifacts - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 - with: - name: linux test results - path: ${{ env.TEST_RESULTS_PATH }} - windows-tests: runs-on: windows-latest strategy: @@ -89,12 +82,12 @@ jobs: run: git config --global core.autocrlf false - name: Setup Go - uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # 5.0.0 + uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 with: go-version: ${{ matrix.go-version }} - name: Checkout code - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # 4.1.4 + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - name: Install gotestsum shell: bash @@ -116,13 +109,6 @@ jobs: echo "$PACKAGE_NAMES" echo "$PACKAGE_NAMES" | xargs -I {} gotestsum --format=short-verbose --junitfile "$TEST_RESULTS_PATH"/packer-plugin-sdk/gotestsum-report.xml -- -count 1 -p 2 {}; - # Save coverage report parts - - name: Upload and save artifacts - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 - with: - name: windows test results - path: ${{ env.TEST_RESULTS_PATH }} - darwin-tests: runs-on: macos-latest strategy: @@ -135,12 +121,12 @@ jobs: contents: read steps: - name: Setup go - uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # 5.0.0 + uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 with: go-version: ${{ matrix.go-version }} - name: Checkout code - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # 4.1.4 + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - name: Create test directory run: | @@ -163,10 +149,3 @@ jobs: echo "Running $(echo "$PACKAGE_NAMES" | wc -w) packages" echo "$PACKAGE_NAMES" echo "$PACKAGE_NAMES" | xargs -I {} gotestsum --format=short-verbose --junitfile "$TEST_RESULTS_PATH"/packer-plugin-sdk/gotestsum-report.xml -- -count 1 -p 2 {}; - - # Save coverage report parts - - name: Upload and save artifacts - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 - with: - name: macos test results - path: ${{ env.TEST_RESULTS_PATH }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fb779cfca..525369adc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,9 +14,9 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # 4.1.4 + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - name: GoReleaser - uses: goreleaser/goreleaser-action@7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8 # 5.0.0 + uses: goreleaser/goreleaser-action@7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8 # v5.0.0 with: args: "release" env: From b2dd4bc6b10caa134790d8903a4198d62965ab5d Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Mon, 20 May 2024 14:17:51 -0400 Subject: [PATCH 105/105] Bump github.com/hashicorp/go-getter/v2 modules to v2.2.2 --- go.mod | 45 ++++++++++++++------------- go.sum | 98 ++++++++++++++++++++++++++++++++-------------------------- 2 files changed, 78 insertions(+), 65 deletions(-) diff --git a/go.mod b/go.mod index 70f3f37be..03f7f3d29 100644 --- a/go.mod +++ b/go.mod @@ -3,8 +3,8 @@ module github.com/hashicorp/packer-plugin-sdk require github.com/zclconf/go-cty v1.13.3 // go-cty v1.11.0 removed gob encoding support so it cannot work with the Packer SDK as-is, you need to run `packer-sdc fix .' to change that require ( - cloud.google.com/go v0.105.0 // indirect - cloud.google.com/go/storage v1.27.0 // indirect + cloud.google.com/go v0.110.8 // indirect + cloud.google.com/go/storage v1.35.1 // indirect github.com/Azure/go-ntlmssp v0.0.0-20200615164410-66371956d46c // indirect github.com/ChrisTrenkamp/goxpath v0.0.0-20210404020558-97928f7e12b6 // indirect github.com/Masterminds/goutils v1.1.1 // indirect @@ -21,15 +21,15 @@ require ( github.com/gofrs/flock v0.8.1 github.com/gofrs/uuid v4.0.0+incompatible // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/google/go-cmp v0.5.9 + github.com/google/go-cmp v0.6.0 github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 - github.com/google/uuid v1.3.0 + github.com/google/uuid v1.4.0 github.com/hashicorp/consul/api v1.25.1 github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-getter/gcs/v2 v2.2.1 - github.com/hashicorp/go-getter/s3/v2 v2.2.1 - github.com/hashicorp/go-getter/v2 v2.2.1 + github.com/hashicorp/go-getter/gcs/v2 v2.2.2 + github.com/hashicorp/go-getter/s3/v2 v2.2.2 + github.com/hashicorp/go-getter/v2 v2.2.2 github.com/hashicorp/go-hclog v1.5.0 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-multierror v1.1.1 @@ -64,20 +64,20 @@ require ( golang.org/x/mobile v0.0.0-20210901025245-1fde1d6c3ca1 golang.org/x/mod v0.13.0 golang.org/x/net v0.17.0 - golang.org/x/sync v0.4.0 + golang.org/x/sync v0.5.0 golang.org/x/sys v0.15.0 // indirect golang.org/x/term v0.15.0 golang.org/x/text v0.14.0 // indirect - golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect + golang.org/x/time v0.3.0 // indirect golang.org/x/tools v0.14.0 - google.golang.org/api v0.101.0 // indirect + google.golang.org/api v0.150.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) require ( - cloud.google.com/go/compute v1.12.1 // indirect - cloud.google.com/go/compute/metadata v0.1.1 // indirect - cloud.google.com/go/iam v0.6.0 // indirect + cloud.google.com/go/compute v1.23.1 // indirect + cloud.google.com/go/compute/metadata v0.2.3 // indirect + cloud.google.com/go/iam v1.1.3 // indirect github.com/Masterminds/semver/v3 v3.1.1 // indirect github.com/Masterminds/sprig/v3 v3.2.1 // indirect github.com/antchfx/xmlquery v1.3.5 // indirect @@ -88,9 +88,10 @@ require ( github.com/bgentry/speakeasy v0.1.0 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/go-jose/go-jose/v3 v3.0.0 // indirect - github.com/golang/protobuf v1.5.2 // indirect - github.com/googleapis/enterprise-certificate-proxy v0.2.0 // indirect - github.com/googleapis/gax-go/v2 v2.6.0 // indirect + github.com/golang/protobuf v1.5.3 // indirect + github.com/google/s2a-go v0.1.7 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect + github.com/googleapis/gax-go/v2 v2.12.0 // indirect github.com/hashicorp/go-rootcerts v1.0.2 // indirect github.com/hashicorp/go-safetemp v1.0.0 // indirect github.com/hashicorp/go-secure-stdlib/parseutil v0.1.6 // indirect @@ -110,14 +111,16 @@ require ( github.com/posener/complete v1.2.3 // indirect github.com/shopspring/decimal v1.2.0 // indirect github.com/spf13/cast v1.3.1 // indirect - go.opencensus.io v0.23.0 // indirect + go.opencensus.io v0.24.0 // indirect golang.org/x/exp v0.0.0-20230321023759-10a507213a29 // indirect - golang.org/x/oauth2 v0.1.0 // indirect + golang.org/x/oauth2 v0.13.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c // indirect - google.golang.org/grpc v1.50.1 // indirect - google.golang.org/protobuf v1.28.1 // indirect + google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 // indirect + google.golang.org/grpc v1.59.0 // indirect + google.golang.org/protobuf v1.31.0 // indirect ) go 1.20 diff --git a/go.sum b/go.sum index 366761cea..051442118 100644 --- a/go.sum +++ b/go.sum @@ -1,15 +1,14 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.105.0 h1:DNtEKRBAAzeS4KyIory52wWHuClNaXJ5x1F7xa4q+5Y= -cloud.google.com/go v0.105.0/go.mod h1:PrLgOJNe5nfE9UMxKxgXj4mD3voiP+YQ6gdt6KMFOKM= -cloud.google.com/go/compute v1.12.1 h1:gKVJMEyqV5c/UnpzjjQbo3Rjvvqpr9B1DFSbJC4OXr0= -cloud.google.com/go/compute v1.12.1/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x/6PIIOocU= -cloud.google.com/go/compute/metadata v0.1.1 h1:/sxEbyrm6cw+XOUw1YxBHlatV71z4vpnmO7z2IZ0h3I= -cloud.google.com/go/compute/metadata v0.1.1/go.mod h1:Z1VN+bulIf6bt4P/C37K4DyZYZEXYonfTBHHFPO/4UU= -cloud.google.com/go/iam v0.6.0 h1:nsqQC88kT5Iwlm4MeNGTpfMWddp6NB/UOLFTH6m1QfQ= -cloud.google.com/go/iam v0.6.0/go.mod h1:+1AH33ueBne5MzYccyMHtEKqLE4/kJOibtffMHDMFMc= -cloud.google.com/go/longrunning v0.1.1 h1:y50CXG4j0+qvEukslYFBCrzaXX0qpFbBzc3PchSu/LE= -cloud.google.com/go/storage v1.27.0 h1:YOO045NZI9RKfCj1c5A/ZtuuENUc8OAW+gHdGnDgyMQ= -cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= +cloud.google.com/go v0.110.8 h1:tyNdfIxjzaWctIiLYOTalaLKZ17SI44SKFW26QbOhME= +cloud.google.com/go v0.110.8/go.mod h1:Iz8AkXJf1qmxC3Oxoep8R1T36w8B92yU29PcBhHO5fk= +cloud.google.com/go/compute v1.23.1 h1:V97tBoDaZHb6leicZ1G6DLK2BAaZLJ/7+9BB/En3hR0= +cloud.google.com/go/compute v1.23.1/go.mod h1:CqB3xpmPKKt3OJpW2ndFIXnA9A4xAy/F3Xp1ixncW78= +cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= +cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= +cloud.google.com/go/iam v1.1.3 h1:18tKG7DzydKWUnLjonWcJO6wjSCAtzh4GcRKlH/Hrzc= +cloud.google.com/go/iam v1.1.3/go.mod h1:3khUlaBXfPKKe7huYgEpDn6FtgRyMEqbkvBxrQyY5SE= +cloud.google.com/go/storage v1.35.1 h1:B59ahL//eDfx2IIKFBeT5Atm9wnNmj3+8xG/W4WB//w= +cloud.google.com/go/storage v1.35.1/go.mod h1:M6M/3V/D3KpzMTJyPOR/HU6n2Si5QdaXYEsng2xgOs8= github.com/Azure/go-ntlmssp v0.0.0-20180810175552-4a21cbd618b4/go.mod h1:chxPXzSsl7ZWRAuOIE23GDNzjWuZquvFlgA8xmpunjU= github.com/Azure/go-ntlmssp v0.0.0-20200615164410-66371956d46c h1:/IBSNwUN8+eKzUzbJPqhK839ygXJ82sde8x3ogr6R28= github.com/Azure/go-ntlmssp v0.0.0-20200615164410-66371956d46c/go.mod h1:chxPXzSsl7ZWRAuOIE23GDNzjWuZquvFlgA8xmpunjU= @@ -116,8 +115,8 @@ github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvq github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -127,20 +126,22 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian/v3 v3.2.1 h1:d8MncMlErDFTwQGBK1xhv026j9kqhvw1Qv9IbWT1VLQ= +github.com/google/martian/v3 v3.3.2 h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdfvw= +github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= +github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= 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/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/enterprise-certificate-proxy v0.2.0 h1:y8Yozv7SZtlU//QXbezB6QkpuE6jMD2/gfzk4AftXjs= -github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= -github.com/googleapis/gax-go/v2 v2.6.0 h1:SXk3ABtQYDT/OH8jAyvEOQ58mgawq5C4o/4/89qN2ZU= -github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= +github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= +github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs= +github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= +github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= +github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= github.com/hashicorp/consul/api v1.25.1 h1:CqrdhYzc8XZuPnhIYZWH45toM0LB9ZeYr/gvpLVI3PE= github.com/hashicorp/consul/api v1.25.1/go.mod h1:iiLVwR/htV7mas/sy0O+XSuEnrdBUUydemjxcUrAt4g= github.com/hashicorp/consul/sdk v0.14.1 h1:ZiwE2bKb+zro68sWzZ1SgHF3kRMBZ94TwOCFRF4ylPs= @@ -151,12 +152,12 @@ github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtng github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-getter/gcs/v2 v2.2.1 h1:yZgDXYy5m4xogJV8hXzX5S/fM/rjJnBz+EzTeFrfLEM= -github.com/hashicorp/go-getter/gcs/v2 v2.2.1/go.mod h1:xzT3sNmGRipCRMpWz24fYHMvgb4MRn/smg5k2mhJ7Bo= -github.com/hashicorp/go-getter/s3/v2 v2.2.1 h1:Psuhz6iuCxJOd3kGinK46x+4BzcJgwff8BId7CuGPYU= -github.com/hashicorp/go-getter/s3/v2 v2.2.1/go.mod h1:KDqfEPgpwZIy+1sAplFX231CE+M6wdL5Q/j6OMbKSnw= -github.com/hashicorp/go-getter/v2 v2.2.1 h1:2JXqPZs1Jej67RtdTi0YZaEB2hEFB3fkBA4cPYKQwFQ= -github.com/hashicorp/go-getter/v2 v2.2.1/go.mod h1:EcJx6oZE8hmGuRR1l38QrfnyiujQbwsEAn11eHv6l2M= +github.com/hashicorp/go-getter/gcs/v2 v2.2.2 h1:KDbsz44Clh+qpsskK9EnlhWki8NMH18jlAjEseJXIco= +github.com/hashicorp/go-getter/gcs/v2 v2.2.2/go.mod h1:reRiCTBtE1ANT92nMmjwbDzoB6KMJ5azAoMOvQRGGH0= +github.com/hashicorp/go-getter/s3/v2 v2.2.2 h1:ProI1SMBNRt17gC3I8XCMdh35sXN68IUieYnWXwfwew= +github.com/hashicorp/go-getter/s3/v2 v2.2.2/go.mod h1:5MRjeGjI4DqzkRYa+g6OuNJDR0MamdE5VqDPdI42+vQ= +github.com/hashicorp/go-getter/v2 v2.2.2 h1:Al5bzCNW5DrlZMK6TumGrSue7Xz8beyLcen+4N4erwo= +github.com/hashicorp/go-getter/v2 v2.2.2/go.mod h1:hp5Yy0GMQvwWVUmwLs3ygivz1JSLI323hdIE9J9m7TY= github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= @@ -333,14 +334,19 @@ github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.3 h1:RP3t2pwF7cMEbC1dqtB6poj3niw/9gnV4Cjg5oW5gtY= github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= @@ -353,8 +359,8 @@ github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1 github.com/zclconf/go-cty v1.13.3 h1:m+b9q3YDbg6Bec5rr+KGy1MzEVzY/jC2X+YX4yqKtHI= github.com/zclconf/go-cty v1.13.3/go.mod h1:YKQzy/7pZ7iq2jNFzy5go57xdxdWoLLpaEp4u238AE0= github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b h1:FosyBZYxY34Wul7O/MSKey3txpPYyCqVO5ZyceuQJEI= -go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= -go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= +go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190222235706-ffb98f73852f/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -403,16 +409,16 @@ golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.1.0 h1:isLCZuhj4v+tYv7eskaN4v/TM+A1begWWgyVJDdl1+Y= -golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= +golang.org/x/oauth2 v0.13.0 h1:jDDenyj+WgFtmV3zYVoi8aE2BwtXFLWOA67ZfNWftiY= +golang.org/x/oauth2 v0.13.0/go.mod h1:/JMhi4ZRXAf4HG9LiNmxvk+45+96RUlVThiH8FzNBn0= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ= -golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= +golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -454,8 +460,8 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac h1:7zkz7BUtwNFFqcowJ+RIgu2MaV/MapERkDIy+mwPyjs= -golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= +golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -473,8 +479,8 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -google.golang.org/api v0.101.0 h1:lJPPeEBIRxGpGLwnBTam1NPEM8Z2BmmXEd3z812pjwM= -google.golang.org/api v0.101.0/go.mod h1:CjxAAWWt3A3VrUE2IGDY2bgK5qhoG/OkyWVlYcP05MY= +google.golang.org/api v0.150.0 h1:Z9k22qD289SZ8gCJrk4DrWXkNjtfvKAUo/l1ma8eBYE= +google.golang.org/api v0.150.0/go.mod h1:ccy+MJ6nrYFgE3WgRx/AMXOxOmU8Q4hSa+jjibzhxcg= 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.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= @@ -482,15 +488,19 @@ google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCID google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c h1:QgY/XxIAIeccR+Ca/rDdKubLIU9rcJ3xfy1DC/Wd2Oo= -google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c/go.mod h1:CGI5F/G+E5bKwmfYo09AXuVN4dD894kIKUFmVbP2/Fo= +google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b h1:+YaDE2r2OG8t/z5qmsh7Y+XXwCbvadxxZ0YY6mTdrVA= +google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:CgAqfJo+Xmu0GwA0411Ht3OU3OntXwsGmrmjI8ioGXI= +google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b h1:CIC2YMXmIhYw6evmhPxBKJ4fmLbOFtXQN/GV3XOZR8k= +google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:IBQ646DjkDkvUIsVq/cc03FUFQ9wbZu7yE396YcL870= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 h1:AB/lmRny7e2pLhFEYIbl5qkDAUt2h0ZRO4wGPhZf+ik= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405/go.mod h1:67X1fPuzjcrkymZzZV1vvkFeTn2Rvc6lYF9MYFGCcwE= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.50.1 h1:DS/BukOZWp8s6p4Dt/tOaJaTQyPyOoCcrjroHuCeLzY= -google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= +google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -502,8 +512,8 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=