From cc781f9f749b657acd588e7a22f820f9ee2e0675 Mon Sep 17 00:00:00 2001 From: yezengruan Date: Fri, 11 Nov 2022 09:29:03 +0800 Subject: [PATCH] docs: Fix template matching in page.xsl Signed-off-by: yezengruan (cherry picked from commit 2d02e27829e0f2d17df0cb97b8603fe04b343f0e) --- docs-Fix-template-matching-in-page.xsl.patch | 60 ++++++++++++++++++++ libvirt.spec | 6 +- 2 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 docs-Fix-template-matching-in-page.xsl.patch diff --git a/docs-Fix-template-matching-in-page.xsl.patch b/docs-Fix-template-matching-in-page.xsl.patch new file mode 100644 index 0000000..29478d6 --- /dev/null +++ b/docs-Fix-template-matching-in-page.xsl.patch @@ -0,0 +1,60 @@ +From 2fc51790318ec17fbca46185991fac8cc3302ec0 Mon Sep 17 00:00:00 2001 +From: Martin Kletzander +Date: Mon, 21 Feb 2022 09:26:13 +0100 +Subject: [PATCH] docs: Fix template matching in page.xsl + +Our last default template had a match of "node()" which incidentally matched +everything, including text nodes. Since this has the same priority according to +the XSLT spec, section 5.5: + + https://www.w3.org/TR/1999/REC-xslt-19991116#conflict + +this is an error. Also according to the same spec section, the XSLT processor +may signal the error or pick the last rule. + +This was uncovered with libxslt 1.1.35 which contains the following commit: + + https://gitlab.gnome.org/GNOME/libxslt/-/commit/b0074eeca3c6b21b4da14fdf712b853900c51635 + +which makes the build fail with: + + runtime error: file ../docs/page.xsl line 223 element element + xsl:element: The effective name '' is not a valid QName. + +because our last rule also matches text nodes and we are trying to extract the +node name out of them. + +To fix this we change the match to "*" which only matches elements and not all +the nodes, and to avoid any possible errors with different XSLT processors we +also bump the priority of the match="text()" rule a little higher, just in case +someone needs to use an XSLT processor that chooses signalling the error instead +of the optional recovery. + +https://bugs.gentoo.org/833586 + +Signed-off-by: Martin Kletzander +--- + docs/page.xsl | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/docs/page.xsl b/docs/page.xsl +index ddae5ab508..5dc46329fd 100644 +--- a/docs/page.xsl ++++ b/docs/page.xsl +@@ -194,11 +194,11 @@ + + + +- ++ + + + +- ++ + + + +-- +2.27.0 + diff --git a/libvirt.spec b/libvirt.spec index 0a8b835..eac8898 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -101,7 +101,7 @@ Summary: Library providing a simple virtualization API Name: libvirt Version: 6.2.0 -Release: 44 +Release: 45 License: LGPLv2+ URL: https://libvirt.org/ @@ -367,6 +367,7 @@ Patch0254: migration-dirtyrate-Introduce-virDomainDirtyRateStat.patch Patch0255: migration-dirtyrate-Implement-qemuMonitorQueryDirtyR.patch Patch0256: migration-dirtyrate-Extend-dirtyrate-statistics-for-.patch Patch0257: migration-dirtyrate-Introduce-command-virsh-domstats.patch +Patch0258: docs-Fix-template-matching-in-page.xsl.patch Requires: libvirt-daemon = %{version}-%{release} Requires: libvirt-daemon-config-network = %{version}-%{release} @@ -2101,6 +2102,9 @@ exit 0 %changelog +* Fri Nov 11 2022 yezengruan - 6.2.0-45 +- docs: Fix template matching in page.xsl + * Thu Nov 03 2022 yezengruan - 6.2.0-44 - libvirt: support migration dirtyrate -- Gitee