diff --git a/README.md b/README.md index c4a7d30..01473a6 100644 --- a/README.md +++ b/README.md @@ -11,14 +11,14 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in ## Overview Garradin is a free association managing software. -**Shipped version:** 1.0.7 +**Shipped version:** 1.1.5 ## Screenshots -![](images/membre.png) +![](images/membre-v1.1.png) ![](images/compta.png) ![](images/emails.png) -![](images/wiki.png) +![](images/edition-site-v1.1.png) ![](images/site.jpg) ## Demo @@ -37,8 +37,8 @@ LDAP is not supported yet. #### Supported architectures -* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/garradin%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/garradin/) -* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/garradin%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/garradin/) +* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/garradin.svg)](https://ci-apps.yunohost.org/ci/apps/garradin/) +* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/garradin.svg)](https://ci-apps-arm.yunohost.org/ci/apps/garradin/) ## Limitations diff --git a/README_fr.md b/README_fr.md index 1664431..f8c225b 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,6 +1,6 @@ # Garradin pour YunoHost -[![Niveau d'intégration](https://dash.yunohost.org/integration/garradin.svg)](https://dash.yunohost.org/appci/app/garradin) ![](https://ci-apps.yunohost.org/ci/badges/garradin.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/garradin.maintain.svg) +[![Niveau d'intégration](https://dash.yunohost.org/integration/garradin.svg)](https://dash.yunohost.org/appci/app/garradin) ![](https://ci-apps.yunohost.org/ci/badges/garradin.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/garradin.maintain.svg) [![Installer Garradin avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=garradin) *[Read this readme in english.](./README.md)* @@ -11,14 +11,14 @@ Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/install) ## Vue d'ensemble Garradin est un logiciel libre de gestion associative. il permet de gérer des membres. -**Version incluse :** 1.0.7 +**Version incluse :** 1.1.5 ## Captures d'écran -![](images/membre.png) +![](images/membre-v1.1.png) ![](images/compta.png) ![](images/emails.png) -![](images/wiki.png) +![](images/edition-site-v1.1.png) ![](images/site.jpg) ## Démo diff --git a/conf/0.9.8.src b/conf/0.9.8.src index 0be6dec..074f42e 100644 --- a/conf/0.9.8.src +++ b/conf/0.9.8.src @@ -3,4 +3,5 @@ SOURCE_SUM=7cc64b51c9721c2dd7ee510f245bcfc4693ee07f74581ad74003906eb4716ef1 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.bz2 SOURCE_IN_SUBDIR=true -SOURCE_FILENAME= \ No newline at end of file +SOURCE_FILENAME= + diff --git a/conf/app.src b/conf/app.src index cd191db..5766ae3 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://fossil.kd2.org/garradin/uv/garradin-1.0.7.tar.bz2 -SOURCE_SUM=bf54afad2ebd1e04cb5fa7f5a2033a7c790e30e7fb69b6795b103d66dfcb6c06 +SOURCE_URL=https://fossil.kd2.org/garradin/uv/garradin-1.1.5.tar.bz2 +SOURCE_SUM=462bceee5981838bdd8d37f15eeab991e6ba8ca90c798214a0d968a67d9b7d28 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.bz2 SOURCE_IN_SUBDIR=true diff --git a/conf/php-fpm.conf b/conf/php-fpm.conf index 5b710a8..9be1163 100644 --- a/conf/php-fpm.conf +++ b/conf/php-fpm.conf @@ -96,7 +96,7 @@ pm = dynamic ; forget to tweak pm.* to fit your needs. ; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand' ; Note: This value is mandatory. -pm.max_children = 10 +pm.max_children = 5 ; The number of child processes created on startup. ; Note: Used only when pm is set to 'dynamic' diff --git a/images/documents.png b/images/documents.png new file mode 100644 index 0000000..f184044 Binary files /dev/null and b/images/documents.png differ diff --git a/images/edition-site-v1.1.png b/images/edition-site-v1.1.png new file mode 100644 index 0000000..18e5c6d Binary files /dev/null and b/images/edition-site-v1.1.png differ diff --git a/images/membre-v1.1.png b/images/membre-v1.1.png new file mode 100644 index 0000000..0a32291 Binary files /dev/null and b/images/membre-v1.1.png differ diff --git a/manifest.json b/manifest.json index dd7aef1..d3b45a2 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.0.7~ynh2", + "version": "1.1.5~ynh1", "url": "http://garradin.eu/a-propos/", "license": "GPL-3.0-or-later", "maintainer": { diff --git a/pull_request_template.md b/pull_request_template.md index 6c28fc5..bf00535 100644 --- a/pull_request_template.md +++ b/pull_request_template.md @@ -12,5 +12,5 @@ - [ ] Can be reviewed and tested. ## Package_check results ---- * An automatic package_check will be launch at https://ci-apps-dev.yunohost.org/, when you add a specific comment to your Pull Request: "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!"* + diff --git a/scripts/_common.sh b/scripts/_common.sh index 51dc46f..c350c4f 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,9 +4,11 @@ # COMMON VARIABLES #================================================= # dependencies used by the app -YNH_PHP_VERSION="7.3" +#pkg_dependencies="imagemagick" -extra_php_dependencies="php${YNH_PHP_VERSION}-sqlite3" +YNH_PHP_VERSION="7.4" + +extra_php_dependencies="php${YNH_PHP_VERSION}-sqlite3 php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-imagick php${YNH_PHP_VERSION}-intl php${YNH_PHP_VERSION}-cli" #================================================= # PERSONAL HELPERS diff --git a/scripts/change_url b/scripts/change_url index 68e37e3..532750e 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -93,7 +93,8 @@ else [ $change_path -eq 1 ] fi # Change the domain for NGINX -if [ $change_domain -eq 1 ]; then +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 diff --git a/scripts/install b/scripts/install index c1d7b78..28232f8 100644 --- a/scripts/install +++ b/scripts/install @@ -64,6 +64,8 @@ ynh_app_setting_set --app=$app --key=final_path --value=$final_path # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$final_path" +chown -R $app:$app $final_path + #================================================= # NGINX CONFIGURATION #================================================= @@ -78,30 +80,15 @@ ynh_add_nginx_config ynh_script_progression --message="Configuring PHP-FPM..." --weight=5 # Create a dedicated PHP-FPM config -ynh_add_fpm_config --package="$extra_php_dependencies" -phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) +ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION --package="$extra_php_dependencies" +#phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) + #================================================= -# Files owned by user app +# ADD A CONFIGURATION #================================================= +ynh_script_progression --message="Adding a configuration file..." --weight=5 -chown -R $app:$app $final_path -chmod 755 $final_path - -#================================================= -# SETUP SSOWAT -#================================================= -ynh_script_progression --message="Configuring permissions..." --weight=8 - -# Make app public if necessary -if [ $is_public -eq 1 ] -then - ynh_permission_update --permission="main" --add="visitors" -fi - -#================================================= -# MODIFY A CONFIG FILE -#================================================= # copy config.dist.php creating config.local.php cp -a $final_path/config.dist.php $final_path/config.local.php # create a key for the secret key CSFR; @@ -114,6 +101,31 @@ 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 400 $final_path/config.dist.php $final_path/index.php $final_path/sous-domaine.html $final_path/VERSION +chmod 644 $final_path/config.local.php +find $final_path/scripts -type d -exec chmod 500 {} + +find $final_path/scripts -type f -exec chmod 400 {} + +find $final_path/templates -type d -exec chmod 500 {} + +find $final_path/templates -type f -exec chmod 400 {} + +find $final_path/include -type d -exec chmod 500 {} + +find $final_path/include -type f -exec chmod 400 {} + +find $final_path/data -type d -exec chmod 700 {} + +find $final_path/data -type f -exec chmod 600 {} + +find /var/www/garradin/www -type d -exec chmod 755 {} + +find /var/www/garradin/www -type f -exec chmod 644 {} + + +#================================================= +# SETUP SSOWAT +#================================================= +ynh_script_progression --message="Configuring permissions..." --weight=8 + +# Make app public if necessary +if [ $is_public -eq 1 ] +then + ynh_permission_update --permission "main" --add "visitors" +fi + #================================================= # RELOAD NGINX #================================================= diff --git a/scripts/remove b/scripts/remove index 7780ced..3f0c7d7 100644 --- a/scripts/remove +++ b/scripts/remove @@ -41,7 +41,7 @@ ynh_remove_nginx_config ynh_script_progression --message="Removing PHP-FPM configuration..." --weight=2 # Remove the dedicated PHP-FPM config -ynh_remove_fpm_config --package="$extra_php_dependencies" +ynh_remove_fpm_config --phpversion=$YNH_PHP_VERSION --package="$extra_php_dependencies" #================================================= # GENERIC FINALIZATION diff --git a/scripts/restore b/scripts/restore index 5d3be8e..f23b8ad 100644 --- a/scripts/restore +++ b/scripts/restore @@ -76,7 +76,7 @@ ynh_script_progression --message="Reconfiguring PHP-FPM..." --weight=6 ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" -ynh_add_fpm_config --package="$extra_php_dependencies" +ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION --package="$extra_php_dependencies" #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index 7084a31..0341ddf 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -99,7 +99,7 @@ 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 ynh_secure_remove $backup_squelettes @@ -107,10 +107,12 @@ then if [ -e "$backup_bdd" ] then - cp -a $backup_bdd $final_path/association.sqlite + cp -a $backup_bdd $final_path/association.sqlite ynh_secure_remove $backup_bdd 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" @@ -119,12 +121,11 @@ then 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 - chown -R $app:$app $final_path chmod 755 $final_path # Create the visitors permission if needed if [ $is_public -eq 1 ] then - ynh_permission_update --permission="main" --add="visitors" + ynh_permission_update --permission "main" --add "visitors" fi ynh_systemd_action --service_name=nginx --action=reload @@ -169,7 +170,7 @@ ynh_add_nginx_config ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2 # Create a dedicated PHP-FPM config -ynh_add_fpm_config --package="$extra_php_dependencies" +ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION --package="$extra_php_dependencies" phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #======================================================= @@ -192,6 +193,13 @@ then ynh_secure_remove $backup_bdd fi +chown -R $app:$app $final_path + +#================================================= +# ADD A CONFIGURATION +#================================================= +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" @@ -201,13 +209,19 @@ 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 -#================================================= -# Files owned by user app -#================================================= - # Set permissions on app files -chown -R $app:$app $final_path -chmod 755 $final_path +chmod 400 $final_path/config.dist.php $final_path/index.php $final_path/sous-domaine.html $final_path/VERSION +chmod 644 $final_path/config.local.php +find $final_path/scripts -type d -exec chmod 500 {} + +find $final_path/scripts -type f -exec chmod 400 {} + +find $final_path/templates -type d -exec chmod 500 {} + +find $final_path/templates -type f -exec chmod 400 {} + +find $final_path/include -type d -exec chmod 500 {} + +find $final_path/include -type f -exec chmod 400 {} + +find $final_path/data -type d -exec chmod 700 {} + +find $final_path/data -type f -exec chmod 600 {} + +find /var/www/garradin/www -type d -exec chmod 755 {} + +find /var/www/garradin/www -type f -exec chmod 644 {} + #================================================= # RELOAD NGINX