From cf8b4442944db4f16a528da04e30b22e64940545 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 25 Mar 2021 08:09:50 +0100 Subject: [PATCH 1/5] upgrade to version 1.18.2 --- README.md | 2 +- README_fr.md | 2 +- conf/app.src | 4 ++-- manifest.json | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 24ae748..cfcb5ce 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to Backdrop CMS is a simple, lightweight, and easy-to-use Content Management System for building professional websites. -**Shipped version:** 1.18.1 +**Shipped version:** 1.18.2 ## Screenshots diff --git a/README_fr.md b/README_fr.md index 46a466c..81f7c51 100644 --- a/README_fr.md +++ b/README_fr.md @@ -12,7 +12,7 @@ Si vous n’avez pas YunoHost, consultez [le guide](https://yunohost.org/#/insta Backdrop CMS is a simple, lightweight, and easy-to-use Content Management System for building professional websites. -**Version incluse :** 1.18.1 +**Version incluse :** 1.18.2 ## Captures d’écran diff --git a/conf/app.src b/conf/app.src index 0532e32..47c9478 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/backdrop/backdrop/releases/download/1.18.1/backdrop.zip -SOURCE_SUM=5080e4f93f454b51cf99ca2a907b176b0b4eaf143d49b23f304c471392136420 +SOURCE_URL=https://github.com/backdrop/backdrop/releases/download/1.18.2/backdrop.zip +SOURCE_SUM=dc067c1608d5135882762112217f39a84534d9d24c5191d1ade6012d55082fde SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 6becb58..1ed7a68 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Easy-to-use CMS for building professional websites", "fr": "CMS facile à utiliser pour créer des sites Web professionnels" }, - "version": "1.18.1~ynh2", + "version": "1.18.2~ynh1", "url": "https://backdropcms.org/", "license": "GPL-2.0", "maintainer": { From ef747db34ba8c8222f154c860fe9bef30d7e7b2a Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 25 Mar 2021 08:13:18 +0100 Subject: [PATCH 2/5] Fix --- scripts/install | 16 ++++++++-------- scripts/restore | 14 +++++++------- scripts/upgrade | 16 ++++++++-------- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/scripts/install b/scripts/install index c73facc..9bfd70d 100644 --- a/scripts/install +++ b/scripts/install @@ -55,6 +55,14 @@ db_name=$(ynh_sanitize_dbid $app) ynh_app_setting_set --app=$app --key=db_name --value=$db_name ynh_mysql_setup_db --db_user=$db_name --db_name=$db_name +#================================================= +# CREATE DEDICATED USER +#================================================= +ynh_script_progression --message="Configuring system user..." --weight=2 + +# Create a system user +ynh_system_user_create --username=$app + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -72,14 +80,6 @@ ynh_script_progression --message="Configuring NGINX web server..." --weight=2 # Create a dedicated NGINX config ynh_add_nginx_config -#================================================= -# CREATE DEDICATED USER -#================================================= -ynh_script_progression --message="Configuring system user..." --weight=2 - -# Create a system user -ynh_system_user_create --username=$app - #================================================= # PHP-FPM CONFIGURATION #================================================= diff --git a/scripts/restore b/scripts/restore index 66e2a29..1bcabba 100644 --- a/scripts/restore +++ b/scripts/restore @@ -46,13 +46,6 @@ test ! -d $final_path \ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# RESTORE THE APP MAIN DIR -#================================================= -ynh_script_progression --message="Restoring Backdrop main directory..." --weight=2 - -ynh_restore_file --origin_path="$final_path" - #================================================= # RECREATE THE DEDICATED USER #================================================= @@ -61,6 +54,13 @@ ynh_script_progression --message="Recreating the dedicated system user..." --wei # Create the dedicated user (if not existing) ynh_system_user_create --username=$app +#================================================= +# RESTORE THE APP MAIN DIR +#================================================= +ynh_script_progression --message="Restoring Backdrop main directory..." --weight=2 + +ynh_restore_file --origin_path="$final_path" + #================================================= # RESTORE USER RIGHTS #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 7fc3a0f..883004c 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -67,6 +67,14 @@ ynh_clean_setup () { # Exit if an error occurs during the execution of the script ynh_abort_if_errors +#================================================= +# CREATE DEDICATED USER +#================================================= +ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1 + +# Create a dedicated user (if not existing) +ynh_system_user_create --username=$app + #================================================= # STANDARD UPGRADE STEPS #================================================= @@ -88,14 +96,6 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." - # Create a dedicated NGINX config ynh_add_nginx_config -#================================================= -# CREATE DEDICATED USER -#================================================= -ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1 - -# Create a dedicated user (if not existing) -ynh_system_user_create --username=$app - #================================================= # PHP-FPM CONFIGURATION #================================================= From 162050e133bd12f68317c7add9e91c79055b0885 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 25 Mar 2021 08:30:03 +0100 Subject: [PATCH 3/5] protect final_path --- scripts/install | 3 ++- scripts/restore | 3 ++- scripts/upgrade | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index 9bfd70d..172f4b6 100644 --- a/scripts/install +++ b/scripts/install @@ -61,7 +61,7 @@ ynh_mysql_setup_db --db_user=$db_name --db_name=$db_name ynh_script_progression --message="Configuring system user..." --weight=2 # Create a system user -ynh_system_user_create --username=$app +ynh_system_user_create --username=$app --home_dir="$final_path" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -112,6 +112,7 @@ ynh_store_file_checksum --file="$final_path/settings.php" # Set permissions to app files chown -R root: $final_path +chmod o-rwx $final_path chown -R $app:www-data $final_path/files chmod -R 770 $final_path/files diff --git a/scripts/restore b/scripts/restore index 1bcabba..83cd632 100644 --- a/scripts/restore +++ b/scripts/restore @@ -52,7 +52,7 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_script_progression --message="Recreating the dedicated system user..." --weight=3 # Create the dedicated user (if not existing) -ynh_system_user_create --username=$app +ynh_system_user_create --username=$app --home_dir="$final_path" #================================================= # RESTORE THE APP MAIN DIR @@ -67,6 +67,7 @@ ynh_restore_file --origin_path="$final_path" # Set permissions to app files chown -R root: $final_path +chmod o-rwx $final_path chown -R $app:www-data $final_path/files chmod -R 770 $final_path/files diff --git a/scripts/upgrade b/scripts/upgrade index 883004c..5fdece7 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -73,7 +73,7 @@ ynh_abort_if_errors ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1 # Create a dedicated user (if not existing) -ynh_system_user_create --username=$app +ynh_system_user_create --username=$app --home_dir="$final_path" #================================================= # STANDARD UPGRADE STEPS @@ -141,6 +141,7 @@ fi # Set permissions to app files chown -R root: $final_path +chmod o-rwx $final_path chown -R $app:www-data $final_path/files chmod -R 770 $final_path/files From 9ce684dcf972d6ccc527c7d26c15b5d0e70e1410 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 25 Mar 2021 08:53:32 +0100 Subject: [PATCH 4/5] Fix --- scripts/install | 2 +- scripts/restore | 2 +- scripts/upgrade | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index 172f4b6..ee0aa9a 100644 --- a/scripts/install +++ b/scripts/install @@ -111,7 +111,7 @@ ynh_store_file_checksum --file="$final_path/settings.php" #================================================= # Set permissions to app files -chown -R root: $final_path +chown -R $app: $final_path chmod o-rwx $final_path chown -R $app:www-data $final_path/files chmod -R 770 $final_path/files diff --git a/scripts/restore b/scripts/restore index 83cd632..537bc2b 100644 --- a/scripts/restore +++ b/scripts/restore @@ -66,7 +66,7 @@ ynh_restore_file --origin_path="$final_path" #================================================= # Set permissions to app files -chown -R root: $final_path +chown -R $app: $final_path chmod o-rwx $final_path chown -R $app:www-data $final_path/files chmod -R 770 $final_path/files diff --git a/scripts/upgrade b/scripts/upgrade index 5fdece7..49575de 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -140,7 +140,7 @@ fi #================================================= # Set permissions to app files -chown -R root: $final_path +chown -R $app: $final_path chmod o-rwx $final_path chown -R $app:www-data $final_path/files chmod -R 770 $final_path/files From a62ce1eff4065dfabffb0e3198f028688a6d7cbe Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 25 Mar 2021 09:08:22 +0100 Subject: [PATCH 5/5] fix --- scripts/install | 3 +-- scripts/restore | 3 +-- scripts/upgrade | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/scripts/install b/scripts/install index ee0aa9a..7df3f20 100644 --- a/scripts/install +++ b/scripts/install @@ -111,8 +111,7 @@ ynh_store_file_checksum --file="$final_path/settings.php" #================================================= # Set permissions to app files -chown -R $app: $final_path -chmod o-rwx $final_path +chown -R root: $final_path chown -R $app:www-data $final_path/files chmod -R 770 $final_path/files diff --git a/scripts/restore b/scripts/restore index 537bc2b..8980cb7 100644 --- a/scripts/restore +++ b/scripts/restore @@ -66,8 +66,7 @@ ynh_restore_file --origin_path="$final_path" #================================================= # Set permissions to app files -chown -R $app: $final_path -chmod o-rwx $final_path +chown -R root: $final_path chown -R $app:www-data $final_path/files chmod -R 770 $final_path/files diff --git a/scripts/upgrade b/scripts/upgrade index 49575de..2416282 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -140,8 +140,7 @@ fi #================================================= # Set permissions to app files -chown -R $app: $final_path -chmod o-rwx $final_path +chown -R root: $final_path chown -R $app:www-data $final_path/files chmod -R 770 $final_path/files