vagrant-lxc 1.0.0.alpha.3 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bd50ec26aecfabf94b58e9f16ff0a996fc6d7598
4
- data.tar.gz: ae1c22bb9caf6b7b233d0acc100437619f3b5728
3
+ metadata.gz: ec70712d1aa228167002b92b029e5d2e11f5b61e
4
+ data.tar.gz: 3f38fbed1265b8075f47951fb4d9ea4ef5c0878f
5
5
  SHA512:
6
- metadata.gz: 1235a0aa274186d0181eadda1f1491ecde4484f96dfc1f50a6b313621da5cd35ce06f75d43dc4a74281c27e55aabc65949187c7abe3f484a9e574f191b8fe536
7
- data.tar.gz: 91a879e4104ea0c7e2104c36e91147037ba76f0a3c37e79e7cc9f2e4e3a5ec279b39d6b99f84f12399bae2c24ec38ed8a2dab47957f4dc356b0bb8d36e075f85
6
+ metadata.gz: aa5ed8deeeb23cf12fbd93fbd719e6be1b62faf8b775c4bd1fff4046784a962f684643d22ce80f65f20bbb2ca84852f5d3d025dc21c91367a367a2dfe817dec7
7
+ data.tar.gz: e1263666e742eb120e13516e593765dddcfc5f2efb302682be69398f2ace2b0d6da69465707a5e7291700e2f5f56c34d0253c58ee3508294621290a6222cd239
data/CHANGELOG.md CHANGED
@@ -1,3 +1,36 @@
1
+ ## [1.0.0](https://github.com/fgrehm/vagrant-lxc/compare/v1.0.0.alpha.3...v1.0.0) (Sep 23, 2014)
2
+
3
+ DEPRECATIONS:
4
+
5
+ - Support to **all Vagrant versions prior to 1.5 are deprecated**, there is a
6
+ [small layer](lib/vagrant-backports) that ensures compatibility with versions
7
+ starting with 1.1.5 that will be removed on a future release.
8
+ - Official base boxes that were made available from http://bit.ly are no longer
9
+ supported and were removed from @fgrehm's Dropbox, please upgrade your Vagrant
10
+ and vagrant-lxc installation and use a base box from [VagrantCloud](https://vagrantcloud.com/search?provider=lxc)
11
+
12
+ BACKWARDS INCOMPATIBILITIES:
13
+
14
+ - Remove plugin version from config file name generated by the `vagrant lxc sudoers`
15
+ command. Manual removal of `/usr/local/bin/vagrant-lxc-wrapper-*` / `/etc/sudoers.d/vagrant-lxc-*`
16
+ files are required.
17
+
18
+ IMPROVEMENTS:
19
+
20
+ - `vagrant-mounted` upstart event is now emited on containers that support it [[GH-302]]
21
+ - Add support for specifying the `--strip-parameters` used by the [default template](scripts/lxc-template)
22
+ when extracting rootfs tarballs [[GH-311]]
23
+
24
+ [GH-302]: https://github.com/fgrehm/vagrant-lxc/issues/302
25
+
26
+ BUG FIXES:
27
+
28
+ - Check for outdated base boxes when starting containers [[GH-314]]
29
+
30
+ [GH-311]: https://github.com/fgrehm/vagrant-lxc/pull/311
31
+ [GH-314]: https://github.com/fgrehm/vagrant-lxc/pull/314
32
+
33
+
1
34
  ## [1.0.0.alpha.3](https://github.com/fgrehm/vagrant-lxc/compare/v1.0.0.alpha.2...v1.0.0.alpha.3) (Aug 9, 2014)
2
35
 
3
36
  IMPROVEMENTS:
data/Gemfile.lock CHANGED
@@ -40,7 +40,7 @@ GIT
40
40
  PATH
41
41
  remote: .
42
42
  specs:
43
- vagrant-lxc (1.0.0.alpha.3)
43
+ vagrant-lxc (1.0.0)
44
44
 
45
45
  GEM
46
46
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -46,14 +46,6 @@ disable checksum offloading as described on [this comment](https://github.com/fg
46
46
 
47
47
  ## Installation
48
48
 
49
- On Vagrant 1.5+:
50
-
51
- ```
52
- vagrant plugin install vagrant-lxc --plugin-version 1.0.0.alpha.3
53
- ```
54
-
55
- On Vagrant < 1.5:
56
-
57
49
  ```
58
50
  vagrant plugin install vagrant-lxc
59
51
  ```
@@ -61,23 +53,13 @@ vagrant plugin install vagrant-lxc
61
53
 
62
54
  ## Quick start
63
55
 
64
- On Vagrant 1.5+:
65
-
66
56
  ```
67
57
  vagrant init fgrehm/precise64-lxc
68
58
  vagrant up --provider=lxc
69
59
  ```
70
60
 
71
- On Vagrant < 1.5:
72
-
73
- ```
74
- vagrant init precise64 http://bit.ly/vagrant-lxc-precise64-2013-10-23
75
- vagrant up --provider=lxc
76
- ```
77
-
78
- If you are using Vagrant 1.2+ you can also set the `VAGRANT_DEFAULT_PROVIDER`
79
- environmental variable to `lxc` in order to avoid typing `--provider=lxc` all
80
- the time.
61
+ _Set the `VAGRANT_DEFAULT_PROVIDER` environmental variable to `lxc` in order to
62
+ avoid typing `--provider=lxc` all the time._
81
63
 
82
64
 
83
65
  ## Base boxes
data/lib/vagrant-lxc.rb CHANGED
@@ -8,7 +8,7 @@ module Vagrant
8
8
  end
9
9
 
10
10
  def self.sudo_wrapper_path
11
- "/usr/local/bin/vagrant-lxc-wrapper-#{VERSION}"
11
+ "/usr/local/bin/vagrant-lxc-wrapper"
12
12
  end
13
13
  end
14
14
  end
@@ -101,6 +101,7 @@ module Vagrant
101
101
  def self.action_start
102
102
  Builder.new.tap do |b|
103
103
  b.use Builtin::ConfigValidate
104
+ b.use Builtin::BoxCheckOutdated
104
105
  b.use Builtin::Call, Builtin::IsState, :running do |env, b2|
105
106
  # If the VM is running, then our work here is done, exit
106
107
  next if env[:result]
@@ -36,7 +36,7 @@ module Vagrant
36
36
  end
37
37
 
38
38
  def sudoers_path
39
- "/etc/sudoers.d/vagrant-lxc-#{Vagrant::LXC::VERSION.gsub( /\./, '-')}"
39
+ "/etc/sudoers.d/vagrant-lxc"
40
40
  end
41
41
 
42
42
  private
@@ -46,6 +46,27 @@ module Vagrant
46
46
  guest_path: data[:guestpath]))
