diff --git a/check_process b/check_process index 79ac566..ab3a929 100644 --- a/check_process +++ b/check_process @@ -1,8 +1,8 @@ ;; Test complet ; Manifest - domain="domain.tld" (DOMAIN) - path="/path" (PATH) - is_public=1 (PUBLIC|public=1|private=0) + domain="domain.tld" + path="/path" + is_public=1 ; Checks pkg_linter=1 setup_sub_dir=1 diff --git a/conf/app.src b/conf/app.src index e74c1cc..53c9846 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/MohannadNaj/Strut/archive/467fcb8a6436c84f2acb8ffb31b954d5eb3655b8.tar.gz -SOURCE_SUM=d138ec3116b507d1fc3608f0c8bbb7601a68824403cb20617a80af1906bff3ab +SOURCE_URL=https://github.com/MohannadNaj/Strut/archive/e073d1af2c956740be1656f1a83d04d1e3dc2316.tar.gz +SOURCE_SUM=4c252cf4a73b2ce29cfec78a5deda4857a38e6143a6451426dab2a5063eabc21 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/conf/nginx.conf b/conf/nginx.conf index 5b29d2d..ded657f 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -4,11 +4,6 @@ location __PATH__/ { # Path to source alias __FINALPATH__/ ; - # Force usage of https - if ($scheme = http) { - rewrite ^ https://$server_name$request_uri? permanent; - } - index index.html; try_files $uri $uri/ /index.html; diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md new file mode 100644 index 0000000..9837ae8 --- /dev/null +++ b/doc/DESCRIPTION.md @@ -0,0 +1 @@ +Strut is a simple, online editor that doesn't even require registration to operate. Everything you do is recoverable and re-usable. \ No newline at end of file diff --git a/doc/DESCRIPTION_fr.md b/doc/DESCRIPTION_fr.md new file mode 100644 index 0000000..5a66639 --- /dev/null +++ b/doc/DESCRIPTION_fr.md @@ -0,0 +1 @@ +Strut est un éditeur WEB de présentations fonctionnant en HTML/JS. Tout se passe en local. Il fonctinne grâce à [impress.js](http://bartaz.github.com/impress.js/#/bored). diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md new file mode 100644 index 0000000..61fde57 --- /dev/null +++ b/doc/DISCLAIMER.md @@ -0,0 +1,10 @@ +## Limitations +No import/export from/to OpenDocument or pptx. + +## Additional information + +* This package doesn't contained the exact sources of the upstream https://github.com/tantaman/Strut. + +Initial Strut software includes Google Analytics and is bind to Imgur to upload images. This kind of trackers or external services are not accepted by the package team of YunoHost. So this trackers are removed from sources, a pull request has been done and merged but has finally be removed from the strut upstream with no explanation. In more, Strut developers don't deliver builded versions. To build a version it needs grunt, that can't be removed easily. + +To avoid to take time to build this html/js app, this package setups a builded version of Strut with the patch that remove Google Analytics and Imgur dependencies. It is a build of this version https://github.com/tantaman/Strut/commits/6761b141ee7aa622916e2d23cced84ee95618cce . So it's not the more recent version. diff --git a/doc/DISCLAIMER_fr.md b/doc/DISCLAIMER_fr.md new file mode 100644 index 0000000..145f346 --- /dev/null +++ b/doc/DISCLAIMER_fr.md @@ -0,0 +1,14 @@ +## Limitations + +Pas d'import/export possible depuis ou vers des fichiers OpenDocument ou pptx. + +## Information supplémentaires + +* Ce package ne contient pas les sources exactes de [la version originale de Strut](https://github.com/tantaman/Strut) + +Strut, à l'origine, inclut Google Analytics et est lié à Imgur pour téléverser des images. Ces pisteurs ou services externes ne sont pas acceptés par l'équipe de YunoHost. +Ils sont donc supprimés par rapport aux sources. +Une pull request pour les supprimer de leur côté a été validée et mergée mais finalement supprimée sans explication. De plus, les développeurs de Strut ne fournissent pas le logiciel compilé. +Pour compiler le logiciel, cela nécessite grunt, ce qui ne peut pas être supprimé facilement. +Pour éviter de devoir générer cette application HTML/JS, ce package créé une version compilée de Strut avec le patch qui supprime les dépendances à Google Analytics et Imgur. +Voici la version compilée https://github.com/tantaman/Strut/commits/6761b141ee7aa622916e2d23cced84ee95618cce. Ce n'est pas la version la plus récente. diff --git a/doc/screenshots/f1003c6a-be74-11e2-84b9-14776c652afb.png b/doc/screenshots/f1003c6a-be74-11e2-84b9-14776c652afb.png new file mode 100644 index 0000000..87f716e Binary files /dev/null and b/doc/screenshots/f1003c6a-be74-11e2-84b9-14776c652afb.png differ diff --git a/manifest.json b/manifest.json index 95a7d1c..66da39d 100644 --- a/manifest.json +++ b/manifest.json @@ -2,20 +2,28 @@ "name": "Strut", "id": "strut", "packaging_format": 1, - "version": "20171224-1~ynh2", - "url": "http://strut.io", - "license": "AGPL-3.0", - "requirements": { - "yunohost": ">= 4.1.7" - }, "description": { "en": "Slide editor for creating impress.js presentations.", "fr": "Éditeur de diapositives permettant de créer des présentations impress.js." }, + "version": "20171224-1~ynh2", + "url": "http://strut.io", + "upstream": { + "license": "AGPL-3.0", + "website": "http://strut.io", + "demo": "http://strut.io/dist/", + "admindoc": "https://yunohost.org/packaging_apps", + "userdoc": "https://yunohost.org/apps", + "code": "https://some.forge.com/example/example" + }, + "license": "AGPL-3.0", "maintainer": { "name": "ljf", "email": "ljf+yunohost@grimaud.me" }, + "requirements": { + "yunohost": ">= 4.3.0" + }, "multi_instance": true, "services": [ "nginx" diff --git a/scripts/restore b/scripts/restore index 13aa9e5..ac9fe5c 100644 --- a/scripts/restore +++ b/scripts/restore @@ -32,8 +32,6 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) #================================================= ynh_script_progression --message="Validating restoration parameters..." --weight=3 -ynh_webpath_available --domain=$domain --path_url=$path_url \ - || ynh_die --message="Path not available: ${domain}${path_url}" test ! -d $final_path \ || ynh_die --message="There is already a directory: $final_path " @@ -42,13 +40,14 @@ test ! -d $final_path \ #================================================= # RESTORE THE NGINX CONFIGURATION #================================================= +ynh_script_progression --message="Restoring the NGINX web server configuration..." --weight=1 ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # RESTORE THE APP MAIN DIR #================================================= -ynh_script_progression --message="Restoring the app main directory..." +ynh_script_progression --message="Restoring the app main directory..." --weight=1 ynh_restore_file --origin_path="$final_path" @@ -66,7 +65,7 @@ find "$final_path" -type d -print0 | xargs -0 chmod 750 #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading NGINX web server..." +ynh_script_progression --message="Reloading NGINX web server..." --weight=1 ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/upgrade b/scripts/upgrade index 5810d25..5425a65 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -26,10 +26,24 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) upgrade_type=$(ynh_check_app_version_changed) +#================================================= +# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP +#================================================= +ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=6 + +# Backup the current version of the app +ynh_backup_before_upgrade +ynh_clean_setup () { + # restore it if the upgrade fails + ynh_restore_upgradebackup +} +# Exit if an error occurs during the execution of the script +ynh_abort_if_errors + #================================================= # ENSURE DOWNWARD COMPATIBILITY #================================================= -ynh_script_progression --message="Ensuring downward compatibility..." +ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 # If final_path doesn't exist, create it if [ -z "$final_path" ]; then @@ -44,20 +58,6 @@ if ynh_legacy_permissions_exists; then ynh_app_setting_delete --app=$app --key=is_public fi -#================================================= -# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP -#================================================= -ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=6 - -# Backup the current version of the app -ynh_backup_before_upgrade -ynh_clean_setup () { - # restore it if the upgrade fails - ynh_restore_upgradebackup -} -# Exit if an error occurs during the execution of the script -ynh_abort_if_errors - #================================================= # STANDARD UPGRADE STEPS #================================================= @@ -81,7 +81,7 @@ fi #================================================= # NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Upgrading NGINX web server configuration..." +ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=2 # Create a dedicated nginx config ynh_add_nginx_config @@ -113,7 +113,7 @@ find "$final_path" -type d -print0 | xargs -0 chmod 750 #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading NGINX web server..." +ynh_script_progression --message="Reloading NGINX web server..." --weight=1 ynh_systemd_action --service_name=nginx --action=reload