integ/security/openscap/debian/deb_folder/patches/create-diagrams-when-generating-Doxygen-documen.patch
Marcelo de Castro Loebens e17b830387 Upgrade Openscap (1.3.5 -> 1.3.6)
Upgrade Openscap tool to release 1.3.6, using the debianized version
1.3.6+dsfg-6 for the packaging files available at
https://salsa.debian.org/debian/openscap/-/blob/debian/1.3.6+dfsg-6/debian/changelog
Didn't change any files or patches.

Segmentation faults during Openscap usage seen in Starlingx were
fixed in this release of Openscap, and are the reason of this upgrade.

Test Plan:
PASS: Build iso.

PASS: Deploy AIO-SX.

PASS: Check version (oscap --version). Result should be 1.3.6.

PASS: Run openscap using one of default manifests. There should be no
segmentation fault issues. Command i.e.:
"oscap xccdf eval --profile \
xccdf_org.ssgproject.content_profile_anssi_np_nt28_high \
--report controller-0-report.html \
/usr/share/xml/scap/ssg/content/ssg-debian11-ds-1.2.xml".

Closes-Bug: 2006782

Signed-off-by: Marcelo de Castro Loebens <Marcelo.DeCastroLoebens@windriver.com>
Change-Id: I34ff193227ae51ec709b7d69b6a97abc074721f3
2023-02-14 18:57:00 -04:00

64 lines
2.0 KiB
Diff

From: Håvard F. Aasen <havard.f.aasen@pfft.no>
Date: Tue, 12 Jul 2022 07:29:02 +0200
Subject: [PATCH] docs: Create diagrams when generating Doxygen documentation
If we enable documentation and CMake finds Doxygen and 'dot' in path,
diagrams will be generated.
CMake searches for 'dot' at the same time as Doxygen.
'dot' is a tool found in graphviz.
Forwarded: https://github.com/OpenSCAP/openscap/pull/1872
---
CMakeLists.txt | 1 +
docs/CMakeLists.txt | 6 ++++++
docs/Doxyfile.in | 2 +-
3 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 61c57d7a3..45380539c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -469,6 +469,7 @@ message(STATUS " ")
message(STATUS "Documentation:")
message(STATUS "enabled: ${ENABLE_DOCS}")
message(STATUS "doxygen: ${DOXYGEN_EXECUTABLE}")
+message(STATUS "graphviz: ${DOXYGEN_DOT_EXECUTABLE}")
message(STATUS "asciidoc: ${ASCIIDOC_EXECUTABLE}")
# ---------- PATHS
diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt
index b8c5bc5ba..0a5e627c2 100644
--- a/docs/CMakeLists.txt
+++ b/docs/CMakeLists.txt
@@ -8,6 +8,12 @@ if(ENABLE_DOCS)
set(DOXYGEN_IN ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in)
set(DOXYGEN_OUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
+ # configure for graphviz
+ set(DOXYGEN_DIAGRAM "NO")
+ if(DOXYGEN_DOT_FOUND)
+ set(DOXYGEN_DIAGRAM "YES")
+ endif()
+
# request to configure the file
configure_file(${DOXYGEN_IN} ${DOXYGEN_OUT} @ONLY)
diff --git a/docs/Doxyfile.in b/docs/Doxyfile.in
index f48a3e763..7a2e88601 100644
--- a/docs/Doxyfile.in
+++ b/docs/Doxyfile.in
@@ -1220,7 +1220,7 @@ HIDE_UNDOC_RELATIONS = YES
# toolkit from AT&T and Lucent Bell Labs. The other options in this section
# have no effect if this option is set to NO (the default)
-HAVE_DOT = NO
+HAVE_DOT = @DOXYGEN_DIAGRAM@
# By default doxygen will write a font called FreeSans.ttf to the output
# directory and reference it in all dot files that doxygen generates. This
--
2.35.1