vagrant-zentoo 0.1.3 → 0.2.0
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.
- data/.gitignore +2 -14
- data/Gemfile +8 -1
- data/Rakefile +1 -8
- data/lib/vagrant-zentoo.rb +13 -23
- data/vagrant-zentoo.gemspec +3 -5
- metadata +6 -22
- data/.rvmrc +0 -1
- data/Gemfile.lock +0 -35
- data/README.rst +0 -4
- data/lib/vagrant/guest/zentoo.rb +0 -38
- data/lib/vagrant_init.rb +0 -2
data/.gitignore
CHANGED
data/Gemfile
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
-
source
|
1
|
+
source "https://rubygems.org"
|
2
2
|
|
3
3
|
gemspec
|
4
|
+
|
5
|
+
group :development do
|
6
|
+
# We depend on Vagrant for development, but we don't add it as a
|
7
|
+
# gem dependency because we expect to be installed within the
|
8
|
+
# Vagrant environment itself using `vagrant plugin`.
|
9
|
+
gem "vagrant", :git => "git://github.com/mitchellh/vagrant.git"
|
10
|
+
end
|
data/Rakefile
CHANGED
data/lib/vagrant-zentoo.rb
CHANGED
@@ -1,30 +1,20 @@
|
|
1
|
-
require
|
2
|
-
require 'vagrant/guest/zentoo'
|
1
|
+
require "vagrant"
|
3
2
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
if @vm.channel.test("cat /etc/os-release")
|
13
|
-
@vm.channel.execute("cat /etc/os-release | grep ^ID") do |type, data|
|
14
|
-
next if data.chomp.empty?
|
15
|
-
result = data.chomp.gsub(/^ID="?([^"]*)"?/, '\1').to_sym if type == :stdout
|
16
|
-
end
|
17
|
-
end
|
3
|
+
module VagrantPlugins
|
4
|
+
module GuestZentoo
|
5
|
+
class Guest < Vagrant.plugin("2", :guest)
|
6
|
+
def detect?(machine)
|
7
|
+
machine.communicate.test("cat /etc/os-release")
|
8
|
+
end
|
9
|
+
end
|
18
10
|
|
19
|
-
|
20
|
-
|
21
|
-
|
11
|
+
class Plugin < Vagrant.plugin("2")
|
12
|
+
name "Zentoo Linux based guest"
|
13
|
+
description "Zentoo Linux based guest support."
|
22
14
|
|
23
|
-
|
15
|
+
guest("zentoo", "systemd") do
|
16
|
+
Guest
|
24
17
|
end
|
25
|
-
|
26
|
-
alias_method :distro_dispatch_without_zentoo, :distro_dispatch
|
27
|
-
alias_method :distro_dispatch, :distro_dispatch_with_zentoo
|
28
18
|
end
|
29
19
|
end
|
30
20
|
end
|
data/vagrant-zentoo.gemspec
CHANGED
@@ -2,17 +2,15 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = "vagrant-zentoo"
|
5
|
-
s.version = "0.
|
5
|
+
s.version = "0.2.0"
|
6
6
|
s.authors = ["Benedikt Böhm"]
|
7
7
|
s.email = ["bb@xnull.de"]
|
8
8
|
s.homepage = "http://github.com/zentoo/vagrant-zentoo"
|
9
|
-
s.summary = %q{Vagrant plugin to detect and support Zentoo Linux}
|
10
|
-
s.description = %q{Vagrant plugin to detect and support Zentoo Linux}
|
9
|
+
s.summary = %q{Vagrant plugin to detect and support Zentoo Linux based systems}
|
10
|
+
s.description = %q{Vagrant plugin to detect and support Zentoo Linux based systems}
|
11
11
|
|
12
12
|
s.files = `git ls-files`.split("\n")
|
13
13
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
14
14
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
15
15
|
s.require_paths = ["lib"]
|
16
|
-
|
17
|
-
s.add_dependency "vagrant", ">= 1.0.3"
|
18
16
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-zentoo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,20 +9,9 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
13
|
-
dependencies:
|
14
|
-
|
15
|
-
name: vagrant
|
16
|
-
requirement: &19240700 !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
|
-
requirements:
|
19
|
-
- - ! '>='
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
version: 1.0.3
|
22
|
-
type: :runtime
|
23
|
-
prerelease: false
|
24
|
-
version_requirements: *19240700
|
25
|
-
description: Vagrant plugin to detect and support Zentoo Linux
|
12
|
+
date: 2013-06-22 00:00:00.000000000 Z
|
13
|
+
dependencies: []
|
14
|
+
description: Vagrant plugin to detect and support Zentoo Linux based systems
|
26
15
|
email:
|
27
16
|
- bb@xnull.de
|
28
17
|
executables: []
|
@@ -30,15 +19,10 @@ extensions: []
|
|
30
19
|
extra_rdoc_files: []
|
31
20
|
files:
|
32
21
|
- .gitignore
|
33
|
-
- .rvmrc
|
34
22
|
- Gemfile
|
35
|
-
- Gemfile.lock
|
36
23
|
- LICENSE.txt
|
37
|
-
- README.rst
|
38
24
|
- Rakefile
|
39
25
|
- lib/vagrant-zentoo.rb
|
40
|
-
- lib/vagrant/guest/zentoo.rb
|
41
|
-
- lib/vagrant_init.rb
|
42
26
|
- vagrant-zentoo.gemspec
|
43
27
|
homepage: http://github.com/zentoo/vagrant-zentoo
|
44
28
|
licenses: []
|
@@ -60,8 +44,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
60
44
|
version: '0'
|
61
45
|
requirements: []
|
62
46
|
rubyforge_project:
|
63
|
-
rubygems_version: 1.8.
|
47
|
+
rubygems_version: 1.8.25
|
64
48
|
signing_key:
|
65
49
|
specification_version: 3
|
66
|
-
summary: Vagrant plugin to detect and support Zentoo Linux
|
50
|
+
summary: Vagrant plugin to detect and support Zentoo Linux based systems
|
67
51
|
test_files: []
|
data/.rvmrc
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
rvm use --create ruby-1.9.3-p125@vagrant-zentoo
|
data/Gemfile.lock
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
vagrant-zentoo (0.1.0)
|
5
|
-
vagrant (~> 1.0.3)
|
6
|
-
|
7
|
-
GEM
|
8
|
-
remote: http://rubygems.org/
|
9
|
-
specs:
|
10
|
-
archive-tar-minitar (0.5.2)
|
11
|
-
childprocess (0.3.2)
|
12
|
-
ffi (~> 1.0.6)
|
13
|
-
erubis (2.7.0)
|
14
|
-
ffi (1.0.11)
|
15
|
-
i18n (0.6.0)
|
16
|
-
json (1.5.4)
|
17
|
-
log4r (1.1.10)
|
18
|
-
net-scp (1.0.4)
|
19
|
-
net-ssh (>= 1.99.1)
|
20
|
-
net-ssh (2.2.2)
|
21
|
-
vagrant (1.0.3)
|
22
|
-
archive-tar-minitar (= 0.5.2)
|
23
|
-
childprocess (~> 0.3.1)
|
24
|
-
erubis (~> 2.7.0)
|
25
|
-
i18n (~> 0.6.0)
|
26
|
-
json (~> 1.5.1)
|
27
|
-
log4r (~> 1.1.9)
|
28
|
-
net-scp (~> 1.0.4)
|
29
|
-
net-ssh (~> 2.2.2)
|
30
|
-
|
31
|
-
PLATFORMS
|
32
|
-
ruby
|
33
|
-
|
34
|
-
DEPENDENCIES
|
35
|
-
vagrant-zentoo!
|
data/README.rst
DELETED
data/lib/vagrant/guest/zentoo.rb
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
require 'yaml'
|
2
|
-
require 'vagrant/guest/gentoo'
|
3
|
-
|
4
|
-
module Vagrant
|
5
|
-
module Guest
|
6
|
-
class Zentoo < Gentoo
|
7
|
-
TEMPLATES = YAML::load <<EOF
|
8
|
-
---
|
9
|
-
:network_dhcp: |
|
10
|
-
# The contents below are automatically generated by Vagrant. Do not modify.
|
11
|
-
dhcpcd eth<%= options[:interface] %>
|
12
|
-
exit 0
|
13
|
-
:network_static: |
|
14
|
-
# The contents below are automatically generated by Vagrant. Donot modify.
|
15
|
-
ip link set eth<%= options[:interface] %> up
|
16
|
-
ip addr add <%= options[:ip] %>/<%= options[:netmask] %> dev eth<%= options[:interface] %>
|
17
|
-
exit 0
|
18
|
-
EOF
|
19
|
-
|
20
|
-
def configure_networks(networks)
|
21
|
-
# Configure each network interface
|
22
|
-
networks.each do |network|
|
23
|
-
entry = TemplateRenderer.render_string(TEMPLATES["network_#{network[:type]}".to_sym], :options => network)
|
24
|
-
|
25
|
-
# Upload the entry to a temporary location
|
26
|
-
temp = Tempfile.new("vagrant")
|
27
|
-
temp.binmode
|
28
|
-
temp.write(entry)
|
29
|
-
temp.close
|
30
|
-
|
31
|
-
vm.channel.upload(temp.path, "/tmp/vagrant-network-entry")
|
32
|
-
vm.channel.sudo("cat /tmp/vagrant-network-entry > /etc/ifup.eth#{network[:interface]}")
|
33
|
-
vm.channel.sudo("/bin/bash /etc/ifup.eth#{network[:interface]}")
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
data/lib/vagrant_init.rb
DELETED