buildhosts.rst 3.6 KB

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