vagrant-guixsd-guest 0.1.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.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 6ad591f7f7c7dc86166d600f770c26ec71ec4e74
4
+ data.tar.gz: dd218e262b87b73fe514a7218dc10a7558f985e9
5
+ SHA512:
6
+ metadata.gz: 23f771de97b767d0424e98a578a3fb5399ec6b330fccc9054d233f9202e5d7b6990786786b1be0dd341ecfcaa0766e75204246ffcac66174cb05904fe917ad67
7
+ data.tar.gz: 8b9b19d15902fd95b913ef357a57ffe6b06cb44d15d376186a08c0c2977c61630e3de7bc6088b9f211e55ca92c29dd1fa3693241d365d89cdaf38d1f47fa48a7
data/.gitignore ADDED
@@ -0,0 +1,4 @@
1
+ vendor/
2
+ .bundle
3
+ .vagrant/
4
+ pkg/
data/Gemfile ADDED
@@ -0,0 +1,10 @@
1
+ source "https://rubygems.org"
2
+
3
+ group :development do
4
+ # Because of https://github.com/hashicorp/vagrant/pull/10945
5
+ gem "vagrant", git: "https://github.com/hashicorp/vagrant.git", :tag => 'v2.2.4'
6
+ end
7
+
8
+ group :plugins do
9
+ gem "vagrant-guixsd-guest", path: "."
10
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,120 @@
1
+ GIT
2
+ remote: https://github.com/hashicorp/vagrant.git
3
+ revision: 25e11650c3c6b1a2d461ef055aabacb8562b265b
4
+ tag: v2.2.4
5
+ specs:
6
+ vagrant (2.2.4)
7
+ bcrypt_pbkdf (~> 1.0.0)
8
+ childprocess (~> 0.6.0)
9
+ ed25519 (~> 1.2.4)
10
+ erubis (~> 2.7.0)
11
+ hashicorp-checkpoint (~> 0.1.5)
12
+ i18n (~> 1.1.1)
13
+ listen (~> 3.1.5)
14
+ log4r (~> 1.1.9, < 1.1.11)
15
+ net-scp (~> 1.2.0)
16
+ net-sftp (~> 2.1)
17
+ net-ssh (~> 5.1.0)
18
+ rb-kqueue (~> 0.2.0)
19
+ rest-client (>= 1.6.0, < 3.0)
20
+ ruby_dep (<= 1.3.1)
21
+ rubyzip (~> 1.2.2)
22
+ vagrant_cloud (~> 2.0.2)
23
+ wdm (~> 0.1.0)
24
+ winrm (~> 2.1)
25
+ winrm-elevated (~> 1.1)
26
+ winrm-fs (~> 1.0)
27
+
28
+ PATH
29
+ remote: .
30
+ specs:
31
+ vagrant-guixsd-guest (0.1.0)
32
+
33
+ GEM
34
+ remote: https://rubygems.org/
35
+ specs:
36
+ bcrypt_pbkdf (1.0.1)
37
+ builder (3.2.3)
38
+ childprocess (0.6.3)
39
+ ffi (~> 1.0, >= 1.0.11)
40
+ concurrent-ruby (1.1.5)
41
+ domain_name (0.5.20190701)
42
+ unf (>= 0.0.5, < 1.0.0)
43
+ ed25519 (1.2.4)
44
+ erubis (2.7.0)
45
+ ffi (1.11.1)
46
+ gssapi (1.3.0)
47
+ ffi (>= 1.0.1)
48
+ gyoku (1.3.1)
49
+ builder (>= 2.1.2)
50
+ hashicorp-checkpoint (0.1.5)
51
+ http-cookie (1.0.3)
52
+ domain_name (~> 0.5)
53
+ httpclient (2.8.3)
54
+ i18n (1.1.1)
55
+ concurrent-ruby (~> 1.0)
56
+ listen (3.1.5)
57
+ rb-fsevent (~> 0.9, >= 0.9.4)
58
+ rb-inotify (~> 0.9, >= 0.9.7)
59
+ ruby_dep (~> 1.2)
60
+ little-plugger (1.1.4)
61
+ log4r (1.1.10)
62
+ logging (2.2.2)
63
+ little-plugger (~> 1.1)
64
+ multi_json (~> 1.10)
65
+ mime-types (3.2.2)
66
+ mime-types-data (~> 3.2015)
67
+ mime-types-data (3.2019.0331)
68
+ multi_json (1.13.1)
69
+ net-scp (1.2.1)
70
+ net-ssh (>= 2.6.5)
71
+ net-sftp (2.1.2)
72
+ net-ssh (>= 2.6.5)
73
+ net-ssh (5.1.0)
74
+ netrc (0.11.0)
75
+ nori (2.6.0)
76
+ rb-fsevent (0.10.3)
77
+ rb-inotify (0.10.0)
78
+ ffi (~> 1.0)
79
+ rb-kqueue (0.2.5)
80
+ ffi (>= 0.5.0)
81
+ rest-client (2.0.2)
82
+ http-cookie (>= 1.0.2, < 2.0)
83
+ mime-types (>= 1.16, < 4.0)
84
+ netrc (~> 0.8)
85
+ ruby_dep (1.3.1)
86
+ rubyntlm (0.6.2)
87
+ rubyzip (1.2.3)
88
+ unf (0.1.4)
89
+ unf_ext
90
+ unf_ext (0.0.7.6)
91
+ vagrant_cloud (2.0.2)
92
+ rest-client (~> 2.0.2)
93
+ wdm (0.1.1)
94
+ winrm (2.3.2)
95
+ builder (>= 2.1.2)
96
+ erubis (~> 2.7)
97
+ gssapi (~> 1.2)
98
+ gyoku (~> 1.0)
99
+ httpclient (~> 2.2, >= 2.2.0.2)
100
+ logging (>= 1.6.1, < 3.0)
101
+ nori (~> 2.0)
102
+ rubyntlm (~> 0.6.0, >= 0.6.1)
103
+ winrm-elevated (1.1.1)
104
+ winrm (~> 2.0)
105
+ winrm-fs (~> 1.0)
106
+ winrm-fs (1.3.2)
107
+ erubis (~> 2.7)
108
+ logging (>= 1.6.1, < 3.0)
109
+ rubyzip (~> 1.1)
110
+ winrm (~> 2.0)
111
+
112
+ PLATFORMS
113
+ ruby
114
+
115
+ DEPENDENCIES
116
+ vagrant!
117
+ vagrant-guixsd-guest!
118
+
119
+ BUNDLED WITH
120
+ 2.0.1
data/README.md ADDED
@@ -0,0 +1,35 @@
1
+ # Vagrant::Guixsd::Guest
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/vagrant/guixsd/guest`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'vagrant-guixsd-guest'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install vagrant-guixsd-guest
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Development
28
+
29
+ After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
+
31
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/palfrey/vagrant-guixsd-guest.
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rubygems"
3
+ require "bundler/setup"
4
+ Bundler::GemHelper.install_tasks
5
+
6
+ task :default => :spec
data/Vagrantfile ADDED
@@ -0,0 +1,4 @@
1
+ Vagrant.configure("2") do |config|
2
+ config.vm.box = "guixsd"
3
+ config.vagrant.plugins = "vagrant-guixsd-guest"
4
+ end
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "guixsd/plugin"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
data/lib/cap/halt.rb ADDED
@@ -0,0 +1,17 @@
1
+ module VagrantPlugins
2
+ module GuixSD
3
+ module Cap
4
+ class Halt
5
+ def self.halt(machine)
6
+ begin
7
+ machine.communicate.sudo("shutdown")
8
+ rescue IOError, Vagrant::Errors::SSHDisconnected
9
+ # Do nothing, because it probably means the machine shut down
10
+ # and SSH connection was lost.
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
17
+
data/lib/guest.rb ADDED
@@ -0,0 +1,9 @@
1
+ module VagrantPlugins
2
+ module GuixSD
3
+ class Guest < Vagrant.plugin("2", :guest)
4
+ def detect?(machine)
5
+ machine.communicate.test("ls /gnu/store")
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,27 @@
1
+ begin
2
+ require "vagrant"
3
+ rescue LoadError
4
+ raise "The GuixSD plugin must be run within Vagrant."
5
+ end
6
+
7
+ if Vagrant::VERSION < "1.2.0"
8
+ raise "The Vagrant AWS plugin is only compatible with Vagrant 1.2+"
9
+ end
10
+
11
+ module VagrantPlugins
12
+ module GuixSD
13
+ class Plugin < Vagrant.plugin("2")
14
+ name "GuixSD Guest"
15
+
16
+ guest(:guixsd, :linux) do
17
+ require_relative "guest"
18
+ Guest
19
+ end
20
+
21
+ guest_capability(:guixsd, :halt) do
22
+ require_relative "cap/halt"
23
+ Cap::Halt
24
+ end
25
+ end
26
+ end
27
+ end
data/lib/version.rb ADDED
@@ -0,0 +1,5 @@
1
+ module VagrantPlugins
2
+ module GuixSD
3
+ VERSION = "0.1.0"
4
+ end
5
+ end
@@ -0,0 +1,27 @@
1
+ lib = File.expand_path("../lib", __FILE__)
2
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
+ require "version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "vagrant-guixsd-guest"
7
+ spec.version = VagrantPlugins::GuixSD::VERSION
8
+ spec.platform = Gem::Platform::RUBY
9
+ spec.authors = ["Tom Parker-Shemilt"]
10
+ spec.email = ["palfrey@tevp.net"]
11
+
12
+ spec.summary = %q{Vagrant support for GuixSD guests}
13
+ spec.description = %q{Add support for GuixSD guests to Vagrant}
14
+ spec.homepage = "https://github.com/palfrey/guix-vm/vagrant-guixsd-guest"
15
+
16
+ # Specify which files should be added to the gem when it is released.
17
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
18
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
19
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
20
+ end
21
+ spec.bindir = "exe"
22
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
23
+ spec.require_paths = ["lib"]
24
+
25
+ spec.add_development_dependency "bundler", "~> 2.0"
26
+ spec.add_development_dependency "rake", "~> 10.0"
27
+ end
metadata ADDED
@@ -0,0 +1,84 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: vagrant-guixsd-guest
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Tom Parker-Shemilt
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2019-07-20 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '2.0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '2.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ description: Add support for GuixSD guests to Vagrant
42
+ email:
43
+ - palfrey@tevp.net
44
+ executables: []
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - ".gitignore"
49
+ - Gemfile
50
+ - Gemfile.lock
51
+ - README.md
52
+ - Rakefile
53
+ - Vagrantfile
54
+ - bin/console
55
+ - bin/setup
56
+ - lib/cap/halt.rb
57
+ - lib/guest.rb
58
+ - lib/vagrant-guixsd-guest.rb
59
+ - lib/version.rb
60
+ - vagrant-guixsd-guest.gemspec
61
+ homepage: https://github.com/palfrey/guix-vm/vagrant-guixsd-guest
62
+ licenses: []
63
+ metadata: {}
64
+ post_install_message:
65
+ rdoc_options: []
66
+ require_paths:
67
+ - lib
68
+ required_ruby_version: !ruby/object:Gem::Requirement
69
+ requirements:
70
+ - - ">="
71
+ - !ruby/object:Gem::Version
72
+ version: '0'
73
+ required_rubygems_version: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - ">="
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ requirements: []
79
+ rubyforge_project:
80
+ rubygems_version: 2.6.14.3
81
+ signing_key:
82
+ specification_version: 4
83
+ summary: Vagrant support for GuixSD guests
84
+ test_files: []