3994 Commits

Author SHA1 Message Date
Chris Roberts
bbd1404c1e
Merge pull request #12437 from chrisroberts/line-buf-shell-util
Line buffer utility and shell provisioner usage
2021-06-29 13:11:19 -07:00
Chris Roberts
32757d56e1
Merge pull request #12304 from grahamhub/issue-12191
implement --info flag for package cmd #12191
2021-06-29 13:07:47 -07:00
Chris Roberts
de8da71c41
Merge pull request #12431 from chrisroberts/ui-tests
Update tests to use real UI instance
2021-06-29 12:47:26 -07:00
Chris Roberts
6cc6b89dcf Include line buffer util in autoloads 2021-06-29 11:04:14 -07:00
Chris Roberts
35de0d724e Remove stringio usage from line buffer util, add max buffer length 2021-06-29 11:04:14 -07:00
sophia
0a1b20bb07 Get powershell path in %WINDIR%/System32 2021-06-29 10:34:57 -05:00
Rui Lopes
ef18b45786 ensure that the shell provisioner only emits complete output lines to the ui
partial lines are buffered until they are complete (have a line ending)

see https://github.com/hashicorp/vagrant/issues/11047
2021-06-25 15:58:24 -07:00
Chris Roberts
3d0d0148e9 Update tests to use real UI instance
Replaces use of UI doubles within tests to use actual UI instance
    to ensure calls are passing parameters correctly.
2021-06-23 14:04:48 -07:00
Chris Roberts
ac958314ae
Merge pull request #12415 from chrisroberts/ssh-rsa-dep-fix
Flag RSA SHA1 deprecation when loading keys
2021-06-22 15:48:20 -07:00
Chris Roberts
e7a6f397da Updates for Ruby 3.0 2021-06-21 15:57:46 -07:00
Chris Roberts
46aca8be5a Flag RSA SHA1 deprecation when loading keys
Set flag on RSA keys of deprecated RSA SHA1 support when loading
    keys based on server version of the transport. This ensures keys
    are properly flagged. Flag name has been updated to provide context
    on usage.

    Version matching on the OpenSSH server version has also been updated
    to handle customized naming in the version string (as seen in the
    Windows port) and to properly handle when no match is found.

    Fixes #12344 #12408 #12381
2021-06-10 21:17:08 -07:00
Chris Roberts
5967a23fa0 Support pwsh executable name for powershell
This updates the powershell detection to look for the `pwsh` executable
    and use it when the powershell executable is not available.
2021-04-28 12:45:48 -07:00
grahamhub
bfa73b06c6 cli: implement --info flag for package #12191 2021-04-15 00:28:41 -05:00
Chris Roberts
a08597d787 Tighten constraints on net-ssh to ensure functionality. Update patch
Keep the constraint on net-ssh tight so we can be confident that the
    patching will be successful and that a net-ssh release won't inadvertently
    cause our local updates to become non-functional.

    Fix patch to only update the behavior for RSA based keys when the server
    is recent enough to include the signature changes
2021-04-13 10:58:59 -07:00
Chris Roberts
246058ffbb Add #signature_algorithm and update #ssh_do_sign and #to_blob
Modifies `OpenSSL::PKey::RSA` to provide a `#signature_algorithm`
    method which provides the signature algorithm value expected by
    OpenSSH. The `#ssh_do_sign` method is updated to use the set
    algorithm (SHA256) and `#to_blob` is updated to include the
    signature algorithm instead of the key type.
2021-04-12 17:28:52 -07:00
sophia
b480790a8d Add box directly with authed urls 2021-04-05 16:39:01 -05:00
Chris Roberts
7362ac52e4 Fix dependency resolution where default gems are included
Parts of the stdlib which have been externalized but are still
    included within Ruby introduce issues when pinning Vagrant's
    dependencies to resolve plugin installs. When determining
    Vagrant's dependency list prior to solution generation, check
    the specification and ignore any default gems to prevent
    pinning versions that are not actual dependencies.
2021-03-25 12:35:33 -07:00
Chris Roberts
5b6fc4c0bb
Merge pull request #12250 from chrisroberts/cloud-upload-sized
Check file size prior to upload and automatically adjust options
2021-03-24 13:01:15 -07:00
Chris Roberts
fd4da92245 Check file size prior to upload and automatically adjust options
When uploading box file, check if the size is greater than
    5GB. If the size is larger and the direct to storage option
    is enabled, disable the option due to current 5GB restriction
    on direct uploads.
2021-03-23 15:11:32 -07:00
Ikko Ashimine
4dca0b90fa
Fix typo in vagrantfile.rb
inital -> initial
2021-03-23 18:16:45 +09:00
Chris Roberts
60323fdd6c
Merge pull request #12235 from chrisroberts/api-notify-ups
Prevent notification on default store, fix client end point
2021-03-17 13:57:47 -07:00
Chris Roberts
c6153ff84f Remove deprecation log messages 2021-03-15 15:36:33 -07:00
Chris Roberts
d3fffd65d2 Prevent notifications on redirect to default store
This also checks if the redirect notification has been displayed
    before inspecting the source and location to prevent repeat checks
    after the notification has been sent.
2021-03-15 15:21:07 -07:00
Chris Roberts
51382a0d0a Deprecate hook and disable access token parameter by default
This sets the `authenticate_box_url` hook as deprecated and also
    disables the cloud auth middleware from adding an access token
    as a URL parameter by default. An environment variable has been
    added which can be used for re-enabling the access token URL
    parameter behavior if required for some legacy system which does
    not support the authorization header.
