diff --git a/issue_template.md b/.github/ISSUE_TEMPLATE.md similarity index 94% rename from issue_template.md rename to .github/ISSUE_TEMPLATE.md index ec30445..2729a6b 100644 --- a/issue_template.md +++ b/.github/ISSUE_TEMPLATE.md @@ -8,7 +8,7 @@ about: When creating a bug report, please use the following template to provide 1. *Read this whole template first.* 2. *Determine if you are on the right place:* - *If you were performing an action on the app from the webadmin or the CLI (install, update, backup, restore, change_url...), you are on the right place!* - - *Otherwise, the issue may be due to myTinyTodo itself. Refer to its documentation or repository for help.* + - *Otherwise, the issue may be due to the app itself. Refer to its documentation or repository for help.* - *When in doubt, post here and we will figure it out together.* 3. *Delete the italic comments as you write over them below, and remove this guide.* --- @@ -31,7 +31,7 @@ about: When creating a bug report, please use the following template to provide - *If you performed a command from the CLI, the command itself is enough. For example:* ```sh - sudo yunohost app install mytinytodo + sudo yunohost app install the_app ``` - *If you used the webadmin, please perform the equivalent command from the CLI first.* - *If the error occurs in your browser, explain what you did:* diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..ef70e18 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,16 @@ +## Problem + +- *Description of why you made this PR* + +## Solution + +- *And how do you fix that problem* + +## PR Status + +- [ ] Code finished and ready to be reviewed/tested +- [ ] The fix/enhancement were manually tested (if applicable) + +## Automatic tests + +Automatic tests can be triggered on https://ci-apps-dev.yunohost.org/ *after creating the PR*, by commenting "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!". (N.B. : for this to work you need to be a member of the Yunohost-Apps organization) diff --git a/README.md b/README.md index 9e80c29..5d6b493 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,8 @@ + + # myTinyTodo for YunoHost [![Integration level](https://dash.yunohost.org/integration/mytinytodo.svg)](https://dash.yunohost.org/appci/app/mytinytodo) ![](https://ci-apps.yunohost.org/ci/badges/mytinytodo.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/mytinytodo.maintain.svg) @@ -5,58 +10,27 @@ *[Lire ce readme en français.](./README_fr.md)* -> *This package allows you to install myTinyTodo quickly and simply on a YunoHost server. +> *This package allows you to install myTinyTodo 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 -Simple way to manage your todo list in AJAX style. Written in PHP and jQuery. Data stored in MySQL database. -**Shipped version:** 1.6.4 +Open source to-do list script. + +**Shipped version:** 1.6.4~ynh1 + +**Demo:** https://demo.example.com ## Screenshots -![](http://www.mytinytodo.net/images/shot-v14b1.png) +![](./doc/screenshots/shot-v14b1.png) -## Demo +## Documentation and resources -* [Official demo](http://www.mytinytodo.net/demo/) - -## Configuration - - * How to configure this app: From an admin panel. - -## Documentation - - * Official documentation: https://www.mytinytodo.net/faq.php - * YunoHost documentation: If specific documentation is needed, feel free to contribute. - -## YunoHost specific features - -#### Multi-user support - -* Are LDAP and HTTP auth supported? -* Can the app be used by multiple users? - -#### Supported architectures - -* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/mytinytodo.svg)](https://ci-apps.yunohost.org/ci/apps/mytinytodo/) -* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/mytinytodo.svg)](https://ci-apps-arm.yunohost.org/ci/apps/mytinytodo/) - -## Limitations - -* Any known limitations. - -## Additional information - -* Other info you would like to add about this app. - -## Links - - * Report a bug: https://github.com/YunoHost-Apps/mytinytodo_ynh/issues - * App website: http://www.mytinytodo.net/ - * YunoHost website: https://yunohost.org/ - ---- +* Official app website: http://www.mytinytodo.net/ +* Official admin documentation: https://www.mytinytodo.net/faq.php +* YunoHost documentation for this app: https://yunohost.org/app_mytinytodo +* Report a bug: https://github.com/YunoHost-Apps/mytinytodo_ynh/issues ## Developer info @@ -68,3 +42,5 @@ sudo yunohost app install https://github.com/YunoHost-Apps/mytinytodo_ynh/tree/t or sudo yunohost app upgrade mytinytodo -u https://github.com/YunoHost-Apps/mytinytodo_ynh/tree/testing --debug ``` + +**More info regarding app packaging:** https://yunohost.org/packaging_apps \ No newline at end of file diff --git a/README_fr.md b/README_fr.md index 936ea92..2ccba71 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,62 +1,32 @@ # myTinyTodo pour YunoHost [![Niveau d'intégration](https://dash.yunohost.org/integration/mytinytodo.svg)](https://dash.yunohost.org/appci/app/mytinytodo) ![](https://ci-apps.yunohost.org/ci/badges/mytinytodo.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/mytinytodo.maintain.svg) -[![Installer myTinyTodo pour YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mytinytodo) +[![Installer myTinyTodo avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mytinytodo) -*[Read this readme in english.](./README.md)* +*[Read this readme in english.](./README.md)* +*[Lire ce readme en français.](./README_fr.md)* -> *Ce package vous permet d'installer myTinyTodo rapidement et simplement sur un serveur YunoHost. -Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/#/install) pour apprendre comment l'installer.* +> *Ce package vous permet d'installer myTinyTodo 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.* ## Vue d'ensemble -Un moyen simple de gérer votre liste de tâches dans le style AJAX. Écrit en PHP et jQuery. Données stockées dans la base de données MySQL. -**Version incluse :** 1.6.4 +Gestionnaire de todo list (GTD). + +**Version incluse :** 1.6.4~ynh1 + +**Démo :** https://demo.example.com ## Captures d'écran -![](http://www.mytinytodo.net/images/shot-v14b1.png) +![](./doc/screenshots/shot-v14b1.png) -## Démo +## Documentations et ressources -* [Démo officielle](http://www.mytinytodo.net/demo/) - -## Configuration - -Comment configurer cette application : via le panneau d'administration. - -## Documentation - - * Documentation officielle : https://www.mytinytodo.net/faq.php - * Documentation YunoHost : Si une documentation spécifique est nécessaire, n'hésitez pas à contribuer. - -## Caractéristiques spécifiques YunoHost - -#### Support multi-utilisateur - -* L'authentification LDAP et HTTP est-elle prise en charge ? **Non** -* L'application peut-elle être utilisée par plusieurs utilisateurs ? **Non** - -#### Architectures supportées - -* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/mytinytodo.svg)](https://ci-apps.yunohost.org/ci/apps/mytinytodo/) -* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/mytinytodo.svg)](https://ci-apps-arm.yunohost.org/ci/apps/mytinytodo/) - -## Limitations - -* Limitations connues. - -## Informations additionnelles - -* Autres informations que vous souhaitez ajouter sur cette application. - -## Liens - - * Signaler un bug : https://github.com/YunoHost-Apps/mytinytodo_ynh/issues - * Site de l'application : http://www.mytinytodo.net/ - * Site web YunoHost : https://yunohost.org/ - ---- +* Site officiel de l'app : http://www.mytinytodo.net/ +* Documentation officielle de l'admin : https://www.mytinytodo.net/faq.php +* Documentation YunoHost pour cette app : https://yunohost.org/app_mytinytodo +* Signaler un bug : https://github.com/YunoHost-Apps/mytinytodo_ynh/issues ## Informations pour les développeurs @@ -68,3 +38,5 @@ sudo yunohost app install https://github.com/YunoHost-Apps/mytinytodo_ynh/tree/t ou sudo yunohost app upgrade mytinytodo -u https://github.com/YunoHost-Apps/mytinytodo_ynh/tree/testing --debug ``` + +**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps \ No newline at end of file diff --git a/check_process b/check_process index a6abd78..2bdf7ce 100644 --- a/check_process +++ b/check_process @@ -1,9 +1,9 @@ ;; Test complet ; Manifest - domain="domain.tld" (DOMAIN) - path="/path" (PATH) + domain="domain.tld" + path="/path" language="fr" - is_public=1 (PUBLIC|public=1|private=0) + is_public=1 ; Checks pkg_linter=1 setup_sub_dir=1 @@ -12,6 +12,7 @@ setup_private=1 setup_public=1 upgrade=1 + upgrade=1 from_commit=b598d7235944070a438db49710d141b7ece25669 backup_restore=1 multi_instance=0 change_url=1 @@ -19,6 +20,6 @@ Email= Notification=none ;;; Upgrade options - ; commit=CommitHash - name=Name and date of the commit. + ; commit=b598d7235944070a438db49710d141b7ece25669 + name= Upgrade to version 1.6.4 (#14) manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&port=666& diff --git a/doc/.DS_Store b/doc/.DS_Store new file mode 100644 index 0000000..30e5aa1 Binary files /dev/null and b/doc/.DS_Store differ diff --git a/doc/screenshots/shot-v14b1.png b/doc/screenshots/shot-v14b1.png new file mode 100644 index 0000000..8c24854 Binary files /dev/null and b/doc/screenshots/shot-v14b1.png differ diff --git a/manifest.json b/manifest.json index 4a502ea..70507a7 100644 --- a/manifest.json +++ b/manifest.json @@ -6,15 +6,21 @@ "en": "Open source to-do list script.", "fr": "Gestionnaire de todo list (GTD)." }, - "url": "http://www.mytinytodo.net/", - "license": "GPL-2.0", "version": "1.6.4~ynh1", + "url": "http://www.mytinytodo.net/", + "upstream": { + "license": "GPL-2.0", + "website": "http://www.mytinytodo.net/", + "demo": "https://demo.example.com", + "admindoc": "https://www.mytinytodo.net/faq.php" + }, + "license": "GPL-2.0", "maintainer": { "name": "plabuse", "email": "pierre.levasseur@free.fr" }, "requirements": { - "yunohost": ">= 4.1.7" + "yunohost": ">= 4.2.4" }, "multi_instance": false, "services": [ diff --git a/pull_request_templat.md b/pull_request_templat.md deleted file mode 100644 index 6c28fc5..0000000 --- a/pull_request_templat.md +++ /dev/null @@ -1,16 +0,0 @@ -## Problem -- *Description of why you made this PR* - -## Solution -- *And how do you fix that problem* - -## PR Status -- [ ] Code finished. -- [ ] Tested with Package_check. -- [ ] Fix or enhancement tested. -- [ ] Upgrade from last version tested. -- [ ] Can be reviewed and tested. - -## Package_check results ---- -* An automatic package_check will be launch at https://ci-apps-dev.yunohost.org/, when you add a specific comment to your Pull Request: "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!"* diff --git a/scripts/_common.sh b/scripts/_common.sh index 507f449..fa5e714 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -6,9 +6,6 @@ YNH_PHP_VERSION="7.3" -# dependencies used by the app -pkg_dependencies="" - extra_php_dependencies="php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-pdo" #================================================= diff --git a/scripts/install b/scripts/install index 30e7879..64b9c48 100644 --- a/scripts/install +++ b/scripts/install @@ -61,6 +61,14 @@ ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name # # # mysql --debug-check -u $db_user -p$db_pwd $db_user < ../conf/sql/common.sql ynh_mysql_connect_as --user=$db_name --password=$db_pwd --database=$db_name < ../conf/sql/mytinytodo.sql +#================================================= +# CREATE DEDICATED USER +#================================================= +ynh_script_progression --message="Configuring system user..." --weight=1 + +# Create a system user +ynh_system_user_create --username=$app --home_dir="$final_path" + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -70,6 +78,10 @@ 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" +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" + #================================================= # NGINX CONFIGURATION #================================================= @@ -78,14 +90,6 @@ ynh_script_progression --message="Configuring NGINX web server..." --weight=2 # Create a dedicated NGINX config ynh_add_nginx_config -#================================================= -# CREATE DEDICATED USER -#================================================= -ynh_script_progression --message="Configuring system user..." --weight=1 - -# Create a system user -ynh_system_user_create --username=$app - #================================================= # PHP-FPM CONFIGURATION #================================================= @@ -113,7 +117,7 @@ chmod 775 $final_path/db/config.php chmod 775 $final_path/tmp/sessions # je donne les droits a myTinyTodo sur /var/www/mytinyto/* -chown -R $app: $final_path +#chown -R $app: $final_path #================================================= # SETUP SSOWAT diff --git a/scripts/restore b/scripts/restore index 3491624..7a0c791 100644 --- a/scripts/restore +++ b/scripts/restore @@ -48,6 +48,14 @@ test ! -d $final_path \ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" +#================================================= +# RECREATE THE DEDICATED USER +#================================================= +ynh_script_progression --message="Recreating the dedicated system user..." --weight=3 + +# Create the dedicated user (if not existing) +ynh_system_user_create --username=$app --home_dir="$final_path" + #================================================= # RESTORE THE APP MAIN DIR #================================================= @@ -55,19 +63,14 @@ ynh_script_progression --message="Restoring the app main directory..." --weight= ynh_restore_file --origin_path="$final_path" -#================================================= -# RECREATE THE DEDICATED USER -#================================================= -ynh_script_progression --message="Recreating the dedicated system user..." --weight=3 - -# Create the dedicated user (if not existing) -ynh_system_user_create --username=$app +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" #================================================= # RESTORE USER RIGHTS #================================================= -chown -R $app: $final_path chmod 775 $final_path/db/config.php chmod 775 $final_path/tmp/sessions diff --git a/scripts/upgrade b/scripts/upgrade index 2bf5c41..a5829e9 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -56,6 +56,14 @@ ynh_clean_setup () { # Exit if an error occurs during the execution of the script ynh_abort_if_errors +#================================================= +# CREATE DEDICATED USER +#================================================= +ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1 + +# Create a dedicated user (if not existing) +ynh_system_user_create --username=$app --home_dir="$final_path" + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -83,6 +91,10 @@ then ynh_secure_remove --file="$tmpdir" fi +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" + #================================================= # NGINX CONFIGURATION #================================================= @@ -91,14 +103,6 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." - # Create a dedicated NGINX config ynh_add_nginx_config -#================================================= -# CREATE DEDICATED USER -#================================================= -ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1 - -# Create a dedicated user (if not existing) -ynh_system_user_create --username=$app - #================================================= # PHP-FPM CONFIGURATION #================================================= @@ -127,7 +131,6 @@ ynh_secure_remove --file="$final_path/db/todolist.db" chmod 775 $final_path/db/config.php chmod 755 $final_path/tmp/sessions -chown -R $app: $final_path #================================================= # RELOAD NGINX