Commit Graph
18343 Commits
Author SHA1 Message Date
Lucas Bajolet cc9e9a774c docs: add exerpt on packer plugins install --path 2023-12-05 09:54:53 -05:00
Lucas Bajolet 4a4597d828 command: simplify local binary installation
Read original binary into memory to fix case when installation
destination and source were the same, resulting in an empty binary.
2023-12-05 09:54:53 -05:00
Lucas Bajolet e16194b6d0 command: plugins install reject non-releases
When installing a plugin with packer plugins install --path, we only
accept release versions of a plugin, as otherwise the loading can be
inconsistent if for example a user specifies a required_plugins block in
their template, in which case the plugins will be ignored.

Until we have a simpler loading scheme then, we will reject non-release
versions of plugins to avoid confusion.
2023-12-05 09:54:53 -05:00
Lucas Bajolet 51b63cf266 command: reject version with --path for install
To avoid plugins being installed with a specific version when a path is
used for installing a plugin from a locally sourced plugin binary, we
explicitly reject the combination of both a path and a version for
plugins install.
2023-12-05 09:54:53 -05:00
Lucas Bajolet bf561e7985 command: add --force option to init/install
The --force option for packer init and packer plugins install enforces
installation of a plugin, even if it is already locally installed.

This will become useful if for some reason a pre-existing plugin
binary/version is already installed, and we want to overwrite it.
2023-12-05 09:54:53 -05:00
Lucas Bajolet 96bdc019d3 command: add packer plugins install path flag
This new flag allows the `packer plugins install' command to install a
plugin from a local binary rather than from Github.

This command will only call `describe' on the plugin, and won't do any
further checks for functionality. The SHA256SUM will be directly
computed from the binary, so as with anything manual and potentially
sourced by the community, extra care should be applied when invoking
this.
2023-12-05 09:54:53 -05:00
hc-github-team-packer adde65ace1 Merge pull request #12738 from hashicorp/backport/migrated-plugin-docs/strongly-driven-swine
This pull request was automerged via backport-assistant
2023-12-05 09:40:34 -05:00
Wilken Rivera 29e1670c68 backport of commit 80739f0694 2023-12-05 11:36:24 +00:00
hc-github-team-packer 0854ba7e56 Merge pull request #12729 from hashicorp/backport/security/GHSA-2c7c-3mj9-8fqh/pleasantly-nearby-yeti
This pull request was automerged via backport-assistant
2023-11-30 10:33:30 -05:00
hc-github-team-packer 1376bf205b Merge pull request #12728 from hashicorp/backport/plugin_install_doc_updates/friendly-noted-piglet
This pull request was automerged via backport-assistant
2023-11-30 09:41:15 -05:00
Wilken Rivera 2aed97cedc backport of commit 1fcd31dacd 2023-11-29 18:16:13 +00:00
hc-github-team-packer 351032c964 Merge pull request #12722 from hashicorp/backport/deps/bump_packer-plugin-sdk_with_gocty_fix/loosely-master-rhino
This pull request was automerged via backport-assistant
2023-11-29 12:28:37 -05:00
Lucas Bajolet 69204a9e60 backport of commit e5bc3dd1c3 2023-11-29 15:24:54 +00:00
hc-github-team-packer ddc7a3a3d0 Merge pull request #12721 from hashicorp/backport/hcl2upgrade/known-plugins/specially-flexible-baboon
This pull request was automerged via backport-assistant
2023-11-28 15:15:28 -05:00
Wilken Rivera 7751a60197 backport of commit 518cbb62df 2023-11-28 20:01:04 +00:00
Wilken Rivera a0e57d435e backport of commit 401934871c 2023-11-28 18:10:25 +00:00
Wilken Rivera 70f1d864c9 backport of commit a2b3487cf2 2023-11-28 18:10:16 +00:00
hc-github-team-packer 3aa7dac53a Merge pull request #12716 from hashicorp/backport/rm_source_on_var_arg_error/rightly-active-marmot
This pull request was automerged via backport-assistant
2023-11-28 12:53:43 -05:00
Lucas Bajolet e61be92bd1 backport of commit facc138088 2023-11-28 15:49:17 +00:00
Lucas Bajolet b72fd918dd backport of commit b20d94c88b 2023-11-28 15:06:55 +00:00
Lucas Bajolet 5ddbf8a40d backport of commit bb26771e2d 2023-11-27 21:37:43 +00:00
hc-github-team-packer ebf057b7a1 Merge pull request #12709 from hashicorp/backport/update/missing_builder_warning/reasonably-enjoyed-ray
This pull request was automerged via backport-assistant
2023-11-22 21:36:22 -05:00
Wilken Rivera 334cfdf40a backport of commit b4b251394a 2023-11-23 02:14:32 +00:00
Wilken Rivera 9b179f055c backport of commit a25e03eddd 2023-11-23 02:12:45 +00:00
hc-github-team-packer 57fce6ca0e Merge pull request #12707 from hashicorp/backport/missing_plugins_hint_on_error/heartily-wired-katydid
This pull request was automerged via backport-assistant
2023-11-22 16:10:36 -05:00
Lucas Bajolet 6342542307 backport of commit 19ca583eff 2023-11-22 20:56:50 +00:00
hc-github-team-packer eea96ec203 Merge pull request #12706 from hashicorp/backport/dependabot/go_modules/github.com/hashicorp/hcp-sdk-go-0.74.0/separately-valid-moth
This pull request was automerged via backport-assistant
2023-11-22 15:55:24 -05:00
dependabot[bot] 01a166de9c backport of commit 3cac73b360 2023-11-22 19:24:33 +00:00
hc-github-team-packer ed8fb6423f Merge pull request #12699 from hashicorp/backport/update/hcp-sdk-go/freely-large-baboon
This pull request was automerged via backport-assistant
2023-11-15 10:28:20 -05:00
Wilken Rivera df6a3cc6cb backport of commit d776956164 2023-11-15 14:26:29 +00:00
hc-github-team-packer a7843b148f Merge pull request #12695 from hashicorp/backport/update/bundled-plugins-cruft/repeatedly-brief-airedale
This pull request was automerged via backport-assistant
2023-11-10 14:20:55 -05:00
Wilken Rivera f9d32d77d7 backport of commit c3b016efd5 2023-11-10 19:13:16 +00:00
Wilken RiveraandLucas Bajolet 2b7bfaea57 Apply suggestions from code review
Co-authored-by: Lucas Bajolet <[email protected]>
2023-11-10 11:36:52 -05:00
Wilken Rivera 85e9e22bde Update CHANGELOG 2023-11-10 11:36:52 -05:00
Wilken Rivera 4b1553c7da Bump Go to 1.20.11 to mitigate against insecure Windows path parsing
This change address CVE-2023-45283. There have been no reported issues
with Packer but we are bumping given its usage of the path/filepath pkg.
2023-11-10 10:00:10 -05:00
Wilken Rivera 631ed14dc6 scripts/prepare_changelog:Update to output entries not in CHANGELOG.md 2023-11-10 09:34:33 -05:00
Wilken Rivera 360df8f257 scripts/prepare_changelog: Replace python for with gh and jq commands
This change uses the GitHub CLI to obtain all pull-requests merged after
the latest release to help with updating the Packer CHANGELOG.
2023-11-09 11:08:37 -05:00
Wilken Rivera b3280493e0 Update CHANGELOG 2023-11-08 18:51:07 -05:00
Wilken Rivera c703d2e73d Fix notes section in CHANGELOG 2023-11-08 15:07:02 -05:00
Wilken Rivera edaa10e0a0 Update CHANGELOG 2023-11-08 14:56:08 -05:00
hc-github-team-es-release-engineering 98176f5429 Update LICENSE text 2023-11-08 13:05:25 -05:00
ygXXII 19c14fd1e2 docs: fix aws_secretsmanager Title Name (#12678)
Just a simple doc title fix.
2023-11-02 05:36:36 -04:00
Lucas Bajolet f221a799d8 command: error on invalid plugins remove
If a user attempts to remove a plugin through the `packer plugins
remove' subcommand, and the specified plugin is not installed, the
command succeeds, but does nothing, and exits silently.

This is not clear what is happening, and arguably, calling a command
that does nothing, not even explain what went wrong, is not intuitive.

Because of that, this commit changes how the command behaves in this
case, stating what went wrong, and exiting with a non-zero status.
2023-10-31 11:28:50 -04:00
Lucas Bajolet c528681dde docs: amend HCL templates/functions docs
The HCL2 docs on built-in functions contains a link to a non-existent
section of the expressions page, so we update it to link to the general
page, and to the string interpolation section, since it is a common use
case.
2023-10-30 09:36:03 -04:00
Wilken Rivera 0ec424aa25 Fix broken link to Consul's environment variables page (#12673) 2023-10-30 07:50:53 -04:00
Wilken Rivera 71aa2f3f96 Bump required Go version in CONTRIBUTING guide 2023-10-26 15:03:55 -04:00
Wilken Rivera 452e855dd9 Update README
* Add BUSL 1.1 license badge
* Update links to learn tutorials
* Removed dated getting started example
2023-10-26 15:03:55 -04:00
Lucas Bajolet d47cbe7f48 command: remove SHA256SUM file on plugin removal
When a user invokes `packer plugins remove', the plugin binary gets
removed, but not the corresponding SHA256SUM file.

This patch changes this so that when a binary is removed, so is its
SHA256SUM file.
2023-10-26 12:49:36 -04:00
Lucas Bajolet 3c8de6e5ad plugins: install SHA256SUM file with 0644 perms
When invoking `packer plugins install' to install a plugin, or `packer
init', the checksum file would be installed with 0555 permissions.

This led in turn to further attempts at installing the plugin will
succeed, but the checksum file would not be updated, as it was marked
non-writable by the owner of the file, leading potentially to a
situation where the plugin binary and the checksum would be out-of-sync,
but could not be updated unless the user changed it.

To avoid such a problem, we write the checksum file with 0644
permissions, so the owner can read/write, while the other users can only
read it.
2023-10-26 10:35:33 -04:00
Wilken Rivera da061169bc cmd/hcl2_upgrade: Don't error when using a HashiCorp plugin that is not installed
This change updates hcl2_upgrade to not flag known plugin components, those used for generating the required plugins
block, when upgrading a legacy JSON template to HCL2. Any unknown plugins will be installed after running packer init
on the generated template so we don't error. We may want to suggest running packer init to install any missing plugins.

* Move knownPluginPrefixes into the hcl2_upgrade command
2023-10-24 06:00:42 -04:00