From edcb12680564123d938448da37925520d6d263e8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?E=CC=81ric=20Gaspar?=
<46165813+ericgaspar@users.noreply.github.com>
Date: Tue, 4 Apr 2023 09:24:12 +0200
Subject: [PATCH 01/24] v2
---
conf/amd64.src | 7 ----
conf/arm64.src | 7 ----
conf/armel.src | 7 ----
conf/armhf.src | 7 ----
conf/config.xml | 2 +-
conf/i386.src | 7 ----
conf/systemd.service | 2 +-
manifest.toml | 65 ++++++++++++++++++++++++++++++
scripts/_common.sh | 2 +-
scripts/backup | 18 ++++-----
scripts/change_url | 64 +++++++++++++++--------------
scripts/install | 78 +++++++++++++++++------------------
scripts/remove | 22 +++++-----
scripts/restore | 46 ++++++++++-----------
scripts/upgrade | 96 ++++++++++++++++++++++----------------------
15 files changed, 231 insertions(+), 199 deletions(-)
delete mode 100644 conf/amd64.src
delete mode 100644 conf/arm64.src
delete mode 100644 conf/armel.src
delete mode 100644 conf/armhf.src
delete mode 100644 conf/i386.src
create mode 100644 manifest.toml
diff --git a/conf/amd64.src b/conf/amd64.src
deleted file mode 100644
index d5a1145..0000000
--- a/conf/amd64.src
+++ /dev/null
@@ -1,7 +0,0 @@
-SOURCE_URL=https://github.com/syncthing/syncthing/releases/download/v1.23.2/syncthing-linux-amd64-v1.23.2.tar.gz
-SOURCE_SUM=752d4df7c38789e0aff0f82194878ccbb7c8f2e18c1599aa817e3ecc517597e2
-SOURCE_SUM_PRG=sha256sum
-SOURCE_FORMAT=tar.gz
-SOURCE_IN_SUBDIR=true
-SOURCE_FILENAME=
-SOURCE_EXTRACT=true
diff --git a/conf/arm64.src b/conf/arm64.src
deleted file mode 100644
index e22c898..0000000
--- a/conf/arm64.src
+++ /dev/null
@@ -1,7 +0,0 @@
-SOURCE_URL=https://github.com/syncthing/syncthing/releases/download/v1.23.2/syncthing-linux-arm64-v1.23.2.tar.gz
-SOURCE_SUM=91bc4211df65689aed4739aabd3d409791d55b01ced31e10fac385ed15647942
-SOURCE_SUM_PRG=sha256sum
-SOURCE_FORMAT=tar.gz
-SOURCE_IN_SUBDIR=true
-SOURCE_FILENAME=
-SOURCE_EXTRACT=true
diff --git a/conf/armel.src b/conf/armel.src
deleted file mode 100644
index a4254d4..0000000
--- a/conf/armel.src
+++ /dev/null
@@ -1,7 +0,0 @@
-SOURCE_URL=https://github.com/syncthing/syncthing/releases/download/v1.23.2/syncthing-linux-arm-v1.23.2.tar.gz
-SOURCE_SUM=5309cfe6575d8fb86bd623937e3bbe66cb5c22be12722c57da8c3d32765cd931
-SOURCE_SUM_PRG=sha256sum
-SOURCE_FORMAT=tar.gz
-SOURCE_IN_SUBDIR=true
-SOURCE_FILENAME=
-SOURCE_EXTRACT=true
diff --git a/conf/armhf.src b/conf/armhf.src
deleted file mode 100644
index a4254d4..0000000
--- a/conf/armhf.src
+++ /dev/null
@@ -1,7 +0,0 @@
-SOURCE_URL=https://github.com/syncthing/syncthing/releases/download/v1.23.2/syncthing-linux-arm-v1.23.2.tar.gz
-SOURCE_SUM=5309cfe6575d8fb86bd623937e3bbe66cb5c22be12722c57da8c3d32765cd931
-SOURCE_SUM_PRG=sha256sum
-SOURCE_FORMAT=tar.gz
-SOURCE_IN_SUBDIR=true
-SOURCE_FILENAME=
-SOURCE_EXTRACT=true
diff --git a/conf/config.xml b/conf/config.xml
index 77e7bc1..f2b5dd3 100644
--- a/conf/config.xml
+++ b/conf/config.xml
@@ -43,7 +43,7 @@
true
10
0
- __DATADIR__
+ __DATA_DIR__
true
0
diff --git a/conf/i386.src b/conf/i386.src
deleted file mode 100644
index 3d88815..0000000
--- a/conf/i386.src
+++ /dev/null
@@ -1,7 +0,0 @@
-SOURCE_URL=https://github.com/syncthing/syncthing/releases/download/v1.23.2/syncthing-linux-386-v1.23.2.tar.gz
-SOURCE_SUM=7ba020603ead83afc6f43e0dbf59e33832414bdd055c608abc05d33d73f66757
-SOURCE_SUM_PRG=sha256sum
-SOURCE_FORMAT=tar.gz
-SOURCE_IN_SUBDIR=true
-SOURCE_FILENAME=
-SOURCE_EXTRACT=true
diff --git a/conf/systemd.service b/conf/systemd.service
index 1673a81..bf5bf9f 100644
--- a/conf/systemd.service
+++ b/conf/systemd.service
@@ -5,7 +5,7 @@ After=network.target
[Service]
User=__APP__
-ExecStart=__FINALPATH__/syncthing -no-browser -no-restart -logflags=0
+ExecStart=__INSTALL_DIR__/syncthing -no-browser -no-restart -logflags=0
Restart=on-failure
SuccessExitStatus=3 4
RestartForceExitStatus=3 4
diff --git a/manifest.toml b/manifest.toml
new file mode 100644
index 0000000..c7fc5c8
--- /dev/null
+++ b/manifest.toml
@@ -0,0 +1,65 @@
+packaging_format = 2
+
+id = "syncthing"
+name = "Syncthing"
+description.en = "Continuous file synchronization program"
+description.fr = "Programme de synchronisation de fichiers en continu"
+
+version = "1.23.2~ynh1"
+
+maintainers = ["txmrl", "yalh76"]
+
+[upstream]
+license = "MPL-2.0"
+website = "https://syncthing.net"
+userdoc = "https://docs.syncthing.net"
+code = "https://github.com/syncthing/syncthing"
+cpe = "???" # FIXME: optional but recommended if relevant, this is meant to contain the Common Platform Enumeration, which is sort of a standard id for applications defined by the NIST. In particular, Yunohost may use this is in the future to easily track CVE (=security reports) related to apps. The CPE may be obtained by searching here: https://nvd.nist.gov/products/cpe/search. For example, for Nextcloud, the CPE is 'cpe:2.3:a:nextcloud:nextcloud' (no need to include the version number)
+fund = "???" # FIXME: optional but recommended (or remove if irrelevant / not applicable). This is meant to be an URL where people can financially support this app, especially when its development is based on volunteers and/or financed by its community. YunoHost may later advertise it in the webadmin.
+
+[integration]
+yunohost = ">= 4.3.0"
+architectures = "all" # FIXME: can be replaced by a list of supported archs using the dpkg --print-architecture nomenclature (amd64/i386/armhf/arm64), for example: ["amd64", "i386"]
+multi_instance = true
+ldap = "?" # FIXME: replace with true, false, or "not_relevant". Not to confuse with the "sso" key : the "ldap" key corresponds to wether or not a user *can* login on the app using its YunoHost credentials.
+sso = "?" # FIXME: replace with true, false, or "not_relevant". Not to confuse with the "ldap" key : the "sso" key corresponds to wether or not a user is *automatically logged-in* on the app when logged-in on the YunoHost portal.
+disk = "50M" # FIXME: replace with an **estimate** minimum disk requirement. e.g. 20M, 400M, 1G, ...
+ram.build = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ...
+ram.runtime = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ...
+
+[install]
+ [install.domain]
+ # this is a generic question - ask strings are automatically handled by Yunohost's core
+ type = "domain"
+
+ [install.path]
+ # this is a generic question - ask strings are automatically handled by Yunohost's core
+ type = "path"
+ default = "/syncthing"
+
+ [install.admin]
+ # this is a generic question - ask strings are automatically handled by Yunohost's core
+ type = "user"
+
+[resources]
+ [resources.sources.main]
+ arm64.url = "https://github.com/syncthing/syncthing/releases/download/v1.23.2/syncthing-linux-arm64-v1.23.2.tar.gz"
+ arm64.sha256 = "91bc4211df65689aed4739aabd3d409791d55b01ced31e10fac385ed15647942"
+ amd64.url = "https://github.com/syncthing/syncthing/releases/download/v1.23.2/syncthing-linux-amd64-v1.23.2.tar.gz"
+ amd64.sha256 = "752d4df7c38789e0aff0f82194878ccbb7c8f2e18c1599aa817e3ecc517597e2"
+ armel.url = "https://github.com/syncthing/syncthing/releases/download/v1.23.2/syncthing-linux-arm-v1.23.2.tar.gz"
+ armel.sha256 = "5309cfe6575d8fb86bd623937e3bbe66cb5c22be12722c57da8c3d32765cd931"
+ armhf.url = "https://github.com/syncthing/syncthing/releases/download/v1.23.2/syncthing-linux-arm-v1.23.2.tar.gz"
+ armhf.sha256 = "5309cfe6575d8fb86bd623937e3bbe66cb5c22be12722c57da8c3d32765cd931"
+ i386.url = "https://github.com/syncthing/syncthing/releases/download/v1.23.2/syncthing-linux-386-v1.23.2.tar.gz"
+ i386.sha256 = "7ba020603ead83afc6f43e0dbf59e33832414bdd055c608abc05d33d73f66757"
+
+
+ [resources.system_user]
+
+ [resources.install_dir]
+
+ [resources.data_dir]
+
+ [resources.permissions]
+ main.url = "/"
diff --git a/scripts/_common.sh b/scripts/_common.sh
index ecd263f..90b04f0 100644
--- a/scripts/_common.sh
+++ b/scripts/_common.sh
@@ -5,7 +5,7 @@
#=================================================
# dependencies used by the app
-pkg_dependencies=""
+#REMOVEME? pkg_dependencies=""
#=================================================
# PERSONAL HELPERS
diff --git a/scripts/backup b/scripts/backup
index d8cb0be..1516464 100644
--- a/scripts/backup
+++ b/scripts/backup
@@ -14,22 +14,22 @@ source /usr/share/yunohost/helpers
# MANAGE SCRIPT FAILURE
#=================================================
-ynh_clean_setup () {
+#REMOVEME? ynh_clean_setup () {
true
}
# Exit if an error occurs during the execution of the script
-ynh_abort_if_errors
+#REMOVEME? ynh_abort_if_errors
#=================================================
# LOAD SETTINGS
#=================================================
-ynh_print_info --message="Loading installation settings..."
+#REMOVEME? ynh_print_info --message="Loading installation settings..."
-app=$YNH_APP_INSTANCE_NAME
+#REMOVEME? app=$YNH_APP_INSTANCE_NAME
-final_path=$(ynh_app_setting_get --app=$app --key=final_path)
-domain=$(ynh_app_setting_get --app=$app --key=domain)
-datadir=$(ynh_app_setting_get --app=$app --key=datadir)
+#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir)
+#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain)
+#REMOVEME? data_dir=$(ynh_app_setting_get --app=$app --key=data_dir)
#=================================================
# DECLARE DATA AND CONF FILES TO BACKUP
@@ -40,13 +40,13 @@ ynh_print_info --message="Declaring files to be backed up..."
# BACKUP THE APP MAIN DIR
#=================================================
-ynh_backup --src_path="$final_path"
+ynh_backup --src_path="$install_dir"
#=================================================
# BACKUP THE DATA DIR
#=================================================
-ynh_backup --src_path="$datadir" --is_big
+ynh_backup --src_path="$data_dir" --is_big
#=================================================
# BACKUP THE NGINX CONFIGURATION
diff --git a/scripts/change_url b/scripts/change_url
index ff22c50..b823f55 100644
--- a/scripts/change_url
+++ b/scripts/change_url
@@ -13,55 +13,55 @@ source /usr/share/yunohost/helpers
# RETRIEVE ARGUMENTS
#=================================================
-old_domain=$YNH_APP_OLD_DOMAIN
-old_path=$YNH_APP_OLD_PATH
+#REMOVEME? old_domain=$YNH_APP_OLD_DOMAIN
+#REMOVEME? old_path=$YNH_APP_OLD_PATH
-new_domain=$YNH_APP_NEW_DOMAIN
-new_path=$YNH_APP_NEW_PATH
+#REMOVEME? new_domain=$YNH_APP_NEW_DOMAIN
+#REMOVEME? new_path=$YNH_APP_NEW_PATH
-app=$YNH_APP_INSTANCE_NAME
+#REMOVEME? app=$YNH_APP_INSTANCE_NAME
#=================================================
# LOAD SETTINGS
#=================================================
-ynh_script_progression --message="Loading installation settings..."
+#REMOVEME? ynh_script_progression --message="Loading installation settings..."
-# Needed for helper "ynh_add_nginx_config"
-final_path=$(ynh_app_setting_get --app=$app --key=final_path)
+#REMOVEME? # Needed for helper "ynh_add_nginx_config"
+#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir)
-gui_port=$(ynh_app_setting_get --app=$app --key=gui_port)
+#REMOVEME? gui_port=$(ynh_app_setting_get --app=$app --key=gui_port)
#=================================================
# BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP
#=================================================
-ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..."
+#REMOVEME? ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..."
# Backup the current version of the app
-ynh_backup_before_upgrade
-ynh_clean_setup () {
+#REMOVEME? ynh_backup_before_upgrade
+#REMOVEME? ynh_clean_setup () {
# Remove the new domain config file, the remove script won't do it as it doesn't know yet its location.
- ynh_secure_remove --file="/etc/nginx/conf.d/$new_domain.d/$app.conf"
+#REMOVEME? ynh_secure_remove --file="/etc/nginx/conf.d/$new_domain.d/$app.conf"
# Restore it if the upgrade fails
- ynh_restore_upgradebackup
+#REMOVEME? ynh_restore_upgradebackup
}
# Exit if an error occurs during the execution of the script
-ynh_abort_if_errors
+#REMOVEME? ynh_abort_if_errors
#=================================================
# CHECK WHICH PARTS SHOULD BE CHANGED
#=================================================
-change_domain=0
-if [ "$old_domain" != "$new_domain" ]
+#REMOVEME? change_domain=0
+#REMOVEME? if [ "$old_domain" != "$new_domain" ]
then
- change_domain=1
+ #REMOVEME? change_domain=1
fi
-change_path=0
-if [ "$old_path" != "$new_path" ]
+#REMOVEME? change_path=0
+#REMOVEME? if [ "$old_path" != "$new_path" ]
then
- change_path=1
+ #REMOVEME? change_path=1
fi
#=================================================
@@ -78,28 +78,30 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path=systemd
#=================================================
ynh_script_progression --message="Updating NGINX web server configuration..."
-nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf
+ynh_change_url_nginx_config
+
+#REMOVEME? nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf
# Change the path in the NGINX config file
if [ $change_path -eq 1 ]
then
# Make a backup of the original NGINX config file if modified
- ynh_backup_if_checksum_is_different --file="$nginx_conf_path"
+#REMOVEME? ynh_backup_if_checksum_is_different --file="$nginx_conf_path"
# Set global variables for NGINX helper
- domain="$old_domain"
- path_url="$new_path"
+#REMOVEME? domain="$old_domain"
+#REMOVEME? path="$new_path"
# Create a dedicated NGINX config
- ynh_add_nginx_config
+#REMOVEME? ynh_add_nginx_config
fi
# Change the domain for NGINX
if [ $change_domain -eq 1 ]
then
# Delete file checksum for the old conf file location
- ynh_delete_file_checksum --file="$nginx_conf_path"
- mv $nginx_conf_path /etc/nginx/conf.d/$new_domain.d/$app.conf
+#REMOVEME? ynh_delete_file_checksum --file="$nginx_conf_path"
+#REMOVEME? mv $nginx_conf_path /etc/nginx/conf.d/$new_domain.d/$app.conf
# Store file checksum for the new config file location
- ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf"
+#REMOVEME? ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf"
fi
#=================================================
@@ -115,9 +117,9 @@ ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --lin
#=================================================
# RELOAD NGINX
#=================================================
-ynh_script_progression --message="Reloading NGINX web server..."
+#REMOVEME? ynh_script_progression --message="Reloading NGINX web server..."
-ynh_systemd_action --service_name=nginx --action=reload
+#REMOVEME? #REMOVEME? ynh_systemd_action --service_name=nginx --action=reload
#=================================================
# END OF SCRIPT
diff --git a/scripts/install b/scripts/install
index d822f67..9486836 100644
--- a/scripts/install
+++ b/scripts/install
@@ -13,56 +13,56 @@ source /usr/share/yunohost/helpers
# MANAGE SCRIPT FAILURE
#=================================================
-ynh_clean_setup () {
+#REMOVEME? ynh_clean_setup () {
ynh_clean_check_starting
}
# Exit if an error occurs during the execution of the script
-ynh_abort_if_errors
+#REMOVEME? ynh_abort_if_errors
#=================================================
# RETRIEVE ARGUMENTS FROM THE MANIFEST
#=================================================
-domain=$YNH_APP_ARG_DOMAIN
-path_url=$YNH_APP_ARG_PATH
-admin=$YNH_APP_ARG_ADMIN
+#REMOVEME? domain=$YNH_APP_ARG_DOMAIN
+#REMOVEME? path=$YNH_APP_ARG_PATH
+#REMOVEME? admin=$YNH_APP_ARG_ADMIN
architecture=$YNH_ARCH
-app=$YNH_APP_INSTANCE_NAME
+#REMOVEME? app=$YNH_APP_INSTANCE_NAME
#=================================================
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
#=================================================
-ynh_script_progression --message="Validating installation parameters..."
+#REMOVEME? ynh_script_progression --message="Validating installation parameters..."
-final_path=/var/www/$app
-test ! -e "$final_path" || ynh_die --message="This path already contains a folder"
+#REMOVEME? install_dir=/var/www/$app
+#REMOVEME? test ! -e "$install_dir" || ynh_die --message="This path already contains a folder"
# Register (book) web path
-ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url
+#REMOVEME? ynh_webpath_register --app=$app --domain=$domain --path=$path
#=================================================
# STORE SETTINGS FROM MANIFEST
#=================================================
-ynh_script_progression --message="Storing installation settings..."
+#REMOVEME? ynh_script_progression --message="Storing installation settings..."
-ynh_app_setting_set --app=$app --key=domain --value=$domain
-ynh_app_setting_set --app=$app --key=path --value=$path_url
-ynh_app_setting_set --app=$app --key=admin --value=$admin
+#REMOVEME? ynh_app_setting_set --app=$app --key=domain --value=$domain
+#REMOVEME? ynh_app_setting_set --app=$app --key=path --value=$path
+#REMOVEME? ynh_app_setting_set --app=$app --key=admin --value=$admin
#=================================================
# STANDARD MODIFICATIONS
#=================================================
# FIND AND OPEN A PORT
#=================================================
-ynh_script_progression --message="Finding an available port..."
+#REMOVEME? ynh_script_progression --message="Finding an available port..."
# Find an available port
-port=$(ynh_find_port --port=22000)
-ynh_app_setting_set --app=$app --key=port --value=$port
+#REMOVEME? port=$(ynh_find_port --port=22000)
+#REMOVEME? ynh_app_setting_set --app=$app --key=port --value=$port
-gui_port=$(ynh_find_port --port=8384)
-ynh_app_setting_set --app=$app --key=gui_port --value=$gui_port
+#REMOVEME? gui_port=$(ynh_find_port --port=8384)
+#REMOVEME? ynh_app_setting_set --app=$app --key=gui_port --value=$gui_port
# Open the port
ynh_script_progression --message="Configuring firewall..."
@@ -71,23 +71,23 @@ ynh_exec_warn_less yunohost firewall allow TCP $port
#=================================================
# CREATE DEDICATED USER
#=================================================
-ynh_script_progression --message="Configuring system user..."
+#REMOVEME? ynh_script_progression --message="Configuring system user..."
# Create a system user
-ynh_system_user_create --username=$app --home_dir=$final_path
+#REMOVEME? ynh_system_user_create --username=$app --home_dir=$install_dir
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
ynh_script_progression --message="Setting up source files..."
-ynh_app_setting_set --app=$app --key=final_path --value=$final_path
+#REMOVEME? ynh_app_setting_set --app=$app --key=install_dir --value=$install_dir
# Download, check integrity, uncompress and patch the source from app.src
-ynh_setup_source --dest_dir="$final_path" --source_id=$architecture
+ynh_setup_source --dest_dir="$install_dir" --source_id=$architecture
-chmod 750 "$final_path"
-chmod -R o-rwx "$final_path"
-chown -R $app:$app "$final_path"
+chmod 750 "$install_dir"
+chmod -R o-rwx "$install_dir"
+chown -R $app:$app "$install_dir"
#=================================================
# NGINX CONFIGURATION
@@ -104,22 +104,22 @@ ynh_add_nginx_config
#=================================================
ynh_script_progression --message="Creating a data directory..."
-datadir=/home/yunohost.app/$app
-ynh_app_setting_set --app=$app --key=datadir --value=$datadir
+#REMOVEME? data_dir=/home/yunohost.app/$app
+#REMOVEME? ynh_app_setting_set --app=$app --key=data_dir --value=$data_dir
-mkdir -p $datadir
+mkdir -p $data_dir
-chmod 750 "$datadir"
-chmod -R o-rwx "$datadir"
-chown -R $app:$app "$datadir"
+chmod 750 "$data_dir"
+chmod -R o-rwx "$data_dir"
+chown -R $app:$app "$data_dir"
#=================================================
# ADD A CONFIGURATION
#=================================================
ynh_script_progression --message="Adding a configuration file..."
-mkdir -p "$final_path/.config/syncthing"
-config_file="$final_path/.config/syncthing/config.xml"
+mkdir -p "$install_dir/.config/syncthing"
+config_file="$install_dir/.config/syncthing/config.xml"
ynh_add_config --template="../conf/config.xml" --destination="$config_file"
chmod 400 "$config_file"
@@ -138,7 +138,7 @@ ynh_add_systemd_config
#=================================================
ynh_script_progression --message="Fixing listening service..."
-chown -R $app: $final_path
+chown -R $app: $install_dir
ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="Access the GUI via the following URL"
@@ -167,18 +167,18 @@ ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --lin
#=================================================
# SETUP SSOWAT
#=================================================
-ynh_script_progression --message="Configuring permissions..."
+#REMOVEME? ynh_script_progression --message="Configuring permissions..."
# Everyone can access the app.
# The "main" permission is automatically created before the install script.
-ynh_permission_update --permission="main" --add="visitors"
+#REMOVEME? ynh_permission_update --permission="main" --add="visitors"
#=================================================
# RELOAD NGINX
#=================================================
-ynh_script_progression --message="Reloading NGINX web server..."
+#REMOVEME? ynh_script_progression --message="Reloading NGINX web server..."
-ynh_systemd_action --service_name=nginx --action=reload
+#REMOVEME? ynh_systemd_action --service_name=nginx --action=reload
#=================================================
# END OF SCRIPT
diff --git a/scripts/remove b/scripts/remove
index f6e9f92..37bf94a 100644
--- a/scripts/remove
+++ b/scripts/remove
@@ -12,14 +12,14 @@ source /usr/share/yunohost/helpers
#=================================================
# LOAD SETTINGS
#=================================================
-ynh_script_progression --message="Loading installation settings..."
+#REMOVEME? ynh_script_progression --message="Loading installation settings..."
-app=$YNH_APP_INSTANCE_NAME
+#REMOVEME? app=$YNH_APP_INSTANCE_NAME
-domain=$(ynh_app_setting_get --app=$app --key=domain)
-port=$(ynh_app_setting_get --app=$app --key=port)
-final_path=$(ynh_app_setting_get --app=$app --key=final_path)
-datadir=$(ynh_app_setting_get --app=$app --key=datadir)
+#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain)
+#REMOVEME? port=$(ynh_app_setting_get --app=$app --key=port)
+#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir)
+#REMOVEME? data_dir=$(ynh_app_setting_get --app=$app --key=data_dir)
#=================================================
# STANDARD REMOVE
@@ -45,10 +45,10 @@ ynh_remove_systemd_config
#=================================================
# REMOVE APP MAIN DIR
#=================================================
-ynh_script_progression --message="Removing app main directory..."
+#REMOVEME? ynh_script_progression --message="Removing app main directory..."
# Remove the app directory securely
-ynh_secure_remove --file="$final_path"
+#REMOVEME? ynh_secure_remove --file="$install_dir"
#=================================================
# REMOVE DATA DIR
@@ -58,7 +58,7 @@ ynh_secure_remove --file="$final_path"
if [ "${YNH_APP_PURGE:-0}" -eq 1 ]
then
ynh_script_progression --message="Removing app data directory..."
- ynh_secure_remove --file="$datadir"
+#REMOVEME? ynh_secure_remove --file="$data_dir"
fi
#=================================================
@@ -84,10 +84,10 @@ fi
#=================================================
# REMOVE DEDICATED USER
#=================================================
-ynh_script_progression --message="Removing the dedicated system user..."
+#REMOVEME? ynh_script_progression --message="Removing the dedicated system user..."
# Delete a system user
-ynh_system_user_delete --username=$app
+#REMOVEME? ynh_system_user_delete --username=$app
#=================================================
# END OF SCRIPT
diff --git a/scripts/restore b/scripts/restore
index ef19662..6160be8 100644
--- a/scripts/restore
+++ b/scripts/restore
@@ -14,32 +14,32 @@ source /usr/share/yunohost/helpers
# MANAGE SCRIPT FAILURE
#=================================================
-ynh_clean_setup () {
+#REMOVEME? ynh_clean_setup () {
ynh_clean_check_starting
}
# Exit if an error occurs during the execution of the script
-ynh_abort_if_errors
+#REMOVEME? ynh_abort_if_errors
#=================================================
# LOAD SETTINGS
#=================================================
-ynh_script_progression --message="Loading installation settings..."
+#REMOVEME? ynh_script_progression --message="Loading installation settings..."
-app=$YNH_APP_INSTANCE_NAME
+#REMOVEME? app=$YNH_APP_INSTANCE_NAME
-domain=$(ynh_app_setting_get --app=$app --key=domain)
-path_url=$(ynh_app_setting_get --app=$app --key=path)
-final_path=$(ynh_app_setting_get --app=$app --key=final_path)
-port=$(ynh_app_setting_get --app=$app --key=port)
-datadir=$(ynh_app_setting_get --app=$app --key=datadir)
+#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain)
+#REMOVEME? path=$(ynh_app_setting_get --app=$app --key=path)
+#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir)
+#REMOVEME? port=$(ynh_app_setting_get --app=$app --key=port)
+#REMOVEME? data_dir=$(ynh_app_setting_get --app=$app --key=data_dir)
#=================================================
# CHECK IF THE APP CAN BE RESTORED
#=================================================
-ynh_script_progression --message="Validating restoration parameters..."
+#REMOVEME? ynh_script_progression --message="Validating restoration parameters..."
-test ! -d $final_path \
- || ynh_die --message="There is already a directory: $final_path "
+#REMOVEME? test ! -d $install_dir \
+ || ynh_die --message="There is already a directory: $install_dir "
#=================================================
# STANDARD RESTORATION STEPS
@@ -61,34 +61,34 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# RECREATE THE DEDICATED USER
#=================================================
-ynh_script_progression --message="Recreating the dedicated system user..."
+#REMOVEME? ynh_script_progression --message="Recreating the dedicated system user..."
# Create the dedicated user (if not existing)
-ynh_system_user_create --username=$app --home_dir=$final_path
+#REMOVEME? ynh_system_user_create --username=$app --home_dir=$install_dir
#=================================================
# RESTORE THE APP MAIN DIR
#=================================================
ynh_script_progression --message="Restoring the app main directory..."
-ynh_restore_file --origin_path="$final_path"
+ynh_restore_file --origin_path="$install_dir"
-chmod 750 "$final_path"
-chmod -R o-rwx "$final_path"
-chown -R $app:$app "$final_path"
+chmod 750 "$install_dir"
+chmod -R o-rwx "$install_dir"
+chown -R $app:$app "$install_dir"
#=================================================
# RESTORE THE DATA DIRECTORY
#=================================================
ynh_script_progression --message="Restoring the data directory..."
-ynh_restore_file --origin_path="$datadir" --not_mandatory
+ynh_restore_file --origin_path="$data_dir" --not_mandatory
-mkdir -p $datadir
+mkdir -p $data_dir
-chmod 750 "$datadir"
-chmod -R o-rwx "$datadir"
-chown -R $app:$app "$datadir"
+chmod 750 "$data_dir"
+chmod -R o-rwx "$data_dir"
+chown -R $app:$app "$data_dir"
#=================================================
# SPECIFIC RESTORATION
diff --git a/scripts/upgrade b/scripts/upgrade
index 418c1dc..8f67ecd 100644
--- a/scripts/upgrade
+++ b/scripts/upgrade
@@ -12,18 +12,18 @@ source /usr/share/yunohost/helpers
#=================================================
# LOAD SETTINGS
#=================================================
-ynh_script_progression --message="Loading installation settings..."
+#REMOVEME? ynh_script_progression --message="Loading installation settings..."
-app=$YNH_APP_INSTANCE_NAME
+#REMOVEME? app=$YNH_APP_INSTANCE_NAME
-domain=$(ynh_app_setting_get --app=$app --key=domain)
-path_url=$(ynh_app_setting_get --app=$app --key=path)
-final_path=$(ynh_app_setting_get --app=$app --key=final_path)
+#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain)
+#REMOVEME? path=$(ynh_app_setting_get --app=$app --key=path)
+#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir)
architecture=$YNH_ARCH
-datadir=$(ynh_app_setting_get --app=$app --key=datadir)
-port=$(ynh_app_setting_get --app=$app --key=port)
-gui_port=$(ynh_app_setting_get --app=$app --key=gui_port)
+#REMOVEME? data_dir=$(ynh_app_setting_get --app=$app --key=data_dir)
+#REMOVEME? port=$(ynh_app_setting_get --app=$app --key=port)
+#REMOVEME? gui_port=$(ynh_app_setting_get --app=$app --key=gui_port)
#=================================================
# CHECK VERSION
@@ -35,16 +35,16 @@ upgrade_type=$(ynh_check_app_version_changed)
#=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#=================================================
-ynh_script_progression --message="Backing up the app before upgrading (may take a while)..."
+#REMOVEME? ynh_script_progression --message="Backing up the app before upgrading (may take a while)..."
# Backup the current version of the app
-ynh_backup_before_upgrade
-ynh_clean_setup () {
+#REMOVEME? ynh_backup_before_upgrade
+#REMOVEME? ynh_clean_setup () {
# Restore it if the upgrade fails
- ynh_restore_upgradebackup
+#REMOVEME? ynh_restore_upgradebackup
}
# Exit if an error occurs during the execution of the script
-ynh_abort_if_errors
+#REMOVEME? ynh_abort_if_errors
#=================================================
# STANDARD UPGRADE STEPS
@@ -68,26 +68,26 @@ if [ -z $gui_port ]; then
OLD_GUIPORT=8384
OLD_CONFIG="$OLD_SYNCHOME/.config/syncthing/config.xml"
- admin=$(ynh_app_setting_get $app allowed_users)
- ynh_app_setting_set --app=$app --key=admin --value=$admin
+#REMOVEME? admin=$(ynh_app_setting_get $app allowed_users)
+#REMOVEME? ynh_app_setting_set --app=$app --key=admin --value=$admin
ynh_app_setting_delete --app="$app" --key="allowed_users"
-
- final_path=/var/www/$app
- ynh_app_setting_set --app=$app --key=final_path --value=$final_path
+#REMOVEME?
+ install_dir=/var/www/$app
+#REMOVEME? ynh_app_setting_set --app=$app --key=install_dir --value=$install_dir
gui_port=$OLD_GUIPORT
- ynh_app_setting_set --app=$app --key=gui_port --value=$gui_port
+#REMOVEME? ynh_app_setting_set --app=$app --key=gui_port --value=$gui_port
- datadir="/home/yunohost.app/$app"
- ynh_app_setting_set --app=$app --key=datadir --value=$datadir
+ data_dir="/home/yunohost.app/$app"
+#REMOVEME? ynh_app_setting_set --app=$app --key=data_dir --value=$data_dir
port=$OLD_SYNCPORT
- ynh_app_setting_set --app=$app --key=port --value=$port
+#REMOVEME? ynh_app_setting_set --app=$app --key=port --value=$port
- mkdir -p $final_path
- cp -R $OLD_SYNCHOME/.config $final_path/.config
+ mkdir -p $install_dir
+ cp -R $OLD_SYNCHOME/.config $install_dir/.config
- ynh_replace_string --match_string="~" --replace_string="$datadir" --target_file="$final_path/.config/syncthing/config.xml"
+ ynh_replace_string --match_string="~" --replace_string="$data_dir" --target_file="$install_dir/.config/syncthing/config.xml"
systemctl stop syncthing@$OLD_SYNCUSER.service
yunohost service remove syncthing@$OLD_SYNCUSER.service
@@ -95,30 +95,30 @@ if [ -z $gui_port ]; then
ynh_secure_remove --file="/etc/apt/sources.list.d/syncthing.list"
- ynh_system_user_delete --username="$SYNCUSER"
+#REMOVEME? ynh_system_user_delete --username="$SYNCUSER"
ynh_remove_logrotate
- ynh_remove_app_dependencies
+#REMOVEME? ynh_remove_app_dependencies
fi
# If port doesn't exist, create it
if [ -z $port ]; then
- port=$(ynh_app_setting_get --app=$app --key=sync_port)
- ynh_app_setting_set --app=$app --key=port --value=$port
+#REMOVEME? port=$(ynh_app_setting_get --app=$app --key=sync_port)
+#REMOVEME? ynh_app_setting_set --app=$app --key=port --value=$port
ynh_app_setting_delete --app=$app --key=sync_port
fi
-# If datadir doesn't exist, create it
-if [ -z $datadir ]; then
- datadir=$(ynh_app_setting_get --app=$app --key=sync_home)
- ynh_app_setting_set --app=$app --key=datadir --value=$datadir
+# If data_dir doesn't exist, create it
+if [ -z $data_dir ]; then
+#REMOVEME? data_dir=$(ynh_app_setting_get --app=$app --key=sync_home)
+#REMOVEME? ynh_app_setting_set --app=$app --key=data_dir --value=$data_dir
ynh_app_setting_delete --app="$app" --key="sync_home"
fi
# Cleaning legacy permissions
-if ynh_legacy_permissions_exists; then
- ynh_legacy_permissions_delete_all
+#REMOVEME? if ynh_legacy_permissions_exists; then
+#REMOVEME? ynh_legacy_permissions_delete_all
ynh_app_setting_delete --app=$app --key=is_public
fi
@@ -126,10 +126,10 @@ fi
#=================================================
# CREATE DEDICATED USER
#=================================================
-ynh_script_progression --message="Making sure dedicated system user exists..."
+#REMOVEME? ynh_script_progression --message="Making sure dedicated system user exists..."
# Create a dedicated user (if not existing)
-ynh_system_user_create --username=$app --home_dir=$final_path
+#REMOVEME? ynh_system_user_create --username=$app --home_dir=$install_dir
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
@@ -140,12 +140,12 @@ then
ynh_script_progression --message="Upgrading source files..."
# Download, check integrity, uncompress and patch the source from app.src
- ynh_setup_source --dest_dir="$final_path" --source_id=$architecture
+ ynh_setup_source --dest_dir="$install_dir" --source_id=$architecture
fi
-chmod 750 "$final_path"
-chmod -R o-rwx "$final_path"
-chown -R $app:$app "$final_path"
+chmod 750 "$install_dir"
+chmod -R o-rwx "$install_dir"
+chown -R $app:$app "$install_dir"
#=================================================
# NGINX CONFIGURATION
@@ -163,17 +163,17 @@ ynh_add_nginx_config
ynh_script_progression --message="Creating a data directory..."
# Make directories and set rights
-mkdir -p "$datadir"
-chmod 750 "$datadir"
-chmod -R o-rwx "$datadir"
-chown -R $app:$app "$datadir"
+mkdir -p "$data_dir"
+chmod 750 "$data_dir"
+chmod -R o-rwx "$data_dir"
+chown -R $app:$app "$data_dir"
#=================================================
# UPDATE A CONFIG FILE
#=================================================
ynh_script_progression --message="Updating a configuration file..."
-config_file="$final_path/.config/syncthing/config.xml"
+config_file="$install_dir/.config/syncthing/config.xml"
ynh_backup_if_checksum_is_different --file="$config_file"
# Recalculate and store the checksum of the file for the next upgrade.
@@ -211,9 +211,9 @@ ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --lin
#=================================================
# RELOAD NGINX
#=================================================
-ynh_script_progression --message="Reloading NGINX web server..."
+#REMOVEME? ynh_script_progression --message="Reloading NGINX web server..."
-ynh_systemd_action --service_name=nginx --action=reload
+#REMOVEME? ynh_systemd_action --service_name=nginx --action=reload
#=================================================
# END OF SCRIPT
From 85455c5bc77d7a26e544e3b236bd2a024a22cc7f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?E=CC=81ric=20Gaspar?=
<46165813+ericgaspar@users.noreply.github.com>
Date: Tue, 4 Apr 2023 09:37:45 +0200
Subject: [PATCH 02/24] v2
---
.github/workflows/updater.sh | 146 ----------------------------------
.github/workflows/updater.yml | 50 ------------
check_process | 101 -----------------------
conf/config.xml | 2 +-
conf/nginx.conf | 2 +-
doc/DISCLAIMER.md | 0
manifest.json | 52 ------------
manifest.toml | 23 +++---
scripts/_common.sh | 3 -
scripts/backup | 21 -----
scripts/change_url | 86 --------------------
scripts/install | 103 +-----------------------
scripts/remove | 51 ------------
scripts/restore | 88 +++-----------------
scripts/upgrade | 130 +-----------------------------
tests.toml | 15 ++++
16 files changed, 40 insertions(+), 833 deletions(-)
delete mode 100644 .github/workflows/updater.sh
delete mode 100644 .github/workflows/updater.yml
delete mode 100644 check_process
delete mode 100644 doc/DISCLAIMER.md
delete mode 100644 manifest.json
create mode 100644 tests.toml
diff --git a/.github/workflows/updater.sh b/.github/workflows/updater.sh
deleted file mode 100644
index 80f1948..0000000
--- a/.github/workflows/updater.sh
+++ /dev/null
@@ -1,146 +0,0 @@
-#!/bin/bash
-
-#=================================================
-# PACKAGE UPDATING HELPER
-#=================================================
-
-# This script is meant to be run by GitHub Actions
-# The YunoHost-Apps organisation offers a template Action to run this script periodically
-# Since each app is different, maintainers can adapt its contents so as to perform
-# automatic actions when a new upstream release is detected.
-
-#=================================================
-# FETCHING LATEST RELEASE AND ITS ASSETS
-#=================================================
-
-# Fetching information
-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)
-assets=($(curl --silent "https://api.github.com/repos/$repo/releases" | jq -r '[ .[] | select(.tag_name=="'$version'").assets[].browser_download_url ] | join(" ") | @sh' | tr -d "'"))
-
-# Later down the script, we assume the version has only digits and dots
-# Sometimes the release name starts with a "v", so let's filter it out.
-# You may need more tweaks here if the upstream repository has different naming conventions.
-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"
-echo "VERSION=$version" >> $GITHUB_ENV
-echo "REPO=$repo" >> $GITHUB_ENV
-# For the time being, let's assume the script will fail
-echo "PROCEED=false" >> $GITHUB_ENV
-
-# Proceed only if the retrieved version is greater than the current one
-if ! dpkg --compare-versions "$current_version" "lt" "$version" ; then
- echo "::warning ::No new version available"
- exit 0
-# Proceed only if a PR for this new version does not already exist
-elif git ls-remote -q --exit-code --heads https://github.com/$GITHUB_REPOSITORY.git ci-auto-update-v$version ; then
- echo "::warning ::A branch already exists for this update"
- exit 0
-fi
-
-# Each release can hold multiple assets (e.g. binaries for different architectures, source code, etc.)
-echo "${#assets[@]} available asset(s)"
-
-#=================================================
-# UPDATE SOURCE FILES
-#=================================================
-
-# Here we use the $assets variable to get the resources published in the upstream release.
-# Here is an example for Grav, it has to be adapted in accordance with how the upstream releases look like.
-
-# Let's loop over the array of assets URLs
-for asset_url in ${assets[@]}; do
-
- echo "Handling asset at $asset_url"
-
- # Assign the asset to a source file in conf/ directory
- # 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
- *"linux-arm-"*)
- src="armhf"
- ;;
- *"linux-arm64-"*)
- src="arm64"
- ;;
- *"linux-386-"*)
- src="i386"
- ;;
- *"linux-amd64-"*)
- src="amd64"
- ;;
- *)
- src=""
- ;;
- esac
-
- # If $src is not empty, let's process the asset
- if [ ! -z "$src" ]; then
-
- # Create the temporary directory
- tempdir="$(mktemp -d)"
-
- # Download sources and calculate checksum
- filename=${asset_url##*/}
- curl --silent -4 -L $asset_url -o "$tempdir/$filename"
- checksum=$(sha256sum "$tempdir/$filename" | head -c 64)
-
- # Delete temporary directory
- rm -rf $tempdir
-
- # Get extension
- if [[ $filename == *.tar.gz ]]; then
- extension=tar.gz
- else
- extension=${filename##*.}
- fi
-
- # Rewrite source file
- cat < conf/$src.src
-SOURCE_URL=$asset_url
-SOURCE_SUM=$checksum
-SOURCE_SUM_PRG=sha256sum
-SOURCE_FORMAT=$extension
-SOURCE_IN_SUBDIR=true
-SOURCE_FILENAME=
-SOURCE_EXTRACT=true
-EOT
- echo "... conf/$src.src updated"
- if [ "$src" == "armhf" ]
- then
- cp -f conf/armhf.src conf/armel.src
- echo "... conf/armel.src updated"
- fi
-
- else
- echo "... asset ignored"
- fi
-
-done
-
-#=================================================
-# SPECIFIC UPDATE STEPS
-#=================================================
-
-# Any action on the app's source code can be done.
-# The GitHub Action workflow takes care of committing all changes after this script ends.
-
-#=================================================
-# GENERIC FINALIZATION
-#=================================================
-
-# Replace new version in manifest
-echo "$(jq -s --indent 4 ".[] | .version = \"$version~ynh1\"" manifest.json)" > manifest.json
-
-# No need to update the README, yunohost-bot takes care of it
-
-# The Action will proceed only if the PROCEED environment variable is set to true
-echo "PROCEED=true" >> $GITHUB_ENV
-exit 0
diff --git a/.github/workflows/updater.yml b/.github/workflows/updater.yml
deleted file mode 100644
index 08ec1b3..0000000
--- a/.github/workflows/updater.yml
+++ /dev/null
@@ -1,50 +0,0 @@
-# This workflow allows GitHub Actions to automagically update your app whenever a new upstream release is detected.
-# You need to enable Actions in your repository settings, and fetch this Action from the YunoHost-Apps organization.
-# This file should be enough by itself, but feel free to tune it to your needs.
-# It calls updater.sh, which is where you should put the app-specific update steps.
-name: Check for new upstream releases
-on:
- # Allow to manually trigger the workflow
- workflow_dispatch:
- # Run it every day at 6:00 UTC
- schedule:
- - cron: '0 6 * * *'
-jobs:
- updater:
- runs-on: ubuntu-latest
- steps:
- - name: Fetch the source code
- uses: actions/checkout@v3
- with:
- token: ${{ secrets.GITHUB_TOKEN }}
- - name: Run the updater script
- id: run_updater
- run: |
- # Setting up Git user
- git config --global user.name 'yunohost-bot'
- git config --global user.email 'yunohost-bot@users.noreply.github.com'
- # Run the updater script
- /bin/bash .github/workflows/updater.sh
- - name: Commit changes
- id: commit
- if: ${{ env.PROCEED == 'true' }}
- run: |
- git commit -am "Upgrade to v$VERSION"
- - name: Create Pull Request
- id: cpr
- if: ${{ env.PROCEED == 'true' }}
- uses: peter-evans/create-pull-request@v4
- with:
- token: ${{ secrets.GITHUB_TOKEN }}
- commit-message: Update to version ${{ env.VERSION }}
- committer: 'yunohost-bot '
- author: 'yunohost-bot '
- signoff: false
- base: testing
- branch: ci-auto-update-v${{ env.VERSION }}
- delete-branch: true
- title: 'Upgrade to version ${{ env.VERSION }}'
- body: |
- Upgrade to v${{ env.VERSION }}
- draft: false
-
diff --git a/check_process b/check_process
deleted file mode 100644
index 7a11dff..0000000
--- a/check_process
+++ /dev/null
@@ -1,101 +0,0 @@
-;; Test complet
- ; Manifest
- domain="domain.tld"
- path="/path"
- admin="john"
- ; Checks
- pkg_linter=1
- setup_sub_dir=1
- setup_root=1
- setup_nourl=0
- setup_private=0
- setup_public=1
- upgrade=1
- # 1.1.1
- #upgrade=1 from_commit=571623f6ea0dc6310a8d6b991b03c4a84337ce92
- # 1.3.3
- #upgrade=1 from_commit=2b2b346b2d154653ff2affb5679a7cd8d60892fa
- # 1.4.0
- #upgrade=1 from_commit=cfd8f2894d381f0b1149b1061dff695c0941fcc3
- # 1.4.2
- #upgrade=1 from_commit=a351c2b6431a3ac092f3581a9778a402ec81f963
- # 1.5.0~ynh1
- #upgrade=1 from_commit=91793d91bca31838cbb97782a633d3732e178b8a
- # 1.6.1~ynh1
- #upgrade=1 from_commit=73bac603324544f2ae3de05487f804a09c0a3673
- # 1.8.0~ynh1
- #upgrade=1 from_commit=36c6b16e1ede95d51d3ddcbf8b00f6f2ee1a843f
- # 1.10.0~ynh1
- #upgrade=1 from_commit=f8bfd49d14a7050f30452884c6d59c972c2843ef
- # 1.12.0~ynh1
- #upgrade=1 from_commit=89687d0fb06f4743328b1198c7861d7d9d624641
- # 1.13.1~ynh1
- #upgrade=1 from_commit=50e824fe22fb9ba82c8a7606afb03fa3f9998463
- # 1.14.0~ynh1
- #upgrade=1 from_commit=ae0a88df0bf4a3d684f95e21245ee1e0de4d54f4
- # 1.14.0~ynh2
- #upgrade=1 from_commit=201eab3c30f6a72de8c704190e66e11baf517a8a
- # 1.15.1~ynh1
- #upgrade=1 from_commit=f373714a18c855c936c86b389d1ef0cf46da447b
- # 1.15.1~ynh2
- #upgrade=1 from_commit=2a0a768ba1e8c93c2cd1b3ef97ac558c86ddc72c
- # 1.16.1~ynh1
- #upgrade=1 from_commit=a1a1134571e6f9d274b6772358bedfb4b775fe5a
- # 1.17.0~ynh1
- #upgrade=1 from_commit=3d2f2de9824f4e76c506bb587e4167255ff5f900
- # 1.18.0~ynh1
- #upgrade=1 from_commit=ba40babc2a4dce4557fc57ab0dd19dc49a70f637
- # 1.18.1~ynh1
- #upgrade=1 from_commit=3e69fac2078f96ba5a4cb73966345f44a95147bf
- # 1.18.2~ynh1
- upgrade=1 from_commit=f0cfbbfd9acf04d7df4d2b7c6c6f80da4db04f24
- # 1.18.6~ynh1
- upgrade=1 from_commit=75e55a85c81efbd26a2b2120916becb6940367ba
- backup_restore=1
- multi_instance=1
- port_already_use=0
- change_url=1
-;;; Options
-Email=yalh@yahoo.com
-Notification=all
-;;; Upgrade options
- ; commit=571623f6ea0dc6310a8d6b991b03c4a84337ce92
- name=1.1.1
- ; commit=2b2b346b2d154653ff2affb5679a7cd8d60892fa
- name=1.3.3
- ; commit=cfd8f2894d381f0b1149b1061dff695c0941fcc3
- name=1.4.0
- ; commit=a351c2b6431a3ac092f3581a9778a402ec81f963
- name=1.4.2
- ; commit=91793d91bca31838cbb97782a633d3732e178b8a
- name=1.5.0~ynh1
- ; commit=73bac603324544f2ae3de05487f804a09c0a3673
- name=1.6.1~ynh1
- ; commit=36c6b16e1ede95d51d3ddcbf8b00f6f2ee1a843f
- name=1.8.0~ynh1
- ; commit=f8bfd49d14a7050f30452884c6d59c972c2843ef
- name=1.10.0~ynh1
- ; commit=89687d0fb06f4743328b1198c7861d7d9d624641
- name=1.12.0~ynh1
- ; commit=50e824fe22fb9ba82c8a7606afb03fa3f9998463
- name=1.13.1~ynh1
- ; commit=ae0a88df0bf4a3d684f95e21245ee1e0de4d54f4
- name=1.14.0~ynh1
- ; commit=201eab3c30f6a72de8c704190e66e11baf517a8a
- name=1.14.0~ynh2
- ; commit=f373714a18c855c936c86b389d1ef0cf46da447b
- name=1.15.1~ynh1
- ; commit=2a0a768ba1e8c93c2cd1b3ef97ac558c86ddc72c
- name=1.15.1~ynh2
- ; commit=a1a1134571e6f9d274b6772358bedfb4b775fe5a
- name=1.16.1~ynh1
- ; commit=3d2f2de9824f4e76c506bb587e4167255ff5f900
- name=1.17.0~ynh1
- ; commit=ba40babc2a4dce4557fc57ab0dd19dc49a70f637
- name=1.18.0~ynh1
- ; commit=3e69fac2078f96ba5a4cb73966345f44a95147bf
- name=1.18.1~ynh1
- ; commit=f0cfbbfd9acf04d7df4d2b7c6c6f80da4db04f24
- name=1.18.2~ynh1
- ; commit=75e55a85c81efbd26a2b2120916becb6940367ba
- name=1.18.6~ynh1
diff --git a/conf/config.xml b/conf/config.xml
index f2b5dd3..acf1359 100644
--- a/conf/config.xml
+++ b/conf/config.xml
@@ -1,6 +1,6 @@
- 127.0.0.1:__GUI_PORT__
+ 127.0.0.1:__PORT_GUI__
ldap
diff --git a/conf/nginx.conf b/conf/nginx.conf
index edb8c18..dab67bd 100644
--- a/conf/nginx.conf
+++ b/conf/nginx.conf
@@ -4,7 +4,7 @@ location __PATH__/ {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
- proxy_pass http://127.0.0.1:__GUI_PORT__/;
+ proxy_pass http://127.0.0.1:__PORT_GUI__/;
proxy_read_timeout 600s;
proxy_send_timeout 600s;
diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md
deleted file mode 100644
index e69de29..0000000
diff --git a/manifest.json b/manifest.json
deleted file mode 100644
index af8f99c..0000000
--- a/manifest.json
+++ /dev/null
@@ -1,52 +0,0 @@
-{
- "name": "Syncthing",
- "id": "syncthing",
- "packaging_format": 1,
- "description": {
- "en": "Continuous file synchronization program",
- "fr": "Programme de synchronisation de fichiers en continu"
- },
- "version": "1.23.2~ynh1",
- "url": "https://syncthing.net/",
- "upstream": {
- "license": "MPL-2.0",
- "website": "https://syncthing.net",
- "userdoc": "https://docs.syncthing.net",
- "code": "https://github.com/syncthing/syncthing"
- },
- "license": "MPL-2.0",
- "maintainer": [
- {
- "name": "txmrl",
- "email": "txmrl@txmrl.net"
- },
- {
- "name": "yalh76"
- }
- ],
- "requirements": {
- "yunohost": ">= 4.3.0"
- },
- "multi_instance": true,
- "services": [
- "nginx"
- ],
- "arguments": {
- "install": [
- {
- "name": "domain",
- "type": "domain"
- },
- {
- "name": "path",
- "type": "path",
- "example": "/syncthing",
- "default": "/syncthing"
- },
- {
- "name": "admin",
- "type": "user"
- }
- ]
- }
-}
diff --git a/manifest.toml b/manifest.toml
index c7fc5c8..7103767 100644
--- a/manifest.toml
+++ b/manifest.toml
@@ -14,31 +14,26 @@ license = "MPL-2.0"
website = "https://syncthing.net"
userdoc = "https://docs.syncthing.net"
code = "https://github.com/syncthing/syncthing"
-cpe = "???" # FIXME: optional but recommended if relevant, this is meant to contain the Common Platform Enumeration, which is sort of a standard id for applications defined by the NIST. In particular, Yunohost may use this is in the future to easily track CVE (=security reports) related to apps. The CPE may be obtained by searching here: https://nvd.nist.gov/products/cpe/search. For example, for Nextcloud, the CPE is 'cpe:2.3:a:nextcloud:nextcloud' (no need to include the version number)
-fund = "???" # FIXME: optional but recommended (or remove if irrelevant / not applicable). This is meant to be an URL where people can financially support this app, especially when its development is based on volunteers and/or financed by its community. YunoHost may later advertise it in the webadmin.
[integration]
-yunohost = ">= 4.3.0"
-architectures = "all" # FIXME: can be replaced by a list of supported archs using the dpkg --print-architecture nomenclature (amd64/i386/armhf/arm64), for example: ["amd64", "i386"]
+yunohost = ">= 11.1.16"
+architectures = "all"
multi_instance = true
-ldap = "?" # FIXME: replace with true, false, or "not_relevant". Not to confuse with the "sso" key : the "ldap" key corresponds to wether or not a user *can* login on the app using its YunoHost credentials.
-sso = "?" # FIXME: replace with true, false, or "not_relevant". Not to confuse with the "ldap" key : the "sso" key corresponds to wether or not a user is *automatically logged-in* on the app when logged-in on the YunoHost portal.
-disk = "50M" # FIXME: replace with an **estimate** minimum disk requirement. e.g. 20M, 400M, 1G, ...
-ram.build = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ...
-ram.runtime = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ...
+ldap = true
+sso = true
+disk = "50M"
+ram.build = "50M"
+ram.runtime = "50M"
[install]
[install.domain]
- # this is a generic question - ask strings are automatically handled by Yunohost's core
type = "domain"
[install.path]
- # this is a generic question - ask strings are automatically handled by Yunohost's core
type = "path"
default = "/syncthing"
[install.admin]
- # this is a generic question - ask strings are automatically handled by Yunohost's core
type = "user"
[resources]
@@ -54,6 +49,10 @@ ram.runtime = "50M" # FIXME: replace with an **estimate** minimum ram requiremen
i386.url = "https://github.com/syncthing/syncthing/releases/download/v1.23.2/syncthing-linux-386-v1.23.2.tar.gz"
i386.sha256 = "7ba020603ead83afc6f43e0dbf59e33832414bdd055c608abc05d33d73f66757"
+ [resources.ports]
+ main.default = 22000
+ main.exposed = "TCP"
+ gui.default = 8384
[resources.system_user]
diff --git a/scripts/_common.sh b/scripts/_common.sh
index 90b04f0..944a65e 100644
--- a/scripts/_common.sh
+++ b/scripts/_common.sh
@@ -4,9 +4,6 @@
# COMMON VARIABLES
#=================================================
-# dependencies used by the app
-#REMOVEME? pkg_dependencies=""
-
#=================================================
# PERSONAL HELPERS
#=================================================
diff --git a/scripts/backup b/scripts/backup
index 1516464..45a6474 100644
--- a/scripts/backup
+++ b/scripts/backup
@@ -10,27 +10,6 @@
source ../settings/scripts/_common.sh
source /usr/share/yunohost/helpers
-#=================================================
-# MANAGE SCRIPT FAILURE
-#=================================================
-
-#REMOVEME? ynh_clean_setup () {
- true
-}
-# Exit if an error occurs during the execution of the script
-#REMOVEME? ynh_abort_if_errors
-
-#=================================================
-# LOAD SETTINGS
-#=================================================
-#REMOVEME? ynh_print_info --message="Loading installation settings..."
-
-#REMOVEME? app=$YNH_APP_INSTANCE_NAME
-
-#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir)
-#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain)
-#REMOVEME? data_dir=$(ynh_app_setting_get --app=$app --key=data_dir)
-
#=================================================
# DECLARE DATA AND CONF FILES TO BACKUP
#=================================================
diff --git a/scripts/change_url b/scripts/change_url
index b823f55..a4c2ff5 100644
--- a/scripts/change_url
+++ b/scripts/change_url
@@ -9,61 +9,6 @@
source _common.sh
source /usr/share/yunohost/helpers
-#=================================================
-# RETRIEVE ARGUMENTS
-#=================================================
-
-#REMOVEME? old_domain=$YNH_APP_OLD_DOMAIN
-#REMOVEME? old_path=$YNH_APP_OLD_PATH
-
-#REMOVEME? new_domain=$YNH_APP_NEW_DOMAIN
-#REMOVEME? new_path=$YNH_APP_NEW_PATH
-
-#REMOVEME? app=$YNH_APP_INSTANCE_NAME
-
-#=================================================
-# LOAD SETTINGS
-#=================================================
-#REMOVEME? ynh_script_progression --message="Loading installation settings..."
-
-#REMOVEME? # Needed for helper "ynh_add_nginx_config"
-#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir)
-
-#REMOVEME? gui_port=$(ynh_app_setting_get --app=$app --key=gui_port)
-
-#=================================================
-# BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP
-#=================================================
-#REMOVEME? ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..."
-
-# Backup the current version of the app
-#REMOVEME? ynh_backup_before_upgrade
-#REMOVEME? ynh_clean_setup () {
- # Remove the new domain config file, the remove script won't do it as it doesn't know yet its location.
-#REMOVEME? ynh_secure_remove --file="/etc/nginx/conf.d/$new_domain.d/$app.conf"
-
- # Restore it if the upgrade fails
-#REMOVEME? ynh_restore_upgradebackup
-}
-# Exit if an error occurs during the execution of the script
-#REMOVEME? ynh_abort_if_errors
-
-#=================================================
-# CHECK WHICH PARTS SHOULD BE CHANGED
-#=================================================
-
-#REMOVEME? change_domain=0
-#REMOVEME? if [ "$old_domain" != "$new_domain" ]
-then
- #REMOVEME? change_domain=1
-fi
-
-#REMOVEME? change_path=0
-#REMOVEME? if [ "$old_path" != "$new_path" ]
-then
- #REMOVEME? change_path=1
-fi
-
#=================================================
# STANDARD MODIFICATIONS
#=================================================
@@ -80,30 +25,6 @@ ynh_script_progression --message="Updating NGINX web server configuration..."
ynh_change_url_nginx_config
-#REMOVEME? nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf
-
-# Change the path in the NGINX config file
-if [ $change_path -eq 1 ]
-then
- # Make a backup of the original NGINX config file if modified
-#REMOVEME? ynh_backup_if_checksum_is_different --file="$nginx_conf_path"
- # Set global variables for NGINX helper
-#REMOVEME? domain="$old_domain"
-#REMOVEME? path="$new_path"
- # Create a dedicated NGINX config
-#REMOVEME? ynh_add_nginx_config
-fi
-
-# Change the domain for NGINX
-if [ $change_domain -eq 1 ]
-then
- # Delete file checksum for the old conf file location
-#REMOVEME? ynh_delete_file_checksum --file="$nginx_conf_path"
-#REMOVEME? mv $nginx_conf_path /etc/nginx/conf.d/$new_domain.d/$app.conf
- # Store file checksum for the new config file location
-#REMOVEME? ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf"
-fi
-
#=================================================
# GENERIC FINALISATION
#=================================================
@@ -114,13 +35,6 @@ ynh_script_progression --message="Starting a systemd service..."
# Start a systemd service
ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="Access the GUI via the following URL"
-#=================================================
-# RELOAD NGINX
-#=================================================
-#REMOVEME? ynh_script_progression --message="Reloading NGINX web server..."
-
-#REMOVEME? #REMOVEME? ynh_systemd_action --service_name=nginx --action=reload
-
#=================================================
# END OF SCRIPT
#=================================================
diff --git a/scripts/install b/scripts/install
index 9486836..6ba29ad 100644
--- a/scripts/install
+++ b/scripts/install
@@ -9,83 +9,14 @@
source _common.sh
source /usr/share/yunohost/helpers
-#=================================================
-# MANAGE SCRIPT FAILURE
-#=================================================
-
-#REMOVEME? ynh_clean_setup () {
- ynh_clean_check_starting
-}
-# Exit if an error occurs during the execution of the script
-#REMOVEME? ynh_abort_if_errors
-
-#=================================================
-# RETRIEVE ARGUMENTS FROM THE MANIFEST
-#=================================================
-
-#REMOVEME? domain=$YNH_APP_ARG_DOMAIN
-#REMOVEME? path=$YNH_APP_ARG_PATH
-#REMOVEME? admin=$YNH_APP_ARG_ADMIN
-architecture=$YNH_ARCH
-
-#REMOVEME? app=$YNH_APP_INSTANCE_NAME
-
-#=================================================
-# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
-#=================================================
-#REMOVEME? ynh_script_progression --message="Validating installation parameters..."
-
-#REMOVEME? install_dir=/var/www/$app
-#REMOVEME? test ! -e "$install_dir" || ynh_die --message="This path already contains a folder"
-
-# Register (book) web path
-#REMOVEME? ynh_webpath_register --app=$app --domain=$domain --path=$path
-
-#=================================================
-# STORE SETTINGS FROM MANIFEST
-#=================================================
-#REMOVEME? ynh_script_progression --message="Storing installation settings..."
-
-#REMOVEME? ynh_app_setting_set --app=$app --key=domain --value=$domain
-#REMOVEME? ynh_app_setting_set --app=$app --key=path --value=$path
-#REMOVEME? ynh_app_setting_set --app=$app --key=admin --value=$admin
-
-#=================================================
-# STANDARD MODIFICATIONS
-#=================================================
-# FIND AND OPEN A PORT
-#=================================================
-#REMOVEME? ynh_script_progression --message="Finding an available port..."
-
-# Find an available port
-#REMOVEME? port=$(ynh_find_port --port=22000)
-#REMOVEME? ynh_app_setting_set --app=$app --key=port --value=$port
-
-#REMOVEME? gui_port=$(ynh_find_port --port=8384)
-#REMOVEME? ynh_app_setting_set --app=$app --key=gui_port --value=$gui_port
-
-# Open the port
-ynh_script_progression --message="Configuring firewall..."
-ynh_exec_warn_less yunohost firewall allow TCP $port
-
-#=================================================
-# CREATE DEDICATED USER
-#=================================================
-#REMOVEME? ynh_script_progression --message="Configuring system user..."
-
-# Create a system user
-#REMOVEME? ynh_system_user_create --username=$app --home_dir=$install_dir
-
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
ynh_script_progression --message="Setting up source files..."
-#REMOVEME? ynh_app_setting_set --app=$app --key=install_dir --value=$install_dir
# Download, check integrity, uncompress and patch the source from app.src
-ynh_setup_source --dest_dir="$install_dir" --source_id=$architecture
+ynh_setup_source --dest_dir="$install_dir"
-chmod 750 "$install_dir"
chmod -R o-rwx "$install_dir"
chown -R $app:$app "$install_dir"
@@ -97,22 +28,6 @@ ynh_script_progression --message="Configuring NGINX web server..."
# Create a dedicated NGINX config
ynh_add_nginx_config
-#=================================================
-# SPECIFIC SETUP
-#=================================================
-# CREATE DATA DIRECTORY
-#=================================================
-ynh_script_progression --message="Creating a data directory..."
-
-#REMOVEME? data_dir=/home/yunohost.app/$app
-#REMOVEME? ynh_app_setting_set --app=$app --key=data_dir --value=$data_dir
-
-mkdir -p $data_dir
-
-chmod 750 "$data_dir"
-chmod -R o-rwx "$data_dir"
-chown -R $app:$app "$data_dir"
-
#=================================================
# ADD A CONFIGURATION
#=================================================
@@ -164,22 +79,6 @@ ynh_script_progression --message="Starting a systemd service..."
ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="Access the GUI via the following URL"
-#=================================================
-# SETUP SSOWAT
-#=================================================
-#REMOVEME? ynh_script_progression --message="Configuring permissions..."
-
-# Everyone can access the app.
-# The "main" permission is automatically created before the install script.
-#REMOVEME? ynh_permission_update --permission="main" --add="visitors"
-
-#=================================================
-# RELOAD NGINX
-#=================================================
-#REMOVEME? ynh_script_progression --message="Reloading NGINX web server..."
-
-#REMOVEME? ynh_systemd_action --service_name=nginx --action=reload
-
#=================================================
# END OF SCRIPT
#=================================================
diff --git a/scripts/remove b/scripts/remove
index 37bf94a..c7470cb 100644
--- a/scripts/remove
+++ b/scripts/remove
@@ -9,18 +9,6 @@
source _common.sh
source /usr/share/yunohost/helpers
-#=================================================
-# LOAD SETTINGS
-#=================================================
-#REMOVEME? ynh_script_progression --message="Loading installation settings..."
-
-#REMOVEME? app=$YNH_APP_INSTANCE_NAME
-
-#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain)
-#REMOVEME? port=$(ynh_app_setting_get --app=$app --key=port)
-#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir)
-#REMOVEME? data_dir=$(ynh_app_setting_get --app=$app --key=data_dir)
-
#=================================================
# STANDARD REMOVE
#=================================================
@@ -42,25 +30,6 @@ ynh_script_progression --message="Stopping and removing the systemd service..."
# Remove the dedicated systemd config
ynh_remove_systemd_config
-#=================================================
-# REMOVE APP MAIN DIR
-#=================================================
-#REMOVEME? ynh_script_progression --message="Removing app main directory..."
-
-# Remove the app directory securely
-#REMOVEME? ynh_secure_remove --file="$install_dir"
-
-#=================================================
-# REMOVE DATA DIR
-#=================================================
-
-# Remove the data directory if --purge option is used
-if [ "${YNH_APP_PURGE:-0}" -eq 1 ]
-then
- ynh_script_progression --message="Removing app data directory..."
-#REMOVEME? ynh_secure_remove --file="$data_dir"
-fi
-
#=================================================
# REMOVE NGINX CONFIGURATION
#=================================================
@@ -69,26 +38,6 @@ ynh_script_progression --message="Removing NGINX web server configuration..."
# Remove the dedicated NGINX config
ynh_remove_nginx_config
-#=================================================
-# CLOSE A PORT
-#=================================================
-
-if yunohost firewall list | grep -q "\- $port$"
-then
- ynh_script_progression --message="Closing port $port..."
- ynh_exec_warn_less yunohost firewall disallow TCP $port
-fi
-
-#=================================================
-# GENERIC FINALIZATION
-#=================================================
-# REMOVE DEDICATED USER
-#=================================================
-#REMOVEME? ynh_script_progression --message="Removing the dedicated system user..."
-
-# Delete a system user
-#REMOVEME? ynh_system_user_delete --username=$app
-
#=================================================
# END OF SCRIPT
#=================================================
diff --git a/scripts/restore b/scripts/restore
index 6160be8..ab1f38b 100644
--- a/scripts/restore
+++ b/scripts/restore
@@ -10,62 +10,6 @@
source ../settings/scripts/_common.sh
source /usr/share/yunohost/helpers
-#=================================================
-# MANAGE SCRIPT FAILURE
-#=================================================
-
-#REMOVEME? ynh_clean_setup () {
- ynh_clean_check_starting
-}
-# Exit if an error occurs during the execution of the script
-#REMOVEME? ynh_abort_if_errors
-
-#=================================================
-# LOAD SETTINGS
-#=================================================
-#REMOVEME? ynh_script_progression --message="Loading installation settings..."
-
-#REMOVEME? app=$YNH_APP_INSTANCE_NAME
-
-#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain)
-#REMOVEME? path=$(ynh_app_setting_get --app=$app --key=path)
-#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir)
-#REMOVEME? port=$(ynh_app_setting_get --app=$app --key=port)
-#REMOVEME? data_dir=$(ynh_app_setting_get --app=$app --key=data_dir)
-
-#=================================================
-# CHECK IF THE APP CAN BE RESTORED
-#=================================================
-#REMOVEME? ynh_script_progression --message="Validating restoration parameters..."
-
-#REMOVEME? test ! -d $install_dir \
- || ynh_die --message="There is already a directory: $install_dir "
-
-#=================================================
-# STANDARD RESTORATION STEPS
-#=================================================
-# OPEN A PORT
-#=================================================
-ynh_script_progression --message="Configuring firewall..."
-
-# Open the port
-ynh_exec_warn_less yunohost firewall allow TCP $port
-
-#=================================================
-# RESTORE THE NGINX CONFIGURATION
-#=================================================
-ynh_script_progression --message="Restoring the NGINX web server configuration..."
-
-ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
-
-#=================================================
-# RECREATE THE DEDICATED USER
-#=================================================
-#REMOVEME? ynh_script_progression --message="Recreating the dedicated system user..."
-
-# Create the dedicated user (if not existing)
-#REMOVEME? ynh_system_user_create --username=$app --home_dir=$install_dir
-
#=================================================
# RESTORE THE APP MAIN DIR
#=================================================
@@ -73,7 +17,6 @@ ynh_script_progression --message="Restoring the app main directory..."
ynh_restore_file --origin_path="$install_dir"
-chmod 750 "$install_dir"
chmod -R o-rwx "$install_dir"
chown -R $app:$app "$install_dir"
@@ -84,42 +27,31 @@ ynh_script_progression --message="Restoring the data directory..."
ynh_restore_file --origin_path="$data_dir" --not_mandatory
-mkdir -p $data_dir
-
-chmod 750 "$data_dir"
-chmod -R o-rwx "$data_dir"
chown -R $app:$app "$data_dir"
#=================================================
-# SPECIFIC RESTORATION
+# RESTORE SYSTEM CONFIGURATIONS
#=================================================
-# RESTORE SYSTEMD
+# RESTORE THE PHP-FPM CONFIGURATION
#=================================================
-ynh_script_progression --message="Restoring the systemd configuration..."
+ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1
+
+ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
systemctl enable $app.service --quiet
-#=================================================
-# INTEGRATE SERVICE IN YUNOHOST
-#=================================================
-ynh_script_progression --message="Integrating service in YunoHost..."
-
yunohost service add $app --description="$app daemon for Syncthing" --needs_exposed_ports=$port
-#=================================================
-# START SYSTEMD SERVICE
-#=================================================
-ynh_script_progression --message="Starting a systemd service..."
-
-ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="Access the GUI via the following URL"
-
#=================================================
# GENERIC FINALIZATION
#=================================================
-# RELOAD NGINX
+# RELOAD NGINX AND PHP-FPM OR THE APP SERVICE
#=================================================
-ynh_script_progression --message="Reloading NGINX web server..."
+ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1
+
+
+ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="Access the GUI via the following URL"
ynh_systemd_action --service_name=nginx --action=reload
diff --git a/scripts/upgrade b/scripts/upgrade
index 8f67ecd..9142cb1 100644
--- a/scripts/upgrade
+++ b/scripts/upgrade
@@ -9,43 +9,12 @@
source _common.sh
source /usr/share/yunohost/helpers
-#=================================================
-# LOAD SETTINGS
-#=================================================
-#REMOVEME? ynh_script_progression --message="Loading installation settings..."
-
-#REMOVEME? app=$YNH_APP_INSTANCE_NAME
-
-#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain)
-#REMOVEME? path=$(ynh_app_setting_get --app=$app --key=path)
-#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir)
-architecture=$YNH_ARCH
-
-#REMOVEME? data_dir=$(ynh_app_setting_get --app=$app --key=data_dir)
-#REMOVEME? port=$(ynh_app_setting_get --app=$app --key=port)
-#REMOVEME? gui_port=$(ynh_app_setting_get --app=$app --key=gui_port)
-
#=================================================
# CHECK VERSION
#=================================================
-ynh_script_progression --message="Checking version..."
upgrade_type=$(ynh_check_app_version_changed)
-#=================================================
-# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
-#=================================================
-#REMOVEME? ynh_script_progression --message="Backing up the app before upgrading (may take a while)..."
-
-# Backup the current version of the app
-#REMOVEME? ynh_backup_before_upgrade
-#REMOVEME? ynh_clean_setup () {
- # Restore it if the upgrade fails
-#REMOVEME? ynh_restore_upgradebackup
-}
-# Exit if an error occurs during the execution of the script
-#REMOVEME? ynh_abort_if_errors
-
#=================================================
# STANDARD UPGRADE STEPS
#=================================================
@@ -55,82 +24,6 @@ ynh_script_progression --message="Stopping a systemd service..."
ynh_systemd_action --service_name=$app --action="stop" --log_path=systemd
-#=================================================
-# ENSURE DOWNWARD COMPATIBILITY
-#=================================================
-ynh_script_progression --message="Ensuring downward compatibility..."
-
-# If gui_port doesn't exist, create it
-if [ -z $gui_port ]; then
- OLD_SYNCHOME="/home/yunohost.app/syncthing"
- OLD_SYNCUSER=debian-syncthing
- OLD_SYNCPORT=22000
- OLD_GUIPORT=8384
- OLD_CONFIG="$OLD_SYNCHOME/.config/syncthing/config.xml"
-
-#REMOVEME? admin=$(ynh_app_setting_get $app allowed_users)
-#REMOVEME? ynh_app_setting_set --app=$app --key=admin --value=$admin
- ynh_app_setting_delete --app="$app" --key="allowed_users"
-#REMOVEME?
- install_dir=/var/www/$app
-#REMOVEME? ynh_app_setting_set --app=$app --key=install_dir --value=$install_dir
-
- gui_port=$OLD_GUIPORT
-#REMOVEME? ynh_app_setting_set --app=$app --key=gui_port --value=$gui_port
-
- data_dir="/home/yunohost.app/$app"
-#REMOVEME? ynh_app_setting_set --app=$app --key=data_dir --value=$data_dir
-
- port=$OLD_SYNCPORT
-#REMOVEME? ynh_app_setting_set --app=$app --key=port --value=$port
-
- mkdir -p $install_dir
- cp -R $OLD_SYNCHOME/.config $install_dir/.config
-
- ynh_replace_string --match_string="~" --replace_string="$data_dir" --target_file="$install_dir/.config/syncthing/config.xml"
-
- systemctl stop syncthing@$OLD_SYNCUSER.service
- yunohost service remove syncthing@$OLD_SYNCUSER.service
- systemctl disable syncthing@$OLD_SYNCUSER.service --quiet
-
- ynh_secure_remove --file="/etc/apt/sources.list.d/syncthing.list"
-
-#REMOVEME? ynh_system_user_delete --username="$SYNCUSER"
-
- ynh_remove_logrotate
-
-#REMOVEME? ynh_remove_app_dependencies
-fi
-
-# If port doesn't exist, create it
-if [ -z $port ]; then
-#REMOVEME? port=$(ynh_app_setting_get --app=$app --key=sync_port)
-#REMOVEME? ynh_app_setting_set --app=$app --key=port --value=$port
- ynh_app_setting_delete --app=$app --key=sync_port
-fi
-
-# If data_dir doesn't exist, create it
-if [ -z $data_dir ]; then
-#REMOVEME? data_dir=$(ynh_app_setting_get --app=$app --key=sync_home)
-#REMOVEME? ynh_app_setting_set --app=$app --key=data_dir --value=$data_dir
- ynh_app_setting_delete --app="$app" --key="sync_home"
-fi
-
-# Cleaning legacy permissions
-#REMOVEME? if ynh_legacy_permissions_exists; then
-#REMOVEME? ynh_legacy_permissions_delete_all
-
- ynh_app_setting_delete --app=$app --key=is_public
-fi
-
-#=================================================
-# CREATE DEDICATED USER
-#=================================================
-#REMOVEME? ynh_script_progression --message="Making sure dedicated system user exists..."
-
-# Create a dedicated user (if not existing)
-#REMOVEME? ynh_system_user_create --username=$app --home_dir=$install_dir
-
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
@@ -140,10 +33,9 @@ then
ynh_script_progression --message="Upgrading source files..."
# Download, check integrity, uncompress and patch the source from app.src
- ynh_setup_source --dest_dir="$install_dir" --source_id=$architecture
+ ynh_setup_source --dest_dir="$install_dir"
fi
-chmod 750 "$install_dir"
chmod -R o-rwx "$install_dir"
chown -R $app:$app "$install_dir"
@@ -155,19 +47,6 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..."
# Create a dedicated NGINX config
ynh_add_nginx_config
-#=================================================
-# SPECIFIC UPGRADE
-#=================================================
-# CREATE DATA DIRECTORY
-#=================================================
-ynh_script_progression --message="Creating a data directory..."
-
-# Make directories and set rights
-mkdir -p "$data_dir"
-chmod 750 "$data_dir"
-chmod -R o-rwx "$data_dir"
-chown -R $app:$app "$data_dir"
-
#=================================================
# UPDATE A CONFIG FILE
#=================================================
@@ -208,13 +87,6 @@ ynh_script_progression --message="Starting a systemd service..."
ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="Access the GUI via the following URL"
-#=================================================
-# RELOAD NGINX
-#=================================================
-#REMOVEME? ynh_script_progression --message="Reloading NGINX web server..."
-
-#REMOVEME? ynh_systemd_action --service_name=nginx --action=reload
-
#=================================================
# END OF SCRIPT
#=================================================
diff --git a/tests.toml b/tests.toml
new file mode 100644
index 0000000..a405939
--- /dev/null
+++ b/tests.toml
@@ -0,0 +1,15 @@
+test_format = 1.0
+
+[default]
+
+ # ------------
+ # Tests to run
+ # ------------
+
+ exclude = ["install.private"]
+
+ # -------------------------------
+ # Commits to test upgrade from
+ # -------------------------------
+
+ test_upgrade_from.75e55a85.name = "Upgrade from 1.18.6"
\ No newline at end of file
From 4381a854177c5c79fe867c63a0c9b432aba25d8d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?E=CC=81ric=20Gaspar?=
<46165813+ericgaspar@users.noreply.github.com>
Date: Wed, 5 Apr 2023 11:20:59 +0200
Subject: [PATCH 03/24] cleaning
---
.travis.yml | 7 -------
conf/nginx.conf | 11 ++++++-----
conf/systemd.service | 3 +--
doc/DESCRIPTION_fr.md | 1 +
manifest.toml | 8 ++++++--
5 files changed, 14 insertions(+), 16 deletions(-)
delete mode 100644 .travis.yml
create mode 100644 doc/DESCRIPTION_fr.md
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 6133a24..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-language: python
-
-before_install:
- - git clone https://github.com/YunoHost/package_linter /tmp/package_linter
-
-script:
-- /tmp/package_linter/package_linter.py ./
\ No newline at end of file
diff --git a/conf/nginx.conf b/conf/nginx.conf
index dab67bd..abafaa1 100644
--- a/conf/nginx.conf
+++ b/conf/nginx.conf
@@ -1,10 +1,11 @@
+#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
location __PATH__/ {
- proxy_set_header Host 127.0.0.1;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header X-Forwarded-Proto $scheme;
- proxy_pass http://127.0.0.1:__PORT_GUI__/;
+ proxy_pass http://127.0.0.1:__PORT_GUI__/;
+ proxy_set_header Host $host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 600s;
proxy_send_timeout 600s;
diff --git a/conf/systemd.service b/conf/systemd.service
index bf5bf9f..82e0c2e 100644
--- a/conf/systemd.service
+++ b/conf/systemd.service
@@ -1,6 +1,5 @@
[Unit]
-Description=Syncthing - Open Source Continuous File Synchronization for %I
-Documentation=man:syncthing(1)
+Description=Syncthing: Continuous File Synchronization
After=network.target
[Service]
diff --git a/doc/DESCRIPTION_fr.md b/doc/DESCRIPTION_fr.md
new file mode 100644
index 0000000..364e73b
--- /dev/null
+++ b/doc/DESCRIPTION_fr.md
@@ -0,0 +1 @@
+Syncthing est un programme de synchronisation continue de fichiers. Il synchronise les fichiers entre deux ou plusieurs ordinateurs en temps réel, en toute sécurité à l'abri des regards indiscrets. Vos données sont vos seules données et vous méritez de choisir où elles sont stockées, si elles sont partagées avec un tiers et comment elles sont transmises sur Internet.
\ No newline at end of file
diff --git a/manifest.toml b/manifest.toml
index 7103767..378d9a1 100644
--- a/manifest.toml
+++ b/manifest.toml
@@ -42,13 +42,17 @@ ram.runtime = "50M"
arm64.sha256 = "91bc4211df65689aed4739aabd3d409791d55b01ced31e10fac385ed15647942"
amd64.url = "https://github.com/syncthing/syncthing/releases/download/v1.23.2/syncthing-linux-amd64-v1.23.2.tar.gz"
amd64.sha256 = "752d4df7c38789e0aff0f82194878ccbb7c8f2e18c1599aa817e3ecc517597e2"
- armel.url = "https://github.com/syncthing/syncthing/releases/download/v1.23.2/syncthing-linux-arm-v1.23.2.tar.gz"
- armel.sha256 = "5309cfe6575d8fb86bd623937e3bbe66cb5c22be12722c57da8c3d32765cd931"
armhf.url = "https://github.com/syncthing/syncthing/releases/download/v1.23.2/syncthing-linux-arm-v1.23.2.tar.gz"
armhf.sha256 = "5309cfe6575d8fb86bd623937e3bbe66cb5c22be12722c57da8c3d32765cd931"
i386.url = "https://github.com/syncthing/syncthing/releases/download/v1.23.2/syncthing-linux-386-v1.23.2.tar.gz"
i386.sha256 = "7ba020603ead83afc6f43e0dbf59e33832414bdd055c608abc05d33d73f66757"
+ autoupdate.strategy = "latest_github_release"
+ autoupdate.asset.arm64 = "syncthing-linux-arm64-*.tar.gz"
+ autoupdate.asset.amd64 = "syncthing-linux-amd64-*.tar.gz"
+ autoupdate.asset.i386 = "syncthing-linux-386-*.tar.gz"
+ autoupdate.asset.armhf = "syncthing-linux-arm-*.tar.gz"
+
[resources.ports]
main.default = 22000
main.exposed = "TCP"
From b9183876497187d0a4e956e2ca9ecf41e67570c3 Mon Sep 17 00:00:00 2001
From: yunohost-bot
Date: Wed, 5 Apr 2023 09:21:05 +0000
Subject: [PATCH 04/24] Auto-update README
---
README_fr.md | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/README_fr.md b/README_fr.md
index 5a89c28..f73f97d 100644
--- a/README_fr.md
+++ b/README_fr.md
@@ -16,8 +16,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po
## Vue d’ensemble
-Syncthing is a continuous file synchronization program. It synchronizes files between two or more computers in real time, safely protected from prying eyes. Your data is your data alone and you deserve to choose where it is stored, whether it is shared with some third party, and how it's transmitted over the internet.
-
+Syncthing est un programme de synchronisation continue de fichiers. Il synchronise les fichiers entre deux ou plusieurs ordinateurs en temps réel, en toute sécurité à l'abri des regards indiscrets. Vos données sont vos seules données et vous méritez de choisir où elles sont stockées, si elles sont partagées avec un tiers et comment elles sont transmises sur Internet.
**Version incluse :** 1.23.2~ynh1
From 534e77b5e8c2c50bea47f1c6bb7bcdde156a1b98 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?E=CC=81ric=20Gaspar?=
<46165813+ericgaspar@users.noreply.github.com>
Date: Wed, 5 Apr 2023 11:24:48 +0200
Subject: [PATCH 05/24] cleaning
---
scripts/install | 2 +-
scripts/restore | 2 +-
scripts/upgrade | 16 ++++++++--------
3 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/scripts/install b/scripts/install
index 6ba29ad..4e13a11 100644
--- a/scripts/install
+++ b/scripts/install
@@ -70,7 +70,7 @@ ynh_store_file_checksum --file="$config_file"
#=================================================
ynh_script_progression --message="Integrating service in YunoHost..."
-yunohost service add $app --description="$app daemon for Syncthing" --needs_exposed_ports=$port
+yunohost service add $app --description="Continuous File Synchronization" --needs_exposed_ports=$port
#=================================================
# START SYSTEMD SERVICE
diff --git a/scripts/restore b/scripts/restore
index ab1f38b..39e6631 100644
--- a/scripts/restore
+++ b/scripts/restore
@@ -41,7 +41,7 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
systemctl enable $app.service --quiet
-yunohost service add $app --description="$app daemon for Syncthing" --needs_exposed_ports=$port
+yunohost service add $app --description="Continuous File Synchronization" --needs_exposed_ports=$port
#=================================================
# GENERIC FINALIZATION
diff --git a/scripts/upgrade b/scripts/upgrade
index 9142cb1..3cf7045 100644
--- a/scripts/upgrade
+++ b/scripts/upgrade
@@ -33,7 +33,7 @@ then
ynh_script_progression --message="Upgrading source files..."
# Download, check integrity, uncompress and patch the source from app.src
- ynh_setup_source --dest_dir="$install_dir"
+ ynh_setup_source --dest_dir="$install_dir" --keep=".config/syncthing/config.xml"
fi
chmod -R o-rwx "$install_dir"
@@ -50,18 +50,18 @@ ynh_add_nginx_config
#=================================================
# UPDATE A CONFIG FILE
#=================================================
-ynh_script_progression --message="Updating a configuration file..."
+#ynh_script_progression --message="Updating a configuration file..."
-config_file="$install_dir/.config/syncthing/config.xml"
+#config_file="$install_dir/.config/syncthing/config.xml"
-ynh_backup_if_checksum_is_different --file="$config_file"
+#ynh_backup_if_checksum_is_different --file="$config_file"
# Recalculate and store the checksum of the file for the next upgrade.
-ynh_store_file_checksum --file="$config_file"
+#ynh_store_file_checksum --file="$config_file"
#ynh_add_config --template="../conf/config.xml" --destination="$config_file"
-chmod 400 "$config_file"
-chown $app:$app "$config_file"
+#chmod 400 "$config_file"
+#chown $app:$app "$config_file"
#=================================================
# SETUP SYSTEMD
@@ -78,7 +78,7 @@ ynh_add_systemd_config
#=================================================
ynh_script_progression --message="Integrating service in YunoHost..."
-yunohost service add $app --description="$app daemon for Syncthing" --needs_exposed_ports=$port
+yunohost service add $app --description="Continuous File Synchronization" --needs_exposed_ports=$port
#=================================================
# START SYSTEMD SERVICE
From 45b81178a2ea20a35b2e1bb81bddb903d6e3c417 Mon Sep 17 00:00:00 2001
From: yunohost-bot
Date: Wed, 5 Apr 2023 09:25:39 +0000
Subject: [PATCH 06/24] 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 9580df2..795e036 100644
--- a/README.md
+++ b/README.md
@@ -19,7 +19,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
Syncthing is a continuous file synchronization program. It synchronizes files between two or more computers in real time, safely protected from prying eyes. Your data is your data alone and you deserve to choose where it is stored, whether it is shared with some third party, and how it's transmitted over the internet.
-**Shipped version:** 1.23.3~ynh1
+**Shipped version:** 1.23.2~ynh1
## Screenshots
diff --git a/README_fr.md b/README_fr.md
index a177dcd..f73f97d 100644
--- a/README_fr.md
+++ b/README_fr.md
@@ -18,7 +18,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po
Syncthing est un programme de synchronisation continue de fichiers. Il synchronise les fichiers entre deux ou plusieurs ordinateurs en temps réel, en toute sécurité à l'abri des regards indiscrets. Vos données sont vos seules données et vous méritez de choisir où elles sont stockées, si elles sont partagées avec un tiers et comment elles sont transmises sur Internet.
-**Version incluse :** 1.23.3~ynh1
+**Version incluse :** 1.23.2~ynh1
## Captures d’écran
From 802c59bfdb3d19f708455fe7f1eecdbb365342c3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?E=CC=81ric=20Gaspar?=
<46165813+ericgaspar@users.noreply.github.com>
Date: Wed, 5 Apr 2023 11:55:51 +0200
Subject: [PATCH 07/24] Update nginx.conf
---
conf/nginx.conf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/conf/nginx.conf b/conf/nginx.conf
index abafaa1..f4a63d8 100644
--- a/conf/nginx.conf
+++ b/conf/nginx.conf
@@ -2,7 +2,7 @@
location __PATH__/ {
proxy_pass http://127.0.0.1:__PORT_GUI__/;
- proxy_set_header Host $host;
+ proxy_set_header Host 127.0.0.1;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
From 7e47bdcb1efe94b78071678acefc0b826a21ebfc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?E=CC=81ric=20Gaspar?=
<46165813+ericgaspar@users.noreply.github.com>
Date: Wed, 7 Jun 2023 13:38:39 +0200
Subject: [PATCH 08/24] Update manifest.toml
---
manifest.toml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/manifest.toml b/manifest.toml
index 378d9a1..52ed09c 100644
--- a/manifest.toml
+++ b/manifest.toml
@@ -16,7 +16,7 @@ userdoc = "https://docs.syncthing.net"
code = "https://github.com/syncthing/syncthing"
[integration]
-yunohost = ">= 11.1.16"
+yunohost = ">= 11.1.19"
architectures = "all"
multi_instance = true
ldap = true
From 0e86614b765362a80ecc1f84ec60e23173db486d Mon Sep 17 00:00:00 2001
From: yunohost-bot
Date: Wed, 7 Jun 2023 11:39:29 +0000
Subject: [PATCH 09/24] Auto-update README
---
README.md | 2 +-
README_fr.md | 3 +--
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/README.md b/README.md
index cc22cf3..795e036 100644
--- a/README.md
+++ b/README.md
@@ -19,7 +19,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
Syncthing is a continuous file synchronization program. It synchronizes files between two or more computers in real time, safely protected from prying eyes. Your data is your data alone and you deserve to choose where it is stored, whether it is shared with some third party, and how it's transmitted over the internet.
-**Shipped version:** 1.23.4~ynh1
+**Shipped version:** 1.23.2~ynh1
## Screenshots
diff --git a/README_fr.md b/README_fr.md
index 1310b38..f73f97d 100644
--- a/README_fr.md
+++ b/README_fr.md
@@ -18,8 +18,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po
Syncthing est un programme de synchronisation continue de fichiers. Il synchronise les fichiers entre deux ou plusieurs ordinateurs en temps réel, en toute sécurité à l'abri des regards indiscrets. Vos données sont vos seules données et vous méritez de choisir où elles sont stockées, si elles sont partagées avec un tiers et comment elles sont transmises sur Internet.
-
-**Version incluse :** 1.23.4~ynh1
+**Version incluse :** 1.23.2~ynh1
## Captures d’écran
From 5ba32a5b0727afba09cb05e9369fc96beb22d434 Mon Sep 17 00:00:00 2001
From: yunohost-bot
Date: Wed, 7 Jun 2023 11:42:40 +0000
Subject: [PATCH 10/24] Auto-update README
---
README.md | 1 -
1 file changed, 1 deletion(-)
diff --git a/README.md b/README.md
index 65da38f..795e036 100644
--- a/README.md
+++ b/README.md
@@ -21,7 +21,6 @@ Syncthing is a continuous file synchronization program. It synchronizes files be
**Shipped version:** 1.23.2~ynh1
-
## Screenshots

From b1769b677cb0952a739ec2c4e13d7cede0e75d86 Mon Sep 17 00:00:00 2001
From: yunohost-bot
Date: Tue, 4 Jul 2023 16:53:46 +0000
Subject: [PATCH 11/24] 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 8e739c0..795e036 100644
--- a/README.md
+++ b/README.md
@@ -19,7 +19,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
Syncthing is a continuous file synchronization program. It synchronizes files between two or more computers in real time, safely protected from prying eyes. Your data is your data alone and you deserve to choose where it is stored, whether it is shared with some third party, and how it's transmitted over the internet.
-**Shipped version:** 1.23.6~ynh1
+**Shipped version:** 1.23.2~ynh1
## Screenshots
diff --git a/README_fr.md b/README_fr.md
index b372cc7..f73f97d 100644
--- a/README_fr.md
+++ b/README_fr.md
@@ -18,7 +18,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po
Syncthing est un programme de synchronisation continue de fichiers. Il synchronise les fichiers entre deux ou plusieurs ordinateurs en temps réel, en toute sécurité à l'abri des regards indiscrets. Vos données sont vos seules données et vous méritez de choisir où elles sont stockées, si elles sont partagées avec un tiers et comment elles sont transmises sur Internet.
-**Version incluse :** 1.23.6~ynh1
+**Version incluse :** 1.23.2~ynh1
## Captures d’écran
From 1a0a8a459ed2b3015d78d8e2e9e174d2e29048fe Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?E=CC=81ric=20Gaspar?=
<46165813+ericgaspar@users.noreply.github.com>
Date: Thu, 7 Sep 2023 23:00:53 +0200
Subject: [PATCH 12/24] cleaning
---
manifest.toml | 2 +-
scripts/upgrade | 18 +++---------------
2 files changed, 4 insertions(+), 16 deletions(-)
diff --git a/manifest.toml b/manifest.toml
index 52ed09c..4ec88ed 100644
--- a/manifest.toml
+++ b/manifest.toml
@@ -16,7 +16,7 @@ userdoc = "https://docs.syncthing.net"
code = "https://github.com/syncthing/syncthing"
[integration]
-yunohost = ">= 11.1.19"
+yunohost = ">= 11.2"
architectures = "all"
multi_instance = true
ldap = true
diff --git a/scripts/upgrade b/scripts/upgrade
index 3cf7045..9333b66 100644
--- a/scripts/upgrade
+++ b/scripts/upgrade
@@ -39,14 +39,6 @@ fi
chmod -R o-rwx "$install_dir"
chown -R $app:$app "$install_dir"
-#=================================================
-# NGINX CONFIGURATION
-#=================================================
-ynh_script_progression --message="Upgrading NGINX web server configuration..."
-
-# Create a dedicated NGINX config
-ynh_add_nginx_config
-
#=================================================
# UPDATE A CONFIG FILE
#=================================================
@@ -68,16 +60,12 @@ ynh_add_nginx_config
#=================================================
ynh_script_progression --message="Upgrading systemd configuration..."
+# Create a dedicated NGINX config
+ynh_add_nginx_config
+
# Create a dedicated systemd config
ynh_add_systemd_config
-#=================================================
-# GENERIC FINALIZATION
-#=================================================
-# INTEGRATE SERVICE IN YUNOHOST
-#=================================================
-ynh_script_progression --message="Integrating service in YunoHost..."
-
yunohost service add $app --description="Continuous File Synchronization" --needs_exposed_ports=$port
#=================================================
From bb4fe35a59bd6a080e8a4a857423203ff79f1f94 Mon Sep 17 00:00:00 2001
From: yunohost-bot
Date: Thu, 7 Sep 2023 21:02:40 +0000
Subject: [PATCH 13/24] Auto-update README
---
README.md | 2 --
1 file changed, 2 deletions(-)
diff --git a/README.md b/README.md
index 85dfe24..795e036 100644
--- a/README.md
+++ b/README.md
@@ -19,10 +19,8 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
Syncthing is a continuous file synchronization program. It synchronizes files between two or more computers in real time, safely protected from prying eyes. Your data is your data alone and you deserve to choose where it is stored, whether it is shared with some third party, and how it's transmitted over the internet.
-
**Shipped version:** 1.23.2~ynh1
-
## Screenshots

From eb37740cb250330f59ee77b36c0ca1dc9176d009 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?E=CC=81ric=20Gaspar?=
<46165813+ericgaspar@users.noreply.github.com>
Date: Wed, 20 Sep 2023 18:13:28 +0200
Subject: [PATCH 14/24] cleaning
---
manifest.toml | 24 ++++++++++++++----------
scripts/install | 22 +++++-----------------
scripts/remove | 10 ----------
scripts/restore | 1 -
4 files changed, 19 insertions(+), 38 deletions(-)
diff --git a/manifest.toml b/manifest.toml
index 4ec88ed..8bbceeb 100644
--- a/manifest.toml
+++ b/manifest.toml
@@ -5,7 +5,7 @@ name = "Syncthing"
description.en = "Continuous file synchronization program"
description.fr = "Programme de synchronisation de fichiers en continu"
-version = "1.23.2~ynh1"
+version = "1.24.0~ynh1"
maintainers = ["txmrl", "yalh76"]
@@ -22,7 +22,7 @@ multi_instance = true
ldap = true
sso = true
disk = "50M"
-ram.build = "50M"
+ram.build = "200M"
ram.runtime = "50M"
[install]
@@ -33,19 +33,23 @@ ram.runtime = "50M"
type = "path"
default = "/syncthing"
+ [install.init_main_permission]
+ type = "group"
+ default = "visitors"
+
[install.admin]
type = "user"
[resources]
[resources.sources.main]
- arm64.url = "https://github.com/syncthing/syncthing/releases/download/v1.23.2/syncthing-linux-arm64-v1.23.2.tar.gz"
- arm64.sha256 = "91bc4211df65689aed4739aabd3d409791d55b01ced31e10fac385ed15647942"
- amd64.url = "https://github.com/syncthing/syncthing/releases/download/v1.23.2/syncthing-linux-amd64-v1.23.2.tar.gz"
- amd64.sha256 = "752d4df7c38789e0aff0f82194878ccbb7c8f2e18c1599aa817e3ecc517597e2"
- armhf.url = "https://github.com/syncthing/syncthing/releases/download/v1.23.2/syncthing-linux-arm-v1.23.2.tar.gz"
- armhf.sha256 = "5309cfe6575d8fb86bd623937e3bbe66cb5c22be12722c57da8c3d32765cd931"
- i386.url = "https://github.com/syncthing/syncthing/releases/download/v1.23.2/syncthing-linux-386-v1.23.2.tar.gz"
- i386.sha256 = "7ba020603ead83afc6f43e0dbf59e33832414bdd055c608abc05d33d73f66757"
+ arm64.url = "https://github.com/syncthing/syncthing/releases/download/v1.24.0/syncthing-linux-arm64-v1.24.0.tar.gz"
+ arm64.sha256 = "e1e3de74b72794c1708e965a625dca04706745676148e0fa77fee2bbddfa49dd"
+ amd64.url = "https://github.com/syncthing/syncthing/releases/download/v1.24.0/syncthing-linux-amd64-v1.24.0.tar.gz"
+ amd64.sha256 = "b6e514d61f9be7d516483762e91e10c1644427e35d88c79edb64cbc6256e1036"
+ armhf.url = "https://github.com/syncthing/syncthing/releases/download/v1.24.0/syncthing-linux-arm-v1.24.0.tar.gz"
+ armhf.sha256 = "43060bdd6e0d3028749a505dfec2389730f30c7881ebbb76932d8a6f70558d68"
+ i386.url = "https://github.com/syncthing/syncthing/releases/download/v1.24.0/syncthing-linux-386-v1.24.0.tar.gz"
+ i386.sha256 = "2a7a76bf499188226f0a74b35bb2a6e217dad025348c00dc79a7246cbd13ce28"
autoupdate.strategy = "latest_github_release"
autoupdate.asset.arm64 = "syncthing-linux-arm64-*.tar.gz"
diff --git a/scripts/install b/scripts/install
index 4e13a11..9eecada 100644
--- a/scripts/install
+++ b/scripts/install
@@ -28,6 +28,11 @@ ynh_script_progression --message="Configuring NGINX web server..."
# Create a dedicated NGINX config
ynh_add_nginx_config
+# Create a dedicated systemd config
+ynh_add_systemd_config
+
+yunohost service add $app --description="Continuous File Synchronization" --needs_exposed_ports=$port
+
#=================================================
# ADD A CONFIGURATION
#=================================================
@@ -40,14 +45,6 @@ ynh_add_config --template="../conf/config.xml" --destination="$config_file"
chmod 400 "$config_file"
chown $app:$app "$config_file"
-#=================================================
-# SETUP SYSTEMD
-#=================================================
-ynh_script_progression --message="Configuring a systemd service..."
-
-# Create a dedicated systemd config
-ynh_add_systemd_config
-
#=================================================
# FIX LISTENING SERVICE
#=================================================
@@ -63,15 +60,6 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path=systemd
ynh_store_file_checksum --file="$config_file"
-#=================================================
-# GENERIC FINALIZATION
-#=================================================
-# INTEGRATE SERVICE IN YUNOHOST
-#=================================================
-ynh_script_progression --message="Integrating service in YunoHost..."
-
-yunohost service add $app --description="Continuous File Synchronization" --needs_exposed_ports=$port
-
#=================================================
# START SYSTEMD SERVICE
#=================================================
diff --git a/scripts/remove b/scripts/remove
index c7470cb..c4a3e29 100644
--- a/scripts/remove
+++ b/scripts/remove
@@ -22,19 +22,9 @@ then
yunohost service remove $app
fi
-#=================================================
-# STOP AND REMOVE SERVICE
-#=================================================
-ynh_script_progression --message="Stopping and removing the systemd service..."
-
# Remove the dedicated systemd config
ynh_remove_systemd_config
-#=================================================
-# REMOVE NGINX CONFIGURATION
-#=================================================
-ynh_script_progression --message="Removing NGINX web server configuration..."
-
# Remove the dedicated NGINX config
ynh_remove_nginx_config
diff --git a/scripts/restore b/scripts/restore
index 39e6631..f5f7fe4 100644
--- a/scripts/restore
+++ b/scripts/restore
@@ -50,7 +50,6 @@ yunohost service add $app --description="Continuous File Synchronization" --need
#=================================================
ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1
-
ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="Access the GUI via the following URL"
ynh_systemd_action --service_name=nginx --action=reload
From f412ca1691f4cae3fb6f437f19354ce053cb8b16 Mon Sep 17 00:00:00 2001
From: yunohost-bot
Date: Wed, 20 Sep 2023 16:13:32 +0000
Subject: [PATCH 15/24] 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 795e036..0a134eb 100644
--- a/README.md
+++ b/README.md
@@ -19,7 +19,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
Syncthing is a continuous file synchronization program. It synchronizes files between two or more computers in real time, safely protected from prying eyes. Your data is your data alone and you deserve to choose where it is stored, whether it is shared with some third party, and how it's transmitted over the internet.
-**Shipped version:** 1.23.2~ynh1
+**Shipped version:** 1.24.0~ynh1
## Screenshots
diff --git a/README_fr.md b/README_fr.md
index f73f97d..fe14ec0 100644
--- a/README_fr.md
+++ b/README_fr.md
@@ -18,7 +18,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po
Syncthing est un programme de synchronisation continue de fichiers. Il synchronise les fichiers entre deux ou plusieurs ordinateurs en temps réel, en toute sécurité à l'abri des regards indiscrets. Vos données sont vos seules données et vous méritez de choisir où elles sont stockées, si elles sont partagées avec un tiers et comment elles sont transmises sur Internet.
-**Version incluse :** 1.23.2~ynh1
+**Version incluse :** 1.24.0~ynh1
## Captures d’écran
From c28da09fa8e3a0167b9c02673451c3e50394395d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?E=CC=81ric=20Gaspar?=
<46165813+ericgaspar@users.noreply.github.com>
Date: Wed, 20 Sep 2023 18:14:03 +0200
Subject: [PATCH 16/24] Update systemd.service
---
conf/systemd.service | 38 ++++++++++++++++++++++++++++++++++++--
1 file changed, 36 insertions(+), 2 deletions(-)
diff --git a/conf/systemd.service b/conf/systemd.service
index 82e0c2e..cb6b986 100644
--- a/conf/systemd.service
+++ b/conf/systemd.service
@@ -13,11 +13,45 @@ RestartForceExitStatus=3 4
# Depending on specificities of your service/app, you may need to tweak these
# .. but this should be a good baseline
# Details for these options: https://www.freedesktop.org/software/systemd/man/systemd.exec.html
-NoNewPrivileges=true
+#NoNewPrivileges=true
+#PrivateTmp=yes
+#ProtectSystem=full
+#SystemCallArchitectures=native
+#MemoryDenyWriteExecute=true
+
+# Sandboxing options to harden security
+# Depending on specificities of your service/app, you may need to tweak these
+# .. but this should be a good baseline
+# Details for these options: https://www.freedesktop.org/software/systemd/man/systemd.exec.html
+NoNewPrivileges=yes
PrivateTmp=yes
+PrivateDevices=yes
+RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 AF_NETLINK
+RestrictNamespaces=yes
+RestrictRealtime=yes
+DevicePolicy=closed
+ProtectClock=yes
+ProtectHostname=yes
+ProtectProc=invisible
ProtectSystem=full
+ProtectControlGroups=yes
+ProtectKernelModules=yes
+ProtectKernelTunables=yes
+LockPersonality=yes
SystemCallArchitectures=native
-MemoryDenyWriteExecute=true
+SystemCallFilter=~@clock @debug @module @mount @obsolete @reboot @setuid @swap @cpu-emulation @privileged
+
+# Denying access to capabilities that should not be relevant for webapps
+# Doc: https://man7.org/linux/man-pages/man7/capabilities.7.html
+CapabilityBoundingSet=~CAP_RAWIO CAP_MKNOD
+CapabilityBoundingSet=~CAP_AUDIT_CONTROL CAP_AUDIT_READ CAP_AUDIT_WRITE
+CapabilityBoundingSet=~CAP_SYS_BOOT CAP_SYS_TIME CAP_SYS_MODULE CAP_SYS_PACCT
+CapabilityBoundingSet=~CAP_LEASE CAP_LINUX_IMMUTABLE CAP_IPC_LOCK
+CapabilityBoundingSet=~CAP_BLOCK_SUSPEND CAP_WAKE_ALARM
+CapabilityBoundingSet=~CAP_SYS_TTY_CONFIG
+CapabilityBoundingSet=~CAP_MAC_ADMIN CAP_MAC_OVERRIDE
+CapabilityBoundingSet=~CAP_NET_ADMIN CAP_NET_BROADCAST CAP_NET_RAW
+CapabilityBoundingSet=~CAP_SYS_ADMIN CAP_SYS_PTRACE CAP_SYSLOG
[Install]
WantedBy=multi-user.target
From fe5e95c19701cc82e01dd388fc5207b5944b7dac Mon Sep 17 00:00:00 2001
From: yunohost-bot
Date: Wed, 4 Oct 2023 08:29:46 +0000
Subject: [PATCH 17/24] 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 0083032..2bff108 100644
--- a/README.md
+++ b/README.md
@@ -19,7 +19,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
Syncthing is a continuous file synchronization program. It synchronizes files between two or more computers in real time, safely protected from prying eyes. Your data is your data alone and you deserve to choose where it is stored, whether it is shared with some third party, and how it's transmitted over the internet.
-**Shipped version:** 1.25.0~ynh1
+**Shipped version:** 1.24.0~ynh1
## Screenshots
diff --git a/README_fr.md b/README_fr.md
index 427a7b3..122b4bf 100644
--- a/README_fr.md
+++ b/README_fr.md
@@ -18,7 +18,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po
Syncthing est un programme de synchronisation continue de fichiers. Il synchronise les fichiers entre deux ou plusieurs ordinateurs en temps réel, en toute sécurité à l'abri des regards indiscrets. Vos données sont vos seules données et vous méritez de choisir où elles sont stockées, si elles sont partagées avec un tiers et comment elles sont transmises sur Internet.
-**Version incluse :** 1.25.0~ynh1
+**Version incluse :** 1.24.0~ynh1
## Captures d’écran
From 2a032c2b5722a84560780282278b89fff14a880e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?E=CC=81ric=20Gaspar?=
<46165813+ericgaspar@users.noreply.github.com>
Date: Wed, 4 Oct 2023 10:31:31 +0200
Subject: [PATCH 18/24] Update manifest.toml
---
manifest.toml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/manifest.toml b/manifest.toml
index 8bbceeb..b2f2a4c 100644
--- a/manifest.toml
+++ b/manifest.toml
@@ -22,7 +22,7 @@ multi_instance = true
ldap = true
sso = true
disk = "50M"
-ram.build = "200M"
+ram.build = "1200M"
ram.runtime = "50M"
[install]
From c49be6e55da5f481c3891bebb76e76f2db2c4b42 Mon Sep 17 00:00:00 2001
From: yunohost-bot
Date: Sat, 4 Nov 2023 15:01:24 +0000
Subject: [PATCH 19/24] Auto-update README
---
README.md | 1 +
README_fr.md | 1 +
2 files changed, 2 insertions(+)
diff --git a/README.md b/README.md
index 2bff108..29ad416 100644
--- a/README.md
+++ b/README.md
@@ -30,6 +30,7 @@ Syncthing is a continuous file synchronization program. It synchronizes files be
* Official app website:
* Official user documentation:
* Upstream app code repository:
+* YunoHost Store:
* Report a bug:
## Developer info
diff --git a/README_fr.md b/README_fr.md
index 122b4bf..d132598 100644
--- a/README_fr.md
+++ b/README_fr.md
@@ -29,6 +29,7 @@ Syncthing est un programme de synchronisation continue de fichiers. Il synchroni
* Site officiel de l’app :
* Documentation officielle utilisateur :
* Dépôt de code officiel de l’app :
+* YunoHost Store:
* Signaler un bug :
## Informations pour les développeurs
From 150b16e14a915d8cb5bf997ebd6bd1f7b7f167a1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?=
Date: Sat, 4 Nov 2023 16:04:44 +0100
Subject: [PATCH 20/24] Fix 1.25 on manifestv2
---
manifest.toml | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/manifest.toml b/manifest.toml
index b2f2a4c..c2aed97 100644
--- a/manifest.toml
+++ b/manifest.toml
@@ -5,7 +5,7 @@ name = "Syncthing"
description.en = "Continuous file synchronization program"
description.fr = "Programme de synchronisation de fichiers en continu"
-version = "1.24.0~ynh1"
+version = "1.25.0~ynh1"
maintainers = ["txmrl", "yalh76"]
@@ -42,14 +42,14 @@ ram.runtime = "50M"
[resources]
[resources.sources.main]
- arm64.url = "https://github.com/syncthing/syncthing/releases/download/v1.24.0/syncthing-linux-arm64-v1.24.0.tar.gz"
- arm64.sha256 = "e1e3de74b72794c1708e965a625dca04706745676148e0fa77fee2bbddfa49dd"
- amd64.url = "https://github.com/syncthing/syncthing/releases/download/v1.24.0/syncthing-linux-amd64-v1.24.0.tar.gz"
- amd64.sha256 = "b6e514d61f9be7d516483762e91e10c1644427e35d88c79edb64cbc6256e1036"
- armhf.url = "https://github.com/syncthing/syncthing/releases/download/v1.24.0/syncthing-linux-arm-v1.24.0.tar.gz"
- armhf.sha256 = "43060bdd6e0d3028749a505dfec2389730f30c7881ebbb76932d8a6f70558d68"
- i386.url = "https://github.com/syncthing/syncthing/releases/download/v1.24.0/syncthing-linux-386-v1.24.0.tar.gz"
- i386.sha256 = "2a7a76bf499188226f0a74b35bb2a6e217dad025348c00dc79a7246cbd13ce28"
+ arm64.url = "https://github.com/syncthing/syncthing/releases/download/v1.25.0/syncthing-linux-arm64-v1.25.0.tar.gz"
+ arm64.sha256 = "c65c731e9e9f1ddb58b757bde925e83077edb6b08152cc5c0138c0fba2a07470"
+ amd64.url = "https://github.com/syncthing/syncthing/releases/download/v1.25.0/syncthing-linux-amd64-v1.25.0.tar.gz"
+ amd64.sha256 = "c16d62bc54659c27728b3501786240a06e29dd553204fd01b2968cad0bb03e4e"
+ armhf.url = "https://github.com/syncthing/syncthing/releases/download/v1.25.0/syncthing-linux-arm-v1.25.0.tar.gz"
+ armhf.sha256 = "1b56b165a036fca6785319a60640a1f5fb8fe2965ee7f545be7ed360db4fb6d6"
+ i386.url = "https://github.com/syncthing/syncthing/releases/download/v1.25.0/syncthing-linux-386-v1.25.0.tar.gz"
+ i386.sha256 = "03e492075e306827ea29082aa81b792d5b0d522954d6c9690c44524206755fdd"
autoupdate.strategy = "latest_github_release"
autoupdate.asset.arm64 = "syncthing-linux-arm64-*.tar.gz"
From 3089bf238070322175e7f46fefc005ac5c2a70a5 Mon Sep 17 00:00:00 2001
From: yunohost-bot
Date: Sat, 4 Nov 2023 15:04:50 +0000
Subject: [PATCH 21/24] 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 29ad416..64bc287 100644
--- a/README.md
+++ b/README.md
@@ -19,7 +19,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
Syncthing is a continuous file synchronization program. It synchronizes files between two or more computers in real time, safely protected from prying eyes. Your data is your data alone and you deserve to choose where it is stored, whether it is shared with some third party, and how it's transmitted over the internet.
-**Shipped version:** 1.24.0~ynh1
+**Shipped version:** 1.25.0~ynh1
## Screenshots
diff --git a/README_fr.md b/README_fr.md
index d132598..a792122 100644
--- a/README_fr.md
+++ b/README_fr.md
@@ -18,7 +18,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po
Syncthing est un programme de synchronisation continue de fichiers. Il synchronise les fichiers entre deux ou plusieurs ordinateurs en temps réel, en toute sécurité à l'abri des regards indiscrets. Vos données sont vos seules données et vous méritez de choisir où elles sont stockées, si elles sont partagées avec un tiers et comment elles sont transmises sur Internet.
-**Version incluse :** 1.24.0~ynh1
+**Version incluse :** 1.25.0~ynh1
## Captures d’écran
From 62031879827df269f5f8728205aa5a03f9b322df Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?=
Date: Sat, 4 Nov 2023 16:06:49 +0100
Subject: [PATCH 22/24] Bump package revision
---
manifest.toml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/manifest.toml b/manifest.toml
index c2aed97..cc06813 100644
--- a/manifest.toml
+++ b/manifest.toml
@@ -5,7 +5,7 @@ name = "Syncthing"
description.en = "Continuous file synchronization program"
description.fr = "Programme de synchronisation de fichiers en continu"
-version = "1.25.0~ynh1"
+version = "1.25.0~ynh2"
maintainers = ["txmrl", "yalh76"]
From 477c16a372f993bb8c791af94584016556229480 Mon Sep 17 00:00:00 2001
From: yunohost-bot
Date: Sat, 4 Nov 2023 15:06:54 +0000
Subject: [PATCH 23/24] 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 64bc287..ad55368 100644
--- a/README.md
+++ b/README.md
@@ -19,7 +19,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
Syncthing is a continuous file synchronization program. It synchronizes files between two or more computers in real time, safely protected from prying eyes. Your data is your data alone and you deserve to choose where it is stored, whether it is shared with some third party, and how it's transmitted over the internet.
-**Shipped version:** 1.25.0~ynh1
+**Shipped version:** 1.25.0~ynh2
## Screenshots
diff --git a/README_fr.md b/README_fr.md
index a792122..3dc81a5 100644
--- a/README_fr.md
+++ b/README_fr.md
@@ -18,7 +18,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po
Syncthing est un programme de synchronisation continue de fichiers. Il synchronise les fichiers entre deux ou plusieurs ordinateurs en temps réel, en toute sécurité à l'abri des regards indiscrets. Vos données sont vos seules données et vous méritez de choisir où elles sont stockées, si elles sont partagées avec un tiers et comment elles sont transmises sur Internet.
-**Version incluse :** 1.25.0~ynh1
+**Version incluse :** 1.25.0~ynh2
## Captures d’écran
From 10054ee94e24a2c329d57a9289fbe0555dbb6a2a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?E=CC=81ric=20Gaspar?=
<46165813+ericgaspar@users.noreply.github.com>
Date: Sun, 12 Nov 2023 12:25:17 +0100
Subject: [PATCH 24/24] cleaning
---
scripts/install | 4 ++--
scripts/remove | 5 +++--
scripts/upgrade | 4 ++--
3 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/scripts/install b/scripts/install
index 9eecada..6225e92 100644
--- a/scripts/install
+++ b/scripts/install
@@ -21,9 +21,9 @@ chmod -R o-rwx "$install_dir"
chown -R $app:$app "$install_dir"
#=================================================
-# NGINX CONFIGURATION
+# SYSTEM CONFIGURATION
#=================================================
-ynh_script_progression --message="Configuring NGINX web server..."
+ynh_script_progression --message="Adding system configurations related to $app..." --weight=1
# Create a dedicated NGINX config
ynh_add_nginx_config
diff --git a/scripts/remove b/scripts/remove
index c4a3e29..2827c71 100644
--- a/scripts/remove
+++ b/scripts/remove
@@ -10,10 +10,11 @@ source _common.sh
source /usr/share/yunohost/helpers
#=================================================
-# STANDARD REMOVE
+# REMOVE SYSTEM CONFIGURATIONS
#=================================================
-# REMOVE SERVICE INTEGRATION IN YUNOHOST
+# REMOVE SYSTEMD SERVICE
#=================================================
+ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
if ynh_exec_warn_less yunohost service status $app >/dev/null
diff --git a/scripts/upgrade b/scripts/upgrade
index 9333b66..fd286e7 100644
--- a/scripts/upgrade
+++ b/scripts/upgrade
@@ -56,9 +56,9 @@ chown -R $app:$app "$install_dir"
#chown $app:$app "$config_file"
#=================================================
-# SETUP SYSTEMD
+# REAPPLY SYSTEM CONFIGURATIONS
#=================================================
-ynh_script_progression --message="Upgrading systemd configuration..."
+ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1
# Create a dedicated NGINX config
ynh_add_nginx_config