Compare commits
1 commit
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
00e383d7ee |
3 changed files with 94 additions and 1 deletions
|
|
@ -0,0 +1,50 @@
|
|||
From bef59efe6b8ba0bef824fcec460a1d34c546c2c3 Mon Sep 17 00:00:00 2001
|
||||
From: Andreas Bleischwitz <ableisch@redhat.com>
|
||||
Date: Tue, 28 Nov 2017 18:23:47 +0100
|
||||
Subject: [PATCH] added spicevmc channel to domain_all_settings.xml and
|
||||
domain_spec.rb
|
||||
|
||||
---
|
||||
spec/unit/templates/domain_all_settings.xml | 9 ++++++---
|
||||
spec/unit/templates/domain_spec.rb | 3 +++
|
||||
2 files changed, 9 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/spec/unit/templates/domain_all_settings.xml b/spec/unit/templates/domain_all_settings.xml
|
||||
index 761e3a8..cdd8ac7 100644
|
||||
--- a/spec/unit/templates/domain_all_settings.xml
|
||||
+++ b/spec/unit/templates/domain_all_settings.xml
|
||||
@@ -62,14 +62,17 @@
|
||||
</console>
|
||||
|
||||
<channel type='unix' >
|
||||
- <source mode=''
|
||||
- />
|
||||
<target type='virtio'
|
||||
name="org.qemu.guest_agent.0"
|
||||
/>
|
||||
</channel>
|
||||
+ <channel type='spicevmc' >
|
||||
+ <target type='virtio'
|
||||
+ name="com.redhat.spice.0"
|
||||
+ />
|
||||
+ </channel>
|
||||
<channel type='unix' >
|
||||
- <source mode=''
|
||||
+ <source
|
||||
path="/tmp/foo"
|
||||
/>
|
||||
<target type='guestfwd'
|
||||
diff --git a/spec/unit/templates/domain_spec.rb b/spec/unit/templates/domain_spec.rb
|
||||
index a96cba9..851fe59 100644
|
||||
--- a/spec/unit/templates/domain_spec.rb
|
||||
+++ b/spec/unit/templates/domain_spec.rb
|
||||
@@ -52,6 +52,9 @@ def finalize!
|
||||
domain.channel(type: 'unix',
|
||||
target_name: 'org.qemu.guest_agent.0',
|
||||
target_type: 'virtio')
|
||||
+ domain.channel(type: 'spicevmc',
|
||||
+ target_name: 'com.redhat.spice.0',
|
||||
+ target_type: 'virtio')
|
||||
domain.channel(type: 'unix',
|
||||
target_type: 'guestfwd',
|
||||
target_address: '192.0.2.42',
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
From a64c538f7fa6b95f4a4bc8cabfd598d2ada149a0 Mon Sep 17 00:00:00 2001
|
||||
From: Andreas Bleischwitz <ableisch@redhat.com>
|
||||
Date: Tue, 28 Nov 2017 18:22:40 +0100
|
||||
Subject: [PATCH] made <source>...</source> and it's sub-elements conditional
|
||||
|
||||
---
|
||||
lib/vagrant-libvirt/templates/domain.xml.erb | 7 ++++++-
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/vagrant-libvirt/templates/domain.xml.erb b/lib/vagrant-libvirt/templates/domain.xml.erb
|
||||
index 7fd991e..74b483c 100644
|
||||
--- a/lib/vagrant-libvirt/templates/domain.xml.erb
|
||||
+++ b/lib/vagrant-libvirt/templates/domain.xml.erb
|
||||
@@ -112,11 +112,16 @@
|
||||
|
||||
<% @channels.each do |channel| %>
|
||||
<channel type='<%= channel[:type] %>' >
|
||||
- <source mode='<%= channel[:source_mode] %>'
|
||||
+ <%if channel[:source_mode] or channel[:source_path] %>
|
||||
+ <source
|
||||
+ <% if channel[:source_mode] %>
|
||||
+ mode='<%= channel[:source_mode] %>'
|
||||
+ <% end %>
|
||||
<% if channel[:source_path] %>
|
||||
path="<%= channel[:source_path] %>"
|
||||
<% end %>
|
||||
/>
|
||||
+ <% end %>
|
||||
<target type='<%= channel[:target_type] %>'
|
||||
<% if channel[:target_name] %>
|
||||
name="<%= channel[:target_name] %>"
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
Name: %{vagrant_plugin_name}
|
||||
Version: 0.0.40
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
Summary: libvirt provider for Vagrant
|
||||
License: MIT
|
||||
URL: https://github.com/vagrant-libvirt/vagrant-libvirt
|
||||
|
|
@ -18,6 +18,12 @@ Source2: https://github.com/mitchellh/vagrant-spec/archive/%{vagrant_spec_commit
|
|||
# https://github.com/vagrant-libvirt/vagrant-libvirt/pull/783
|
||||
Patch0: vagrant-libvirt-0.40.0-Fix-failing-domain-tests-due-to-missing-property.patch
|
||||
|
||||
# Fix invalid XML creation on custom domain name.
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1518899
|
||||
# https://github.com/vagrant-libvirt/vagrant-libvirt/issues/831
|
||||
Patch1: vagrant-libvirt-0.40.0-Fix-invalid-xml-custom-domain-name.patch
|
||||
Patch2: vagrant-libvirt-0.40.0-Fix-invalid-xml-custom-domain-name-tests.patch
|
||||
|
||||
Requires: ruby(release)
|
||||
Requires: ruby(rubygems)
|
||||
Requires: rubygem(fog-libvirt) >= 0.3.0
|
||||
|
|
@ -56,6 +62,7 @@ gem unpack %{SOURCE0}
|
|||
gem spec %{SOURCE0} -l --ruby > %{vagrant_plugin_name}.gemspec
|
||||
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
|
||||
# Relax nokogiri dependency
|
||||
sed -i '\@nokogiri@s|~> 1\.6\.0|~> 1.6|' \
|
||||
|
|
@ -91,6 +98,8 @@ sed -i '/pry/ s/^/#/' Gemfile
|
|||
sed -i '/coveralls/ s/^/#/' Gemfile
|
||||
sed -i '/[cC]overalls/ s/^/#/' spec/spec_helper.rb
|
||||
|
||||
cat %{PATCH2} | patch -p1 -F 0
|
||||
|
||||
GEM_PATH=%{vagrant_plugin_dir}:`ruby -e "print Gem.path.join(':')"` bundle exec rspec2 spec
|
||||
popd
|
||||
|
||||
|
|
@ -115,6 +124,9 @@ popd
|
|||
%{vagrant_plugin_instdir}/vagrant-libvirt.gemspec
|
||||
|
||||
%changelog
|
||||
* Fri Dec 08 2017 Pavel Valena <pvalena@redhat.com> - 0.0.40-3
|
||||
- Fix invalid XML creation on custom domain name (rhbz#1518899).
|
||||
|
||||
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.40-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue