1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/searxng_ynh.git synced 2024-09-03 20:26:00 +02:00

Merge pull request #309 from YunoHost-Apps/master-promotion
Some checks failed
YunoHost apps package linter / test (push) Has been cancelled
Create master promotion pull request / masterPromotion (push) Has been cancelled

Upgrade master from testing
This commit is contained in:
ewilly 2024-07-22 15:03:30 +00:00 committed by GitHub
commit ffc7ffaf54
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 127 additions and 44 deletions

View file

@ -5,4 +5,5 @@
- [Irakurri README euskaraz](README_eu.md) - [Irakurri README euskaraz](README_eu.md)
- [Lire le README en français](README_fr.md) - [Lire le README en français](README_fr.md)
- [Le o README en galego](README_gl.md) - [Le o README en galego](README_gl.md)
- [Baca README dalam bahasa bahasa Indonesia](README_id.md)
- [阅读中文(简体)的 README](README_zh_Hans.md) - [阅读中文(简体)的 README](README_zh_Hans.md)

View file

@ -19,7 +19,7 @@ It shall NOT be edited by hand.
SearxXNG is a free internet metasearch engine which aggregates results from more than 70 search services. Users are neither tracked nor profiled. SearxXNG is a free internet metasearch engine which aggregates results from more than 70 search services. Users are neither tracked nor profiled.
**Shipped version:** 2024.07.08~ynh2 **Shipped version:** 2024.07.08~ynh3
**Demo:** <https://searx.be> **Demo:** <https://searx.be>

View file

@ -19,7 +19,7 @@ No se debe editar a mano.
SearxXNG is a free internet metasearch engine which aggregates results from more than 70 search services. Users are neither tracked nor profiled. SearxXNG is a free internet metasearch engine which aggregates results from more than 70 search services. Users are neither tracked nor profiled.
**Versión actual:** 2024.07.08~ynh2 **Versión actual:** 2024.07.08~ynh3
**Demo:** <https://searx.be> **Demo:** <https://searx.be>

View file

@ -19,7 +19,7 @@ EZ editatu eskuz.
SearxXNG is a free internet metasearch engine which aggregates results from more than 70 search services. Users are neither tracked nor profiled. SearxXNG is a free internet metasearch engine which aggregates results from more than 70 search services. Users are neither tracked nor profiled.
**Paketatutako bertsioa:** 2024.07.08~ynh2 **Paketatutako bertsioa:** 2024.07.08~ynh3
**Demoa:** <https://searx.be> **Demoa:** <https://searx.be>

View file

@ -19,7 +19,7 @@ Il NE doit PAS être modifié à la main.
SearxXNG is a free internet metasearch engine which aggregates results from more than 70 search services. Users are neither tracked nor profiled. SearxXNG is a free internet metasearch engine which aggregates results from more than 70 search services. Users are neither tracked nor profiled.
**Version incluse:** 2024.07.08~ynh2 **Version incluse:** 2024.07.08~ynh3
**Démo:** <https://searx.be> **Démo:** <https://searx.be>

View file

@ -19,7 +19,7 @@ NON debe editarse manualmente.
SearxXNG is a free internet metasearch engine which aggregates results from more than 70 search services. Users are neither tracked nor profiled. SearxXNG is a free internet metasearch engine which aggregates results from more than 70 search services. Users are neither tracked nor profiled.
**Versión proporcionada:** 2024.07.08~ynh2 **Versión proporcionada:** 2024.07.08~ynh3
**Demo:** <https://searx.be> **Demo:** <https://searx.be>

51
README_id.md Normal file
View file

