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:
commit
120070d4de
8 changed files with 40 additions and 69 deletions
17
README.md
17
README.md
|
@ -1,11 +1,11 @@
|
||||||
# SPIP for YunoHost
|
# SPIP for YunoHost
|
||||||
|
|
||||||
[![Integration level](https://dash.yunohost.org/integration/spip.svg)](https://dash.yunohost.org/appci/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)
|
[![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)*
|
*[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.*
|
If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.*
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
@ -36,14 +36,13 @@ How to configure this app: by an admin panel.
|
||||||
|
|
||||||
#### Multi-users support
|
#### Multi-users support
|
||||||
|
|
||||||
Are LDAP and HTTP auth supported? **Yes**
|
* Are LDAP and HTTP auth supported? **Yes**
|
||||||
Can the app be used by multiple users? **Yes**
|
* Can the app be used by multiple users? **Yes**
|
||||||
|
|
||||||
#### Supported architectures
|
#### 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/)
|
* 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
|
## 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).
|
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.
|
To try the testing branch, please proceed like that.
|
||||||
|
|
19
README_fr.md
19
README_fr.md
|
@ -1,11 +1,11 @@
|
||||||
# SPIP pour YunoHost
|
# SPIP pour YunoHost
|
||||||
|
|
||||||
[![Integration level](https://dash.yunohost.org/integration/spip.svg)](https://dash.yunohost.org/appci/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)
|
[![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)*
|
*[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.*
|
Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.*
|
||||||
|
|
||||||
## Vue d'ensemble
|
## Vue d'ensemble
|
||||||
|
@ -36,14 +36,13 @@ Comment configurer cette application: via le panneau d'administration.
|
||||||
|
|
||||||
#### Support multi-utilisateurs
|
#### Support multi-utilisateurs
|
||||||
|
|
||||||
L'authentification LDAP et HTTP est-elle prise en charge? **Oui**
|
* L'authentification LDAP et HTTP est-elle prise en charge? **Oui**
|
||||||
L'application peut-elle être utilisée par plusieurs utilisateurs? **Oui**
|
* L'application peut-elle être utilisée par plusieurs utilisateurs? **Oui**
|
||||||
|
|
||||||
#### Supported architectures
|
#### 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/)
|
* 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
|
## 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
|
## Links
|
||||||
|
|
||||||
* Signaler un bug: https://github.com/YunoHost-Apps/spip_ynh/issues
|
* 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/
|
* 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).
|
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.
|
Pour essayer la branche testing, procédez comme suit.
|
||||||
|
|
|
@ -17,20 +17,8 @@
|
||||||
upgrade=1 from_commit=2016c3a3a972dc74d1ae1ec74ff80987eb753ce9
|
upgrade=1 from_commit=2016c3a3a972dc74d1ae1ec74ff80987eb753ce9
|
||||||
backup_restore=1
|
backup_restore=1
|
||||||
multi_instance=1
|
multi_instance=1
|
||||||
incorrect_path=1
|
|
||||||
port_already_use=0
|
port_already_use=0
|
||||||
change_url=1
|
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
|
;;; Upgrade options
|
||||||
; commit=2016c3a3a972dc74d1ae1ec74ff80987eb753ce9
|
; commit=2016c3a3a972dc74d1ae1ec74ff80987eb753ce9
|
||||||
name=21 Nov 2017
|
name=21 Nov 2017
|
||||||
|
|
|
@ -23,13 +23,13 @@ location __PATH__/ {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Add headers to serve security related headers
|
# Add headers to serve security related headers
|
||||||
more_set_headers Strict-Transport-Security "max-age=15768000;";
|
more_set_headers 'Strict-Transport-Security: max-age=15768000';
|
||||||
more_set_headers X-Content-Type-Options nosniff;
|
more_set_headers 'X-Content-Type-Options: nosniff';
|
||||||
more_set_headers X-Frame-Options "SAMEORIGIN";
|
more_set_headers 'X-Frame-Options: SAMEORIGIN';
|
||||||
more_set_headers "X-XSS-Protection 1; mode=block";
|
more_set_headers 'X-XSS-Protection: 1, mode=block';
|
||||||
more_set_headers X-Robots-Tag none;
|
more_set_headers 'X-Robots-Tag: none';
|
||||||
more_set_headers X-Download-Options noopen;
|
more_set_headers 'X-Download-Options: noopen';
|
||||||
more_set_headers X-Permitted-Cross-Domain-Policies none;
|
more_set_headers 'X-Permitted-Cross-Domain-Policies: none';
|
||||||
|
|
||||||
location ~^/(tmp|config|\.ht)/{
|
location ~^/(tmp|config|\.ht)/{
|
||||||
deny all;
|
deny all;
|
||||||
|
@ -41,7 +41,7 @@ location __PATH__/ {
|
||||||
# cacher.
|
# cacher.
|
||||||
rewrite ^/([^/]*)/favicon\.ico$ __PATH__/spip.php?page=favicon.ico last;
|
rewrite ^/([^/]*)/favicon\.ico$ __PATH__/spip.php?page=favicon.ico last;
|
||||||
expires 1w;
|
expires 1w;
|
||||||
more_set_headers Cache-Control public;
|
more_set_headers 'Cache-Control: public';
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~ [^/]\.php(/|$) {
|
location ~ [^/]\.php(/|$) {
|
||||||
|
|
|
@ -3,10 +3,10 @@
|
||||||
"id": "spip",
|
"id": "spip",
|
||||||
"packaging_format": 1,
|
"packaging_format": 1,
|
||||||
"description": {
|
"description": {
|
||||||
"en": "A CMS with a focus on collaborative edition and multilingualism",
|
"en": "CMS with a focus on collaborative edition and multilingualism",
|
||||||
"fr": "Un CMS conçu pour l'édition collaborative et le multilinguisme"
|
"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/",
|
"url": "http://www.spip.net/",
|
||||||
"license": "GPL-3.0-or-later",
|
"license": "GPL-3.0-or-later",
|
||||||
"maintainer": {
|
"maintainer": {
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
"email": "cyp@rouquin.me"
|
"email": "cyp@rouquin.me"
|
||||||
},
|
},
|
||||||
"requirements": {
|
"requirements": {
|
||||||
"yunohost": ">= 3.2.2"
|
"yunohost": ">= 3.8.1"
|
||||||
},
|
},
|
||||||
"multi_instance": true,
|
"multi_instance": true,
|
||||||
"services": [
|
"services": [
|
||||||
|
@ -64,7 +64,7 @@
|
||||||
"name": "is_public",
|
"name": "is_public",
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"ask": {
|
"ask": {
|
||||||
"en": "Is it a public SPIP site ?",
|
"en": "Is it a public SPIP site?",
|
||||||
"fr": "Est-ce un site public ?"
|
"fr": "Est-ce un site public ?"
|
||||||
},
|
},
|
||||||
"default": true
|
"default": true
|
||||||
|
|
|
@ -242,7 +242,7 @@ ynh_handle_app_migration () {
|
||||||
|
|
||||||
# TODO Handle multi instance apps...
|
# TODO Handle multi instance apps...
|
||||||
# Check that there is not already an app installed for this id.
|
# 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"
|
&& ynh_die "$new_app is already installed"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -36,21 +36,18 @@ app=$YNH_APP_INSTANCE_NAME
|
||||||
#=================================================
|
#=================================================
|
||||||
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
|
# 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
|
final_path=/var/www/$app
|
||||||
test ! -e "$final_path" || ynh_die "This path already contains a folder"
|
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
|
# Register (book) web path
|
||||||
ynh_webpath_register $app $domain $path_url
|
ynh_webpath_register $app $domain $path_url
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STORE SETTINGS FROM MANIFEST
|
# 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 domain $domain
|
||||||
ynh_app_setting_set $app path $path_url
|
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
|
# 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)
|
db_name=$(ynh_sanitize_dbid $app)
|
||||||
ynh_app_setting_set $app db_name $db_name
|
ynh_app_setting_set $app db_name $db_name
|
||||||
|
@ -72,14 +69,14 @@ db_pwd=$(ynh_app_setting_get $app mysqlpwd)
|
||||||
#=================================================
|
#=================================================
|
||||||
# INSTALL DEPENDENCIES
|
# INSTALL DEPENDENCIES
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_print_info --message="Installing dependencies..."
|
ynh_script_progression --message="Installing dependencies..."
|
||||||
|
|
||||||
ynh_install_app_dependencies $pkg_dependencies
|
ynh_install_app_dependencies $pkg_dependencies
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# 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
|
ynh_app_setting_set $app final_path $final_path
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
# Download, check integrity, uncompress and patch the source from app.src
|
||||||
|
@ -88,7 +85,7 @@ ynh_setup_source "$final_path"
|
||||||
#=================================================
|
#=================================================
|
||||||
# NGINX CONFIGURATION
|
# NGINX CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_print_info "Configuring nginx web server..."
|
ynh_script_progression --message="Configuring nginx web server..."
|
||||||
|
|
||||||
# Create a dedicated nginx config
|
# Create a dedicated nginx config
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
|
@ -96,7 +93,7 @@ ynh_add_nginx_config
|
||||||
#=================================================
|
#=================================================
|
||||||
# CREATE DEDICATED USER
|
# CREATE DEDICATED USER
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_print_info "Configuring system user..."
|
ynh_script_progression --message="Configuring system user..."
|
||||||
|
|
||||||
# Create a system user
|
# Create a system user
|
||||||
ynh_system_user_create $app
|
ynh_system_user_create $app
|
||||||
|
@ -104,7 +101,7 @@ ynh_system_user_create $app
|
||||||
#=================================================
|
#=================================================
|
||||||
# PHP-FPM CONFIGURATION
|
# PHP-FPM CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_print_info "Configuring php-fpm..."
|
ynh_script_progression --message="Configuring php-fpm..."
|
||||||
|
|
||||||
# Create a dedicated php-fpm config
|
# Create a dedicated php-fpm config
|
||||||
ynh_add_fpm_config
|
ynh_add_fpm_config
|
||||||
|
@ -181,7 +178,7 @@ ynh_store_file_checksum "$final_path/config/connect.php"
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP SSOWAT
|
# SETUP SSOWAT
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_print_info "Configuring SSOwat..."
|
ynh_script_progression --message="Configuring SSOwat..."
|
||||||
|
|
||||||
# Make app public if necessary
|
# Make app public if necessary
|
||||||
if [ $is_public -eq 1 ]; then
|
if [ $is_public -eq 1 ]; then
|
||||||
|
@ -192,7 +189,7 @@ fi
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD NGINX
|
# RELOAD NGINX
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_print_info "Reloading nginx web server..."
|
ynh_script_progression --message="Reloading nginx web server..."
|
||||||
|
|
||||||
systemctl reload nginx
|
systemctl reload nginx
|
||||||
|
|
||||||
|
@ -200,4 +197,4 @@ systemctl reload nginx
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_print_info "Installation of $app completed"
|
ynh_script_progression --message="Installation of $app completed"
|
||||||
|
|
|
@ -102,13 +102,6 @@ if [ $migration_process -eq 1 ]; then
|
||||||
db_name=$(ynh_app_setting_get $app db_name)
|
db_name=$(ynh_app_setting_get $app db_name)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# CHECK THE PATH
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
# Normalize the URL path syntax
|
|
||||||
path_url=$(ynh_normalize_url_path $path_url)
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD UPGRADE STEPS
|
# STANDARD UPGRADE STEPS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -200,7 +193,6 @@ if [ $is_public -eq 0 ]; then
|
||||||
ynh_app_setting_delete $app skipped_uris
|
ynh_app_setting_delete $app skipped_uris
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# MODIFY A CONFIG FILE
|
# MODIFY A CONFIG FILE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue