diff --git a/README.md b/README.md index d137fb6..a10a49a 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in ## 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. -**Shipped version:** 3.24.0 +**Shipped version:** 4.0.0 ## Screenshots @@ -27,7 +27,7 @@ CryptPad is a collaborative encrypted document editor in real time. It is a priv ## 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 specific features diff --git a/README_fr.md b/README_fr.md index 68928c0..37c7f9e 100644 --- a/README_fr.md +++ b/README_fr.md @@ -11,7 +11,7 @@ Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/#/install ## 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. -**Version incluse :** 3.24.0 +**Version incluse :** 4.0.0 ## Captures d'écran @@ -27,7 +27,7 @@ Comment configurer cette application : via le panneau d'administration ainsi que ## 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. ## Caractéristiques spécifiques YunoHost diff --git a/check_process b/check_process index 91d59fd..26c6100 100644 --- a/check_process +++ b/check_process @@ -2,7 +2,6 @@ auto_remove=1 ; Manifest domain="domain.tld" (DOMAIN) - path="/path" (PATH) admin="john" (USER) is_public="1" (PUBLIC|public=1|private=0) ; Checks @@ -13,7 +12,7 @@ setup_private=1 setup_public=1 upgrade=1 - upgrade=1 from_commit=3f9c3a6003243140e3e44671ef60a5461ed1a831 + upgrade=1 from_commit=ddbb3b36b8bcd00e573456bd9ad07b1aa5e41cb1 backup_restore=1 multi_instance=0 incorrect_path=0 @@ -23,7 +22,7 @@ Email= Notification=none ;;; Upgrade options - ; commit=3f9c3a6003243140e3e44671ef60a5461ed1a831 - name=update to 3.19.0 + ; commit=ddbb3b36b8bcd00e573456bd9ad07b1aa5e41cb1 + name=update to 3.24.0 manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&port=666& \ No newline at end of file diff --git a/conf/app.src b/conf/app.src index e150c5f..023e1e5 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,6 +1,6 @@ -SOURCE_URL=https://github.com/xwiki-labs/cryptpad/archive/3.24.0.tar.gz -SOURCE_SUM=d662fa81a840db617f3892fbec193c413d502c4d83a02f5f05777e64f32c150c +SOURCE_URL=https://github.com/xwiki-labs/cryptpad/archive/4.0.0.tar.gz +SOURCE_SUM=74845b9f0d80104cae69db90656cf95bba2d299cc2892bd58a996c87e3578d88 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true -SOURCE_FILENAME=cryptpad-3.24.0.tar.gz +SOURCE_FILENAME=cryptpad-4.0.0.tar.gz diff --git a/conf/config.js b/conf/config.js index 9d47a88..c46d9ca 100644 --- a/conf/config.js +++ b/conf/config.js @@ -42,7 +42,7 @@ module.exports = { * * In a production instance this should be available ONLY over HTTPS * 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) * */ @@ -104,13 +104,13 @@ module.exports = { /* * CryptPad contains an administration panel. Its access is restricted to specific * users using the following list. - * To give access to the admin panel to a user account, just add their user id, - * which can be found on the settings page for registered users. + * To give access to the admin panel to a user account, just add their public signing + * key, which can be found on the settings page for registered users. * Entries should be strings separated by a comma. */ /* 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 * (/contact.html) if you provide it below. */ - adminEmail: "__ADMIN_MAIL__", + adminEmail: '__ADMIN_MAIL__', /* * By default, CryptPad contacts one of our servers once a day. @@ -192,6 +192,25 @@ module.exports = { */ //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) * this sets the maximum size of any one file uploaded to the server. * anything larger than this size will be rejected @@ -209,12 +228,12 @@ module.exports = { */ /* customLimits: { - "https://my.awesome.website/user/#/1/cryptpad-user1/YZgXQxKR0Rcb6r6CmxHPdAGLVludrAF2lEnkbx1vVOo=": { + "[cryptpad-user1@my.awesome.website/YZgXQxKR0Rcb6r6CmxHPdAGLVludrAF2lEnkbx1vVOo=]": { limit: 20 * 1024 * 1024 * 1024, plan: 'insider', 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, plan: 'insider', note: 'storage space donated by my.awesome.website' diff --git a/manifest.json b/manifest.json index c6cdb5a..72f56ee 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Zero Knowledge realtime collaborative editor", "fr": "Éditeur chiffré collaboratif en temps réel." }, - "version": "3.24.0~ynh2", + "version": "4.0.0~ynh1", "url": "https://cryptpad.fr/", "license": "AGPL-3.0-only", "maintainer": { @@ -32,7 +32,7 @@ }, "example": "cryptpad.example.com" }, - { + { "name": "admin", "type": "user", "ask": { diff --git a/pull_request_template.md b/pull_request_template.md index 9aa2a24..69ce5a0 100644 --- a/pull_request_template.md +++ b/pull_request_template.md @@ -10,9 +10,3 @@ - [ ] Fix or enhancement tested. - [ ] Upgrade from last version 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)/) diff --git a/scripts/_common.sh b/scripts/_common.sh index a68592d..6648ef2 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,7 +4,7 @@ # COMMON VARIABLES #================================================= -nodejs_version="12" +nodejs_version="14" #================================================= # PERSONAL HELPERS @@ -17,4 +17,3 @@ nodejs_version="12" #================================================= # FUTURE OFFICIAL HELPERS #================================================= - diff --git a/scripts/change_url b/scripts/change_url index 94b4c28..7de1f4a 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -74,7 +74,7 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app #================================================= # 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 diff --git a/scripts/install b/scripts/install index fa3ca89..1dc57bb 100644 --- a/scripts/install +++ b/scripts/install @@ -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=admin --value=$admin -admin_mail=$(ynh_user_get_info "$admin" "mail") +email=$(ynh_user_get_info --username=$admin --key=mail) #================================================= # STANDARD MODIFICATIONS @@ -122,9 +122,9 @@ ynh_add_systemd_config # Copy default configuration file 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="__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="__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="__ADMIN_MAIL__" --replace_string="$email" --target_file="$final_path/config/config.js" # Store file checksum to detected user modifications on upgrade 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 -chown -R $app:$app $final_path +chown -R $app: $final_path #================================================= # INTEGRATE SERVICE IN YUNOHOST @@ -172,7 +172,7 @@ ynh_script_progression --message="Configuring SSOwat..." --weight=1 if [ $is_public -eq 1 ] then # unprotected_uris allows SSO credentials to be passed anyway. - ynh_permission_update --permission "main" --add visitors + ynh_permission_update --permission="main" --add="visitors" fi #================================================= diff --git a/scripts/restore b/scripts/restore index cb631dc..676dc1f 100644 --- a/scripts/restore +++ b/scripts/restore @@ -70,7 +70,7 @@ ynh_system_user_create --username=$app #================================================= # Restore permissions on app files -chown -R $app:$app $final_path +chown -R $app: $final_path #================================================= # REINSTALL DEPENDENCIES diff --git a/scripts/upgrade b/scripts/upgrade index 3af5f5f..ddcd909 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -9,29 +9,19 @@ source _common.sh 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 #================================================= ynh_script_progression --message="Loading installation settings..." --weight=1 +app=$YNH_APP_INSTANCE_NAME + domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path_url) final_path=$(ynh_app_setting_get --app=$app --key=final_path) is_public=$(ynh_app_setting_get --app=$app --key=is_public) 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) 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_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 @@ -132,24 +122,20 @@ ynh_backup_if_checksum_is_different "$final_path/config/config.js" # Copy default configuration file 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="__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="__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="__ADMIN_MAIL__" --replace_string="$email" --target_file="$final_path/config/config.js" # Store file checksum to detected user modifications on upgrade ynh_store_file_checksum "$final_path/config/config.js" - #================================================= # INSTALL CRYPTPAD #================================================= ynh_script_progression --message="Building CryptPad... (this will take some time and resources!)" --weight=60 pushd "$final_path" || ynh_die - ynh_use_nodejs - ynh_exec_warn_less yarn install --allow-root - yarn global add bower - bower install --allow-root + bower update --allow-root popd || ynh_die #================================================= @@ -171,7 +157,7 @@ ynh_add_systemd_config ynh_script_progression --message="Upgrading systemd configuration..." --weight=1 # Set permissions on app files -chown -R $app:$app $final_path +chown -R $app: $final_path #================================================= # 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_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