devguide: drop use of mscgen script in builds/make

Currently, it seems easier to upload the diagram images to git than to
try to make the image generation script work with out of the tree builds
and other corner cases.

This means, however, that one must activelly remember to update msc
diagram files, run the script and re-add new png files, if those ever
need to be updated. To raise awareness to that, a watermark was added
to the diagram images.

Also removed configuration steps that added mscgen as dependency
(locally and for workflow builds and readthedocs).
pull/7186/head
Juliana Fajardini 3 years ago committed by Victor Julien
parent 5d63613c4b
commit 67af1504b3

@ -1115,7 +1115,6 @@ jobs:
libjansson-dev \
libpython2.7 \
make \
mscgen \
parallel \
python3-yaml \
rustc \

@ -7,7 +7,3 @@ python:
# Use an empty install section to avoid RTD from picking up a non-python
# requirements.txt file.
install: []
build:
apt_packages:
- mscgen

@ -6,7 +6,8 @@ EXTRA_DIST = ChangeLog COPYING LICENSE suricata.yaml.in \
threshold.config \
$(SURICATA_UPDATE_DIR) \
lua \
acsite.m4
acsite.m4 \
scripts/generate-images.sh
SUBDIRS = $(HTP_DIR) rust src qa rules doc contrib etc python ebpf \
$(SURICATA_UPDATE_DIR)

@ -2168,18 +2168,6 @@ fi
AC_DEFINE([CLS],[64],[L1 cache line size])
fi
# mscgen for devguide images
AC_PATH_PROG([HAVE_MSCGEN], mscgen, "no")
if test "$HAVE_MSCGEN" = "no"; then
enable_mscgen=no
echo "WARNING! mscgen package not installed."
echo " Devguide images won't be generated!"
echo " Get mscgen package:"
echo " https://www.mcternan.me.uk/mscgen/"
echo " or install it from your distribution"
fi
AM_CONDITIONAL([HAVE_MSCGEN], [test "x$enable_mscgen" != "xno" ])
# sphinx for documentation
AC_PATH_PROG(HAVE_SPHINXBUILD, sphinx-build, "no")
if test "$HAVE_SPHINXBUILD" = "no"; then

@ -89,6 +89,5 @@ clean-local:
rm -rf $(top_builddir)/doc/userguide/_build
rm -f $(top_builddir)/doc/userguide/suricata*.1
rm -f $(top_builddir)/doc/userguide/userguide.pdf
rm -f $(top_builddir)/doc/userguide/devguide/extending/app-layer/diagrams/*.png
endif # HAVE_SPHINXBUILD

@ -135,6 +135,11 @@ if not on_rtd:
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
except:
html_theme = 'default'
def setup(app):
if hasattr(app, 'add_css_file'):
app.add_css_file('css/suricata.css')
else:
app.add_stylesheet('css/suricata.css')
else:
html_context = {
'css_files': [
@ -144,15 +149,6 @@ else:
],
}
def setup(app):
# Generate images.
subprocess.check_call("./devguide/tools/generate-images.sh")
if not on_rtd:
if hasattr(app, 'add_css_file'):
app.add_css_file('css/suricata.css')
else:
app.add_stylesheet('css/suricata.css')
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.

@ -1 +0,0 @@
extending/app-layer/diagrams/*.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

@ -8,7 +8,7 @@ parent_path=$(cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P)
set -e
cd "$parent_path"
cd ../extending/app-layer/diagrams
cd ../doc/userguide/devguide/extending/app-layer/diagrams
for FILE in *.msc ; do
# call mscgen and convert each file in images dir
Loading…
Cancel
Save