searx.sh: add buildhost cmd, installs OS packages for builds

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
Markus Heiser 2020-03-09 01:37:26 +01:00
parent f5f83b8a99
commit 80f7b65804
4 changed files with 41 additions and 13 deletions

View File

@ -104,7 +104,8 @@ For PDF output you also need:
$ sudo dnf install \ $ sudo dnf install \
texlive-collection-fontsrecommended texlive-collection-latex \ texlive-collection-fontsrecommended texlive-collection-latex \
dejavu-sans-fonts dejavu-serif-fonts dejavu-sans-mono-fonts dejavu-sans-fonts dejavu-serif-fonts dejavu-sans-mono-fonts \
ImageMagick
.. _sh lint: .. _sh lint:

View File

@ -236,7 +236,7 @@ main() {
shift shift
lxc_exec_cmd "${name}" "$@" lxc_exec_cmd "${name}" "$@"
;; ;;
*) usage "uknown or missing container <name> $2"; exit 42;; *) usage "uknown or missing container <name> $1"; exit 42;;
esac esac
;; ;;
install) install)

View File

@ -204,6 +204,7 @@ pyclean:
pyenv: $(PY_ENV) pyenv: $(PY_ENV)
$(PY_ENV): python-exe $(PY_ENV): python-exe
$(call cmd,virtualenv,$(PY_ENV)) $(call cmd,virtualenv,$(PY_ENV))
@$(PY_ENV_BIN)/pip install $(PIP_VERBOSE) -U wheel pip setuptools
@$(PY_ENV_BIN)/pip install $(PIP_VERBOSE) -r requirements.txt @$(PY_ENV_BIN)/pip install $(PIP_VERBOSE) -r requirements.txt
PHONY += pylint-exe PHONY += pylint-exe

View File

@ -41,27 +41,47 @@ SEARX_UWSGI_SOCKET="/run/uwsgi/app/searx/socket"
SEARX_PACKAGES_debian="\ SEARX_PACKAGES_debian="\
python3-dev python3-babel python3-venv python3-dev python3-babel python3-venv
uwsgi uwsgi-plugin-python3 uwsgi uwsgi-plugin-python3
git build-essential libxslt-dev zlib1g-dev libffi-dev libssl-dev git build-essential libxslt-dev zlib1g-dev libffi-dev libssl-dev"
shellcheck"
BUILD_PACKAGES_debian="\
shellcheck graphviz imagemagick texlive-xetex librsvg2-bin
texlive-latex-recommended texlive-extra-utils ttf-dejavu"
# pacman packages # pacman packages
SEARX_PACKAGES_arch="\ SEARX_PACKAGES_arch="\
python python-pip python-lxml python-babel python python-pip python-lxml python-babel
uwsgi uwsgi-plugin-python uwsgi uwsgi-plugin-python
git base-devel libxml2 git base-devel libxml2"
shellcheck"
BUILD_PACKAGES_arch="\
shellcheck graphviz imagemagick texlive-bin extra/librsvg
texlive-core texlive-latexextra ttf-dejavu"
# dnf packages # dnf packages
SEARX_PACKAGES_fedora="\ SEARX_PACKAGES_fedora="\
python python-pip python-lxml python-babel python python-pip python-lxml python-babel
uwsgi uwsgi-plugin-python3 uwsgi uwsgi-plugin-python3
git @development-tools libxml2 git @development-tools libxml2"
ShellCheck"
BUILD_PACKAGES_fedora="\
ShellCheck graphviz graphviz-gd ImageMagick librsvg2-tools
texlive-xetex-bin texlive-collection-fontsrecommended
texlive-collection-latex dejavu-sans-fonts dejavu-serif-fonts
dejavu-sans-mono-fonts"
case $DIST_ID in case $DIST_ID in
ubuntu|debian) SEARX_PACKAGES="${SEARX_PACKAGES_debian}" ;; ubuntu|debian)
arch) SEARX_PACKAGES="${SEARX_PACKAGES_arch}" ;; SEARX_PACKAGES="${SEARX_PACKAGES_debian}"
fedora) SEARX_PACKAGES="${SEARX_PACKAGES_fedora}" ;; BUILD_PACKAGES="${BUILD_PACKAGES_debian}"
;;
arch)
SEARX_PACKAGES="${SEARX_PACKAGES_arch}"
BUILD_PACKAGES="${BUILD_PACKAGES_arch}"
;;
fedora)
SEARX_PACKAGES="${SEARX_PACKAGES_fedora}"
BUILD_PACKAGES="${BUILD_PACKAGES_fedora}"
;;
esac esac
# Apache Settings # Apache Settings
@ -111,6 +131,7 @@ install / remove
:uwsgi: install searx uWSGI application :uwsgi: install searx uWSGI application
:settings: reinstall settings from ${REPO_ROOT}/searx/settings.yml :settings: reinstall settings from ${REPO_ROOT}/searx/settings.yml
:packages: install needed packages from OS package manager :packages: install needed packages from OS package manager
:buildhost: install packages from OS package manager needed by buildhost
update searx update searx
Update searx installation ($SERVICE_HOME) Update searx installation ($SERVICE_HOME)
activate service activate service
@ -172,7 +193,13 @@ main() {
searx-src) clone_searx ;; searx-src) clone_searx ;;
settings) install_settings ;; settings) install_settings ;;
uwsgi) install_searx_uwsgi;; uwsgi) install_searx_uwsgi;;
packages) pkg_install "$SEARX_PACKAGES" ;; packages)
pkg_install "$SEARX_PACKAGES"
;;
buildhost)
pkg_install "$SEARX_PACKAGES"
pkg_install "$BUILD_PACKAGES"
;;
*) usage "$_usage"; exit 42;; *) usage "$_usage"; exit 42;;
esac ;; esac ;;
update) update)
@ -730,4 +757,3 @@ EOF
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
main "$@" main "$@"
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------