The settings template in utils/templates/etc/searx/settings.yml
does not include any replacements (shell environment variables).
BTW: utils/filtron.sh & utils/lib.sh
Add some more messages to installation procedures, to be more clear.
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
**new** utils/lib_install.sh:
Used to initialize installation procedures
- Modified source_dot_config function that
- loads .config.sh from an existing installation (at SEARX_SRC).
- initialize **SEARX_SRC_INIT_FILES**
- functions like:
- install_log_searx_instance()
- install_searx_get_state()
**modified** utils/searx.sh
- obsolete environment SEARX_INSTANCE_NAME has been replaced
by string 'SearXNG'.
**modified** utils/filtron.sh, utils/morty.sh, utils/searx.sh
- source utils/lib_install.sh
- normalize logging of environment variables using new function
install_log_searx_instance()
**modified** utils/lib.sh
- fix marginal typos
**Installation scripts**
The utils/lib_install.sh is sourced by the installations scripts:
- utils/searx.sh
- utils/morty.sh
- utils/filtron.sh
If '${SEARX_SRC}/.config.sh' exists, the modified source_dot_config() function
loads this configuration (instead of './.config.sh').
**SEARX_SRC_INIT_FILES**
Array of file names to sync into a installation at $SEARX_SRC. The file names
are relative to the $REPO_ROOT. Set by function init_SEARX_SRC_INIT_FILES().
Most often theses are files like:
- .config.sh
- searx/settings.yml
- utils/brand.env
- ...
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Prompt the verbose messages ...
PYENV [check] import yaml --> OK
PYENV OK
only when environment $VERBOSE is active.
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
From pacman's man page:
--noprogressbar
Do not show a progress bar when downloading files. This can be useful for
scripts that call pacman and capture the output.
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
In 2a12637 an ASCII escape code was added, such escape codes should not be
written to pipes (when the output is not a terminal).
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Some piped commands hide the cursor, show cursory when the stream ends.
Most often this is a bug of the command which piped. The command should not
hide the cursor when it writes to a pipe. I have seen this bug with the package
manager (pacman) from ArchLinux.
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Implement a boilerplate to manage performance optimized virtualenv builds.
Shell scripts can use (e.g.) 'pyenv.cmd' to execute command in the virtualenv
without having to worry about whether and how the environment is provided. ::
pyenv.cmd which python
..../local/py3/bin/python
pyenv.cmd which pip
..../local/py3/bin/pip
If pyenv.cmd released multiple times the installation will only rebuild if the
function 'pyenv.OK' fails. Function 'pyenv.OK' make some test to validate that
the virtualenv exists and works as expected. The check also fails if
requirements listed requirements-dev.txt and requirements.txt has been edited.
Among these tests 'pyenv.OK' calls 'pyenv.check' which implements a python
script that validate the python installation. Here is an example how a
'pyenv.check' implementation could look like::
pyenv.check() {
cat <<EOF
import yaml
print('import yaml --> OK')
EOF
}
Signed-off-by: Markus Heiser <markus@darmarit.de>
Official support for Ubuntu 19.10 'Eoan Ermine' ended on July 17, 2020.
The image has been dropped [1] from https://images.linuxcontainers.org
[1] d161de601b
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Installation and use of the command 'virtualenv' was only needed in py2 and py2
is no longer suported by searx. In py3 the command is replaced by 'python -m
venv'.
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
- add installation method for nginx sites, morty and filtron
- clean up PUBLIC_URL environment in and outside of containers
- clean up comand lines
- handle uWSGI quirks on fedora (emperor mode)
- handle Python quirks on debian (there is no 'python' command anymore)
- lib.sh: add die and die_caller functions
- lxc_suite_install_info is now a function
- lint: shellcheck
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This is the revision of the documentation about the varous nginx installation
variants. It also implements the nginx installation scripts for morty and
filtron.
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
In utils/lib.sh there are two functions with the same name, but different tasks.
Rename one of them from lxc_init_container() into lxc_init_container_env().
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Commit 09a40625 adds virtualenv dependency. BTW remove deprecated
--no-site-packages. Not having access to global site-packages is now the
default behavior.
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
checked with::
sudo ./utils/lxc.sh cmd -- make test.sh
on ubu1804, ubu1910, fedora31 and archlinux. All checks OK except:
ubu1604: uses shellcheck v0.3.7 (from 04/2015) which is no longer supported!
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
By isolating the environment of makefiles and bash scripts into .config.mk and
.config.sh it is simple to maintain searx brands by setting some central
environments.
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>