The ovn-logical-flows(7) manpage was converted from XML to RST
in commit 0ed01ac3399e.  Unlike XML manpages, which are built by
the standard autotools pipeline, RST manpages require sphinx.

On environments where sphinx is not available (e.g. UBI9 images
used by ovn-kubernetes), the manpage is not generated but the
spec file unconditionally lists it in %files central, causing
the RPM build to fail with:

  File not found: .../usr/share/man/man7/ovn-logical-flows.7*

Add a %bcond_without sphinx toggle (enabled by default) and
guard both the BuildRequires and the %files entry so that
building with "--without sphinx" (or after stripping the
sphinx-build dependency) no longer breaks.

Fixes: 0ed01ac3399e ("northd: Convert ovn-logical-flows(7) from XML to RST.")
Assisted-by: Claude Opus 4.6, OpenCode
Signed-off-by: Ales Musil <[email protected]>
---
 rhel/ovn-fedora.spec.in | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/rhel/ovn-fedora.spec.in b/rhel/ovn-fedora.spec.in
index 9d6dd6aca..131b3eaab 100644
--- a/rhel/ovn-fedora.spec.in
+++ b/rhel/ovn-fedora.spec.in
@@ -15,6 +15,7 @@
 # If libcap-ng isn't available and there is no need for running OVS
 # as regular user, specify the '--without libcapng'
 %bcond_without libcapng
+%bcond_without sphinx
 
 # Enable PIE, bz#955181
 %global _hardened_build 1
@@ -53,7 +54,9 @@ BuildRequires: python3-devel
 BuildRequires: desktop-file-utils
 BuildRequires: groff graphviz
 BuildRequires: checkpolicy, selinux-policy-devel
+%if %{with sphinx}
 BuildRequires: /usr/bin/sphinx-build
+%endif
 # make check dependencies
 BuildRequires: procps-ng
 %if %{with libcapng}
@@ -538,7 +541,9 @@ fi
 %{_bindir}/ovn-northd
 %{_bindir}/ovn-ic
 %{_mandir}/man8/ovn-northd.8*
+%if %{with sphinx}
 %{_mandir}/man7/ovn-logical-flows.7*
+%endif
 %config %{_datadir}/ovn/ovn-nb.ovsschema
 %config %{_datadir}/ovn/ovn-sb.ovsschema
 %config %{_datadir}/ovn/ovn-ic-nb.ovsschema
-- 
2.54.0

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to