searx/admin/buildhosts.html

364 lines
17 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Buildhosts &#8212; Searx Documentation (Searx-0.16.0.tex)</title>
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../_static/sphinx_tabs/semantic-ui-2.4.1/segment.min.css" />
<link rel="stylesheet" type="text/css" href="../_static/sphinx_tabs/semantic-ui-2.4.1/menu.min.css" />
<link rel="stylesheet" type="text/css" href="../_static/sphinx_tabs/semantic-ui-2.4.1/tab.min.css" />
<link rel="stylesheet" type="text/css" href="../_static/sphinx_tabs/tabs.css" />
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/language_data.js"></script>
<script src="../_static/sphinx_tabs/semantic-ui-2.4.1/tab.min.js"></script>
<script src="../_static/sphinx_tabs/tabs.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Developer documentation" href="../dev/index.html" />
<link rel="prev" title="Plugins builtin" href="plugins.html" />
<script>DOCUMENTATION_OPTIONS.URL_ROOT = '../';</script>
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../dev/index.html" title="Developer documentation"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="plugins.html" title="Plugins builtin"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.16.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Administrator documentation</a> &#187;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="buildhosts">
<span id="id1"></span><h1>Buildhosts<a class="headerlink" href="#buildhosts" title="Permalink to this headline"></a></h1>
<div class="sidebar">
<p class="sidebar-title">This article needs some work</p>
<p>If you have any contribution send us your <a class="reference external" href="https://github.com/asciimoo/searx/pull/../pulls">PR</a>, see
<a class="reference internal" href="../dev/contribution_guide.html#how-to-contribute"><span class="std std-ref">How to contribute</span></a>.</p>
</div>
<div class="contents local topic" id="contents">
<p class="topic-title">Contents</p>
<ul class="simple">
<li><p><a class="reference internal" href="#build-docs" id="id2">Build docs</a></p></li>
<li><p><a class="reference internal" href="#lint-shell-scripts" id="id3">Lint shell scripts</a></p></li>
</ul>
</div>
<p>To get best results from build, its recommend to install additional packages
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>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>sudo -H ./utils/searx.sh buildhost
</pre></div>
</div>
<p>This will install packages needed by searx:</p>
<div class="sphinx-tabs docutils container">
<div class="ui top attached tabular menu sphinx-menu docutils container">
<div class="active item sphinx-data-tab-VWJ1bnR1IC8gZGViaWFu docutils container">
<div class="docutils container">
<p>Ubuntu / debian</p>
</div>
</div>
<div class="item sphinx-data-tab-QXJjaCBMaW51eA== docutils container">
<div class="docutils container">
<p>Arch Linux</p>
</div>
</div>
<div class="item sphinx-data-tab-RmVkb3JhIC8gUkhFTA== docutils container">
<div class="docutils container">
<p>Fedora / RHEL</p>
</div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-VWJ1bnR1IC8gZGViaWFu active docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo -H apt-get install -y <span class="se">\</span>
virtualenv python3-dev python3-babel python3-venv <span class="se">\</span>
uwsgi uwsgi-plugin-python3 <span class="se">\</span>
git build-essential libxslt-dev zlib1g-dev libffi-dev libssl-dev <span class="se">\</span>
shellcheck
</pre></div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-QXJjaCBMaW51eA== docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo -H pacman -S --noconfirm <span class="se">\</span>
python-virtualenv python python-pip python-lxml python-babel <span class="se">\</span>
uwsgi uwsgi-plugin-python <span class="se">\</span>
git base-devel libxml2 <span class="se">\</span>
shellcheck
</pre></div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-RmVkb3JhIC8gUkhFTA== docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo -H dnf install -y <span class="se">\</span>
virtualenv python python-pip python-lxml python-babel <span class="se">\</span>
uwsgi uwsgi-plugin-python3 <span class="se">\</span>
git @development-tools libxml2 <span class="se">\</span>
ShellCheck
</pre></div>
</div>
</div>
</div>
<p>and packages needed to build docuemtation and run tests:</p>
<div class="sphinx-tabs docutils container">
<div class="ui top attached tabular menu sphinx-menu docutils container">
<div class="active item sphinx-data-tab-VWJ1bnR1IC8gZGViaWFu docutils container">
<div class="docutils container">
<p>Ubuntu / debian</p>
</div>
</div>
<div class="item sphinx-data-tab-QXJjaCBMaW51eA== docutils container">
<div class="docutils container">
<p>Arch Linux</p>
</div>
</div>
<div class="item sphinx-data-tab-RmVkb3JhIC8gUkhFTA== docutils container">
<div class="docutils container">
<p>Fedora / RHEL</p>
</div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-VWJ1bnR1IC8gZGViaWFu active docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo -H apt-get install -y <span class="se">\</span>
firefox graphviz imagemagick texlive-xetex librsvg2-bin <span class="se">\</span>
texlive-latex-recommended texlive-extra-utils ttf-dejavu
</pre></div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-QXJjaCBMaW51eA== docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo -H pacman -S --noconfirm <span class="se">\</span>
firefox graphviz imagemagick texlive-bin extra/librsvg <span class="se">\</span>
texlive-core texlive-latexextra ttf-dejavu
</pre></div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-RmVkb3JhIC8gUkhFTA== docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo -H dnf install -y <span class="se">\</span>
firefox graphviz graphviz-gd ImageMagick librsvg2-tools <span class="se">\</span>
texlive-xetex-bin texlive-collection-fontsrecommended <span class="se">\</span>
texlive-collection-latex dejavu-sans-fonts dejavu-serif-fonts <span class="se">\</span>
dejavu-sans-mono-fonts
</pre></div>
</div>
</div>
</div>
<div class="section" id="build-docs">
<span id="docs-build"></span><h2><a class="toc-backref" href="#id2">Build docs</a><a class="headerlink" href="#build-docs" title="Permalink to this headline"></a></h2>
<div class="sidebar">
<p class="sidebar-title">Sphinx build needs</p>
<ul class="simple">
<li><p><a class="reference external" href="https://www.imagemagick.org">ImageMagick</a></p></li>
<li><p><a class="reference external" href="https://graphviz.gitlab.io">Graphviz</a></p></li>
<li><p><a class="reference external" href="https://tug.org/xetex/">XeTeX</a></p></li>
<li><p><a class="reference external" href="https://dvisvgm.de/">dvisvgm</a></p></li>
</ul>
</div>
<p>Most of the sphinx requirements are installed from <a class="reference external" href="https://github.com/return42/searx/blob/filtron/setup.py">git://setup.py</a> and the
docs can be build from scratch with <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">docs</span></code>. For better math and image
processing additional packages are needed. The <a class="reference external" href="https://tug.org/xetex/">XeTeX</a> needed not only for 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>
<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 v4.0.0+/adad0e62b)"><span>Math support for HTML outputs in Sphinx</span></a> without CDNs, the math are rendered
as images (<code class="docutils literal notranslate"><span class="pre">sphinx.ext.imgmath</span></code> extension).</p>
<p>Here is the extract from the <a class="reference external" href="https://github.com/return42/searx/blob/filtron/docs/conf.py">git://docs/conf.py</a> file, setting math renderer
to <code class="docutils literal notranslate"><span class="pre">imgmath</span></code>:</p>
<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>
<span class="n">imgmath_image_format</span> <span class="o">=</span> <span class="s1">&#39;svg&#39;</span>
<span class="n">imgmath_font_size</span> <span class="o">=</span> <span class="mi">14</span>
</pre></div>
</div>
<p>If your docs build (<code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">docs</span></code>) shows warnings like this:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>WARNING: dot(1) not found, for better output quality install \
graphviz from http://www.graphviz.org
..
WARNING: LaTeX command &#39;latex&#39; cannot be run (needed for math \
display), check the imgmath_latex setting
</pre></div>
</div>
<p>you need to install additional packages on your build host, to get better HTML
output.</p>
<div class="sphinx-tabs docutils container">
<div class="ui top attached tabular menu sphinx-menu docutils container">
<div class="active item sphinx-data-tab-VWJ1bnR1IC8gZGViaWFu docutils container">
<div class="docutils container">
<p>Ubuntu / debian</p>
</div>
</div>
<div class="item sphinx-data-tab-QXJjaCBMaW51eA== docutils container">
<div class="docutils container">
<p>Arch Linux</p>
</div>
</div>
<div class="item sphinx-data-tab-RmVkb3JhIC8gUkhFTA== docutils container">
<div class="docutils container">
<p>Fedora / RHEL</p>
</div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-VWJ1bnR1IC8gZGViaWFu active docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo apt install graphviz imagemagick texlive-xetex librsvg2-bin
</pre></div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-QXJjaCBMaW51eA== docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo pacman -S graphviz imagemagick texlive-bin extra/librsvg
</pre></div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-RmVkb3JhIC8gUkhFTA== docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo dnf install graphviz graphviz-gd texlive-xetex-bin librsvg2-tools
</pre></div>
</div>
</div>
</div>
<p>For PDF output you also need:</p>
<div class="sphinx-tabs docutils container">
<div class="ui top attached tabular menu sphinx-menu docutils container">
<div class="active item sphinx-data-tab-VWJ1bnR1IC8gZGViaWFu docutils container">
<div class="docutils container">
<p>Ubuntu / debian</p>
</div>
</div>
<div class="item sphinx-data-tab-QXJjaCBMaW51eA== docutils container">
<div class="docutils container">
<p>Arch Linux</p>
</div>
</div>
<div class="item sphinx-data-tab-RmVkb3JhIC8gUkhFTA== docutils container">
<div class="docutils container">
<p>Fedora / RHEL</p>
</div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-VWJ1bnR1IC8gZGViaWFu active docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo apt texlive-latex-recommended texlive-extra-utils ttf-dejavu
</pre></div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-QXJjaCBMaW51eA== docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo pacman -S texlive-core texlive-latexextra ttf-dejavu
</pre></div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-RmVkb3JhIC8gUkhFTA== docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo dnf install <span class="se">\</span>
texlive-collection-fontsrecommended texlive-collection-latex <span class="se">\</span>
dejavu-sans-fonts dejavu-serif-fonts dejavu-sans-mono-fonts <span class="se">\</span>
ImageMagick
</pre></div>
</div>
</div>
</div>
</div>
<div class="section" id="lint-shell-scripts">
<span id="sh-lint"></span><h2><a class="toc-backref" href="#id3">Lint shell scripts</a><a class="headerlink" href="#lint-shell-scripts" title="Permalink to this headline"></a></h2>
<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>
<div class="sphinx-tabs docutils container">
<div class="ui top attached tabular menu sphinx-menu docutils container">
<div class="active item sphinx-data-tab-VWJ1bnR1IC8gZGViaWFu docutils container">
<div class="docutils container">
<p>Ubuntu / debian</p>
</div>
</div>
<div class="item sphinx-data-tab-QXJjaCBMaW51eA== docutils container">
<div class="docutils container">
<p>Arch Linux</p>
</div>
</div>
<div class="item sphinx-data-tab-RmVkb3JhIC8gUkhFTA== docutils container">
<div class="docutils container">
<p>Fedora / RHEL</p>
</div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-VWJ1bnR1IC8gZGViaWFu active docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo apt install shellcheck
</pre></div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-QXJjaCBMaW51eA== docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo pacman -S shellcheck
</pre></div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-RmVkb3JhIC8gUkhFTA== docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo dnf install ShellCheck
</pre></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../index.html">
<img class="logo" src="../_static/searx_logo_small.png" alt="Logo"/>
</a></p>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/return42/searx">Source</a>
<li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a>
<li><a href="https://searx.space/">Public instances</a>
<li><a href="https://twitter.com/Searx_engine">Twitter</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../index.html">Overview</a>
<ul>
<li><a href="index.html">Administrator documentation</a>
<ul>
<li>Previous: <a href="plugins.html" title="previous chapter">Plugins builtin</a>
<li>Next: <a href="../dev/index.html" title="next chapter">Developer documentation</a></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2020, Adam Tauber, Noémi Ványi.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 3.0.1.
</div>
<script src="../_static/version_warning_offset.js"></script>
</body>
</html>