22 Commits

Author SHA1 Message Date
hashicorp-copywrite[bot]
36a312ee26
add missing license headers and update copyright file headers to BUS-1.1 2023-08-10 21:53:25 +01:00
Chris Roberts
d83bfc0d40 Perform best effort ssl revocation check on Windows
When performing a request via curl on Windows using schannel, ssl
certificate revocation checks does not handle verification failures
gracefully when an error is encountered that is unrelated to the actual
revocation of a certificate.

A new option is available to perform best effort revocation checks on
curl, so this is enabled by default on the Windows platform. A new
config option (`box_download_disable_ssl_revoke_best_effort`) has also
been added which can be optionally enabled to restore previous behavior
which results in a hard error if any error is encountered.
2023-06-20 16:37:00 -07:00
sophia
44f527ff8e Apply download options to metadata requests 2021-02-09 18:33:20 -06:00
Brian Cain
bcf4d5a210
Fixes #11228: Allow to force check for box updates
Prior to this commit, if a user had recently checked for updates, there
was no way to force Vagrant to re-check without manually deleting a
state file in the local `.vagrant` data dir. This commit fixes that by
giving users the ability to force check for updates for a given box with
a flag to the `vagrant box outdated` command.
2019-12-03 11:42:55 -08:00
Jeff Bonhag
a39a7ae794
Fixes #10741: Check if update is available locally (#11188)
This commit checks the local box collection to see if the latest box
update has already been downloaded.  If it has, Vagrant will display the
destroy/recreate message instead of the "run vagrant update" message.
2019-11-12 11:41:10 -05:00
Brian Cain
c55363412e
Fixes #10339: Show box version during outdated check
This commit updates the output Vagrant displays when checking if a box
is out of date by adding the version.
2019-01-08 10:31:10 -08:00
Chris Roberts
976320ec06 Limit automatic box outdated checks to once per hour 2018-11-01 09:45:11 -07:00
Brian Cain
beb08b51a4
(#7076) Continue on if vagrant fails to parse metadata box for update
Prior to this commit, vagrant would halt if it could not parse the
metadata file for a box to check for updates with. This commit changes
that to behave like when vagrant fails to download a metadata file and
continue on but warn the user it failed to check for box updates.
2018-05-02 13:58:21 -07:00
Brian Cain
11ddd0136d
(#9044) Show all box providers in command outdated
Prior to this commit, when the `--global` flag was used with the
`vagrant box outdated` command, it would ignore box providers and not
inform the user of all outdated boxes. This commit fixes that by
displaying each box within the users environment, and includes the
provider of the box in the message.
2018-01-08 09:43:28 -08:00
Ray Ruvinskiy
5a7e00c5b1 Add HTTPS download options to box update and box outdated
Vagrant::Box.load_metadata did not provide a way to specify the HTTPS
download options that could be specified when downloading boxes
(ca cert, ca path, client cert, insecure). As a result, while it was
possible to add a box whose metadata file needed to be downloaded with one of
those options specified, it was impossible to check for updates. The following
changes have been made to address the situation:

1. Create a DownloadMixins module to provide the --insecure, --cacert, --capth,
   and --cert command line options to all of `vagrant box add`,
   `vagrant box update`, and `vagrant box outdated`.
2. Extend `Vagrant::Box.has_update?` and `Vagrant::Box.load_metadata` to accept
   said download options.
3. Extend `box outdated` and `box update` commands to pass download options
   down.
4. Extend `Vagrant::Builtin::Action::BoxCheckOutdated` to honour download
   options.
5. Options specified on the command line take precedence over options specified
   in the machine configuration, if any.
6. Fix bug in `vagrant box add` where client cert was being passed down using
   the wrong environment key.
7. Unit test coverage in update_test and box_check_outdated_test.

Resolves #4420
2014-09-07 23:57:34 -04:00
Mitchell Hashimoto
d1a26bf8ca core: add more logging to check box outdated 2014-05-07 17:21:17 -07:00
Mitchell Hashimoto
5f12126d32 core: network issues don't halt Vagrant during box update check [GH-3391] 2014-04-05 09:25:03 -07:00
Mitchell Hashimoto
af7a589231 core: outdated check checks local boxes [GH-3321] 2014-04-02 08:37:03 -07:00
Mitchell Hashimoto
36ad327ec1 core: ignore if box doesn't exist on update check [GH-3326] 2014-04-02 08:24:38 -07:00
Mitchell Hashimoto
751b4da2c6 core: if box is unversioned, check update does nothing 2014-02-05 21:20:32 -08:00
Mitchell Hashimoto
61a1082d65 core: BoxCheckOutdated is *much* simpler, unified logic, tests 2014-02-05 21:20:18 -08:00
Mitchell Hashimoto
bfca65b098 core: better output for BoxCheckOutdated 2014-02-05 21:20:16 -08:00
Mitchell Hashimoto
ea06202903 core: get rid of unnecessary lines 2014-02-05 21:20:15 -08:00
Mitchell Hashimoto
b5157df2cc core: BoxCheckOutdated only runs if told to 2014-02-05 21:20:14 -08:00
Mitchell Hashimoto
8cc16d14fa core: BoxCheckOutdated checks locally 2014-02-05 21:20:13 -08:00
Mitchell Hashimoto
d78194654d core: ability to hide success UI 2014-02-05 21:20:12 -08:00
Mitchell Hashimoto
e537e02d9d core: BoxCheckOutdated can check if a box is outdated 2014-02-05 21:20:11 -08:00