@ -0,0 +1,51 @@
<!--
N.B.: README ini dibuat secara otomatis oleh <https://github.com/YunoHost/apps/tree/master/tools/readme_generator>
Ini TIDAK boleh diedit dengan tangan.
-->
# SearXNG untuk YunoHost
[![Tingkat integrasi](https://dash.yunohost.org/integration/searxng.svg)](https://ci-apps.yunohost.org/ci/apps/searxng/) ![Status kerja](https://ci-apps.yunohost.org/ci/badges/searxng.status.svg) ![Status pemeliharaan](https://ci-apps.yunohost.org/ci/badges/searxng.maintain.svg)
[![Pasang SearXNG dengan YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=searxng)
*[Baca README ini dengan bahasa yang lain.](./ALL_README.md)*
> *Paket ini memperbolehkan Anda untuk memasang SearXNG secara cepat dan mudah pada server YunoHost.*
> *Bila Anda tidak mempunyai YunoHost, silakan berkonsultasi dengan [panduan](https://yunohost.org/install) untuk mempelajari bagaimana untuk memasangnya.*
## Ringkasan
SearxXNG is a free internet metasearch engine which aggregates results from more than 70 search services. Users are neither tracked nor profiled.
**Versi terkirim:** 2024.07.08~ynh3
**Demo:** <https://searx.be>
## Tangkapan Layar
![Tangkapan Layar pada SearXNG](./doc/screenshots/screenshot_1.png)
## Dokumentasi dan sumber daya
- Website aplikasi resmi: <https://docs.searxng.org>
- Dokumentasi pengguna resmi: <https://docs.searxng.org/user/>
- Dokumentasi admin resmi: <https://docs.searxng.org/admin/>
- Repositori kode aplikasi hulu: <https://github.com/searxng/searxng>
- Gudang YunoHost: <https://apps.yunohost.org/app/searxng>
- Laporkan bug: <https://github.com/YunoHost-Apps/searxng_ynh/issues>
## Info developer
Silakan kirim pull request ke [`testing` branch](https://github.com/YunoHost-Apps/searxng_ynh/tree/testing).
Untuk mencoba branch `testing`, silakan dilanjutkan seperti:
```bash
sudo yunohost app install https://github.com/YunoHost-Apps/searxng_ynh/tree/testing --debug
atau
sudo yunohost app upgrade searxng -u https://github.com/YunoHost-Apps/searxng_ynh/tree/testing --debug
```
**Info lebih lanjut mengenai pemaketan aplikasi:** <https://yunohost.org/packaging_apps>

View file

@ -19,7 +19,7 @@
SearxXNG is a free internet metasearch engine which aggregates results from more than 70 search services. Users are neither tracked nor profiled. SearxXNG is a free internet metasearch engine which aggregates results from more than 70 search services. Users are neither tracked nor profiled.
**分发版本:** 2024.07.08~ynh2 **分发版本:** 2024.07.08~ynh3
**演示:** <https://searx.be> **演示:** <https://searx.be>

View file

@ -5,7 +5,7 @@ name = "SearXNG"
description.en = "Internet metasearch engine which aggregates results from more than 70 search services" description.en = "Internet metasearch engine which aggregates results from more than 70 search services"
description.fr = "Méta-moteur de recherche qui rassemble les résultats de plus de 70 services de recherche" description.fr = "Méta-moteur de recherche qui rassemble les résultats de plus de 70 services de recherche"
version = "2024.07.08~ynh2" version = "2024.07.08~ynh3"
maintainers = ["mh4ckt3mh4ckt1c4s", "ewilly"] maintainers = ["mh4ckt3mh4ckt1c4s", "ewilly"]
@ -56,4 +56,4 @@ ram.runtime = "200M"
main.url = "/" main.url = "/"
[resources.apt] [resources.apt]
packages = "git, build-essential, libxslt-dev, python3-dev, python3-venv, python3-cffi, python3-babel, zlib1g-dev, libffi-dev, libssl-dev, python3-lxml, uwsgi, uwsgi-plugin-python3, shellcheck" packages = "python3-dev, python3-babel, python3-venv, uwsgi, uwsgi-plugin-python3, git, build-essential, libxslt-dev, zlib1g-dev, libffi-dev, libssl-dev"

View file

@ -4,6 +4,60 @@
# COMMON VARIABLES # COMMON VARIABLES
#================================================= #=================================================
#=================================================
# PERSONAL HELPERS
#=================================================
# Install/Upgrade SearXNG in virtual environement
myynh_source_searxng () {
# Retrieve info from manifest
repo_fullpath=$(ynh_read_manifest --manifest_key="upstream.code")
commit_sha=$(ynh_read_manifest --manifest_key="resources.sources.main.url" | xargs basename --suffix=".tar.gz")
# Download source
sudo -H -u $app -i bash << EOF
mkdir "$install_dir/searxng-src"
git clone -n "$repo_fullpath" "$install_dir/searxng-src" 2>&1
EOF
# Checkout commit
pushd "$install_dir/searxng-src"
sudo -H -u $app -i bash << EOF
cd "$install_dir/searxng-src"
git checkout "$commit_sha" 2>&1
EOF
popd
}
myynh_install_searxng () {
# Create the virtual environment
sudo -H -u $app -i bash << EOF
python3 -m venv "$install_dir/searxng-pyenv"
echo ". $install_dir/searxng-pyenv/bin/activate" > "$install_dir/.profile"
EOF
# Check if virtualenv was sourced from the login
sudo -H -u $app -i bash << EOF
command -v python && python --version
EOF
sudo -H -u $app -i bash << EOF
pip install --upgrade pip
pip install --upgrade setuptools
pip install --upgrade wheel
pip install --upgrade pyyaml
cd "$install_dir/searxng-src"
pip install -e .
EOF
}
# Set permissions
myynh_set_permissions () {
chown -R $app: "$install_dir"
chmod 750 "$install_dir"
chmod -R o-rwx "$install_dir"
}
#================================================= #=================================================
# UWSGI HELPERS # UWSGI HELPERS
#================================================= #=================================================
@ -71,7 +125,8 @@ ynh_add_uwsgi_service () {
# Setup specific Systemd rules if necessary # Setup specific Systemd rules if necessary
mkdir -p "/etc/systemd/system/uwsgi-app@$app.service.d" mkdir -p "/etc/systemd/system/uwsgi-app@$app.service.d"
if [ -e "../conf/uwsgi-app@override.service" ]; then if [ -e "../conf/uwsgi-app@override.service" ]
then
ynh_add_config --template="uwsgi-app@override.service" --destination="/etc/systemd/system/uwsgi-app@$app.service.d/override.conf" ynh_add_config --template="uwsgi-app@override.service" --destination="/etc/systemd/system/uwsgi-app@$app.service.d/override.conf"
fi fi
@ -87,7 +142,8 @@ ynh_add_uwsgi_service () {
# usage: ynh_remove_uwsgi_service # usage: ynh_remove_uwsgi_service
ynh_remove_uwsgi_service () { ynh_remove_uwsgi_service () {
local finaluwsgiini="/etc/uwsgi/apps-available/$app.ini" local finaluwsgiini="/etc/uwsgi/apps-available/$app.ini"
if [ -e "$finaluwsgiini" ]; then if [ -e "$finaluwsgiini" ]
then
yunohost service remove "uwsgi-app@$app" yunohost service remove "uwsgi-app@$app"
ynh_systemd_action --service_name="uwsgi-app@$app.service" --action="stop" ynh_systemd_action --service_name="uwsgi-app@$app.service" --action="stop"
ynh_exec_fully_quiet ynh_systemd_action --service_name="uwsgi-app@$app.service" --action="disable" ynh_exec_fully_quiet ynh_systemd_action --service_name="uwsgi-app@$app.service" --action="disable"

View file

@ -15,20 +15,10 @@ source /usr/share/yunohost/helpers
# DOWNLOAD, CHECK AND UNPACK SOURCE # DOWNLOAD, CHECK AND UNPACK SOURCE
#================================================= #=================================================
ynh_script_progression --message="Setting up source files..." --weight=1 ynh_script_progression --message="Setting up source files..." --weight=1
myynh_source_searxng
repo_fullpath=$(ynh_read_manifest --manifest_key="upstream.code")
commit_sha=$(ynh_read_manifest --manifest_key="resources.sources.main.url" | xargs basename --suffix=".tar.gz")
ynh_exec_fully_quiet git clone -n "$repo_fullpath" "$install_dir/searxng-src"
pushd "$install_dir/searxng-src"
ynh_exec_fully_quiet git checkout "$commit_sha"
popd
ynh_script_progression --message="Installing SearXNG..." --weight=2 ynh_script_progression --message="Installing SearXNG..." --weight=2
myynh_install_searxng
python3 -m venv --system-site-packages "$install_dir/searxng-pyenv"
set +o nounset; source "$install_dir/searxng-pyenv/bin/activate"; set -o nounset
pip3 install -U pip "setuptools<71.0.0" wheel pyyaml --no-cache-dir
ynh_exec_fully_quiet pip3 install -e "$install_dir/searxng-src"
#================================================= #=================================================
# SYSTEM CONFIGURATION # SYSTEM CONFIGURATION
@ -49,9 +39,7 @@ ynh_script_progression --message="Adding a configuration file..." --weight=1
secret_key=$(ynh_string_random) secret_key=$(ynh_string_random)
ynh_add_config --template="../conf/settings.yml" --destination="$install_dir/settings.yml" ynh_add_config --template="../conf/settings.yml" --destination="$install_dir/settings.yml"
chmod 750 "$install_dir" myynh_set_permissions
chmod -R o-rwx "$install_dir"
chown -R $app: "$install_dir"
#================================================= #=================================================
# GENERIC FINALIZATION # GENERIC FINALIZATION

View file

@ -16,9 +16,7 @@ ynh_script_progression --message="Restoring the app main directory..." --weight=
ynh_restore_file --origin_path="$install_dir" ynh_restore_file --origin_path="$install_dir"
chown -R $app:www-data "$install_dir" myynh_set_permissions
chmod 750 "$install_dir"
chmod -R o-rwx "$install_dir"
#================================================= #=================================================
# RESTORE SYSTEM CONFIGURATIONS # RESTORE SYSTEM CONFIGURATIONS

View file

@ -46,26 +46,15 @@ ynh_systemd_action --service_name="uwsgi-app@$app.service" --action="stop" --log
if [ "$upgrade_type" == "UPGRADE_APP" ] if [ "$upgrade_type" == "UPGRADE_APP" ]
then then
ynh_script_progression --message="Upgrading source files..." --weight=1 ynh_secure_remove --file="$install_dir/.profile"
ynh_secure_remove --file="$install_dir/.cache"
ynh_secure_remove --file="$install_dir/searxng-src" ynh_secure_remove --file="$install_dir/searxng-src"
repo_fullpath=$(ynh_read_manifest --manifest_key="upstream.code")
commit_sha=$(ynh_read_manifest --manifest_key="resources.sources.main.url" | xargs basename --suffix=".tar.gz")
ynh_exec_fully_quiet git clone -n "$repo_fullpath" "$install_dir/searxng-src"
pushd "$install_dir/searxng-src"
ynh_exec_fully_quiet git checkout "$commit_sha"
popd
ynh_secure_remove --file="$install_dir/searxng-pyenv" ynh_secure_remove --file="$install_dir/searxng-pyenv"
python3 -m venv --system-site-packages "$install_dir/searxng-pyenv" myynh_source_searxng
set +o nounset; source "$install_dir/searxng-pyenv/bin/activate"; set -o nounset myynh_install_searxng
pip3 install -U pip "setuptools<71.0.0" wheel pyyaml --no-cache-dir
ynh_exec_fully_quiet pip3 install -e "$install_dir/searxng-src"
fi fi
chmod 750 "$install_dir" myynh_set_permissions
chmod -R o-rwx "$install_dir"
chown -R $app: "$install_dir"
#================================================= #=================================================
# REAPPLY SYSTEM CONFIGURATIONS # REAPPLY SYSTEM CONFIGURATIONS