vagrant-guests-clearlinux 1.0.14 → 1.0.16

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
  SHA256:
3
- metadata.gz: 7da2e19f3a6d02f4e42e5d90221000c9ba6bddac07ad0bc35304f6de205a48ba
4
- data.tar.gz: 82274e24f25ac380531a9b42898c5a97092190acebc0ec47f0e6927e62c456dd
3
+ metadata.gz: 609fd9b88b16df3d55a99e9f56da98347b77bb1df3dde71fa8f3c288bb3a98a4
4
+ data.tar.gz: f2c777e1a75a20009fb1613366e31593e60a45475228e41f14dd68a02e82f81a
5
5
  SHA512:
6
- metadata.gz: 376fb9fdbf38a3e8df7fdc49a9e02fa2bc9fcb7160a7626e8c24cf7f3a53152522c1c113b1eb752540fca5de6e2dc0b9292b068ff744fdf7dd641b640857bca2
7
- data.tar.gz: 844f5ff7ac26cd7e9a585c9e08642bb150f2b9afff9c538e72c96c3e062697d857bc09df06253603f61e792d260afbffc033dea1e28395dda1f6b149a8540e38
6
+ metadata.gz: 0e4fcf59185f259a778552b53f98950e8f1c0cab64b14cc56b91e8496db4e89775fcffd782f0e75c0747516516107ceb673a17aacda1812b40541a32a67656a5
7
+ data.tar.gz: 70cacaae979289b26cbe36caee9dfa2fd4a901a887ed7a26042a587edbe452024908737dff8b267d6108c45a1018ec7e3dbddc2272bd4692e2a1cb5a351ed9ec
data/Dockerfile ADDED
@@ -0,0 +1,8 @@
1
+ FROM ruby:2.5
2
+
3
+ # throw errors if Gemfile has been modified since Gemfile.lock
4
+ RUN bundle config --global frozen 1
5
+
6
+ WORKDIR /usr/src/app
7
+
8
+
data/Gemfile CHANGED
@@ -6,6 +6,6 @@ source 'https://rubygems.org'
6
6
  gemspec
7
7
 
8
8
  group :development do
9
- gem 'vagrant', :git => 'https://github.com/hashicorp/vagrant.git', :tag => 'v2.2.1'
9
+ gem 'vagrant', :git => 'https://github.com/hashicorp/vagrant.git', :tag => 'v2.2.3'
10
10
  gem 'coveralls', require: true
11
11
  end
data/Makefile ADDED
@@ -0,0 +1,32 @@
1
+ .DEFAULT_GOAL := help
2
+
3
+ .PHONY: check-version help push local-install
4
+
5
+ PLUGIN := vagrant-guests-clearlinux
6
+
7
+ help:
8
+ @echo "available 'make' targets:"
9
+ @echo
10
+ @grep -E "^.*:.*?## .*$$" $(MAKEFILE_LIST) | \
11
+ grep -vE "(grep|BEGIN)" | awk \
12
+ 'BEGIN {FS = ":.*?## "}; {printf "\t\033[36m%-30s\033[0m %s\n", $$1, $$2}' | \
13
+ VERSION=$(VERSION) envsubst
14
+ @echo
15
+
16
+ check-version:
17
+ ifndef VERSION
18
+ $(error VERSION is undefined)
19
+ endif
20
+
21
+ build: ## builds gem inside a docker container
22
+ docker run -it --rm --name gem-builder -v "$${PWD}":/usr/src/myapp \
23
+ -w /usr/src/myapp ruby:2.5 bash -c "bundle install; bundle exec rake build"
24
+
25
+ push: pkg/$(PLUGIN)-${VERSION}.gem ## pushes gem to rubygems.org
26
+ gem push pkg/$(PLUGIN)-${VERSION}.gem
27
+
28
+ pkg/$(PLUGIN)-${VERSION}.gem: check-version build
29
+
30
+ local-install: pkg/$(PLUGIN)-${VERSION}.gem ## installs plugin locally for testing
31
+ vagrant plugin uninstall $(PLUGIN)
32
+ vagrant plugin install pkg/$(PLUGIN)-${VERSION}.gem
data/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # vagrant-guests-clearlinux
2
2
 
