From 659a59f04ed066f8f8ac02279e49c1ba67e2d435 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 4 Oct 2021 18:15:22 +0200 Subject: [PATCH 1/9] Update updater.sh --- .github/workflows/updater.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/updater.sh b/.github/workflows/updater.sh index 647765d..0a6bc75 100644 --- a/.github/workflows/updater.sh +++ b/.github/workflows/updater.sh @@ -10,7 +10,7 @@ # automatic actions when a new upstream release is detected. # Remove this exit command when you are ready to run this Action -#exit 1 +exit 1 #================================================= # FETCHING LATEST RELEASE AND ITS ASSETS @@ -63,7 +63,7 @@ echo "Handling asset at $asset_url" # Here we base the source file name upon a unique keyword in the assets url (admin vs. update) # Leave $src empty to ignore the asset case $asset_url in - *".tar.gz"*) + *".tar.gz") src="app" ;; esac From 5ec3836cf303a240e9a02a57e3026687cc9bc5dd Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 21 Nov 2021 17:07:15 +0100 Subject: [PATCH 2/9] keep --- scripts/install | 1 - scripts/upgrade | 16 +--------------- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/scripts/install b/scripts/install index 2c6f59c..0da2b87 100644 --- a/scripts/install +++ b/scripts/install @@ -101,7 +101,6 @@ pip3 install --requirement $final_path/requirements-ynh.txt --no-cache-dir ynh_script_progression --message="Configuring Searx..." --weight=2 secret_key=$(ynh_string_random) - ynh_add_config --template="../conf/settings.yml" --destination="$final_path/searx/settings.yml" #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 740e104..0ffffa9 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -83,21 +83,8 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Upgrading source files..." --weight=3 -# Create a temporary directory - tmpdir="$(mktemp -d)" - - # Backup the config file in the temp dir - cp -a "$final_path/searx/settings.yml" "$tmpdir/settings.yml" - # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$final_path" - - # Copy the admin saved settings from tmp directory to final path - cp -a "$tmpdir/settings.yml" "$final_path/searx/settings.yml" - - # Remove the tmp directory securely - ynh_secure_remove --file="$tmpdir" - + ynh_setup_source --dest_dir="$final_path" --keep="$final_path/searx/settings.yml" fi #================================================= @@ -138,7 +125,6 @@ pip3 install --requirement $final_path/requirements-ynh.txt --upgrade # ynh_script_progression --message="Configuring Searx..." --weight=2 # secret_key=$(ynh_string_random) - # ynh_add_config --template="../conf/settings.yml" --destination="$final_path/searx/settings.yml" #================================================= From 197fc7eaf2bc773a2d098c64513ea0eccf27f1e3 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 22 Nov 2021 22:43:53 +0100 Subject: [PATCH 3/9] 4.3 --- conf/nginx.conf | 5 ----- scripts/restore | 3 +-- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 9f7f927..2ec6fac 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,11 +1,6 @@ #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; location __PATH__/ { - # Force usage of https - if ($scheme = http) { - rewrite ^ https://$server_name$request_uri? permanent; - } - uwsgi_param SCRIPT_NAME '__PATH_NO_ROOT__'; include uwsgi_params; uwsgi_modifier1 30; diff --git a/scripts/restore b/scripts/restore index 6e6a996..bdf1d59 100755 --- a/scripts/restore +++ b/scripts/restore @@ -34,8 +34,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) #================================================= ynh_script_progression --message="Validating restoration parameters..." --weight=2 -test ! -d $final_path \ - || ynh_die --message="There is already a directory: $final_path " +test ! -d $final_path || ynh_die --message="There is already a directory: $final_path " #================================================= # STANDARD RESTORE STEPS From ba61aee4c3c3af1c1269f44596abb0142e813420 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 22 Nov 2021 22:45:58 +0100 Subject: [PATCH 4/9] Update manifest.json --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 478f4f3..4094d6f 100644 --- a/manifest.json +++ b/manifest.json @@ -22,7 +22,7 @@ "email": "opi@zeropi.net" }, "requirements": { - "yunohost": ">= 4.2.4" + "yunohost": ">= 4.3.0" }, "multi_instance": false, "services": [ From 8b32d0d4a84804222070b25246ef0f4c592e74bd Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 22 Nov 2021 22:51:12 +0100 Subject: [PATCH 5/9] Update upgrade --- scripts/upgrade | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 0ffffa9..bf271b8 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -83,8 +83,20 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Upgrading source files..." --weight=3 + # Create a temporary directory + tmpdir="$(mktemp -d)" + + # Backup the config file in the temp dir + cp -a "$final_path/searx/settings.yml" "$tmpdir/settings.yml" + # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$final_path" --keep="$final_path/searx/settings.yml" + ynh_setup_source --dest_dir="$final_path" + + # Copy the admin saved settings from tmp directory to final path + cp -a "$tmpdir/settings.yml" "$final_path/searx/settings.yml" + + # Remove the tmp directory securely + ynh_secure_remove --file="$tmpdir" fi #================================================= From a2b6209229d3c430b1d33d14c498fc705412f1e9 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 23 Nov 2021 07:38:22 +0100 Subject: [PATCH 6/9] Update updater.sh --- .github/workflows/updater.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/updater.sh b/.github/workflows/updater.sh index 0a6bc75..63bcb66 100644 --- a/.github/workflows/updater.sh +++ b/.github/workflows/updater.sh @@ -10,7 +10,7 @@ # automatic actions when a new upstream release is detected. # Remove this exit command when you are ready to run this Action -exit 1 +#exit 1 #================================================= # FETCHING LATEST RELEASE AND ITS ASSETS From 9b7004427de36c99341c0c6bfa110ea56a784cec Mon Sep 17 00:00:00 2001 From: tituspijean Date: Mon, 3 Jan 2022 12:30:39 +0100 Subject: [PATCH 7/9] Fix updater.sh to correctly retrieve latest version --- .github/workflows/updater.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/updater.sh b/.github/workflows/updater.sh index 63bcb66..ab9cb6a 100644 --- a/.github/workflows/updater.sh +++ b/.github/workflows/updater.sh @@ -20,13 +20,9 @@ current_version=$(cat manifest.json | jq -j '.version|split("~")[0]') repo=$(cat manifest.json | jq -j '.upstream.code|split("https://github.com/")[1]') # Some jq magic is needed, because the latest upstream release is not always the latest version (e.g. security patches for older versions) -version=$(curl --silent "https://api.github.com/repos/$repo/releases" | jq -r '.[] | select( .prerelease != true ) | .tag_name' | sort -V | tail -1) +version=$(curl --silent "https://api.github.com/repos/$repo/releases" | jq -r '.[] | select( .prerelease != true ) | .tag_name | (if startswith("v") then .[1:] else . end)' | sort -V | tail -1) assets=($(curl --silent "https://api.github.com/repos/$repo/releases" | jq -r '[ .[] | select(.tag_name=="'$version'").assets[].browser_download_url ] | join(" ") | @sh' | tr -d "'")) -# if [[ ${version:0:1} == "v" || ${version:0:1} == "V" ]]; then -# version=${version:1} -# fi - # Setting up the environment variables echo "Current version: $current_version" echo "Latest release from upstream: $version" From 56cbe8403df59198a0eb0567667c152237e3a7bb Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 3 Jan 2022 12:36:02 +0100 Subject: [PATCH 8/9] Update manifest.json --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 4094d6f..6ee2d08 100644 --- a/manifest.json +++ b/manifest.json @@ -7,7 +7,7 @@ "fr": "Méta-moteur de recherche respectueux de la vie privée et bidouillable", "de": "Meta-Suchmaschine, die den Privatsphäre wahrt und 'hackable' ist" }, - "version": "1.0.0~ynh4", + "version": "1.0.0~ynh5", "url": "https://searx.github.io/searx/", "upstream": { "license": "AGPL-3.0-or-later", From fc423d016aa6064c25b340663178aad941ea8bef Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Mon, 3 Jan 2022 11:36:07 +0000 Subject: [PATCH 9/9] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8b5a146..18f4739 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Privacy-respecting, hackable metasearch engine -**Shipped version:** 1.0.0~ynh4 +**Shipped version:** 1.0.0~ynh5 **Demo:** https://demo.yunohost.org/searx/ diff --git a/README_fr.md b/README_fr.md index db4e0ed..52c4697 100644 --- a/README_fr.md +++ b/README_fr.md @@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Méta-moteur de recherche respectueux de la vie privée et bidouillable -**Version incluse :** 1.0.0~ynh4 +**Version incluse :** 1.0.0~ynh5 **Démo :** https://demo.yunohost.org/searx/