diff --git a/vagrant-libvirt-0.40.0-Fix-invalid-xml-custom-domain-name-tests.patch b/vagrant-libvirt-0.40.0-Fix-invalid-xml-custom-domain-name-tests.patch new file mode 100644 index 0000000..113ac88 --- /dev/null +++ b/vagrant-libvirt-0.40.0-Fix-invalid-xml-custom-domain-name-tests.patch @@ -0,0 +1,50 @@ +From bef59efe6b8ba0bef824fcec460a1d34c546c2c3 Mon Sep 17 00:00:00 2001 +From: Andreas Bleischwitz +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 @@ + + + +- + + ++ ++ ++ + +- + +Date: Tue, 28 Nov 2017 18:22:40 +0100 +Subject: [PATCH] made ... 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| %> + +- ++ ++ mode='<%= channel[:source_mode] %>' ++ <% end %> + <% if channel[:source_path] %> + path="<%= channel[:source_path] %>" + <% end %> + /> ++ <% end %> + + name="<%= channel[:target_name] %>" diff --git a/vagrant-libvirt.spec b/vagrant-libvirt.spec index bb7711b..ec3feba 100644 --- a/vagrant-libvirt.spec +++ b/vagrant-libvirt.spec @@ -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 - 0.0.40-3 +- Fix invalid XML creation on custom domain name (rhbz#1518899). + * Thu Jul 27 2017 Fedora Release Engineering - 0.0.40-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild