From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1369997-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 4A0E715808B
	for <garchives@archives.gentoo.org>; Mon, 21 Feb 2022 23:14:53 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 91811E0A8C;
	Mon, 21 Feb 2022 23:14:52 +0000 (UTC)
Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 69663E0A8C
	for <gentoo-commits@lists.gentoo.org>; Mon, 21 Feb 2022 23:14:52 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 5DC66335D32
	for <gentoo-commits@lists.gentoo.org>; Mon, 21 Feb 2022 23:14:51 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 99C0ED0
	for <gentoo-commits@lists.gentoo.org>; Mon, 21 Feb 2022 23:14:49 +0000 (UTC)
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" <sam@gentoo.org>
Message-ID: <1645485252.95d996936646bc7fe900cf7f59376b95e94b1b03.sam@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/libvirt/, app-emulation/libvirt/files/
X-VCS-Repository: repo/gentoo
X-VCS-Files: app-emulation/libvirt/files/libvirt-8.1.0-docs-Fix-template-matching-in-page.xsl.patch app-emulation/libvirt/libvirt-7.10.0-r3.ebuild app-emulation/libvirt/libvirt-7.7.0-r2.ebuild app-emulation/libvirt/libvirt-8.0.0-r1.ebuild
X-VCS-Directories: app-emulation/libvirt/files/ app-emulation/libvirt/
X-VCS-Committer: sam
X-VCS-Committer-Name: Sam James
X-VCS-Revision: 95d996936646bc7fe900cf7f59376b95e94b1b03
X-VCS-Branch: master
Date: Mon, 21 Feb 2022 23:14:49 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: cfd481f8-2070-4c37-a58a-a91490d7f7e4
X-Archives-Hash: 89da3a558bb7c04356feb9343efc9d0f

commit:     95d996936646bc7fe900cf7f59376b95e94b1b03
Author:     Michal Privoznik <mprivozn <AT> redhat <DOT> com>
AuthorDate: Mon Feb 21 15:49:57 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Feb 21 23:14:12 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=95d99693

app-emulation/libvirt: Fix build with >=dev-libs/libxslt-1.1.35

Libvirt failed to build with new libxslt because of a bug in one
of libvirt's xsl files. Backport the fix from upstream repo.

Closes: https://bugs.gentoo.org/833586
Signed-off-by: Michal Privoznik <mprivozn <AT> redhat.com>
Closes: https://github.com/gentoo/gentoo/pull/24300
Signed-off-by: Sam James <sam <AT> gentoo.org>

 ....0-docs-Fix-template-matching-in-page.xsl.patch | 62 ++++++++++++++++++++++
 app-emulation/libvirt/libvirt-7.10.0-r3.ebuild     |  1 +
 app-emulation/libvirt/libvirt-7.7.0-r2.ebuild      |  1 +
 app-emulation/libvirt/libvirt-8.0.0-r1.ebuild      |  1 +
 4 files changed, 65 insertions(+)

diff --git a/app-emulation/libvirt/files/libvirt-8.1.0-docs-Fix-template-matching-in-page.xsl.patch b/app-emulation/libvirt/files/libvirt-8.1.0-docs-Fix-template-matching-in-page.xsl.patch
new file mode 100644
index 000000000000..5207c6d81ec7
--- /dev/null
+++ b/app-emulation/libvirt/files/libvirt-8.1.0-docs-Fix-template-matching-in-page.xsl.patch
@@ -0,0 +1,62 @@
+From 54814c87f3706cc8eb894634ebef0f9cf7dabae6 Mon Sep 17 00:00:00 2001
+Message-Id: <54814c87f3706cc8eb894634ebef0f9cf7dabae6.1645458252.git.mprivozn@redhat.com>
+From: Martin Kletzander <mkletzan@redhat.com>
+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 <mkletzan@redhat.com>
+Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
+---
+ docs/page.xsl | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/docs/page.xsl b/docs/page.xsl
+index fd67918d3b..72a6fa0842 100644
+--- a/docs/page.xsl
++++ b/docs/page.xsl
+@@ -215,11 +215,11 @@
+     </xsl:element>
+   </xsl:template>
+ 
+-  <xsl:template match="text()" mode="copy">
++  <xsl:template match="text()" mode="copy" priority="0">
+     <xsl:value-of select="."/>
+   </xsl:template>
+ 
+-  <xsl:template match="node()" mode="copy">
++  <xsl:template match="*" mode="copy">
+     <xsl:element name="{name()}">
+       <xsl:copy-of select="./@*"/>
+       <xsl:apply-templates mode="copy" />
+-- 
+2.34.1
+

diff --git a/app-emulation/libvirt/libvirt-7.10.0-r3.ebuild b/app-emulation/libvirt/libvirt-7.10.0-r3.ebuild
index 21c5ce658519..ecec95b0d794 100644
--- a/app-emulation/libvirt/libvirt-7.10.0-r3.ebuild
+++ b/app-emulation/libvirt/libvirt-7.10.0-r3.ebuild
@@ -136,6 +136,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-6.7.0-fix-paths-for-apparmor.patch
 	"${FILESDIR}"/${PN}-7.9.0-fix_cgroupv2.patch
 	"${FILESDIR}"/${PN}-7.10.0-fix_soname.patch
+	"${FILESDIR}"/${PN}-8.1.0-docs-Fix-template-matching-in-page.xsl.patch
 )
 
 pkg_setup() {

diff --git a/app-emulation/libvirt/libvirt-7.7.0-r2.ebuild b/app-emulation/libvirt/libvirt-7.7.0-r2.ebuild
index e36b7d1dfd11..1d1927b62ac6 100644
--- a/app-emulation/libvirt/libvirt-7.7.0-r2.ebuild
+++ b/app-emulation/libvirt/libvirt-7.7.0-r2.ebuild
@@ -134,6 +134,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-6.0.0-fix_paths_in_libvirt-guests_sh.patch
 	"${FILESDIR}"/${PN}-6.7.0-do-not-use-sysconfig.patch
 	"${FILESDIR}"/${PN}-6.7.0-fix-paths-for-apparmor.patch
+	"${FILESDIR}"/${PN}-8.1.0-docs-Fix-template-matching-in-page.xsl.patch
 )
 
 pkg_setup() {

diff --git a/app-emulation/libvirt/libvirt-8.0.0-r1.ebuild b/app-emulation/libvirt/libvirt-8.0.0-r1.ebuild
index d62e076fcb1f..65a40aeebebc 100644
--- a/app-emulation/libvirt/libvirt-8.0.0-r1.ebuild
+++ b/app-emulation/libvirt/libvirt-8.0.0-r1.ebuild
@@ -134,6 +134,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-6.0.0-fix_paths_in_libvirt-guests_sh.patch
 	"${FILESDIR}"/${PN}-6.7.0-do-not-use-sysconfig.patch
 	"${FILESDIR}"/${PN}-6.7.0-fix-paths-for-apparmor.patch
+	"${FILESDIR}"/${PN}-8.1.0-docs-Fix-template-matching-in-page.xsl.patch
 )
 
 pkg_setup() {