From b09e4eff863795c8b7295754eee3df64b84cfca4 Mon Sep 17 00:00:00 2001 From: Hartmut Goebel Date: Sat, 24 Jun 2017 15:19:03 +0200 Subject: [PATCH 1/4] Vagrantfile: cygwin: Run setup after setting PATH Fixes #2609. --- Vagrantfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Vagrantfile b/Vagrantfile index abc099f54..8cf159a9f 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -201,7 +201,6 @@ def packages_cygwin(version) regtool set /HKLM/SYSTEM/CurrentControlSet/Services/OpenSSHd/ImagePath "C:\\cygwin\\CygWin\\bin\\cygrunsrv.exe" bash -c "ssh-host-config --no" ' > /cygdrive/c/cygwin/install.bat - cd /cygdrive/c/cygwin && cmd.exe /c install.bat echo "alias mkdir='mkdir -p'" > ~/.profile echo "export CYGWIN_ROOT=/cygdrive/c/cygwin/CygWin" >> ~/.profile @@ -211,6 +210,8 @@ def packages_cygwin(version) cmd.exe /c 'setx /m PATH "%PATH%;C:\\cygwin\\CygWin\\bin"' source ~/.profile + cd /cygdrive/c/cygwin && cmd.exe /c install.bat + echo 'db_home: windows' > $CYGWIN_ROOT/etc/nsswitch.conf EOF end From 54a60c5fc8b36f69a38bcd81b1e8d98be840b474 Mon Sep 17 00:00:00 2001 From: Hartmut Goebel Date: Sat, 24 Jun 2017 17:43:24 +0200 Subject: [PATCH 2/4] Vagrantfile: cygwin: Fix permissions as required by sshd. --- Vagrantfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Vagrantfile b/Vagrantfile index 8cf159a9f..ef1b51c31 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -200,6 +200,7 @@ def packages_cygwin(version) cd /d C:\\cygwin\\CygWin\\bin regtool set /HKLM/SYSTEM/CurrentControlSet/Services/OpenSSHd/ImagePath "C:\\cygwin\\CygWin\\bin\\cygrunsrv.exe" bash -c "ssh-host-config --no" + bash -c "chown sshd_server /cygdrive/c/cygwin/CygWin/var/empty" ' > /cygdrive/c/cygwin/install.bat echo "alias mkdir='mkdir -p'" > ~/.profile From f962659f11a995f3a812e1ab3d64b4f8afeaf438 Mon Sep 17 00:00:00 2001 From: Hartmut Goebel Date: Sat, 24 Jun 2017 19:22:39 +0200 Subject: [PATCH 3/4] Vagrantfile: cygwin: Prepend cygwin PATH. Otherwise crippled programs of the pre-installed MLS-OpenSSHd's path hide the cygwin programs. --- Vagrantfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index ef1b51c31..c25d89a6d 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -205,11 +205,11 @@ def packages_cygwin(version) echo "alias mkdir='mkdir -p'" > ~/.profile echo "export CYGWIN_ROOT=/cygdrive/c/cygwin/CygWin" >> ~/.profile - echo 'export PATH=$PATH:$CYGWIN_ROOT/bin' >> ~/.profile + echo 'export PATH=$CYGWIN_ROOT/bin:$PATH' >> ~/.profile echo '' > ~/.bash_profile - cmd.exe /c 'setx /m PATH "%PATH%;C:\\cygwin\\CygWin\\bin"' + cmd.exe /c 'setx /m PATH "C:\\cygwin\\CygWin\\bin;%PATH%"' source ~/.profile cd /cygdrive/c/cygwin && cmd.exe /c install.bat From 045a6768259c307f86a2bda03581478b3e57ae2e Mon Sep 17 00:00:00 2001 From: Hartmut Goebel Date: Sat, 24 Jun 2017 19:39:08 +0200 Subject: [PATCH 4/4] Vagrantfile: cygwin: Fix installation of pip. cygwin is at python-3.6 now. Use version-independent `ensurepip` to be future-proof. --- Vagrantfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Vagrantfile b/Vagrantfile index c25d89a6d..e6b65310e 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -219,7 +219,7 @@ end def install_cygwin_venv return <<-EOF - easy_install-3.4 pip + python3 -m ensurepip -U --default-pip pip install virtualenv EOF end