Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to cwRsync and patch Vagrant to make rsync-based synced_folders work (#91) #92

Merged
merged 6 commits into from
Apr 13, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
* update to PortableGit 1.9.5-preview20150319
* update to ConEmu 20150331
* update to Atom 0.189.0
* remove the included cygwin-based ssh and rsync executables in favor or [cwRsync](https://www.itefix.net/content/cwrsync-free-edition)
* bug fixes:
* make rsync-based synced folders work: use cwRsync and patch vagrant (see [#92](https://github.com/tknerr/bills-kitchen/issues/92), thanks @djmittens for reporting)

# 3.0-rc1 (April 1, 2015)

Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Useful additions for a better cooking experience:
* [PortableGit](https://code.google.com/p/msysgit/) - git client for Windows (preconfigured with [kdiff3](http://kdiff3.sourceforge.net/) as diff/merge tool)
* [putty](http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html) - the SSH client for Windows
* [clink](http://mridgers.github.io/clink/) - command completion and Bash-like line editing for Windows
* [Cygwin](http://www.cygwin.com/)-based `ssh.exe` and `rsync.exe` to make rsync-based Vagrant synced folders work on Windows
* [cwRsync](https://www.itefix.net/content/cwrsync-free-edition) which includes `ssh.exe` and `rsync.exe` to make rsync-based Vagrant synced folders work on Windows

### Environmental Changes

Expand Down Expand Up @@ -149,7 +149,6 @@ Bill's Kitchen bundles lots of awesome Open Source software. The copyright owner
* DevKit - Copyright (c), 2007-2014 RubyInstaller Team (BSD 3-Clause license)
* kdiff3 - Copyright (c) 2002-2012 Joachim Eibl (GPLv2 license)
* putty - Copyright (c) 1997-2014 Simon Tatham (MIT license)
* rsync - Copyright (c) 1996-2011 by Andrew Tridgell, Wayne Davison, and others. (GPLv3)
* OpenSSH - multiple licenses and copyright holders (OpenSSH License, BSD-compatible)
* cwRsync - October 2014, provided by Itefix - https://www.itefix.net/cwrsync (BSD 2-Clause license)

Bill's Kitchen itself is published under the MIT license. It is not "derivative work" but rather ["mere aggregation"](https://www.gnu.org/licenses/gpl-faq.html#MereAggregation) of other software and thus does not need to be licensed under GPL itself.
9 changes: 9 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ task :build do
download_tools
move_chefdk
fix_chefdk
fix_vagrant
copy_files
generate_docs
install_knife_plugins
Expand Down Expand Up @@ -101,6 +102,7 @@ def download_tools
%w{ switch.dl.sourceforge.net/project/kdiff3/kdiff3/0.9.96/KDiff3Setup_0.9.96.exe kdiff3
kdiff3.exe },
%w{ the.earth.li/~sgtatham/putty/0.63/x86/putty.zip putty },
%w{ www.itefix.net/dl/cwRsync_5.4.1_x86_Free.zip cwrsync },
%w{ dl.bintray.com/mitchellh/vagrant/vagrant_1.7.2.msi vagrant },
%w{ dl.bintray.com/mitchellh/terraform/terraform_0.4.1_windows_amd64.zip terraform },
%w{ dl.bintray.com/mitchellh/packer/packer_0.7.5_windows_amd64.zip packer },
Expand Down Expand Up @@ -133,6 +135,13 @@ def fix_chefdk
end
end

# workaround for mitchellh/vagrant#4073
def fix_vagrant
orig = "#{BUILD_DIR}/tools/vagrant/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/synced_folders/rsync/helper.rb"
patched = File.read(orig).gsub('hostpath = Vagrant::Util', 'hostpath = "/cygdrive" + Vagrant::Util')
File.write(orig, patched)
end

def install_knife_plugins
Bundler.with_clean_env do
command = "#{BUILD_DIR}/set-env.bat \
Expand Down
2 changes: 1 addition & 1 deletion files/home/.vagrant.d/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Vagrant.configure("2") do |config|
"verifier-gemcache" => { cache_dir: "/tmp/verifier/gems/cache" }
}

# fix permissions
# fix permissions
# see https://github.com/mitchellh/vagrant/issues/2257
# see https://github.com/test-kitchen/test-kitchen/issues/671
config.vm.provision "shell", inline: <<-EOF
Expand Down
8 changes: 3 additions & 5 deletions files/set-env.bat
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ set SCRIPT_DIR=%~dp0
:: for these we need the bin dirs in PATH
set DEVKITDIR=%SCRIPT_DIR%tools\devkit
set KDIFF3DIR=%SCRIPT_DIR%tools\kdiff3
set CYGWINSSHDIR=%SCRIPT_DIR%tools\cygwin-ssh
set CYGWINRSYNCDIR=%SCRIPT_DIR%tools\cygwin-rsync
set CWRSYNCDIR=%SCRIPT_DIR%tools\cwrsync\cwRsync_5.4.1_x86_Free
set CONEMUDIR=%SCRIPT_DIR%tools\conemu
set ATOMDIR=%SCRIPT_DIR%tools\atom\Atom\resources\cli
set APMDIR=%SCRIPT_DIR%tools\atom\Atom\resources\app\apm\bin
Expand Down Expand Up @@ -103,8 +102,7 @@ echo VBOX_USER_HOME=%VBOX_USER_HOME%
echo VBOX_INSTALL_PATH=%VBOX_INSTALL_PATH%
echo VBOX_MSI_INSTALL_PATH=%VBOX_MSI_INSTALL_PATH%
echo KDIFF3DIR=%KDIFF3DIR%
echo CYGWINSSHDIR=%CYGWINSSHDIR%
echo CYGWINRSYNCDIR=%CYGWINRSYNCDIR%
echo CWRSYNCDIR=%CWRSYNCDIR%
echo CONEMUDIR=%CONEMUDIR%
echo ATOMDIR=%ATOMDIR%
echo APMDIR=%APMDIR%
Expand All @@ -124,4 +122,4 @@ echo HTTP_PROXY=%HTTP_PROXY%
@doskey vi=atom.cmd $*
@doskey be=bundle exec $*

set PATH=%CHEFDK_PATH_ENTRIES%;%CONSULDIR%;%PACKERDIR%;%TERRAFORMDIR%;%VAGRANTDIR%\bin;%GITDIR%\cmd;%GITDIR%;%KDIFF3DIR%;%CYGWINRSYNCDIR%;%CYGWINSSHDIR%;%VAGRANTDIR%\embedded\bin;%CONEMUDIR%;%ATOMDIR%;%APMDIR%;%PUTTYDIR%;%VBOX_MSI_INSTALL_PATH%;%VBOX_INSTALL_PATH%;%PATH%
set PATH=%CHEFDK_PATH_ENTRIES%;%CONSULDIR%;%PACKERDIR%;%TERRAFORMDIR%;%VAGRANTDIR%\bin;%GITDIR%\cmd;%GITDIR%;%KDIFF3DIR%;%CWRSYNCDIR%;%VAGRANTDIR%\embedded\bin;%CONEMUDIR%;%ATOMDIR%;%APMDIR%;%PUTTYDIR%;%VBOX_MSI_INSTALL_PATH%;%VBOX_INSTALL_PATH%;%PATH%
8 changes: 3 additions & 5 deletions files/set-env.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ $script:pwd = Split-Path $MyInvocation.MyCommand.Path

$env:DEVKITDIR = Join-Path $pwd tools\devkit
$env:KDIFF3DIR = Join-Path $pwd tools\kdiff3
$env:CYGWINSSHDIR = Join-Path $pwd tools\cygwin-ssh
$env:CYGWINRSYNCDIR = Join-Path $pwd tools\cygwin-rsync
$env:CWRSYNCDIR = Join-Path $pwd tools\cwrsync\cwRsync_5.4.1_x86_Free
$env:CONEMUDIR = Join-Path $pwd tools\conemu
$env:ATOMDIR = Join-Path $pwd tools\atom\Atom\resources\cli
$env:APMDIR = Join-Path $pwd tools\atom\Atom\resources\app\apm\bin
Expand Down Expand Up @@ -106,8 +105,7 @@ Write-Host "DEVKITDIR=$env:DEVKITDIR"
Write-Host "VBOX_USER_HOME=$env:VBOX_USER_HOME"
Write-Host "VBOX_INSTALL_PATH=$env:VBOX_INSTALL_PATH"
Write-Host "KDIFF3DIR=$env:KDIFF3DIR"
Write-Host "CYGWINSSHDIR=$env:CYGWINSSHDIR"
Write-Host "CYGWINRSYNCDIR=$env:CYGWINRSYNCDIR"
Write-Host "CWRSYNCDIR=$env:CWRSYNCDIR"
Write-Host "CONEMUDIR=$env:CONEMUDIR"
Write-Host "ATOMDIR=$env:ATOMDIR"
Write-Host "APMDIR=$env:APMDIR"
Expand All @@ -126,4 +124,4 @@ Write-Host "HTTP_PROXY=$env:HTTP_PROXY"
set-alias vi "atom.cmd";
set-alias be "bundle exec";

$env:Path = "$env:CHEFDK_PATH_ENTRIES;$env:CONSULDIR;$env:PACKERDIR;$env:TERRAFORMDIR;$env:VAGRANTDIR\bin;$env:KDIFF3DIR;$env:CYGWINRSYNCDIR;$env:CYGWINSSHDIR;$env:VAGRANTDIR\embedded\bin;$env:CONEMUDIR;$env:ATOMDIR;$env:APMDIR;$env:PUTTYDIR;$env:VBOX_INSTALL_PATH;$env:Path"
$env:Path = "$env:CHEFDK_PATH_ENTRIES;$env:CONSULDIR;$env:PACKERDIR;$env:TERRAFORMDIR;$env:VAGRANTDIR\bin;$env:KDIFF3DIR;$env:CWRSYNCDIR;$env:VAGRANTDIR\embedded\bin;$env:CONEMUDIR;$env:ATOMDIR;$env:APMDIR;$env:PUTTYDIR;$env:VBOX_INSTALL_PATH;$env:Path"
Binary file removed files/tools/cygwin-rsync/cyggcc_s-1.dll
Binary file not shown.
Binary file removed files/tools/cygwin-rsync/cygiconv-2.dll
Binary file not shown.
Binary file removed files/tools/cygwin-rsync/cygwin1.dll
Binary file not shown.
Loading