| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155 | .. _buildhosts:==========Buildhosts==========.. sidebar:: This article needs some work   If you have any contribution send us your :pull:`PR <../pulls>`, see   :ref:`how to contribute`... contents:: Contents   :depth: 2   :local:   :backlinks: entryTo get best results from build, its recommend to install additional packageson build hosts (see :ref:`searxng.sh`).::  sudo -H ./utils/searxng.sh install buildhostThis will install packages needed by searx:.. kernel-include:: $DOCS_BUILD/includes/searxng.rst   :start-after: START distro-packages   :end-before: END distro-packagesand packages needed to build docuemtation and run tests:.. kernel-include:: $DOCS_BUILD/includes/searxng.rst   :start-after: START build-packages   :end-before: END build-packages.. _docs build:Build docs==========.. _Graphviz: https://graphviz.gitlab.io.. _ImageMagick: https://www.imagemagick.org.. _XeTeX: https://tug.org/xetex/.. _dvisvgm: https://dvisvgm.de/.. sidebar:: Sphinx build needs   - ImageMagick_   - Graphviz_   - XeTeX_   - dvisvgm_Most of the sphinx requirements are installed from :origin:`setup.py` and thedocs can be build from scratch with ``make docs.html``.  For better math andimage processing additional packages are needed.  The XeTeX_ needed not only forPDF creation, its also needed for :ref:`math` when HTML output is build.To be able to do :ref:`sphinx:math-support` without CDNs, the math are renderedas images (``sphinx.ext.imgmath`` extension).Here is the extract from the :origin:`docs/conf.py` file, setting math rendererto ``imgmath``:.. literalinclude:: ../conf.py   :language: python   :start-after: # sphinx.ext.imgmath setup   :end-before: # sphinx.ext.imgmath setup ENDIf your docs build (``make docs.html``) shows warnings like this::   WARNING: dot(1) not found, for better output quality install \            graphviz from https://www.graphviz.org   ..   WARNING: LaTeX command 'latex' cannot be run (needed for math \            display), check the imgmath_latex settingyou need to install additional packages on your build host, to get better HTMLoutput... tabs::   .. group-tab:: Ubuntu / debian      .. code-block:: sh         $ sudo apt install graphviz imagemagick texlive-xetex librsvg2-bin   .. group-tab:: Arch Linux      .. code-block:: sh         $ sudo pacman -S graphviz imagemagick texlive-bin extra/librsvg   .. group-tab::  Fedora / RHEL      .. code-block:: sh         $ sudo dnf install graphviz graphviz-gd texlive-xetex-bin librsvg2-toolsFor PDF output you also need:.. tabs::   .. group-tab:: Ubuntu / debian      .. code:: sh         $ sudo apt texlive-latex-recommended texlive-extra-utils ttf-dejavu   .. group-tab:: Arch Linux      .. code:: sh      	 $ sudo pacman -S texlive-core texlive-latexextra ttf-dejavu   .. group-tab::  Fedora / RHEL      .. code:: sh      	 $ sudo dnf install \	        texlive-collection-fontsrecommended texlive-collection-latex \		dejavu-sans-fonts dejavu-serif-fonts dejavu-sans-mono-fonts \		ImageMagick.. _sh lint:Lint shell scripts==================.. _ShellCheck: https://github.com/koalaman/shellcheckTo lint shell scripts, we use ShellCheck_ - A shell script static analysis tool... SNIP sh lint requirements.. tabs::   .. group-tab:: Ubuntu / debian      .. code-block:: sh         $ sudo apt install shellcheck   .. group-tab:: Arch Linux      .. code-block:: sh         $ sudo pacman -S shellcheck   .. group-tab::  Fedora / RHEL      .. code-block:: sh         $ sudo dnf install ShellCheck.. SNAP sh lint requirements
 |