446 Commits

Author SHA1 Message Date
ngyuki
924e87342b Use wslpath command for customized root on WSL 2019-01-09 03:59:40 +09:00
Chris Roberts
95493d6c59 Validate hostnamectl command is in working state
When checking if the hostnamectl command should be used for configuring
the guest hostname, ensure the command returns a valid result. The
hostnamectl command relies on dbus and if dbus is not available the
command will simply fail.
2018-12-17 12:46:30 -08:00
Gavin Williams
9d72feb36c Add support for SSH config file to to 'vagrant ssh' command 2018-12-11 07:51:47 -08:00
Chris Roberts
2c62ab9441
Merge pull request #10487 from chrisroberts/f-powershell-encode
Use Base64#strict_encode64 instead of Base64#urlsafe_encode64 for PowerShell
2018-12-07 16:28:37 -08:00
Brian Cain
2011e213c3
Merge pull request #10485 from briancain/introduce-experimental-feature-flag
Add experimental flag to guard development features
2018-12-07 16:25:10 -08:00
Brian Cain
2783b121f9
Remove VALID_FEATURES constant 2018-12-07 13:52:02 -08:00
Brian Cain
accabdd7ca
Warn users about unknown requested experimental features 2018-12-07 13:36:16 -08:00
Brian Cain
01ec72cac2
Introduce a local and global check for enabled experimental features 2018-12-07 13:30:50 -08:00
Brian Cain
c07f99fe7d
Move feature flag checking into a single function 2018-12-07 10:59:21 -08:00
Brian Cain
d551738bc7
Allow feature_enabled? to accept symbols 2018-12-07 10:50:34 -08:00
Brian Cain
fc4ba7f420
Update to global_enabled? 2018-12-07 10:50:20 -08:00
Brian Cain
1a32930017
Add guard_with method for protecting ruby blocks 2018-12-07 10:28:21 -08:00
Brian Cain
44fa134c48
Unfreeze valid features constant 2018-12-07 10:27:21 -08:00
Chris Roberts
8d36ba8864 Use Base64#strict_encode64 instead of Base64#urlsafe_encode64 for PowerShell
The #urlsafe_encode64 method complies with RFC 4648 but as the documentation
points out it uses the "URL and Filename Safe Alphabet". The #strict_encode64
method does not, and does not include linefeeds.

