[elbe-devel] [PATCH] docs: replace dia with graphviz

Eduard Krein eduard.krein at linutronix.de
Mon Apr 8 11:10:41 CEST 2024


Am Montag, dem 25.03.2024 um 15:24 +0100 schrieb Thomas Weißschuh:
> The last release of dia was 2011, it depends on gtk2 and on some
> distributions on python2.
> Diagrams created with dia can only be edited inside the application.
> 
> Migrate the two diagrams that are used to graphviz.
> 
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>

Reviewed-by: Eduard Krein <eduard.krein at linutronix.de>
> ---
>  debian/control           |   2 +-
>  docs/Makefile            |  14 ++------
>  docs/elbe-process.dia    | Bin 3414 -> 0 bytes
>  docs/elbe-process.dot    |  92
> +++++++++++++++++++++++++++++++++++++++++++++++
>  docs/elbeoverview-en.txt |  10 ++++--
>  docs/emu-process.dia     | Bin 1539 -> 0 bytes
>  docs/emu-process.dot     |  18 ++++++++++
>  docs/overview.dia        | Bin 2592 -> 0 bytes
>  8 files changed, 121 insertions(+), 15 deletions(-)
> 
> diff --git a/debian/control b/debian/control
> index 2afe8f6dc848..5cb54581b485 100644
> --- a/debian/control
> +++ b/debian/control
> @@ -10,7 +10,6 @@ Build-Depends: debhelper-compat (= 12),
>    python3-lxml,
>    python3-mako,
>    python3-parted,
> -  dia,
>    asciidoc,
>    xmlto,
>    lintian,
> @@ -25,6 +24,7 @@ Build-Depends: debhelper-compat (= 12),
>    python3-spyne,
>    python3-sqlalchemy,
>    flake8,
> +  graphviz,
>    python3-flake8-import-order,
>    python3-flake8-noqa,
>    python3-flake8-quotes,
> diff --git a/docs/Makefile b/docs/Makefile
> index 9cafdf7d670c..a207b6a2b775 100644
> --- a/docs/Makefile
> +++ b/docs/Makefile
> @@ -42,7 +42,6 @@ MANPAGE_XSL = manpage-normal.xsl
>  XMLTO_EXTRA =
>  INSTALL?=install
>  RM ?= rm -f
> -DIA ?= dia
>  
>  DOCBOOK_XSL_172=1
>  
> @@ -84,7 +83,6 @@ clean:
>         $(RM) article*.rst elbe*.rst *.xml *.xml+ *.html *.html+ *.1
> *.5 *.7
>         $(RM) *.texi *.texi+ *.texi++ git.info gitman.info
>         $(RM) *.pdf
> -       $(RM) *.png
>         $(RM) howto-index.txt howto/*.html doc.dep
>         $(RM) technical/api-*.html technical/api-index.txt
>         $(RM) $(cmds_txt) *.made
> @@ -115,15 +113,7 @@ manpage-base-url.xsl: manpage-base-url.xsl.in
>                 $(ASCIIDOC_EXTRA) -agit_version=$(ELBE_VERSION) -o
> $@+ $< && \
>         mv $@+ $@
>  
> -%.svg : %.dia
> -       $(RM) $@ && \
> -       $(DIA) --export=$@ $<
> -
> -%.png : %.dia
> -       $(RM) $@ && \
> -       $(DIA) --export=$@ $<
> -
> -elbeoverview-en.html : elbeoverview-en.txt elbe-process.png emu-
> process.png
> +elbeoverview-en.html : elbeoverview-en.txt
>         $(ASCIIDOC) -d article -b docbook -
> agit_version=$(ELBE_VERSION) -o elbeoverview-en.xml $< && \
>         pandoc -r docbook -w rst -o article-elbeoverview-en.rst
> elbeoverview-en.xml
>         sed -i "1s/^/************************\n\n/" article-
> elbeoverview-en.rst
> @@ -139,7 +129,7 @@ quickstart.html : quickstart.txt
>         sed -i "1s/^/************************\n/" article-
> quickstart.rst
>         $(ASCIIDOC) -a toc2 $(ASCIIDOC_EXTRA) $(ASCIIDOC_DATA_URI) -b
> xhtml11 quickstart.txt
>  
> -elbeoverview-en-ie.html: elbeoverview-en.txt elbe-process.png emu-
> process.png
> +elbeoverview-en-ie.html: elbeoverview-en.txt
>         $(ASCIIDOC) -d article -b docbook -
> agit_version=$(ELBE_VERSION) -o $*.xml $< && \
>         pandoc -r docbook -w rst -o article-$*.rst $*.xml
>         sed -i "1s/^/************************\n\n/" $*.rst
> diff --git a/docs/elbe-process.dia b/docs/elbe-process.dia
> deleted file mode 100644
> index 52c703328c72..000000000000
> Binary files a/docs/elbe-process.dia and /dev/null differ
> diff --git a/docs/elbe-process.dot b/docs/elbe-process.dot
> new file mode 100644
> index 000000000000..072bb0c0bd43
> --- /dev/null
> +++ b/docs/elbe-process.dot
> @@ -0,0 +1,92 @@
> +digraph {
> +/*
> +       zero_zero [pos="0,0!" style=filled fillcolor=red];
> +       zero_ten [pos="0,10!" style=filled fillcolor=red];
> +       ten_zero [pos="10,0!" style=filled fillcolor=red];
> +       ten_ten [pos="10,10!" style=filled fillcolor=red];
> +*/
> +
> +        build_vm [
> +               label="       build VM" labelloc=t
> +               shape=box style=filled fillcolor=cornflowerblue
> +               width=4 height=7 pos="3.3,5!"
> +       ];
> +        build_vm_installation [
> +               label="build VM installation" labelloc=t
> +               shape=box style=filled fillcolor=lightgrey
> +               width=3 height=2 pos="3,7!"
> +       ];
> +        target_build [
> +               label="target build" labelloc=t
> +               shape=box style=filled fillcolor=lightgrey
> +               width=3.5 height=2 pos="3.3,4.6!"
> +       ];
> +
> +       elbe_mirror_2 [shape="cylinder" label="Elbe mirror"
> pos="0.5,6.2!"];
> +       debian_mirror_1 [shape="cylinder" label="Debian mirror"
> pos="0.5,6.8!"];
> +
> +       debian_mirror_2 [shape="cylinder" label="Debian mirror"
> pos="0.5,3.7!"];
> +       other_repo [shape="cylinder" label="other repo"
> pos="0.5,4.3!"];
> +
> +       xml [label="xml file" shape=box pos="3,10!"];
> +       build_vm_directory [label="build VM directory" shape=box
> pos="3,9!"];
> +       elbe_mirror_1 [label="Elbe mirror" shape="cylinder"
> pos="1,9.5!"];
> +       buildenv_img [label="buildenv.img" shape=box pos="6,6.5!"];
> +
> +
> +       rfs_tgz [label="rfs.tar.gz" shape=box pos="6,4.6!"];
> +       rfs_img [label="rfs.img" shape=box pos="6,4!"];
> +       install_iso [label="install.iso" shape=box pos="6,3.4!"];
> +
> +       connector_xml_build_vm_directory [shape = point width = 0
> pos="3,9.5!"];
> +
> +       xml -> connector_xml_build_vm_directory [arrowhead = none];
> +       elbe_mirror_1 -> connector_xml_build_vm_directory;
> +       connector_xml_build_vm_directory -> build_vm_directory;
> +
> +       subgraph {
> +               style="filled";
> +               fillcolor="lightblue";
> +               label="Build VM";
> +
> +               node [style="filled", fillcolor="white"];
> +
> +
> +               elbe_buildenv [label="elbe-buildenv" shape=box
> pos="3,7.5!"];
> +               debian_installation_1 [label="Debian installation"
> pos="3,6.5!"];
> +
> +               subgraph {
> +                       label="target build";
> +                       style="filled";
> +                       fillcolor="lightgrey";
> +
> +                       pkglist [shape=box pos="2,5!"];
> +                       finetuning [shape=box pos="3,5!"];
> +                       config_archive[label="config archive"
> shape=box pos="4.3,5!"];
> +                       debian_installation_2[label="Debian
> installation" pos="3,4!"];
> +               }
> +
> +               chroot [shape=box pos="3,3!"];
> +               target_chroot [label="target chroot" shape=box
> style=filled fillcolor=lightgrey width=3 height=0.5 pos="3,2!"];
> +       }
> +
> +       build_vm_directory -> build_vm_installation;
> +       build_vm_installation -> target_build;
> +
> +       debian_mirror_1 -> debian_installation_1;
> +       elbe_mirror_2 -> debian_installation_1;
> +       debian_installation_1 -> buildenv_img;
> +       elbe_buildenv -> debian_installation_1;
> +
> +       debian_mirror_2 -> debian_installation_2;
> +       other_repo -> debian_installation_2;
> +       pkglist -> debian_installation_2;
> +       finetuning -> debian_installation_2;
> +       config_archive -> debian_installation_2;
> +       debian_installation_2 -> chroot;
> +       debian_installation_2 -> rfs_tgz;
> +       debian_installation_2 -> rfs_img;
> +       debian_installation_2 -> install_iso;
> +
> +       chroot -> target_chroot;
> +}
> diff --git a/docs/elbeoverview-en.txt b/docs/elbeoverview-en.txt
> index 46e843a330ae..e74e1ab3baa7 100644
> --- a/docs/elbeoverview-en.txt
> +++ b/docs/elbeoverview-en.txt
> @@ -78,13 +78,19 @@ When an xml File is now submitted into the
> initvm, the following happens:
>  
>  This diagram illustrates the complete process:
>  
> -image:elbe-process.png[]
> +["graphviz", "elbe-process.png", "neato"]
> +--------------------------------------------------------------------
> ----------
> +include::elbe-process.dot[]
> +--------------------------------------------------------------------
> ----------
>  
>  The following figure shows the steps performed inside the build VM
> during the
>  build process of the target. The highlighted steps are performed
> inside a
>  chroot environment:
>  
> -image:emu-process.png[]
> +[graphviz]
> +--------------------------------------------------------------------
> ----------
> +include::emu-process.dot[]
> +--------------------------------------------------------------------
> ----------
>  
>  .No automatic startup of services during package installation
>  ********************************************************************
> **********
> diff --git a/docs/emu-process.dia b/docs/emu-process.dia
> deleted file mode 100644
> index 8119c22c52d1..000000000000
> Binary files a/docs/emu-process.dia and /dev/null differ
> diff --git a/docs/emu-process.dot b/docs/emu-process.dot
> new file mode 100644
> index 000000000000..3f0e9920790b
> --- /dev/null
> +++ b/docs/emu-process.dot
> @@ -0,0 +1,18 @@
> +digraph {
> +       node [shape="box"]
> +
> +       debootstrap
> +       pkg [label="package installation" style="filled"
> fillcolor="lightgrey"]
> +       copy
> +       unpack_cfg_1 [label="unpack config archive"]
> +       finetuning
> +       unpack_cfg_2 [label="unpack config archive"]
> +       tar [label="generate tar"]
> +       disk_image [label="generate disk image"]
> +       iso_image [label="generate ISO image(s)"]
> +
> +       debootstrap -> pkg -> copy -> unpack_cfg_1 -> finetuning ->
> unpack_cfg_2
> +       unpack_cfg_2 -> tar
> +       unpack_cfg_2 -> disk_image
> +       unpack_cfg_2 -> iso_image
> +}
> diff --git a/docs/overview.dia b/docs/overview.dia
> deleted file mode 100644
> index 781f0c41201e..000000000000
> Binary files a/docs/overview.dia and /dev/null differ
> 
> ---
> base-commit: 0494866f13a20374514e056391138199803f0060
> change-id: 20240322-dia-a02c1d989771
> 
> Best regards,

-- 
Eduard Krein
Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen
Phone: +49 7556 25 999 19; Fax.: +49 7556 25 999 99

Hinweise zum Datenschutz finden Sie hier (Informations on data privacy 
can be found here): https://linutronix.de/legal/data-protection.php

Linutronix GmbH | Firmensitz (Registered Office): Uhldingen-Mühlhofen |
Registergericht (Registration Court): Amtsgericht Freiburg i.Br.,
HRB700 806 | Geschäftsführer (Managing Directors): Heinz Egger, Thomas
Gleixner, Tiffany Silva, Sean Fennelly, Jeffrey Schneiderman






More information about the elbe-devel mailing list