1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/garradin_ynh.git synced 2024-09-03 18:36:17 +02:00

[autopatch] Update issue and PR templates

This commit is contained in:
Robles Rodolphe 2021-05-13 18:52:40 +02:00
commit a71a3f5d86
17 changed files with 117 additions and 81 deletions

View file

@ -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

View file

@ -1,24 +1,24 @@
# 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)
[![Installer Garradin avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=garradin)
[![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)*
> *Ce package vous permet d'installer Garradin rapidement et simplement sur un serveur YunoHost.
Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/#/install) pour apprendre comment l'installer.*
Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/install) pour apprendre comment l'installer.*
## 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
@ -37,8 +37,8 @@ Garradin est un logiciel libre de gestion associative. il permet de gérer des m
#### Architectures supportées
* 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

View file

@ -13,6 +13,4 @@
upgrade=1
backup_restore=1
multi_instance=1
incorrect_path=1
port_already_use=0
change_url=1

View file

@ -4,3 +4,4 @@ SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.bz2
SOURCE_IN_SUBDIR=true
SOURCE_FILENAME=

View file

@ -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

View file

@ -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'

BIN
images/documents.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 KiB

BIN
images/membre-v1.1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

View file

@ -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": {
@ -14,7 +14,7 @@
"email": "win10@tutanota.com"
},
"requirements": {
"yunohost": ">=4.0"
"yunohost": ">=4.1.7"
},
"multi_instance": true,
"services": [

View file

@ -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

View file

@ -8,7 +8,6 @@
source _common.sh
source /usr/share/yunohost/helpers
ynh_abort_if_errors
#=================================================
# RETRIEVE ARGUMENTS
@ -30,6 +29,23 @@ ynh_script_progression --message="Loading installation settings..." --weight=1
# Needed for helper "ynh_add_nginx_config"
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
#=================================================
# BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP
#=================================================
ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." --weight=1
# Backup the current version of the app
ynh_backup_before_upgrade
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"
# Restore it if the upgrade fails
ynh_restore_upgradebackup
}
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors
#=================================================
# CHECK WHICH PARTS SHOULD BE CHANGED
#=================================================
@ -77,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

View file

@ -23,6 +23,7 @@ ynh_abort_if_errors
domain=$YNH_APP_ARG_DOMAIN
path_url=$YNH_APP_ARG_PATH
is_public=$YNH_APP_ARG_IS_PUBLIC
app=$YNH_APP_INSTANCE_NAME
#=================================================
@ -63,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
#=================================================
@ -77,36 +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 $app:$app $final_path -R
chmod 755 $final_path -R
# Remove the public access
ynh_app_setting_delete --app=$app --key=skipped_uris
#=================================================
# SETUP SSOWAT
#=================================================
ynh_script_progression --message="Configuring permissions..." --weight=8
# Make app public if necessary
if [ $is_public -eq 1 ]
then
# Everyone can access the app.
# The "main" permission is automatically created before the install script.
ynh_permission_update --permission "main" --add "visitors"
fi
# Only the users can access to the panel of the app
# ynh_permission_update --permission="main" --add "all_users"
#=================================================
# 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;
@ -119,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
#=================================================

View file

@ -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

View file

@ -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

View file

@ -31,7 +31,6 @@ else
upgrade_type=$(ynh_check_app_version_changed)
fi
#=================================================
# ENSURE DOWNWARD COMPATIBILITY
#=================================================
@ -43,6 +42,13 @@ if [ -z "$final_path" ]; then
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
fi
# Cleaning legacy permissions
if ynh_legacy_permissions_exists; then
ynh_legacy_permissions_delete_all
ynh_app_setting_delete --app=$app --key=is_public
fi
#=================================================
# Backup Data
#=================================================
@ -93,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
@ -101,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"
@ -113,11 +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 $app:$app $final_path -R
chmod 755 $final_path -R
chmod 755 $final_path
# Create the visitors permission if needed
if ! ynh_permission_exists --permission "visitors"; then
ynh_permission_create --permission "visitors"
if [ $is_public -eq 1 ]
then
ynh_permission_update --permission "main" --add "visitors"
fi
ynh_systemd_action --service_name=nginx --action=reload
@ -162,8 +170,9 @@ 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)
#=======================================================
# backup bdd, squelettes directory and config.local.php
#=======================================================
@ -184,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"
@ -193,23 +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 $app:$app $final_path -R
chmod 755 $final_path -R
#=================================================
# SETUP SSOWAT
#=================================================
ynh_script_progression --message="Upgrading permissions configuration..." --weight=2
# Create the visitors permission if needed
if ! ynh_permission_exists --permission "visitors"; then
ynh_permission_create --permission "visitors"
fi
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
@ -221,7 +233,6 @@ ynh_systemd_action --service_name=nginx --action=reload
#=================================================
# Finalise Upgrade
#=================================================
ynh_script_progression --message="Finalise upgrade" --weight=1
ynh_local_curl "/admin/index.php"