buildhosts.html 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  6. <meta name="viewport" content="width=device-width, initial-scale=1">
  7. <title>Buildhosts &#8212; Searx Documentation (Searx-1.1.0.tex)</title>
  8. <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
  9. <link rel="stylesheet" type="text/css" href="../_static/searx.css" />
  10. <link rel="stylesheet" type="text/css" href="../_static/tabs.css" />
  11. <script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
  12. <script src="../_static/jquery.js"></script>
  13. <script src="../_static/underscore.js"></script>
  14. <script src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
  15. <script src="../_static/doctools.js"></script>
  16. <script src="../_static/sphinx_highlight.js"></script>
  17. <script src="../_static/tabs.js"></script>
  18. <link rel="index" title="Index" href="../genindex.html" />
  19. <link rel="search" title="Search" href="../search.html" />
  20. <link rel="next" title="Developer documentation" href="../dev/index.html" />
  21. <link rel="prev" title="Plugins builtin" href="plugins.html" />
  22. </head><body>
  23. <div class="related" role="navigation" aria-label="related navigation">
  24. <h3>Navigation</h3>
  25. <ul>
  26. <li class="right" style="margin-right: 10px">
  27. <a href="../genindex.html" title="General Index"
  28. accesskey="I">index</a></li>
  29. <li class="right" >
  30. <a href="../py-modindex.html" title="Python Module Index"
  31. >modules</a> |</li>
  32. <li class="right" >
  33. <a href="../dev/index.html" title="Developer documentation"
  34. accesskey="N">next</a> |</li>
  35. <li class="right" >
  36. <a href="plugins.html" title="Plugins builtin"
  37. accesskey="P">previous</a> |</li>
  38. <li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-1.1.0.tex)</a> &#187;</li>
  39. <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Administrator documentation</a> &#187;</li>
  40. <li class="nav-item nav-item-this"><a href="">Buildhosts</a></li>
  41. </ul>
  42. </div>
  43. <div class="document">
  44. <div class="documentwrapper">
  45. <div class="bodywrapper">
  46. <div class="body" role="main">
  47. <section id="buildhosts">
  48. <span id="id1"></span><h1>Buildhosts<a class="headerlink" href="#buildhosts" title="Permalink to this heading">¶</a></h1>
  49. <aside class="sidebar">
  50. <p class="sidebar-title">This article needs some work</p>
  51. <p>If you have any contribution send us your <a class="reference external" href="https://github.com/searx/searx/pull/../pulls">PR</a>, see
  52. <a class="reference internal" href="../dev/contribution_guide.html#how-to-contribute"><span class="std std-ref">How to contribute</span></a>.</p>
  53. </aside>
  54. <nav class="contents local" id="contents">
  55. <p class="topic-title">Contents</p>
  56. <ul class="simple">
  57. <li><p><a class="reference internal" href="#build-docs" id="id2">Build docs</a></p></li>
  58. <li><p><a class="reference internal" href="#lint-shell-scripts" id="id3">Lint shell scripts</a></p></li>
  59. </ul>
  60. </nav>
  61. <p>To get best results from build, its recommend to install additional packages
  62. on build hosts (see <a class="reference internal" href="../utils/searx.sh.html#searx-sh"><span class="std std-ref">utils/searx.sh</span></a>).:</p>
  63. <div class="highlight-none notranslate"><div class="highlight"><pre><span></span>sudo -H ./utils/searx.sh install buildhost
  64. </pre></div>
  65. </div>
  66. <p>This will install packages needed by searx:</p>
  67. <div class="sphinx-tabs docutils container">
  68. <div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-0-VWJ1bnR1IC8gZGViaWFu" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-0-VWJ1bnR1IC8gZGViaWFu" name="VWJ1bnR1IC8gZGViaWFu" role="tab" tabindex="0">Ubuntu / debian</button><button aria-controls="panel-0-QXJjaCBMaW51eA==" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-0-QXJjaCBMaW51eA==" name="QXJjaCBMaW51eA==" role="tab" tabindex="-1">Arch Linux</button><button aria-controls="panel-0-RmVkb3JhIC8gUkhFTA==" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-0-RmVkb3JhIC8gUkhFTA==" name="RmVkb3JhIC8gUkhFTA==" role="tab" tabindex="-1">Fedora / RHEL</button></div><div aria-labelledby="tab-0-VWJ1bnR1IC8gZGViaWFu" class="sphinx-tabs-panel group-tab" id="panel-0-VWJ1bnR1IC8gZGViaWFu" name="VWJ1bnR1IC8gZGViaWFu" role="tabpanel" tabindex="0"><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo -H apt-get install -y <span class="se">\</span>
  69. python3-dev python3-babel python3-venv <span class="se">\</span>
  70. uwsgi uwsgi-plugin-python3 <span class="se">\</span>
  71. git build-essential libxslt-dev zlib1g-dev libffi-dev libssl-dev <span class="se">\</span>
  72. shellcheck
  73. </pre></div>
  74. </div>
  75. </div><div aria-labelledby="tab-0-QXJjaCBMaW51eA==" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-0-QXJjaCBMaW51eA==" name="QXJjaCBMaW51eA==" role="tabpanel" tabindex="0"><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo -H pacman -S --noconfirm <span class="se">\</span>
  76. python python-pip python-lxml python-babel <span class="se">\</span>
  77. uwsgi uwsgi-plugin-python <span class="se">\</span>
  78. git base-devel libxml2 <span class="se">\</span>
  79. shellcheck
  80. </pre></div>
  81. </div>
  82. </div><div aria-labelledby="tab-0-RmVkb3JhIC8gUkhFTA==" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-0-RmVkb3JhIC8gUkhFTA==" name="RmVkb3JhIC8gUkhFTA==" role="tabpanel" tabindex="0"><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo -H dnf install -y <span class="se">\</span>
  83. python python-pip python-lxml python-babel <span class="se">\</span>
  84. uwsgi uwsgi-plugin-python3 <span class="se">\</span>
  85. git @development-tools libxml2 <span class="se">\</span>
  86. ShellCheck
  87. </pre></div>
  88. </div>
  89. </div></div>
  90. <p>and packages needed to build docuemtation and run tests:</p>
  91. <div class="sphinx-tabs docutils container">
  92. <div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-1-VWJ1bnR1IC8gZGViaWFu" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-1-VWJ1bnR1IC8gZGViaWFu" name="VWJ1bnR1IC8gZGViaWFu" role="tab" tabindex="0">Ubuntu / debian</button><button aria-controls="panel-1-QXJjaCBMaW51eA==" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-1-QXJjaCBMaW51eA==" name="QXJjaCBMaW51eA==" role="tab" tabindex="-1">Arch Linux</button><button aria-controls="panel-1-RmVkb3JhIC8gUkhFTA==" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-1-RmVkb3JhIC8gUkhFTA==" name="RmVkb3JhIC8gUkhFTA==" role="tab" tabindex="-1">Fedora / RHEL</button></div><div aria-labelledby="tab-1-VWJ1bnR1IC8gZGViaWFu" class="sphinx-tabs-panel group-tab" id="panel-1-VWJ1bnR1IC8gZGViaWFu" name="VWJ1bnR1IC8gZGViaWFu" role="tabpanel" tabindex="0"><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo -H apt-get install -y <span class="se">\</span>
  93. firefox graphviz imagemagick texlive-xetex librsvg2-bin <span class="se">\</span>
  94. texlive-latex-recommended texlive-extra-utils fonts-dejavu <span class="se">\</span>
  95. latexmk
  96. </pre></div>
  97. </div>
  98. </div><div aria-labelledby="tab-1-QXJjaCBMaW51eA==" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-1-QXJjaCBMaW51eA==" name="QXJjaCBMaW51eA==" role="tabpanel" tabindex="0"><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo -H pacman -S --noconfirm <span class="se">\</span>
  99. firefox graphviz imagemagick texlive-bin extra/librsvg <span class="se">\</span>
  100. texlive-core texlive-latexextra ttf-dejavu
  101. </pre></div>
  102. </div>
  103. </div><div aria-labelledby="tab-1-RmVkb3JhIC8gUkhFTA==" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-1-RmVkb3JhIC8gUkhFTA==" name="RmVkb3JhIC8gUkhFTA==" role="tabpanel" tabindex="0"><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo -H dnf install -y <span class="se">\</span>
  104. firefox graphviz graphviz-gd ImageMagick librsvg2-tools <span class="se">\</span>
  105. texlive-xetex-bin texlive-collection-fontsrecommended <span class="se">\</span>
  106. texlive-collection-latex dejavu-sans-fonts dejavu-serif-fonts <span class="se">\</span>
  107. dejavu-sans-mono-fonts
  108. </pre></div>
  109. </div>
  110. </div></div>
  111. <section id="build-docs">
  112. <span id="docs-build"></span><h2><a class="toc-backref" href="#id2" role="doc-backlink">Build docs</a><a class="headerlink" href="#build-docs" title="Permalink to this heading">¶</a></h2>
  113. <aside class="sidebar">
  114. <p class="sidebar-title">Sphinx build needs</p>
  115. <ul class="simple">
  116. <li><p><a class="reference external" href="https://www.imagemagick.org">ImageMagick</a></p></li>
  117. <li><p><a class="reference external" href="https://graphviz.gitlab.io">Graphviz</a></p></li>
  118. <li><p><a class="reference external" href="https://tug.org/xetex/">XeTeX</a></p></li>
  119. <li><p><a class="reference external" href="https://dvisvgm.de/">dvisvgm</a></p></li>
  120. </ul>
  121. </aside>
  122. <p>Most of the sphinx requirements are installed from <a class="reference external" href="https://github.com/searx/searx/blob/master/setup.py">Origin: setup.py</a> and the
  123. docs can be build from scratch with <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">docs.html</span></code>. For better math and
  124. image processing additional packages are needed. The <a class="reference external" href="https://tug.org/xetex/">XeTeX</a> needed not only for
  125. PDF creation, its also needed for <a class="reference internal" href="../dev/reST.html#math"><span class="std std-ref">Math equations</span></a> when HTML output is build.</p>
  126. <p>To be able to do <a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/extensions/math.html#math-support" title="(in Sphinx v6.2.0)"><span>Math support for HTML outputs in Sphinx</span></a> without CDNs, the math are rendered
  127. as images (<code class="docutils literal notranslate"><span class="pre">sphinx.ext.imgmath</span></code> extension).</p>
  128. <p>Here is the extract from the <a class="reference external" href="https://github.com/searx/searx/blob/master/docs/conf.py">Origin: docs/conf.py</a> file, setting math renderer
  129. to <code class="docutils literal notranslate"><span class="pre">imgmath</span></code>:</p>
  130. <div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">html_math_renderer</span> <span class="o">=</span> <span class="s1">&#39;imgmath&#39;</span>
  131. <span class="n">imgmath_image_format</span> <span class="o">=</span> <span class="s1">&#39;svg&#39;</span>
  132. <span class="n">imgmath_font_size</span> <span class="o">=</span> <span class="mi">14</span>
  133. </pre></div>
  134. </div>
  135. <p>If your docs build (<code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">docs.html</span></code>) shows warnings like this:</p>
  136. <div class="highlight-none notranslate"><div class="highlight"><pre><span></span>WARNING: dot(1) not found, for better output quality install \
  137. graphviz from https://www.graphviz.org
  138. ..
  139. WARNING: LaTeX command &#39;latex&#39; cannot be run (needed for math \
  140. display), check the imgmath_latex setting
  141. </pre></div>
  142. </div>
  143. <p>you need to install additional packages on your build host, to get better HTML
  144. output.</p>
  145. <div class="sphinx-tabs docutils container">
  146. <div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-2-VWJ1bnR1IC8gZGViaWFu" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-2-VWJ1bnR1IC8gZGViaWFu" name="VWJ1bnR1IC8gZGViaWFu" role="tab" tabindex="0">Ubuntu / debian</button><button aria-controls="panel-2-QXJjaCBMaW51eA==" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-2-QXJjaCBMaW51eA==" name="QXJjaCBMaW51eA==" role="tab" tabindex="-1">Arch Linux</button><button aria-controls="panel-2-RmVkb3JhIC8gUkhFTA==" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-2-RmVkb3JhIC8gUkhFTA==" name="RmVkb3JhIC8gUkhFTA==" role="tab" tabindex="-1">Fedora / RHEL</button></div><div aria-labelledby="tab-2-VWJ1bnR1IC8gZGViaWFu" class="sphinx-tabs-panel group-tab" id="panel-2-VWJ1bnR1IC8gZGViaWFu" name="VWJ1bnR1IC8gZGViaWFu" role="tabpanel" tabindex="0"><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo apt install graphviz imagemagick texlive-xetex librsvg2-bin
  147. </pre></div>
  148. </div>
  149. </div><div aria-labelledby="tab-2-QXJjaCBMaW51eA==" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-2-QXJjaCBMaW51eA==" name="QXJjaCBMaW51eA==" role="tabpanel" tabindex="0"><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo pacman -S graphviz imagemagick texlive-bin extra/librsvg
  150. </pre></div>
  151. </div>
  152. </div><div aria-labelledby="tab-2-RmVkb3JhIC8gUkhFTA==" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-2-RmVkb3JhIC8gUkhFTA==" name="RmVkb3JhIC8gUkhFTA==" role="tabpanel" tabindex="0"><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo dnf install graphviz graphviz-gd texlive-xetex-bin librsvg2-tools
  153. </pre></div>
  154. </div>
  155. </div></div>
  156. <p>For PDF output you also need:</p>
  157. <div class="sphinx-tabs docutils container">
  158. <div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-3-VWJ1bnR1IC8gZGViaWFu" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-3-VWJ1bnR1IC8gZGViaWFu" name="VWJ1bnR1IC8gZGViaWFu" role="tab" tabindex="0">Ubuntu / debian</button><button aria-controls="panel-3-QXJjaCBMaW51eA==" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-3-QXJjaCBMaW51eA==" name="QXJjaCBMaW51eA==" role="tab" tabindex="-1">Arch Linux</button><button aria-controls="panel-3-RmVkb3JhIC8gUkhFTA==" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-3-RmVkb3JhIC8gUkhFTA==" name="RmVkb3JhIC8gUkhFTA==" role="tab" tabindex="-1">Fedora / RHEL</button></div><div aria-labelledby="tab-3-VWJ1bnR1IC8gZGViaWFu" class="sphinx-tabs-panel group-tab" id="panel-3-VWJ1bnR1IC8gZGViaWFu" name="VWJ1bnR1IC8gZGViaWFu" role="tabpanel" tabindex="0"><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo apt texlive-latex-recommended texlive-extra-utils ttf-dejavu
  159. </pre></div>
  160. </div>
  161. </div><div aria-labelledby="tab-3-QXJjaCBMaW51eA==" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-3-QXJjaCBMaW51eA==" name="QXJjaCBMaW51eA==" role="tabpanel" tabindex="0"><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo pacman -S texlive-core texlive-latexextra ttf-dejavu
  162. </pre></div>
  163. </div>
  164. </div><div aria-labelledby="tab-3-RmVkb3JhIC8gUkhFTA==" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-3-RmVkb3JhIC8gUkhFTA==" name="RmVkb3JhIC8gUkhFTA==" role="tabpanel" tabindex="0"><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo dnf install <span class="se">\</span>
  165. texlive-collection-fontsrecommended texlive-collection-latex <span class="se">\</span>
  166. dejavu-sans-fonts dejavu-serif-fonts dejavu-sans-mono-fonts <span class="se">\</span>
  167. ImageMagick
  168. </pre></div>
  169. </div>
  170. </div></div>
  171. </section>
  172. <section id="lint-shell-scripts">
  173. <span id="sh-lint"></span><h2><a class="toc-backref" href="#id3" role="doc-backlink">Lint shell scripts</a><a class="headerlink" href="#lint-shell-scripts" title="Permalink to this heading">¶</a></h2>
  174. <p>To lint shell scripts, we use <a class="reference external" href="https://github.com/koalaman/shellcheck">ShellCheck</a> - A shell script static analysis tool.</p>
  175. <div class="sphinx-tabs docutils container">
  176. <div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-4-VWJ1bnR1IC8gZGViaWFu" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-4-VWJ1bnR1IC8gZGViaWFu" name="VWJ1bnR1IC8gZGViaWFu" role="tab" tabindex="0">Ubuntu / debian</button><button aria-controls="panel-4-QXJjaCBMaW51eA==" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-4-QXJjaCBMaW51eA==" name="QXJjaCBMaW51eA==" role="tab" tabindex="-1">Arch Linux</button><button aria-controls="panel-4-RmVkb3JhIC8gUkhFTA==" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-4-RmVkb3JhIC8gUkhFTA==" name="RmVkb3JhIC8gUkhFTA==" role="tab" tabindex="-1">Fedora / RHEL</button></div><div aria-labelledby="tab-4-VWJ1bnR1IC8gZGViaWFu" class="sphinx-tabs-panel group-tab" id="panel-4-VWJ1bnR1IC8gZGViaWFu" name="VWJ1bnR1IC8gZGViaWFu" role="tabpanel" tabindex="0"><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo apt install shellcheck
  177. </pre></div>
  178. </div>
  179. </div><div aria-labelledby="tab-4-QXJjaCBMaW51eA==" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-4-QXJjaCBMaW51eA==" name="QXJjaCBMaW51eA==" role="tabpanel" tabindex="0"><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo pacman -S shellcheck
  180. </pre></div>
  181. </div>
  182. </div><div aria-labelledby="tab-4-RmVkb3JhIC8gUkhFTA==" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-4-RmVkb3JhIC8gUkhFTA==" name="RmVkb3JhIC8gUkhFTA==" role="tabpanel" tabindex="0"><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo dnf install ShellCheck
  183. </pre></div>
  184. </div>
  185. </div></div>
  186. </section>
  187. </section>
  188. <div class="clearer"></div>
  189. </div>
  190. </div>
  191. </div>
  192. <span id="sidebar-top"></span>
  193. <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
  194. <div class="sphinxsidebarwrapper">
  195. <p class="logo"><a href="../index.html">
  196. <img class="logo" src="../_static/searx_logo_small.png" alt="Logo"/>
  197. </a></p>
  198. <h3>Project Links</h3>
  199. <ul>
  200. <li><a href="https://searx.github.io/searx/blog/index.html">Blog</a>
  201. <li><a href="https://github.com/searx/searx">Source</a>
  202. <li><a href="https://github.com/searx/searx/wiki">Wiki</a>
  203. <li><a href="https://twitter.com/Searx_engine">Twitter</a>
  204. <li><a href="https://github.com/searx/searx/issues">Issue Tracker</a>
  205. </ul><h3>Navigation</h3>
  206. <ul>
  207. <li><a href="../index.html">Overview</a>
  208. <ul>
  209. <li><a href="index.html">Administrator documentation</a>
  210. <ul>
  211. <li>Previous: <a href="plugins.html" title="previous chapter">Plugins builtin</a>
  212. <li>Next: <a href="../dev/index.html" title="next chapter">Developer documentation</a></ul>
  213. </li>
  214. </ul>
  215. </li>
  216. </ul>
  217. <div id="searchbox" style="display: none" role="search">
  218. <h3 id="searchlabel">Quick search</h3>
  219. <div class="searchformwrapper">
  220. <form class="search" action="../search.html" method="get">
  221. <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
  222. <input type="submit" value="Go" />
  223. </form>
  224. </div>
  225. </div>
  226. <script>document.getElementById('searchbox').style.display = "block"</script>
  227. </div>
  228. </div>
  229. <div class="clearer"></div>
  230. </div>
  231. <div class="footer" role="contentinfo">
  232. &#169; Copyright 2015-2022, Adam Tauber, Noémi Ványi.
  233. Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
  234. </div>
  235. <script src="../_static/version_warning_offset.js"></script>
  236. </body>
  237. </html>