2021-03-15 14:46:46 -07:00
Connor Martin
e92fe5d720 Merge branch 'main' of github.com:hashicorp/vagrant into remove-space 2021-03-11 17:20:57 -06:00
Chris Roberts
80ec78929a Adjust syntax on method 2021-03-09 08:05:55 -08:00
Chris Roberts
55dc18cb96 Default the builtin specs when initializing 2021-03-08 17:14:14 -08:00
Chris Roberts
32f4951759 Activate builtin specs during startup
When starting up, and before any loading, find our current
    specification and activate all the internal dependencies
    while also collecting the activated specifications. Store
    these for later use when doing plugin resolutions. We bypass
    the builtin list when running in bundler since they will
    still show up as not activated, but we use the entire list
    regardless.
2021-03-08 16:25:13 -08:00
Chris Roberts
282dadf784 When not running inside bundler, only use specifications that are activated 2021-03-08 15:58:47 -08:00
Chris Roberts
2d019cb608 Provide specialized messages on plugin install failure if possible
Inspect the error message received when failing to install a
    plugin. If it's something we can determine the cause, send
    back a cleaner error message to the user on how to resolve.
2021-03-08 15:57:13 -08:00
Chris Roberts
034cb8c59e Update net-ssh constraint to non-prerelease version
To prevent resolution issues with the introduction
    of a prerelease constraint, update the net-ssh constraint
    to be a minimum at the latest release. Include monkey
    patches to include support for wanted host key algos.
    The monkey patches are only applied to the latest
    net-ssh currently and will be ignored once the current
    prerelease has been fully released.
2021-02-25 17:07:00 -08:00
Sophia Castellarin
d111596446
Merge pull request #12188 from soapy1/vagrant-does-not-reference-empty-string-vm
Don't try to find "" by prefix in the machine index
2021-02-23 14:24:17 -06:00
Sophia Castellarin
181b4ea890
Merge pull request #12177 from soapy1/apply-download-opts-to-metadata
Apply download options to metadata requests
2021-02-23 13:26:53 -06:00
Sophia Castellarin
f2a1e25783
Merge pull request #12189 from soapy1/box-metadata-download-error
Raise error if downloading box metadata fails
2021-02-23 12:39:42 -06:00
sophia
220f346d2b Make shell script for loop shell agnostic 2021-02-22 12:36:54 -06:00
sophia
4b67216d71 Raise error if downloading box metadata fails 2021-02-12 17:07:04 -06:00
Connor Martin
3f70d44266 assign to a new var 2021-02-12 09:31:32 -06:00
sophia
ab1c3c2547 Don't try to find "" by prefix in the machine index 2021-02-11 15:59:15 -06:00
sophia
44f527ff8e Apply download options to metadata requests 2021-02-09 18:33:20 -06:00
Connor Martin
9a26940114 use strip instead 2021-02-04 14:29:54 -06:00
Connor Martin
1022e5b991 remove all space from checksums 2021-02-01 21:54:10 -06:00
Chris Roberts
203a5f0075 Update filesystem type match for WSL2
Fixes shared folder on WSL2 based on #11705
2020-11-18 10:58:33 -08:00
Chris Roberts
7f6ab8e166
Merge pull request #12054 from chrisroberts/f-sol-file-resolv
Update solution file to use DependencyRequests and allow prerelease
2020-11-17 15:36:44 -08:00
Chris Roberts
c4eda3f08f Update solution file to use DependencyRequests and allow prerelease
Maintain the solution file persisting dependency information on
    disk but update the runtime representation to
    Gem::Resolver::DependencyRequest instances which are expected
    by the sets when locating matches.

    Properly abide by prerelease setting in customized sets and
    force prerelease matching when in the builtin set. If a request
    is matched on a prerelease, and the request itself is not set
    to allow prereleases, update it to ensure successful resolution.
2020-11-17 13:02:33 -08:00
Chris Roberts
157db39938 Remove action name tracking for applying
The raw action name tracking should be sufficient for preventing
multi-insertions where only a single modification should occur.
With action name, hooks _should_ be able to be applied in multiple
builder stacks as they are expanding.

Fixes #12035
2020-11-11 09:56:03 -08:00
Chris Roberts
30f8e7944d Track raw actions as they are applied to prevent multiple insertions
The raw actions are used for applying the original trigger behavior
which can insert before and/or after the entire set of actions. When
processing the stack items, mark when the raw action has been applied
to prevent it from being applied again. Triggers around the raw actions
should only ever be applied _once_.

Fixes #12034
2020-11-11 09:39:07 -08:00
Chris Roberts
b479e04eb4 Request sets need prerelease enabled not just the spec matching 2020-11-06 15:22:28 -08:00
Chris Roberts
18c1607c6e Check dependency list on initialization
When initializing for internal plugin resolution inspect contraints
on all defined dependencies. If a prerelease constraint is detected,
automatically enable prerelease resolution.
2020-11-06 09:07:51 -08:00
Chris Roberts
9506c7b323 Allow enabling prerelease resolution via environment variable 2020-11-06 07:22:01 -08:00
Chris Roberts
a6f838a830
Merge pull request #12014 from chrisroberts/f-broken-trigger-hook
Fix application of action named triggers/hooks
2020-11-03 14:00:19 -08:00