diff --git a/README.md b/README.md index 1c65b30..5b6d5d4 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ It shall NOT be edited by hand. # mygpo (gPodder.net) for YunoHost -[![Integration level](https://dash.yunohost.org/integration/mygpo.svg)](https://dash.yunohost.org/appci/app/mygpo) ![](https://ci-apps.yunohost.org/ci/badges/mygpo.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/mygpo.maintain.svg) +[![Integration level](https://dash.yunohost.org/integration/mygpo.svg)](https://dash.yunohost.org/appci/app/mygpo) ![Working status](https://ci-apps.yunohost.org/ci/badges/mygpo.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/mygpo.maintain.svg) [![Install mygpo (gPodder.net) with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mygpo) *[Lire ce readme en français.](./README_fr.md)* @@ -22,13 +22,13 @@ This is the webservice powering the https://gpodder.net website. It can be used Edit files under `/opt/yunohost/APPDIR/envs/prod` to set environment variables. There is an admin interface at `yourdomain.tld/admin` that the admin user can log in to. -**Shipped version:** 2.11.20211020~ynh1 +**Shipped version:** 2.11.20220622~ynh1 **Demo:** https://gpodder.net ## Screenshots -![](./doc/screenshots/screenshot1.png) +![Screenshot of mygpo (gPodder.net)](./doc/screenshots/screenshot1.png) ## Disclaimers / important information @@ -38,21 +38,22 @@ Edit files under `/opt/yunohost/APPDIR/envs/prod` to set environment variables. ## Documentation and resources -* Official app website: https://gpodder.net -* Official admin documentation: https://gpoddernet.readthedocs.io/ -* Upstream app code repository: https://github.com/gpodder/mygpo -* YunoHost documentation for this app: https://yunohost.org/app_mygpo -* Report a bug: https://github.com/YunoHost-Apps/mygpo_ynh/issues +* Official app website: +* Official admin documentation: +* Upstream app code repository: +* YunoHost documentation for this app: +* Report a bug: ## Developer info Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/mygpo_ynh/tree/testing). To try the testing branch, please proceed like that. -``` + +``` bash sudo yunohost app install https://github.com/YunoHost-Apps/mygpo_ynh/tree/testing --debug or sudo yunohost app upgrade mygpo -u https://github.com/YunoHost-Apps/mygpo_ynh/tree/testing --debug ``` -**More info regarding app packaging:** https://yunohost.org/packaging_apps \ No newline at end of file +**More info regarding app packaging:** diff --git a/README_fr.md b/README_fr.md index 6b3e2de..e3df16f 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,10 +1,14 @@ + + # mygpo (gPodder.net) pour YunoHost -[![Niveau d'intégration](https://dash.yunohost.org/integration/mygpo.svg)](https://dash.yunohost.org/appci/app/mygpo) ![](https://ci-apps.yunohost.org/ci/badges/mygpo.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/mygpo.maintain.svg) +[![Niveau d'intégration](https://dash.yunohost.org/integration/mygpo.svg)](https://dash.yunohost.org/appci/app/mygpo) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/mygpo.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/mygpo.maintain.svg) [![Installer mygpo (gPodder.net) avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mygpo) *[Read this readme in english.](./README.md)* -*[Lire ce readme en français.](./README_fr.md)* > *Ce package vous permet d'installer mygpo (gPodder.net) 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.* @@ -18,13 +22,13 @@ This is the webservice powering the https://gpodder.net website. It can be used Edit files under `/opt/yunohost/APPDIR/envs/prod` to set environment variables. There is an admin interface at `yourdomain.tld/admin` that the admin user can log in to. -**Version incluse :** 2.11.20211020~ynh1 +**Version incluse :** 2.11.20220622~ynh1 **Démo :** https://gpodder.net ## Captures d'écran -![](./doc/screenshots/screenshot1.png) +![Capture d'écran de mygpo (gPodder.net)](./doc/screenshots/screenshot1.png) ## Avertissements / informations importantes @@ -34,21 +38,22 @@ Edit files under `/opt/yunohost/APPDIR/envs/prod` to set environment variables. ## Documentations et ressources -* Site officiel de l'app : https://gpodder.net -* Documentation officielle de l'admin : https://gpoddernet.readthedocs.io/ -* Dépôt de code officiel de l'app : https://github.com/gpodder/mygpo -* Documentation YunoHost pour cette app : https://yunohost.org/app_mygpo -* Signaler un bug : https://github.com/YunoHost-Apps/mygpo_ynh/issues +* Site officiel de l'app : +* Documentation officielle de l'admin : +* Dépôt de code officiel de l'app : +* Documentation YunoHost pour cette app : +* Signaler un bug : ## Informations pour les développeurs Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/mygpo_ynh/tree/testing). Pour essayer la branche testing, procédez comme suit. -``` + +``` bash sudo yunohost app install https://github.com/YunoHost-Apps/mygpo_ynh/tree/testing --debug ou sudo yunohost app upgrade mygpo -u https://github.com/YunoHost-Apps/mygpo_ynh/tree/testing --debug ``` -**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps \ No newline at end of file +**Plus d'infos sur le packaging d'applications :** diff --git a/check_process b/check_process index 512c5da..d898e6a 100644 --- a/check_process +++ b/check_process @@ -1,8 +1,8 @@ ;; Test complet ; Manifest domain="domain.tld" - admin="john" is_public=1 + admin="john" ; Checks pkg_linter=1 setup_sub_dir=0 @@ -15,6 +15,8 @@ upgrade=1 from_commit=a50d46ae3a01d8a5b08ca9f9e62bfc9269fdedfa # 2.11.20210519~ynh1 upgrade=1 from_commit=59b41b65dc33c3da471175002f37576ff460dc46 + # 2.11.20211020~ynh1 + upgrade=1 from_commit=8284155ea371f4b8a9f0c333d486c5a2342acfae backup_restore=1 multi_instance=0 port_already_use=0 diff --git a/conf/app.src b/conf/app.src index 147bbad..bd87588 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,7 +1,7 @@ -SOURCE_URL=https://github.com/gpodder/mygpo/tarball/57579ae579a5499542d6fbd271f1e0ada7850f13 -SOURCE_SUM=66b0c72318296c8238cb6f7ed2564806b22605c56c368a7b45528ba3fabe48d3 +SOURCE_URL=https://github.com/gpodder/mygpo/archive/60caf1adfb6c0dbeb21828a0d1ae0dfebc279abd.tar.gz +SOURCE_SUM=15076ba34b6a85f61923e78dd84ce93384daca92331f34d20333be4c3d915b08 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true -SOURCE_FILENAME=57579ae579a5499542d6fbd271f1e0ada7850f13 +SOURCE_FILENAME= SOURCE_EXTRACT=true diff --git a/conf/systemd-beat.service b/conf/systemd-beat.service index c2709bd..56e7757 100644 --- a/conf/systemd-beat.service +++ b/conf/systemd-beat.service @@ -2,7 +2,6 @@ Description=GPodder-beat After=network.target postgresql.service redis.service __APP__.scoket - [Service] User=__APP__ Group=__APP__ diff --git a/conf/systemd-celery.service b/conf/systemd-celery.service index 5c39756..6235004 100644 --- a/conf/systemd-celery.service +++ b/conf/systemd-celery.service @@ -2,7 +2,6 @@ Description=GPodder-celery After=network.target postgresql.service redis.service __APP__.socket - [Service] User=__APP__ Group=__APP__ diff --git a/conf/systemd.service b/conf/systemd.service index e193b5d..1ac6082 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -3,7 +3,6 @@ Description=GPodder After=network.target postgresql.service nginx.service redis.service __APP__-celery.service __APP__-beat.service Requires=__APP__.socket - [Service] Type=notify User=__APP__ diff --git a/manifest.json b/manifest.json index 971088f..85baa4b 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Manage podcast subscriptions, and sync them between apps and devices", "fr": "Gérez vos sousciptions balado, et sychronisez-lez entre vos applis et appareils" }, - "version": "2.11.20211020~ynh1", + "version": "2.11.20220622~ynh1", "url": "https://github.com/gpodder/mygpo", "upstream": { "license": "AGPL-3.0-only", @@ -35,10 +35,6 @@ "name": "domain", "type": "domain" }, - { - "name": "admin", - "type": "user" - }, { "name": "is_public", "type": "boolean", @@ -47,6 +43,10 @@ "fr": "Si public, n'importe-qui pourra créer un compte et accéder a certaines statistiques d'utilization. Si privé, certaines parties de l'API seront inaccessibles" }, "default": true + }, + { + "name": "admin", + "type": "user" } ] } diff --git a/scripts/_common.sh b/scripts/_common.sh index f3763d4..c115d80 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -3,6 +3,7 @@ #================================================= # COMMON VARIABLES #================================================= + # dependencies used by the app pkg_dependencies="acl python3 python3-dev python3-pip python3-venv postgresql postgresql-contrib libpq-dev redis-server libldap2-dev libsasl2-dev" diff --git a/scripts/change_url b/scripts/change_url index 6e78f4b..5a44357 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -36,6 +36,7 @@ ynh_script_progression --message="Backing up the app before changing its URL (ma # Backup the current version of the app ynh_backup_before_upgrade ynh_clean_setup () { + ynh_clean_check_starting # Remove the new domain config file, the remove script won't do it as it doesn't know yet its location. ynh_secure_remove --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" diff --git a/scripts/install b/scripts/install index 4b548ad..6dadb55 100755 --- a/scripts/install +++ b/scripts/install @@ -14,7 +14,7 @@ source /usr/share/yunohost/helpers #================================================= ynh_clean_setup () { - true + ynh_clean_check_starting } # Exit if an error occurs during the execution of the script ynh_abort_if_errors @@ -25,14 +25,15 @@ ynh_abort_if_errors domain=$YNH_APP_ARG_DOMAIN path_url="/" -admin=$YNH_APP_ARG_ADMIN is_public=$YNH_APP_ARG_IS_PUBLIC +admin=$YNH_APP_ARG_ADMIN + +app=$YNH_APP_INSTANCE_NAME + admin_email=$(ynh_user_get_info --username=$admin --key="mail") secret_key=$(ynh_string_random --length=64) staff_token=$(ynh_string_random --length=64) -app=$YNH_APP_INSTANCE_NAME - #================================================= # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS #================================================= diff --git a/scripts/restore b/scripts/restore index 0e9c98b..fb49491 100755 --- a/scripts/restore +++ b/scripts/restore @@ -15,7 +15,7 @@ source /usr/share/yunohost/helpers #================================================= ynh_clean_setup () { - true + ynh_clean_check_starting } # Exit if an error occurs during the execution of the script ynh_abort_if_errors @@ -39,13 +39,6 @@ test ! -d $final_path \ #================================================= # STANDARD RESTORATION STEPS -#================================================= -# RESTORE THE NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Restoring the NGINX web server configuration..." - -ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" - #================================================= # RECREATE THE DEDICATED USER #================================================= @@ -84,6 +77,13 @@ ynh_script_progression --message="Reinstalling dependencies..." --weight=1 # Define and install dependencies ynh_install_app_dependencies $pkg_dependencies +#================================================= +# RESTORE THE NGINX CONFIGURATION +#================================================= +ynh_script_progression --message="Restoring the NGINX web server configuration..." + +ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" + #================================================= # RESTORE THE POSTGRESQL DATABASE #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 8cbf6e5..0c48fdc 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -33,6 +33,7 @@ ynh_script_progression --message="Backing up the app before upgrading (may take # Backup the current version of the app ynh_backup_before_upgrade ynh_clean_setup () { + ynh_clean_check_starting # Restore it if the upgrade fails ynh_restore_upgradebackup } @@ -91,6 +92,13 @@ fi set_permissions +#================================================= +# UPGRADE DEPENDENCIES +#================================================= +ynh_script_progression --message="Upgrading dependencies..." --weight=1 + +ynh_install_app_dependencies $pkg_dependencies + #================================================= # NGINX CONFIGURATION #================================================= @@ -99,13 +107,6 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." - # Create a dedicated NGINX config ynh_add_nginx_config -#================================================= -# UPGRADE DEPENDENCIES -#================================================= -ynh_script_progression --message="Upgrading dependencies..." --weight=1 - -ynh_install_app_dependencies $pkg_dependencies - #================================================= # SPECIFIC UPGRADE #=================================================