From 6372bd3d4ef2c8746fa538ca5c0cabf474e51ade Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 2 Feb 2023 14:03:54 +0000 Subject: [PATCH 01/19] [CI] Reformat / remove stale translated strings --- locales/ar.json | 2 +- locales/en.json | 4 ++-- locales/fr.json | 2 +- locales/gl.json | 2 +- locales/tr.json | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/locales/ar.json b/locales/ar.json index c1d6cbcfb..c9f35dab3 100644 --- a/locales/ar.json +++ b/locales/ar.json @@ -210,4 +210,4 @@ "unrestore_app": "لن يتم استعادة التطبيق '{app}'", "yunohost_already_installed": "إنّ YunoHost مُنصّب مِن قَبل", "hook_name_unknown": "إسم الإجراء '{name}' غير معروف" -} +} \ No newline at end of file diff --git a/locales/en.json b/locales/en.json index 9f56aacd5..f2ba48af4 100644 --- a/locales/en.json +++ b/locales/en.json @@ -400,12 +400,12 @@ "firewall_reloaded": "Firewall reloaded", "firewall_rules_cmd_failed": "Some firewall rule commands have failed. More info in log.", "global_settings_reset_success": "Reset global settings", - "global_settings_setting_dns_exposure": "IP versions to consider for DNS configuration and diagnosis", - "global_settings_setting_dns_exposure_help": "NB: This only affects the recommended DNS configuration and diagnosis checks. This does not affect system configurations.", "global_settings_setting_admin_strength": "Admin password strength requirements", "global_settings_setting_admin_strength_help": "These requirements are only enforced when initializing or changing the password", "global_settings_setting_backup_compress_tar_archives": "Compress backups", "global_settings_setting_backup_compress_tar_archives_help": "When creating new backups, compress the archives (.tar.gz) instead of uncompressed archives (.tar). N.B. : enabling this option means create lighter backup archives, but the initial backup procedure will be significantly longer and heavy on CPU.", + "global_settings_setting_dns_exposure": "IP versions to consider for DNS configuration and diagnosis", + "global_settings_setting_dns_exposure_help": "NB: This only affects the recommended DNS configuration and diagnosis checks. This does not affect system configurations.", "global_settings_setting_nginx_compatibility": "NGINX Compatibility", "global_settings_setting_nginx_compatibility_help": "Compatibility vs. security tradeoff for the web server NGINX. Affects the ciphers (and other security-related aspects)", "global_settings_setting_nginx_redirect_to_https": "Force HTTPS", diff --git a/locales/fr.json b/locales/fr.json index c1647334a..70d7a2683 100644 --- a/locales/fr.json +++ b/locales/fr.json @@ -752,4 +752,4 @@ "global_settings_setting_dns_exposure": "Suites d'IP à prendre en compte pour la configuration et le diagnostic du DNS", "global_settings_setting_dns_exposure_help": "NB : Ceci n'affecte que la configuration DNS recommandée et les vérifications de diagnostic. Cela n'affecte pas les configurations du système.", "diagnosis_ip_no_ipv6_tip_important": "IPv6 devrait généralement être configuré automatiquement par le système ou par votre fournisseur d'accès à internet (FAI) s'il est disponible. Sinon, vous devrez peut-être configurer quelques éléments manuellement, comme expliqué dans la documentation ici : https://yunohost.org/#/ipv6." -} +} \ No newline at end of file diff --git a/locales/gl.json b/locales/gl.json index 7ba5c181f..1b5147ac6 100644 --- a/locales/gl.json +++ b/locales/gl.json @@ -749,4 +749,4 @@ "global_settings_setting_dns_exposure": "Versións de IP a ter en conta para a configuración DNS e diagnóstico", "global_settings_setting_dns_exposure_help": "Nota: Esto só lle afecta á configuración DNS recomendada e diagnóstico do sistema. Non lle afecta aos axustes do sistema.", "diagnosis_ip_no_ipv6_tip_important": "Se está dispoñible, IPv6 debería estar automáticamente configurado polo sistema ou o teu provedor. Se non, pode que teñas que facer algúns axustes manualmente tal como se explica na documentación: https://yunohost.org/#/ipv6." -} +} \ No newline at end of file diff --git a/locales/tr.json b/locales/tr.json index 6768f95e4..c219e997b 100644 --- a/locales/tr.json +++ b/locales/tr.json @@ -16,4 +16,4 @@ "additional_urls_already_removed": "Ek URL '{url}', '{permission}' izni için ek URL'de zaten kaldırıldı", "app_action_cannot_be_ran_because_required_services_down": "Bu eylemi gerçekleştirmek için şu servisler çalışıyor olmalıdır: {services}. Devam etmek için onları yeniden başlatın (ve muhtemelen neden çalışmadığını araştırın).", "app_arch_not_supported": "Bu uygulama yalnızca {', '.join(required)} işlemci mimarisi üzerine kurulabilir ancak sunucunuzun işlemci mimarisi {current}." -} +} \ No newline at end of file From b9dc371a1c87ab0504e25a8a0cab87109190197a Mon Sep 17 00:00:00 2001 From: Florent Date: Thu, 2 Feb 2023 16:33:01 +0100 Subject: [PATCH 02/19] Fixes $app unbound when running ynh_secure_remove Fixes this issue: https://github.com/YunoHost/issues/issues/2138 --- helpers/utils | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpers/utils b/helpers/utils index bc83888e9..cd3b1b8d2 100644 --- a/helpers/utils +++ b/helpers/utils @@ -718,7 +718,7 @@ _acceptable_path_to_delete() { local forbidden_paths=$(ls -d / /* /{var,home,usr}/* /etc/{default,sudoers.d,yunohost,cron*}) # Legacy : A couple apps still have data in /home/$app ... - if [[ -n "$app" ]] + if [[ -n "${app:-}" ]] then forbidden_paths=$(echo "$forbidden_paths" | grep -v "/home/$app") fi From a9ac55e4a5e7bfb3e22594f4d54d1073a06cd816 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 2 Feb 2023 22:54:39 +0100 Subject: [PATCH 03/19] log/appv2: don't dump all settings in log metadata --- src/log.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/log.py b/src/log.py index f8eb65f8f..dc4ba3dbf 100644 --- a/src/log.py +++ b/src/log.py @@ -16,6 +16,7 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . # +import copy import os import re import yaml @@ -594,6 +595,14 @@ class OperationLogger: Write or rewrite the metadata file with all metadata known """ + metadata = copy.copy(self.metadata) + + # Remove lower-case keys ... this is because with the new v2 app packaging, + # all settings are included in the env but we probably don't want to dump all of these + # which may contain various secret/private data ... + if "env" in metadata: + metadata["env"] = {k: v for k, v in metadata["env"].items() if k == k.upper()} + dump = yaml.safe_dump(self.metadata, default_flow_style=False) for data in self.data_to_redact: # N.B. : we need quotes here, otherwise yaml isn't happy about loading the yml later From 3110460a40981f5fba6d7d3ccdad31ba9046b700 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 2 Feb 2023 22:59:43 +0100 Subject: [PATCH 04/19] appv2: resource upgrade will tweak settings, we have to re-update the env_dict after upgrading resources --- src/app.py | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/src/app.py b/src/app.py index 205dec505..2b3496655 100644 --- a/src/app.py +++ b/src/app.py @@ -677,11 +677,17 @@ def app_upgrade(app=[], url=None, file=None, force=False, no_safety_backup=False env_dict = _make_environment_for_app_script( app_instance_name, workdir=extracted_app_folder, action="upgrade" ) - env_dict["YNH_APP_UPGRADE_TYPE"] = upgrade_type - env_dict["YNH_APP_MANIFEST_VERSION"] = str(app_new_version) - env_dict["YNH_APP_CURRENT_VERSION"] = str(app_current_version) + + env_dict_more = { + "YNH_APP_UPGRADE_TYPE": upgrade_type, + "YNH_APP_MANIFEST_VERSION": str(app_new_version), + "YNH_APP_CURRENT_VERSION": str(app_current_version), + } + if manifest["packaging_format"] < 2: - env_dict["NO_BACKUP_UPGRADE"] = "1" if no_safety_backup else "0" + env_dict_more["NO_BACKUP_UPGRADE"] = "1" if no_safety_backup else "0" + + env_dict.update(env_dict_more) # Start register change on system related_to = [("app", app_instance_name)] @@ -698,6 +704,13 @@ def app_upgrade(app=[], url=None, file=None, force=False, no_safety_backup=False operation_logger=operation_logger, ) + # Boring stuff : the resource upgrade may have added/remove/updated setting + # so we need to reflect this in the env_dict used to call the actual upgrade script x_x + env_dict = _make_environment_for_app_script( + app_instance_name, workdir=extracted_app_folder, action="upgrade" + ) + env_dict.update(env_dict_more) + # Execute the app upgrade script upgrade_failed = True try: From 8090acb158042687486d556b41790ac6833ecc9c Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 2 Feb 2023 23:09:58 +0100 Subject: [PATCH 05/19] backup: add name of the backup in create/delete message, otherwise that creates some spooky messages with 'Backup created' directly followed by 'Backup deleted' during safety-backup-before-upgrade in v2 apps --- locales/en.json | 6 +++--- src/backup.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/locales/en.json b/locales/en.json index f2ba48af4..b8ca0c229 100644 --- a/locales/en.json +++ b/locales/en.json @@ -102,14 +102,14 @@ "backup_copying_to_organize_the_archive": "Copying {size}MB to organize the archive", "backup_couldnt_bind": "Could not bind {src} to {dest}.", "backup_create_size_estimation": "The archive will contain about {size} of data.", - "backup_created": "Backup created", + "backup_created": "Backup created: {name}", "backup_creation_failed": "Could not create the backup archive", "backup_csv_addition_failed": "Could not add files to backup into the CSV file", "backup_csv_creation_failed": "Could not create the CSV file needed for restoration", "backup_custom_backup_error": "Custom backup method could not get past the 'backup' step", "backup_custom_mount_error": "Custom backup method could not get past the 'mount' step", "backup_delete_error": "Could not delete '{path}'", - "backup_deleted": "Backup deleted", + "backup_deleted": "Backup deleted: {name}", "backup_hook_unknown": "The backup hook '{hook}' is unknown", "backup_method_copy_finished": "Backup copy finalized", "backup_method_custom_finished": "Custom backup method '{method}' finished", @@ -752,4 +752,4 @@ "yunohost_installing": "Installing YunoHost...", "yunohost_not_installed": "YunoHost is not correctly installed. Please run 'yunohost tools postinstall'", "yunohost_postinstall_end_tip": "The post-install completed! To finalize your setup, please consider:\n - diagnose potential issues through the 'Diagnosis' section of the webadmin (or 'yunohost diagnosis run' in command-line);\n - reading the 'Finalizing your setup' and 'Getting to know YunoHost' parts in the admin documentation: https://yunohost.org/admindoc." -} \ No newline at end of file +} diff --git a/src/backup.py b/src/backup.py index 0783996b9..bb4f8af0e 100644 --- a/src/backup.py +++ b/src/backup.py @@ -2295,7 +2295,7 @@ def backup_create( ) backup_manager.backup() - logger.success(m18n.n("backup_created")) + logger.success(m18n.n("backup_created", name=name)) operation_logger.success() return { @@ -2622,7 +2622,7 @@ def backup_delete(name): hook_callback("post_backup_delete", args=[name]) - logger.success(m18n.n("backup_deleted")) + logger.success(m18n.n("backup_deleted", name=name)) # From 1c95bcff094231edf495a54967a2ac27697bffd1 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 2 Feb 2023 23:13:00 +0100 Subject: [PATCH 06/19] appv2: safety-backup-before-upgrade should only contain the app --- src/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app.py b/src/app.py index 2b3496655..ab0c5d720 100644 --- a/src/app.py +++ b/src/app.py @@ -647,7 +647,7 @@ def app_upgrade(app=[], url=None, file=None, force=False, no_safety_backup=False safety_backup_name = f"{app_instance_name}-pre-upgrade2" other_safety_backup_name = f"{app_instance_name}-pre-upgrade1" - backup_create(name=safety_backup_name, apps=[app_instance_name]) + backup_create(name=safety_backup_name, apps=[app_instance_name], system=None) if safety_backup_name in backup_list()["archives"]: # if the backup suceeded, delete old safety backup to save space From 2b2d49a504372c7147018c91feb63451036b6136 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 2 Feb 2023 23:20:29 +0100 Subject: [PATCH 07/19] appv2: fix env not including vars for v1->v2 upgrade --- src/app.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/app.py b/src/app.py index ab0c5d720..e0e08a215 100644 --- a/src/app.py +++ b/src/app.py @@ -706,8 +706,9 @@ def app_upgrade(app=[], url=None, file=None, force=False, no_safety_backup=False # Boring stuff : the resource upgrade may have added/remove/updated setting # so we need to reflect this in the env_dict used to call the actual upgrade script x_x + # Or: the old manifest may be in v1 and the new in v2, so force to add the setting in env env_dict = _make_environment_for_app_script( - app_instance_name, workdir=extracted_app_folder, action="upgrade" + app_instance_name, workdir=extracted_app_folder, action="upgrade", include_app_settings=True, ) env_dict.update(env_dict_more) @@ -2731,7 +2732,7 @@ def _assert_no_conflicting_apps(domain, path, ignore_app=None, full_domain=False def _make_environment_for_app_script( - app, args={}, args_prefix="APP_ARG_", workdir=None, action=None + app, args={}, args_prefix="APP_ARG_", workdir=None, action=None, include_app_settings=False, ): app_setting_path = os.path.join(APPS_SETTING_PATH, app) @@ -2758,7 +2759,7 @@ def _make_environment_for_app_script( env_dict[f"YNH_{args_prefix}{arg_name_upper}"] = str(arg_value) # If packaging format v2, load all settings - if manifest["packaging_format"] >= 2: + if manifest["packaging_format"] >= 2 or include_app_settings: env_dict["app"] = app for setting_name, setting_value in _get_app_settings(app).items(): # Ignore special internal settings like checksum__ From 80b38d0e8a8f99cd1cf7154a7216c21a6132efff Mon Sep 17 00:00:00 2001 From: ButterflyOfFire Date: Thu, 2 Feb 2023 18:35:49 +0000 Subject: [PATCH 08/19] Translated using Weblate (Arabic) Currently translated at 22.7% (171 of 753 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/ar/ --- locales/ar.json | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/locales/ar.json b/locales/ar.json index c9f35dab3..04fd27001 100644 --- a/locales/ar.json +++ b/locales/ar.json @@ -209,5 +209,10 @@ "unbackup_app": "لن يتم حفظ التطبيق '{app}'", "unrestore_app": "لن يتم استعادة التطبيق '{app}'", "yunohost_already_installed": "إنّ YunoHost مُنصّب مِن قَبل", - "hook_name_unknown": "إسم الإجراء '{name}' غير معروف" -} \ No newline at end of file + "hook_name_unknown": "إسم الإجراء '{name}' غير معروف", + "app_manifest_install_ask_admin": "اختر مستخدمًا إداريًا لهذا التطبيق", + "domain_config_cert_summary_abouttoexpire": "مدة صلاحية الشهادة الحالية على وشك الإنتهاء ومِن المفتَرض أن يتم تجديدها تلقائيا قريبا.", + "app_manifest_install_ask_path": "اختر مسار URL (بعد النطاق) حيث ينبغي تنصيب هذا التطبيق", + "app_manifest_install_ask_domain": "اختر اسم النطاق الذي ينبغي فيه تنصيب هذا التطبيق", + "app_manifest_install_ask_is_public": "هل يجب أن يكون هذا التطبيق ظاهرًا للزوار المجهولين؟" +} From 98fe846886f0dd7c0c8d3973aeab6472efda1e99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= Date: Thu, 2 Feb 2023 14:44:47 +0000 Subject: [PATCH 09/19] Translated using Weblate (French) Currently translated at 100.0% (753 of 753 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/fr/ --- locales/fr.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/locales/fr.json b/locales/fr.json index 70d7a2683..e8302fb82 100644 --- a/locales/fr.json +++ b/locales/fr.json @@ -652,7 +652,7 @@ "tools_upgrade_failed": "Impossible de mettre à jour les paquets : {packages_list}", "migration_0023_not_enough_space": "Prévoyez suffisamment d'espace disponible dans {path} pour exécuter la migration.", "migration_0023_postgresql_11_not_installed": "PostgreSQL n'a pas été installé sur votre système. Il n'y a rien à faire.", - "global_settings_setting_backup_compress_tar_archives_help": "Lors de la création de nouvelles sauvegardes, compresser automatiquement les archives (.tar.gz) au lieu des archives non compressées (.tar). N.B. : activer cette option permet de créer des archives plus légères, mais la procédure de sauvegarde initiale sera significativement plus longues et plus gourmandes en CPU.", + "global_settings_setting_backup_compress_tar_archives_help": "Lors de la création de nouvelles sauvegardes, compresser automatiquement les archives (.tar.gz) au lieu des archives non compressées (.tar).\nN.B. : activer cette option permet de créer des archives plus légères, mais la procédure de sauvegarde initiale sera significativement plus longues et plus gourmandes en CPU.", "global_settings_setting_security_experimental_enabled": "Fonctionnalités de sécurité expérimentales", "global_settings_setting_security_experimental_enabled_help": "Activer les fonctionnalités de sécurité expérimentales (ne l'activez pas si vous ne savez pas ce que vous faites !)", "global_settings_setting_nginx_compatibility_help": "Compromis 'compatibilité versus sécurité' pour le serveur web NGINX. Affecte les cryptogrammes utilisés (et d'autres aspects liés à la sécurité)", @@ -752,4 +752,4 @@ "global_settings_setting_dns_exposure": "Suites d'IP à prendre en compte pour la configuration et le diagnostic du DNS", "global_settings_setting_dns_exposure_help": "NB : Ceci n'affecte que la configuration DNS recommandée et les vérifications de diagnostic. Cela n'affecte pas les configurations du système.", "diagnosis_ip_no_ipv6_tip_important": "IPv6 devrait généralement être configuré automatiquement par le système ou par votre fournisseur d'accès à internet (FAI) s'il est disponible. Sinon, vous devrez peut-être configurer quelques éléments manuellement, comme expliqué dans la documentation ici : https://yunohost.org/#/ipv6." -} \ No newline at end of file +} From dd49ed2154f39f78fa11cf7ccced8eccd9ac0d63 Mon Sep 17 00:00:00 2001 From: Eryk Michalak Date: Thu, 2 Feb 2023 16:59:22 +0000 Subject: [PATCH 10/19] Translated using Weblate (Polish) Currently translated at 9.1% (69 of 753 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/pl/ --- locales/pl.json | 66 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 64 insertions(+), 2 deletions(-) diff --git a/locales/pl.json b/locales/pl.json index 6734e6558..c73de7314 100644 --- a/locales/pl.json +++ b/locales/pl.json @@ -5,5 +5,67 @@ "already_up_to_date": "Nic do zrobienia. Wszystko jest obecnie aktualne.", "admin_password": "Hasło administratora", "action_invalid": "Nieprawidłowe działanie '{action:s}'", - "aborting": "Przerywanie." -} \ No newline at end of file + "aborting": "Przerywanie.", + "domain_config_auth_consumer_key": "Klucz konsumenta", + "domain_config_cert_validity": "Ważność", + "visitors": "Odwiedzający", + "app_start_install": "Instalowanie {app}...", + "app_unknown": "Nieznana aplikacja", + "ask_main_domain": "Domena główna", + "backup_created": "Utworzono kopię zapasową", + "firewall_reloaded": "Przeładowano zaporę sieciową", + "user_created": "Utworzono użytkownika", + "yunohost_installing": "Instalowanie YunoHost...", + "global_settings_setting_smtp_allow_ipv6": "Zezwól na IPv6", + "user_deleted": "Usunięto użytkownika", + "domain_config_default_app": "Domyślna aplikacja", + "restore_complete": "Przywracanie zakończone", + "domain_deleted": "Usunięto domenę", + "domains_available": "Dostępne domeny:", + "domain_config_api_protocol": "API protokołu", + "domain_config_auth_application_key": "Klucz aplikacji", + "diagnosis_description_systemresources": "Zasoby systemu", + "log_user_import": "Importuj użytkowników", + "system_upgraded": "Zaktualizowano system", + "diagnosis_description_regenconf": "Konfiguracja systemu", + "diagnosis_description_apps": "Aplikacje", + "diagnosis_description_basesystem": "Podstawowy system", + "unlimit": "Brak limitu", + "global_settings_setting_pop3_enabled": "Włącz POP3", + "domain_created": "Utworzono domenę", + "ask_new_admin_password": "Nowe hasło administracyjne", + "ask_new_domain": "Nowa domena", + "ask_new_path": "Nowa ścieżka", + "downloading": "Pobieranie...", + "ask_password": "Hasło", + "backup_deleted": "Usunięto kopię zapasową", + "done": "Gotowe", + "diagnosis_description_dnsrecords": "Rekordy DNS", + "diagnosis_description_ip": "Połączenie z internetem", + "diagnosis_description_mail": "Email", + "diagnosis_mail_ehlo_could_not_diagnose_details": "Błąd: {error}", + "diagnosis_mail_queue_unavailable_details": "Błąd: {error}", + "diagnosis_http_could_not_diagnose_details": "Błąd: {error}", + "installation_complete": "Instalacja zakończona", + "app_start_remove": "Usuwanie {app}...", + "app_start_restore": "Przywracanie {app}...", + "app_upgraded": "Zaktualizowano {app}", + "extracting": "Rozpakowywanie...", + "app_removed": "Odinstalowano {app}", + "upgrade_complete": "Aktualizacja zakończona", + "global_settings_setting_backup_compress_tar_archives": "Kompresuj kopie zapasowe", + "global_settings_setting_nginx_compatibility": "Kompatybilność z NGINX", + "global_settings_setting_nginx_redirect_to_https": "Wymuszaj HTTPS", + "ask_admin_username": "Nazwa użytkownika administratora", + "ask_fullname": "Pełne imię i nazwisko", + "upgrading_packages": "Aktualizowanie paczek...", + "admins": "Administratorzy", + "diagnosis_ports_could_not_diagnose_details": "Błąd: {error}", + "log_settings_set": "Zastosuj ustawienia", + "domain_config_cert_issuer": "Organ certyfikacji", + "domain_config_cert_summary": "Status certyfikatu", + "global_settings_setting_ssh_compatibility": "Kompatybilność z SSH", + "global_settings_setting_ssh_port": "Port SSH", + "log_settings_reset": "Resetuj ustawienia", + "log_tools_migrations_migrate_forward": "Uruchom migracje" +} From d32fd89aeaae96ab9adf1c446a6c9d339047bf71 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 2 Feb 2023 23:38:55 +0100 Subject: [PATCH 11/19] Update changelog for 11.1.5.1 --- debian/changelog | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/debian/changelog b/debian/changelog index 0d13b3c92..c6dc7c92d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,18 @@ +yunohost (11.1.5.1) stable; urgency=low + + - debian: Bump moulinette/ssowat requirement to 11.1 (0826a541) + - helpers: Fixes $app unbound when running ynh_secure_remove ([#1582](https://github.com/yunohost/yunohost/pull/1582)) + - log/appv2: don't dump all settings in log metadata (a9ac55e4) + - appv2: resource upgrade will tweak settings, we have to re-update the env_dict after upgrading resources (3110460a) + - appv2: safety-backup-before-upgrade should only contain the app (1c95bcff) + - appv2: fix env not including vars for v1->v2 upgrade (2b2d49a5) + - backup: add name of the backup in create/delete message, otherwise that creates some spooky messages with 'Backup created' directly followed by 'Backup deleted' during safety-backup-before-upgrade in v2 apps (8090acb1) + - [i18n] Translations updated for Arabic, French, Galician, Polish + + Thanks to all contributors <3 ! (ButterflyOfFire, Éric Gaspar, Eryk Michalak, Florent, José M, ppr) + + -- Alexandre Aubin Thu, 02 Feb 2023 23:37:46 +0100 + yunohost (11.1.5) stable; urgency=low - Release as stable ! From ca3fb8528652acbcfe5ec43f134768e0011870b7 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 2 Feb 2023 22:43:47 +0000 Subject: [PATCH 12/19] [CI] Format code with Black --- src/app.py | 16 +++++++++++++--- src/log.py | 4 +++- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/app.py b/src/app.py index e0e08a215..b8bed3c47 100644 --- a/src/app.py +++ b/src/app.py @@ -647,7 +647,9 @@ def app_upgrade(app=[], url=None, file=None, force=False, no_safety_backup=False safety_backup_name = f"{app_instance_name}-pre-upgrade2" other_safety_backup_name = f"{app_instance_name}-pre-upgrade1" - backup_create(name=safety_backup_name, apps=[app_instance_name], system=None) + backup_create( + name=safety_backup_name, apps=[app_instance_name], system=None + ) if safety_backup_name in backup_list()["archives"]: # if the backup suceeded, delete old safety backup to save space @@ -708,7 +710,10 @@ def app_upgrade(app=[], url=None, file=None, force=False, no_safety_backup=False # so we need to reflect this in the env_dict used to call the actual upgrade script x_x # Or: the old manifest may be in v1 and the new in v2, so force to add the setting in env env_dict = _make_environment_for_app_script( - app_instance_name, workdir=extracted_app_folder, action="upgrade", include_app_settings=True, + app_instance_name, + workdir=extracted_app_folder, + action="upgrade", + include_app_settings=True, ) env_dict.update(env_dict_more) @@ -2732,7 +2737,12 @@ def _assert_no_conflicting_apps(domain, path, ignore_app=None, full_domain=False def _make_environment_for_app_script( - app, args={}, args_prefix="APP_ARG_", workdir=None, action=None, include_app_settings=False, + app, + args={}, + args_prefix="APP_ARG_", + workdir=None, + action=None, + include_app_settings=False, ): app_setting_path = os.path.join(APPS_SETTING_PATH, app) diff --git a/src/log.py b/src/log.py index dc4ba3dbf..cc344a936 100644 --- a/src/log.py +++ b/src/log.py @@ -601,7 +601,9 @@ class OperationLogger: # all settings are included in the env but we probably don't want to dump all of these # which may contain various secret/private data ... if "env" in metadata: - metadata["env"] = {k: v for k, v in metadata["env"].items() if k == k.upper()} + metadata["env"] = { + k: v for k, v in metadata["env"].items() if k == k.upper() + } dump = yaml.safe_dump(self.metadata, default_flow_style=False) for data in self.data_to_redact: From f2e01e7a4a650f8faa6b08559b8e170c09fafee6 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 2 Feb 2023 23:50:09 +0100 Subject: [PATCH 13/19] ci: tweak rules for Black and translation fixes because that's really too much flood x_x --- .gitlab/ci/lint.gitlab-ci.yml | 3 +-- .gitlab/ci/translation.gitlab-ci.yml | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.gitlab/ci/lint.gitlab-ci.yml b/.gitlab/ci/lint.gitlab-ci.yml index 2c2bdcc1d..69e87b6ca 100644 --- a/.gitlab/ci/lint.gitlab-ci.yml +++ b/.gitlab/ci/lint.gitlab-ci.yml @@ -44,5 +44,4 @@ black: - git push -f origin "ci-format-${CI_COMMIT_REF_NAME}":"ci-format-${CI_COMMIT_REF_NAME}" - hub pull-request -m "[CI] Format code with Black" -b Yunohost:$CI_COMMIT_REF_NAME -p || true # GITHUB_USER and GITHUB_TOKEN registered here https://gitlab.com/yunohost/yunohost/-/settings/ci_cd only: - variables: - - $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH + - tags diff --git a/.gitlab/ci/translation.gitlab-ci.yml b/.gitlab/ci/translation.gitlab-ci.yml index b6c683f57..83db2b5a4 100644 --- a/.gitlab/ci/translation.gitlab-ci.yml +++ b/.gitlab/ci/translation.gitlab-ci.yml @@ -26,7 +26,7 @@ autofix-translated-strings: - git checkout -b "ci-autofix-translated-strings-${CI_COMMIT_REF_NAME}" --no-track - python3 maintenance/missing_i18n_keys.py --fix - python3 maintenance/autofix_locale_format.py - - '[ $(git diff | wc -l) != 0 ] || exit 0' # stop if there is nothing to commit + - '[ $(git diff --ignore-blank-lines --ignore-all-space --ignore-space-at-eol --ignore-cr-at-eol | wc -l) != 0 ] || exit 0' # stop if there is nothing to commit - git commit -am "[CI] Reformat / remove stale translated strings" || true - git push -f origin "ci-autofix-translated-strings-${CI_COMMIT_REF_NAME}":"ci-remove-stale-translated-strings-${CI_COMMIT_REF_NAME}" - hub pull-request -m "[CI] Reformat / remove stale translated strings" -b Yunohost:$CI_COMMIT_REF_NAME -p || true # GITHUB_USER and GITHUB_TOKEN registered here https://gitlab.com/yunohost/yunohost/-/settings/ci_cd From ba4f192557fe7e0c41158104ae1cc5a3d429f396 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 2 Feb 2023 23:51:04 +0100 Subject: [PATCH 14/19] maintenance: new year, update copyright header --- src/__init__.py | 2 +- src/app.py | 2 +- src/app_catalog.py | 2 +- src/authenticators/ldap_admin.py | 2 +- src/backup.py | 2 +- src/certificate.py | 2 +- src/diagnosers/00-basesystem.py | 2 +- src/diagnosers/10-ip.py | 2 +- src/diagnosers/12-dnsrecords.py | 2 +- src/diagnosers/14-ports.py | 2 +- src/diagnosers/21-web.py | 2 +- src/diagnosers/24-mail.py | 2 +- src/diagnosers/30-services.py | 2 +- src/diagnosers/50-systemresources.py | 2 +- src/diagnosers/70-regenconf.py | 2 +- src/diagnosers/80-apps.py | 2 +- src/diagnosers/__init__.py | 2 +- src/diagnosis.py | 2 +- src/dns.py | 2 +- src/domain.py | 2 +- src/dyndns.py | 2 +- src/firewall.py | 2 +- src/hook.py | 2 +- src/log.py | 2 +- src/permission.py | 2 +- src/regenconf.py | 2 +- src/service.py | 2 +- src/settings.py | 2 +- src/ssh.py | 2 +- src/tools.py | 2 +- src/user.py | 2 +- src/utils/__init__.py | 2 +- src/utils/config.py | 2 +- src/utils/dns.py | 2 +- src/utils/error.py | 2 +- src/utils/i18n.py | 2 +- src/utils/ldap.py | 2 +- src/utils/legacy.py | 2 +- src/utils/network.py | 2 +- src/utils/password.py | 2 +- src/utils/resources.py | 2 +- src/utils/system.py | 2 +- src/utils/yunopaste.py | 2 +- 43 files changed, 43 insertions(+), 43 deletions(-) diff --git a/src/__init__.py b/src/__init__.py index 4d4026fdf..d13d61089 100644 --- a/src/__init__.py +++ b/src/__init__.py @@ -1,6 +1,6 @@ #! /usr/bin/python # -# Copyright (c) 2022 YunoHost Contributors +# Copyright (c) 2023 YunoHost Contributors # # This file is part of YunoHost (see https://yunohost.org) # diff --git a/src/app.py b/src/app.py index b8bed3c47..6d754ab25 100644 --- a/src/app.py +++ b/src/app.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 YunoHost Contributors +# Copyright (c) 2023 YunoHost Contributors # # This file is part of YunoHost (see https://yunohost.org) # diff --git a/src/app_catalog.py b/src/app_catalog.py index 59d2ebdc1..9fb662845 100644 --- a/src/app_catalog.py +++ b/src/app_catalog.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 YunoHost Contributors +# Copyright (c) 2023 YunoHost Contributors # # This file is part of YunoHost (see https://yunohost.org) # diff --git a/src/authenticators/ldap_admin.py b/src/authenticators/ldap_admin.py index 8637b3833..b1b550bc0 100644 --- a/src/authenticators/ldap_admin.py +++ b/src/authenticators/ldap_admin.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 YunoHost Contributors +# Copyright (c) 2023 YunoHost Contributors # # This file is part of YunoHost (see https://yunohost.org) # diff --git a/src/backup.py b/src/backup.py index bb4f8af0e..0727ad295 100644 --- a/src/backup.py +++ b/src/backup.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 YunoHost Contributors +# Copyright (c) 2023 YunoHost Contributors # # This file is part of YunoHost (see https://yunohost.org) # diff --git a/src/certificate.py b/src/certificate.py index a0eba212a..52e0d8c1b 100644 --- a/src/certificate.py +++ b/src/certificate.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 YunoHost Contributors +# Copyright (c) 2023 YunoHost Contributors # # This file is part of YunoHost (see https://yunohost.org) # diff --git a/src/diagnosers/00-basesystem.py b/src/diagnosers/00-basesystem.py index 8be334406..336271bd1 100644 --- a/src/diagnosers/00-basesystem.py +++ b/src/diagnosers/00-basesystem.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 YunoHost Contributors +# Copyright (c) 2023 YunoHost Contributors # # This file is part of YunoHost (see https://yunohost.org) # diff --git a/src/diagnosers/10-ip.py b/src/diagnosers/10-ip.py index ea68fc7bb..4f9cd9708 100644 --- a/src/diagnosers/10-ip.py +++ b/src/diagnosers/10-ip.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 YunoHost Contributors +# Copyright (c) 2023 YunoHost Contributors # # This file is part of YunoHost (see https://yunohost.org) # diff --git a/src/diagnosers/12-dnsrecords.py b/src/diagnosers/12-dnsrecords.py index 58bd04d39..2d46f979c 100644 --- a/src/diagnosers/12-dnsrecords.py +++ b/src/diagnosers/12-dnsrecords.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 YunoHost Contributors +# Copyright (c) 2023 YunoHost Contributors # # This file is part of YunoHost (see https://yunohost.org) # diff --git a/src/diagnosers/14-ports.py b/src/diagnosers/14-ports.py index 12f2481f7..34c512f14 100644 --- a/src/diagnosers/14-ports.py +++ b/src/diagnosers/14-ports.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 YunoHost Contributors +# Copyright (c) 2023 YunoHost Contributors # # This file is part of YunoHost (see https://yunohost.org) # diff --git a/src/diagnosers/21-web.py b/src/diagnosers/21-web.py index a12a83f94..2050cd658 100644 --- a/src/diagnosers/21-web.py +++ b/src/diagnosers/21-web.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 YunoHost Contributors +# Copyright (c) 2023 YunoHost Contributors # # This file is part of YunoHost (see https://yunohost.org) # diff --git a/src/diagnosers/24-mail.py b/src/diagnosers/24-mail.py index 9a4cd1fc3..857de687d 100644 --- a/src/diagnosers/24-mail.py +++ b/src/diagnosers/24-mail.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 YunoHost Contributors +# Copyright (c) 2023 YunoHost Contributors # # This file is part of YunoHost (see https://yunohost.org) # diff --git a/src/diagnosers/30-services.py b/src/diagnosers/30-services.py index 44bbf1745..42ea9d18f 100644 --- a/src/diagnosers/30-services.py +++ b/src/diagnosers/30-services.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 YunoHost Contributors +# Copyright (c) 2023 YunoHost Contributors # # This file is part of YunoHost (see https://yunohost.org) # diff --git a/src/diagnosers/50-systemresources.py b/src/diagnosers/50-systemresources.py index 10a153c61..096c3483f 100644 --- a/src/diagnosers/50-systemresources.py +++ b/src/diagnosers/50-systemresources.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 YunoHost Contributors +# Copyright (c) 2023 YunoHost Contributors # # This file is part of YunoHost (see https://yunohost.org) # diff --git a/src/diagnosers/70-regenconf.py b/src/diagnosers/70-regenconf.py index 7d11b9174..65195aac5 100644 --- a/src/diagnosers/70-regenconf.py +++ b/src/diagnosers/70-regenconf.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 YunoHost Contributors +# Copyright (c) 2023 YunoHost Contributors # # This file is part of YunoHost (see https://yunohost.org) # diff --git a/src/diagnosers/80-apps.py b/src/diagnosers/80-apps.py index ae89f26d3..44ce86bcc 100644 --- a/src/diagnosers/80-apps.py +++ b/src/diagnosers/80-apps.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 YunoHost Contributors +# Copyright (c) 2023 YunoHost Contributors # # This file is part of YunoHost (see https://yunohost.org) # diff --git a/src/diagnosers/__init__.py b/src/diagnosers/__init__.py index 5cad500fa..7c1e7b0cd 100644 --- a/src/diagnosers/__init__.py +++ b/src/diagnosers/__init__.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 YunoHost Contributors +# Copyright (c) 2023 YunoHost Contributors # # This file is part of YunoHost (see https://yunohost.org) # diff --git a/src/diagnosis.py b/src/diagnosis.py index 6b9f8fa92..02047c001 100644 --- a/src/diagnosis.py +++ b/src/diagnosis.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 YunoHost Contributors +# Copyright (c) 2023 YunoHost Contributors # # This file is part of YunoHost (see https://yunohost.org) # diff --git a/src/dns.py b/src/dns.py index e697e6324..d4c9b1380 100644 --- a/src/dns.py +++ b/src/dns.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 YunoHost Contributors +# Copyright (c) 2023 YunoHost Contributors # # This file is part of YunoHost (see https://yunohost.org) # diff --git a/src/domain.py b/src/domain.py index 5728c6884..e83b5e3e8 100644 --- a/src/domain.py +++ b/src/domain.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 YunoHost Contributors +# Copyright (c) 2023 YunoHost Contributors # # This file is part of YunoHost (see https://yunohost.org) # diff --git a/src/dyndns.py b/src/dyndns.py index 9cba360ab..2594abe8f 100644 --- a/src/dyndns.py +++ b/src/dyndns.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 YunoHost Contributors +# Copyright (c) 2023 YunoHost Contributors # # This file is part of YunoHost (see https://yunohost.org) # diff --git a/src/firewall.py b/src/firewall.py index f4d7f77fe..073e48c88 100644 --- a/src/firewall.py +++ b/src/firewall.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 YunoHost Contributors +# Copyright (c) 2023 YunoHost Contributors # # This file is part of YunoHost (see https://yunohost.org) # diff --git a/src/hook.py b/src/hook.py index eb5a7c035..42d9d3eac 100644 --- a/src/hook.py +++ b/src/hook.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 YunoHost Contributors +# Copyright (c) 2023 YunoHost Contributors # # This file is part of YunoHost (see https://yunohost.org) # diff --git a/src/log.py b/src/log.py index cc344a936..e7ea18857 100644 --- a/src/log.py +++ b/src/log.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 YunoHost Contributors +# Copyright (c) 2023 YunoHost Contributors # # This file is part of YunoHost (see https://yunohost.org) # diff --git a/src/permission.py b/src/permission.py index 7f5a65f2e..c7446b7ad 100644 --- a/src/permission.py +++ b/src/permission.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 YunoHost Contributors +# Copyright (c) 2023 YunoHost Contributors # # This file is part of YunoHost (see https://yunohost.org) # diff --git a/src/regenconf.py b/src/regenconf.py index 7acc6f58f..69bedb262 100644 --- a/src/regenconf.py +++ b/src/regenconf.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 YunoHost Contributors +# Copyright (c) 2023 YunoHost Contributors # # This file is part of YunoHost (see https://yunohost.org) # diff --git a/src/service.py b/src/service.py index 935e87339..a3bcc5561 100644 --- a/src/service.py +++ b/src/service.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 YunoHost Contributors +# Copyright (c) 2023 YunoHost Contributors # # This file is part of YunoHost (see https://yunohost.org) # diff --git a/src/settings.py b/src/settings.py index a06377176..fbe4db7d0 100644 --- a/src/settings.py +++ b/src/settings.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 YunoHost Contributors +# Copyright (c) 2023 YunoHost Contributors # # This file is part of YunoHost (see https://yunohost.org) # diff --git a/src/ssh.py b/src/ssh.py index d5951cba5..2ae5ffe46 100644 --- a/src/ssh.py +++ b/src/ssh.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 YunoHost Contributors +# Copyright (c) 2023 YunoHost Contributors # # This file is part of YunoHost (see https://yunohost.org) # diff --git a/src/tools.py b/src/tools.py index 777d8fc8f..dee4c8486 100644 --- a/src/tools.py +++ b/src/tools.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 YunoHost Contributors +# Copyright (c) 2023 YunoHost Contributors # # This file is part of YunoHost (see https://yunohost.org) # diff --git a/src/user.py b/src/user.py index 797c3252f..12f13f75c 100644 --- a/src/user.py +++ b/src/user.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 YunoHost Contributors +# Copyright (c) 2023 YunoHost Contributors # # This file is part of YunoHost (see https://yunohost.org) # diff --git a/src/utils/__init__.py b/src/utils/__init__.py index 5cad500fa..7c1e7b0cd 100644 --- a/src/utils/__init__.py +++ b/src/utils/__init__.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 YunoHost Contributors +# Copyright (c) 2023 YunoHost Contributors # # This file is part of YunoHost (see https://yunohost.org) # diff --git a/src/utils/config.py b/src/utils/config.py index 5dce4070d..534cddcb3 100644 --- a/src/utils/config.py +++ b/src/utils/config.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 YunoHost Contributors +# Copyright (c) 2023 YunoHost Contributors # # This file is part of YunoHost (see https://yunohost.org) # diff --git a/src/utils/dns.py b/src/utils/dns.py index 225a0e98f..b3ca4b564 100644 --- a/src/utils/dns.py +++ b/src/utils/dns.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 YunoHost Contributors +# Copyright (c) 2023 YunoHost Contributors # # This file is part of YunoHost (see https://yunohost.org) # diff --git a/src/utils/error.py b/src/utils/error.py index cdf2a3d09..9be48c5df 100644 --- a/src/utils/error.py +++ b/src/utils/error.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 YunoHost Contributors +# Copyright (c) 2023 YunoHost Contributors # # This file is part of YunoHost (see https://yunohost.org) # diff --git a/src/utils/i18n.py b/src/utils/i18n.py index ecbfe36e8..2aafafbdd 100644 --- a/src/utils/i18n.py +++ b/src/utils/i18n.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 YunoHost Contributors +# Copyright (c) 2023 YunoHost Contributors # # This file is part of YunoHost (see https://yunohost.org) # diff --git a/src/utils/ldap.py b/src/utils/ldap.py index 5a0e3ba35..6b41cdb22 100644 --- a/src/utils/ldap.py +++ b/src/utils/ldap.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 YunoHost Contributors +# Copyright (c) 2023 YunoHost Contributors # # This file is part of YunoHost (see https://yunohost.org) # diff --git a/src/utils/legacy.py b/src/utils/legacy.py index fa0b68137..82507d64d 100644 --- a/src/utils/legacy.py +++ b/src/utils/legacy.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 YunoHost Contributors +# Copyright (c) 2023 YunoHost Contributors # # This file is part of YunoHost (see https://yunohost.org) # diff --git a/src/utils/network.py b/src/utils/network.py index e9892333e..2a13f966e 100644 --- a/src/utils/network.py +++ b/src/utils/network.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 YunoHost Contributors +# Copyright (c) 2023 YunoHost Contributors # # This file is part of YunoHost (see https://yunohost.org) # diff --git a/src/utils/password.py b/src/utils/password.py index 569833a7d..833933d33 100644 --- a/src/utils/password.py +++ b/src/utils/password.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 YunoHost Contributors +# Copyright (c) 2023 YunoHost Contributors # # This file is part of YunoHost (see https://yunohost.org) # diff --git a/src/utils/resources.py b/src/utils/resources.py index 569512006..96e1b349d 100644 --- a/src/utils/resources.py +++ b/src/utils/resources.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 YunoHost Contributors +# Copyright (c) 2023 YunoHost Contributors # # This file is part of YunoHost (see https://yunohost.org) # diff --git a/src/utils/system.py b/src/utils/system.py index c55023e52..2538f74fb 100644 --- a/src/utils/system.py +++ b/src/utils/system.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 YunoHost Contributors +# Copyright (c) 2023 YunoHost Contributors # # This file is part of YunoHost (see https://yunohost.org) # diff --git a/src/utils/yunopaste.py b/src/utils/yunopaste.py index 806f8a34f..46131846d 100644 --- a/src/utils/yunopaste.py +++ b/src/utils/yunopaste.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 YunoHost Contributors +# Copyright (c) 2023 YunoHost Contributors # # This file is part of YunoHost (see https://yunohost.org) # From 9b7668dab0b446a5b37d5d059106ec91f9a9b69f Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 2 Feb 2023 23:57:24 +0100 Subject: [PATCH 15/19] helpers: fix remaining __FINALPATH__ in php template (note that this is backward compatible because ynh_add_config will replace __INSTALL_DIR__ by $finalpath if $finalpath exists... --- helpers/php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpers/php b/helpers/php index 6119c4870..0149bc243 100644 --- a/helpers/php +++ b/helpers/php @@ -156,7 +156,7 @@ ynh_add_fpm_config() { user = __APP__ group = __APP__ -chdir = __FINALPATH__ +chdir = __INSTALL_DIR__ listen = /var/run/php/php__PHPVERSION__-fpm-__APP__.sock listen.owner = www-data From 3f2dbe87543968d55a29db293f197a11228da0a1 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 2 Feb 2023 23:59:08 +0100 Subject: [PATCH 16/19] Update changelog for 11.1.5.2 --- debian/changelog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index c6dc7c92d..4cc1b745f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +yunohost (11.1.5.2) testing; urgency=low + + - maintenance: new year, update copyright header (ba4f1925) + - helpers: fix remaining __FINALPATH__ in php template (note that this is backward compatible because ynh_add_config will replace __INSTALL_DIR__ by $finalpath if $finalpath exists... (9b7668da) + + -- Alexandre Aubin Thu, 02 Feb 2023 23:58:29 +0100 + yunohost (11.1.5.1) stable; urgency=low - debian: Bump moulinette/ssowat requirement to 11.1 (0826a541) From 13d4e16e7de7deab1d4a9e606f5b4ea7b8ebbc0b Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Fri, 3 Feb 2023 02:25:36 +0100 Subject: [PATCH 17/19] helpers/appsv2: replacement of __PHPVERSION__ should use the phpversion setting, not YNH_PHP_VERSION --- helpers/utils | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/helpers/utils b/helpers/utils index cd3b1b8d2..a0efa2c45 100644 --- a/helpers/utils +++ b/helpers/utils @@ -348,7 +348,7 @@ ynh_local_curl() { # __NAMETOCHANGE__ by $app # __USER__ by $app # __FINALPATH__ by $final_path -# __PHPVERSION__ by $YNH_PHP_VERSION +# __PHPVERSION__ by $YNH_PHP_VERSION (packaging v1 only, packaging v2 uses phpversion setting implicitly set by apt resource) # __YNH_NODE_LOAD_PATH__ by $ynh_node_load_PATH # ``` # And any dynamic variables that should be defined before calling this helper like: @@ -417,7 +417,7 @@ ynh_add_config() { # __NAMETOCHANGE__ by $app # __USER__ by $app # __FINALPATH__ by $final_path -# __PHPVERSION__ by $YNH_PHP_VERSION +# __PHPVERSION__ by $YNH_PHP_VERSION (packaging v1 only, packaging v2 uses phpversion setting implicitly set by apt resource) # __YNH_NODE_LOAD_PATH__ by $ynh_node_load_PATH # # And any dynamic variables that should be defined before calling this helper like: @@ -452,7 +452,8 @@ ynh_replace_vars() { ynh_replace_string --match_string="__FINALPATH__" --replace_string="$final_path" --target_file="$file" ynh_replace_string --match_string="__INSTALL_DIR__" --replace_string="$final_path" --target_file="$file" fi - if test -n "${YNH_PHP_VERSION:-}"; then + # Legacy / Packaging v1 only + if dpkg --compare-versions ${YNH_APP_PACKAGING_FORMAT:-0} lt 2 && test -n "${YNH_PHP_VERSION:-}"; then ynh_replace_string --match_string="__PHPVERSION__" --replace_string="$YNH_PHP_VERSION" --target_file="$file" fi if test -n "${ynh_node_load_PATH:-}"; then From 2107a84852b0c5be2c64d1095c7928a33674e693 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Fri, 3 Feb 2023 02:41:28 +0100 Subject: [PATCH 18/19] appv2 resources: document the fact that the apt resource may create a phpversion setting when the dependencies contain php packages --- src/utils/resources.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/utils/resources.py b/src/utils/resources.py index 96e1b349d..65c8ee8cd 100644 --- a/src/utils/resources.py +++ b/src/utils/resources.py @@ -703,6 +703,7 @@ class AptDependenciesAppResource(AppResource): ##### Provision/Update: - The code literally calls the bash helpers `ynh_install_app_dependencies` and `ynh_install_extra_app_dependencies`, similar to what happens in v1. + - Note that when `packages` contains some phpX.Y-foobar dependencies, this will automagically define a `phpversion` setting equal to `X.Y` which can therefore be used in app scripts ($phpversion) or templates (`__PHPVERSION__`) ##### Deprovision: - The code literally calls the bash helper `ynh_remove_app_dependencies` From c255fe24955e00c2041d93766624c06b39c5b984 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Fri, 3 Feb 2023 03:05:40 +0100 Subject: [PATCH 19/19] Update changelog for 11.1.5.3 --- debian/changelog | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 4cc1b745f..db74b6d6a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,11 @@ -yunohost (11.1.5.2) testing; urgency=low +yunohost (11.1.5.3) stable; urgency=low + + - helpers/appsv2: replacement of __PHPVERSION__ should use the phpversion setting, not YNH_PHP_VERSION (13d4e16e) + - appv2 resources: document the fact that the apt resource may create a phpversion setting when the dependencies contain php packages (2107a848) + + -- Alexandre Aubin Fri, 03 Feb 2023 03:05:11 +0100 + +yunohost (11.1.5.2) stable; urgency=low - maintenance: new year, update copyright header (ba4f1925) - helpers: fix remaining __FINALPATH__ in php template (note that this is backward compatible because ynh_add_config will replace __INSTALL_DIR__ by $finalpath if $finalpath exists... (9b7668da)