Fixes #10438
2018-12-06 16:13:48 -08:00
Brian Cain
212f6ce8bb
Add experimental flag to guard development features
This commit introduces a special flag for enabling features that are not
ready for release. It can either be enabled by setting the
`VAGRANT_EXPERIMENTAL` flag to "1", or by setting it to a string of one
or more comma seperated values for specific features. It also adds a
couple of Vagrant developer focused methods for making it easier to
determine if the flag has been enabled, and if so, what features.
2018-12-06 09:03:49 -08:00
Brian Cain
b6c6102e85
Redirect output to stderr instead of using Basic UI class
This preserves the bolding for the version check rather than using the
no format Basic class.
2018-12-05 12:19:51 -08:00
Brian Cain
4a7bff3325
Fixes #10463: Display version update on stderr instead of stdout
This commit updates the behavior of printing the checkpoint version
check for Vagrant. To allow users to filter out the message, it updates
the version check to go to stderr. It updates the UI class for printing
the version check to be a "basic" class, so that the message continues
to be the same color instead of a red error message.
2018-12-04 15:40:28 -08:00
Chris Roberts
43f7a16baa
Merge pull request #10313 from lloesche/lloesche/fix_wsl_detection
Fix WSL detection for customized roots
2018-11-12 16:21:44 -08:00
Chris Roberts
90dee00809
Merge pull request #10390 from chrisroberts/e-powerup-handle-spaces
Update powerup to handle spaces properly in arguments
2018-11-12 15:41:20 -08:00
Chris Roberts
4ff5291b89 Update powerup to handle spaces properly in arguments 2018-11-09 15:26:55 -08:00
Brian Cain
fc0707202a
FIXES #9870: Allow for windows path spaces with ssh utility
Prior to this commit, if a windows path contained a space, the ssh
utility could not properly find the private key path and the ssh command
would fail. This commit adds some additional logic to the ssh utility to
check if a path contains '%', and if so, use the IdentityFile argument.
Otherwise it will default to passing in the private key file with '-i',
which can support paths with spaces.
2018-11-09 10:19:35 -08:00
Mikhail Zholobov
74de13cae5
util/network_ip: Simplify #network_address helper
Allow to use IPv6 net masks in string notation.
2018-10-28 21:17:43 +01:00
Chris Roberts
ca81f9d6cb Prevent exception from raising on hyper-v check 2018-10-24 17:06:47 -07:00
Lukas Lösche
73cb4b5b42
Fix WSL detection for customized roots 2018-10-18 15:13:18 +02:00
Brian Cain
e8115a4389
Update based on second round of feedback 2018-10-12 09:07:12 -07:00
Brian Cain
d8ec19faa8
Fixup: Update vagrant cloud command PR with feedback 2018-10-12 09:07:12 -07:00
Brian Cain
9b385df4ec
Fix comment formatting 2018-10-12 09:07:12 -07:00
Brian Cain
3c45acc35f
Continue if entity already exists with publish command 2018-10-12 09:07:12 -07:00
Brian Cain
83bd592e30
Introduce curl helper and uploader classes
This commit introduces a new uploader class for uploading files and
splits up some commonly used functionality between it and the downloader
class into a curl helper library.
2018-10-12 09:07:10 -07:00
Chris Roberts
67bb5d2e6c Update Hyper-V admin check 2018-10-08 14:39:40 -07:00
Chris Roberts
8fd05fe3c1 Use command -v for checks in all inspection helpers. Fix stubs in tests. 2018-09-21 09:19:40 -07:00
Chris Roberts
fb5fc0e657 Update guest inspection utility module
Use sudo option for communicator test command instead of inline sudo
to properly use configured sudo value. Use command for checking
availability of hostnamectl. Use is-active for determining if a
service is being actively managed by systemd.
2018-09-20 16:42:39 -07:00
Maxim Kostrikin
d06cd2f94b
Hardened proc disallow systemd detection
If you have a vagrant box with proc mounted with
proc    /proc    proc    defaults,hidepid=2     0     0
ps output will be limited to owned process
sudo should extend output
2018-09-10 18:13:58 +07:00
Brian Cain
e073153728
(#10099) Properly join commands from passed in array
Prior to this commit, the `Util::Powershell.execute_inline`
method didn't properly join the passed in command and instead attempted
to execute the array of strings. This commit updates that
behavior to join the command array prior to inserting it into the full
powershell command.
2018-08-14 09:30:11 -07:00
Chris Roberts
66566b8c3d
Merge pull request #10078 from chrisroberts/e-appimage-libs
Detect AppImage and update executable environment if required
2018-07-31 13:56:35 -07:00
Chris Roberts
6009492e73 Detect AppImage and update executable environment if required
If starting a process while running from within AppImage adjust
the LD_LIBRARY_PATH of the subprocess when the executable exists
outside of the AppImage. This prevents issues of invalid dynamic
library lookups when the AppImage contains common named libraries.
2018-07-31 10:39:26 -07:00
Chris Roberts
ba908052ec Also handle false value for compatibility 2018-07-30 11:58:49 -07:00
Chris Roberts
e3e3a332b3 Include update in ssh util for verify_host_key value 2018-07-30 11:25:29 -07:00
Chris Roberts
c0b871794c
Merge pull request #9926 from Telekom-PD/centos_75_nmcli_hang
Fix hang at nmcli call on CentOS 7.5 when ssh.pty is enabled
2018-07-27 12:11:30 -07:00
Chris Roberts
c660643abb Prevent matching on other Location headers
Prevent matching on custom headers that include the Location name
when checking for host redirection.
2018-07-19 09:18:30 -07:00
Chris Roberts
a490a8c587
Merge pull request #9966 from conspicuousClockwork/#9965
Added option to add to User-Agent
2018-07-18 16:43:02 -07:00
Chris Roberts
27a441f0bd
Merge pull request #10001 from chrisroberts/e-wsl-valid-sync
Disable synced folders on non-DrvFs
2018-07-18 16:41:16 -07:00
Chris Roberts
2ba5c74e1c
Merge pull request #9998 from chrisroberts/f-plat-wsl-pathname
Always force string type conversion of path
2018-07-18 16:37:07 -07:00
Chris Roberts
6f81d16691 Remove final #to_s on path 2018-07-12 16:49:22 -07:00
Thomas Röggla
2613d620fd checking whether the field location_uri.host is nil 2018-07-12 15:49:26 +02:00
Chris Roberts
859d48d5f5 Restrict synced folder access to DrvFs file systems only within WSL 2018-07-06 16:58:12 -07:00
Chris Roberts
6aa5c1a008 Always force string type conversion of path
Fixes #9984
2018-07-06 14:29:32 -07:00
Koen Verheyen
7939784d1b Display current version in version check 2018-06-29 16:41:50 +02:00
Caleb Martinez
447e58dac3
Added option to add to User-Agent 2018-06-28 13:21:34 -04:00
Chris Roberts
69ece0db4e Always return string value when converting path 2018-06-18 10:02:59 -07:00