1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/spip_ynh.git synced 2024-09-03 20:25:59 +02:00

Merge pull request #17 from YunoHost-Apps/Fix-linter-warnings

Fix linter warnings
This commit is contained in:
Kayou 2020-12-14 18:58:57 +01:00 committed by GitHub
commit 120070d4de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 40 additions and 69 deletions

View file

@ -1,11 +1,11 @@
# SPIP for YunoHost
[![Integration level](https://dash.yunohost.org/integration/spip.svg)](https://dash.yunohost.org/appci/app/spip)
[![Install spip with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=spip)
[![Integration level](https://dash.yunohost.org/integration/spip.svg)](https://dash.yunohost.org/appci/app/spip) ![](https://ci-apps.yunohost.org/ci/badges/spip.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/spip.maintain.svg)
[![Install SPIP with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=spip)
*[Lire ce readme en français.](./README_fr.md)*
> *This package allow you to install spip quickly and simply on a YunoHost server.
> *This package allow you to install SPIP 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
@ -36,14 +36,13 @@ How to configure this app: by an admin panel.
#### Multi-users support
Are LDAP and HTTP auth supported? **Yes**
Can the app be used by multiple users? **Yes**
* Are LDAP and HTTP auth supported? **Yes**
* Can the app be used by multiple users? **Yes**
#### Supported architectures
* x86-64b - [![Build Status](https://ci-apps.yunohost.org/ci/logs/spip%20%28Community%29.svg)](https://ci-apps.yunohost.org/ci/apps/spip/)
* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/spip%20%28Community%29.svg)](https://ci-apps.yunohost.org/ci/apps/spip/)
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/spip%20%28Community%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/spip/)
* Jessie x86-64b - [![Build Status](https://ci-stretch.nohost.me/ci/logs/spip%20%28Community%29.svg)](https://ci-stretch.nohost.me/ci/apps/spip/)
## Migrate from SPIP2
@ -77,10 +76,8 @@ You should see that SPIP is installed after that.
---
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/spip_ynh/tree/testing).
To try the testing branch, please proceed like that.

View file

@ -1,11 +1,11 @@
# SPIP pour YunoHost
[![Integration level](https://dash.yunohost.org/integration/spip.svg)](https://dash.yunohost.org/appci/app/spip)
[![Install spip with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=spip)
[![Integration level](https://dash.yunohost.org/integration/spip.svg)](https://dash.yunohost.org/appci/app/spip) ![](https://ci-apps.yunohost.org/ci/badges/spip.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/spip.maintain.svg)
[![Install SPIP with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=spip)
*[Read this readme in english.](./README.md)*
> *Ce package vous permet d'installer spip rapidement et simplement sur un serveur Yunohost.
> *Ce package vous permet d'installer SPIP rapidement et simplement sur un serveur Yunohost.
Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.*
## Vue d'ensemble
@ -36,14 +36,13 @@ Comment configurer cette application: via le panneau d'administration.
#### Support multi-utilisateurs
L'authentification LDAP et HTTP est-elle prise en charge? **Oui**
L'application peut-elle être utilisée par plusieurs utilisateurs? **Oui**
* L'authentification LDAP et HTTP est-elle prise en charge? **Oui**
* L'application peut-elle être utilisée par plusieurs utilisateurs? **Oui**
#### Supported architectures
* x86-64b - [![Build Status](https://ci-apps.yunohost.org/ci/logs/spip%20%28Community%29.svg)](https://ci-apps.yunohost.org/ci/apps/spip/)
* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/spip%20%28Community%29.svg)](https://ci-apps.yunohost.org/ci/apps/spip/)
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/spip%20%28Community%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/spip/)
* Jessie x86-64b - [![Build Status](https://ci-stretch.nohost.me/ci/logs/spip%20%28Community%29.svg)](https://ci-stretch.nohost.me/ci/apps/spip/)
## Migration depuis SPIP2
@ -69,15 +68,13 @@ Notez qu'une tâche cron sera exécutée après la fin de cette commande. Vous d
## Links
* Signaler un bug: https://github.com/YunoHost-Apps/spip_ynh/issues
* Site de l'application: Lien vers le site officiel de cette application
* Site de l'application: https://www.spip.net
* Site web YunoHost: https://yunohost.org/
---
Informations pour les développeurs
----------------
## Informations pour les développeurs
**Seulement si vous voulez utiliser une branche de test pour le codage, au lieu de fusionner directement dans la banche principale.**
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/spip_ynh/tree/testing).
Pour essayer la branche testing, procédez comme suit.

View file

@ -17,20 +17,8 @@
upgrade=1 from_commit=2016c3a3a972dc74d1ae1ec74ff80987eb753ce9
backup_restore=1
multi_instance=1
incorrect_path=1
port_already_use=0
change_url=1
;;; Levels
Level 1=auto
Level 2=auto
Level 3=auto
Level 4=1
Level 5=auto
Level 6=auto
Level 7=auto
Level 8=0
Level 9=0
Level 10=0
;;; Upgrade options
; commit=2016c3a3a972dc74d1ae1ec74ff80987eb753ce9
name=21 Nov 2017

View file

@ -23,13 +23,13 @@ location __PATH__/ {
}
# Add headers to serve security related headers
more_set_headers Strict-Transport-Security "max-age=15768000;";
more_set_headers X-Content-Type-Options nosniff;
more_set_headers X-Frame-Options "SAMEORIGIN";
more_set_headers "X-XSS-Protection 1; mode=block";
more_set_headers X-Robots-Tag none;
more_set_headers X-Download-Options noopen;
more_set_headers X-Permitted-Cross-Domain-Policies none;
more_set_headers 'Strict-Transport-Security: max-age=15768000';
more_set_headers 'X-Content-Type-Options: nosniff';
more_set_headers 'X-Frame-Options: SAMEORIGIN';
more_set_headers 'X-XSS-Protection: 1, mode=block';
more_set_headers 'X-Robots-Tag: none';
more_set_headers 'X-Download-Options: noopen';
more_set_headers 'X-Permitted-Cross-Domain-Policies: none';
location ~^/(tmp|config|\.ht)/{
deny all;
@ -41,7 +41,7 @@ location __PATH__/ {
# cacher.
rewrite ^/([^/]*)/favicon\.ico$ __PATH__/spip.php?page=favicon.ico last;
expires 1w;
more_set_headers Cache-Control public;
more_set_headers 'Cache-Control: public';
}
location ~ [^/]\.php(/|$) {

View file

@ -3,10 +3,10 @@
"id": "spip",
"packaging_format": 1,
"description": {
"en": "A CMS with a focus on collaborative edition and multilingualism",
"fr": "Un CMS conçu pour l'édition collaborative et le multilinguisme"
"en": "CMS with a focus on collaborative edition and multilingualism",
"fr": "CMS conçu pour l'édition collaborative et le multilinguisme"
},
"version": "3.2.7~ynh3",
"version": "3.2.7~ynh4",
"url": "http://www.spip.net/",
"license": "GPL-3.0-or-later",
"maintainer": {
@ -14,7 +14,7 @@
"email": "cyp@rouquin.me"
},
"requirements": {
"yunohost": ">= 3.2.2"
"yunohost": ">= 3.8.1"
},
"multi_instance": true,
"services": [

View file

@ -242,7 +242,7 @@ ynh_handle_app_migration () {
# TODO Handle multi instance apps...
# Check that there is not already an app installed for this id.
(yunohost app list --installed -f "$new_app" | grep -q -w "$new_app") \
yunohost app list | grep -q 'id: $appname' \
&& ynh_die "$new_app is already installed"
#=================================================

View file

@ -36,21 +36,18 @@ app=$YNH_APP_INSTANCE_NAME
#=================================================
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
#=================================================
ynh_print_info "Validating installation parameters..."
ynh_script_progression --message="Validating installation parameters..."
final_path=/var/www/$app
test ! -e "$final_path" || ynh_die "This path already contains a folder"
# Normalize the url path syntax
path_url=$(ynh_normalize_url_path $path_url)
# Register (book) web path
ynh_webpath_register $app $domain $path_url
#=================================================
# STORE SETTINGS FROM MANIFEST
#=================================================
ynh_print_info "Storing installation settings..."
ynh_script_progression --message="Storing installation settings..."
ynh_app_setting_set $app domain $domain
ynh_app_setting_set $app path $path_url
@ -62,7 +59,7 @@ ynh_app_setting_set $app users_status $users_status
#=================================================
# CREATE A MYSQL DATABASE
#=================================================
ynh_print_info "Creating a MySQL database..."
ynh_script_progression --message="Creating a MySQL database..."
db_name=$(ynh_sanitize_dbid $app)
ynh_app_setting_set $app db_name $db_name
@ -72,14 +69,14 @@ db_pwd=$(ynh_app_setting_get $app mysqlpwd)
#=================================================
# INSTALL DEPENDENCIES
#=================================================
ynh_print_info --message="Installing dependencies..."
ynh_script_progression --message="Installing dependencies..."
ynh_install_app_dependencies $pkg_dependencies
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
ynh_print_info "Setting up source files..."
ynh_script_progression --message="Setting up source files..."
ynh_app_setting_set $app final_path $final_path
# Download, check integrity, uncompress and patch the source from app.src
@ -88,7 +85,7 @@ ynh_setup_source "$final_path"
#=================================================
# NGINX CONFIGURATION
#=================================================
ynh_print_info "Configuring nginx web server..."
ynh_script_progression --message="Configuring nginx web server..."
# Create a dedicated nginx config
ynh_add_nginx_config
@ -96,7 +93,7 @@ ynh_add_nginx_config
#=================================================
# CREATE DEDICATED USER
#=================================================
ynh_print_info "Configuring system user..."
ynh_script_progression --message="Configuring system user..."
# Create a system user
ynh_system_user_create $app
@ -104,7 +101,7 @@ ynh_system_user_create $app
#=================================================
# PHP-FPM CONFIGURATION
#=================================================
ynh_print_info "Configuring php-fpm..."
ynh_script_progression --message="Configuring php-fpm..."
# Create a dedicated php-fpm config
ynh_add_fpm_config
@ -181,7 +178,7 @@ ynh_store_file_checksum "$final_path/config/connect.php"
#=================================================
# SETUP SSOWAT
#=================================================
ynh_print_info "Configuring SSOwat..."
ynh_script_progression --message="Configuring SSOwat..."
# Make app public if necessary
if [ $is_public -eq 1 ]; then
@ -192,7 +189,7 @@ fi
#=================================================
# RELOAD NGINX
#=================================================
ynh_print_info "Reloading nginx web server..."
ynh_script_progression --message="Reloading nginx web server..."
systemctl reload nginx
@ -200,4 +197,4 @@ systemctl reload nginx
# END OF SCRIPT
#=================================================
ynh_print_info "Installation of $app completed"
ynh_script_progression --message="Installation of $app completed"

View file

@ -102,13 +102,6 @@ if [ $migration_process -eq 1 ]; then
db_name=$(ynh_app_setting_get $app db_name)
fi
#=================================================
# CHECK THE PATH
#=================================================
# Normalize the URL path syntax
path_url=$(ynh_normalize_url_path $path_url)
#=================================================
# STANDARD UPGRADE STEPS
#=================================================
@ -200,7 +193,6 @@ if [ $is_public -eq 0 ]; then
ynh_app_setting_delete $app skipped_uris
fi
#=================================================
# MODIFY A CONFIG FILE
#=================================================