buildhosts.rst 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. .. _buildhosts:
  2. ==========
  3. Buildhosts
  4. ==========
  5. .. contents::
  6. :depth: 2
  7. :local:
  8. :backlinks: entry
  9. To get best results from build, it's recommend to install additional packages on
  10. build hosts (see :ref:`searxng.sh`).
  11. .. _searxng.sh install buildhost:
  12. Build and Development tools
  13. ===========================
  14. To Install tools used by build and development tasks in once:
  15. .. tabs::
  16. .. group-tab:: SearXNG's development tools
  17. .. code:: sh
  18. $ sudo -H ./utils/searxng.sh install buildhost
  19. This will install packages needed by SearXNG:
  20. .. kernel-include:: $DOCS_BUILD/includes/searxng.rst
  21. :start-after: START distro-packages
  22. :end-before: END distro-packages
  23. and packages needed to build documentation and run tests:
  24. .. kernel-include:: $DOCS_BUILD/includes/searxng.rst
  25. :start-after: START build-packages
  26. :end-before: END build-packages
  27. .. _docs build:
  28. Build docs
  29. ==========
  30. .. _Graphviz: https://graphviz.gitlab.io
  31. .. _ImageMagick: https://www.imagemagick.org
  32. .. _XeTeX: https://tug.org/xetex/
  33. .. _dvisvgm: https://dvisvgm.de/
  34. .. sidebar:: Sphinx build needs
  35. - ImageMagick_
  36. - Graphviz_
  37. - XeTeX_
  38. - dvisvgm_
  39. Most of the sphinx requirements are installed from :origin:`setup.py` and the
  40. docs can be build from scratch with ``make docs.html``. For better math and
  41. image processing additional packages are needed. The XeTeX_ needed not only for
  42. PDF creation, it's also needed for :ref:`math` when HTML output is build.
  43. To be able to do :ref:`sphinx:math-support` without CDNs, the math are rendered
  44. as images (``sphinx.ext.imgmath`` extension).
  45. Here is the extract from the :origin:`docs/conf.py` file, setting math renderer
  46. to ``imgmath``:
  47. .. literalinclude:: ../conf.py
  48. :language: python
  49. :start-after: # sphinx.ext.imgmath setup
  50. :end-before: # sphinx.ext.imgmath setup END
  51. If your docs build (``make docs.html``) shows warnings like this::
  52. WARNING: dot(1) not found, for better output quality install \
  53. graphviz from https://www.graphviz.org
  54. ..
  55. WARNING: LaTeX command 'latex' cannot be run (needed for math \
  56. display), check the imgmath_latex setting
  57. you need to install additional packages on your build host, to get better HTML
  58. output (:ref:`install buildhost <searxng.sh install buildhost>`).
  59. .. tabs::
  60. .. group-tab:: Ubuntu / debian
  61. .. code-block:: sh
  62. $ sudo apt install graphviz imagemagick texlive-xetex librsvg2-bin
  63. .. group-tab:: Arch Linux
  64. .. code-block:: sh
  65. $ sudo pacman -S graphviz imagemagick texlive-bin extra/librsvg
  66. .. group-tab:: Fedora / RHEL
  67. .. code-block:: sh
  68. $ sudo dnf install graphviz graphviz-gd ImageMagick texlive-xetex-bin librsvg2-tools
  69. For PDF output you also need:
  70. .. tabs::
  71. .. group-tab:: Ubuntu / debian
  72. .. code:: sh
  73. $ sudo apt texlive-latex-recommended texlive-extra-utils ttf-dejavu
  74. .. group-tab:: Arch Linux
  75. .. code:: sh
  76. $ sudo pacman -S texlive-core texlive-latexextra ttf-dejavu
  77. .. group-tab:: Fedora / RHEL
  78. .. code:: sh
  79. $ sudo dnf install \
  80. texlive-collection-fontsrecommended texlive-collection-latex \
  81. dejavu-sans-fonts dejavu-serif-fonts dejavu-sans-mono-fonts
  82. .. _sh lint:
  83. Lint shell scripts
  84. ==================
  85. .. _ShellCheck: https://github.com/koalaman/shellcheck
  86. To lint shell scripts we use ShellCheck_ - a shell script static analysis tool
  87. (:ref:`install buildhost <searxng.sh install buildhost>`).
  88. .. SNIP sh lint requirements
  89. .. tabs::
  90. .. group-tab:: Ubuntu / debian
  91. .. code-block:: sh
  92. $ sudo apt install shellcheck
  93. .. group-tab:: Arch Linux
  94. .. code-block:: sh
  95. $ sudo pacman -S shellcheck
  96. .. group-tab:: Fedora / RHEL
  97. .. code-block:: sh
  98. $ sudo dnf install ShellCheck
  99. .. SNAP sh lint requirements