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

Merge pull request #12 from YunoHost-Apps/testing

upgrade to 1.8.14
This commit is contained in:
Éric Gaspar 2021-07-18 18:16:36 +02:00 committed by GitHub
commit 7da3be206f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 179 additions and 143 deletions

View file

@ -1,28 +1,31 @@
# Etherpad-Lite for YunoHost
<!--
N.B.: This README was automatically generated by https://github.com/YunoHost/apps/tree/master/tools/README-generator
It shall NOT be edited by hand.
-->
# Etherpad for YunoHost
[![Integration level](https://dash.yunohost.org/integration/etherpad.svg)](https://dash.yunohost.org/appci/app/etherpad) ![](https://ci-apps.yunohost.org/ci/badges/etherpad.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/etherpad.maintain.svg)
[![Install Etherpad-Lite with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=etherpad)
[![Install Etherpad with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=etherpad)
*[Lire ce readme en français.](./README_fr.md)*
> *This package allow you to install Etherpad-Lite 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.*
> :warning: This package installs Etherpad-Lite (without MyPads and plugins). It uses PostgreSQL as database.
>If you want to install Etherpad with the MyPads plugin, use the [Etherpad MyPads package](https://github.com/YunoHost-Apps/etherpad_mypads_ynh).
> *This package allows you to install Etherpad quickly and simply on a YunoHost server.
If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.*
## Overview
Etherpad allows you to edit documents collaboratively in real-time, much like a live multi-player editor that runs in your browser. Write articles, press releases, to-do lists, etc. together with your friends, fellow students or colleagues, all working on the same document at the same time.
**Shipped version:** 1.8.13
Online editor providing collaborative editing in real-time
**Shipped version:** 1.8.14~ynh1
**Demo:** https://video.etherpad.com/
## Screenshots
![](https://etherpad.org/img/etherpad_demo.gif)
![](./doc/screenshots/etherpad.gif)
## Demo
* [Official demo](https://video.etherpad.com/)
## Disclaimers / important information
## Configuration
@ -30,39 +33,18 @@ You can access Etherpad's admin panel at `domain.tld/admin`. The configuration f
*Skin Builder* (accessible at this address `domain.tld/pad/p/test#skinvariantsbuilder`) allows you to customize the skin of your pad. It will give you a parameter to copy into your configuration file `/var/www/etherpad/settings.json`.
## Documentation
## Documentation and resources
* Official documentation: http://etherpad.org/doc/v1.8.13
* YunoHost documentation: https://yunohost.org/en/app_etherpad
* Official app website: https://etherpad.org/
* Official user documentation: https://yunohost.org/en/app_etherpad
* Official admin documentation: http://etherpad.org/doc/v1.8.14
* Upstream app code repository: https://github.com/ether/etherpad-lite
* YunoHost documentation for this app: https://yunohost.org/app_etherpad
* Report a bug: https://github.com/YunoHost-Apps/etherpad_ynh/issues
## YunoHost specific features
## Developer info
#### Multi-users support
* Is LDAP auth supported? **No**
* Can the app be used by multiple users? **Yes**
#### Supported architectures
* x86-64 - [![](https://ci-apps.yunohost.org/ci/logs/etherpad.svg)](https://ci-apps.yunohost.org/ci/apps/etherpad/)
* ARMv8-A - [![](https://ci-apps-arm.yunohost.org/ci/logs/etherpad.svg)](https://ci-apps-arm.yunohost.org/ci/apps/etherpad/)
## Limitations
## Additionnal informations
## Links
* Report a bug: https://github.com/YunoHost-Apps/etherpad_ynh/issues
* Etherpad website: http://etherpad.org/
* Upstream app repository: https://github.com/ether/etherpad-lite
* YunoHost website: https://yunohost.org/
---
## Developers infos
Please do your pull request to the [testing branch](https://github.com/YunoHost-Apps/etherpad_ynh/tree/testing).
Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/etherpad_ynh/tree/testing).
To try the testing branch, please proceed like that.
```
@ -70,3 +52,5 @@ sudo yunohost app install https://github.com/YunoHost-Apps/etherpad_ynh/tree/tes
or
sudo yunohost app upgrade etherpad -u https://github.com/YunoHost-Apps/etherpad_ynh/tree/testing --debug
```
**More info regarding app packaging:** https://yunohost.org/packaging_apps

View file

@ -1,28 +1,27 @@
# Etherpad-Lite pour YunoHost
# Etherpad pour YunoHost
[![Niveau d'intégration](https://dash.yunohost.org/integration/etherpad.svg)](https://dash.yunohost.org/appci/app/etherpad) ![](https://ci-apps.yunohost.org/ci/badges/etherpad.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/etherpad.maintain.svg)
[![Installer Etherpad-Lite avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=etherpad)
[![Installer Etherpad avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=etherpad)
*[Read this readme in english.](./README.md)*
*[Lire ce readme en français.](./README_fr.md)*
> *Ce package vous permet d'installer Etherpad-Lite rapidement et simplement sur un serveur YunoHost.
Si vous n'avez pas YunoHost, merci de regarder [ici](https://yunohost.org/install_fr) pour savoir comment l'installer et en profiter.*
> *Ce package vous permet d'installer Etherpad 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.*
> :warning: Ce paquet installe Etherpad-Lite (sans MyPads et divers plugins). Il utilise PostgreSQL comme base de données.
> Si vous souhaitez installer Etherpad avec MyPads, utilisez le paquet [Etherpad MyPads](https://github.com/YunoHost-Apps/etherpad_mypads_ynh).
## Vue d'ensemble
## Résumé
Etherpad vous permet d'éditer des documents de manière collaborative en temps réel, un peu comme un éditeur multi-joueurs en direct qui s'exécute dans votre navigateur. Rédigez des articles, des communiqués de presse, des listes de choses à faire, etc. avec vos amis, camarades ou collègues, tous travaillant sur le même document en même temps.
Éditeur en ligne fournissant l'édition collaborative en temps réel
**Version embarquée :** 1.8.13
**Version incluse :** 1.8.14~ynh1
**Démo :** https://video.etherpad.com/
## Captures d'écran
![](https://etherpad.org/img/etherpad_demo.gif)
![](./doc/screenshots/etherpad.gif)
## Démo
* [Démo officielle](https://video.etherpad.com/)
## Avertissements / informations importantes
## Configuration
@ -30,43 +29,24 @@ Vous pouvez accéder au panneau d'administration d'Etherpad à l'adresse `domain
*Skin Builder* (accessible à l'adresse `domain.tld/pad/p/test#skinvariantsbuilder`) vous permet de personnaliser l'apparence de votre pad. Il vous donnera un paramètre à copier dans votre fichier de configuration `/var/www/etherpad/settings.json`.
## Documentation
## Documentations et ressources
* Documentation officielle : http://etherpad.org/doc/v1.8.13
* Documentation YunoHost : https://yunohost.org/fr/app_etherpad
* Site officiel de l'app : https://etherpad.org/
* Documentation officielle utilisateur : https://yunohost.org/en/app_etherpad
* Documentation officielle de l'admin : http://etherpad.org/doc/v1.8.14
* Dépôt de code officiel de l'app : https://github.com/ether/etherpad-lite
* Documentation YunoHost pour cette app : https://yunohost.org/app_etherpad
* Signaler un bug : https://github.com/YunoHost-Apps/etherpad_ynh/issues
## Fonctionnalités spécifiques à YunoHost
#### Support multi-utilisateurs
* L'authentification LDAP est-elle prise en charge ? **Non**
* L'application peut-elle être utilisée par plusieurs utilisateurs ? **Oui**
#### Architectures supportées
* x86-64 - [![](https://ci-apps.yunohost.org/ci/logs/etherpad.svg)](https://ci-apps.yunohost.org/ci/apps/etherpad/)
* ARMv8-A - [![](https://ci-apps-arm.yunohost.org/ci/logs/etherpad.svg)](https://ci-apps-arm.yunohost.org/ci/apps/etherpad/)
## Limitations
## Informations additionnelles
## Liens
* Reporter un bug : https://github.com/YunoHost-Apps/etherpad_ynh/issues
* Site d'Etherpad : http://etherpad.org/
* Dépôt GitHub de l'application : https://github.com/ether/etherpad-lite
* Site de YunoHost : https://yunohost.org/
---
## Informations à l'intention des développeurs
## Informations pour les développeurs
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/etherpad_ynh/tree/testing).
Pour tester la branche testing, merci de procéder ainsi.
Pour essayer la branche testing, procédez comme suit.
```
sudo yunohost app install https://github.com/YunoHost-Apps/etherpad_ynh/tree/testing --debug
ou
sudo yunohost app upgrade etherpad -u https://github.com/YunoHost-Apps/etherpad_ynh/tree/testing --debug
```
**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps

View file

@ -1,6 +1,3 @@
# See here for more information
# https://github.com/YunoHost/package_check#syntax-check_process-file
;; Test complet
; Manifest
domain="domain.tld"
@ -8,8 +5,8 @@
admin="john"
language="fr"
is_public=1
password="pass"
port="9001"
password="password"
export="libreoffice"
; Checks
pkg_linter=1
setup_sub_dir=1

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://github.com/ether/etherpad-lite/archive/1.8.13.tar.gz
SOURCE_SUM=c83052daf3b0af8aa3c19a8308e21fcbcfecca99aeb3e8047383875f855443f1
SOURCE_URL=https://github.com/ether/etherpad-lite/archive/1.8.14.tar.gz
SOURCE_SUM=5404035675fb5ee9349d42927895bb3933590823612ebe31ca4cc523afdac49e
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true

View file

@ -71,10 +71,12 @@
"title": "Etherpad",
/*
* favicon default name
* alternatively, set up a fully specified Url to your own favicon
* Pathname of the favicon you want to use. If null, the skin's favicon is
* used if one is provided by the skin, otherwise the default Etherpad favicon
* is used. If this is a relative path it is interpreted as relative to the
* Etherpad root directory.
*/
"favicon": "favicon.ico",
"favicon": null,
/*
* Skin name.
@ -246,7 +248,7 @@
* Not setting this may cause problems during deployment.
* Set to 0 to disable caching.
*/
"maxAge": 99999999, // 60 * 60 * 6 = 6 hours
"maxAge": 21600, // 60 * 60 * 6 = 6 hours
/*
* Absolute path to the Abiword executable.
@ -437,6 +439,11 @@
*/
"loadTest": false,
/**
* Disable dump of objects preventing a clean exit
*/
"dumpOnUncleanExit": false,
/*
* Disable indentation on new line when previous line ends with some special
* chars (':', '[', '(', '{')
@ -535,7 +542,9 @@
*/
"logconfig" :
{ "appenders": [
{ "type": "console"}
{ "type": "console"
//, "category": "access"// only logs pad access
}
/*
, { "type": "file"

5
doc/DISCLAIMER.md Normal file
View file

@ -0,0 +1,5 @@
## Configuration
You can access Etherpad's admin panel at `domain.tld/admin`. The configuration file for Etherpad is at the path `/var/www/etherpad/settings.json`.
*Skin Builder* (accessible at this address `domain.tld/pad/p/test#skinvariantsbuilder`) allows you to customize the skin of your pad. It will give you a parameter to copy into your configuration file `/var/www/etherpad/settings.json`.

5
doc/DISCLAIMER_fr.md Normal file
View file

@ -0,0 +1,5 @@
## Configuration
Vous pouvez accéder au panneau d'administration d'Etherpad à l'adresse `domain.tld/admin`. Le fichier de configuration d'Etherpad est `/var/www/etherpad/settings.json`.
*Skin Builder* (accessible à l'adresse `domain.tld/pad/p/test#skinvariantsbuilder`) vous permet de personnaliser l'apparence de votre pad. Il vous donnera un paramètre à copier dans votre fichier de configuration `/var/www/etherpad/settings.json`.

Binary file not shown.

After

Width:  |  Height:  |  Size: 874 KiB

View file

@ -3,11 +3,19 @@
"id": "etherpad",
"packaging_format": 1,
"description": {
"en": "Online editor providing collaborative editing in real-time.",
"fr": "Éditeur en ligne fournissant l'édition collaborative en temps réel."
"en": "Online editor providing collaborative editing in real-time",
"fr": "Éditeur en ligne fournissant l'édition collaborative en temps réel"
},
"version": "1.8.13~ynh1",
"version": "1.8.14~ynh1",
"url": "https://etherpad.org/",
"upstream": {
"license": "Apache-2.0",
"website": "https://etherpad.org/",
"demo": "https://video.etherpad.com/",
"admindoc": "http://etherpad.org/doc/v1.8.14",
"userdoc": "https://yunohost.org/en/app_etherpad",
"code": "https://github.com/ether/etherpad-lite"
},
"license": "Apache-2.0",
"maintainer": {
"name": "eric_G"
@ -41,6 +49,16 @@
},
"default": true
},
{
"name": "export",
"type": "string",
"ask": {
"en": "Use AbiWord (~260 Mo) or LibreOffice (~400 Mo) (more stable) to expand export possibilities (PDF, doc)?",
"fr": "Utiliser AbiWord (~260 Mo) ou LibreOffice (~400 Mo) (plus stable) pour étendre les possibilités d'export (PDF, doc) ?"
},
"choices" : ["none", "abiword", "libreoffice"],
"default" : "none"
},
{
"name": "language",
"type": "string",

View file

@ -7,7 +7,13 @@
# dependencies used by the app
pkg_dependencies="postgresql postgresql-contrib"
nodejs_version=15
nodejs_version=14
# Dependencies for AbiWord
abiword_app_depencencies="abiword"
# Dependencies for LibreOffice
libreoffice_app_dependencies="unoconv libreoffice-writer"
#=================================================
# PERSONAL HELPERS

View file

@ -29,6 +29,7 @@ admin=$YNH_APP_ARG_ADMIN
is_public=$YNH_APP_ARG_IS_PUBLIC
language=$YNH_APP_ARG_LANGUAGE
password=$YNH_APP_ARG_PASSWORD
export=$YNH_APP_ARG_EXPORT
app=$YNH_APP_INSTANCE_NAME
@ -53,6 +54,7 @@ ynh_app_setting_set --app=$app --key=path --value=$path_url
ynh_app_setting_set --app=$app --key=admin --value=$admin
ynh_app_setting_set --app=$app --key=language --value=$language
ynh_app_setting_set --app=$app --key=password --value=$password
ynh_app_setting_set --app=$app --key=export --value=$export
#=================================================
# STANDARD MODIFICATIONS
@ -74,6 +76,12 @@ ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
ynh_install_nodejs --nodejs_version=$nodejs_version
if [ "$export" = "abiword" ]; then
ynh_install_app_dependencies $abiword_app_depencencies
elif [ "$export" = "libreoffice" ]; then
ynh_install_app_dependencies $libreoffice_app_dependencies
fi
#=================================================
# CREATE DEDICATED USER
#=================================================
@ -88,6 +96,7 @@ ynh_system_user_create --username=$app --home_dir=$final_path
ynh_script_progression --message="Creating a PostgreSQL database..." --weight=5
db_name=$(ynh_sanitize_dbid --db_name=$app)
db_user=$db_name
ynh_app_setting_set --app=$app --key=db_name --value=$db_name
ynh_psql_test_if_first_run
ynh_psql_setup_db --db_user=$db_name --db_name=$db_name
@ -101,6 +110,11 @@ 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
# Set permissions to app files
chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
#=================================================
# NGINX CONFIGURATION
#=================================================
@ -112,9 +126,9 @@ ynh_add_nginx_config
#=================================================
# INSTALL ETHERPAD
#=================================================
ynh_script_progression --message="Installing Etherpad..." --weight=2
ynh_script_progression --message="Installing Etherpad..." --weight=60
chown -R $app: $final_path
chown -R $app $final_path
pushd $final_path || ynh_die
ynh_use_nodejs
@ -124,21 +138,30 @@ popd || ynh_die
#=================================================
# MODIFY A CONFIG FILE
#=================================================
ynh_script_progression --message="Configuring Etherpad..." --weight=60
ynh_script_progression --message="Configuring Etherpad..." --weight=6
cp ../conf/settings.json $final_path/settings.json
ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$final_path/settings.json"
ynh_replace_string --match_string="__LANGUAGE__" --replace_string="$language" --target_file="$final_path/settings.json"
if [ "$export" = "abiword" ]
then
# Get AbiWord binary path
abiword_path=`which abiword`
# Set the path of AbiWord into Etherpad config
ynh_replace_string --match_string="\"abiword\" : null" --replace_string="\"abiword\" : \"$abiword_path\"" --target_file="$final_path/settings.json"
elif [ "$export" = "libreoffice" ]
then
# Get soffice binary path
soffice_path=`which soffice`
# Set the path of soffice into Etherpad config
ynh_replace_string --match_string="\"soffice\" : null" --replace_string="\"soffice\" : \"$soffice_path\"" --target_file="$final_path/settings.json"
fi
ynh_store_file_checksum --file="$final_path/settings.json"
ynh_add_config --template="../conf/settings.json" --destination="$final_path/settings.json"
ynh_add_config --template="../conf/credentials.json" --destination="$final_path/credentials.json"
#=================================================
# GENERIC FINALIZATION
#=================================================
# SECURE FILES AND DIRECTORIES
#=================================================
# Set permissions to app files
chown -R $app: $final_path
chmod o-rwx $final_path
chmod 600 $final_path/credentials.json
chmod 400 $final_path/credentials.json
#=================================================
# SETUP SYSTEMD

View file

@ -18,9 +18,10 @@ app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get --app=$app --key=domain)
port=$(ynh_app_setting_get --app=$app --key=port)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
db_user=$db_name
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
export=$(ynh_app_setting_get --app=$app --key=export)
#=================================================
# STANDARD REMOVE
@ -43,6 +44,24 @@ ynh_script_progression --message="Stopping and removing the systemd service..."
# Remove the dedicated systemd config
ynh_remove_systemd_config
#=================================================
# REMOVE DEPENDENCIES
#=================================================
if [ "$export" != "none" ]
then
ynh_script_progression --message="Removing dependencies..." --weight=20
# Remove metapackage and its dependencies
ynh_exec_warn_less ynh_remove_app_dependencies
fi
#=================================================
# REMOVE NODEJS
#=================================================
ynh_script_progression --message="Removing NodeJS version for Etherpad..." --weight=3
ynh_remove_nodejs
#=================================================
# REMOVE THE POSTQRESQL DATABASE
#=================================================

View file

@ -57,7 +57,7 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_script_progression --message="Recreating the dedicated system user..." --weight=1
# Create the dedicated user (if not existing)
ynh_system_user_create --username=$app --home_dir="$final_path"
ynh_system_user_create --username=$app --home_dir=$final_path
#=================================================
# RESTORE THE APP MAIN DIR
@ -66,6 +66,12 @@ ynh_script_progression --message="Restoring the app main directory..." --weight=
ynh_restore_file --origin_path="$final_path"
# Restore permissions on app files
chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
chmod 400 $final_path/credentials.json
#=================================================
# REINSTALL DEPENDENCIES
#=================================================
@ -86,15 +92,6 @@ ynh_psql_test_if_first_run
ynh_psql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd
ynh_psql_execute_file_as_root --file="./db.sql" --database=$db_name
#=================================================
# RESTORE USER RIGHTS
#=================================================
# Restore permissions on app files
chown -R $app: $final_path
chmod o-rwx $final_path
chmod 600 $final_path/credentials.json
#=================================================
# INTEGRATE SERVICE IN YUNOHOST
#=================================================

View file

@ -104,6 +104,11 @@ then
ynh_setup_source --dest_dir="$final_path"
fi
# Set permissions on app files
chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
#=================================================
# NGINX CONFIGURATION
#=================================================
@ -128,31 +133,19 @@ ynh_script_progression --message="Reconfiguring Etherpad..." --weight=6
ynh_add_config --template="../conf/settings.json" --destination="$final_path/settings.json"
ynh_add_config --template="../conf/credentials.json" --destination="$final_path/credentials.json"
chmod 400 "$final_path/credentials.json"
#=================================================
# INSTALL ETHERPAD
#=================================================
ynh_script_progression --message="Installing Etherpad..." --weight=90
chown -R $app: $final_path
pushd $final_path || ynh_die
pushd $final_path
ynh_use_nodejs
ynh_exec_as $app env $ynh_node_load_PATH src/bin/installDeps.sh
ynh_exec_as $app env "$ynh_node_load_PATH" src/bin/installDeps.sh
ynh_exec_warn_less ynh_exec_as $app env "$ynh_node_load_PATH" npm cache clean --force
ynh_exec_warn_less ynh_exec_as $app env "$ynh_node_load_PATH" npm install --upgrade
popd || ynh_die
#=================================================
# GENERIC FINALIZATION
#=================================================
# SECURE FILES AND DIRECTORIES
#=================================================
# Set permissions on app files
chown -R $app: $final_path
chmod o-rwx $final_path
chmod 600 $final_path/credentials.json
popd
#=================================================
# SETUP SYSTEMD