3
- This is a [Vagrant](http://www.vagrantup.com/) [plugin](http://docs.vagrantup.com/v2/plugins/index.html)
3
+ This is a [Vagrant](http://www.vagrantup.com/)
4
+ [plugin](http://docs.vagrantup.com/v2/plugins/index.html)
4
5
  that adds [Clear Linux](https://clearlinux.org) guest support.
5
6
  Once it gets feature complete and rock solid work will start
6
7
  in order to get its functionality merged in upstream Vagrant.
@@ -11,28 +12,40 @@ in order to get its functionality merged in upstream Vagrant.
11
12
  $ vagrant plugin install vagrant-guests-clearlinux
12
13
  ```
13
14
 
15
+ ## Updading
16
+
17
+ ```
18
+ $ vagrant plugin update vagrant-guests-clearlinux
19
+ ```
20
+
14
21
  ## Development
15
- To build and install the plugin directly from this repo:
22
+
23
+ To build, install or modify the plugin directly from this repository:
24
+
25
+ > NOTE: commands bellow assume you have a working docker environment.
16
26
 
17
27
  ```
18
- $ bundle install
19
- $ bundle exec rake build
20
- $ vagrant plugin install pkg/vagrant-guests-clearlinux-1.0.14.gem
28
+ $ make build
29
+ $ make local-install VERSION=...
21
30
  ```
22
31
 
32
+ where `VERSION` is whatever is being set in `lib/vagrant-guests-clearlinux/version.rb`
33
+
23
34
  You can run RSpec with:
24
35
 
25
36
  ```
26
37
  $ bundle install
27
38
  $ bundle exec rake
28
39
  ```
40
+
29
41
  ## Compatible Vagrant boxes
30
42
 
31
43
  You can find matching Vagrant boxes on [here](https://app.vagrantup.com/AntonioMeireles/boxes/ClearLinux).
32
44
 
33
45
  ## Acknowledgments
34
46
 
35
- This is a refactoring based on early works of [Fabio Rapposelli](https://github.com/frapposelli) on
47
+ This started based on early work of [Fabio Rapposelli](https://github.com/frapposelli) on
36
48
  [vagrant-guests-photon](https://github.com/vmware/vagrant-guests-photon) and
37
- [Alex Sorkin](https://github.com/alexsorkin) on [vagrant-guests-innovitable](https://github.com/alexsorkin/vagrant-guests-innovitable).
49
+ [Alex Sorkin](https://github.com/alexsorkin) on
50
+ [vagrant-guests-innovitable](https://github.com/alexsorkin/vagrant-guests-innovitable)
38
51
 
@@ -12,29 +12,18 @@ IPAddr.class_eval do
12
12
  end
13
13
  end
14
14
 
15
- STATIC_NETWORK = <<EOF.freeze
15
+ VAGRANT_NETWORK = <<EOF.freeze
16
16
  #VAGRANT-BEGIN
17
17
  # The contents below were automatically generated by Vagrant. Do not modify.
18
18
  [Match]
19
19
  Name=%s
20
20
 
21
21
  [Network]
22
- Address=%s
22
+ DHCP=%s
23
23
  %s
24
24
  #VAGRANT-END
25
25
  EOF
26
26
 
27
- DHCP_NETWORK = <<EOF.freeze
28
- #VAGRANT-BEGIN
29
- # The contents below were automatically generated by Vagrant. Do not modify.
30
- [Match]
31
- Name=%s
32
-
33
- [Network]
34
- DHCP=ipv4
35
- #VAGRANT-END
36
- EOF
37
-
38
27
  module VagrantPlugins
39
28
  module GuestClearLinux
40
29
  module Cap
@@ -57,15 +46,16 @@ module VagrantPlugins
57
46
  unit_name = format('50-vagrant-%s.network', device)
58
47
 
59
48
  if network[:type] == :static
49
+ leased = "no"
60
50
  cidr = IPAddr.new(network[:netmask]).to_cidr
61
- address = "#{network[:ip]}/#{cidr}"
62
- gateway = ""
63
- gateway = "Gateway=#{network[:gateway]}" if network[:gateway]
64
- unit_file = format(STATIC_NETWORK, device, address, gateway)
51
+ body = "Address=#{network[:ip]}/#{cidr}"
52
+ body += "\nGateway=#{network[:gateway]}" if network[:gateway]
65
53
  elsif network[:type] == :dhcp
66
- unit_file = format(DHCP_NETWORK, device)
54
+ leased = "yes"
55
+ body = ""
67
56
  end
68
57
 
58
+ unit_file = format(VAGRANT_NETWORK, device, leased, body)
69
59
  temp = Tempfile.new('vagrant')
70
60
  temp.binmode
71
61
  temp.write(unit_file)
@@ -0,0 +1,16 @@
1
+ module VagrantPlugins
2
+ module GuestClearLinux
3
+ module Cap
4
+ class RSync
5
+ def self.rsync_installed(machine)
6
+ machine.communicate.test("test -f /usr/bin/rsync")
7
+ end
8
+
9
+ def self.rsync_install(machine)
10
+ # until it is available as a pundle...
11
+ machine.communicate.sudo("swupd bundle-add network-basic")
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
@@ -33,6 +33,16 @@ module VagrantPlugins
33
33
  require_relative 'cap/nfs_client'
34
34
  Cap::NFS
35
35
  end
36
+
37
+ guest_capability(:clearlinux, :rsync_install) do
38
+ require_relative "cap/rsync"
39
+ Cap::RSync
40
+ end
41
+
42
+ guest_capability(:clearlinux, :rsync_installed) do
43
+ require_relative "cap/rsync"
44
+ Cap::RSync
45
+ end
36
46
  end
37
47
  end
38
48
  end
@@ -4,6 +4,6 @@
4
4
  module VagrantPlugins
5
5
  # Set version for vagrant-guests-clearlinux gem.
6
6
  module GuestClearLinux
7
- VERSION = '1.0.14'
7
+ VERSION = '1.0.16'
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-guests-clearlinux
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.14
4
+ version: 1.0.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - António Meireles
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-11-22 00:00:00.000000000 Z
11
+ date: 2019-01-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -105,14 +105,17 @@ files:
105
105
  - ".rubocop.yml"
106
106
  - ".ruby-version"
107
107
  - ".travis.yml"
108
+ - Dockerfile
108
109
  - Gemfile
109
110
  - LICENSE
111
+ - Makefile
110
112
  - README.md
111
113
  - Rakefile
112
114
  - lib/vagrant-guests-clearlinux.rb
113
115
  - lib/vagrant-guests-clearlinux/cap/change_host_name.rb
114
116
  - lib/vagrant-guests-clearlinux/cap/configure_networks.rb
115
117
  - lib/vagrant-guests-clearlinux/cap/nfs_client.rb
118
+ - lib/vagrant-guests-clearlinux/cap/rsync.rb
116
119
  - lib/vagrant-guests-clearlinux/guest.rb
117
120
  - lib/vagrant-guests-clearlinux/plugin.rb
118
121
  - lib/vagrant-guests-clearlinux/version.rb
@@ -141,8 +144,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
141
144
  - !ruby/object:Gem::Version
142
145
  version: '0'
143
146
  requirements: []
144
- rubyforge_project:
145
- rubygems_version: 2.7.7
147
+ rubygems_version: 3.0.1
146
148
  signing_key:
147
149
  specification_version: 4
148
150
  summary: Clear Linux Guest Plugin for Vagrant