1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/cryptpad_ynh.git synced 2024-09-03 18:26:14 +02:00

Merge pull request #62 from YunoHost-Apps/testing

Testing
This commit is contained in:
Éric Gaspar 2021-01-24 20:12:54 +01:00 committed by GitHub
commit 4b43c2fd87
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 57 additions and 60 deletions

View file

@ -11,7 +11,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
## Overview ## Overview
CryptPad is a collaborative encrypted document editor in real time. It is a privacy-friendly alternative to popular office tools and cloud services. All content stored in CryptPad is encrypted before being sent, which means that no one can access your data unless you give them the keys. You can share access to a document simply by sharing the link. CryptPad is a collaborative encrypted document editor in real time. It is a privacy-friendly alternative to popular office tools and cloud services. All content stored in CryptPad is encrypted before being sent, which means that no one can access your data unless you give them the keys. You can share access to a document simply by sharing the link.
**Shipped version:** 3.24.0 **Shipped version:** 4.0.0
## Screenshots ## Screenshots
@ -27,7 +27,7 @@ CryptPad is a collaborative encrypted document editor in real time. It is a priv
## Documentation ## Documentation
* Official documentation: https://cryptpad.fr/what-is-cryptpad.html * Official documentation: https://docs.cryptpad.fr/en/
* YunoHost documentation: If specific documentation is needed, feel free to contribute. * YunoHost documentation: If specific documentation is needed, feel free to contribute.
## YunoHost specific features ## YunoHost specific features

View file

@ -11,7 +11,7 @@ Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/#/install
## Vue d'ensemble ## Vue d'ensemble
CryptPad est un éditeur de documents chiffrés collaboratifs en temps réel. C'est une alternative respectant la vie privée aux outils office et aux services cloud populaires. Tout le contenu stocké dans CryptPad est chiffré avant d'être envoyé, ce qui signifie que personne ne peut accéder à vos données à moins que vous ne leur donniez les clés. Vous pouvez partager l'accès à un document simplement en partageant le lien. CryptPad est un éditeur de documents chiffrés collaboratifs en temps réel. C'est une alternative respectant la vie privée aux outils office et aux services cloud populaires. Tout le contenu stocké dans CryptPad est chiffré avant d'être envoyé, ce qui signifie que personne ne peut accéder à vos données à moins que vous ne leur donniez les clés. Vous pouvez partager l'accès à un document simplement en partageant le lien.
**Version incluse :** 3.24.0 **Version incluse :** 4.0.0
## Captures d'écran ## Captures d'écran
@ -27,7 +27,7 @@ Comment configurer cette application : via le panneau d'administration ainsi que
## Documentation ## Documentation
* Official documentation : https://cryptpad.fr/what-is-cryptpad.html * Official documentation : https://docs.cryptpad.fr/fr/
* YunoHost documentation : If specific documentation is needed, feel free to contribute. * YunoHost documentation : If specific documentation is needed, feel free to contribute.
## Caractéristiques spécifiques YunoHost ## Caractéristiques spécifiques YunoHost

View file

@ -2,7 +2,6 @@
auto_remove=1 auto_remove=1
; Manifest ; Manifest
domain="domain.tld" (DOMAIN) domain="domain.tld" (DOMAIN)
path="/path" (PATH)
admin="john" (USER) admin="john" (USER)
is_public="1" (PUBLIC|public=1|private=0) is_public="1" (PUBLIC|public=1|private=0)
; Checks ; Checks
@ -13,7 +12,7 @@
setup_private=1 setup_private=1
setup_public=1 setup_public=1
upgrade=1 upgrade=1
upgrade=1 from_commit=3f9c3a6003243140e3e44671ef60a5461ed1a831 upgrade=1 from_commit=ddbb3b36b8bcd00e573456bd9ad07b1aa5e41cb1
backup_restore=1 backup_restore=1
multi_instance=0 multi_instance=0
incorrect_path=0 incorrect_path=0
@ -23,7 +22,7 @@
Email= Email=
Notification=none Notification=none
;;; Upgrade options ;;; Upgrade options
; commit=3f9c3a6003243140e3e44671ef60a5461ed1a831 ; commit=ddbb3b36b8bcd00e573456bd9ad07b1aa5e41cb1
name=update to 3.19.0 name=update to 3.24.0
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&port=666& manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&port=666&

View file

@ -1,6 +1,6 @@
SOURCE_URL=https://github.com/xwiki-labs/cryptpad/archive/3.24.0.tar.gz SOURCE_URL=https://github.com/xwiki-labs/cryptpad/archive/4.0.0.tar.gz
SOURCE_SUM=d662fa81a840db617f3892fbec193c413d502c4d83a02f5f05777e64f32c150c SOURCE_SUM=74845b9f0d80104cae69db90656cf95bba2d299cc2892bd58a996c87e3578d88
SOURCE_SUM_PRG=sha256sum SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true SOURCE_IN_SUBDIR=true
SOURCE_FILENAME=cryptpad-3.24.0.tar.gz SOURCE_FILENAME=cryptpad-4.0.0.tar.gz

View file

@ -42,7 +42,7 @@ module.exports = {
* *
* In a production instance this should be available ONLY over HTTPS * In a production instance this should be available ONLY over HTTPS
* using the default port for HTTPS (443) ie. https://cryptpad.fr * using the default port for HTTPS (443) ie. https://cryptpad.fr
* In such a case this should be handled by NGINX, as documented in * In such a case this should be also handled by NGINX, as documented in
* cryptpad/docs/example.nginx.conf (see the $main_domain variable) * cryptpad/docs/example.nginx.conf (see the $main_domain variable)
* *
*/ */
@ -104,13 +104,13 @@ module.exports = {
/* /*
* CryptPad contains an administration panel. Its access is restricted to specific * CryptPad contains an administration panel. Its access is restricted to specific
* users using the following list. * users using the following list.
* To give access to the admin panel to a user account, just add their user id, * To give access to the admin panel to a user account, just add their public signing
* which can be found on the settings page for registered users. * key, which can be found on the settings page for registered users.
* Entries should be strings separated by a comma. * Entries should be strings separated by a comma.
*/ */
/* /*
adminKeys: [ adminKeys: [
//"https://my.awesome.website/user/#/1/cryptpad-user1/YZgXQxKR0Rcb6r6CmxHPdAGLVludrAF2lEnkbx1vVOo=", //"[cryptpad-user1@my.awesome.website/YZgXQxKR0Rcb6r6CmxHPdAGLVludrAF2lEnkbx1vVOo=]",
], ],
*/ */
@ -142,7 +142,7 @@ module.exports = {
/* CryptPad will display a point of contact for your instance on its contact page /* CryptPad will display a point of contact for your instance on its contact page
* (/contact.html) if you provide it below. * (/contact.html) if you provide it below.
*/ */
adminEmail: "__ADMIN_MAIL__", adminEmail: '__ADMIN_MAIL__',
/* /*
* By default, CryptPad contacts one of our servers once a day. * By default, CryptPad contacts one of our servers once a day.
@ -192,6 +192,25 @@ module.exports = {
*/ */
//archiveRetentionTime: 15, //archiveRetentionTime: 15,
/* It's possible to configure your instance to remove data
* stored on behalf of inactive accounts. Set 'accountRetentionTime'
* to the number of days an account can remain idle before its
* documents and other account data is removed.
*
* Leave this value commented out to preserve all data stored
* by user accounts regardless of inactivity.
*/
//accountRetentionTime: 365,
/* Starting with CryptPad 3.23.0, the server automatically runs
* the script responsible for removing inactive data according to
* your configured definition of inactivity. Set this value to `true`
* if you prefer not to remove inactive data, or if you prefer to
* do so manually using `scripts/evict-inactive.js`.
*/
//disableIntegratedEviction: true,
/* Max Upload Size (bytes) /* Max Upload Size (bytes)
* this sets the maximum size of any one file uploaded to the server. * this sets the maximum size of any one file uploaded to the server.
* anything larger than this size will be rejected * anything larger than this size will be rejected
@ -209,12 +228,12 @@ module.exports = {
*/ */
/* /*
customLimits: { customLimits: {
"https://my.awesome.website/user/#/1/cryptpad-user1/YZgXQxKR0Rcb6r6CmxHPdAGLVludrAF2lEnkbx1vVOo=": { "[cryptpad-user1@my.awesome.website/YZgXQxKR0Rcb6r6CmxHPdAGLVludrAF2lEnkbx1vVOo=]": {
limit: 20 * 1024 * 1024 * 1024, limit: 20 * 1024 * 1024 * 1024,
plan: 'insider', plan: 'insider',
note: 'storage space donated by my.awesome.website' note: 'storage space donated by my.awesome.website'
}, },
"https://my.awesome.website/user/#/1/cryptpad-user2/GdflkgdlkjeworijfkldfsdflkjeEAsdlEnkbx1vVOo=": { "[cryptpad-user2@my.awesome.website/GdflkgdlkjeworijfkldfsdflkjeEAsdlEnkbx1vVOo=]": {
limit: 10 * 1024 * 1024 * 1024, limit: 10 * 1024 * 1024 * 1024,
plan: 'insider', plan: 'insider',
note: 'storage space donated by my.awesome.website' note: 'storage space donated by my.awesome.website'

View file

@ -6,7 +6,7 @@
"en": "Zero Knowledge realtime collaborative editor", "en": "Zero Knowledge realtime collaborative editor",
"fr": "Éditeur chiffré collaboratif en temps réel." "fr": "Éditeur chiffré collaboratif en temps réel."
}, },
"version": "3.24.0~ynh2", "version": "4.0.0~ynh1",
"url": "https://cryptpad.fr/", "url": "https://cryptpad.fr/",
"license": "AGPL-3.0-only", "license": "AGPL-3.0-only",
"maintainer": { "maintainer": {
@ -32,7 +32,7 @@
}, },
"example": "cryptpad.example.com" "example": "cryptpad.example.com"
}, },
{ {
"name": "admin", "name": "admin",
"type": "user", "type": "user",
"ask": { "ask": {

View file

@ -10,9 +10,3 @@
- [ ] Fix or enhancement tested. - [ ] Fix or enhancement tested.
- [ ] Upgrade from last version tested. - [ ] Upgrade from last version tested.
- [ ] Can be reviewed and tested. - [ ] Can be reviewed and tested.
## 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*
[![Build Status](https://ci-apps-dev.yunohost.org/jenkins/job/cryptpad_ynh%20PR-NUM-%20(USERNAME)/badge/icon)](https://ci-apps-dev.yunohost.org/jenkins/job/cryptpad_ynh%20PR-NUM-%20(USERNAME)/)

View file

@ -4,7 +4,7 @@
# COMMON VARIABLES # COMMON VARIABLES
#================================================= #=================================================
nodejs_version="12" nodejs_version="14"
#================================================= #=================================================
# PERSONAL HELPERS # PERSONAL HELPERS
@ -17,4 +17,3 @@ nodejs_version="12"
#================================================= #=================================================
# FUTURE OFFICIAL HELPERS # FUTURE OFFICIAL HELPERS
#================================================= #=================================================

View file

@ -74,7 +74,7 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app
#================================================= #=================================================
# MODIFY URL IN NGINX CONF # MODIFY URL IN NGINX CONF
#================================================= #=================================================
ynh_script_progression --message="Updating NGINX web server configuration..." --time --weight=1 ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1
nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf

View file

@ -50,7 +50,7 @@ ynh_app_setting_set --app=$app --key=is_public --value=$is_public
ynh_app_setting_set --app=$app --key=path_url --value=$path_url ynh_app_setting_set --app=$app --key=path_url --value=$path_url
ynh_app_setting_set --app=$app --key=admin --value=$admin ynh_app_setting_set --app=$app --key=admin --value=$admin
admin_mail=$(ynh_user_get_info "$admin" "mail") email=$(ynh_user_get_info --username=$admin --key=mail)
#================================================= #=================================================
# STANDARD MODIFICATIONS # STANDARD MODIFICATIONS
@ -122,9 +122,9 @@ ynh_add_systemd_config
# Copy default configuration file # Copy default configuration file
mv "../conf/config.js" "$final_path/config/config.js" mv "../conf/config.js" "$final_path/config/config.js"
ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$final_path/config/config.js" ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$final_path/config/config.js"
ynh_replace_string --match_string="__PORTI__" --replace_string="$porti" --target_file="$final_path/config/config.js" ynh_replace_string --match_string="__PORTI__" --replace_string="$porti" --target_file="$final_path/config/config.js"
ynh_replace_string --match_string="__ADMIN_MAIL__" --replace_string="$admin_mail" --target_file="$final_path/config/config.js" ynh_replace_string --match_string="__ADMIN_MAIL__" --replace_string="$email" --target_file="$final_path/config/config.js"
# Store file checksum to detected user modifications on upgrade # Store file checksum to detected user modifications on upgrade
ynh_store_file_checksum "$final_path/config/config.js" ynh_store_file_checksum "$final_path/config/config.js"
@ -146,7 +146,7 @@ popd || ynh_die
#================================================= #=================================================
ynh_script_progression --message="Securing files and directories..." --weight=1 ynh_script_progression --message="Securing files and directories..." --weight=1
chown -R $app:$app $final_path chown -R $app: $final_path
#================================================= #=================================================
# INTEGRATE SERVICE IN YUNOHOST # INTEGRATE SERVICE IN YUNOHOST
@ -172,7 +172,7 @@ ynh_script_progression --message="Configuring SSOwat..." --weight=1
if [ $is_public -eq 1 ] if [ $is_public -eq 1 ]
then then
# unprotected_uris allows SSO credentials to be passed anyway. # unprotected_uris allows SSO credentials to be passed anyway.
ynh_permission_update --permission "main" --add visitors ynh_permission_update --permission="main" --add="visitors"
fi fi
#================================================= #=================================================

View file

@ -70,7 +70,7 @@ ynh_system_user_create --username=$app
#================================================= #=================================================
# Restore permissions on app files # Restore permissions on app files
chown -R $app:$app $final_path chown -R $app: $final_path
#================================================= #=================================================
# REINSTALL DEPENDENCIES # REINSTALL DEPENDENCIES

View file

@ -9,29 +9,19 @@
source _common.sh source _common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
#=================================================
# LOAD SETTINGS
#=================================================
# Set app specific variables
app=$YNH_APP_INSTANCE_NAME
# Check destination directory
DESTDIR="/var/www/$app"
[[ ! -d $DESTDIR ]] && ynh_die \
"The destination directory '$DESTDIR' does not exist.\
The app is not correctly installed, you should remove it first."
#================================================= #=================================================
# LOAD SETTINGS # LOAD SETTINGS
#================================================= #=================================================
ynh_script_progression --message="Loading installation settings..." --weight=1 ynh_script_progression --message="Loading installation settings..." --weight=1
app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get --app=$app --key=domain) domain=$(ynh_app_setting_get --app=$app --key=domain)
path_url=$(ynh_app_setting_get --app=$app --key=path_url) path_url=$(ynh_app_setting_get --app=$app --key=path_url)
final_path=$(ynh_app_setting_get --app=$app --key=final_path) final_path=$(ynh_app_setting_get --app=$app --key=final_path)
is_public=$(ynh_app_setting_get --app=$app --key=is_public) is_public=$(ynh_app_setting_get --app=$app --key=is_public)
admin=$(ynh_app_setting_get --app=$app --key=admin) admin=$(ynh_app_setting_get --app=$app --key=admin)
admin_mail=$(ynh_user_get_info "$admin" "mail") email=$(ynh_user_get_info --username=$admin --key=mail)
port=$(ynh_app_setting_get --app=$app --key=port) port=$(ynh_app_setting_get --app=$app --key=port)
porti=$(ynh_app_setting_get --app=$app --key=porti) porti=$(ynh_app_setting_get --app=$app --key=porti)
@ -82,7 +72,7 @@ ynh_abort_if_errors
#================================================= #=================================================
ynh_script_progression --message="Stopping a systemd service..." --weight=1 ynh_script_progression --message="Stopping a systemd service..." --weight=1
ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log" ynh_systemd_action --service_name=$app --action=stop --log_path="/var/log/$app/$app.log"
#================================================= #=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE # DOWNLOAD, CHECK AND UNPACK SOURCE
@ -132,24 +122,20 @@ ynh_backup_if_checksum_is_different "$final_path/config/config.js"
# Copy default configuration file # Copy default configuration file
mv "../conf/config.js" "$final_path/config/config.js" mv "../conf/config.js" "$final_path/config/config.js"
ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$final_path/config/config.js" ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$final_path/config/config.js"
ynh_replace_string --match_string="__PORTI__" --replace_string="$porti" --target_file="$final_path/config/config.js" ynh_replace_string --match_string="__PORTI__" --replace_string="$porti" --target_file="$final_path/config/config.js"
ynh_replace_string --match_string="__ADMIN_MAIL__" --replace_string="$admin_mail" --target_file="$final_path/config/config.js" ynh_replace_string --match_string="__ADMIN_MAIL__" --replace_string="$email" --target_file="$final_path/config/config.js"
# Store file checksum to detected user modifications on upgrade # Store file checksum to detected user modifications on upgrade
ynh_store_file_checksum "$final_path/config/config.js" ynh_store_file_checksum "$final_path/config/config.js"
#================================================= #=================================================
# INSTALL CRYPTPAD # INSTALL CRYPTPAD
#================================================= #=================================================
ynh_script_progression --message="Building CryptPad... (this will take some time and resources!)" --weight=60 ynh_script_progression --message="Building CryptPad... (this will take some time and resources!)" --weight=60
pushd "$final_path" || ynh_die pushd "$final_path" || ynh_die
ynh_use_nodejs bower update --allow-root
ynh_exec_warn_less yarn install --allow-root
yarn global add bower
bower install --allow-root
popd || ynh_die popd || ynh_die
#================================================= #=================================================
@ -171,7 +157,7 @@ ynh_add_systemd_config
ynh_script_progression --message="Upgrading systemd configuration..." --weight=1 ynh_script_progression --message="Upgrading systemd configuration..." --weight=1
# Set permissions on app files # Set permissions on app files
chown -R $app:$app $final_path chown -R $app: $final_path
#================================================= #=================================================
# INTEGRATE SERVICE IN YUNOHOST # INTEGRATE SERVICE IN YUNOHOST
@ -185,7 +171,7 @@ yunohost service add $app --description="Zero Knowledge realtime collaborative e
#================================================= #=================================================
ynh_script_progression --message="Starting a systemd service..." --weight=1 ynh_script_progression --message="Starting a systemd service..." --weight=1
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="server available" ynh_systemd_action --service_name=$app --action=start --log_path="systemd" --line_match="server available"
#================================================= #=================================================
# RELOAD NGINX # RELOAD NGINX