vagrant-mutate 1.0.2 → 1.0.3

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: d9f5739877315cbc00036f84ac76e697884eff45
4
- data.tar.gz: f0dfedb7bf667667c9a81b3a6a8fb0425ab2f838
3
+ metadata.gz: d61d3a19b58fbf87b0c6dea226cceab60232c299
4
+ data.tar.gz: 8af3f8b241f7d525981d7682db1790f866596c3b
5
5
  SHA512:
6
- metadata.gz: a17e8ea3d61dbca0bf7369ebf49ca273f14eaabb78930c6da9d0522cfd645c72512532995bfddb2bd119518e3ebbec6fd14671cb7bd7040d168a58b89a61f319
7
- data.tar.gz: 9e6dc28b36f05489d755c7b16867d932a119ccef32b4d9e893c4584c91f8adfa466e6a1b9a4cc04e5b7110245cb9a76eedcc1fa16695df51cb790cc2bb6f8896
6
+ metadata.gz: ae8e9f694743c23db4c9703575fdae3401976f0482fbc11f34004995eca212b8ab8493d5fa8784ec2783695930ad0ebf5df88adba775bddbcb411840569a5f87
7
+ data.tar.gz: d4f9c7b7cdccb175da5c729853dab37806255972cf356990c355146cc8999e30da1fa1a3ccd1ef9397fa0e429cc9c8f3a38d415944f1432a45b24f2644c571af
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ # 1.0.3 (2015-10-15)
2
+ * Fix compatibility with qemu version in EL6 (#76)
3
+
1
4
  # 1.0.2 (2015-09-06)
2
5
  * Allow period in box name when loading from URL (#75)
3
6
 
data/README.md CHANGED
@@ -29,7 +29,7 @@ First, you must install [qemu-img](http://wiki.qemu.org/Main_Page) and the libvi
29
29
 
30
30
  #### Red Hat and derivatives
31
31
 
32
- yum install qemu-img libvirt-devel ruby-libvirt
32
+ yum install qemu-img libvirt-devel ruby-libvirt ruby-devel
33
33
 
34
34
  #### OS X
35
35
 
@@ -93,8 +93,12 @@ module VagrantMutate
93
93
  # p for progress bar
94
94
  # S for sparse file
95
95
  qemu_options = '-p -S 16k'
96
+ qemu_version = Qemu.qemu_version()
97
+ if qemu_version >= Gem::Version.new('1.1.0')
98
+ qemu_options += ' -o compat=1.1'
99
+ end
96
100
 
97
- command = "qemu-img convert #{qemu_options} -O #{output_format} -o compat=1.1 #{input_file} #{output_file}"
101
+ command = "qemu-img convert #{qemu_options} -O #{output_format} #{input_file} #{output_file}"
98
102
  @logger.info "Running #{command}"
99
103
  unless system(command)
100
104
  fail Errors::WriteDiskFailed, error_message: "qemu-img exited with status #{$CHILD_STATUS.exitstatus}"
@@ -17,22 +17,26 @@ module VagrantMutate
17
17
  fail Errors::QemuImgNotFound
18
18
  end
19
19
 
20
- def self.verify_qemu_version(env)
20
+ def self.qemu_version()
21
21
  usage = `qemu-img --version`
22
22
  if usage =~ /(\d+\.\d+\.\d+)/
23
- installed_version = Gem::Version.new(Regexp.last_match[1])
24
- # less than 1.2 or equal to 1.6.x
25
- if installed_version < Gem::Version.new('1.2.0') or (installed_version >= Gem::Version.new('1.6.0') and installed_version < Gem::Version.new('1.7.0'))
26
-
27
- env.ui.warn "You have qemu #{installed_version} installed. "\
28
- 'This version cannot read some virtualbox boxes. '\
29
- 'If conversion fails, see below for recommendations. '\
30
- 'https://github.com/sciurus/vagrant-mutate/wiki/QEMU-Version-Compatibility'
31
-
32
- end
23
+ return Gem::Version.new(Regexp.last_match[1])
33
24
  else
34
25
  fail Errors::ParseQemuVersionFailed
35
26
  end
36
27
  end
28
+
29
+ def self.verify_qemu_version(env)
30
+ installed_version = qemu_version()
31
+ # less than 1.2 or equal to 1.6.x
32
+ if installed_version < Gem::Version.new('1.2.0') or (installed_version >= Gem::Version.new('1.6.0') and installed_version < Gem::Version.new('1.7.0'))
33
+
34
+ env.ui.warn "You have qemu #{installed_version} installed. "\
35
+ 'This version cannot read some virtualbox boxes. '\
36
+ 'If conversion fails, see below for recommendations. '\
37
+ 'https://github.com/sciurus/vagrant-mutate/wiki/QEMU-Version-Compatibility'
38
+
39
+ end
40
+ end
37
41
  end
38
42
  end
@@ -1,3 +1,3 @@
1
1
  module VagrantMutate
2
- VERSION = '1.0.2'
2
+ VERSION = '1.0.3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-mutate
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Pitts
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-06 00:00:00.000000000 Z
11
+ date: 2015-10-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler