vagrant-lxc 0.6.2 → 0.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7f832d2e6fd41e1b63a88dd5a1916422f4fffd32
4
- data.tar.gz: 670c915439fd684e8626266c1c686b20972e7165
3
+ metadata.gz: 990ef5aede9667e2cb3b0abab7eb851da17d7b28
4
+ data.tar.gz: 969e6045235f3d9e12e942f8ee10244c4c3a5834
5
5
  SHA512:
6
- metadata.gz: b14dfc2a2736cd770ece958308cb7b57220021f0d20208a746d2a79ba6ea9222d6aade55ce45c8471961c4dd4c24840278a558d09138e2eba711b64ed7186f25
7
- data.tar.gz: be33ff31ddbe43c3700ce7e507ffa164802d718f36075283e24d2d185d075794058e67db3b2a3575de7cd3b6e0889ad75c95b09c806c0cd39b044ad884c89970
6
+ metadata.gz: fca22e79ad331aa2e7ae48bd9ccc13c7497b0a79cb83d4aa292ae74492bf70905734b2b564812644b8cf950d54b230b7025b4f50fe4340ea070c0f6d376d2f09
7
+ data.tar.gz: d2a5421b294892a96bf8a777e35501a3b8a0e1b589bdf076f91982b8783357b79f9223cf1736c700291052c30856b1ab870f71aa3770504f299ff2f820648fc1
@@ -1,3 +1,13 @@
1
+ ## [0.6.3](https://github.com/fgrehm/vagrant-lxc/compare/v0.6.2...v0.6.3) (Oct 12, 2013)
2
+
3
+ IMPROVEMENTS:
4
+
5
+ - Respect Vagrantfile option to disable synced folders [#147](https://github.com/fgrehm/vagrant-lxc/issues/147)
6
+
7
+ BUG FIXES:
8
+
9
+ - Fix error raised when fetching container's IP with the sudo wrapper disabled [#157](https://github.com/fgrehm/vagrant-lxc/issues/157)
10
+
1
11
  ## [0.6.2](https://github.com/fgrehm/vagrant-lxc/compare/v0.6.1...v0.6.2) (Oct 03, 2013)
2
12
 
3
13
  IMPROVEMENTS:
@@ -26,7 +26,7 @@ GIT
26
26
  PATH
27
27
  remote: .
28
28
  specs:
29
- vagrant-lxc (0.6.2)
29
+ vagrant-lxc (0.6.3)
30
30
 
31
31
  GEM
32
32
  remote: https://rubygems.org/
@@ -124,7 +124,7 @@ if [ $PUPPET = 1 ]; then
124
124
  fi
125
125
 
126
126
  if [ $SALT = 1 ]; then
127
- ./common/install-salt $ROOTFS
127
+ ./common/install-salt-debian $ROOTFS
128
128
  fi
129
129
 
130
130
  if [ $BABUSHKA = 1 ]; then
@@ -0,0 +1,28 @@
1
+ #!/bin/bash
2
+
3
+ set -e
4
+
5
+ rootfs=$1
6
+
7
+ echo "installing salt"
8
+
9
+ if [ $SUITE == "squeeze" ]; then
10
+ SALT_SOURCE="deb http://debian.saltstack.com/debian squeeze-saltstack main\ndeb http://backports.debian.org/debian-backports squeeze-backports main contrib non-free"
11
+ elif [ $SUITE == "sid" ]; then
12
+ SALT_SOURCE="deb http://debian.saltstack.com/debian unstable main"
13
+ else
14
+ SALT_SOURCE="deb http://debian.saltstack.com/debian wheezy-saltstack main"
15
+ fi
16
+
17
+ cat > $rootfs/tmp/install-salt << EOF
18
+ #!/bin/sh
19
+ echo "$SALT_SOURCE" > /etc/apt/sources.list.d/saltstack.list
20
+ wget -q -O- "http://debian.saltstack.com/debian-salt-team-joehealy.gpg.key" | apt-key add -
21
+ apt-get update
22
+ apt-get install -y salt-minion
23
+ apt-get clean
24
+ EOF
25
+
26
+ chroot $rootfs sh /tmp/install-salt
27
+
28
+ rm -rf $rootfs/tmp/*
@@ -13,11 +13,13 @@ module Vagrant
13
13
  @app.call env
14
14
  end
15
15
 
16
- # This method returns an actual list of VirtualBox shared
17
- # folders to create and their proper path.
16
+ # This method returns an actual list of synced folders to create and their
17
+ # proper path.
18
18
  def shared_folders
19
19
  {}.tap do |result|
20
20
  @env[:machine].config.vm.synced_folders.each do |id, data|
21
+ # Ignore disabled shared folders
22
+ next if data[:disabled]
21
23
  # This to prevent overwriting the actual shared folders data
22
24
  result[id] = data.dup
23
25
  end
@@ -84,7 +84,7 @@ module Vagrant
84
84
 
85
85
  if namespaces
86
86
  if supports_attach_with_namespaces?
87
- extra = ['--namespaces', namespaces] if namespaces
87
+ extra = ['--namespaces', namespaces]
88
88
  else
89
89
  raise LXC::Errors::NamespacesNotSupported
90
90
  end
@@ -119,7 +119,7 @@ module Vagrant
119
119
 
120
120
  def supports_attach_with_namespaces?
121
121
  unless defined?(@supports_attach_with_namespaces)
122
- @supports_attach_with_namespaces = run(:attach, '-h', '2>&1').include?('--namespaces')
122
+ @supports_attach_with_namespaces = run(:attach, '-h', :show_stderr => true).values.join.include?('--namespaces')
123
123
  end
124
124
 
125
125
  return @supports_attach_with_namespaces
@@ -58,7 +58,12 @@ module Vagrant
58
58
 
59
59
  # Return the output, making sure to replace any Windows-style
60
60
  # newlines with Unix-style.
61
- r.stdout.gsub("\r\n", "\n")
61
+ stdout = r.stdout.gsub("\r\n", "\n")
62
+ if opts[:show_stderr]
63
+ { :stdout => stdout, :stderr => r.stderr.gsub("\r\n", "\n") }
64
+ else
65
+ stdout
66
+ end
62
67
  end
63
68
 
64
69
  def raw(*command, &block)
@@ -1,5 +1,5 @@
1
1
  module Vagrant
2
2
  module LXC
3
- VERSION = "0.6.2"
3
+ VERSION = "0.6.3"
4
4
  end
5
5
  end
@@ -146,13 +146,13 @@ describe Vagrant::LXC::Driver::CLI do
146
146
  end
147
147
 
148
148
  it 'supports a "namespaces" parameter' do
149
- subject.stub(:run).with(:attach, '-h', '2>&1').and_return('--namespaces')
149
+ subject.stub(:run).with(:attach, '-h', :show_stderr => true).and_return({:stdout => '', :stderr => '--namespaces'})
150
150
  subject.attach *(command + [{namespaces: ['network', 'mount']}])
151
151
  subject.should have_received(:run).with(:attach, '--name', name, '--namespaces', 'NETWORK|MOUNT', '--', *command)
152
152
  end
153
153
 
154
154
  it 'raises a NamespacesNotSupported error if not supported' do
155
- subject.stub(:run).with(:attach, '-h', '2>&1').and_return('not supported')
155
+ subject.stub(:run).with(:attach, '-h', :show_stderr => true).and_return({:stdout => '', :stderr => 'not supported'})
156
156
  expect {
157
157
  subject.attach *(command + [{namespaces: ['network', 'mount']}])
158
158
  }.to raise_error(Vagrant::LXC::Errors::NamespacesNotSupported)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-lxc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fabio Rehm
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-03 00:00:00.000000000 Z
11
+ date: 2013-10-12 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Linux Containers provider for Vagrant
14
14
  email:
@@ -37,6 +37,7 @@ files:
37
37
  - boxes/common/install-chef
38
38
  - boxes/common/install-puppet
39
39
  - boxes/common/install-salt
40
+ - boxes/common/install-salt-debian
40
41
  - boxes/common/lxc-template
41
42
  - boxes/common/lxc.conf
42
43
  - boxes/common/metadata.json
@@ -142,4 +143,3 @@ test_files:
142
143
  - spec/unit/driver_spec.rb
143
144
  - spec/unit/support/unit_example_group.rb
144
145
  - spec/unit_helper.rb
145
- has_rdoc: