1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/opensondage_ynh.git synced 2024-09-03 19:46:28 +02:00

Merge pull request #65 from ericgaspar/patch

- Add issue_template
- Add README_fr
- Set PHP version as variable
- Cleaning up
This commit is contained in:
Éric Gaspar 2020-10-04 20:35:29 +02:00 committed by GitHub
commit c2f9f56278
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 198 additions and 61 deletions

View file

@ -1,14 +1,16 @@
# OpenSondage for YunoHost
[![Integration level](https://dash.yunohost.org/integration/opensondage.svg)](https://dash.yunohost.org/appci/app/opensondage)
[![Integration level](https://dash.yunohost.org/integration/opensondage.svg)](https://dash.yunohost.org/appci/app/opensondage) ![](https://ci-apps.yunohost.org/ci/badges/opensondage.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/opensondage.maintain.svg)
[![Install OpenSondage with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=opensondage)
*[Lire ce readme en français.](./README_fr.md)*
> *This package allow you to install OpenSondage quickly and simply on a YunoHost server.
If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.*
## Overview
Framadate is an online service for planning an appointment or making a decision quickly and easily. It's a community free/libre software alternative to Doodle.
OpenSondage is an online service for planning an appointment or making a decision quickly and easily. It's a community free/libre software alternative to Doodle.
**Shipped version:** 1.1.10
@ -26,7 +28,7 @@ Framadate is an online service for planning an appointment or making a decision
## Documentation
* Official documentation: https://framagit.org/framasoft/framadate/framadate/wikis/home
* YunoHost documentation: If specific documentation is needed, feel free to contribute.
* YunoHost documentation: https://yunohost.org/#/app_opensondage
## YunoHost specific features
@ -34,9 +36,8 @@ Framadate is an online service for planning an appointment or making a decision
#### Supported architectures
* x86-64b - [![Build Status](https://ci-apps.yunohost.org/ci/logs/opensondage%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/opensondage/)
* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/opensondage%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/opensondage/)
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/opensondage%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/opensondage/)
* Jessie x86-64b - [![Build Status](https://ci-stretch.nohost.me/ci/logs/opensondage%20%28Apps%29.svg)](https://ci-stretch.nohost.me/ci/apps/opensondage/)
## Limitations
@ -56,10 +57,8 @@ Framadate is an online service for planning an appointment or making a decision
---
Developers info
----------------
## Developers info
**Only if you want to use a testing branch for coding, instead of merging directly into master.**
Please do your pull request to the [testing branch](https://github.com/YunoHost-Apps/opensondage_ynh/tree/testing).
To try the testing branch, please proceed like that.

70
README_fr.md Normal file
View file

@ -0,0 +1,70 @@
# OpenSondage pour YunoHost
[![Integration level](https://dash.yunohost.org/integration/opensondage.svg)](https://dash.yunohost.org/appci/app/opensondage) ![](https://ci-apps.yunohost.org/ci/badges/opensondage.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/opensondage.maintain.svg)
[![Installer OpenSondage avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=opensondage)
*[Read this readme in english.](./README.md)*
> *Ce package vous permet d'installer OpenSondage 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.*
## Vue d'ensemble
OpenSondage est un service en ligne permettant de planifier un rendez-vous ou de prendre une décision rapidement et facilement. C'est une alternative logicielle libre et communautaire à Doodle.
**Version incluse :** 1.1.10
## Captures d'écran
![](https://framadate.org/images/date.png)
## Démo
* [Démo YunoHost](https://demo.yunohost.org/date/)
* [Démo officielle](https://framadate.org/)
## Configuration
## Documentation
* Documentation officielle : https://framagit.org/framasoft/framadate/framadate/wikis/home
* Documentation YunoHost : https://yunohost.org/#/app_opensondage_fr
## Caractéristiques spécifiques YunoHost
#### Support multi-utilisateur
#### Architectures supportées
* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/opensondage%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/opensondage/)
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/opensondage%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/opensondage/)
## Limitations
* Impossible de configurer le courrier, que ce soit avec smtp ou avec sendmail. Voir https://framagit.org/framasoft/framadate/merge_requests/184
* Impossible d'utiliser SSOWAT pour identifier l'utilisateur actuel. Voir https://framagit.org/framasoft/framadate/issues/177
## Additional information
* Ce paquet contient une version personnalisée de Framadate (fork d'OpenSondage et Studs), les sources sont ici : https://git.framasoft.org/framasoft/framadate/.
## Liens
* Signaler un bug : https://github.com/YunoHost-Apps/opensondage_ynh/issues
* Site de l'application OpenSondage : https://git.framasoft.org/framasoft/framadate/framadate
* Dépôt de l'application principale : https://git.framasoft.org/framasoft/framadate/framadate
* Site web YunoHost : https://yunohost.org/
---
## Informations pour les développeurs
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/opensondage_ynh/tree/testing).
Pour essayer la branche testing, procédez comme suit.
```
sudo yunohost app install https://github.com/YunoHost-Apps/opensondage_ynh/tree/testing --debug
or
sudo yunohost app upgrade opensondage -u https://github.com/YunoHost-Apps/opensondage_ynh/tree/testing --debug
```

View file

@ -13,7 +13,7 @@ location __PATH__/ {
try_files $uri $uri/ /index.php;
location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
fastcgi_pass unix:/var/run/php/php7.0-fpm-__NAME__.sock;
fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock;
include fastcgi_params;
fastcgi_param REMOTE_USER $remote_user;
fastcgi_param PATH_INFO $fastcgi_path_info;

View file

@ -33,7 +33,7 @@ group = __USER__
; (IPv6 and IPv4-mapped) on a specific port;
; '/path/to/unix/socket' - to listen on a unix socket.
; Note: This value is mandatory.
listen = /var/run/php/php7.0-fpm-__NAMETOCHANGE__.sock
listen = /var/run/php/php__PHPVERSION__-fpm-__NAMETOCHANGE__.sock
; Set listen(2) backlog.
; Default Value: 511 (-1 on FreeBSD and OpenBSD)

55
issue_template.md Normal file
View file

@ -0,0 +1,55 @@
---
name: Bug report
about: When creating a bug report, please use the following template to provide all the relevant information and help debugging efficiently.
---
**How to post a meaningful bug report**
1. *Read this whole template first.*
2. *Make sure you are on the right place:*
- *If you were performing an action on the app from the webadmin or the CLI (install, update, backup, restore, change url...), you are on the right place!*
- *Otherwise, the issue may be due to the app itself. Refer to its documentation or repository for help.*
- *In doubt, ask here and we will figure it out together.*
3. *Delete these italic comments as you write over them below, and remove this guide.*
---
### Describe the bug
*A clear and concise description of what the bug is.*
### Context
- Hardware: *VPS bought online / Old laptop or computer / Raspberry Pi at home / Internet Cube with VPN / Other ARM board / ...*
- YunoHost version: x.x.x
- I have access to my server: *Through SSH | through the webadmin | direct access via keyboard / screen | ...*
- Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: *no / yes*
- If yes, please explain:
- Using, or trying to install package version/branch:
- If upgrading, current package version: *can be found in the admin, or with `yunohost app info opensondage`*
### Steps to reproduce
- *If you performed a command from the CLI, the command itself is enough. For example:*
```sh
sudo yunohost app install opensondage
```
- *If you used the webadmin, please perform the equivalent command from the CLI first.*
- *If the error occurs in your browser, explain what you did:*
1. *Go to '...'*
2. *Click on '...'*
3. *Scroll down to '...'*
4. *See error*
### Expected behavior
*A clear and concise description of what you expected to happen. You can remove this section if the command above is enough to understand your intent.*
### Logs
*When an operation fails, YunoHost provides a simple way to share the logs.*
- *In the webadmin, the error message contains a link to the relevant log page. On that page, you will be able to 'Share with Yunopaste'. If you missed it, the logs of previous operations are also available under Tools > Logs.*
- *In command line, the command to share the logs is displayed at the end of the operation and looks like `yunohost log display [log name] --share`. If you missed it, you can find the log ID of a previous operation using `yunohost log list`.*
*After sharing the log, please copypaste directly the link provided by YunoHost (to help readability, no need to copypaste the entire content of the log here, just the link is enough...)*
*If applicable and useful, add screenshots to help explain your problem.*

View file

@ -3,11 +3,11 @@
"id": "opensondage",
"packaging_format": 1,
"description": {
"en": "OpenSondage is an online service for planning an appointment or making a decision quickly and easily. No registration is required.",
"fr": "OpenSondage sert à faire des sondages sans authentification pour trouver une date de réunion qui convienne à toutes les personnes concernées.",
"de": "OpenSondage ist ein Online-Dienst, der Ihnen bei der Absprache von Terminen oder der Entscheidungsfindung hilft."
"en": "Service for planning an appointment or making a decision quickly and easily.",
"fr": "Service pour planifier un rendez-vous ou prendre une décision rapidement et facilement.",
"de": "Service zur schnellen und einfachen Planung eines Termins oder zur Entscheidungsfindung."
},
"version": "1.1.10~ynh1",
"version": "1.1.10~ynh2",
"url": "https://git.framasoft.org/framasoft/framadate",
"license": "CECILL-B",
"maintainer": {
@ -19,7 +19,7 @@
"email": "ljf+opensondage_ynh@grimaud.me"
}],
"requirements": {
"yunohost": ">= 3.5.0"
"yunohost": ">= 3.8.1"
},
"multi_instance": true,
"services": [

View file

@ -2,7 +2,7 @@
- *Description of why you made this PR*
## Solution
- *And how you fix that*
- *And how do you fix that problem*
## PR Status
- [ ] Code finished.
@ -11,14 +11,8 @@
- [ ] Upgrade from last version tested.
- [ ] Can be reviewed and tested.
## Validation
## Package_check results
---
*Minor decision*
- **Upgrade previous version** :
- [ ] **Code review** :
- [ ] **Approval (LGTM)** :
- [ ] **Approval (LGTM)** :
- **CI succeeded** :
[![Build Status](https://ci-apps-hq.yunohost.org/jenkins/job/opensondage_ynh%20PR-NUM-/badge/icon)](https://ci-apps-hq.yunohost.org/jenkins/job/opensondage_ynh%20PR-NUM-/)
*Please replace '-NUM-' in this link by the PR number.*
When the PR is marked as ready to merge, you have to wait for 3 days before really merging it.
*If you have access to [App Continuous Integration for packagers](https://yunohost.org/#/packaging_apps_ci) you can provide a link to the package_check results like below, replacing '-NUM-' in this link by the PR number and USERNAME by your username on the ci-apps-dev. Or you provide a screenshot or a pastebin of the results*
[![Build Status](https://ci-apps-dev.yunohost.org/jenkins/job/opensondage_ynh%20PR-NUM-%20(USERNAME)/badge/icon)](https://ci-apps-dev.yunohost.org/jenkins/job/opensondage_ynh%20PR-NUM-%20(USERNAME)/)

View file

@ -1,5 +1,22 @@
#!/bin/bash
#=================================================
# COMMON VARIABLES
#=================================================
# dependencies used by the app
YNH_PHP_VERSION="7.3"
pkg_dependencies="php${YNH_PHP_VERSION}-fpdf php${YNH_PHP_VERSION}-cli php${YNH_PHP_VERSION}-xml"
#=================================================
# PERSONAL HELPERS
#=================================================
#=================================================
# FUTURE OFFICIAL HELPERS
#=================================================
#=================================================
# EXPERIMENTAL HELPERS
#=================================================

View file

@ -19,41 +19,41 @@ ynh_abort_if_errors
#=================================================
# LOAD SETTINGS
#=================================================
ynh_script_progression --message="Loading installation settings..."
ynh_print_info --message="Loading installation settings..."
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)
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
phpversion=$(ynh_app_setting_get --app="$app" --key=phpversion)
#=================================================
# STANDARD BACKUP STEPS
# DECLARE DATA AND CONF FILES TO BACKUP
#=================================================
ynh_print_info --message="Declaring files to be backed up..."
#=================================================
# BACKUP THE APP MAIN DIR
#=================================================
ynh_script_progression --message="Backing up the main app directory..."
ynh_backup --src_path="$final_path"
#=================================================
# BACKUP THE NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Backing up nginx web server configuration..."
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# BACKUP THE PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Backing up php-fpm configuration..."
ynh_backup --src_path="/etc/php/7.0/fpm/pool.d/$app.conf"
ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
#=================================================
# BACKUP THE MYSQL DATABASE
#=================================================
ynh_script_progression --message="Backing up the MySQL database..."
ynh_mysql_dump_db --database="$db_name" > db.sql
@ -61,4 +61,4 @@ ynh_mysql_dump_db --database="$db_name" > db.sql
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." --last
ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."

View file

@ -52,7 +52,7 @@ fi
#=================================================
# MODIFY URL IN NGINX CONF
#=================================================
ynh_script_progression --message="Updating nginx web server configuration..." --weight=2
ynh_script_progression --message="Updating NGINX web server configuration..." --weight=2
nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf
@ -83,7 +83,7 @@ fi
#=================================================
# UPDATE OPENSONDAGE CONFIGURATION
#=================================================
ynh_script_progression --message="Reconfiguring opensondage..."
ynh_script_progression --message="Reconfiguring OpenSondage..."
ynh_replace_string --match_string="const APP_URL = '$old_domain';" --replace_string="const APP_URL = '$new_domain';" --target_file="$final_path/app/inc/config.php"
@ -112,7 +112,7 @@ fi
#=================================================
# RELOAD NGINX
#=================================================
ynh_script_progression --message="Reloading nginx web server..."
ynh_script_progression --message="Reloading NGINX web server..."
ynh_systemd_action --service_name=nginx --action=reload

View file

@ -54,9 +54,9 @@ ynh_app_setting_set --app=$app --key=is_public --value=$is_public
#=================================================
# INSTALL DEPENDENCIES
#=================================================
ynh_script_progression --message="Installing dependencies..."3
ynh_script_progression --message="Installing dependencies..." --weight=3
ynh_install_app_dependencies php-fpdf php-cli php-xml
ynh_install_app_dependencies $pkg_dependencies
#=================================================
# CREATE A MYSQL DATABASE
@ -79,7 +79,7 @@ ynh_setup_source --dest_dir="$final_path"
#=================================================
# NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Configuring nginx web server..." --weight=2
ynh_script_progression --message="Configuring NGINX web server..." --weight=2
# Create a dedicated nginx config
ynh_add_nginx_config
@ -95,9 +95,9 @@ ynh_system_user_create --username=$app
#=================================================
# PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Configuring php-fpm..." --weight=2
ynh_script_progression --message="Configuring PHP-FPM..." --weight=2
# Create a dedicated php-fpm config
# Create a dedicated PHP-FPM config
ynh_add_fpm_config
#=================================================
@ -105,7 +105,7 @@ ynh_add_fpm_config
#=================================================
# CREATE CONFIG.PHP
#=================================================
ynh_script_progression --message="Configuring opensondage..." --weight=2
ynh_script_progression --message="Configuring $app..." --weight=2
config="$final_path/app/inc/config.php"
@ -140,12 +140,12 @@ touch "$final_path/admin/stdout.log"
#=================================================
# RUN DATABASE INITILIZATION
#=================================================
ynh_script_progression --message="Initializing database..."2
ynh_script_progression --message="Initializing database..." --weight=2
# Install composer
ynh_install_composer
ynh_exec_warn_less php7.0 "$final_path/admin/migration.php"
ynh_exec_warn_less php$YNH_PHP_VERSION "$final_path/admin/migration.php"
#=================================================
# GENERIC FINALIZATION
@ -179,7 +179,7 @@ fi
#=================================================
# RELOAD NGINX
#=================================================
ynh_script_progression --message="Reloading nginx web server..." --weight=2
ynh_script_progression --message="Reloading NGINX web server..." --weight=2
ynh_systemd_action --service_name=nginx --action=reload

View file

@ -25,7 +25,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
#=================================================
# REMOVE DEPENDENCIES
#=================================================
ynh_script_progression --message="Removing dependencies..."3
ynh_script_progression --message="Removing dependencies..." --weight=3
# Remove metapackage and its dependencies
ynh_remove_app_dependencies
@ -41,7 +41,7 @@ ynh_mysql_remove_db --db_user=$db_name --db_name=$db_name
#=================================================
# REMOVE APP MAIN DIR
#=================================================
ynh_script_progression --message="Removing app main directory..." --weight=2
ynh_script_progression --message="Removing $app main directory..." --weight=2
# Remove the app directory securely
ynh_secure_remove --file="$final_path"
@ -49,7 +49,7 @@ ynh_secure_remove --file="$final_path"
#=================================================
# REMOVE NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Removing nginx web server configuration..." --weight=3
ynh_script_progression --message="Removing NGINX web server configuration..." --weight=3
# Remove the dedicated nginx config
ynh_remove_nginx_config
@ -57,9 +57,9 @@ ynh_remove_nginx_config
#=================================================
# REMOVE PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Removing php-fpm configuration..." --weight=2
ynh_script_progression --message="Removing PHP-FPM configuration..." --weight=2
# Remove the dedicated php-fpm config
# Remove the dedicated PHP-FPM config
ynh_remove_fpm_config
#=================================================

View file

@ -27,6 +27,7 @@ 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)
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
#=================================================
# CHECK IF THE APP CAN BE RESTORED
@ -72,7 +73,7 @@ chown -R $app: "$final_path/"{tpl_c,admin/stdout.log}
# RESTORE THE PHP-FPM CONFIGURATION
#=================================================
ynh_restore_file --origin_path="/etc/php/7.0/fpm/pool.d/$app.conf"
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
#=================================================
# RESTORE THE MYSQL DATABASE
@ -91,16 +92,16 @@ ynh_mysql_connect_as --user=$db_name --password=$db_pwd --database=$db_name < ./
ynh_script_progression --message="Reinstalling dependencies..." --weight=9
# Define and install dependencies
ynh_install_app_dependencies php-fpdf php-xml
ynh_install_app_dependencies $pkg_dependencies
#=================================================
# GENERIC FINALIZATION
#=================================================
# RELOAD NGINX AND PHP-FPM
#=================================================
ynh_script_progression --message="Reloading nginx web server and php-fpm..." --weight=3
ynh_script_progression --message="Reloading NGINX web server and PHP-FPM..." --weight=3
ynh_systemd_action --service_name=php7.0-fpm --action=reload
ynh_systemd_action --service_name=php$phpversion-fpm --action=reload
ynh_systemd_action --service_name=nginx --action=reload
#=================================================

View file

@ -23,6 +23,7 @@ is_public=$(ynh_app_setting_get --app=$app --key=is_public)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
language=$(ynh_app_setting_get --app=$app --key=language)
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
phpversion=$(ynh_app_setting_get --app="$app" --key=phpversion)
#=================================================
# CHECK VERSION
@ -115,7 +116,7 @@ fi
#=================================================
# NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Upgrading nginx web server configuration..." --weight=2
ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=2
# Create a dedicated nginx config
ynh_add_nginx_config
@ -125,7 +126,7 @@ ynh_add_nginx_config
#=================================================
ynh_script_progression --message="Upgrading dependencies..." --weight=7
ynh_install_app_dependencies php-fpdf php-cli php-xml
ynh_install_app_dependencies $pkg_dependencies
#=================================================
# CREATE DEDICATED USER
@ -138,9 +139,9 @@ ynh_system_user_create --username=$app
#=================================================
# PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Upgrading php-fpm configuration..." --weight=3
ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=3
# Create a dedicated php-fpm config
# Create a dedicated PHP-FPM config
ynh_add_fpm_config
#=================================================
@ -151,7 +152,7 @@ ynh_add_fpm_config
if [ "$upgrade_type" == "UPGRADE_APP" ]
then
ynh_script_progression --message="Reconfiguring opensondage..." --weight=2
ynh_script_progression --message="Reconfiguring $app..." --weight=2
config="$final_path/app/inc/config.php"
@ -234,7 +235,7 @@ fi
#=================================================
# RELOAD NGINX
#=================================================
ynh_script_progression --message="Reloading nginx web server..."
ynh_script_progression --message="Reloading NGINX web server..."
ynh_systemd_action --service_name=nginx --action=reload