47
47
  end
48
48
  end
49
+
50
+ def enable(machine, folders, _opts)
51
+ # Emit an upstart event if we can
52
+ return unless machine.communicate.test("test -x /sbin/initctl")
53
+
54
+ # short guestpaths first, so we don't step on ourselves
55
+ folders = folders.sort_by do |id, data|
56
+ if data[:guestpath]
57
+ data[:guestpath].length
58
+ else
59
+ # A long enough path to just do this at the end.
60
+ 10000
61
+ end
62
+ end
63
+
64
+ folders.each do |id, data|
65
+ guest_path = data[:guestpath]
66
+ machine.communicate.sudo(
67
+ "/sbin/initctl emit --no-wait vagrant-mounted MOUNTPOINT=#{guest_path}")
68
+ end
69
+ end
49
70
  end
50
71
  end
51
72
  end
@@ -1,5 +1,5 @@
1
1
  module Vagrant
2
2
  module LXC
3
- VERSION = "1.0.0.alpha.3"
3
+ VERSION = "1.0.0"
4
4
  end
5
5
  end
data/scripts/lxc-template CHANGED
@@ -33,6 +33,7 @@ LXC_PATH=
33
33
  LXC_ROOTFS=
34
34
  LXC_TARBALL=
35
35
  LXC_CONFIG=
