From 05b3a99653d38af84818a43881e3021a03f76802 Mon Sep 17 00:00:00 2001 From: Robles Rodolphe Date: Mon, 1 Nov 2021 12:19:48 +0100 Subject: [PATCH 01/11] fix issue #65 'Upgrade pass but then redirects to install.php page' on upgrade script --- conf/1.1.0.src | 5 +++ scripts/upgrade | 81 ++++++++++++++++++++++++++++++++++--------------- 2 files changed, 61 insertions(+), 25 deletions(-) create mode 100644 conf/1.1.0.src diff --git a/conf/1.1.0.src b/conf/1.1.0.src new file mode 100644 index 0000000..59679fe --- /dev/null +++ b/conf/1.1.0.src @@ -0,0 +1,5 @@ +SOURCE_URL=https://fossil.kd2.org/garradin/uv/garradin-1.1.0.tar.bz2 +SOURCE_SUM=8689c62754d3b7920cf59786379e085a591fc1763dd3ec8fd13736e916c659bd +SOURCE_SUM_PRG=sha256sum +SOURCE_FORMAT=tar.bz2 +SOURCE_IN_SUBDIR=true \ No newline at end of file diff --git a/scripts/upgrade b/scripts/upgrade index f066255..703db35 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -27,6 +27,8 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) if ynh_compare_current_package_version --comparison lt --version 0.9.8.1~ynh1; then upgrade_type="0.9.8" +elif ynh_compare_current_package_version --comparison le --version 1.0.7~ynh2; then + upgrade_type="1.1.0" else upgrade_type=$(ynh_check_app_version_changed) fi @@ -87,7 +89,7 @@ if [ "$upgrade_type" == "0.9.8" ] then ynh_script_progression --message="Upgrading upgrade to 0.9.8" --weight=5 # Download, check integrity, uncompress and patch the source from 0.9.8.src - ynh_setup_source --dest_dir="$final_path" --source_id="0.9.8" + ynh_setup_source --keep="config.local.php" --dest_dir="$final_path" --source_id="0.9.8" # Set permissions on app files ynh_system_user_create --username=$app ynh_add_nginx_config @@ -98,28 +100,66 @@ then backup_bdd=/tmp/association.sqlite backup_squelettes=/tmp/squelettes - if [ -d "$backup_squelettes" ] + if [ -d "$backup_squelettes" ] + then + cp -ar $backup_squelettes $final_path/www/squelettes + fi + + if [ -e "$backup_bdd" ] + then + cp -a $backup_bdd $final_path/association.sqlite + fi + + chown -R $app:$app $final_path + chmod 755 $final_path + + # Create the visitors permission if needed + visitors_enabled=$(ynh_permission_has_user "main" "visitors" && echo 0 || echo 1) + if [[ $visitors_enabled -eq 0 ]]; then + ynh_permission_update --permission "main" --add "visitors" + fi + + ynh_systemd_action --service_name=nginx --action=reload + # Finalize the upgrade + ynh_local_curl "/index.php" + sleep 5 + ynh_local_curl "/index.php" + upgrade_type="UPGRADE_APP" + + if [[ $visitors_enabled -eq 0 ]]; then + ynh_permission_update --permission "main" --remove "visitors" + fi +fi +#================================================= +# UPGRADE TO 1.1.0 if necessary +#================================================= + +if [ "$upgrade_type" == "1.1.0" ] +then + ynh_script_progression --message="Upgrading upgrade to 1.1.0" --weight=5 + # Download, check integrity, uncompress and patch the source from 0.9.8.src + ynh_setup_source --keep="config.local.php" --dest_dir="$final_path" --source_id="1.1.0" + # Set permissions on app files + ynh_system_user_create --username=$app + ynh_add_nginx_config + ynh_add_fpm_config --package="$extra_php_dependencies" + phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) + ynh_script_progression --message="restore data..." --weight=10 + + backup_bdd=/tmp/association.sqlite + backup_squelettes=/tmp/squelettes + + if [ -d "$backup_squelettes" ] then cp -ar $backup_squelettes $final_path/www/squelettes - ynh_secure_remove $backup_squelettes fi if [ -e "$backup_bdd" ] then - cp -a $backup_bdd $final_path/association.sqlite - ynh_secure_remove $backup_bdd + cp -a $backup_bdd $final_path/association.sqlite fi chown -R $app:$app $final_path - - key=$(ynh_string_random --length=50) - cp -a $final_path/config.dist.php $final_path/config.local.php - ynh_replace_string --match_string="const SECRET_KEY = '3xUhIgGwuovRKOjVsVPQ5yUMfXUSIOX2GKzcebsz5OINrYC50r';" --replace_string="const SECRET_KEY = '$key';" --target_file="$final_path/config.local.php" - if [ "$path_url" == "/" ]; then - ynh_replace_string --match_string="//const WWW_URI = '/asso/';" --replace_string="const WWW_URI = '$path_url';" --target_file="$final_path/config.local.php" - else - ynh_replace_string --match_string="//const WWW_URI = '/asso/';" --replace_string="const WWW_URI = '$path_url/';" --target_file="$final_path/config.local.php" - fi chmod 755 $final_path # Create the visitors permission if needed @@ -156,7 +196,7 @@ ynh_script_progression --message="Upgrading source files..." --weight=5 if [ "$upgrade_type" == "UPGRADE_APP" ] then # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$final_path" + ynh_setup_source --keep="config.local.php" --dest_dir="$final_path" fi #================================================= @@ -200,15 +240,6 @@ fi #================================================= ynh_script_progression --message="Adding a configuration file..." --weight=5 -key=$(ynh_string_random --length=50) -cp -a $final_path/config.dist.php $final_path/config.local.php -ynh_replace_string --match_string="const SECRET_KEY = '3xUhIgGwuovRKOjVsVPQ5yUMfXUSIOX2GKzcebsz5OINrYC50r';" --replace_string="const SECRET_KEY = '$key';" --target_file="$final_path/config.local.php" -if [ "$path_url" == "/" ]; then -ynh_replace_string --match_string="//const WWW_URI = '/asso/';" --replace_string="const WWW_URI = '$path_url';" --target_file="$final_path/config.local.php" -else -ynh_replace_string --match_string="//const WWW_URI = '/asso/';" --replace_string="const WWW_URI = '$path_url/';" --target_file="$final_path/config.local.php" -fi - # Permissions on files and directories chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" @@ -237,4 +268,4 @@ chmod 440 "$final_path/config.local.php" # END OF SCRIPT #================================================= -ynh_script_progression --message="Upgrade of Garradin completed" --last +ynh_script_progression --message="Upgrade of Garradin completed" --last \ No newline at end of file From 03e7ec6118cab945dd04357debe3fc00a35069a7 Mon Sep 17 00:00:00 2001 From: Robles Rodolphe Date: Mon, 1 Nov 2021 12:45:42 +0100 Subject: [PATCH 02/11] update to version 1.1.12 --- 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 6c013e0..e993b40 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Garradin (word meaning money in an aboriginal dialect of northern Australia, pronounced "gar-a-dine" em) is software for associative management. It is the tool of choice for managing an association, a sports club, an NGO, etc. It is designed to meet the needs of a small to medium-sized structure: management of members, accounting, website, note-taking in meetings, archiving and sharing of the association's operating documents, discussion between members, etc. etc. . -**Shipped version:** 1.1.11~ynh1 +**Shipped version:** 1.1.12~ynh1 **Demo:** https://garradin.eu/essai/ diff --git a/README_fr.md b/README_fr.md index d49e94d..de75c97 100644 --- a/README_fr.md +++ b/README_fr.md @@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Garradin (mot signifiant argent dans un dialecte aborigène du nord de l'Australie, prononcé « gar-a-dine »em) est un logiciel de gestion associative. Il est l'outil de prédilection pour gérer une association, un club sportif, une ONG, etc. Il est conçu pour répondre aux besoins d'une structure de petite à moyenne taille : gestion des adhérents, comptabilité, site web, prise de notes en réunion, archivage et partage des documents de fonctionnement de l'association, discussion entre adhérents, etc etc. -**Version incluse :** 1.1.11~ynh1 +**Version incluse :** 1.1.12~ynh1 **Démo :** https://garradin.eu/essai/ diff --git a/conf/app.src b/conf/app.src index 40398d4..777018e 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://fossil.kd2.org/garradin/uv/garradin-1.1.11.tar.bz2 -SOURCE_SUM=99783fac83945fc2fa9a8b04e85031090e1cc9de7555be3fdf6ed9724687976c +SOURCE_URL=https://fossil.kd2.org/garradin/uv/garradin-1.1.12.tar.bz2 +SOURCE_SUM=5f1994d6f39feac1f261ca1bce84a3f312def53e47a8faa197cd41ef657d5ab9 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.bz2 SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 5dab453..fe11780 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Software to manage association", "fr": "Logiciel libre de gestion d'association" }, - "version": "1.1.11~ynh1", + "version": "1.1.12~ynh1", "url": "http://garradin.eu", "upstream": { "license": "GPL-3.0-or-later", From 766aaa0bb69522a332f720d0e54d08dd7051aa3d Mon Sep 17 00:00:00 2001 From: Robles Rodolphe Date: Mon, 1 Nov 2021 16:16:53 +0100 Subject: [PATCH 03/11] simply read the version to pre-upgrade if necessary on upgrading --- scripts/upgrade | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index d682370..a04d80c 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -25,13 +25,13 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) # CHECK VERSION #================================================= -if ynh_compare_current_package_version --comparison lt --version 0.9.8.1~ynh1; then - upgrade_type="0.9.8" -elif ynh_compare_current_package_version --comparison le --version 1.0.7~ynh2; then - upgrade_type="1.1.0" -else +#if ynh_compare_current_package_version --comparison lt --version 0.9.8.1~ynh1; then +# upgrade_type="0.9.8" +#elif ynh_compare_current_package_version --comparison le --version 1.0.7~ynh2; then +# upgrade_type="1.1.0" +#else upgrade_type=$(ynh_check_app_version_changed) -fi +#fi #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP @@ -85,10 +85,11 @@ fi # UPGRADE TO 0.9.8 if necessary #================================================= -if [ "$upgrade_type" == "0.9.8" ] +if ynh_compare_current_package_version --comparison lt --version 0.9.8.1 then ynh_script_progression --message="Upgrading upgrade to 0.9.8" --weight=5 - # Download, check integrity, uncompress and patch the source from 0.9.8.src + + # Download, check integrity, uncompress and patch the source from 0.9.8.src ynh_setup_source --keep="config.local.php" --dest_dir="$final_path" --source_id="0.9.8" # Set permissions on app files ynh_system_user_create --username=$app @@ -134,10 +135,11 @@ fi # UPGRADE TO 1.1.0 if necessary #================================================= -if [ "$upgrade_type" == "1.1.0" ] +if ynh_compare_current_package_version --comparison lt --version 1.1.0 then ynh_script_progression --message="Upgrading upgrade to 1.1.0" --weight=5 - # Download, check integrity, uncompress and patch the source from 0.9.8.src + + # Download, check integrity, uncompress and patch the source from 1.1.0.src ynh_setup_source --keep="config.local.php" --dest_dir="$final_path" --source_id="1.1.0" # Set permissions on app files ynh_system_user_create --username=$app From 54dd18071306a42e51697b65f836b92b0ec277f3 Mon Sep 17 00:00:00 2001 From: Robles Rodolphe Date: Mon, 1 Nov 2021 16:35:07 +0100 Subject: [PATCH 04/11] back to previous code for upgrade --- scripts/upgrade | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index a04d80c..c2b9ad2 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -25,13 +25,13 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) # CHECK VERSION #================================================= -#if ynh_compare_current_package_version --comparison lt --version 0.9.8.1~ynh1; then -# upgrade_type="0.9.8" -#elif ynh_compare_current_package_version --comparison le --version 1.0.7~ynh2; then -# upgrade_type="1.1.0" -#else +if ynh_compare_current_package_version --comparison lt --version 0.9.8.1~ynh1; then + upgrade_type="0.9.8" +elif ynh_compare_current_package_version --comparison le --version 1.0.7~ynh2; then + upgrade_type="1.1.0" +else upgrade_type=$(ynh_check_app_version_changed) -#fi +fi #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP @@ -85,7 +85,7 @@ fi # UPGRADE TO 0.9.8 if necessary #================================================= -if ynh_compare_current_package_version --comparison lt --version 0.9.8.1 +if [ "$upgrade_type" == "0.9.8" ] then ynh_script_progression --message="Upgrading upgrade to 0.9.8" --weight=5 @@ -135,7 +135,7 @@ fi # UPGRADE TO 1.1.0 if necessary #================================================= -if ynh_compare_current_package_version --comparison lt --version 1.1.0 +if [ "$upgrade_type" == "1.1.0" ] then ynh_script_progression --message="Upgrading upgrade to 1.1.0" --weight=5 From b48900b3f4de5892764dd61f9476e39c94287545 Mon Sep 17 00:00:00 2001 From: Robles Rodolphe Date: Mon, 1 Nov 2021 19:14:10 +0100 Subject: [PATCH 05/11] simplify conditions if pre-upgrade needed --- scripts/upgrade | 38 +++++++++++++------------------------- 1 file changed, 13 insertions(+), 25 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index c2b9ad2..fdf8932 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -25,13 +25,7 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) # CHECK VERSION #================================================= -if ynh_compare_current_package_version --comparison lt --version 0.9.8.1~ynh1; then - upgrade_type="0.9.8" -elif ynh_compare_current_package_version --comparison le --version 1.0.7~ynh2; then - upgrade_type="1.1.0" -else - upgrade_type=$(ynh_check_app_version_changed) -fi +upgrade_type=$(ynh_check_app_version_changed) #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP @@ -85,7 +79,7 @@ fi # UPGRADE TO 0.9.8 if necessary #================================================= -if [ "$upgrade_type" == "0.9.8" ] +if ynh_compare_current_package_version --comparison lt --version 0.9.8.1~ynh1 then ynh_script_progression --message="Upgrading upgrade to 0.9.8" --weight=5 @@ -101,13 +95,11 @@ then backup_bdd=/tmp/association.sqlite backup_squelettes=/tmp/squelettes - if [ -d "$backup_squelettes" ] - then + if [ -d "$backup_squelettes" ]; then cp -ar $backup_squelettes $final_path/www/squelettes - fi + fi - if [ -e "$backup_bdd" ] - then + if [ -e "$backup_bdd" ]; then cp -a $backup_bdd $final_path/association.sqlite fi @@ -135,11 +127,11 @@ fi # UPGRADE TO 1.1.0 if necessary #================================================= -if [ "$upgrade_type" == "1.1.0" ] +if ynh_compare_current_package_version --comparison lt --version 1.1.0~ynh1 then ynh_script_progression --message="Upgrading upgrade to 1.1.0" --weight=5 - - # Download, check integrity, uncompress and patch the source from 1.1.0.src + + # Download, check integrity, uncompress and patch the source from 0.9.8.src ynh_setup_source --keep="config.local.php" --dest_dir="$final_path" --source_id="1.1.0" # Set permissions on app files ynh_system_user_create --username=$app @@ -151,13 +143,11 @@ then backup_bdd=/tmp/association.sqlite backup_squelettes=/tmp/squelettes - if [ -d "$backup_squelettes" ] - then + if [ -d "$backup_squelettes" ]; then cp -ar $backup_squelettes $final_path/www/squelettes fi - if [ -e "$backup_bdd" ] - then + if [ -e "$backup_bdd" ]; then cp -a $backup_bdd $final_path/association.sqlite fi @@ -225,14 +215,12 @@ ynh_script_progression --message="restore data..." --weight=10 backup_bdd=/tmp/association.sqlite backup_squelettes=/tmp/squelettes -if [ -d "$backup_squelettes" ] -then +if [ -d "$backup_squelettes" ]; then cp -ar $backup_squelettes $final_path/www/squelettes ynh_secure_remove $backup_squelettes fi -if [ -e "$backup_bdd" ] -then +if [ -e "$backup_bdd" ]; then cp -a $backup_bdd $final_path/association.sqlite ynh_secure_remove $backup_bdd fi @@ -270,4 +258,4 @@ chmod 440 "$final_path/config.local.php" # END OF SCRIPT #================================================= -ynh_script_progression --message="Upgrade of Garradin completed" --last \ No newline at end of file +ynh_script_progression --message="Upgrade of Garradin completed" --last From a047d86f8825560125534127ab38cbe4e9aef322 Mon Sep 17 00:00:00 2001 From: Robles Rodolphe Date: Tue, 2 Nov 2021 13:31:54 +0100 Subject: [PATCH 06/11] adjust condition for permissions in pre-upgrade if app is public or private --- scripts/upgrade | 74 +++++++++++++++++++++++++++++-------------------- 1 file changed, 44 insertions(+), 30 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index fdf8932..4ef359f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -82,8 +82,7 @@ fi if ynh_compare_current_package_version --comparison lt --version 0.9.8.1~ynh1 then ynh_script_progression --message="Upgrading upgrade to 0.9.8" --weight=5 - - # Download, check integrity, uncompress and patch the source from 0.9.8.src + # Download, check integrity, uncompress and patch the source from 0.9.8.src ynh_setup_source --keep="config.local.php" --dest_dir="$final_path" --source_id="0.9.8" # Set permissions on app files ynh_system_user_create --username=$app @@ -95,11 +94,13 @@ then backup_bdd=/tmp/association.sqlite backup_squelettes=/tmp/squelettes - if [ -d "$backup_squelettes" ]; then + if [ -d "$backup_squelettes" ] + then cp -ar $backup_squelettes $final_path/www/squelettes - fi + fi - if [ -e "$backup_bdd" ]; then + if [ -e "$backup_bdd" ] + then cp -a $backup_bdd $final_path/association.sqlite fi @@ -107,20 +108,25 @@ then chmod 755 $final_path # Create the visitors permission if needed - visitors_enabled=$(ynh_permission_has_user "main" "visitors" && echo 0 || echo 1) - if [[ $visitors_enabled -eq 0 ]]; then + visitors_enabled=$(ynh_permission_has_user "main" "visitors" && echo 0 || echo 1) + if [[ $visitors_enabled -eq 1 ]]; then ynh_permission_update --permission "main" --add "visitors" + ynh_systemd_action --service_name=nginx --action=reload + # Finalize the upgrade + ynh_local_curl "/index.php" + sleep 5 + ynh_local_curl "/index.php" + upgrade_type="UPGRADE_APP" + ynh_permission_update --permission "main" --remove "visitors" fi - ynh_systemd_action --service_name=nginx --action=reload - # Finalize the upgrade - ynh_local_curl "/index.php" - sleep 5 - ynh_local_curl "/index.php" - upgrade_type="UPGRADE_APP" - if [[ $visitors_enabled -eq 0 ]]; then - ynh_permission_update --permission "main" --remove "visitors" + ynh_systemd_action --service_name=nginx --action=reload + # Finalize the upgrade + ynh_local_curl "/index.php" + sleep 5 + ynh_local_curl "/index.php" + upgrade_type="UPGRADE_APP" fi fi #================================================= @@ -130,7 +136,6 @@ fi if ynh_compare_current_package_version --comparison lt --version 1.1.0~ynh1 then ynh_script_progression --message="Upgrading upgrade to 1.1.0" --weight=5 - # Download, check integrity, uncompress and patch the source from 0.9.8.src ynh_setup_source --keep="config.local.php" --dest_dir="$final_path" --source_id="1.1.0" # Set permissions on app files @@ -143,11 +148,13 @@ then backup_bdd=/tmp/association.sqlite backup_squelettes=/tmp/squelettes - if [ -d "$backup_squelettes" ]; then + if [ -d "$backup_squelettes" ] + then cp -ar $backup_squelettes $final_path/www/squelettes fi - if [ -e "$backup_bdd" ]; then + if [ -e "$backup_bdd" ] + then cp -a $backup_bdd $final_path/association.sqlite fi @@ -155,20 +162,25 @@ then chmod 755 $final_path # Create the visitors permission if needed - visitors_enabled=$(ynh_permission_has_user "main" "visitors" && echo 0 || echo 1) - if [[ $visitors_enabled -eq 0 ]]; then + visitors_enabled=$(ynh_permission_has_user "main" "visitors" && echo 0 || echo 1) + if [[ $visitors_enabled -eq 1 ]]; then ynh_permission_update --permission "main" --add "visitors" + ynh_systemd_action --service_name=nginx --action=reload + # Finalize the upgrade + ynh_local_curl "/index.php" + sleep 5 + ynh_local_curl "/index.php" + upgrade_type="UPGRADE_APP" + ynh_permission_update --permission "main" --remove "visitors" fi - ynh_systemd_action --service_name=nginx --action=reload - # Finalize the upgrade - ynh_local_curl "/index.php" - sleep 5 - ynh_local_curl "/index.php" - upgrade_type="UPGRADE_APP" - if [[ $visitors_enabled -eq 0 ]]; then - ynh_permission_update --permission "main" --remove "visitors" + ynh_systemd_action --service_name=nginx --action=reload + # Finalize the upgrade + ynh_local_curl "/index.php" + sleep 5 + ynh_local_curl "/index.php" + upgrade_type="UPGRADE_APP" fi fi @@ -215,12 +227,14 @@ ynh_script_progression --message="restore data..." --weight=10 backup_bdd=/tmp/association.sqlite backup_squelettes=/tmp/squelettes -if [ -d "$backup_squelettes" ]; then +if [ -d "$backup_squelettes" ] +then cp -ar $backup_squelettes $final_path/www/squelettes ynh_secure_remove $backup_squelettes fi -if [ -e "$backup_bdd" ]; then +if [ -e "$backup_bdd" ] +then cp -a $backup_bdd $final_path/association.sqlite ynh_secure_remove $backup_bdd fi From ecb8d6bd848949978a57511d96ecd89fc773c5a4 Mon Sep 17 00:00:00 2001 From: Robles Rodolphe Date: Tue, 2 Nov 2021 13:33:12 +0100 Subject: [PATCH 07/11] add a version ~ynh2 for the adjust condition for permissions in pre-upgrade if app is public or private --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index fe11780..e2867aa 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Software to manage association", "fr": "Logiciel libre de gestion d'association" }, - "version": "1.1.12~ynh1", + "version": "1.1.12~ynh2", "url": "http://garradin.eu", "upstream": { "license": "GPL-3.0-or-later", From ade9e6c8476e07a0a2251ce12d6158ddcc9b0a5e Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Tue, 2 Nov 2021 12:33:21 +0000 Subject: [PATCH 08/11] 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 e993b40..78fc2c5 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Garradin (word meaning money in an aboriginal dialect of northern Australia, pronounced "gar-a-dine" em) is software for associative management. It is the tool of choice for managing an association, a sports club, an NGO, etc. It is designed to meet the needs of a small to medium-sized structure: management of members, accounting, website, note-taking in meetings, archiving and sharing of the association's operating documents, discussion between members, etc. etc. . -**Shipped version:** 1.1.12~ynh1 +**Shipped version:** 1.1.12~ynh2 **Demo:** https://garradin.eu/essai/ diff --git a/README_fr.md b/README_fr.md index de75c97..602c98f 100644 --- a/README_fr.md +++ b/README_fr.md @@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Garradin (mot signifiant argent dans un dialecte aborigène du nord de l'Australie, prononcé « gar-a-dine »em) est un logiciel de gestion associative. Il est l'outil de prédilection pour gérer une association, un club sportif, une ONG, etc. Il est conçu pour répondre aux besoins d'une structure de petite à moyenne taille : gestion des adhérents, comptabilité, site web, prise de notes en réunion, archivage et partage des documents de fonctionnement de l'association, discussion entre adhérents, etc etc. -**Version incluse :** 1.1.12~ynh1 +**Version incluse :** 1.1.12~ynh2 **Démo :** https://garradin.eu/essai/ From d45c9335b9e0bb18b089098e3d8916e673a96f38 Mon Sep 17 00:00:00 2001 From: Robles Rodolphe Date: Mon, 8 Nov 2021 15:30:26 +0100 Subject: [PATCH 09/11] simplify temporally enable visitors if needed --- scripts/upgrade | 55 +++++++++++++++++++------------------------------ 1 file changed, 21 insertions(+), 34 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 4ef359f..fb98cca 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -1,3 +1,4 @@ + #!/bin/bash #================================================= @@ -107,26 +108,19 @@ then chown -R $app:$app $final_path chmod 755 $final_path - # Create the visitors permission if needed - visitors_enabled=$(ynh_permission_has_user "main" "visitors" && echo 0 || echo 1) - if [[ $visitors_enabled -eq 1 ]]; then + # Temporarily enable visitors for curl if needed + visitors_enabled=$(ynh_permission_has_user "main" "visitors" && echo yes || echo no) + if [[ $visitors_enabled == "no" ]]; then ynh_permission_update --permission "main" --add "visitors" - ynh_systemd_action --service_name=nginx --action=reload - # Finalize the upgrade - ynh_local_curl "/index.php" - sleep 5 - ynh_local_curl "/index.php" - upgrade_type="UPGRADE_APP" - ynh_permission_update --permission "main" --remove "visitors" fi - if [[ $visitors_enabled -eq 0 ]]; then - ynh_systemd_action --service_name=nginx --action=reload - # Finalize the upgrade - ynh_local_curl "/index.php" - sleep 5 - ynh_local_curl "/index.php" - upgrade_type="UPGRADE_APP" + # Finalize the upgrade + ynh_local_curl "/index.php" + sleep 5 + ynh_local_curl "/index.php" + + if [[ $visitors_enabled == "no" ]]; then + ynh_permission_update --permission "main" --remove "visitors" fi fi #================================================= @@ -161,26 +155,19 @@ then chown -R $app:$app $final_path chmod 755 $final_path - # Create the visitors permission if needed - visitors_enabled=$(ynh_permission_has_user "main" "visitors" && echo 0 || echo 1) - if [[ $visitors_enabled -eq 1 ]]; then + # Temporarily enable visitors for curl if needed + visitors_enabled=$(ynh_permission_has_user "main" "visitors" && echo yes || echo no) + if [[ $visitors_enabled == "no" ]]; then ynh_permission_update --permission "main" --add "visitors" - ynh_systemd_action --service_name=nginx --action=reload - # Finalize the upgrade - ynh_local_curl "/index.php" - sleep 5 - ynh_local_curl "/index.php" - upgrade_type="UPGRADE_APP" - ynh_permission_update --permission "main" --remove "visitors" fi - if [[ $visitors_enabled -eq 0 ]]; then - ynh_systemd_action --service_name=nginx --action=reload - # Finalize the upgrade - ynh_local_curl "/index.php" - sleep 5 - ynh_local_curl "/index.php" - upgrade_type="UPGRADE_APP" + # Finalize the upgrade + ynh_local_curl "/index.php" + sleep 5 + ynh_local_curl "/index.php" + + if [[ $visitors_enabled == "no" ]]; then + ynh_permission_update --permission "main" --remove "visitors" fi fi From 45ea94405880d048aeaff6d97488e43cc2808596 Mon Sep 17 00:00:00 2001 From: Robles Rodolphe Date: Mon, 8 Nov 2021 15:31:54 +0100 Subject: [PATCH 10/11] remove first blank line --- scripts/upgrade | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index fb98cca..e47b8cf 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -1,4 +1,3 @@ - #!/bin/bash #================================================= From ec609261f58a1a38865600fe4af59ee2ec4d488a Mon Sep 17 00:00:00 2001 From: Robles Rodolphe Date: Sun, 21 Nov 2021 20:49:00 +0100 Subject: [PATCH 11/11] upgrade last stable version 1.1.14 --- 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 78fc2c5..f7c4742 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Garradin (word meaning money in an aboriginal dialect of northern Australia, pronounced "gar-a-dine" em) is software for associative management. It is the tool of choice for managing an association, a sports club, an NGO, etc. It is designed to meet the needs of a small to medium-sized structure: management of members, accounting, website, note-taking in meetings, archiving and sharing of the association's operating documents, discussion between members, etc. etc. . -**Shipped version:** 1.1.12~ynh2 +**Shipped version:** 1.1.14~ynh1 **Demo:** https://garradin.eu/essai/ diff --git a/README_fr.md b/README_fr.md index 602c98f..b36fd5d 100644 --- a/README_fr.md +++ b/README_fr.md @@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Garradin (mot signifiant argent dans un dialecte aborigène du nord de l'Australie, prononcé « gar-a-dine »em) est un logiciel de gestion associative. Il est l'outil de prédilection pour gérer une association, un club sportif, une ONG, etc. Il est conçu pour répondre aux besoins d'une structure de petite à moyenne taille : gestion des adhérents, comptabilité, site web, prise de notes en réunion, archivage et partage des documents de fonctionnement de l'association, discussion entre adhérents, etc etc. -**Version incluse :** 1.1.12~ynh2 +**Version incluse :** 1.1.14~ynh1 **Démo :** https://garradin.eu/essai/ diff --git a/conf/app.src b/conf/app.src index 777018e..06e9006 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://fossil.kd2.org/garradin/uv/garradin-1.1.12.tar.bz2 -SOURCE_SUM=5f1994d6f39feac1f261ca1bce84a3f312def53e47a8faa197cd41ef657d5ab9 +SOURCE_URL=https://fossil.kd2.org/garradin/uv/garradin-1.1.14.tar.bz2 +SOURCE_SUM=bd735252540c6d26a1593d61486881a296a9b4a166532083805808b015da33d7 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.bz2 SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index e2867aa..7411084 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Software to manage association", "fr": "Logiciel libre de gestion d'association" }, - "version": "1.1.12~ynh2", + "version": "1.1.14~ynh1", "url": "http://garradin.eu", "upstream": { "license": "GPL-3.0-or-later",