From 7316e950d88aad1cc793b8cb324c0f806bc50bba Mon Sep 17 00:00:00 2001 From: eabdullin Date: Thu, 15 May 2025 09:41:56 +0300 Subject: [PATCH] Apply patch to fix duplicate label in docs --- ...efine-duplicate-label-in-qemu-block-.patch | 67 +++++++++++++++++++ qemu-kvm.spec | 2 + 2 files changed, 69 insertions(+) create mode 100644 docs-Dont-define-duplicate-label-in-qemu-block-.patch diff --git a/docs-Dont-define-duplicate-label-in-qemu-block-.patch b/docs-Dont-define-duplicate-label-in-qemu-block-.patch new file mode 100644 index 0000000..052a96c --- /dev/null +++ b/docs-Dont-define-duplicate-label-in-qemu-block-.patch @@ -0,0 +1,67 @@ +From 82707dd4f07613eed8d639956a43bddffca5cd5c Mon Sep 17 00:00:00 2001 +From: Peter Maydell +Date: Thu, 1 May 2025 10:31:26 +0100 +Subject: [PATCH] docs: Don't define duplicate label in + qemu-block-drivers.rst.inc + +Sphinx requires that labels within documents are unique across the +whole manual. This is because the "create a hyperlink" directive +specifies only the name of the label, not a filename+label. Some +Sphinx versions will warn about duplicate labels, but even if there +is no warning there is still an ambiguity and no guarantee that the +hyperlink will be created to the right target. + +For QEMU this is awkward, because we have various .rst.inc fragments +which we include into multiple .rst files. If you define a label in +the .rst.inc file then it will be a duplicate label. We have mostly +worked around this by not putting labels into those .rst.inc files, +or by adding "insert a label" functionality into the hxtool extension +(see commit 1eeb432a953b0 "doc/sphinx/hxtool.py: add optional label +argument to SRST directive"). + +Unfortunately in commit 7f6314427e78 ("docs/devel: add a codebase +section") we accidentally added a duplicate label, because not all +Sphinx versions warn about the mistake. + +In this case the link was only from the developer docs codebase +summary, so as the simplest fix for the stable branch, we drop +the link entirely. + +Cc: qemu-stable@nongnu.org +Fixes: 1eeb432a953b0 "doc/sphinx/hxtool.py: add optional label argument to SRST directive" +Reported-by: Dario Faggioli +Signed-off-by: Peter Maydell +Acked-by: Eric Blake +Reviewed-by: Pierrick Bouvier +Message-id: 20250501093126.716667-1-peter.maydell@linaro.org +--- + docs/devel/codebase.rst | 2 +- + docs/system/qemu-block-drivers.rst.inc | 2 -- + 2 files changed, 1 insertion(+), 3 deletions(-) + +diff --git a/docs/devel/codebase.rst b/docs/devel/codebase.rst +index 40273e7d31e1..2a3143787a6c 100644 +--- a/docs/devel/codebase.rst ++++ b/docs/devel/codebase.rst +@@ -116,7 +116,7 @@ yet, so sometimes the source code is all you have. + * `monitor `_: + `Monitor ` implementation (HMP & QMP). + * `nbd `_: +- QEMU `NBD (Network Block Device) ` server. ++ QEMU NBD (Network Block Device) server. + * `net `_: + Network (host) support. + * `pc-bios `_: +diff --git a/docs/system/qemu-block-drivers.rst.inc b/docs/system/qemu-block-drivers.rst.inc +index cfe1acb78ae5..384e95ba7650 100644 +--- a/docs/system/qemu-block-drivers.rst.inc ++++ b/docs/system/qemu-block-drivers.rst.inc +@@ -500,8 +500,6 @@ What you should *never* do: + - expect it to work when loadvm'ing + - write to the FAT directory on the host system while accessing it with the guest system + +-.. _nbd: +- + NBD access + ~~~~~~~~~~ + diff --git a/qemu-kvm.spec b/qemu-kvm.spec index c8e718f..c62ba44 100644 --- a/qemu-kvm.spec +++ b/qemu-kvm.spec @@ -207,6 +207,7 @@ Patch0019: 0019-qcow2-Deprecation-warning-when-opening-v2-images-rw.patch # AlmaLinux Patch Patch2001: 2001-Add-ppc64-support.patch Patch2002: 2002-Enable-QXL-device-build.patch +Patch2003: docs-Dont-define-duplicate-label-in-qemu-block-.patch %if %{have_clang} BuildRequires: clang @@ -1332,6 +1333,7 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ - Enable building for ppc64le - Re-added Spice support - Don't remove slof.bin for ppc64le +- Apply patch to fix duplicate label in docs * Wed Apr 23 2025 Miroslav Rezanina - 10.0.0-1 - Rebase to QEMU 10.0.0 [RHEL-74473]