1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/z-push_ynh.git synced 2024-09-03 18:05:58 +02:00

Apply last example_ynh

This commit is contained in:
yalh76 2021-02-26 00:50:43 +01:00
parent a05896f0e4
commit 8e99ec37fb
12 changed files with 92 additions and 51 deletions

View file

@ -3,8 +3,8 @@
[![Integration level](https://dash.yunohost.org/integration/z-push.svg)](https://dash.yunohost.org/appci/app/z-push) ![](https://ci-apps.yunohost.org/ci/badges/z-push.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/z-push.maintain.svg) [![Integration level](https://dash.yunohost.org/integration/z-push.svg)](https://dash.yunohost.org/appci/app/z-push) ![](https://ci-apps.yunohost.org/ci/badges/z-push.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/z-push.maintain.svg)
[![Install Z-Push with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=z-push) [![Install Z-Push with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=z-push)
> *This package allow you to install Z-Push quickly and simply on a YunoHost server. > *This package allows you to install Z-Push 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.* If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.*
## Overview ## Overview
Z-Push is an Exchange ActiveSync fronted written in PHP which lets you synchronize emails (IMAP/SMTP backend) and calendar/contacts (cardDAV and caldDAV backend) Z-Push is an Exchange ActiveSync fronted written in PHP which lets you synchronize emails (IMAP/SMTP backend) and calendar/contacts (cardDAV and caldDAV backend)
@ -21,7 +21,6 @@ Z-Push is an Exchange ActiveSync fronted written in PHP which lets you synchroni
- [x] The current IMAP backend configuration seems able to handle email addresses different from login (for example login: john and email john.doe@domain.tld instead of john@domain.tld) - Further testing required! - [x] The current IMAP backend configuration seems able to handle email addresses different from login (for example login: john and email john.doe@domain.tld instead of john@domain.tld) - Further testing required!
- [x] The sources are based on http://download.z-push.org/final/ - [x] The sources are based on http://download.z-push.org/final/
- [x] Autodiscover implemented - [x] Autodiscover implemented
- [x] Use of version 2.6.1 final
## Documentation ## Documentation
@ -41,9 +40,9 @@ Z-Push is an Exchange ActiveSync fronted written in PHP which lets you synchroni
--- ---
## Developers info ## Developer info
Please do your pull request to the [testing branch](https://github.com/YunoHost-Apps/z-push_ynh/tree/testing). Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/z-push_ynh/tree/testing).
To try the testing branch, please proceed like that. To try the testing branch, please proceed like that.
``` ```

View file

@ -15,6 +15,8 @@
upgrade=1 from_commit=9e8a72669814237122dfc6f901c9377895c193db upgrade=1 from_commit=9e8a72669814237122dfc6f901c9377895c193db
# 2.5.2~ynh1 # 2.5.2~ynh1
upgrade=1 from_commit=a857788c1fb369baa5f0608da12013b003cceed3 upgrade=1 from_commit=a857788c1fb369baa5f0608da12013b003cceed3
# 2.6.1~ynh1
upgrade=1 from_commit=a05896f0e4f2b015dcf643c644ac6c98c2f6695b
backup_restore=1 backup_restore=1
multi_instance=1 multi_instance=1
port_already_use=0 port_already_use=0
@ -27,3 +29,5 @@ Notification=all
name=2.5.1~ynh3 name=2.5.1~ynh3
; commit=a857788c1fb369baa5f0608da12013b003cceed3 ; commit=a857788c1fb369baa5f0608da12013b003cceed3
name=2.5.2~ynh1 name=2.5.2~ynh1
; commit=a05896f0e4f2b015dcf643c644ac6c98c2f6695b
name=2.6.1~ynh1

View file

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

View file

@ -1,5 +1,6 @@
#sub_path_only rewrite ^Microsoft-Server-ActiveSync$ Microsoft-Server-ActiveSync/ permanent; #sub_path_only rewrite ^Microsoft-Server-ActiveSync$ Microsoft-Server-ActiveSync/ permanent;
location /Microsoft-Server-ActiveSync/ { location /Microsoft-Server-ActiveSync/ {
# Path to source # Path to source
alias __FINALPATH__/ ; alias __FINALPATH__/ ;
@ -12,6 +13,7 @@ location /Microsoft-Server-ActiveSync/ {
# Common parameter to increase upload size limit in conjunction with dedicated php-fpm file # Common parameter to increase upload size limit in conjunction with dedicated php-fpm file
client_max_body_size 50M; client_max_body_size 50M;
try_files $uri $uri/ index.php; try_files $uri $uri/ index.php;
rewrite ^(.*)$ /Microsoft-Server-ActiveSync/index.php last; rewrite ^(.*)$ /Microsoft-Server-ActiveSync/index.php last;
location ~ [^/]\.php(/|$) { location ~ [^/]\.php(/|$) {

View file

@ -235,7 +235,7 @@ pm.max_requests = 0
; anything, but it may not be a good idea to use the .php extension or it ; anything, but it may not be a good idea to use the .php extension or it
; may conflict with a real PHP file. ; may conflict with a real PHP file.
; Default Value: not set ; Default Value: not set
pm.status_path = /fpm-status pm.status_path = /status
; The ping URI to call the monitoring page of FPM. If this value is not set, no ; The ping URI to call the monitoring page of FPM. If this value is not set, no
; URI will be recognized as a ping page. This could be used to test from outside ; URI will be recognized as a ping page. This could be used to test from outside
@ -320,7 +320,7 @@ ping.path = /ping
; The log file for slow requests ; The log file for slow requests
; Default Value: not set ; Default Value: not set
; Note: slowlog is mandatory if request_slowlog_timeout is set ; Note: slowlog is mandatory if request_slowlog_timeout is set
slowlog = /var/log/nginx/__NAMETOCHANGE__.slow.log slowlog = log/$pool.log.slow
; The timeout for serving a single request after which a PHP backtrace will be ; The timeout for serving a single request after which a PHP backtrace will be
; dumped to the 'slowlog' file. A value of '0s' means 'off'. ; dumped to the 'slowlog' file. A value of '0s' means 'off'.
@ -358,7 +358,7 @@ rlimit_core = 0
; Chdir to this directory at the start. ; Chdir to this directory at the start.
; Note: relative path can be used. ; Note: relative path can be used.
; Default Value: current directory or / when chroot ; Default Value: current directory or / when chroot
chdir = /var/www/__NAMETOCHANGE__ chdir = __FINALPATH__
; Redirect worker stdout and stderr into main error log. If not set, stdout and ; Redirect worker stdout and stderr into main error log. If not set, stdout and
; stderr will be redirected to /dev/null according to FastCGI specs. ; stderr will be redirected to /dev/null according to FastCGI specs.

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. *Determine if 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 Z-Push itself. Refer to its documentation or repository for help.*
- *When in doubt, post here and we will figure it out together.*
3. *Delete the 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 $app_id`*
### Steps to reproduce
- *If you performed a command from the CLI, the command itself is enough. For example:*
```sh
sudo yunohost app install z-push
```
- *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

@ -6,7 +6,7 @@
"en": "ActiveSync frontend that helps you synchronize emails, calendar and contacts", "en": "ActiveSync frontend that helps you synchronize emails, calendar and contacts",
"fr": "Frontend ActiveSync qui permet de synchroniser emails, calendrier et contacts" "fr": "Frontend ActiveSync qui permet de synchroniser emails, calendrier et contacts"
}, },
"version": "2.6.1~ynh1", "version": "2.6.1~ynh2",
"url": "https://z-push.org", "url": "https://z-push.org",
"license": "AGPL-3.0-or-later", "license": "AGPL-3.0-or-later",
"maintainer": { "maintainer": {
@ -21,13 +21,13 @@
} }
], ],
"requirements": { "requirements": {
"yunohost": ">= 3.8.1" "yunohost": ">= 4.1.3"
}, },
"multi_instance": true,
"services": [ "services": [
"nginx", "nginx",
"php7.3-fpm" "php7.3-fpm"
], ],
"multi_instance": true,
"arguments": { "arguments": {
"install" : [ "install" : [
{ {
@ -37,7 +37,7 @@
"en": "Choose a domain for Z-Push", "en": "Choose a domain for Z-Push",
"fr": "Choisissez un domaine pour Z-Push" "fr": "Choisissez un domaine pour Z-Push"
}, },
"example": "domain.org" "example": "example.com"
} }
] ]
} }

View file

@ -13,6 +13,4 @@
## Package_check results ## Package_check results
--- ---
*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* * 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!"*
[![Build Status](https://ci-apps-dev.yunohost.org/jenkins/job/z-push_ynh%20PR-NUM-%20(USERNAME)/badge/icon)](https://ci-apps-dev.yunohost.org/jenkins/job/z-push_ynh%20PR-NUM-%20(USERNAME)/)

View file

@ -51,8 +51,8 @@ ynh_script_progression --message="Storing installation settings..."
ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=domain --value=$domain
ynh_app_setting_set --app=$app --key=path --value=$path_url ynh_app_setting_set --app=$app --key=path --value=$path_url
ynh_app_setting_set --app=$app --key=statedir --value="$statedir" ynh_app_setting_set --app=$app --key=statedir --value=$statedir
ynh_app_setting_set --app=$app --key=final_logpath --value="$final_logpath" ynh_app_setting_set --app=$app --key=final_logpath --value=$final_logpath
#================================================= #=================================================
# STANDARD MODIFICATIONS # STANDARD MODIFICATIONS
@ -227,12 +227,13 @@ ynh_use_logrotate
#================================================= #=================================================
# SETUP SSOWAT # SETUP SSOWAT
#================================================= #=================================================
ynh_script_progression --message="Configuring SSOwat..." ynh_script_progression --message="Configuring permissions..."
# Make app public # Make app public
ynh_app_setting_set --app=$app --key=unprotected_uris --value="/" ynh_permission_update --permission="main" --add="visitors"
domain_regex=$(echo "$domain" | sed 's@-@.@g') domain_regex=$(echo "$domain" | sed 's@-@.@g')
ynh_app_setting_set --app=$app --key=skipped_regex --value="$domain_regex/[Aa]uto[Dd]iscover/.*" ynh_permission_create --permission="autodiscover" --url "re:$domain_regex/[Aa]uto[Dd]iscover/.*" --allowed="visitors" --show_tile="false" --protected="true"
#================================================= #=================================================
# RELOAD NGINX # RELOAD NGINX

View file

@ -17,7 +17,6 @@ ynh_script_progression --message="Loading installation settings..."
app=$YNH_APP_INSTANCE_NAME app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get --app=$app --key=domain) domain=$(ynh_app_setting_get --app=$app --key=domain)
final_path=$(ynh_app_setting_get --app=$app --key=final_path) final_path=$(ynh_app_setting_get --app=$app --key=final_path)
statedir=$(ynh_app_setting_get --app=$app --key=statedir) statedir=$(ynh_app_setting_get --app=$app --key=statedir)
final_logpath=$(ynh_app_setting_get --app=$app --key=final_logpath) final_logpath=$(ynh_app_setting_get --app=$app --key=final_logpath)

View file

@ -13,7 +13,6 @@ source /usr/share/yunohost/helpers
#================================================= #=================================================
# MANAGE SCRIPT FAILURE # MANAGE SCRIPT FAILURE
#================================================= #=================================================
ynh_script_progression --message="Managing script failure..."
ynh_clean_setup () { ynh_clean_setup () {
true true
@ -94,6 +93,7 @@ ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
# Recreate a dedicated php-fpm config # Recreate a dedicated php-fpm config
ynh_add_fpm_config --usage=low --footprint=low --package="$extra_php_dependencies" ynh_add_fpm_config --usage=low --footprint=low --package="$extra_php_dependencies"
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
#================================================= #=================================================
# SPECIFIC RESTORATION # SPECIFIC RESTORATION

View file

@ -34,21 +34,6 @@ upgrade_type=$(ynh_check_app_version_changed)
#================================================= #=================================================
ynh_script_progression --message="Ensuring downward compatibility..." ynh_script_progression --message="Ensuring downward compatibility..."
# Fix is_public as a boolean value
if [ "$is_public" = "Yes" ]; then
ynh_app_setting_set --app=$app --key=is_public --value=1
is_public=1
elif [ "$is_public" = "No" ]; then
ynh_app_setting_set --app=$app --key=is_public --value=0
is_public=0
fi
# If final_path doesn't exist, create it
if [ -z "$final_path" ]; then
final_path=/var/www/$app
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
fi
if [ -z "$statedir" ]; if [ -z "$statedir" ];
then then
statedir="/home/yunohost.app/$app" statedir="/home/yunohost.app/$app"
@ -63,6 +48,13 @@ then
mkdir -p $final_logpath mkdir -p $final_logpath
fi 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 BEFORE UPGRADE THEN ACTIVE TRAP # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#================================================= #=================================================
@ -220,14 +212,6 @@ cp ../conf/backend/config-searchldap.php $final_path/backend/searchldap/config.p
# Fixstates to avoid full resync of devices after version upgrades # Fixstates to avoid full resync of devices after version upgrades
$final_path/z-push-admin.php -a fixstates $final_path/z-push-admin.php -a fixstates
#=================================================
# SETUP LOGROTATE
#=================================================
ynh_script_progression --message="Upgrading logrotate configuration..."
# Use logrotate to manage app-specific logfile(s)
ynh_use_logrotate --non-append
#================================================= #=================================================
# GENERIC FINALIZATION # GENERIC FINALIZATION
#================================================= #=================================================
@ -242,14 +226,12 @@ chown -R $app: $statedir
chown -R $app: $final_logpath chown -R $app: $final_logpath
#================================================= #=================================================
# SETUP SSOWAT # SETUP LOGROTATE
#================================================= #=================================================
ynh_script_progression --message="Upgrading SSOwat configuration..." ynh_script_progression --message="Upgrading logrotate configuration..."
# Make app public # Use logrotate to manage app-specific logfile(s)
ynh_app_setting_set --app=$app --key=unprotected_uris --value="/" ynh_use_logrotate --non-append
domain_regex=$(echo "$domain" | sed 's@-@.@g')
ynh_app_setting_set --app=$app --key=skipped_regex --value="$domain_regex/[Aa]uto[Dd]iscover/.*"
#================================================= #=================================================
# RELOAD NGINX # RELOAD NGINX