36
+ LXC_STRIP_COMPONENTS=2
36
37
 
37
38
  usage() {
38
39
  cat <<EOF
@@ -51,11 +52,12 @@ LXC internal arguments (do not pass manually!):
51
52
  [ --rootfs <rootfs> ]: The path to the container's rootfs
52
53
  [ --mapped-uid <map> ]: A uid map (user namespaces)
53
54
  [ --mapped-gid <map> ]: A gid map (user namespaces)
55
+ [ --strip-components <num> ]: Number of path components to strip from tarball
54
56
  EOF
55
57
  return 0
56
58
  }
57
59
 
58
- options=$(getopt -o h -l tarball:,config:,help:,name:,path:,rootfs:,mapped-uid:,mapped-gid: -- "$@")SS
60
+ options=$(getopt -o h -l tarball:,config:,help:,name:,path:,rootfs:,mapped-uid:,mapped-gid:,strip-components: -- "$@")SS
59
61
 
60
62
  if [ $? -ne 0 ]; then
61
63
  usage $(basename $0)
@@ -74,6 +76,7 @@ do
74
76
  --rootfs) LXC_ROOTFS=$2; shift 2;;
75
77
  --mapped-uid) LXC_MAPPED_UID=$2; shift 2;;
76
78
  --mapped-gid) LXC_MAPPED_GID=$2; shift 2;;
79
+ --strip-components) LXC_STRIP_COMPONENTS=$2; shift 2;;
77
80
  *) break;;
78
81
  esac
79
82
  done
@@ -121,7 +124,7 @@ mkdir -p /var/lock/subsys
121
124
  fi
122
125
 
123
126
  mkdir -p ${LXC_ROOTFS}
124
- (cd ${LXC_ROOTFS} && tar xfz ${LXC_TARBALL} --strip-components=2)
127
+ (cd ${LXC_ROOTFS} && tar xfz ${LXC_TARBALL} --strip-components=${LXC_STRIP_COMPONENTS})
125
128
  if [ $? -ne 0 ]; then
126
129
  echo "Failed to extract rootfs"
127
130
  exit 1
data/vagrant-lxc.gemspec CHANGED
@@ -17,11 +17,4 @@ Gem::Specification.new do |gem|
17
17
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
18
18
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
19
19
  gem.require_paths = ["lib"]
20
-
21
- gem.post_install_message = %Q{
22
- Thanks for giving vagrant-lxc #{Vagrant::LXC::VERSION} a try!
23
- This version introduces many changes and includes some deprecations,
24
- please see the project's CHANGELOG:
25
- https://github.com/fgrehm/vagrant-lxc/blob/master/CHANGELOG.md
26
- }
27
20
  end
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: 1.0.0.alpha.3
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fabio Rehm
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-09 00:00:00.000000000 Z
11
+ date: 2014-09-23 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Linux Containers provider for Vagrant
14
14
  email:
@@ -92,10 +92,7 @@ homepage: https://github.com/fgrehm/vagrant-lxc
92
92
  licenses:
93
93
  - MIT
94
94
  metadata: {}
95
- post_install_message: "\n Thanks for giving vagrant-lxc 1.0.0.alpha.3 a try!\n This
96
- version introduces many changes and includes some deprecations,\n please see the
97
- project's CHANGELOG:\n https://github.com/fgrehm/vagrant-lxc/blob/master/CHANGELOG.md\n
98
- \ "
95
+ post_install_message:
99
96
  rdoc_options: []
100
97
  require_paths:
101
98
  - lib
@@ -106,9 +103,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
106
103
  version: '0'
107
104
  required_rubygems_version: !ruby/object:Gem::Requirement
108
105
  requirements:
109
- - - ">"
106
+ - - ">="
110
107
  - !ruby/object:Gem::Version
111
- version: 1.3.1
108
+ version: '0'
112
109
  requirements: []
113
110
  rubyforge_project:
114
111
  rubygems_version: 2.2.2