From 16c8ff9013994e87aebe034dd2f0a5e5b82b81c7 Mon Sep 17 00:00:00 2001 From: Fabio Rehm Date: Sun, 7 Jul 2013 22:30:40 -0300 Subject: [PATCH 01/23] Remove support for building V3 base boxes with chef --- tasks/boxes.v3.rake | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/tasks/boxes.v3.rake b/tasks/boxes.v3.rake index bc094dc..b5002f9 100644 --- a/tasks/boxes.v3.rake +++ b/tasks/boxes.v3.rake @@ -54,7 +54,6 @@ class BuildUbuntuBoxTaskV3 < BuildGenericBoxTaskV3 end end -chef = ENV['CHEF'] == '1' puppet = ENV['PUPPET'] == '1' babushka = ENV['BABUSHKA'] == '1' @@ -66,41 +65,39 @@ namespace :boxes do desc 'Build an Ubuntu Precise 64 bits box' BuildUbuntuBoxTaskV3. new(:precise64, - :precise, 'amd64', chef: chef, puppet: puppet, babushka: babushka) + :precise, 'amd64', puppet: puppet, babushka: babushka) desc 'Build an Ubuntu Quantal 64 bits box' BuildUbuntuBoxTaskV3. new(:quantal64, - :quantal, 'amd64', chef: chef, puppet: puppet, babushka: babushka) + :quantal, 'amd64', puppet: puppet, babushka: babushka) - # FIXME: Find out how to install chef on raring desc 'Build an Ubuntu Raring 64 bits box' BuildUbuntuBoxTaskV3. new(:raring64, - :raring, 'amd64', chef: chef, puppet: puppet, babushka: babushka) + :raring, 'amd64', puppet: puppet, babushka: babushka) desc 'Build all Ubuntu boxes' task :all => %w( precise64 quantal64 raring64 ) end end - # FIXME: Find out how to install chef on debian boxes namespace :debian do namespace :build do desc 'Build an Debian Squeeze 64 bits box' BuildDebianBoxTaskV3. new(:squeeze64, - :squeeze, 'amd64', chef: false, puppet: puppet, babushka: babushka) + :squeeze, 'amd64', puppet: puppet, babushka: babushka) desc 'Build an Debian Wheezy 64 bits box' BuildDebianBoxTaskV3. new(:wheezy64, - :wheezy, 'amd64', chef: false, puppet: puppet, babushka: babushka) + :wheezy, 'amd64', puppet: puppet, babushka: babushka) desc 'Build an Debian Sid/unstable 64 bits box' BuildDebianBoxTaskV3. new(:sid64, - :sid, 'amd64', chef: false, puppet: puppet, babushka: babushka) + :sid, 'amd64', puppet: puppet, babushka: babushka) desc 'Build all Debian boxes' task :all => %w( squeeze64 wheezy64 sid64 ) From ecfa53970fc6311dbed700b0d8f09076e1b9b70b Mon Sep 17 00:00:00 2001 From: Fabio Rehm Date: Sun, 7 Jul 2013 22:49:48 -0300 Subject: [PATCH 02/23] Rename v3 boxes rakefile --- tasks/{boxes.v3.rake => boxes.rake} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename tasks/{boxes.v3.rake => boxes.rake} (100%) diff --git a/tasks/boxes.v3.rake b/tasks/boxes.rake similarity index 100% rename from tasks/boxes.v3.rake rename to tasks/boxes.rake From 44bedfe7c6b943da559e1b8f06bc7a52c880f3e5 Mon Sep 17 00:00:00 2001 From: Fabio Rehm Date: Mon, 8 Jul 2013 10:40:12 -0300 Subject: [PATCH 03/23] Get rid of v3 namespaces for building boxes --- tasks/boxes.rake | 84 +++++++++++++++++++++++------------------------- 1 file changed, 41 insertions(+), 43 deletions(-) diff --git a/tasks/boxes.rake b/tasks/boxes.rake index b5002f9..2b4e030 100644 --- a/tasks/boxes.rake +++ b/tasks/boxes.rake @@ -58,53 +58,51 @@ puppet = ENV['PUPPET'] == '1' babushka = ENV['BABUSHKA'] == '1' namespace :boxes do - namespace :v3 do - namespace :ubuntu do - namespace :build do + namespace :ubuntu do + namespace :build do - desc 'Build an Ubuntu Precise 64 bits box' - BuildUbuntuBoxTaskV3. - new(:precise64, - :precise, 'amd64', puppet: puppet, babushka: babushka) + desc 'Build an Ubuntu Precise 64 bits box' + BuildUbuntuBoxTaskV3. + new(:precise64, + :precise, 'amd64', puppet: puppet, babushka: babushka) - desc 'Build an Ubuntu Quantal 64 bits box' - BuildUbuntuBoxTaskV3. - new(:quantal64, - :quantal, 'amd64', puppet: puppet, babushka: babushka) + desc 'Build an Ubuntu Quantal 64 bits box' + BuildUbuntuBoxTaskV3. + new(:quantal64, + :quantal, 'amd64', puppet: puppet, babushka: babushka) - desc 'Build an Ubuntu Raring 64 bits box' - BuildUbuntuBoxTaskV3. - new(:raring64, - :raring, 'amd64', puppet: puppet, babushka: babushka) + desc 'Build an Ubuntu Raring 64 bits box' + BuildUbuntuBoxTaskV3. + new(:raring64, + :raring, 'amd64', puppet: puppet, babushka: babushka) - desc 'Build all Ubuntu boxes' - task :all => %w( precise64 quantal64 raring64 ) - end + desc 'Build all Ubuntu boxes' + task :all => %w( precise64 quantal64 raring64 ) end - - namespace :debian do - namespace :build do - desc 'Build an Debian Squeeze 64 bits box' - BuildDebianBoxTaskV3. - new(:squeeze64, - :squeeze, 'amd64', puppet: puppet, babushka: babushka) - - desc 'Build an Debian Wheezy 64 bits box' - BuildDebianBoxTaskV3. - new(:wheezy64, - :wheezy, 'amd64', puppet: puppet, babushka: babushka) - - desc 'Build an Debian Sid/unstable 64 bits box' - BuildDebianBoxTaskV3. - new(:sid64, - :sid, 'amd64', puppet: puppet, babushka: babushka) - - desc 'Build all Debian boxes' - task :all => %w( squeeze64 wheezy64 sid64 ) - end - end - - desc 'Build all base boxes for release' - task :build_all => %w( ubuntu:build:all debian:build:all ) end + + namespace :debian do + namespace :build do + desc 'Build an Debian Squeeze 64 bits box' + BuildDebianBoxTaskV3. + new(:squeeze64, + :squeeze, 'amd64', puppet: puppet, babushka: babushka) + + desc 'Build an Debian Wheezy 64 bits box' + BuildDebianBoxTaskV3. + new(:wheezy64, + :wheezy, 'amd64', puppet: puppet, babushka: babushka) + + desc 'Build an Debian Sid/unstable 64 bits box' + BuildDebianBoxTaskV3. + new(:sid64, + :sid, 'amd64', puppet: puppet, babushka: babushka) + + desc 'Build all Debian boxes' + task :all => %w( squeeze64 wheezy64 sid64 ) + end + end + + desc 'Build all base boxes for release' + task :build_all => %w( ubuntu:build:all debian:build:all ) end From e10822df325d01e094ad7c33362776705bd56c9e Mon Sep 17 00:00:00 2001 From: Fabio Rehm Date: Mon, 8 Jul 2013 10:47:07 -0300 Subject: [PATCH 04/23] Require Vagrant code right on the beginning of base box building process so it fails early --- tasks/boxes.rake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tasks/boxes.rake b/tasks/boxes.rake index 2b4e030..c760444 100644 --- a/tasks/boxes.rake +++ b/tasks/boxes.rake @@ -4,6 +4,8 @@ load 'tasks/boxes.v2.rake' class BuildGenericBoxTaskV3 < BuildGenericBoxTaskV2 def build + require 'vagrant' + check_if_box_has_been_built! FileUtils.mkdir_p 'boxes/temp' unless File.exist? 'base/temp' @@ -26,7 +28,6 @@ class BuildGenericBoxTaskV3 < BuildGenericBoxTaskV2 end def finalize - require 'vagrant' auth_key = Vagrant.source_root.join('keys', 'vagrant.pub').expand_path.to_s run 'finalize', @arch, @release, auth_key end From 8dc0d09632c2e9e56885ecbdc29d6191b835af9e Mon Sep 17 00:00:00 2001 From: Fabio Rehm Date: Mon, 8 Jul 2013 10:47:29 -0300 Subject: [PATCH 05/23] Chef installation is now disabled by default --- tasks/boxes.v2.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/boxes.v2.rake b/tasks/boxes.v2.rake index 147161d..d2cf433 100644 --- a/tasks/boxes.v2.rake +++ b/tasks/boxes.v2.rake @@ -11,7 +11,7 @@ class BuildGenericBoxTaskV2 < ::Rake::TaskLib @distrib = distrib @release = release.to_s @arch = arch.to_s - @install_chef = opts.fetch(:chef, true) + @install_chef = opts.fetch(:chef, false) @install_puppet = opts.fetch(:puppet, true) @install_babushka = opts.fetch(:babushka, true) @file = opts[:file] || default_box_file From b8b545c277a31784618f877a2c381dbc9d4dfe05 Mon Sep 17 00:00:00 2001 From: Fabio Rehm Date: Mon, 8 Jul 2013 10:50:15 -0300 Subject: [PATCH 06/23] New boxes --- CHANGELOG.md | 1 - README.md | 9 +++++---- development/Vagrantfile | 2 +- example/Vagrantfile | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aac93f5..2cdc7d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,6 @@ FEATURES: - - Enable Chef for Ubuntu Raring base box - New box format [#89](https://github.com/fgrehm/vagrant-lxc/issues/89) BUG FIXES: diff --git a/README.md b/README.md index 7d7c308..d0ee68c 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ to see the plugin in action and find out more about it. ## Features -* Vagrant's `up`, `halt`, `reload`, `destroy`, `ssh`, `provision` and `package` commands +* Vagrant's `up`, `halt`, `reload`, `destroy`, `ssh`, `provision` and `package` * Shared folders * Provisioning with any built-in Vagrant provisioner * Port forwarding @@ -55,7 +55,7 @@ vagrant plugin install vagrant-lxc After installing, add a [base box](#base-boxes) using any name you want, for example: ``` -vagrant box add quantal64 http://dl.dropbox.com/u/13510779/lxc-quantal-amd64-2013-05-08.box +vagrant box add quantal64 http://dl.dropbox.com/u/13510779/lxc-quantal-amd64-2013-07-08.box ``` Then create a Vagrantfile that looks like the following, changing the box name @@ -100,8 +100,9 @@ For other configuration options, please check [lxc.conf manpages](http://manpage ### Base boxes -Please check [the wiki](https://github.com/fgrehm/vagrant-lxc/wiki/Base-boxes#v2-boxes) -for a list of pre built base boxes and information on [how to build your own](https://github.com/fgrehm/vagrant-lxc/wiki/Base-boxes#building-your-own). +Please check [the wiki](https://github.com/fgrehm/vagrant-lxc/wiki/Base-boxes) +for a list of [pre built](https://github.com/fgrehm/vagrant-lxc/wiki/Base-boxes#available-boxes) +base boxes and information on [how to build your own](https://github.com/fgrehm/vagrant-lxc/wiki/Base-boxes#building-your-own). ## Current limitations diff --git a/development/Vagrantfile b/development/Vagrantfile index 03ab7a1..3f6798b 100644 --- a/development/Vagrantfile +++ b/development/Vagrantfile @@ -3,7 +3,7 @@ require 'pathname' BASE_URL = 'http://dl.dropbox.com/u/13510779' -LAST_RELEASE_DATE = '2013-05-08' +LAST_RELEASE_DATE = '2013-07-08' LOCAL_BOXES_PATH = Pathname('../boxes/output').expand_path def lxc_box_url(release_name) file_name = "lxc-#{release_name}-amd64-#{LAST_RELEASE_DATE}.box" diff --git a/example/Vagrantfile b/example/Vagrantfile index faf8564..a684cd7 100644 --- a/example/Vagrantfile +++ b/example/Vagrantfile @@ -32,10 +32,10 @@ echo "Hi there I'm a shell script used for provisioning" releases.each do |release| config.vm.define(release) do |lxc_config| lxc_config.vm.box = "#{release}64" - lxc_config.vm.box_url = "http://dl.dropbox.com/u/13510779/lxc-#{release}-amd64-2013-05-08.box" - lxc_config.vm.network :forwarded_port, guest: 80, host: (port += 1) + lxc_config.vm.box_url = "http://dl.dropbox.com/u/13510779/lxc-#{release}-amd64-2013-07-08.box" # Uncomment if you want to try out a box built locally - # lxc_config.vm.box_url = "../boxes/output/lxc-#{release}64.box" + # lxc_config.vm.box_url = "../boxes/output/lxc-#{release}-amd64-2013-07-08.box" + lxc_config.vm.network :forwarded_port, guest: 80, host: (port += 1) lxc_config.vm.hostname = "lxc-#{release}64-example" end end From 3e73a85d5295a914321f07f57980f632b6effd86 Mon Sep 17 00:00:00 2001 From: Fabio Rehm Date: Mon, 8 Jul 2013 13:05:29 -0300 Subject: [PATCH 07/23] Enable retries when fetching container state Fixes #74 --- lib/vagrant-lxc/driver/cli.rb | 2 +- spec/unit/driver/cli_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/vagrant-lxc/driver/cli.rb b/lib/vagrant-lxc/driver/cli.rb index 133a828..b7ed4fe 100644 --- a/lib/vagrant-lxc/driver/cli.rb +++ b/lib/vagrant-lxc/driver/cli.rb @@ -39,7 +39,7 @@ module Vagrant end def state - if @name && run(:info, '--name', @name) =~ /^state:[^A-Z]+([A-Z]+)$/ + if @name && run(:info, '--name', @name, retryable: true) =~ /^state:[^A-Z]+([A-Z]+)$/ $1.downcase.to_sym elsif @name :unknown diff --git a/spec/unit/driver/cli_spec.rb b/spec/unit/driver/cli_spec.rb index 3498b6a..5080fb2 100644 --- a/spec/unit/driver/cli_spec.rb +++ b/spec/unit/driver/cli_spec.rb @@ -126,7 +126,7 @@ describe Vagrant::LXC::Driver::CLI do it 'calls lxc-info with the right arguments' do subject.state - subject.should have_received(:run).with(:info, '--name', name) + subject.should have_received(:run).with(:info, '--name', name, retryable: true) end it 'maps the output of lxc-info status out to a symbol' do From 1348bb910b76663fc4472bd002a0cebcf655a587 Mon Sep 17 00:00:00 2001 From: Fabio Rehm Date: Mon, 8 Jul 2013 13:13:47 -0300 Subject: [PATCH 08/23] Tks to @stucki work on #92 there is no need to do this anymore :) --- spec/acceptance/sanity_check_spec.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/spec/acceptance/sanity_check_spec.rb b/spec/acceptance/sanity_check_spec.rb index b67987e..77b07b0 100644 --- a/spec/acceptance/sanity_check_spec.rb +++ b/spec/acceptance/sanity_check_spec.rb @@ -20,10 +20,7 @@ describe 'Sanity check' do end it "is able to be SSH'ed" do - expected = 'lxc-test-box' - # HACK: - expected = ENV['BOX_NAME'].gsub(/64$/, '') if %w( squeeze64 wheezy64 sid64 ).include? ENV['BOX_NAME'] - expect(vagrant_ssh('hostname')).to eq expected + expect(vagrant_ssh('hostname')).to eq 'lxc-test-box' end it 'mounts shared folders with the right permissions' do From e4504090f83fc8d511c02214fec691bc460d285d Mon Sep 17 00:00:00 2001 From: Fabio Rehm Date: Mon, 8 Jul 2013 13:15:39 -0300 Subject: [PATCH 09/23] Update CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2cdc7d1..c69adac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ FEATURES: BUG FIXES: + - Enable retries when fetching container state [#74](https://github.com/fgrehm/vagrant-lxc/issues/74) - Fix error when setting Debian boxes hostname from Vagrantfile [#91](https://github.com/fgrehm/vagrant-lxc/issues/91) - BTRFS-friendly base boxes [#81](https://github.com/fgrehm/vagrant-lxc/issues/81) - Extended templates path lookup [#77](https://github.com/fgrehm/vagrant-lxc/issues/77) (tks to @aries1980) From b97081be0da398c348e207e033fc4a6879c7b49a Mon Sep 17 00:00:00 2001 From: Fabio Rehm Date: Mon, 8 Jul 2013 13:28:11 -0300 Subject: [PATCH 10/23] Add missing locale key for stopped status Fixes #97 --- CHANGELOG.md | 1 + locales/en.yml | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c69adac..fa51ca0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ FEATURES: BUG FIXES: + - Add translation for stopped status [#97](https://github.com/fgrehm/vagrant-lxc/issues/97) - Enable retries when fetching container state [#74](https://github.com/fgrehm/vagrant-lxc/issues/74) - Fix error when setting Debian boxes hostname from Vagrantfile [#91](https://github.com/fgrehm/vagrant-lxc/issues/91) - BTRFS-friendly base boxes [#81](https://github.com/fgrehm/vagrant-lxc/issues/81) diff --git a/locales/en.yml b/locales/en.yml index 50edd3d..fcb8819 100644 --- a/locales/en.yml +++ b/locales/en.yml @@ -17,8 +17,12 @@ en: force_shutdown: |- Forcing shutdown of container... - # TODO: Review messages below vagrant: + commands: + status: + stopped: |- + The container is currently stopped. Run `vagrant up` to bring it up again. + actions: lxc: compressing_rootfs: Compressing container's rootfs... From 78499202b6b12b1334095f8e39f2e39b28a34cc2 Mon Sep 17 00:00:00 2001 From: Fabio Rehm Date: Fri, 12 Jul 2013 01:21:27 -0300 Subject: [PATCH 11/23] Revert "Lets ensure the rootfs is always set before starting the container" This reverts commit c6af4fab084cb1b920af513ef629d75745a152fc as it is probably a better idea to have the rootfs config baked into the config file so we can easily run a `lxc-start -n CONTAINER` --- lib/vagrant-lxc/driver.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/vagrant-lxc/driver.rb b/lib/vagrant-lxc/driver.rb index c9f5388..0a46194 100644 --- a/lib/vagrant-lxc/driver.rb +++ b/lib/vagrant-lxc/driver.rb @@ -30,7 +30,7 @@ module Vagrant end def rootfs_path - Pathname.new(base_path.join('rootfs')) + Pathname.new(base_path.join('config').read.match(/^lxc\.rootfs\s+=\s+(.+)$/)[1]) end def create(name, template_path, config_file, template_options = {}) @@ -65,7 +65,6 @@ module Vagrant extra = ['-o', ENV['LXC_START_LOG_FILE'], '-l', 'DEBUG'] end customizations = customizations + @customizations - customizations += [['rootfs', rootfs_path.to_s]] @cli.transition_to(:running) { |c| c.start(customizations, (extra || nil)) } end From 6c52ef82553b7bdf2af7f2320cfa1a5b8276cb85 Mon Sep 17 00:00:00 2001 From: Fabio Rehm Date: Fri, 12 Jul 2013 01:29:10 -0300 Subject: [PATCH 12/23] Ensure container's rootfs is set on config file Makes our lives easier as we are able to just run a `lxc-start -n CONTAINER` to check how things are doing without having to go through vagrant. --- boxes/common/lxc-template | 2 ++ 1 file changed, 2 insertions(+) diff --git a/boxes/common/lxc-template b/boxes/common/lxc-template index cf44ee3..9e53be4 100755 --- a/boxes/common/lxc-template +++ b/boxes/common/lxc-template @@ -78,6 +78,8 @@ copy_configuration() rootfs=$2 name=$3 + grep -q "^lxc.rootfs" $path/config 2>/dev/null || echo "lxc.rootfs = $rootfs" >> $path/config + # if there is exactly one veth network entry, make sure it has an # associated hwaddr. nics=`grep -e '^lxc\.network\.type[ \t]*=[ \t]*veth' $path/config | wc -l` From e3665f88ae5b0db7722c9e856ff2b4009e56cae1 Mon Sep 17 00:00:00 2001 From: Fabio Rehm Date: Fri, 12 Jul 2013 14:24:15 -0300 Subject: [PATCH 13/23] Update dependencies --- Gemfile | 6 +++--- Gemfile.lock | 58 ++++++++++++++++++++++++++++++---------------------- 2 files changed, 37 insertions(+), 27 deletions(-) diff --git a/Gemfile b/Gemfile index e33d5a4..eef99e8 100644 --- a/Gemfile +++ b/Gemfile @@ -3,9 +3,9 @@ source 'https://rubygems.org' gemspec group :development do - # TODO: Lock to 1.2.3 once it is out with this fix: https://github.com/mitchellh/vagrant/pull/1685 - gem 'vagrant', git: 'https://github.com/mitchellh/vagrant.git' - gem 'vagrant-cachier' + gem 'vagrant', github: 'mitchellh/vagrant' + gem 'vagrant-cachier', github: 'fgrehm/vagrant-cachier' + gem 'vagrant-pristine', github: 'fgrehm/vagrant-pristine' gem 'guard' gem 'guard-rspec' gem 'rb-inotify' diff --git a/Gemfile.lock b/Gemfile.lock index 3c3c263..ed1f6d5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,12 +1,23 @@ GIT - remote: https://github.com/mitchellh/vagrant.git - revision: ccfd321ef98dc5c12b180cc3a26f12d870c0eff5 + remote: git://github.com/fgrehm/vagrant-cachier.git + revision: ae6cb5bcfbdbb2157867d77ded8f2b6f430c0f6c specs: - vagrant (1.2.3.dev) + vagrant-cachier (0.2.0) + +GIT + remote: git://github.com/fgrehm/vagrant-pristine.git + revision: 45a8d75f048bd611e337583496eb2b48b6998bbd + specs: + vagrant-pristine (0.1.0) + +GIT + remote: git://github.com/mitchellh/vagrant.git + revision: 6d26c86c4c3f65e2e59f4dda6bca9cd9235de704 + specs: + vagrant (1.2.4.dev) childprocess (~> 0.3.7) erubis (~> 2.7.0) i18n (~> 0.6.0) - json (>= 1.5.1, < 1.8.0) log4r (~> 1.1.9) net-scp (~> 1.1.0) net-ssh (~> 2.6.6) @@ -31,36 +42,35 @@ GEM thor diff-lcs (1.2.4) erubis (2.7.0) - ffi (1.8.1) + ffi (1.9.0) formatador (0.2.4) - guard (1.8.0) + guard (1.8.1) formatador (>= 0.2.4) listen (>= 1.0.0) lumberjack (>= 1.0.2) pry (>= 0.9.10) thor (>= 0.14.6) - guard-rspec (3.0.0) + guard-rspec (3.0.2) guard (>= 1.8) rspec (~> 2.13) i18n (0.6.4) - json (1.7.7) - listen (1.1.2) + listen (1.2.2) rb-fsevent (>= 0.9.3) rb-inotify (>= 0.9) rb-kqueue (>= 0.2) log4r (1.1.10) - lumberjack (1.0.3) + lumberjack (1.0.4) method_source (0.8.1) mime-types (1.23) - multi_json (1.7.3) - net-scp (1.1.1) + multi_json (1.7.7) + net-scp (1.1.2) net-ssh (>= 2.6.5) - net-ssh (2.6.7) + net-ssh (2.6.8) pry (0.9.12.2) coderay (~> 1.0.5) method_source (~> 0.8) slop (~> 3.4) - rake (10.0.4) + rake (10.1.0) rb-fsevent (0.9.3) rb-inotify (0.9.0) ffi (>= 0.5.0) @@ -68,16 +78,16 @@ GEM ffi (>= 0.5.0) rest-client (1.6.7) mime-types (>= 1.16) - rspec (2.13.0) - rspec-core (~> 2.13.0) - rspec-expectations (~> 2.13.0) - rspec-mocks (~> 2.13.0) - rspec-core (2.13.1) - rspec-expectations (2.13.0) + rspec (2.14.1) + rspec-core (~> 2.14.0) + rspec-expectations (~> 2.14.0) + rspec-mocks (~> 2.14.0) + rspec-core (2.14.2) + rspec-expectations (2.14.0) diff-lcs (>= 1.1.3, < 2.0) - rspec-fire (1.1.3) + rspec-fire (1.2.0) rspec (~> 2.11) - rspec-mocks (2.13.1) + rspec-mocks (2.14.1) rspec-spies (2.1.4) rspec (~> 2.0) simplecov (0.7.1) @@ -86,7 +96,6 @@ GEM simplecov-html (0.7.1) slop (3.4.5) thor (0.18.1) - vagrant-cachier (0.0.6) PLATFORMS ruby @@ -101,5 +110,6 @@ DEPENDENCIES rspec-fire rspec-spies vagrant! - vagrant-cachier + vagrant-cachier! vagrant-lxc! + vagrant-pristine! From e504ce3e8dbb748005ca3b64e8cb5de2d07290cb Mon Sep 17 00:00:00 2001 From: Fabio Rehm Date: Fri, 12 Jul 2013 14:25:24 -0300 Subject: [PATCH 14/23] New boxes! --- README.md | 3 +-- development/Vagrantfile | 2 +- example/Vagrantfile | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index d0ee68c..df881a1 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ vagrant plugin install vagrant-lxc After installing, add a [base box](#base-boxes) using any name you want, for example: ``` -vagrant box add quantal64 http://dl.dropbox.com/u/13510779/lxc-quantal-amd64-2013-07-08.box +vagrant box add quantal64 http://dl.dropbox.com/u/13510779/lxc-quantal-amd64-2013-07-12.box ``` Then create a Vagrantfile that looks like the following, changing the box name @@ -99,7 +99,6 @@ For other configuration options, please check [lxc.conf manpages](http://manpage ### Base boxes - Please check [the wiki](https://github.com/fgrehm/vagrant-lxc/wiki/Base-boxes) for a list of [pre built](https://github.com/fgrehm/vagrant-lxc/wiki/Base-boxes#available-boxes) base boxes and information on [how to build your own](https://github.com/fgrehm/vagrant-lxc/wiki/Base-boxes#building-your-own). diff --git a/development/Vagrantfile b/development/Vagrantfile index 3f6798b..655d5bc 100644 --- a/development/Vagrantfile +++ b/development/Vagrantfile @@ -3,7 +3,7 @@ require 'pathname' BASE_URL = 'http://dl.dropbox.com/u/13510779' -LAST_RELEASE_DATE = '2013-07-08' +LAST_RELEASE_DATE = '2013-07-12' LOCAL_BOXES_PATH = Pathname('../boxes/output').expand_path def lxc_box_url(release_name) file_name = "lxc-#{release_name}-amd64-#{LAST_RELEASE_DATE}.box" diff --git a/example/Vagrantfile b/example/Vagrantfile index a684cd7..53da8e9 100644 --- a/example/Vagrantfile +++ b/example/Vagrantfile @@ -32,9 +32,9 @@ echo "Hi there I'm a shell script used for provisioning" releases.each do |release| config.vm.define(release) do |lxc_config| lxc_config.vm.box = "#{release}64" - lxc_config.vm.box_url = "http://dl.dropbox.com/u/13510779/lxc-#{release}-amd64-2013-07-08.box" + lxc_config.vm.box_url = "http://dl.dropbox.com/u/13510779/lxc-#{release}-amd64-2013-07-12.box" # Uncomment if you want to try out a box built locally - # lxc_config.vm.box_url = "../boxes/output/lxc-#{release}-amd64-2013-07-08.box" + # lxc_config.vm.box_url = "../boxes/output/lxc-#{release}-amd64-2013-07-12.box" lxc_config.vm.network :forwarded_port, guest: 80, host: (port += 1) lxc_config.vm.hostname = "lxc-#{release}64-example" end From 4bbbb4cbf6c276908b23141e0b252bf1093b5fd3 Mon Sep 17 00:00:00 2001 From: Fabio Rehm Date: Fri, 12 Jul 2013 20:27:16 -0300 Subject: [PATCH 15/23] Enable vagrant-pristine for development boxes --- development/Vagrantfile | 1 + 1 file changed, 1 insertion(+) diff --git a/development/Vagrantfile b/development/Vagrantfile index 655d5bc..fc37224 100644 --- a/development/Vagrantfile +++ b/development/Vagrantfile @@ -43,6 +43,7 @@ BOXES = { Vagrant.require_plugin 'vagrant-lxc' Vagrant.require_plugin 'vagrant-cachier' +Vagrant.require_plugin 'vagrant-pristine' Vagrant.configure("2") do |config| config.vm.synced_folder "../", "/vagrant", id: 'vagrant-root', nfs: true From 0e66eb675ba2f343519a3d5e56741f937a32f020 Mon Sep 17 00:00:00 2001 From: Fabio Rehm Date: Fri, 12 Jul 2013 20:27:39 -0300 Subject: [PATCH 16/23] Enable NFS for vagrant-cachier --- development/Vagrantfile | 1 + 1 file changed, 1 insertion(+) diff --git a/development/Vagrantfile b/development/Vagrantfile index fc37224..b4df960 100644 --- a/development/Vagrantfile +++ b/development/Vagrantfile @@ -50,6 +50,7 @@ Vagrant.configure("2") do |config| config.cache.scope = :machine config.cache.auto_detect = true + config.cache.enable_nfs = true ip_suffix = 30 BOXES.each do |box_name, box_config| From 4bd6bffcb6ff02e25c5bca16882bfbf4f08b0ad3 Mon Sep 17 00:00:00 2001 From: Fabio Rehm Date: Fri, 12 Jul 2013 20:38:38 -0300 Subject: [PATCH 17/23] Use vagrant-omnibus to test Chef provisioning on example Vagrantfile --- Gemfile | 1 + Gemfile.lock | 2 ++ example/Vagrantfile | 15 ++++++++++----- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/Gemfile b/Gemfile index eef99e8..62ddf29 100644 --- a/Gemfile +++ b/Gemfile @@ -6,6 +6,7 @@ group :development do gem 'vagrant', github: 'mitchellh/vagrant' gem 'vagrant-cachier', github: 'fgrehm/vagrant-cachier' gem 'vagrant-pristine', github: 'fgrehm/vagrant-pristine' + gem 'vagrant-omnibus' gem 'guard' gem 'guard-rspec' gem 'rb-inotify' diff --git a/Gemfile.lock b/Gemfile.lock index ed1f6d5..8ac4004 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -96,6 +96,7 @@ GEM simplecov-html (0.7.1) slop (3.4.5) thor (0.18.1) + vagrant-omnibus (1.1.0) PLATFORMS ruby @@ -112,4 +113,5 @@ DEPENDENCIES vagrant! vagrant-cachier! vagrant-lxc! + vagrant-omnibus vagrant-pristine! diff --git a/example/Vagrantfile b/example/Vagrantfile index 53da8e9..179bbed 100644 --- a/example/Vagrantfile +++ b/example/Vagrantfile @@ -3,6 +3,7 @@ # Not really needed, but useful while developing so that vagrant picks it up Vagrant.require_plugin 'vagrant-lxc' +Vagrant.require_plugin 'vagrant-omnibus' Vagrant.configure("2") do |config| config.vm.synced_folder "/tmp", "/vagrant_data" @@ -22,11 +23,6 @@ echo "Hi there I'm a shell script used for provisioning" puppet.manifest_file = "site.pp" end - config.vm.provision :chef_solo do |chef| - chef.add_recipe "hello-world" - chef.log_level = :debug - end - port = 8080 releases = %w(precise quantal raring wheezy squeeze sid) releases.each do |release| @@ -37,6 +33,15 @@ echo "Hi there I'm a shell script used for provisioning" # lxc_config.vm.box_url = "../boxes/output/lxc-#{release}-amd64-2013-07-12.box" lxc_config.vm.network :forwarded_port, guest: 80, host: (port += 1) lxc_config.vm.hostname = "lxc-#{release}64-example" + + if %w(precise quantal raring squeeze).include? release + lxc_config.omnibus.chef_version = :latest + + lxc_config.vm.provision :chef_solo do |chef| + chef.add_recipe "hello-world" + chef.log_level = :debug + end + end end end end From c14ca57d176079b8bb31ec41db5b05a6e36402bb Mon Sep 17 00:00:00 2001 From: Fabio Rehm Date: Sat, 13 Jul 2013 13:33:09 -0300 Subject: [PATCH 18/23] fire_double was deprecated in favor of instance_double --- spec/unit/action/compress_rootfs_spec.rb | 6 +++--- spec/unit/action/forward_ports_spec.rb | 4 ++-- spec/unit/action/setup_package_files_spec.rb | 4 ++-- spec/unit/driver_spec.rb | 14 +++++++------- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/spec/unit/action/compress_rootfs_spec.rb b/spec/unit/action/compress_rootfs_spec.rb index bedc9c5..b1caa8f 100644 --- a/spec/unit/action/compress_rootfs_spec.rb +++ b/spec/unit/action/compress_rootfs_spec.rb @@ -5,9 +5,9 @@ require 'vagrant-lxc/action/compress_rootfs' describe Vagrant::LXC::Action::CompressRootFS do let(:app) { mock(:app, call: true) } let(:env) { {machine: machine, ui: stub(info: true)} } - let(:machine) { fire_double('Vagrant::Machine', provider: provider) } - let(:provider) { fire_double('Vagrant::LXC::Provider', driver: driver) } - let(:driver) { fire_double('Vagrant::LXC::Driver', compress_rootfs: compressed_rootfs_path) } + let(:machine) { instance_double('Vagrant::Machine', provider: provider) } + let(:provider) { instance_double('Vagrant::LXC::Provider', driver: driver) } + let(:driver) { instance_double('Vagrant::LXC::Driver', compress_rootfs: compressed_rootfs_path) } let(:compressed_rootfs_path) { '/path/to/rootfs.tar.gz' } subject { described_class.new(app, env) } diff --git a/spec/unit/action/forward_ports_spec.rb b/spec/unit/action/forward_ports_spec.rb index 4c31edc..9dc2253 100644 --- a/spec/unit/action/forward_ports_spec.rb +++ b/spec/unit/action/forward_ports_spec.rb @@ -10,8 +10,8 @@ describe Vagrant::LXC::Action::ForwardPorts do let(:networks) { [[:other_config, {}], [:forwarded_port, {guest: guest_port, host: host_port}]] } let(:host_port) { 8080 } let(:guest_port) { 80 } - let(:provider) { fire_double('Vagrant::LXC::Provider', driver: driver) } - let(:driver) { fire_double('Vagrant::LXC::Driver', assigned_ip: container_ip) } + let(:provider) { instance_double('Vagrant::LXC::Provider', driver: driver) } + let(:driver) { instance_double('Vagrant::LXC::Driver', assigned_ip: container_ip) } let(:container_ip) { '10.0.1.234' } let(:pid) { 'a-pid' } diff --git a/spec/unit/action/setup_package_files_spec.rb b/spec/unit/action/setup_package_files_spec.rb index c5a4c7b..3c9a986 100644 --- a/spec/unit/action/setup_package_files_spec.rb +++ b/spec/unit/action/setup_package_files_spec.rb @@ -5,9 +5,9 @@ require 'vagrant-lxc/action/setup_package_files' describe Vagrant::LXC::Action::SetupPackageFiles do let(:app) { mock(:app, call: true) } let(:env) { {machine: machine, tmp_path: tmp_path, ui: stub(info: true), 'package.rootfs' => rootfs_path} } - let(:machine) { fire_double('Vagrant::Machine', box: box) } + let(:machine) { instance_double('Vagrant::Machine', box: box) } let!(:tmp_path) { Pathname.new(Dir.mktmpdir) } - let(:box) { fire_double('Vagrant::Box', directory: tmp_path.join('box')) } + let(:box) { instance_double('Vagrant::Box', directory: tmp_path.join('box')) } let(:rootfs_path) { tmp_path.join('rootfs-amd64.tar.gz') } subject { described_class.new(app, env) } diff --git a/spec/unit/driver_spec.rb b/spec/unit/driver_spec.rb index f657648..b062bb9 100644 --- a/spec/unit/driver_spec.rb +++ b/spec/unit/driver_spec.rb @@ -9,7 +9,7 @@ describe Vagrant::LXC::Driver do let(:unknown_container) { described_class.new('unknown', cli) } let(:valid_container) { described_class.new('valid', cli) } let(:new_container) { described_class.new(nil) } - let(:cli) { fire_double('Vagrant::LXC::Driver::CLI', list: ['valid']) } + let(:cli) { instance_double('Vagrant::LXC::Driver::CLI', list: ['valid']) } it 'raises a ContainerNotFound error if an unknown container name gets provided' do expect { @@ -37,7 +37,7 @@ describe Vagrant::LXC::Driver do let(:template_opts) { {'--some' => 'random-option'} } let(:config_file) { '/path/to/lxc-config-from-box' } let(:rootfs_tarball) { '/path/to/cache/rootfs.tar.gz' } - let(:cli) { fire_double('Vagrant::LXC::Driver::CLI', :create => true, :name= => true) } + let(:cli) { instance_double('Vagrant::LXC::Driver::CLI', :create => true, :name= => true) } subject { described_class.new(nil, cli) } @@ -60,7 +60,7 @@ describe Vagrant::LXC::Driver do end describe 'destruction' do - let(:cli) { fire_double('Vagrant::LXC::Driver::CLI', destroy: true) } + let(:cli) { instance_double('Vagrant::LXC::Driver::CLI', destroy: true) } subject { described_class.new('name', cli) } @@ -75,7 +75,7 @@ describe Vagrant::LXC::Driver do let(:customizations) { [['a', '1'], ['b', '2']] } let(:internal_customization) { ['internal', 'customization'] } let(:rootfs) { ['rootfs', subject.rootfs_path.to_s] } - let(:cli) { fire_double('Vagrant::LXC::Driver::CLI', start: true) } + let(:cli) { instance_double('Vagrant::LXC::Driver::CLI', start: true) } subject { described_class.new('name', cli) } @@ -95,7 +95,7 @@ describe Vagrant::LXC::Driver do end describe 'halt' do - let(:cli) { fire_double('Vagrant::LXC::Driver::CLI', shutdown: true) } + let(:cli) { instance_double('Vagrant::LXC::Driver::CLI', shutdown: true) } subject { described_class.new('name', cli) } @@ -123,7 +123,7 @@ describe Vagrant::LXC::Driver do describe 'state' do let(:cli_state) { :something } - let(:cli) { fire_double('Vagrant::LXC::Driver::CLI', state: cli_state) } + let(:cli) { instance_double('Vagrant::LXC::Driver::CLI', state: cli_state) } subject { described_class.new('name', cli) } @@ -136,7 +136,7 @@ describe Vagrant::LXC::Driver do # This ip is set on the sample-ip-addr-output fixture let(:ip) { "10.0.254.137" } let(:ifconfig_output) { File.read('spec/fixtures/sample-ip-addr-output') } - let(:cli) { fire_double('Vagrant::LXC::Driver::CLI', :attach => ifconfig_output) } + let(:cli) { instance_double('Vagrant::LXC::Driver::CLI', :attach => ifconfig_output) } subject { described_class.new('name', cli) } From 09208a0d28ecb33ea0720f1ebff04d7df795f174 Mon Sep 17 00:00:00 2001 From: Fabio Rehm Date: Sat, 13 Jul 2013 13:41:39 -0300 Subject: [PATCH 19/23] mock/stub -> double --- spec/unit/action/clear_forwarded_ports_spec.rb | 6 +++--- spec/unit/action/compress_rootfs_spec.rb | 4 ++-- spec/unit/action/forward_ports_spec.rb | 6 +++--- spec/unit/action/handle_box_metadata_spec.rb | 8 ++++---- spec/unit/action/setup_package_files_spec.rb | 4 ++-- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/spec/unit/action/clear_forwarded_ports_spec.rb b/spec/unit/action/clear_forwarded_ports_spec.rb index c111032..af1380e 100644 --- a/spec/unit/action/clear_forwarded_ports_spec.rb +++ b/spec/unit/action/clear_forwarded_ports_spec.rb @@ -3,9 +3,9 @@ require 'unit_helper' require 'vagrant-lxc/action/clear_forwarded_ports' describe Vagrant::LXC::Action::ClearForwardedPorts do - let(:app) { mock(:app, call: true) } - let(:env) { {machine: machine, ui: stub(info: true)} } - let(:machine) { mock(:machine, data_dir: data_dir) } + let(:app) { double(:app, call: true) } + let(:env) { {machine: machine, ui: double(info: true)} } + let(:machine) { double(:machine, data_dir: data_dir) } let!(:data_dir) { Pathname.new(Dir.mktmpdir) } let(:pids_dir) { data_dir.join('pids') } let(:pid) { 'a-pid' } diff --git a/spec/unit/action/compress_rootfs_spec.rb b/spec/unit/action/compress_rootfs_spec.rb index b1caa8f..2a70ba4 100644 --- a/spec/unit/action/compress_rootfs_spec.rb +++ b/spec/unit/action/compress_rootfs_spec.rb @@ -3,8 +3,8 @@ require 'unit_helper' require 'vagrant-lxc/action/compress_rootfs' describe Vagrant::LXC::Action::CompressRootFS do - let(:app) { mock(:app, call: true) } - let(:env) { {machine: machine, ui: stub(info: true)} } + let(:app) { double(:app, call: true) } + let(:env) { {machine: machine, ui: double(info: true)} } let(:machine) { instance_double('Vagrant::Machine', provider: provider) } let(:provider) { instance_double('Vagrant::LXC::Provider', driver: driver) } let(:driver) { instance_double('Vagrant::LXC::Driver', compress_rootfs: compressed_rootfs_path) } diff --git a/spec/unit/action/forward_ports_spec.rb b/spec/unit/action/forward_ports_spec.rb index 9dc2253..c9c6c70 100644 --- a/spec/unit/action/forward_ports_spec.rb +++ b/spec/unit/action/forward_ports_spec.rb @@ -3,9 +3,9 @@ require 'unit_helper' require 'vagrant-lxc/action/forward_ports' describe Vagrant::LXC::Action::ForwardPorts do - let(:app) { mock(:app, call: true) } - let(:env) { {machine: machine, ui: stub(info: true)} } - let(:machine) { mock(:machine) } + let(:app) { double(:app, call: true) } + let(:env) { {machine: machine, ui: double(info: true)} } + let(:machine) { double(:machine) } let!(:data_dir) { Pathname.new(Dir.mktmpdir) } let(:networks) { [[:other_config, {}], [:forwarded_port, {guest: guest_port, host: host_port}]] } let(:host_port) { 8080 } diff --git a/spec/unit/action/handle_box_metadata_spec.rb b/spec/unit/action/handle_box_metadata_spec.rb index 578fbf9..973948b 100644 --- a/spec/unit/action/handle_box_metadata_spec.rb +++ b/spec/unit/action/handle_box_metadata_spec.rb @@ -5,10 +5,10 @@ require 'vagrant-lxc/errors' require 'vagrant-lxc/action/handle_box_metadata' describe Vagrant::LXC::Action::HandleBoxMetadata do - let(:app) { mock(:app, call: true) } - let(:env) { {machine: machine, ui: stub(info: true)} } - let(:machine) { mock(:machine, box: box) } - let(:box) { mock(:box, name: 'box-name', metadata: metadata, directory: box_directory) } + let(:app) { double(:app, call: true) } + let(:env) { {machine: machine, ui: double(info: true)} } + let(:machine) { double(:machine, box: box) } + let(:box) { double(:box, name: 'box-name', metadata: metadata, directory: box_directory) } let(:box_directory) { Pathname.new('/path/to/box') } let(:version) { '2' } let(:metadata) { {'template-opts' => {'--foo' => 'bar'}, 'version' => version} } diff --git a/spec/unit/action/setup_package_files_spec.rb b/spec/unit/action/setup_package_files_spec.rb index 3c9a986..6c1c042 100644 --- a/spec/unit/action/setup_package_files_spec.rb +++ b/spec/unit/action/setup_package_files_spec.rb @@ -3,8 +3,8 @@ require 'unit_helper' require 'vagrant-lxc/action/setup_package_files' describe Vagrant::LXC::Action::SetupPackageFiles do - let(:app) { mock(:app, call: true) } - let(:env) { {machine: machine, tmp_path: tmp_path, ui: stub(info: true), 'package.rootfs' => rootfs_path} } + let(:app) { double(:app, call: true) } + let(:env) { {machine: machine, tmp_path: tmp_path, ui: double(info: true), 'package.rootfs' => rootfs_path} } let(:machine) { instance_double('Vagrant::Machine', box: box) } let!(:tmp_path) { Pathname.new(Dir.mktmpdir) } let(:box) { instance_double('Vagrant::Box', directory: tmp_path.join('box')) } From 459864414383d0083e39c2e0b4d0ef61bd4066cb Mon Sep 17 00:00:00 2001 From: Fabio Rehm Date: Sat, 13 Jul 2013 13:42:03 -0300 Subject: [PATCH 20/23] Checking for specific error classes got deprecated on new rspec --- spec/unit/driver_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/unit/driver_spec.rb b/spec/unit/driver_spec.rb index b062bb9..3f4fccf 100644 --- a/spec/unit/driver_spec.rb +++ b/spec/unit/driver_spec.rb @@ -14,19 +14,19 @@ describe Vagrant::LXC::Driver do it 'raises a ContainerNotFound error if an unknown container name gets provided' do expect { unknown_container.validate! - }.to raise_error(Vagrant::LXC::Driver::ContainerNotFound) + }.to raise_error end it 'does not raise a ContainerNotFound error if a valid container name gets provided' do expect { valid_container.validate! - }.to_not raise_error(Vagrant::LXC::Driver::ContainerNotFound) + }.not_to raise_error end it 'does not raise a ContainerNotFound error if nil is provider as name' do expect { new_container.validate! - }.to_not raise_error(Vagrant::LXC::Driver::ContainerNotFound) + }.not_to raise_error end end From e3597e08a7ee340c8d654e7d9bec02ed3b61d35e Mon Sep 17 00:00:00 2001 From: Fabio Rehm Date: Sat, 13 Jul 2013 14:00:44 -0300 Subject: [PATCH 21/23] Rollback rspec to 2.13.1 Lots of tests were failing and I'm not willing to dig into them right now =/ --- Gemfile | 2 +- Gemfile.lock | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Gemfile b/Gemfile index 62ddf29..4601dc1 100644 --- a/Gemfile +++ b/Gemfile @@ -15,7 +15,7 @@ end group :development, :test do gem 'rake' - gem 'rspec' + gem 'rspec', '~> 2.13.0' gem 'rspec-fire', require: 'rspec/fire' gem 'rspec-spies', require: false gem 'coveralls', require: false diff --git a/Gemfile.lock b/Gemfile.lock index 8ac4004..af67137 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -78,16 +78,16 @@ GEM ffi (>= 0.5.0) rest-client (1.6.7) mime-types (>= 1.16) - rspec (2.14.1) - rspec-core (~> 2.14.0) - rspec-expectations (~> 2.14.0) - rspec-mocks (~> 2.14.0) - rspec-core (2.14.2) - rspec-expectations (2.14.0) + rspec (2.13.0) + rspec-core (~> 2.13.0) + rspec-expectations (~> 2.13.0) + rspec-mocks (~> 2.13.0) + rspec-core (2.13.1) + rspec-expectations (2.13.0) diff-lcs (>= 1.1.3, < 2.0) rspec-fire (1.2.0) rspec (~> 2.11) - rspec-mocks (2.14.1) + rspec-mocks (2.13.1) rspec-spies (2.1.4) rspec (~> 2.0) simplecov (0.7.1) @@ -107,7 +107,7 @@ DEPENDENCIES guard-rspec rake rb-inotify - rspec + rspec (~> 2.13.0) rspec-fire rspec-spies vagrant! From 494bc07e5f946619381571cf21e9254ecc218da1 Mon Sep 17 00:00:00 2001 From: Fabio Rehm Date: Sat, 13 Jul 2013 14:02:13 -0300 Subject: [PATCH 22/23] Fix broken spec --- spec/unit/action/clear_forwarded_ports_spec.rb | 1 + spec/unit/driver_spec.rb | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/unit/action/clear_forwarded_ports_spec.rb b/spec/unit/action/clear_forwarded_ports_spec.rb index af1380e..97a5f3a 100644 --- a/spec/unit/action/clear_forwarded_ports_spec.rb +++ b/spec/unit/action/clear_forwarded_ports_spec.rb @@ -1,5 +1,6 @@ require 'unit_helper' +require 'tmpdir' require 'vagrant-lxc/action/clear_forwarded_ports' describe Vagrant::LXC::Action::ClearForwardedPorts do diff --git a/spec/unit/driver_spec.rb b/spec/unit/driver_spec.rb index 3f4fccf..f13dd34 100644 --- a/spec/unit/driver_spec.rb +++ b/spec/unit/driver_spec.rb @@ -74,7 +74,6 @@ describe Vagrant::LXC::Driver do describe 'start' do let(:customizations) { [['a', '1'], ['b', '2']] } let(:internal_customization) { ['internal', 'customization'] } - let(:rootfs) { ['rootfs', subject.rootfs_path.to_s] } let(:cli) { instance_double('Vagrant::LXC::Driver::CLI', start: true) } subject { described_class.new('name', cli) } @@ -86,7 +85,7 @@ describe Vagrant::LXC::Driver do end it 'starts container with configured customizations' do - cli.should have_received(:start).with(customizations + [internal_customization, rootfs], nil) + cli.should have_received(:start).with(customizations + [internal_customization], nil) end it 'expects a transition to running state to take place' do From 003de9476af1a34f77cdf62cce6f6573091bf60c Mon Sep 17 00:00:00 2001 From: Fabio Rehm Date: Sat, 13 Jul 2013 14:03:25 -0300 Subject: [PATCH 23/23] v0.4.0 --- Gemfile.lock | 2 +- lib/vagrant-lxc/version.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index af67137..0c16a12 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -25,7 +25,7 @@ GIT PATH remote: . specs: - vagrant-lxc (0.4.0.dev) + vagrant-lxc (0.4.0) GEM remote: https://rubygems.org/ diff --git a/lib/vagrant-lxc/version.rb b/lib/vagrant-lxc/version.rb index 7c00fe1..019be6a 100644 --- a/lib/vagrant-lxc/version.rb +++ b/lib/vagrant-lxc/version.rb @@ -1,5 +1,5 @@ module Vagrant module LXC - VERSION = "0.4.0.dev" + VERSION = "0.4.0" end end