2019-12-28 00:25:16 +00:00
|
|
|
.. _buildhosts:
|
|
|
|
|
|
|
|
==========
|
|
|
|
Buildhosts
|
|
|
|
==========
|
|
|
|
|
2023-06-30 16:07:02 +00:00
|
|
|
.. contents::
|
2020-02-04 15:42:13 +00:00
|
|
|
:depth: 2
|
|
|
|
:local:
|
|
|
|
:backlinks: entry
|
2019-12-28 00:25:16 +00:00
|
|
|
|
2023-08-06 14:39:00 +00:00
|
|
|
To get best results from build, it's recommend to install additional packages on
|
|
|
|
build hosts (see :ref:`searxng.sh`).
|
|
|
|
|
|
|
|
.. _searxng.sh install buildhost:
|
|
|
|
|
|
|
|
Build and Development tools
|
|
|
|
===========================
|
|
|
|
|
|
|
|
To Install tools used by build and development tasks in once:
|
|
|
|
|
|
|
|
.. tabs::
|
|
|
|
|
|
|
|
.. group-tab:: SearXNG's development tools
|
|
|
|
|
|
|
|
.. code:: sh
|
2020-03-31 16:25:40 +00:00
|
|
|
|
2023-08-06 14:39:00 +00:00
|
|
|
$ sudo -H ./utils/searxng.sh install buildhost
|
2020-03-31 16:25:40 +00:00
|
|
|
|
2023-08-06 14:39:00 +00:00
|
|
|
This will install packages needed by SearXNG:
|
2020-03-31 16:25:40 +00:00
|
|
|
|
2022-06-14 08:02:50 +00:00
|
|
|
.. kernel-include:: $DOCS_BUILD/includes/searxng.rst
|
2020-03-31 16:25:40 +00:00
|
|
|
:start-after: START distro-packages
|
|
|
|
:end-before: END distro-packages
|
|
|
|
|
2023-08-11 14:01:54 +00:00
|
|
|
and packages needed to build documentation and run tests:
|
2020-03-31 16:25:40 +00:00
|
|
|
|
2022-06-14 08:02:50 +00:00
|
|
|
.. kernel-include:: $DOCS_BUILD/includes/searxng.rst
|
2020-03-31 16:25:40 +00:00
|
|
|
:start-after: START build-packages
|
|
|
|
:end-before: END build-packages
|
|
|
|
|
2019-12-28 00:25:16 +00:00
|
|
|
.. _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 the
|
2021-04-18 10:12:03 +00:00
|
|
|
docs can be build from scratch with ``make docs.html``. For better math and
|
|
|
|
image processing additional packages are needed. The XeTeX_ needed not only for
|
2023-04-20 01:39:03 +00:00
|
|
|
PDF creation, it's also needed for :ref:`math` when HTML output is build.
|
2019-12-28 00:25:16 +00:00
|
|
|
|
|
|
|
To be able to do :ref:`sphinx:math-support` without CDNs, the math are rendered
|
2020-01-08 17:09:36 +00:00
|
|
|
as images (``sphinx.ext.imgmath`` extension).
|
|
|
|
|
|
|
|
Here is the extract from the :origin:`docs/conf.py` file, setting math renderer
|
|
|
|
to ``imgmath``:
|
|
|
|
|
|
|
|
.. literalinclude:: ../conf.py
|
|
|
|
:language: python
|
|
|
|
:start-after: # sphinx.ext.imgmath setup
|
|
|
|
:end-before: # sphinx.ext.imgmath setup END
|
|
|
|
|
2021-04-18 10:12:03 +00:00
|
|
|
If your docs build (``make docs.html``) shows warnings like this::
|
2019-12-28 00:25:16 +00:00
|
|
|
|
|
|
|
WARNING: dot(1) not found, for better output quality install \
|
2020-12-04 15:50:26 +00:00
|
|
|
graphviz from https://www.graphviz.org
|
2019-12-28 00:25:16 +00:00
|
|
|
..
|
|
|
|
WARNING: LaTeX command 'latex' cannot be run (needed for math \
|
|
|
|
display), check the imgmath_latex setting
|
|
|
|
|
|
|
|
you need to install additional packages on your build host, to get better HTML
|
2023-08-06 14:39:00 +00:00
|
|
|
output (:ref:`install buildhost <searxng.sh install buildhost>`).
|
2019-12-28 00:25:16 +00:00
|
|
|
|
|
|
|
.. 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
|
|
|
|
|
2023-08-06 14:39:00 +00:00
|
|
|
$ sudo dnf install graphviz graphviz-gd ImageMagick texlive-xetex-bin librsvg2-tools
|
2019-12-28 00:25:16 +00:00
|
|
|
|
|
|
|
|
|
|
|
For 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 \
|
2023-08-06 14:39:00 +00:00
|
|
|
texlive-collection-fontsrecommended texlive-collection-latex \
|
|
|
|
dejavu-sans-fonts dejavu-serif-fonts dejavu-sans-mono-fonts
|
2019-12-28 00:25:16 +00:00
|
|
|
|
2020-01-08 17:09:36 +00:00
|
|
|
.. _sh lint:
|
2019-12-28 00:25:16 +00:00
|
|
|
|
2020-01-08 17:09:36 +00:00
|
|
|
Lint shell scripts
|
|
|
|
==================
|
|
|
|
|
|
|
|
.. _ShellCheck: https://github.com/koalaman/shellcheck
|
|
|
|
|
2023-08-06 14:39:00 +00:00
|
|
|
To lint shell scripts we use ShellCheck_ - a shell script static analysis tool
|
|
|
|
(:ref:`install buildhost <searxng.sh install buildhost>`).
|
2020-01-08 17:09:36 +00:00
|
|
|
|
|
|
|
.. 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
|
2019-12-28 00:25:16 +00:00
|
|
|
|
2020-01-08 17:09:36 +00:00
|
|
|
.. SNAP sh lint requirements
|