From ad6d31ce81183b855906df0756aa25974d4ffaf8 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 2 Feb 2021 03:09:40 +0100 Subject: [PATCH 001/146] Bullseye: Misc updates in control file --- debian/control | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/debian/control b/debian/control index ef5061fe7..63853b161 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: yunohost Section: utils Priority: extra Maintainer: YunoHost Contributors -Build-Depends: debhelper (>=9), dh-systemd, dh-python, python3-all (>= 3.7), python3-yaml, python3-jinja2 +Build-Depends: debhelper (>=9), dh-python, python3-all (>= 3.7), python3-yaml, python3-jinja2 Standards-Version: 3.9.6 Homepage: https://yunohost.org/ @@ -13,10 +13,10 @@ Depends: ${python3:Depends}, ${misc:Depends} , moulinette (>= 4.2), ssowat (>= 4.0) , python3-psutil, python3-requests, python3-dnspython, python3-openssl , python3-miniupnpc, python3-dbus, python3-jinja2 - , python3-toml, python3-packaging, python3-publicsuffix + , python3-toml, python3-packaging, python3-publicsuffix2 , apt, apt-transport-https, apt-utils, dirmngr - , php7.3-common, php7.3-fpm, php7.3-ldap, php7.3-intl - , mariadb-server, php7.3-mysql + , php7.4-common, php7.4-fpm, php7.4-ldap, php7.4-intl + , mariadb-server, php7.4-mysql , openssh-server, iptables, fail2ban, dnsutils, bind9utils , openssl, ca-certificates, netcat-openbsd, iproute2 , slapd, ldap-utils, sudo-ldap, libnss-ldapd, unscd, libpam-ldapd @@ -25,28 +25,27 @@ Depends: ${python3:Depends}, ${misc:Depends} , dovecot-core, dovecot-ldap, dovecot-lmtpd, dovecot-managesieved, dovecot-antispam , rspamd, opendkim-tools, postsrsd, procmail, mailutils , redis-server - , metronome (>=3.14.0) , acl , git, curl, wget, cron, unzip, jq, bc, at , lsb-release, haveged, fake-hwclock, equivs, lsof, whois Recommends: yunohost-admin , ntp, inetutils-ping | iputils-ping , bash-completion, rsyslog - , php7.3-gd, php7.3-curl, php-gettext + , php7.4-gd, php7.4-curl, php-gettext , python3-pip , unattended-upgrades , libdbd-ldap-perl, libnet-dns-perl -Suggests: htop, vim, rsync, acpi-support-base, udisks2 + , metronome (>=3.14.0) Conflicts: iptables-persistent , apache2 , bind9 - , nginx-extras (>= 1.16) - , openssl (>= 1.1.1g) - , slapd (>= 2.4.49) - , dovecot-core (>= 1:2.3.7) - , redis-server (>= 5:5.0.7) - , fail2ban (>= 0.11) - , iptables (>= 1.8.3) + , nginx-extras (>= 1.19) + , openssl (>= 1.1.1i-3) + , slapd (>= 2.4.58) + , dovecot-core (>= 1:2.3.14) + , redis-server (>= 5:6.0.10) + , fail2ban (>= 0.11.3) + , iptables (>= 1.8.8) Description: manageable and configured self-hosting server YunoHost aims to make self-hosting accessible to everyone. It configures an email, Web and IM server alongside a LDAP base. It also provides From 876ce488378d96dd4d146c24f133b5a1bbb5aecd Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Fri, 5 Feb 2021 00:05:00 +0100 Subject: [PATCH 002/146] Update changelog for 11.0 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 9a143f962..15af50303 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +yunohost (11.0.0~alpha) unstable; urgency=low + + - Placeholder for 11.0 + + -- Alexandre Aubin Fri, 05 Feb 2021 00:02:38 +0100 + yunohost (4.2.5.2) stable; urgency=low - Fix install in chroot ... *again* (806b7acf) From 726f4605d2a6f787a6d38cdbb63f4f810071afa1 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Fri, 5 Feb 2021 02:09:59 +0100 Subject: [PATCH 003/146] Bullseye: idk what i'm doing but let's try to bump compat to 13 --- debian/compat | 1 - debian/control | 2 +- debian/rules | 18 +++--------------- 3 files changed, 4 insertions(+), 17 deletions(-) delete mode 100644 debian/compat diff --git a/debian/compat b/debian/compat deleted file mode 100644 index ec635144f..000000000 --- a/debian/compat +++ /dev/null @@ -1 +0,0 @@ -9 diff --git a/debian/control b/debian/control index 63853b161..4216f400c 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: yunohost Section: utils Priority: extra Maintainer: YunoHost Contributors -Build-Depends: debhelper (>=9), dh-python, python3-all (>= 3.7), python3-yaml, python3-jinja2 +Build-Depends: debhelper (>=9), debhelper-compat (= 13), dh-python, python3-all (>= 3.7), python3-yaml, python3-jinja2 Standards-Version: 3.9.6 Homepage: https://yunohost.org/ diff --git a/debian/rules b/debian/rules index 3790c0ef2..341ba2b01 100755 --- a/debian/rules +++ b/debian/rules @@ -1,11 +1,8 @@ #!/usr/bin/make -f # -*- makefile -*- -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - %: - dh ${@} --with=python3,systemd + dh ${@} --with python3 override_dh_auto_build: # Generate bash completion file @@ -13,14 +10,5 @@ override_dh_auto_build: python3 doc/generate_manpages.py --gzip --output doc/yunohost.8.gz override_dh_installinit: - dh_installinit -pyunohost --name=yunohost-api --restart-after-upgrade - dh_installinit -pyunohost --name=yunohost-firewall --noscripts - -override_dh_systemd_enable: - dh_systemd_enable --name=yunohost-api \ - yunohost-api.service - dh_systemd_enable --name=yunohost-firewall --no-enable \ - yunohost-firewall.service - -#override_dh_systemd_start: -# dh_systemd_start --restart-after-upgrade yunohost-api.service + dh_installsystemd -pyunohost --name=yunohost-api --restart-after-upgrade + dh_installsystemd -pyunohost --name=yunohost-firewall --noscripts From 70174af9746d0f83b8d9396bc1b31c22bb93c28a Mon Sep 17 00:00:00 2001 From: Kayou Date: Mon, 8 Mar 2021 19:29:26 +0100 Subject: [PATCH 004/146] bump conflict --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index 4216f400c..08daecbbe 100644 --- a/debian/control +++ b/debian/control @@ -40,7 +40,7 @@ Conflicts: iptables-persistent , apache2 , bind9 , nginx-extras (>= 1.19) - , openssl (>= 1.1.1i-3) + , openssl (>= 1.1.1j-2) , slapd (>= 2.4.58) , dovecot-core (>= 1:2.3.14) , redis-server (>= 5:6.0.10) From ffea5e40486229204d4a143fef73b064da74300a Mon Sep 17 00:00:00 2001 From: Kayou Date: Tue, 9 Mar 2021 14:26:03 +0100 Subject: [PATCH 005/146] php-gettext -> php-php-gettext --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index 08daecbbe..e557c9ff6 100644 --- a/debian/control +++ b/debian/control @@ -31,7 +31,7 @@ Depends: ${python3:Depends}, ${misc:Depends} Recommends: yunohost-admin , ntp, inetutils-ping | iputils-ping , bash-completion, rsyslog - , php7.4-gd, php7.4-curl, php-gettext + , php7.4-gd, php7.4-curl, php-php-gettext , python3-pip , unattended-upgrades , libdbd-ldap-perl, libnet-dns-perl From 065966759072a11bd58580c49d5a348cf57e82c5 Mon Sep 17 00:00:00 2001 From: Kayou Date: Tue, 9 Mar 2021 14:48:54 +0100 Subject: [PATCH 006/146] Update the conflict version of redis-server --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index e557c9ff6..e78718d66 100644 --- a/debian/control +++ b/debian/control @@ -43,7 +43,7 @@ Conflicts: iptables-persistent , openssl (>= 1.1.1j-2) , slapd (>= 2.4.58) , dovecot-core (>= 1:2.3.14) - , redis-server (>= 5:6.0.10) + , redis-server (>= 5:6.0.12) , fail2ban (>= 0.11.3) , iptables (>= 1.8.8) Description: manageable and configured self-hosting server From 1f284d74c4b4960d196e3048954bba9ea0b79e39 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Tue, 9 Mar 2021 18:10:30 +0100 Subject: [PATCH 007/146] php 7.3 -> 7.4 --- data/helpers.d/php | 2 +- data/hooks/conf_regen/10-apt | 4 ++-- data/templates/yunohost/services.yml | 6 ++--- locales/ca.json | 2 +- locales/en.json | 2 +- locales/fr.json | 2 +- locales/it.json | 2 +- src/yunohost/app.py | 33 +++++++++++++++------------- src/yunohost/backup.py | 2 +- 9 files changed, 29 insertions(+), 26 deletions(-) diff --git a/data/helpers.d/php b/data/helpers.d/php index 40a023e9d..bf12cd4d6 100644 --- a/data/helpers.d/php +++ b/data/helpers.d/php @@ -1,6 +1,6 @@ #!/bin/bash -readonly YNH_DEFAULT_PHP_VERSION=7.3 +readonly YNH_DEFAULT_PHP_VERSION=7.4 # Declare the actual PHP version to use. # A packager willing to use another version of PHP can override the variable into its _common.sh. YNH_PHP_VERSION=${YNH_PHP_VERSION:-$YNH_DEFAULT_PHP_VERSION} diff --git a/data/hooks/conf_regen/10-apt b/data/hooks/conf_regen/10-apt index bb5caf67f..c7d1f0174 100755 --- a/data/hooks/conf_regen/10-apt +++ b/data/hooks/conf_regen/10-apt @@ -53,8 +53,8 @@ Pin-Priority: -1 do_post_regen() { regen_conf_files=$1 - # Make sure php7.3 is the default version when using php in cli - update-alternatives --set php /usr/bin/php7.3 + # Make sure php7.4 is the default version when using php in cli + update-alternatives --set php /usr/bin/php7.4 } FORCE=${2:-0} diff --git a/data/templates/yunohost/services.yml b/data/templates/yunohost/services.yml index 7df563c67..b6ce7c117 100644 --- a/data/templates/yunohost/services.yml +++ b/data/templates/yunohost/services.yml @@ -22,9 +22,9 @@ nginx: test_conf: nginx -t needs_exposed_ports: [80, 443] category: web -php7.3-fpm: - log: /var/log/php7.3-fpm.log - test_conf: php-fpm7.3 --test +php7.4-fpm: + log: /var/log/php7.4-fpm.log + test_conf: php-fpm7.4 --test category: web postfix: log: [/var/log/mail.log,/var/log/mail.err] diff --git a/locales/ca.json b/locales/ca.json index 189053d94..0f0b60426 100644 --- a/locales/ca.json +++ b/locales/ca.json @@ -572,7 +572,7 @@ "migration_description_0015_migrate_to_buster": "Actualitza els sistema a Debian Buster i YunoHost 4.x", "regenconf_need_to_explicitly_specify_ssh": "La configuració ssh ha estat modificada manualment, però heu d'especificar explícitament la categoria «ssh» amb --force per fer realment els canvis.", "migration_0015_weak_certs": "S'han trobat els següents certificats que encara utilitzen algoritmes de signatura febles i s'han d'actualitzar per a ser compatibles amb la propera versió de nginx: {certs}", - "service_description_php7.3-fpm": "Executa aplicacions escrites en PHP amb NGINX", + "service_description_php7.4-fpm": "Executa aplicacions escrites en PHP amb NGINX", "migration_0018_failed_to_reset_legacy_rules": "No s'ha pogut restaurar les regles legacy iptables: {error}", "migration_0018_failed_to_migrate_iptables_rules": "No s'ha pogut migrar les regles legacy iptables a nftables: {error}", "migration_0017_not_enough_space": "Feu suficient espai disponible en {path} per a realitzar la migració.", diff --git a/locales/en.json b/locales/en.json index 84a01dfaa..813688a87 100644 --- a/locales/en.json +++ b/locales/en.json @@ -562,7 +562,7 @@ "service_description_metronome": "Manage XMPP instant messaging accounts", "service_description_mysql": "Stores app data (SQL database)", "service_description_nginx": "Serves or provides access to all the websites hosted on your server", - "service_description_php7.3-fpm": "Runs apps written in PHP with NGINX", + "service_description_php7.4-fpm": "Runs apps written in PHP with NGINX", "service_description_postfix": "Used to send and receive e-mails", "service_description_redis-server": "A specialized database used for rapid data access, task queue, and communication between programs", "service_description_rspamd": "Filters spam, and other e-mail related features", diff --git a/locales/fr.json b/locales/fr.json index 715d82a35..130f91129 100644 --- a/locales/fr.json +++ b/locales/fr.json @@ -574,7 +574,7 @@ "migration_0015_weak_certs": "Il a été constaté que les certificats suivants utilisent encore des algorithmes de signature peu robustes et doivent être mis à jour pour être compatibles avec la prochaine version de NGINX : {certs}", "global_settings_setting_backup_compress_tar_archives": "Compresser les archives (.tar.gz) au lieu des archives non-compressées lors de la création des backups. N.B. : activer cette option permet d'obtenir des sauvegardes plus légères, mais leur création sera significativement plus longue et plus gourmande en CPU.", "migration_description_0018_xtable_to_nftable": "Migrer les anciennes règles de trafic réseau vers le nouveau système basé sur nftables", - "service_description_php7.3-fpm": "Exécute les applications écrites en PHP avec NGINX", + "service_description_php7.4-fpm": "Exécute les applications écrites en PHP avec NGINX", "migration_0018_failed_to_reset_legacy_rules": "La réinitialisation des règles iptable par défaut a échoué : {error}", "migration_0018_failed_to_migrate_iptables_rules": "Échec de la migration des anciennes règles iptables vers nftables : {error}", "migration_0017_not_enough_space": "Laissez suffisamment d'espace disponible dans {path} avant de lancer la migration.", diff --git a/locales/it.json b/locales/it.json index 6b15dd900..d160997df 100644 --- a/locales/it.json +++ b/locales/it.json @@ -424,7 +424,7 @@ "service_description_rspamd": "Filtra SPAM, e altre funzionalità legate alle mail", "service_description_redis-server": "Un database specializzato usato per un veloce accesso ai dati, task queue, e comunicazioni tra programmi", "service_description_postfix": "Usato per inviare e ricevere email", - "service_description_php7.3-fpm": "Esegue app scritte in PHP con NGINX", + "service_description_php7.4-fpm": "Esegue app scritte in PHP con NGINX", "service_description_nginx": "Serve o permette l'accesso a tutti i siti pubblicati sul tuo server", "service_description_mysql": "Memorizza i dati delle app (database SQL)", "service_description_metronome": "Gestisce gli account di messaggistica instantanea XMPP", diff --git a/src/yunohost/app.py b/src/yunohost/app.py index 5f001c12a..62a339315 100644 --- a/src/yunohost/app.py +++ b/src/yunohost/app.py @@ -3410,10 +3410,10 @@ def _assert_system_is_sane_for_app(manifest, when): services = manifest.get("services", []) - # Some apps use php-fpm or php5-fpm which is now php7.0-fpm + # Some apps use php-fpm, php5-fpm or php7.x-fpm which is now php7.4-fpm def replace_alias(service): - if service in ["php-fpm", "php5-fpm", "php7.0-fpm"]: - return "php7.3-fpm" + if service in ["php-fpm", "php5-fpm", "php7.0-fpm", "php7.3-fpm"]: + return "php7.4-fpm" else: return service @@ -3422,7 +3422,7 @@ def _assert_system_is_sane_for_app(manifest, when): # We only check those, mostly to ignore "custom" services # (added by apps) and because those are the most popular # services - service_filter = ["nginx", "php7.3-fpm", "mysql", "postfix"] + service_filter = ["nginx", "php7.4-fpm", "mysql", "postfix"] services = [str(s) for s in services if s in service_filter] if "nginx" not in services: @@ -3465,19 +3465,22 @@ def _assert_system_is_sane_for_app(manifest, when): LEGACY_PHP_VERSION_REPLACEMENTS = [ - ("/etc/php5", "/etc/php/7.3"), - ("/etc/php/7.0", "/etc/php/7.3"), - ("/var/run/php5-fpm", "/var/run/php/php7.3-fpm"), - ("/var/run/php/php7.0-fpm", "/var/run/php/php7.3-fpm"), - ("php5", "php7.3"), - ("php7.0", "php7.3"), + ("/etc/php5", "/etc/php/7.4"), + ("/etc/php/7.0", "/etc/php/7.4"), + ("/etc/php/7.3", "/etc/php/7.4"), + ("/var/run/php5-fpm", "/var/run/php/php7.4-fpm"), + ("/var/run/php/php7.0-fpm", "/var/run/php/php7.4-fpm"), + ("/var/run/php/php7.3-fpm", "/var/run/php/php7.4-fpm"), + ("php5", "php7.4"), + ("php7.0", "php7.4"), + ("php7.3", "php7.4"), ( 'phpversion="${phpversion:-7.0}"', - 'phpversion="${phpversion:-7.3}"', + 'phpversion="${phpversion:-7.4}"', ), # Many helpers like the composer ones use 7.0 by default ... ( '"$phpversion" == "7.0"', - '$(bc <<< "$phpversion >= 7.3") -eq 1', + '$(bc <<< "$phpversion >= 7.4") -eq 1', ), # patch ynh_install_php to refuse installing/removing php <= 7.3 ] @@ -3514,11 +3517,11 @@ def _patch_legacy_php_versions_in_settings(app_folder): settings = read_yaml(os.path.join(app_folder, "settings.yml")) if settings.get("fpm_config_dir") == "/etc/php/7.0/fpm": - settings["fpm_config_dir"] = "/etc/php/7.3/fpm" + settings["fpm_config_dir"] = "/etc/php/7.4/fpm" if settings.get("fpm_service") == "php7.0-fpm": - settings["fpm_service"] = "php7.3-fpm" + settings["fpm_service"] = "php7.4-fpm" if settings.get("phpversion") == "7.0": - settings["phpversion"] = "7.3" + settings["phpversion"] = "7.4" # We delete these checksums otherwise the file will appear as manually modified list_to_remove = ["checksum__etc_php_7.0_fpm_pool", "checksum__etc_nginx_conf.d"] diff --git a/src/yunohost/backup.py b/src/yunohost/backup.py index 3978e835d..862c07690 100644 --- a/src/yunohost/backup.py +++ b/src/yunohost/backup.py @@ -1183,7 +1183,7 @@ class RestoreManager: def _patch_legacy_php_versions_in_csv_file(self): """ - Apply dirty patch to redirect php5 and php7.0 files to php7.3 + Apply dirty patch to redirect php5 and php7.0 files to php7.4 """ backup_csv = os.path.join(self.work_dir, "backup.csv") From c70420438aa21d7dd13b7b98d6bc0029939f425a Mon Sep 17 00:00:00 2001 From: Kay0u Date: Tue, 9 Mar 2021 18:10:55 +0100 Subject: [PATCH 008/146] add python-is-python3 dependency --- debian/control | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/control b/debian/control index e78718d66..21485b114 100644 --- a/debian/control +++ b/debian/control @@ -14,6 +14,7 @@ Depends: ${python3:Depends}, ${misc:Depends} , python3-psutil, python3-requests, python3-dnspython, python3-openssl , python3-miniupnpc, python3-dbus, python3-jinja2 , python3-toml, python3-packaging, python3-publicsuffix2 + , python-is-python3 , apt, apt-transport-https, apt-utils, dirmngr , php7.4-common, php7.4-fpm, php7.4-ldap, php7.4-intl , mariadb-server, php7.4-mysql From a27a4c26df9b273089f5a9fc0e7499f135015599 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Tue, 9 Mar 2021 18:39:57 +0100 Subject: [PATCH 009/146] yaml load -> safe_load --- data/actionsmap/yunohost_completion.py | 2 +- data/helpers.d/setting | 4 ++-- data/hooks/conf_regen/01-yunohost | 4 ++-- src/yunohost/app.py | 4 ++-- src/yunohost/firewall.py | 2 +- src/yunohost/regenconf.py | 2 +- src/yunohost/service.py | 2 +- tests/test_actionmap.py | 2 +- tests/test_i18n_keys.py | 2 +- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/data/actionsmap/yunohost_completion.py b/data/actionsmap/yunohost_completion.py index bc32028d3..3891aee9c 100644 --- a/data/actionsmap/yunohost_completion.py +++ b/data/actionsmap/yunohost_completion.py @@ -32,7 +32,7 @@ def get_dict_actions(OPTION_SUBTREE, category): with open(ACTIONSMAP_FILE, "r") as stream: # Getting the dictionary containning what actions are possible per category - OPTION_TREE = yaml.load(stream) + OPTION_TREE = yaml.safe_load(stream) CATEGORY = [ category for category in OPTION_TREE.keys() if not category.startswith("_") diff --git a/data/helpers.d/setting b/data/helpers.d/setting index 2950b3829..66bce9717 100644 --- a/data/helpers.d/setting +++ b/data/helpers.d/setting @@ -86,7 +86,7 @@ key, value = os.environ['KEY'], os.environ.get('VALUE', None) setting_file = "/etc/yunohost/apps/%s/settings.yml" % app assert os.path.exists(setting_file), "Setting file %s does not exists ?" % setting_file with open(setting_file) as f: - settings = yaml.load(f) + settings = yaml.safe_load(f) if action == "get": if key in settings: print(settings[key]) @@ -96,7 +96,7 @@ else: del settings[key] elif action == "set": if key in ['redirected_urls', 'redirected_regex']: - value = yaml.load(value) + value = yaml.safe_load(value) settings[key] = value else: raise ValueError("action should either be get, set or delete") diff --git a/data/hooks/conf_regen/01-yunohost b/data/hooks/conf_regen/01-yunohost index 3d65d34cd..9196e3de9 100755 --- a/data/hooks/conf_regen/01-yunohost +++ b/data/hooks/conf_regen/01-yunohost @@ -202,10 +202,10 @@ import yaml with open('services.yml') as f: - new_services = yaml.load(f) + new_services = yaml.safe_load(f) with open('/etc/yunohost/services.yml') as f: - services = yaml.load(f) or {} + services = yaml.safe_load(f) or {} updated = False diff --git a/src/yunohost/app.py b/src/yunohost/app.py index 62a339315..f405641c4 100644 --- a/src/yunohost/app.py +++ b/src/yunohost/app.py @@ -1510,7 +1510,7 @@ def app_setting(app, key, value=None, delete=False): # SET else: if key in ["redirected_urls", "redirected_regex"]: - value = yaml.load(value) + value = yaml.safe_load(value) app_settings[key] = value _set_app_settings(app, app_settings) @@ -2167,7 +2167,7 @@ def _get_app_settings(app_id): ) try: with open(os.path.join(APPS_SETTING_PATH, app_id, "settings.yml")) as f: - settings = yaml.load(f) + settings = yaml.safe_load(f) # If label contains unicode char, this may later trigger issues when building strings... # FIXME: this should be propagated to read_yaml so that this fix applies everywhere I think... settings = {k: v for k, v in settings.items()} diff --git a/src/yunohost/firewall.py b/src/yunohost/firewall.py index b800cd42c..a153689a6 100644 --- a/src/yunohost/firewall.py +++ b/src/yunohost/firewall.py @@ -179,7 +179,7 @@ def firewall_list(raw=False, by_ip_version=False, list_forwarded=False): """ with open(FIREWALL_FILE) as f: - firewall = yaml.load(f) + firewall = yaml.safe_load(f) if raw: return firewall diff --git a/src/yunohost/regenconf.py b/src/yunohost/regenconf.py index 924818e44..0608bcf8c 100644 --- a/src/yunohost/regenconf.py +++ b/src/yunohost/regenconf.py @@ -444,7 +444,7 @@ def _get_regenconf_infos(): """ try: with open(REGEN_CONF_FILE, "r") as f: - return yaml.load(f) + return yaml.safe_load(f) except Exception: return {} diff --git a/src/yunohost/service.py b/src/yunohost/service.py index e6e960a57..912662600 100644 --- a/src/yunohost/service.py +++ b/src/yunohost/service.py @@ -670,7 +670,7 @@ def _get_services(): """ try: with open("/etc/yunohost/services.yml", "r") as f: - services = yaml.load(f) or {} + services = yaml.safe_load(f) or {} except Exception: return {} diff --git a/tests/test_actionmap.py b/tests/test_actionmap.py index bf6755979..0b8abb152 100644 --- a/tests/test_actionmap.py +++ b/tests/test_actionmap.py @@ -2,4 +2,4 @@ import yaml def test_yaml_syntax(): - yaml.load(open("data/actionsmap/yunohost.yml")) + yaml.safe_load(open("data/actionsmap/yunohost.yml")) diff --git a/tests/test_i18n_keys.py b/tests/test_i18n_keys.py index 2ad56a34e..7b5ad1956 100644 --- a/tests/test_i18n_keys.py +++ b/tests/test_i18n_keys.py @@ -108,7 +108,7 @@ def find_expected_string_keys(): yield m # Keys for the actionmap ... - for category in yaml.load(open("data/actionsmap/yunohost.yml")).values(): + for category in yaml.safe_load(open("data/actionsmap/yunohost.yml")).values(): if "actions" not in category.keys(): continue for action in category["actions"].values(): From b7703c32a1e8b7b4c649ad2d7017a249923bbc9f Mon Sep 17 00:00:00 2001 From: Kay0u Date: Tue, 9 Mar 2021 18:52:24 +0100 Subject: [PATCH 010/146] publicsuffix -> publicsuffix2 --- data/hooks/diagnosis/12-dnsrecords.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/hooks/diagnosis/12-dnsrecords.py b/data/hooks/diagnosis/12-dnsrecords.py index 719ce4d6a..795ca1621 100644 --- a/data/hooks/diagnosis/12-dnsrecords.py +++ b/data/hooks/diagnosis/12-dnsrecords.py @@ -4,7 +4,7 @@ import os import re from datetime import datetime, timedelta -from publicsuffix import PublicSuffixList +from publicsuffix2 import PublicSuffixList from moulinette.utils.process import check_output From 8aae99472090a0cdddedf6785e463c6858576c70 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Wed, 10 Mar 2021 11:24:11 +0100 Subject: [PATCH 011/146] dirty patch to wait for services to finish reloading --- src/yunohost/app.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/yunohost/app.py b/src/yunohost/app.py index f405641c4..4e2cd5317 100644 --- a/src/yunohost/app.py +++ b/src/yunohost/app.py @@ -3432,6 +3432,7 @@ def _assert_system_is_sane_for_app(manifest, when): # Wait if a service is reloading test_nb = 0 + while test_nb < 16: if not any(s for s in services if service_status(s)["status"] == "reloading"): break From 7ff1ce5432d7fb64d04a77e7b1bbadfa5401dfac Mon Sep 17 00:00:00 2001 From: Kay0u Date: Wed, 10 Mar 2021 11:30:28 +0100 Subject: [PATCH 012/146] change python version in tests from 3.7 to 3.9 --- .gitlab/ci/lint.gitlab-ci.yml | 13 ++++++------- tox.ini | 14 +++++++------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/.gitlab/ci/lint.gitlab-ci.yml b/.gitlab/ci/lint.gitlab-ci.yml index 9c48bd912..03861eca1 100644 --- a/.gitlab/ci/lint.gitlab-ci.yml +++ b/.gitlab/ci/lint.gitlab-ci.yml @@ -3,21 +3,20 @@ ######################################## # later we must fix lint and format-check jobs and remove "allow_failure" ---- -lint37: +lint39: stage: lint image: "before-install" needs: [] allow_failure: true script: - - tox -e py37-lint + - tox -e py39-lint -invalidcode37: +invalidcode39: stage: lint image: "before-install" needs: [] script: - - tox -e py37-invalidcode + - tox -e py39-invalidcode format-check: stage: lint @@ -25,7 +24,7 @@ format-check: allow_failure: true needs: [] script: - - tox -e py37-black-check + - tox -e py39-black-check format-run: stage: lint @@ -40,7 +39,7 @@ format-run: script: # create a local branch that will overwrite distant one - git checkout -b "ci-format-${CI_COMMIT_REF_NAME}" --no-track - - tox -e py37-black-run + - tox -e py39-black-run - '[ $(git diff | wc -l) != 0 ] || exit 0' # stop if there is nothing to commit - git commit -am "[CI] Format code" || true - git push -f origin "ci-format-${CI_COMMIT_REF_NAME}":"ci-format-${CI_COMMIT_REF_NAME}" diff --git a/tox.ini b/tox.ini index c25d8bf8f..0af648d63 100644 --- a/tox.ini +++ b/tox.ini @@ -1,13 +1,13 @@ [tox] -envlist = py37-{lint,invalidcode},py37-black-{run,check} +envlist = py39-{lint,invalidcode},py39-black-{run,check} [testenv] skip_install=True deps = - py37-{lint,invalidcode}: flake8 - py37-black-{run,check}: black + py39-{lint,invalidcode}: flake8 + py39-black-{run,check}: black commands = - py37-lint: flake8 src doc data tests --ignore E402,E501,E203,W503 --exclude src/yunohost/vendor - py37-invalidcode: flake8 src data --exclude src/yunohost/tests,src/yunohost/vendor --select F - py37-black-check: black --check --diff src doc data tests - py37-black-run: black src doc data tests + py39-lint: flake8 src doc data tests --ignore E402,E501,E203,W503 --exclude src/yunohost/vendor + py39-invalidcode: flake8 src data --exclude src/yunohost/tests,src/yunohost/vendor --select F + py39-black-check: black --check --diff src doc data tests + py39-black-run: black src doc data tests From 3fa96fc91b4d288a474ff8c60f167bda8020e959 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Fri, 28 May 2021 01:32:33 +0200 Subject: [PATCH 013/146] Naive attempt to fix test by adding an apt update --- .gitlab/ci/build.gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab/ci/build.gitlab-ci.yml b/.gitlab/ci/build.gitlab-ci.yml index 717a5ee73..82def4eb3 100644 --- a/.gitlab/ci/build.gitlab-ci.yml +++ b/.gitlab/ci/build.gitlab-ci.yml @@ -5,6 +5,7 @@ YNH_SOURCE: "https://github.com/yunohost" before_script: - mkdir -p $YNH_BUILD_DIR + - DEBIAN_FRONTEND=noninteractive apt update artifacts: paths: - $YNH_BUILD_DIR/*.deb From 1051dbb3cc839604d05d1e904488129addf1571d Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Fri, 28 May 2021 02:17:40 +0200 Subject: [PATCH 014/146] Misc legacy cleanup --- data/actionsmap/yunohost.yml | 95 ------ data/helpers.d/backup | 13 - data/helpers.d/utils | 52 ---- data/hooks/conf_regen/01-yunohost | 12 - data/hooks/conf_regen/03-ssh | 8 - data/hooks/conf_regen/06-slapd | 5 - data/hooks/conf_regen/15-nginx | 14 - data/hooks/conf_regen/34-mysql | 23 -- src/yunohost/app.py | 144 +-------- .../data_migrations/0015_migrate_to_buster.py | 291 ------------------ .../0016_php70_to_php73_pools.py | 83 ----- .../0017_postgresql_9p6_to_11.py | 82 ----- .../data_migrations/0018_xtable_to_nftable.py | 126 -------- .../0019_extend_permissions_features.py | 107 ------- .../0020_ssh_sftp_permissions.py | 100 ------ src/yunohost/dyndns.py | 12 - src/yunohost/service.py | 36 --- src/yunohost/tools.py | 33 +- src/yunohost/user.py | 7 - src/yunohost/utils/legacy.py | 239 -------------- 20 files changed, 10 insertions(+), 1472 deletions(-) delete mode 100644 src/yunohost/data_migrations/0015_migrate_to_buster.py delete mode 100644 src/yunohost/data_migrations/0016_php70_to_php73_pools.py delete mode 100644 src/yunohost/data_migrations/0017_postgresql_9p6_to_11.py delete mode 100644 src/yunohost/data_migrations/0018_xtable_to_nftable.py delete mode 100644 src/yunohost/data_migrations/0019_extend_permissions_features.py delete mode 100644 src/yunohost/data_migrations/0020_ssh_sftp_permissions.py delete mode 100644 src/yunohost/utils/legacy.py diff --git a/data/actionsmap/yunohost.yml b/data/actionsmap/yunohost.yml index 5df1c0877..0631a20c9 100644 --- a/data/actionsmap/yunohost.yml +++ b/data/actionsmap/yunohost.yml @@ -97,9 +97,6 @@ user: pattern: &pattern_lastname - !!str ^([^\W\d_]{1,30}[ ,.'-]{0,3})+$ - "pattern_lastname" - -m: - full: --mail - help: (Deprecated, see --domain) Main unique email address -p: full: --password help: User password @@ -596,9 +593,6 @@ app: app: help: Name, local path or git URL of the app to fetch the manifest of - fetchlist: - deprecated: true - ### app_list() list: action_help: List installed apps @@ -770,36 +764,6 @@ app: new_label: help: New app label - ### app_addaccess() TODO: Write help - addaccess: - action_help: Grant access right to users (everyone by default) - deprecated: true - arguments: - apps: - nargs: "+" - -u: - full: --users - nargs: "*" - - ### app_removeaccess() TODO: Write help - removeaccess: - action_help: Revoke access right to users (everyone by default) - deprecated: true - arguments: - apps: - nargs: "+" - -u: - full: --users - nargs: "*" - - ### app_clearaccess() - clearaccess: - action_help: Reset access rights for the app - deprecated: true - arguments: - apps: - nargs: "+" - subcategories: action: @@ -1023,13 +987,6 @@ service: full: --log help: Absolute path to log file to display nargs: "+" - -t: - full: --log_type - help: Type of the log (file or systemd) - nargs: "+" - choices: - - file - - systemd --test_status: help: Specify a custom bash command to check the status of the service. Note that it only makes sense to specify this if the corresponding systemd service does not return the proper information already. --test_conf: @@ -1043,9 +1000,6 @@ service: full: --need_lock help: Use this option to prevent deadlocks if the service does invoke yunohost commands. action: store_true - -s: - full: --status - help: Deprecated, old option. Does nothing anymore. Possibly check the --test_status option. ### service_remove() remove: @@ -1147,35 +1101,6 @@ service: default: 50 type: int - ### service_regen_conf() - regen-conf: - action_help: Regenerate the configuration file(s) for a service - deprecated_alias: - - regenconf - arguments: - names: - help: Services name to regenerate configuration of - nargs: "*" - metavar: NAME - -d: - full: --with-diff - help: Show differences in case of configuration changes - action: store_true - -f: - full: --force - help: > - Override all manual modifications in configuration - files - action: store_true - -n: - full: --dry-run - help: Show what would have been regenerated - action: store_true - -p: - full: --list-pending - help: List pending configuration files and exit - action: store_true - ############################# # Firewall # ############################# @@ -1351,14 +1276,6 @@ dyndns: full: --ipv6 help: IPv6 address to send - ### dyndns_installcron() - installcron: - deprecated: true - - ### dyndns_removecron() - removecron: - deprecated: true - ############################# # Tools # @@ -1438,12 +1355,6 @@ tools: nargs: "?" metavar: TARGET default: all - --apps: - help: (Deprecated, see first positional arg) Fetch the application list to check which apps can be upgraded - action: store_true - --system: - help: (Deprecated, see first positional arg) Fetch available system packages upgrades (equivalent to apt update) - action: store_true ### tools_upgrade() upgrade: @@ -1456,12 +1367,6 @@ tools: - apps - system nargs: "?" - --apps: - help: (Deprecated, see first positional arg) Upgrade all applications - action: store_true - --system: - help: (Deprecated, see first positional arg) Upgrade only the system packages - action: store_true ### tools_shell() shell: diff --git a/data/helpers.d/backup b/data/helpers.d/backup index 17da0fb2e..156f12dfb 100644 --- a/data/helpers.d/backup +++ b/data/helpers.d/backup @@ -9,7 +9,6 @@ CAN_BIND=${CAN_BIND:-1} # | arg: -d, --dest_path= - destination file or directory inside the backup dir # | arg: -b, --is_big - Indicate data are big (mail, video, image ...) # | arg: -m, --not_mandatory - Indicate that if the file is missing, the backup can ignore it. -# | arg: arg - Deprecated arg # # This helper can be used both in a system backup hook, and in an app backup script # @@ -303,18 +302,6 @@ ynh_restore_file () { fi } -# Deprecated helper since it's a dangerous one! -# -# [internal] -# -ynh_bind_or_cp() { - local AS_ROOT=${3:-0} - local NO_ROOT=0 - [[ "${AS_ROOT}" = "1" ]] || NO_ROOT=1 - ynh_print_warn --message="This helper is deprecated, you should use ynh_backup instead" - ynh_backup "$1" "$2" 1 -} - # Calculate and store a file checksum into the app settings # # usage: ynh_store_file_checksum --file=file diff --git a/data/helpers.d/utils b/data/helpers.d/utils index 00bec89ac..3b2f49abf 100644 --- a/data/helpers.d/utils +++ b/data/helpers.d/utils @@ -503,26 +503,6 @@ ynh_get_debian_release () { echo $(lsb_release --codename --short) } -# Create a directory under /tmp -# -# [internal] -# -# Deprecated helper -# -# usage: ynh_mkdir_tmp -# | ret: the created directory path -ynh_mkdir_tmp() { - ynh_print_warn --message="The helper ynh_mkdir_tmp is deprecated." - ynh_print_warn --message="You should use 'mktemp -d' instead and manage permissions \ -properly with chmod/chown." - local TMP_DIR=$(mktemp --directory) - - # Give rights to other users could be a security risk. - # But for retrocompatibility we need it. (This helpers is deprecated) - chmod 755 $TMP_DIR - echo $TMP_DIR -} - # Remove a file or a directory securely # # usage: ynh_secure_remove --file=path_to_remove @@ -565,38 +545,6 @@ ynh_secure_remove () { fi } -# Extract a key from a plain command output -# -# [internal] -# -# (Deprecated, use --output-as json and jq instead) -ynh_get_plain_key() { - local prefix="#" - local founded=0 - # We call this key_ so that it's not caught as - # an info to be redacted by the core - local key_=$1 - shift - while read line - do - if [[ "$founded" == "1" ]] - then - [[ "$line" =~ ^${prefix}[^#] ]] && return - echo $line - elif [[ "$line" =~ ^${prefix}${key_}$ ]] - then - if [[ -n "${1:-}" ]] - then - prefix+="#" - key_=$1 - shift - else - founded=1 - fi - fi - done -} - # Read the value of a key in a ynh manifest file # # usage: ynh_read_manifest --manifest="manifest.json" --key="key" diff --git a/data/hooks/conf_regen/01-yunohost b/data/hooks/conf_regen/01-yunohost index 9196e3de9..2c9df2a64 100755 --- a/data/hooks/conf_regen/01-yunohost +++ b/data/hooks/conf_regen/01-yunohost @@ -113,11 +113,6 @@ SHELL=/bin/bash EOF fi - # legacy stuff to avoid yunohost reporting etckeeper as manually modified - # (this make sure that the hash is null / file is flagged as to-delete) - mkdir -p $pending_dir/etc/etckeeper - touch $pending_dir/etc/etckeeper/etckeeper.conf - # Skip ntp if inside a container (inspired from the conf of systemd-timesyncd) mkdir -p ${pending_dir}/etc/systemd/system/ntp.service.d/ echo " @@ -242,13 +237,6 @@ for service, conf in new_services.items(): if conffiles: services[service]['conffiles'] = conffiles - # Remove legacy /var/log/daemon.log and /var/log/syslog from log entries - # because they are too general. Instead, now the journalctl log is - # returned by default which is more relevant. - if "log" in services[service]: - if services[service]["log"] in ["/var/log/syslog", "/var/log/daemon.log"]: - del services[service]["log"] - if updated: with open('/etc/yunohost/services.yml-new', 'w') as f: yaml.safe_dump(services, f, default_flow_style=False) diff --git a/data/hooks/conf_regen/03-ssh b/data/hooks/conf_regen/03-ssh index d0c4bd31c..6b0445fd0 100755 --- a/data/hooks/conf_regen/03-ssh +++ b/data/hooks/conf_regen/03-ssh @@ -7,10 +7,6 @@ set -e do_pre_regen() { pending_dir=$1 - # If the (legacy) 'from_script' flag is here, - # we won't touch anything in the ssh config. - [[ ! -f /etc/yunohost/from_script ]] || return 0 - cd /usr/share/yunohost/templates/ssh # do not listen to IPv6 if unavailable @@ -34,10 +30,6 @@ do_pre_regen() { do_post_regen() { regen_conf_files=$1 - # If the (legacy) 'from_script' flag is here, - # we won't touch anything in the ssh config. - [[ ! -f /etc/yunohost/from_script ]] || return 0 - # If no file changed, there's nothing to do [[ -n "$regen_conf_files" ]] || return 0 diff --git a/data/hooks/conf_regen/06-slapd b/data/hooks/conf_regen/06-slapd index 3fa3a0fd2..06f89cec5 100755 --- a/data/hooks/conf_regen/06-slapd +++ b/data/hooks/conf_regen/06-slapd @@ -110,11 +110,6 @@ do_pre_regen() { schema_dir="${ldap_dir}/schema" mkdir -p "$ldap_dir" "$schema_dir" - # remove legacy configuration file - [ ! -f /etc/ldap/slapd-yuno.conf ] || touch "${ldap_dir}/slapd-yuno.conf" - [ ! -f /etc/ldap/slapd.conf ] || touch "${ldap_dir}/slapd.conf" - [ ! -f /etc/ldap/schema/yunohost.schema ] || touch "${schema_dir}/yunohost.schema" - cd /usr/share/yunohost/templates/slapd # copy configuration files diff --git a/data/hooks/conf_regen/15-nginx b/data/hooks/conf_regen/15-nginx index 8875693c6..64af48257 100755 --- a/data/hooks/conf_regen/15-nginx +++ b/data/hooks/conf_regen/15-nginx @@ -119,20 +119,6 @@ do_post_regen() { mkdir -p "/etc/nginx/conf.d/${domain}.d" done - # Get rid of legacy lets encrypt snippets - for domain in $YNH_DOMAINS; do - # If the legacy letsencrypt / acme-challenge domain-specific snippet is still there - if [ -e /etc/nginx/conf.d/${domain}.d/000-acmechallenge.conf ] - then - # And if we're effectively including the new domain-independant snippet now - if grep -q "include /etc/nginx/conf.d/acme-challenge.conf.inc;" /etc/nginx/conf.d/${domain}.conf - then - # Delete the old domain-specific snippet - rm /etc/nginx/conf.d/${domain}.d/000-acmechallenge.conf - fi - fi - done - # Reload nginx if conf looks good, otherwise display error and exit unhappy nginx -t 2>/dev/null || { nginx -t; exit 1; } pgrep nginx && systemctl reload nginx || { journalctl --no-pager --lines=10 -u nginx >&2; exit 1; } diff --git a/data/hooks/conf_regen/34-mysql b/data/hooks/conf_regen/34-mysql index d5180949e..136207cc8 100755 --- a/data/hooks/conf_regen/34-mysql +++ b/data/hooks/conf_regen/34-mysql @@ -30,29 +30,6 @@ do_post_regen() { echo "" | mysql && echo "Can't connect to mysql using unix_socket auth ... something went wrong during initial configuration of mysql !?" >&2 fi - # Legacy code to get rid of /etc/yunohost/mysql ... - # Nowadays, we can simply run mysql while being run as root of unix_socket/auth_socket is enabled... - if [ -f /etc/yunohost/mysql ]; then - - # This is a trick to check if we're able to use mysql without password - # Expect instances installed in stretch to already have unix_socket - #configured, but not old instances from the jessie/wheezy era - if ! echo "" | mysql 2>/dev/null - then - password="$(cat /etc/yunohost/mysql)" - # Enable plugin unix_socket for root on localhost - mysql -u root -p"$password" <<< "GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED WITH unix_socket WITH GRANT OPTION;" - fi - - # If now we're able to login without password, drop the mysql password - if echo "" | mysql 2>/dev/null - then - rm /etc/yunohost/mysql - else - echo "Can't connect to mysql using unix_socket auth ... something went wrong while trying to get rid of mysql password !?" >&2 - fi - fi - # mysql is supposed to be an alias to mariadb... but in some weird case is not # c.f. https://forum.yunohost.org/t/mysql-ne-fonctionne-pas/11661 # Playing with enable/disable allows to recreate the proper symlinks. diff --git a/src/yunohost/app.py b/src/yunohost/app.py index 4e2cd5317..0a0b73668 100644 --- a/src/yunohost/app.py +++ b/src/yunohost/app.py @@ -137,40 +137,13 @@ def app_search(string): return catalog_of_apps -# Old legacy function... -def app_fetchlist(): - logger.warning( - "'yunohost app fetchlist' is deprecated. Please use 'yunohost tools update --apps' instead" - ) - from yunohost.tools import tools_update - - tools_update(target="apps") - - -def app_list(full=False, installed=False, filter=None): +def app_list(full=False): """ List installed apps """ - # Old legacy argument ... app_list was a combination of app_list and - # app_catalog before 3.8 ... - if installed: - logger.warning( - "Argument --installed ain't needed anymore when using 'yunohost app list'. It directly returns the list of installed apps.." - ) - - # Filter is a deprecated option... - if filter: - logger.warning( - "Using -f $appname in 'yunohost app list' is deprecated. Just use 'yunohost app list | grep -q 'id: $appname' to check a specific app is installed" - ) - out = [] for app_id in sorted(_installed_apps()): - - if filter and not app_id.startswith(filter): - continue - try: app_info_dict = app_info(app_id, full=full) except Exception as e: @@ -1258,64 +1231,6 @@ def app_remove(operation_logger, app): _assert_system_is_sane_for_app(manifest, "post") -def app_addaccess(apps, users=[]): - """ - Grant access right to users (everyone by default) - - Keyword argument: - users - apps - - """ - from yunohost.permission import user_permission_update - - output = {} - for app in apps: - permission = user_permission_update( - app + ".main", add=users, remove="all_users" - ) - output[app] = permission["corresponding_users"] - - return {"allowed_users": output} - - -def app_removeaccess(apps, users=[]): - """ - Revoke access right to users (everyone by default) - - Keyword argument: - users - apps - - """ - from yunohost.permission import user_permission_update - - output = {} - for app in apps: - permission = user_permission_update(app + ".main", remove=users) - output[app] = permission["corresponding_users"] - - return {"allowed_users": output} - - -def app_clearaccess(apps): - """ - Reset access rights for the app - - Keyword argument: - apps - - """ - from yunohost.permission import user_permission_reset - - output = {} - for app in apps: - permission = user_permission_reset(app + ".main") - output[app] = permission["corresponding_users"] - - return {"allowed_users": output} - - @is_unit_operation() def app_makedefault(operation_logger, app, domain=None): """ @@ -1643,10 +1558,6 @@ def app_ssowatconf(): write_to_json("/etc/ssowat/conf.json", conf_dict, sort_keys=True, indent=4) - from .utils.legacy import translate_legacy_rules_in_ssowant_conf_json_persistent - - translate_legacy_rules_in_ssowant_conf_json_persistent() - logger.debug(m18n.n("ssowat_conf_generated")) @@ -3542,36 +3453,10 @@ def _patch_legacy_helpers(app_folder): files_to_patch.extend(glob.glob("%s/scripts/.*" % app_folder)) stuff_to_replace = { - # Replace - # sudo yunohost app initdb $db_user -p $db_pwd - # by - # ynh_mysql_setup_db --db_user=$db_user --db_name=$db_user --db_pwd=$db_pwd - "yunohost app initdb": { - "pattern": r"(sudo )?yunohost app initdb \"?(\$\{?\w+\}?)\"?\s+-p\s\"?(\$\{?\w+\}?)\"?", - "replace": r"ynh_mysql_setup_db --db_user=\2 --db_name=\2 --db_pwd=\3", - "important": True, - }, - # Replace - # sudo yunohost app checkport whaterver - # by - # ynh_port_available whatever - "yunohost app checkport": { - "pattern": r"(sudo )?yunohost app checkport", - "replace": r"ynh_port_available", - "important": True, - }, - # We can't migrate easily port-available - # .. but at the time of writing this code, only two non-working apps are using it. + "yunohost app initdb": {"important": True}, + "yunohost app checkport": {"important": True}, "yunohost tools port-available": {"important": True}, - # Replace - # yunohost app checkurl "${domain}${path_url}" -a "${app}" - # by - # ynh_webpath_register --app=${app} --domain=${domain} --path_url=${path_url} - "yunohost app checkurl": { - "pattern": r"(sudo )?yunohost app checkurl \"?(\$\{?\w+\}?)\/?(\$\{?\w+\}?)\"?\s+-a\s\"?(\$\{?\w+\}?)\"?", - "replace": r"ynh_webpath_register --app=\4 --domain=\2 --path_url=\3", - "important": True, - }, + "yunohost app checkurl": {"important": True}, # Remove # Automatic diagnosis data from YunoHost # __PRE_TAG1__$(yunohost tools diagnosis | ...)__PRE_TAG2__" @@ -3582,26 +3467,11 @@ def _patch_legacy_helpers(app_folder): "important": False, }, # Old $1, $2 in backup/restore scripts... - "app=$2": { - "only_for": ["scripts/backup", "scripts/restore"], - "pattern": r"app=\$2", - "replace": r"app=$YNH_APP_INSTANCE_NAME", - "important": True, - }, + "app=$2": {"only_for": ["scripts/backup", "scripts/restore"], "important": True}, # Old $1, $2 in backup/restore scripts... - "backup_dir=$1": { - "only_for": ["scripts/backup", "scripts/restore"], - "pattern": r"backup_dir=\$1", - "replace": r"backup_dir=.", - "important": True, - }, + "backup_dir=$1": {"only_for": ["scripts/backup", "scripts/restore"], "important": True}, # Old $1, $2 in backup/restore scripts... - "restore_dir=$1": { - "only_for": ["scripts/restore"], - "pattern": r"restore_dir=\$1", - "replace": r"restore_dir=.", - "important": True, - }, + "restore_dir=$1": {"only_for": ["scripts/restore"], "important": True}, # Old $1, $2 in install scripts... # We ain't patching that shit because it ain't trivial to patch all args... "domain=$1": {"only_for": ["scripts/install"], "important": True}, diff --git a/src/yunohost/data_migrations/0015_migrate_to_buster.py b/src/yunohost/data_migrations/0015_migrate_to_buster.py deleted file mode 100644 index 4f2d4caf8..000000000 --- a/src/yunohost/data_migrations/0015_migrate_to_buster.py +++ /dev/null @@ -1,291 +0,0 @@ -import glob -import os - -from moulinette import m18n -from yunohost.utils.error import YunohostError -from moulinette.utils.log import getActionLogger -from moulinette.utils.process import check_output, call_async_output -from moulinette.utils.filesystem import read_file - -from yunohost.tools import Migration, tools_update, tools_upgrade -from yunohost.app import unstable_apps -from yunohost.regenconf import manually_modified_files -from yunohost.utils.filesystem import free_space_in_directory -from yunohost.utils.packages import ( - get_ynh_package_version, - _list_upgradable_apt_packages, -) - -logger = getActionLogger("yunohost.migration") - - -class MyMigration(Migration): - - "Upgrade the system to Debian Buster and Yunohost 4.x" - - mode = "manual" - - def run(self): - - self.check_assertions() - - logger.info(m18n.n("migration_0015_start")) - - # - # Make sure certificates do not use weak signature hash algorithms (md5, sha1) - # otherwise nginx will later refuse to start which result in - # catastrophic situation - # - self.validate_and_upgrade_cert_if_necessary() - - # - # Patch sources.list - # - logger.info(m18n.n("migration_0015_patching_sources_list")) - self.patch_apt_sources_list() - tools_update(target="system") - - # Tell libc6 it's okay to restart system stuff during the upgrade - os.system( - "echo 'libc6 libraries/restart-without-asking boolean true' | debconf-set-selections" - ) - - # Don't send an email to root about the postgresql migration. It should be handled automatically after. - os.system( - "echo 'postgresql-common postgresql-common/obsolete-major seen true' | debconf-set-selections" - ) - - # - # Specific packages upgrades - # - logger.info(m18n.n("migration_0015_specific_upgrade")) - - # Update unscd independently, was 0.53-1+yunohost on stretch (custom build of ours) but now it's 0.53-1+b1 on vanilla buster, - # which for apt appears as a lower version (hence the --allow-downgrades and the hardcoded version number) - unscd_version = check_output( - 'dpkg -s unscd | grep "^Version: " | cut -d " " -f 2' - ) - if "yunohost" in unscd_version: - new_version = check_output( - "LC_ALL=C apt policy unscd 2>/dev/null | grep -v '\\*\\*\\*' | grep http -B1 | head -n 1 | awk '{print $1}'" - ).strip() - if new_version: - self.apt_install("unscd=%s --allow-downgrades" % new_version) - else: - logger.warning("Could not identify which version of unscd to install") - - # Upgrade libpam-modules independently, small issue related to willing to overwrite a file previously provided by Yunohost - libpammodules_version = check_output( - 'dpkg -s libpam-modules | grep "^Version: " | cut -d " " -f 2' - ) - if not libpammodules_version.startswith("1.3"): - self.apt_install('libpam-modules -o Dpkg::Options::="--force-overwrite"') - - # - # Main upgrade - # - logger.info(m18n.n("migration_0015_main_upgrade")) - - apps_packages = self.get_apps_equivs_packages() - self.hold(apps_packages) - tools_upgrade(target="system", allow_yunohost_upgrade=False) - - if self.debian_major_version() == 9: - raise YunohostError("migration_0015_still_on_stretch_after_main_upgrade") - - # Clean the mess - logger.info(m18n.n("migration_0015_cleaning_up")) - os.system("apt autoremove --assume-yes") - os.system("apt clean --assume-yes") - - # - # Yunohost upgrade - # - logger.info(m18n.n("migration_0015_yunohost_upgrade")) - self.unhold(apps_packages) - tools_upgrade(target="system") - - def debian_major_version(self): - # The python module "platform" and lsb_release are not reliable because - # on some setup, they may still return Release=9 even after upgrading to - # buster ... (Apparently this is related to OVH overriding some stuff - # with /etc/lsb-release for instance -_-) - # Instead, we rely on /etc/os-release which should be the raw info from - # the distribution... - return int( - check_output( - "grep VERSION_ID /etc/os-release | head -n 1 | tr '\"' ' ' | cut -d ' ' -f2" - ) - ) - - def yunohost_major_version(self): - return int(get_ynh_package_version("yunohost")["version"].split(".")[0]) - - def check_assertions(self): - - # Be on stretch (9.x) and yunohost 3.x - # NB : we do both check to cover situations where the upgrade crashed - # in the middle and debian version could be > 9.x but yunohost package - # would still be in 3.x... - if ( - not self.debian_major_version() == 9 - and not self.yunohost_major_version() == 3 - ): - raise YunohostError("migration_0015_not_stretch") - - # Have > 1 Go free space on /var/ ? - if free_space_in_directory("/var/") / (1024 ** 3) < 1.0: - raise YunohostError("migration_0015_not_enough_free_space") - - # Check system is up to date - # (but we don't if 'stretch' is already in the sources.list ... - # which means maybe a previous upgrade crashed and we're re-running it) - if " buster " not in read_file("/etc/apt/sources.list"): - tools_update(target="system") - upgradable_system_packages = list(_list_upgradable_apt_packages()) - if upgradable_system_packages: - raise YunohostError("migration_0015_system_not_fully_up_to_date") - - @property - def disclaimer(self): - - # Avoid having a super long disclaimer + uncessary check if we ain't - # on stretch / yunohost 3.x anymore - # NB : we do both check to cover situations where the upgrade crashed - # in the middle and debian version could be >= 10.x but yunohost package - # would still be in 3.x... - if ( - not self.debian_major_version() == 9 - and not self.yunohost_major_version() == 3 - ): - return None - - # Get list of problematic apps ? I.e. not official or community+working - problematic_apps = unstable_apps() - problematic_apps = "".join(["\n - " + app for app in problematic_apps]) - - # Manually modified files ? (c.f. yunohost service regen-conf) - modified_files = manually_modified_files() - modified_files = "".join(["\n - " + f for f in modified_files]) - - message = m18n.n("migration_0015_general_warning") - - message = ( - "N.B.: This migration has been tested by the community over the last few months but has only been declared stable recently. If your server hosts critical services and if you are not too confident with debugging possible issues, we recommend you to wait a little bit more while we gather more feedback and polish things up. If on the other hand you are relatively confident with debugging small issues that may arise, you are encouraged to run this migration ;)! You can read about remaining known issues and feedback from the community here: https://forum.yunohost.org/t/12195\n\n" - + message - ) - - if problematic_apps: - message += "\n\n" + m18n.n( - "migration_0015_problematic_apps_warning", - problematic_apps=problematic_apps, - ) - - if modified_files: - message += "\n\n" + m18n.n( - "migration_0015_modified_files", manually_modified_files=modified_files - ) - - return message - - def patch_apt_sources_list(self): - - sources_list = glob.glob("/etc/apt/sources.list.d/*.list") - sources_list.append("/etc/apt/sources.list") - - # This : - # - replace single 'stretch' occurence by 'buster' - # - comments lines containing "backports" - # - replace 'stretch/updates' by 'strech/updates' (or same with -) - for f in sources_list: - command = ( - "sed -i -e 's@ stretch @ buster @g' " - "-e '/backports/ s@^#*@#@' " - "-e 's@ stretch/updates @ buster/updates @g' " - "-e 's@ stretch-@ buster-@g' " - "{}".format(f) - ) - os.system(command) - - def get_apps_equivs_packages(self): - - command = ( - "dpkg --get-selections" - " | grep -v deinstall" - " | awk '{print $1}'" - " | { grep 'ynh-deps$' || true; }" - ) - - output = check_output(command) - - return output.split("\n") if output else [] - - def hold(self, packages): - for package in packages: - os.system("apt-mark hold {}".format(package)) - - def unhold(self, packages): - for package in packages: - os.system("apt-mark unhold {}".format(package)) - - def apt_install(self, cmd): - def is_relevant(line): - return "Reading database ..." not in line.rstrip() - - callbacks = ( - lambda l: logger.info("+ " + l.rstrip() + "\r") - if is_relevant(l) - else logger.debug(l.rstrip() + "\r"), - lambda l: logger.warning(l.rstrip()), - ) - - cmd = ( - "LC_ALL=C DEBIAN_FRONTEND=noninteractive APT_LISTCHANGES_FRONTEND=none apt install --quiet -o=Dpkg::Use-Pty=0 --fix-broken --assume-yes " - + cmd - ) - - logger.debug("Running: %s" % cmd) - - call_async_output(cmd, callbacks, shell=True) - - def validate_and_upgrade_cert_if_necessary(self): - - active_certs = set( - check_output("grep -roh '/.*crt.pem' /etc/nginx/").split("\n") - ) - - cmd = "LC_ALL=C openssl x509 -in %s -text -noout | grep -i 'Signature Algorithm:' | awk '{print $3}' | uniq" - - default_crt = "/etc/yunohost/certs/yunohost.org/crt.pem" - default_key = "/etc/yunohost/certs/yunohost.org/key.pem" - default_signature = ( - check_output(cmd % default_crt) if default_crt in active_certs else None - ) - if default_signature is not None and ( - default_signature.startswith("md5") or default_signature.startswith("sha1") - ): - logger.warning( - "%s is using a pretty old certificate incompatible with newer versions of nginx ... attempting to regenerate a fresh one" - % default_crt - ) - - os.system("mv %s %s.old" % (default_crt, default_crt)) - os.system("mv %s %s.old" % (default_key, default_key)) - ret = os.system("/usr/share/yunohost/hooks/conf_regen/02-ssl init") - - if ret != 0 or not os.path.exists(default_crt): - logger.error("Upgrading the certificate failed ... reverting") - os.system("mv %s.old %s" % (default_crt, default_crt)) - os.system("mv %s.old %s" % (default_key, default_key)) - - signatures = {cert: check_output(cmd % cert) for cert in active_certs} - - def cert_is_weak(cert): - sig = signatures[cert] - return sig.startswith("md5") or sig.startswith("sha1") - - weak_certs = [cert for cert in signatures.keys() if cert_is_weak(cert)] - if weak_certs: - raise YunohostError( - "migration_0015_weak_certs", certs=", ".join(weak_certs) - ) diff --git a/src/yunohost/data_migrations/0016_php70_to_php73_pools.py b/src/yunohost/data_migrations/0016_php70_to_php73_pools.py deleted file mode 100644 index 6b424f211..000000000 --- a/src/yunohost/data_migrations/0016_php70_to_php73_pools.py +++ /dev/null @@ -1,83 +0,0 @@ -import os -import glob -from shutil import copy2 - -from moulinette.utils.log import getActionLogger - -from yunohost.app import _is_installed, _patch_legacy_php_versions_in_settings -from yunohost.tools import Migration -from yunohost.service import _run_service_command - -logger = getActionLogger("yunohost.migration") - -PHP70_POOLS = "/etc/php/7.0/fpm/pool.d" -PHP73_POOLS = "/etc/php/7.3/fpm/pool.d" - -PHP70_SOCKETS_PREFIX = "/run/php/php7.0-fpm" -PHP73_SOCKETS_PREFIX = "/run/php/php7.3-fpm" - -MIGRATION_COMMENT = ( - "; YunoHost note : this file was automatically moved from {}".format(PHP70_POOLS) -) - - -class MyMigration(Migration): - - "Migrate php7.0-fpm 'pool' conf files to php7.3" - - dependencies = ["migrate_to_buster"] - - def run(self): - # Get list of php7.0 pool files - php70_pool_files = glob.glob("{}/*.conf".format(PHP70_POOLS)) - - # Keep only basenames - php70_pool_files = [os.path.basename(f) for f in php70_pool_files] - - # Ignore the "www.conf" (default stuff, probably don't want to touch it ?) - php70_pool_files = [f for f in php70_pool_files if f != "www.conf"] - - for f in php70_pool_files: - - # Copy the files to the php7.3 pool - src = "{}/{}".format(PHP70_POOLS, f) - dest = "{}/{}".format(PHP73_POOLS, f) - copy2(src, dest) - - # Replace the socket prefix if it's found - c = "sed -i -e 's@{}@{}@g' {}".format( - PHP70_SOCKETS_PREFIX, PHP73_SOCKETS_PREFIX, dest - ) - os.system(c) - - # Also add a comment that it was automatically moved from php7.0 - # (for human traceability and backward migration) - c = "sed -i '1i {}' {}".format(MIGRATION_COMMENT, dest) - os.system(c) - - app_id = os.path.basename(f)[: -len(".conf")] - if _is_installed(app_id): - _patch_legacy_php_versions_in_settings( - "/etc/yunohost/apps/%s/" % app_id - ) - - nginx_conf_files = glob.glob("/etc/nginx/conf.d/*.d/%s.conf" % app_id) - for f in nginx_conf_files: - # Replace the socket prefix if it's found - c = "sed -i -e 's@{}@{}@g' {}".format( - PHP70_SOCKETS_PREFIX, PHP73_SOCKETS_PREFIX, f - ) - os.system(c) - - os.system( - "rm /etc/logrotate.d/php7.0-fpm" - ) # We remove this otherwise the logrotate cron will be unhappy - - # Reload/restart the php pools - _run_service_command("restart", "php7.3-fpm") - _run_service_command("enable", "php7.3-fpm") - os.system("systemctl stop php7.0-fpm") - os.system("systemctl disable php7.0-fpm") - - # Reload nginx - _run_service_command("reload", "nginx") diff --git a/src/yunohost/data_migrations/0017_postgresql_9p6_to_11.py b/src/yunohost/data_migrations/0017_postgresql_9p6_to_11.py deleted file mode 100644 index cbdfabb1f..000000000 --- a/src/yunohost/data_migrations/0017_postgresql_9p6_to_11.py +++ /dev/null @@ -1,82 +0,0 @@ -import subprocess - -from moulinette import m18n -from yunohost.utils.error import YunohostError, YunohostValidationError -from moulinette.utils.log import getActionLogger - -from yunohost.tools import Migration -from yunohost.utils.filesystem import free_space_in_directory, space_used_by_directory - -logger = getActionLogger("yunohost.migration") - - -class MyMigration(Migration): - - "Migrate DBs from Postgresql 9.6 to 11 after migrating to Buster" - - dependencies = ["migrate_to_buster"] - - def run(self): - - if not self.package_is_installed("postgresql-9.6"): - logger.warning(m18n.n("migration_0017_postgresql_96_not_installed")) - return - - if not self.package_is_installed("postgresql-11"): - raise YunohostValidationError("migration_0017_postgresql_11_not_installed") - - # Make sure there's a 9.6 cluster - try: - self.runcmd("pg_lsclusters | grep -q '^9.6 '") - except Exception: - logger.warning( - "It looks like there's not active 9.6 cluster, so probably don't need to run this migration" - ) - return - - if not space_used_by_directory( - "/var/lib/postgresql/9.6" - ) > free_space_in_directory("/var/lib/postgresql"): - raise YunohostValidationError( - "migration_0017_not_enough_space", path="/var/lib/postgresql/" - ) - - self.runcmd("systemctl stop postgresql") - self.runcmd( - "LC_ALL=C pg_dropcluster --stop 11 main || true" - ) # We do not trigger an exception if the command fails because that probably means cluster 11 doesn't exists, which is fine because it's created during the pg_upgradecluster) - self.runcmd("LC_ALL=C pg_upgradecluster -m upgrade 9.6 main") - self.runcmd("LC_ALL=C pg_dropcluster --stop 9.6 main") - self.runcmd("systemctl start postgresql") - - def package_is_installed(self, package_name): - - (returncode, out, err) = self.runcmd( - "dpkg --list | grep '^ii ' | grep -q -w {}".format(package_name), - raise_on_errors=False, - ) - return returncode == 0 - - def runcmd(self, cmd, raise_on_errors=True): - - logger.debug("Running command: " + cmd) - - p = subprocess.Popen( - cmd, - shell=True, - executable="/bin/bash", - stdout=subprocess.PIPE, - stderr=subprocess.PIPE, - ) - - out, err = p.communicate() - returncode = p.returncode - if raise_on_errors and returncode != 0: - raise YunohostError( - "Failed to run command '{}'.\nreturncode: {}\nstdout:\n{}\nstderr:\n{}\n".format( - cmd, returncode, out, err - ) - ) - - out = out.strip().split("\n") - return (returncode, out, err) diff --git a/src/yunohost/data_migrations/0018_xtable_to_nftable.py b/src/yunohost/data_migrations/0018_xtable_to_nftable.py deleted file mode 100644 index 94b47d944..000000000 --- a/src/yunohost/data_migrations/0018_xtable_to_nftable.py +++ /dev/null @@ -1,126 +0,0 @@ -import os -import subprocess - -from moulinette import m18n -from yunohost.utils.error import YunohostError -from moulinette.utils.log import getActionLogger - -from yunohost.firewall import firewall_reload -from yunohost.service import service_restart -from yunohost.tools import Migration - -logger = getActionLogger("yunohost.migration") - - -class MyMigration(Migration): - - "Migrate legacy iptables rules from stretch that relied on xtable and should now rely on nftable" - - dependencies = ["migrate_to_buster"] - - def run(self): - - self.do_ipv4 = os.system("iptables -w -L >/dev/null") == 0 - self.do_ipv6 = os.system("ip6tables -w -L >/dev/null") == 0 - - if not self.do_ipv4: - logger.warning(m18n.n("iptables_unavailable")) - if not self.do_ipv6: - logger.warning(m18n.n("ip6tables_unavailable")) - - backup_folder = "/home/yunohost.backup/premigration/xtable_to_nftable/" - if not os.path.exists(backup_folder): - os.makedirs(backup_folder, 0o750) - self.backup_rules_ipv4 = os.path.join(backup_folder, "legacy_rules_ipv4") - self.backup_rules_ipv6 = os.path.join(backup_folder, "legacy_rules_ipv6") - - # Backup existing legacy rules to be able to rollback - if self.do_ipv4 and not os.path.exists(self.backup_rules_ipv4): - self.runcmd( - "iptables-legacy -L >/dev/null" - ) # For some reason if we don't do this, iptables-legacy-save is empty ? - self.runcmd("iptables-legacy-save > %s" % self.backup_rules_ipv4) - assert ( - open(self.backup_rules_ipv4).read().strip() - ), "Uhoh backup of legacy ipv4 rules is empty !?" - if self.do_ipv6 and not os.path.exists(self.backup_rules_ipv6): - self.runcmd( - "ip6tables-legacy -L >/dev/null" - ) # For some reason if we don't do this, iptables-legacy-save is empty ? - self.runcmd("ip6tables-legacy-save > %s" % self.backup_rules_ipv6) - assert ( - open(self.backup_rules_ipv6).read().strip() - ), "Uhoh backup of legacy ipv6 rules is empty !?" - - # We inject the legacy rules (iptables-legacy) into the new iptable (just "iptables") - try: - if self.do_ipv4: - self.runcmd("iptables-legacy-save | iptables-restore") - if self.do_ipv6: - self.runcmd("ip6tables-legacy-save | ip6tables-restore") - except Exception as e: - self.rollback() - raise YunohostError( - "migration_0018_failed_to_migrate_iptables_rules", error=e - ) - - # Reset everything in iptables-legacy - # Stolen from https://serverfault.com/a/200642 - try: - if self.do_ipv4: - self.runcmd( - "iptables-legacy-save | awk '/^[*]/ { print $1 }" # Keep lines like *raw, *filter and *nat - ' /^:[A-Z]+ [^-]/ { print $1 " ACCEPT" ; }' # Turn all policies to accept - " /COMMIT/ { print $0; }'" # Keep the line COMMIT - " | iptables-legacy-restore" - ) - if self.do_ipv6: - self.runcmd( - "ip6tables-legacy-save | awk '/^[*]/ { print $1 }" # Keep lines like *raw, *filter and *nat - ' /^:[A-Z]+ [^-]/ { print $1 " ACCEPT" ; }' # Turn all policies to accept - " /COMMIT/ { print $0; }'" # Keep the line COMMIT - " | ip6tables-legacy-restore" - ) - except Exception as e: - self.rollback() - raise YunohostError("migration_0018_failed_to_reset_legacy_rules", error=e) - - # You might be wondering "uh but is it really useful to - # iptables-legacy-save | iptables-restore considering firewall_reload() - # flush/resets everything anyway ?" - # But the answer is : firewall_reload() only resets the *filter table. - # On more complex setups (e.g. internet cube or docker) you will also - # have rules in the *nat (or maybe *raw?) sections of iptables. - firewall_reload() - service_restart("fail2ban") - - def rollback(self): - - if self.do_ipv4: - self.runcmd("iptables-legacy-restore < %s" % self.backup_rules_ipv4) - if self.do_ipv6: - self.runcmd("iptables-legacy-restore < %s" % self.backup_rules_ipv6) - - def runcmd(self, cmd, raise_on_errors=True): - - logger.debug("Running command: " + cmd) - - p = subprocess.Popen( - cmd, - shell=True, - executable="/bin/bash", - stdout=subprocess.PIPE, - stderr=subprocess.PIPE, - ) - - out, err = p.communicate() - returncode = p.returncode - if raise_on_errors and returncode != 0: - raise YunohostError( - "Failed to run command '{}'.\nreturncode: {}\nstdout:\n{}\nstderr:\n{}\n".format( - cmd, returncode, out, err - ) - ) - - out = out.strip().split(b"\n") - return (returncode, out, err) diff --git a/src/yunohost/data_migrations/0019_extend_permissions_features.py b/src/yunohost/data_migrations/0019_extend_permissions_features.py deleted file mode 100644 index 5d4343deb..000000000 --- a/src/yunohost/data_migrations/0019_extend_permissions_features.py +++ /dev/null @@ -1,107 +0,0 @@ -from moulinette import m18n -from moulinette.utils.log import getActionLogger - -from yunohost.tools import Migration -from yunohost.permission import user_permission_list -from yunohost.utils.legacy import migrate_legacy_permission_settings - -logger = getActionLogger("yunohost.migration") - - -class MyMigration(Migration): - """ - Add protected attribute in LDAP permission - """ - - @Migration.ldap_migration - def run(self, backup_folder): - - # Update LDAP database - self.add_new_ldap_attributes() - - # Migrate old settings - migrate_legacy_permission_settings() - - def add_new_ldap_attributes(self): - - from yunohost.utils.ldap import _get_ldap_interface - from yunohost.regenconf import regen_conf, BACKUP_CONF_DIR - - # Check if the migration can be processed - ldap_regen_conf_status = regen_conf(names=["slapd"], dry_run=True) - # By this we check if the have been customized - if ldap_regen_conf_status and ldap_regen_conf_status["slapd"]["pending"]: - logger.warning( - m18n.n( - "migration_0019_slapd_config_will_be_overwritten", - conf_backup_folder=BACKUP_CONF_DIR, - ) - ) - - # Update LDAP schema restart slapd - logger.info(m18n.n("migration_update_LDAP_schema")) - regen_conf(names=["slapd"], force=True) - - logger.info(m18n.n("migration_0019_add_new_attributes_in_ldap")) - ldap = _get_ldap_interface() - permission_list = user_permission_list(full=True)["permissions"] - - for permission in permission_list: - system_perms = { - "mail": "E-mail", - "xmpp": "XMPP", - "ssh": "SSH", - "sftp": "STFP", - } - if permission.split(".")[0] in system_perms: - update = { - "authHeader": ["FALSE"], - "label": [system_perms[permission.split(".")[0]]], - "showTile": ["FALSE"], - "isProtected": ["TRUE"], - } - else: - app, subperm_name = permission.split(".") - if permission.endswith(".main"): - update = { - "authHeader": ["TRUE"], - "label": [ - app - ], # Note that this is later re-changed during the call to migrate_legacy_permission_settings() if a 'label' setting exists - "showTile": ["TRUE"], - "isProtected": ["FALSE"], - } - else: - update = { - "authHeader": ["TRUE"], - "label": [subperm_name.title()], - "showTile": ["FALSE"], - "isProtected": ["TRUE"], - } - - ldap.update("cn=%s,ou=permission" % permission, update) - - introduced_in_version = "4.1" - - def run_after_system_restore(self): - # Update LDAP database - self.add_new_ldap_attributes() - - def run_before_app_restore(self, app_id): - from yunohost.app import app_setting - from yunohost.utils.legacy import migrate_legacy_permission_settings - - # Migrate old settings - legacy_permission_settings = [ - "skipped_uris", - "unprotected_uris", - "protected_uris", - "skipped_regex", - "unprotected_regex", - "protected_regex", - ] - if any( - app_setting(app_id, setting) is not None - for setting in legacy_permission_settings - ): - migrate_legacy_permission_settings(app=app_id) diff --git a/src/yunohost/data_migrations/0020_ssh_sftp_permissions.py b/src/yunohost/data_migrations/0020_ssh_sftp_permissions.py deleted file mode 100644 index f1dbcd1e7..000000000 --- a/src/yunohost/data_migrations/0020_ssh_sftp_permissions.py +++ /dev/null @@ -1,100 +0,0 @@ -import subprocess -import os - -from moulinette import m18n -from moulinette.utils.log import getActionLogger - -from yunohost.tools import Migration -from yunohost.permission import user_permission_update, permission_sync_to_user -from yunohost.regenconf import manually_modified_files - -logger = getActionLogger("yunohost.migration") - -################################################### -# Tools used also for restoration -################################################### - - -class MyMigration(Migration): - """ - Add new permissions around SSH/SFTP features - """ - - introduced_in_version = "4.2.2" - dependencies = ["extend_permissions_features"] - - @Migration.ldap_migration - def run(self, *args): - - from yunohost.utils.ldap import _get_ldap_interface - - ldap = _get_ldap_interface() - - existing_perms_raw = ldap.search( - "ou=permission,dc=yunohost,dc=org", "(objectclass=permissionYnh)", ["cn"] - ) - existing_perms = [perm["cn"][0] for perm in existing_perms_raw] - - # Add SSH and SFTP permissions - if "sftp.main" not in existing_perms: - ldap.add( - "cn=sftp.main,ou=permission", - { - "cn": "sftp.main", - "gidNumber": "5004", - "objectClass": ["posixGroup", "permissionYnh"], - "groupPermission": [], - "authHeader": "FALSE", - "label": "SFTP", - "showTile": "FALSE", - "isProtected": "TRUE", - }, - ) - - if "ssh.main" not in existing_perms: - ldap.add( - "cn=ssh.main,ou=permission", - { - "cn": "ssh.main", - "gidNumber": "5003", - "objectClass": ["posixGroup", "permissionYnh"], - "groupPermission": [], - "authHeader": "FALSE", - "label": "SSH", - "showTile": "FALSE", - "isProtected": "TRUE", - }, - ) - - # Add a bash terminal to each users - users = ldap.search( - "ou=users,dc=yunohost,dc=org", - filter="(loginShell=*)", - attrs=["dn", "uid", "loginShell"], - ) - for user in users: - if user["loginShell"][0] == "/bin/false": - dn = user["dn"][0].replace(",dc=yunohost,dc=org", "") - ldap.update(dn, {"loginShell": ["/bin/bash"]}) - else: - user_permission_update( - "ssh.main", add=user["uid"][0], sync_perm=False - ) - - permission_sync_to_user() - - # Somehow this is needed otherwise the PAM thing doesn't forget about the - # old loginShell value ? - subprocess.call(["nscd", "-i", "passwd"]) - - if ( - "/etc/ssh/sshd_config" in manually_modified_files() - and os.system( - "grep -q '^ *AllowGroups\\|^ *AllowUsers' /etc/ssh/sshd_config" - ) - != 0 - ): - logger.error(m18n.n("diagnosis_sshd_config_insecure")) - - def run_after_system_restore(self): - self.run() diff --git a/src/yunohost/dyndns.py b/src/yunohost/dyndns.py index c8249e439..ae49759d2 100644 --- a/src/yunohost/dyndns.py +++ b/src/yunohost/dyndns.py @@ -375,18 +375,6 @@ def dyndns_update( ) -def dyndns_installcron(): - logger.warning( - "This command is deprecated. The dyndns cron job should automatically be added/removed by the regenconf depending if there's a private key in /etc/yunohost/dyndns. You can run the regenconf yourself with 'yunohost tools regen-conf yunohost'." - ) - - -def dyndns_removecron(): - logger.warning( - "This command is deprecated. The dyndns cron job should automatically be added/removed by the regenconf depending if there's a private key in /etc/yunohost/dyndns. You can run the regenconf yourself with 'yunohost tools regen-conf yunohost'." - ) - - def _guess_current_dyndns_domain(dyn_host): """ This function tries to guess which domain should be updated by diff --git a/src/yunohost/service.py b/src/yunohost/service.py index 912662600..62f40d29c 100644 --- a/src/yunohost/service.py +++ b/src/yunohost/service.py @@ -48,12 +48,10 @@ def service_add( name, description=None, log=None, - log_type=None, test_status=None, test_conf=None, needs_exposed_ports=None, need_lock=False, - status=None, ): """ Add a custom service @@ -62,12 +60,10 @@ def service_add( name -- Service name to add description -- description of the service log -- Absolute path to log file to display - log_type -- (deprecated) Specify if the corresponding log is a file or a systemd log test_status -- Specify a custom bash command to check the status of the service. N.B. : it only makes sense to specify this if the corresponding systemd service does not return the proper information. test_conf -- Specify a custom bash command to check if the configuration of the service is valid or broken, similar to nginx -t. needs_exposed_ports -- A list of ports that needs to be publicly exposed for the service to work as intended. need_lock -- Use this option to prevent deadlocks if the service does invoke yunohost commands. - status -- Deprecated, doesn't do anything anymore. Use test_status instead. """ services = _get_services() @@ -77,15 +73,6 @@ def service_add( if not isinstance(log, list): log = [log] - # Deprecated log_type stuff - if log_type is not None: - logger.warning( - "/!\\ Packagers! --log_type is deprecated. You do not need to specify --log_type systemd anymore ... Yunohost now automatically fetch the journalctl of the systemd service by default." - ) - # Usually when adding such a service, the service name will be provided so we remove it as it's not a log file path - if name in log: - log.remove(name) - service["log"] = log if not description: @@ -535,29 +522,6 @@ def service_log(name, number=50): return result -def service_regen_conf( - names=[], with_diff=False, force=False, dry_run=False, list_pending=False -): - - services = _get_services() - - if isinstance(names, str): - names = [names] - - for name in names: - if name not in services.keys(): - raise YunohostValidationError("service_unknown", service=name) - - if names is []: - names = list(services.keys()) - - logger.warning(m18n.n("service_regen_conf_is_deprecated")) - - from yunohost.regenconf import regen_conf - - return regen_conf(names, with_diff, force, dry_run, list_pending) - - def _run_service_command(action, service): """ Run services management command (start, stop, enable, disable, restart, reload) diff --git a/src/yunohost/tools.py b/src/yunohost/tools.py index d9e057875..95b89acd0 100644 --- a/src/yunohost/tools.py +++ b/src/yunohost/tools.py @@ -329,24 +329,12 @@ def tools_regen_conf( return regen_conf(names, with_diff, force, dry_run, list_pending) -def tools_update(target=None, apps=False, system=False): +def tools_update(target=None): """ Update apps & system package cache """ - # Legacy options (--system, --apps) - if apps or system: - logger.warning( - "Using 'yunohost tools update' with --apps / --system is deprecated, just write 'yunohost tools update apps system' (no -- prefix anymore)" - ) - if apps and system: - target = "all" - elif apps: - target = "apps" - else: - target = "system" - - elif not target: + if not target: target = "all" if target not in ["system", "apps", "all"]: @@ -455,7 +443,7 @@ def _list_upgradable_apps(): @is_unit_operation() def tools_upgrade( - operation_logger, target=None, apps=False, system=False, allow_yunohost_upgrade=True + operation_logger, target=None, allow_yunohost_upgrade=True ): """ Update apps & package cache, then display changelog @@ -473,21 +461,6 @@ def tools_upgrade( if not packages.dpkg_lock_available(): raise YunohostValidationError("dpkg_lock_not_available") - # Legacy options management (--system, --apps) - if target is None: - - logger.warning( - "Using 'yunohost tools upgrade' with --apps / --system is deprecated, just write 'yunohost tools upgrade apps' or 'system' (no -- prefix anymore)" - ) - - if (system, apps) == (True, True): - raise YunohostValidationError("tools_upgrade_cant_both") - - if (system, apps) == (False, False): - raise YunohostValidationError("tools_upgrade_at_least_one") - - target = "apps" if apps else "system" - if target not in ["apps", "system"]: raise Exception( "Uhoh ?! tools_upgrade should have 'apps' or 'system' value for argument target" diff --git a/src/yunohost/user.py b/src/yunohost/user.py index 266c2774c..e7422acfd 100644 --- a/src/yunohost/user.py +++ b/src/yunohost/user.py @@ -98,7 +98,6 @@ def user_create( domain, password, mailbox_quota="0", - mail=None, ): from yunohost.domain import domain_list, _get_maindomain @@ -109,12 +108,6 @@ def user_create( # Ensure sufficiently complex password assert_password_is_strong_enough("user", password) - if mail is not None: - logger.warning( - "Packagers ! Using --mail in 'yunohost user create' is deprecated ... please use --domain instead." - ) - domain = mail.split("@")[-1] - # Validate domain used for email address/xmpp account if domain is None: if msettings.get("interface") == "api": diff --git a/src/yunohost/utils/legacy.py b/src/yunohost/utils/legacy.py deleted file mode 100644 index eb92dd71f..000000000 --- a/src/yunohost/utils/legacy.py +++ /dev/null @@ -1,239 +0,0 @@ -import os -from moulinette import m18n -from moulinette.utils.log import getActionLogger -from moulinette.utils.filesystem import write_to_json, read_yaml - -from yunohost.user import user_list -from yunohost.app import ( - _installed_apps, - _get_app_settings, - _set_app_settings, -) -from yunohost.permission import ( - permission_create, - user_permission_update, - permission_sync_to_user, -) - -logger = getActionLogger("yunohost.legacy") - -LEGACY_PERMISSION_LABEL = { - ("nextcloud", "skipped"): "api", # .well-known - ("libreto", "skipped"): "pad access", # /[^/]+ - ("leed", "skipped"): "api", # /action.php, for cron task ... - ("mailman", "protected"): "admin", # /admin - ("prettynoemiecms", "protected"): "admin", # /admin - ("etherpad_mypads", "skipped"): "admin", # /admin - ("baikal", "protected"): "admin", # /admin/ - ("couchpotato", "unprotected"): "api", # /api - ("freshrss", "skipped"): "api", # /api/, - ("portainer", "skipped"): "api", # /api/webhooks/ - ("jeedom", "unprotected"): "api", # /core/api/jeeApi.php - ("bozon", "protected"): "user interface", # /index.php - ( - "limesurvey", - "protected", - ): "admin", # /index.php?r=admin,/index.php?r=plugins,/scripts - ("kanboard", "unprotected"): "api", # /jsonrpc.php - ("seafile", "unprotected"): "medias", # /media - ("ttrss", "skipped"): "api", # /public.php,/api,/opml.php?op=publish - ("libreerp", "protected"): "admin", # /web/database/manager - ("z-push", "skipped"): "api", # $domain/[Aa]uto[Dd]iscover/.* - ("radicale", "skipped"): "?", # $domain$path_url - ( - "jirafeau", - "protected", - ): "user interface", # $domain$path_url/$","$domain$path_url/admin.php.*$ - ("opensondage", "protected"): "admin", # $domain$path_url/admin/ - ( - "lstu", - "protected", - ): "user interface", # $domain$path_url/login$","$domain$path_url/logout$","$domain$path_url/api$","$domain$path_url/extensions$","$domain$path_url/stats$","$domain$path_url/d/.*$","$domain$path_url/a$","$domain$path_url/$ - ( - "lutim", - "protected", - ): "user interface", # $domain$path_url/stats/?$","$domain$path_url/manifest.webapp/?$","$domain$path_url/?$","$domain$path_url/[d-m]/.*$ - ( - "lufi", - "protected", - ): "user interface", # $domain$path_url/stats$","$domain$path_url/manifest.webapp$","$domain$path_url/$","$domain$path_url/d/.*$","$domain$path_url/m/.*$ - ( - "gogs", - "skipped", - ): "api", # $excaped_domain$excaped_path/[%w-.]*/[%w-.]*/git%-receive%-pack,$excaped_domain$excaped_path/[%w-.]*/[%w-.]*/git%-upload%-pack,$excaped_domain$excaped_path/[%w-.]*/[%w-.]*/info/refs -} - - -def legacy_permission_label(app, permission_type): - return LEGACY_PERMISSION_LABEL.get( - (app, permission_type), "Legacy %s urls" % permission_type - ) - - -def migrate_legacy_permission_settings(app=None): - - logger.info(m18n.n("migrating_legacy_permission_settings")) - apps = _installed_apps() - - if app: - if app not in apps: - logger.error( - "Can't migrate permission for app %s because it ain't installed..." - % app - ) - apps = [] - else: - apps = [app] - - for app in apps: - - settings = _get_app_settings(app) or {} - if settings.get("label"): - user_permission_update( - app + ".main", label=settings["label"], sync_perm=False - ) - del settings["label"] - - def _setting(name): - s = settings.get(name) - return s.split(",") if s else [] - - skipped_urls = [uri for uri in _setting("skipped_uris") if uri != "/"] - skipped_urls += ["re:" + regex for regex in _setting("skipped_regex")] - unprotected_urls = [uri for uri in _setting("unprotected_uris") if uri != "/"] - unprotected_urls += ["re:" + regex for regex in _setting("unprotected_regex")] - protected_urls = [uri for uri in _setting("protected_uris") if uri != "/"] - protected_urls += ["re:" + regex for regex in _setting("protected_regex")] - - if skipped_urls != []: - permission_create( - app + ".legacy_skipped_uris", - additional_urls=skipped_urls, - auth_header=False, - label=legacy_permission_label(app, "skipped"), - show_tile=False, - allowed="visitors", - protected=True, - sync_perm=False, - ) - if unprotected_urls != []: - permission_create( - app + ".legacy_unprotected_uris", - additional_urls=unprotected_urls, - auth_header=True, - label=legacy_permission_label(app, "unprotected"), - show_tile=False, - allowed="visitors", - protected=True, - sync_perm=False, - ) - if protected_urls != []: - permission_create( - app + ".legacy_protected_uris", - additional_urls=protected_urls, - auth_header=True, - label=legacy_permission_label(app, "protected"), - show_tile=False, - allowed=[], - protected=True, - sync_perm=False, - ) - - legacy_permission_settings = [ - "skipped_uris", - "unprotected_uris", - "protected_uris", - "skipped_regex", - "unprotected_regex", - "protected_regex", - ] - for key in legacy_permission_settings: - if key in settings: - del settings[key] - - _set_app_settings(app, settings) - - permission_sync_to_user() - - -def translate_legacy_rules_in_ssowant_conf_json_persistent(): - - persistent_file_name = "/etc/ssowat/conf.json.persistent" - if not os.path.exists(persistent_file_name): - return - - # Ugly hack because for some reason so many people have tabs in their conf.json.persistent ... - os.system(r"sed -i 's/\t/ /g' /etc/ssowat/conf.json.persistent") - - # Ugly hack to try not to misarably fail migration - persistent = read_yaml(persistent_file_name) - - legacy_rules = [ - "skipped_urls", - "unprotected_urls", - "protected_urls", - "skipped_regex", - "unprotected_regex", - "protected_regex", - ] - - if not any(legacy_rule in persistent for legacy_rule in legacy_rules): - return - - if not isinstance(persistent.get("permissions"), dict): - persistent["permissions"] = {} - - skipped_urls = persistent.get("skipped_urls", []) + [ - "re:" + r for r in persistent.get("skipped_regex", []) - ] - protected_urls = persistent.get("protected_urls", []) + [ - "re:" + r for r in persistent.get("protected_regex", []) - ] - unprotected_urls = persistent.get("unprotected_urls", []) + [ - "re:" + r for r in persistent.get("unprotected_regex", []) - ] - - known_users = list(user_list()["users"].keys()) - - for legacy_rule in legacy_rules: - if legacy_rule in persistent: - del persistent[legacy_rule] - - if skipped_urls: - persistent["permissions"]["custom_skipped"] = { - "users": [], - "label": "Custom permissions - skipped", - "show_tile": False, - "auth_header": False, - "public": True, - "uris": skipped_urls - + persistent["permissions"].get("custom_skipped", {}).get("uris", []), - } - - if unprotected_urls: - persistent["permissions"]["custom_unprotected"] = { - "users": [], - "label": "Custom permissions - unprotected", - "show_tile": False, - "auth_header": True, - "public": True, - "uris": unprotected_urls - + persistent["permissions"].get("custom_unprotected", {}).get("uris", []), - } - - if protected_urls: - persistent["permissions"]["custom_protected"] = { - "users": known_users, - "label": "Custom permissions - protected", - "show_tile": False, - "auth_header": True, - "public": False, - "uris": protected_urls - + persistent["permissions"].get("custom_protected", {}).get("uris", []), - } - - write_to_json(persistent_file_name, persistent, sort_keys=True, indent=4) - - logger.warning( - "YunoHost automatically translated some legacy rules in /etc/ssowat/conf.json.persistent to match the new permission system" - ) From 91d3d15c32a9d5739bad3596e426ebda3b19c010 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Fri, 28 May 2021 17:22:55 +0200 Subject: [PATCH 015/146] Bump conflict version for openssl because version in bullseye repo is now 1.1.1k --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index 21485b114..f123239eb 100644 --- a/debian/control +++ b/debian/control @@ -41,7 +41,7 @@ Conflicts: iptables-persistent , apache2 , bind9 , nginx-extras (>= 1.19) - , openssl (>= 1.1.1j-2) + , openssl (>= 1.1.1l-1) , slapd (>= 2.4.58) , dovecot-core (>= 1:2.3.14) , redis-server (>= 5:6.0.12) From e2a3a0bedf4b0ca532578201727eca70075b81a6 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 30 May 2021 17:55:39 +0200 Subject: [PATCH 016/146] Fix 'from_version' issue because of ~alpha in current bullseye version name --- src/yunohost/backup.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/yunohost/backup.py b/src/yunohost/backup.py index 862c07690..b94eda683 100644 --- a/src/yunohost/backup.py +++ b/src/yunohost/backup.py @@ -860,9 +860,13 @@ class RestoreManager: # FIXME this way to get the info is not compatible with copy or custom # backup methods self.info = backup_info(name, with_details=True) - if not self.info["from_yunohost_version"] or version.parse( - self.info["from_yunohost_version"] - ) < version.parse("3.8.0"): + + from_version = self.info.get("from_yunohost_version", "") + # Remove any '~foobar' in the version ... c.f ~alpha, ~beta version during + # early dev for next debian version + from_version = re.sub(r'~\w+', '', from_version) + + if not from_version or version.parse(from_version) < version.parse("3.8.0"): raise YunohostValidationError("restore_backup_too_old") self.archive_path = self.info["path"] From cb129e2bf17de6997833555f09e5caa5d030b37e Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 30 May 2021 18:48:26 +0200 Subject: [PATCH 017/146] Fix compat issue in equivs helper --- data/helpers.d/apt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/data/helpers.d/apt b/data/helpers.d/apt index c3439a583..da87e7bad 100644 --- a/data/helpers.d/apt +++ b/data/helpers.d/apt @@ -181,8 +181,9 @@ ynh_package_install_from_equivs () { # Build and install the package local TMPDIR=$(mktemp --directory) - # Force the compatibility level at 10, levels below are deprecated - echo 10 > /usr/share/equivs/template/debian/compat + # Make sure to delete the legacy compat file + # It's now handle somewhat magically through the control file + rm -f /usr/share/equivs/template/debian/compat # Note that the cd executes into a sub shell # Create a fake deb package with equivs-build and the given control file From 5046e49c8b8dd051319bd35f7f7b5b70c7d39c90 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 30 May 2021 19:03:44 +0200 Subject: [PATCH 018/146] Many app explicitly specify YNH_PHP_VERSION=7.3, then trying to install php7.3-foo which doesn't exist ... so gotta yolopatch that definition ... --- src/yunohost/app.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/yunohost/app.py b/src/yunohost/app.py index 4e2cd5317..eafff1db3 100644 --- a/src/yunohost/app.py +++ b/src/yunohost/app.py @@ -3475,6 +3475,7 @@ LEGACY_PHP_VERSION_REPLACEMENTS = [ ("php5", "php7.4"), ("php7.0", "php7.4"), ("php7.3", "php7.4"), + ('YNH_PHP_VERSION="7.3"', 'YNH_PHP_VERSION="7.4"'), ( 'phpversion="${phpversion:-7.0}"', 'phpversion="${phpversion:-7.4}"', From ba2428d9b9db734e1fa394f973a0d2fec6bd9d34 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 30 May 2021 19:07:30 +0200 Subject: [PATCH 019/146] equivs-build now sends its logs to stderr but we don't really care about what it says, redirect to debug --- data/helpers.d/apt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/helpers.d/apt b/data/helpers.d/apt index da87e7bad..4f48c2172 100644 --- a/data/helpers.d/apt +++ b/data/helpers.d/apt @@ -192,7 +192,7 @@ ynh_package_install_from_equivs () { ynh_wait_dpkg_free cp "$controlfile" "${TMPDIR}/control" (cd "$TMPDIR" - LC_ALL=C equivs-build ./control 1> /dev/null + LC_ALL=C equivs-build ./control 2>&1 LC_ALL=C dpkg --force-depends --install "./${pkgname}_${pkgversion}_all.deb" 2>&1 | tee ./dpkg_log) ynh_package_install --fix-broken || \ From c794e63f67b06407c9e180f6cbce99d3a40ced42 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 31 May 2021 16:00:23 +0200 Subject: [PATCH 020/146] Re-add missing nginx dependency in debian/control ..\! --- debian/control | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/control b/debian/control index f123239eb..cc39a838c 100644 --- a/debian/control +++ b/debian/control @@ -15,6 +15,7 @@ Depends: ${python3:Depends}, ${misc:Depends} , python3-miniupnpc, python3-dbus, python3-jinja2 , python3-toml, python3-packaging, python3-publicsuffix2 , python-is-python3 + , nginx, nginx-extras (>=1.18) , apt, apt-transport-https, apt-utils, dirmngr , php7.4-common, php7.4-fpm, php7.4-ldap, php7.4-intl , mariadb-server, php7.4-mysql From 473bff6e5dfeecd744d5fb88d686867669a1e722 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 31 May 2021 18:46:28 +0200 Subject: [PATCH 021/146] Draft for bullseye migration --- .../0021_migrate_to_bullseye.py | 252 ++++++++++++++++++ 1 file changed, 252 insertions(+) create mode 100644 src/yunohost/data_migrations/0021_migrate_to_bullseye.py diff --git a/src/yunohost/data_migrations/0021_migrate_to_bullseye.py b/src/yunohost/data_migrations/0021_migrate_to_bullseye.py new file mode 100644 index 000000000..289e9d765 --- /dev/null +++ b/src/yunohost/data_migrations/0021_migrate_to_bullseye.py @@ -0,0 +1,252 @@ +import glob +import os + +from moulinette import m18n +from yunohost.utils.error import YunohostError +from moulinette.utils.log import getActionLogger +from moulinette.utils.process import check_output, call_async_output +from moulinette.utils.filesystem import read_file + +from yunohost.tools import Migration, tools_update, tools_upgrade +from yunohost.app import unstable_apps +from yunohost.regenconf import manually_modified_files +from yunohost.utils.filesystem import free_space_in_directory +from yunohost.utils.packages import ( + get_ynh_package_version, + _list_upgradable_apt_packages, +) + +logger = getActionLogger("yunohost.migration") + +N_CURRENT_DEBIAN = 10 +N_CURRENT_YUNOHOST = 4 + +N_NEXT_DEBAN = 11 +N_NEXT_YUNOHOST == 11 + +class MyMigration(Migration): + + "Upgrade the system to Debian Bullseye and Yunohost 11.x" + + mode = "manual" + + def run(self): + + self.check_assertions() + + logger.info(m18n.n("migration_0021_start")) + + # + # Patch sources.list + # + logger.info(m18n.n("migration_0021_patching_sources_list")) + self.patch_apt_sources_list() + tools_update(target="system") + + # Tell libc6 it's okay to restart system stuff during the upgrade + os.system( + "echo 'libc6 libraries/restart-without-asking boolean true' | debconf-set-selections" + ) + + # Don't send an email to root about the postgresql migration. It should be handled automatically after. + os.system( + "echo 'postgresql-common postgresql-common/obsolete-major seen true' | debconf-set-selections" + ) + + # + # Specific packages upgrades + # + logger.info(m18n.n("migration_0021_specific_upgrade")) + + # + # Main upgrade + # + logger.info(m18n.n("migration_0021_main_upgrade")) + + self.patch_yunohost_conflicts() + + apps_packages = self.get_apps_equivs_packages() + self.hold(apps_packages) + tools_upgrade(target="system", allow_yunohost_upgrade=False) + + if self.debian_major_version() == N_CURRENT_DEBIAN: + raise YunohostError("migration_0021_still_on_buster_after_main_upgrade") + + # Clean the mess + logger.info(m18n.n("migration_0021_cleaning_up")) + os.system("apt autoremove --assume-yes") + os.system("apt clean --assume-yes") + + # + # Yunohost upgrade + # + logger.info(m18n.n("migration_0021_yunohost_upgrade")) + self.unhold(apps_packages) + tools_upgrade(target="system") + + def debian_major_version(self): + # The python module "platform" and lsb_release are not reliable because + # on some setup, they may still return Release=9 even after upgrading to + # buster ... (Apparently this is related to OVH overriding some stuff + # with /etc/lsb-release for instance -_-) + # Instead, we rely on /etc/os-release which should be the raw info from + # the distribution... + return int( + check_output( + "grep VERSION_ID /etc/os-release | head -n 1 | tr '\"' ' ' | cut -d ' ' -f2" + ) + ) + + def yunohost_major_version(self): + return int(get_ynh_package_version("yunohost")["version"].split(".")[0]) + + def check_assertions(self): + + # Be on buster (10.x) and yunohost 4.x + # NB : we do both check to cover situations where the upgrade crashed + # in the middle and debian version could be > 9.x but yunohost package + # would still be in 3.x... + if ( + not self.debian_major_version() == N_CURRENT_DEBIAN + and not self.yunohost_major_version() == N_CURRENT_YUNOHOST + ): + raise YunohostError("migration_0021_not_buster") + + # Have > 1 Go free space on /var/ ? + if free_space_in_directory("/var/") / (1024 ** 3) < 1.0: + raise YunohostError("migration_0021_not_enough_free_space") + + # Check system is up to date + # (but we don't if 'bullseye' is already in the sources.list ... + # which means maybe a previous upgrade crashed and we're re-running it) + if " bullseye " not in read_file("/etc/apt/sources.list"): + tools_update(target="system") + upgradable_system_packages = list(_list_upgradable_apt_packages()) + if upgradable_system_packages: + raise YunohostError("migration_0021_system_not_fully_up_to_date") + + @property + def disclaimer(self): + + # Avoid having a super long disclaimer + uncessary check if we ain't + # on buster / yunohost 4.x anymore + # NB : we do both check to cover situations where the upgrade crashed + # in the middle and debian version could be >= 10.x but yunohost package + # would still be in 4.x... + if ( + not self.debian_major_version() == N_CURRENT_DEBIAN + and not self.yunohost_major_version() == N_CURRENT_YUNOHOST + ): + return None + + # Get list of problematic apps ? I.e. not official or community+working + problematic_apps = unstable_apps() + problematic_apps = "".join(["\n - " + app for app in problematic_apps]) + + # Manually modified files ? (c.f. yunohost service regen-conf) + modified_files = manually_modified_files() + modified_files = "".join(["\n - " + f for f in modified_files]) + + message = m18n.n("migration_0021_general_warning") + + # FIXME: re-enable this message with updated topic link once we release the migration as stable + #message = ( + # "N.B.: This migration has been tested by the community over the last few months but has only been declared stable recently. If your server hosts critical services and if you are not too confident with debugging possible issues, we recommend you to wait a little bit more while we gather more feedback and polish things up. If on the other hand you are relatively confident with debugging small issues that may arise, you are encouraged to run this migration ;)! You can read about remaining known issues and feedback from the community here: https://forum.yunohost.org/t/12195\n\n" + # + message + #) + + if problematic_apps: + message += "\n\n" + m18n.n( + "migration_0021_problematic_apps_warning", + problematic_apps=problematic_apps, + ) + + if modified_files: + message += "\n\n" + m18n.n( + "migration_0021_modified_files", manually_modified_files=modified_files + ) + + return message + + def patch_apt_sources_list(self): + + sources_list = glob.glob("/etc/apt/sources.list.d/*.list") + sources_list.append("/etc/apt/sources.list") + + # This : + # - replace single 'buster' occurence by 'bulleye' + # - comments lines containing "backports" + # - replace 'buster/updates' by 'bullseye/updates' (or same with -) + for f in sources_list: + command = ( + f"sed -i {f} " + "-e 's@ buster @ bullseye @g' " + "-e '/backports/ s@^#*@#@' " + "-e 's@ buster/updates @ bullseye/updates @g' " + "-e 's@ buster-@ bullseye-@g' " + ) + os.system(command) + + def get_apps_equivs_packages(self): + + command = ( + "dpkg --get-selections" + " | grep -v deinstall" + " | awk '{print $1}'" + " | { grep 'ynh-deps$' || true; }" + ) + + output = check_output(command) + + return output.split("\n") if output else [] + + def hold(self, packages): + for package in packages: + os.system("apt-mark hold {}".format(package)) + + def unhold(self, packages): + for package in packages: + os.system("apt-mark unhold {}".format(package)) + + def apt_install(self, cmd): + def is_relevant(line): + return "Reading database ..." not in line.rstrip() + + callbacks = ( + lambda l: logger.info("+ " + l.rstrip() + "\r") + if is_relevant(l) + else logger.debug(l.rstrip() + "\r"), + lambda l: logger.warning(l.rstrip()), + ) + + cmd = ( + "LC_ALL=C DEBIAN_FRONTEND=noninteractive APT_LISTCHANGES_FRONTEND=none apt install --quiet -o=Dpkg::Use-Pty=0 --fix-broken --assume-yes " + + cmd + ) + + logger.debug("Running: %s" % cmd) + + call_async_output(cmd, callbacks, shell=True) + + + def patch_yunohost_conflicts(self): + # + # This is a super dirty hack to remove the conflicts from yunohost's debian/control file + # Those conflicts are there to prevent mistakenly upgrading critical packages + # such as dovecot, postfix, nginx, openssl, etc... usually related to mistakenly + # using backports etc. + # + # The hack consists in savagely removing the conflicts directly in /var/lib/dpkg/status + # + + # We only patch the conflict if we're on yunohost 4.x + if self.yunohost_major_version() != N_CURRENT_YUNOHOST: + return + + conflicts = check_output("dpkg-query -s yunohost | grep '^Conflicts:'").strip() + if conflicts: + # We want to keep conflicting with apache/bind9 tho + new_conflicts = "Conflicts: apache2, bind9" + + command = f"sed -i /var/lib/dpkg/status 's@{conflicts}@{new_conflicts}@g'" + os.system(command) From d6baad6f45abf70b8f062fcd73f32a2cad975261 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 31 May 2021 19:02:05 +0200 Subject: [PATCH 022/146] Postgresql version is 13 in bullseye --- data/helpers.d/postgresql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/helpers.d/postgresql b/data/helpers.d/postgresql index 12738a922..e190ce419 100644 --- a/data/helpers.d/postgresql +++ b/data/helpers.d/postgresql @@ -1,7 +1,7 @@ #!/bin/bash PSQL_ROOT_PWD_FILE=/etc/yunohost/psql -PSQL_VERSION=11 +PSQL_VERSION=13 # Open a connection as a user # From da57653a01770e130a53c6e732ee6dac61035790 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 31 May 2021 19:12:08 +0200 Subject: [PATCH 023/146] Misc fixes after tests on the battlefield --- .../data_migrations/0021_migrate_to_bullseye.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/yunohost/data_migrations/0021_migrate_to_bullseye.py b/src/yunohost/data_migrations/0021_migrate_to_bullseye.py index 289e9d765..a5bb1e523 100644 --- a/src/yunohost/data_migrations/0021_migrate_to_bullseye.py +++ b/src/yunohost/data_migrations/0021_migrate_to_bullseye.py @@ -22,7 +22,7 @@ N_CURRENT_DEBIAN = 10 N_CURRENT_YUNOHOST = 4 N_NEXT_DEBAN = 11 -N_NEXT_YUNOHOST == 11 +N_NEXT_YUNOHOST = 11 class MyMigration(Migration): @@ -54,17 +54,17 @@ class MyMigration(Migration): ) # - # Specific packages upgrades + # Patch yunohost conflicts # - logger.info(m18n.n("migration_0021_specific_upgrade")) + logger.info(m18n.n("migration_0021_patch_yunohost_conflicts")) + + self.patch_yunohost_conflicts() # # Main upgrade # logger.info(m18n.n("migration_0021_main_upgrade")) - self.patch_yunohost_conflicts() - apps_packages = self.get_apps_equivs_packages() self.hold(apps_packages) tools_upgrade(target="system", allow_yunohost_upgrade=False) @@ -248,5 +248,6 @@ class MyMigration(Migration): # We want to keep conflicting with apache/bind9 tho new_conflicts = "Conflicts: apache2, bind9" - command = f"sed -i /var/lib/dpkg/status 's@{conflicts}@{new_conflicts}@g'" + command = f"sed -i /var/lib/dpkg/status -e 's@{conflicts}@{new_conflicts}@g'" + logger.debug(f"Running: {command}") os.system(command) From 24211a90bc6ea250c904454fbc6bf8ba1bc7287a Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Fri, 4 Jun 2021 17:17:27 +0200 Subject: [PATCH 024/146] Yolo php7.3 -> php7.4 migration --- locales/en.json | 1 + src/yunohost/app.py | 16 +++- .../0022_php73_to_php74_pools.py | 83 +++++++++++++++++++ 3 files changed, 96 insertions(+), 4 deletions(-) create mode 100644 src/yunohost/data_migrations/0022_php73_to_php74_pools.py diff --git a/locales/en.json b/locales/en.json index 813688a87..922ece34a 100644 --- a/locales/en.json +++ b/locales/en.json @@ -426,6 +426,7 @@ "migration_description_0018_xtable_to_nftable": "Migrate old network traffic rules to the new nftable system", "migration_description_0019_extend_permissions_features": "Extend/rework the app permission management system", "migration_description_0020_ssh_sftp_permissions": "Add SSH and SFTP permissions support", + "migration_description_0022_php73_to_php74_pools": "Migrate php7.3-fpm 'pool' conf files to php7.4", "migration_ldap_backup_before_migration": "Creating a backup of LDAP database and apps settings prior to the actual migration.", "migration_ldap_can_not_backup_before_migration": "The backup of the system could not be completed before the migration failed. Error: {error:s}", "migration_ldap_migration_failed_trying_to_rollback": "Could not migrate... trying to roll back the system.", diff --git a/src/yunohost/app.py b/src/yunohost/app.py index eafff1db3..98a8053e7 100644 --- a/src/yunohost/app.py +++ b/src/yunohost/app.py @@ -3480,10 +3480,18 @@ LEGACY_PHP_VERSION_REPLACEMENTS = [ 'phpversion="${phpversion:-7.0}"', 'phpversion="${phpversion:-7.4}"', ), # Many helpers like the composer ones use 7.0 by default ... + ( + 'phpversion="${phpversion:-7.3}"', + 'phpversion="${phpversion:-7.4}"', + ), # Many helpers like the composer ones use 7.0 by default ... ( '"$phpversion" == "7.0"', '$(bc <<< "$phpversion >= 7.4") -eq 1', ), # patch ynh_install_php to refuse installing/removing php <= 7.3 + ( + '"$phpversion" == "7.3"', + '$(bc <<< "$phpversion >= 7.4") -eq 1', + ), # patch ynh_install_php to refuse installing/removing php <= 7.3 ] @@ -3518,15 +3526,15 @@ def _patch_legacy_php_versions_in_settings(app_folder): settings = read_yaml(os.path.join(app_folder, "settings.yml")) - if settings.get("fpm_config_dir") == "/etc/php/7.0/fpm": + if settings.get("fpm_config_dir") in ["/etc/php/7.0/fpm", "/etc/php/7.3/fpm"]: settings["fpm_config_dir"] = "/etc/php/7.4/fpm" - if settings.get("fpm_service") == "php7.0-fpm": + if settings.get("fpm_service") in ["php7.0-fpm", "php7.3-fpm"]: settings["fpm_service"] = "php7.4-fpm" - if settings.get("phpversion") == "7.0": + if settings.get("phpversion") in ["7.0", "7.3"]: settings["phpversion"] = "7.4" # We delete these checksums otherwise the file will appear as manually modified - list_to_remove = ["checksum__etc_php_7.0_fpm_pool", "checksum__etc_nginx_conf.d"] + list_to_remove = ["checksum__etc_php_7.3_fpm_pool", "checksum__etc_php_7.0_fpm_pool", "checksum__etc_nginx_conf.d"] settings = { k: v for k, v in settings.items() diff --git a/src/yunohost/data_migrations/0022_php73_to_php74_pools.py b/src/yunohost/data_migrations/0022_php73_to_php74_pools.py new file mode 100644 index 000000000..0157fa275 --- /dev/null +++ b/src/yunohost/data_migrations/0022_php73_to_php74_pools.py @@ -0,0 +1,83 @@ +import os +import glob +from shutil import copy2 + +from moulinette.utils.log import getActionLogger + +from yunohost.app import _is_installed, _patch_legacy_php_versions_in_settings +from yunohost.tools import Migration +from yunohost.service import _run_service_command + +logger = getActionLogger("yunohost.migration") + +OLDPHP_POOLS = "/etc/php/7.3/fpm/pool.d" +NEWPHP_POOLS = "/etc/php/7.4/fpm/pool.d" + +OLDPHP_SOCKETS_PREFIX = "/run/php/php7.3-fpm" +NEWPHP_SOCKETS_PREFIX = "/run/php/php7.4-fpm" + +MIGRATION_COMMENT = ( + "; YunoHost note : this file was automatically moved from {}".format(OLDPHP_POOLS) +) + + +class MyMigration(Migration): + + "Migrate php7.3-fpm 'pool' conf files to php7.4" + + dependencies = ["migrate_to_bullseye"] + + def run(self): + # Get list of php7.3 pool files + oldphp_pool_files = glob.glob("{}/*.conf".format(OLDPHP_POOLS)) + + # Keep only basenames + oldphp_pool_files = [os.path.basename(f) for f in oldphp_pool_files] + + # Ignore the "www.conf" (default stuff, probably don't want to touch it ?) + oldphp_pool_files = [f for f in oldphp_pool_files if f != "www.conf"] + + for f in oldphp_pool_files: + + # Copy the files to the php7.4 pool + src = "{}/{}".format(OLDPHP_POOLS, f) + dest = "{}/{}".format(NEWPHP_POOLS, f) + copy2(src, dest) + + # Replace the socket prefix if it's found + c = "sed -i -e 's@{}@{}@g' {}".format( + OLDPHP_SOCKETS_PREFIX, NEWPHP_SOCKETS_PREFIX, dest + ) + os.system(c) + + # Also add a comment that it was automatically moved from php7.3 + # (for human traceability and backward migration) + c = "sed -i '1i {}' {}".format(MIGRATION_COMMENT, dest) + os.system(c) + + app_id = os.path.basename(f)[: -len(".conf")] + if _is_installed(app_id): + _patch_legacy_php_versions_in_settings( + "/etc/yunohost/apps/%s/" % app_id + ) + + nginx_conf_files = glob.glob("/etc/nginx/conf.d/*.d/%s.conf" % app_id) + for f in nginx_conf_files: + # Replace the socket prefix if it's found + c = "sed -i -e 's@{}@{}@g' {}".format( + OLDPHP_SOCKETS_PREFIX, NEWPHP_SOCKETS_PREFIX, f + ) + os.system(c) + + os.system( + "rm /etc/logrotate.d/php7.3-fpm" + ) # We remove this otherwise the logrotate cron will be unhappy + + # Reload/restart the php pools + _run_service_command("restart", "php7.4-fpm") + _run_service_command("enable", "php7.4-fpm") + os.system("systemctl stop php7.3-fpm") + os.system("systemctl disable php7.3-fpm") + + # Reload nginx + _run_service_command("reload", "nginx") From 4e2e54676a1c23475903823ad621f765d36c3b3a Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Fri, 4 Jun 2021 17:23:09 +0200 Subject: [PATCH 025/146] Yolo postgresql 11 -> 13 cluster migration --- locales/en.json | 4 + .../0023_postgresql_11_to_13.py | 82 +++++++++++++++++++ 2 files changed, 86 insertions(+) create mode 100644 src/yunohost/data_migrations/0023_postgresql_11_to_13.py diff --git a/locales/en.json b/locales/en.json index 922ece34a..1ab813bc4 100644 --- a/locales/en.json +++ b/locales/en.json @@ -427,6 +427,7 @@ "migration_description_0019_extend_permissions_features": "Extend/rework the app permission management system", "migration_description_0020_ssh_sftp_permissions": "Add SSH and SFTP permissions support", "migration_description_0022_php73_to_php74_pools": "Migrate php7.3-fpm 'pool' conf files to php7.4", + "migration_description_0023_postgresql_11_to_13": "Migrate databases from PostgreSQL 11 to 13", "migration_ldap_backup_before_migration": "Creating a backup of LDAP database and apps settings prior to the actual migration.", "migration_ldap_can_not_backup_before_migration": "The backup of the system could not be completed before the migration failed. Error: {error:s}", "migration_ldap_migration_failed_trying_to_rollback": "Could not migrate... trying to roll back the system.", @@ -453,6 +454,9 @@ "migration_0018_failed_to_reset_legacy_rules": "Failed to reset legacy iptables rules: {error}", "migration_0019_add_new_attributes_in_ldap": "Add new attributes for permissions in LDAP database", "migration_0019_slapd_config_will_be_overwritten": "It looks like you manually edited the slapd configuration. For this critical migration, YunoHost needs to force the update of the slapd configuration. The original files will be backuped in {conf_backup_folder}.", + "migration_0023_postgresql_11_not_installed": "PostgreSQL was not installed on your system. Nothing to do.", + "migration_0023_postgresql_13_not_installed": "PostgreSQL 11 is installed, but not postgresql 13!? Something weird might have happened on your system :(...", + "migration_0023_not_enough_space": "Make sufficient space available in {path} to run the migration.", "migrations_already_ran": "Those migrations are already done: {ids}", "migrations_cant_reach_migration_file": "Could not access migrations files at the path '%s'", "migrations_dependencies_not_satisfied": "Run these migrations: '{dependencies_id}', before migration {id}.", diff --git a/src/yunohost/data_migrations/0023_postgresql_11_to_13.py b/src/yunohost/data_migrations/0023_postgresql_11_to_13.py new file mode 100644 index 000000000..30527f0c8 --- /dev/null +++ b/src/yunohost/data_migrations/0023_postgresql_11_to_13.py @@ -0,0 +1,82 @@ +import subprocess + +from moulinette import m18n +from yunohost.utils.error import YunohostError, YunohostValidationError +from moulinette.utils.log import getActionLogger + +from yunohost.tools import Migration +from yunohost.utils.filesystem import free_space_in_directory, space_used_by_directory + +logger = getActionLogger("yunohost.migration") + + +class MyMigration(Migration): + + "Migrate DBs from Postgresql 11 to 13 after migrating to Bullseye" + + dependencies = ["migrate_to_bullseye"] + + def run(self): + + if not self.package_is_installed("postgresql-11"): + logger.warning(m18n.n("migration_0023_postgresql_11_not_installed")) + return + + if not self.package_is_installed("postgresql-13"): + raise YunohostValidationError("migration_0023_postgresql_13_not_installed") + + # Make sure there's a 11 cluster + try: + self.runcmd("pg_lsclusters | grep -q '^11 '") + except Exception: + logger.warning( + "It looks like there's not active 11 cluster, so probably don't need to run this migration" + ) + return + + if not space_used_by_directory( + "/var/lib/postgresql/11" + ) > free_space_in_directory("/var/lib/postgresql"): + raise YunohostValidationError( + "migration_0023_not_enough_space", path="/var/lib/postgresql/" + ) + + self.runcmd("systemctl stop postgresql") + self.runcmd( + "LC_ALL=C pg_dropcluster --stop 13 main || true" + ) # We do not trigger an exception if the command fails because that probably means cluster 13 doesn't exists, which is fine because it's created during the pg_upgradecluster) + self.runcmd("LC_ALL=C pg_upgradecluster -m upgrade 11 main") + self.runcmd("LC_ALL=C pg_dropcluster --stop 11 main") + self.runcmd("systemctl start postgresql") + + def package_is_installed(self, package_name): + + (returncode, out, err) = self.runcmd( + "dpkg --list | grep '^ii ' | grep -q -w {}".format(package_name), + raise_on_errors=False, + ) + return returncode == 0 + + def runcmd(self, cmd, raise_on_errors=True): + + logger.debug("Running command: " + cmd) + + p = subprocess.Popen( + cmd, + shell=True, + executable="/bin/bash", + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + ) + + out, err = p.communicate() + returncode = p.returncode + if raise_on_errors and returncode != 0: + raise YunohostError( + "Failed to run command '{}'.\nreturncode: {}\nstdout:\n{}\nstderr:\n{}\n".format( + cmd, returncode, out, err + ) + ) + + out = out.strip().split("\n") + return (returncode, out, err) From b233c7c08ccf689c620e46bbc8431970711e42db Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Fri, 4 Jun 2021 17:35:29 +0200 Subject: [PATCH 026/146] Stale strings --- locales/en.json | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/locales/en.json b/locales/en.json index 813688a87..2921e91ef 100644 --- a/locales/en.json +++ b/locales/en.json @@ -419,39 +419,10 @@ "mail_unavailable": "This e-mail address is reserved and shall be automatically allocated to the very first user", "main_domain_change_failed": "Unable to change the main domain", "main_domain_changed": "The main domain has been changed", - "migrating_legacy_permission_settings": "Migrating legacy permission settings...", - "migration_description_0015_migrate_to_buster": "Upgrade the system to Debian Buster and YunoHost 4.x", - "migration_description_0016_php70_to_php73_pools": "Migrate php7.0-fpm 'pool' conf files to php7.3", - "migration_description_0017_postgresql_9p6_to_11": "Migrate databases from PostgreSQL 9.6 to 11", - "migration_description_0018_xtable_to_nftable": "Migrate old network traffic rules to the new nftable system", - "migration_description_0019_extend_permissions_features": "Extend/rework the app permission management system", - "migration_description_0020_ssh_sftp_permissions": "Add SSH and SFTP permissions support", "migration_ldap_backup_before_migration": "Creating a backup of LDAP database and apps settings prior to the actual migration.", "migration_ldap_can_not_backup_before_migration": "The backup of the system could not be completed before the migration failed. Error: {error:s}", "migration_ldap_migration_failed_trying_to_rollback": "Could not migrate... trying to roll back the system.", "migration_ldap_rollback_success": "System rolled back.", - "migration_update_LDAP_schema": "Updating LDAP schema...", - "migration_0015_start" : "Starting migration to Buster", - "migration_0015_patching_sources_list": "Patching the sources.lists...", - "migration_0015_main_upgrade": "Starting main upgrade...", - "migration_0015_still_on_stretch_after_main_upgrade": "Something went wrong during the main upgrade, the system appears to still be on Debian Stretch", - "migration_0015_yunohost_upgrade" : "Starting YunoHost core upgrade...", - "migration_0015_not_stretch" : "The current Debian distribution is not Stretch!", - "migration_0015_not_enough_free_space" : "Free space is pretty low in /var/! You should have at least 1GB free to run this migration.", - "migration_0015_system_not_fully_up_to_date": "Your system is not fully up-to-date. Please perform a regular upgrade before running the migration to Buster.", - "migration_0015_general_warning": "Please note that this migration is a delicate operation. The YunoHost team did its best to review and test it, but the migration might still break parts of the system or its apps.\n\nTherefore, it is recommended to:\n - Perform a backup of any critical data or app. More info on https://yunohost.org/backup;\n - Be patient after launching the migration: Depending on your Internet connection and hardware, it might take up to a few hours for everything to upgrade.", - "migration_0015_problematic_apps_warning": "Please note that the following possibly problematic installed apps were detected. It looks like those were not installed from the YunoHost app catalog, or are not flagged as 'working'. Consequently, it cannot be guaranteed that they will still work after the upgrade: {problematic_apps}", - "migration_0015_modified_files": "Please note that the following files were found to be manually modified and might be overwritten following the upgrade: {manually_modified_files}", - "migration_0015_specific_upgrade": "Starting upgrade of system packages that needs to be upgrade independently...", - "migration_0015_cleaning_up": "Cleaning up cache and packages not useful anymore...", - "migration_0015_weak_certs": "The following certificates were found to still use weak signature algorithms and have to be upgraded to be compatible with the next version of nginx: {certs}", - "migration_0017_postgresql_96_not_installed": "PostgreSQL was not installed on your system. Nothing to do.", - "migration_0017_postgresql_11_not_installed": "PostgreSQL 9.6 is installed, but not postgresql 11‽ Something weird might have happened on your system :(...", - "migration_0017_not_enough_space": "Make sufficient space available in {path} to run the migration.", - "migration_0018_failed_to_migrate_iptables_rules": "Failed to migrate legacy iptables rules to nftables: {error}", - "migration_0018_failed_to_reset_legacy_rules": "Failed to reset legacy iptables rules: {error}", - "migration_0019_add_new_attributes_in_ldap": "Add new attributes for permissions in LDAP database", - "migration_0019_slapd_config_will_be_overwritten": "It looks like you manually edited the slapd configuration. For this critical migration, YunoHost needs to force the update of the slapd configuration. The original files will be backuped in {conf_backup_folder}.", "migrations_already_ran": "Those migrations are already done: {ids}", "migrations_cant_reach_migration_file": "Could not access migrations files at the path '%s'", "migrations_dependencies_not_satisfied": "Run these migrations: '{dependencies_id}', before migration {id}.", @@ -574,7 +545,6 @@ "service_disabled": "The service '{service:s}' will not be started anymore when system boots.", "service_enable_failed": "Could not make the service '{service:s}' automatically start at boot.\n\nRecent service logs:{logs:s}", "service_enabled": "The service '{service:s}' will now be automatically started during system boots.", - "service_regen_conf_is_deprecated": "'yunohost service regen-conf' is deprecated! Please use 'yunohost tools regen-conf' instead.", "service_remove_failed": "Could not remove the service '{service:s}'", "service_removed": "Service '{service:s}' removed", "service_reload_failed": "Could not reload the service '{service:s}'\n\nRecent service logs:{logs:s}", @@ -595,8 +565,6 @@ "system_upgraded": "System upgraded", "system_username_exists": "Username already exists in the list of system users", "this_action_broke_dpkg": "This action broke dpkg/APT (the system package managers)... You can try to solve this issue by connecting through SSH and running `sudo apt install --fix-broken` and/or `sudo dpkg --configure -a`.", - "tools_upgrade_at_least_one": "Please specify 'apps', or 'system'", - "tools_upgrade_cant_both": "Cannot upgrade both system and apps at the same time", "tools_upgrade_cant_hold_critical_packages": "Could not hold critical packages…", "tools_upgrade_cant_unhold_critical_packages": "Could not unhold critical packages…", "tools_upgrade_regular_packages": "Now upgrading 'regular' (non-yunohost-related) packages…", From 11a638ed70c767a8d8cbe4e326d69ecf25b51659 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Fri, 4 Jun 2021 18:22:48 +0200 Subject: [PATCH 027/146] Fix 'apps' undefined --- src/yunohost/tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/yunohost/tools.py b/src/yunohost/tools.py index 95b89acd0..a7b79bb28 100644 --- a/src/yunohost/tools.py +++ b/src/yunohost/tools.py @@ -484,7 +484,7 @@ def tools_upgrade( # Actually start the upgrades try: - app_upgrade(app=apps) + app_upgrade(app=upgradable_apps) except Exception as e: logger.warning("unable to upgrade apps: %s" % str(e)) logger.error(m18n.n("app_upgrade_some_app_failed")) From fd3a10489deec0c99f2566408c134f1bca78c4d6 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 7 Jun 2021 16:17:58 +0200 Subject: [PATCH 028/146] Add i18n strings for bullseye migration --- locales/en.json | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/locales/en.json b/locales/en.json index 84a01dfaa..a479672d7 100644 --- a/locales/en.json +++ b/locales/en.json @@ -426,6 +426,7 @@ "migration_description_0018_xtable_to_nftable": "Migrate old network traffic rules to the new nftable system", "migration_description_0019_extend_permissions_features": "Extend/rework the app permission management system", "migration_description_0020_ssh_sftp_permissions": "Add SSH and SFTP permissions support", + "migration_description_0021_migrate_to_bullseye": "Upgrade the system to Debian Bullseye and YunoHost 11.x", "migration_ldap_backup_before_migration": "Creating a backup of LDAP database and apps settings prior to the actual migration.", "migration_ldap_can_not_backup_before_migration": "The backup of the system could not be completed before the migration failed. Error: {error:s}", "migration_ldap_migration_failed_trying_to_rollback": "Could not migrate... trying to roll back the system.", @@ -452,6 +453,21 @@ "migration_0018_failed_to_reset_legacy_rules": "Failed to reset legacy iptables rules: {error}", "migration_0019_add_new_attributes_in_ldap": "Add new attributes for permissions in LDAP database", "migration_0019_slapd_config_will_be_overwritten": "It looks like you manually edited the slapd configuration. For this critical migration, YunoHost needs to force the update of the slapd configuration. The original files will be backuped in {conf_backup_folder}.", + "migration_0021_start" : "Starting migration to Bullseye", + "migration_0021_patching_sources_list": "Patching the sources.lists...", + "migration_0021_main_upgrade": "Starting main upgrade...", + "migration_0021_still_on_buster_after_main_upgrade": "Something went wrong during the main upgrade, the system appears to still be on Debian Buster", + "migration_0021_yunohost_upgrade" : "Starting YunoHost core upgrade...", + "migration_0021_not_buster" : "The current Debian distribution is not Buster!", + "migration_0021_not_enough_free_space" : "Free space is pretty low in /var/! You should have at least 1GB free to run this migration.", + "migration_0021_system_not_fully_up_to_date": "Your system is not fully up-to-date. Please perform a regular upgrade before running the migration to Bullseye.", + "migration_0021_general_warning": "Please note that this migration is a delicate operation. The YunoHost team did its best to review and test it, but the migration might still break parts of the system or its apps.\n\nTherefore, it is recommended to:\n - Perform a backup of any critical data or app. More info on https://yunohost.org/backup;\n - Be patient after launching the migration: Depending on your Internet connection and hardware, it might take up to a few hours for everything to upgrade.", + "migration_0021_problematic_apps_warning": "Please note that the following possibly problematic installed apps were detected. It looks like those were not installed from the YunoHost app catalog, or are not flagged as 'working'. Consequently, it cannot be guaranteed that they will still work after the upgrade: {problematic_apps}", + "migration_0021_modified_files": "Please note that the following files were found to be manually modified and might be overwritten following the upgrade: {manually_modified_files}", + "migration_0021_specific_upgrade": "Starting upgrade of system packages that needs to be upgrade independently...", + "migration_0021_cleaning_up": "Cleaning up cache and packages not useful anymore...", + "migration_0021_weak_certs": "The following certificates were found to still use weak signature algorithms and have to be upgraded to be compatible with the next version of nginx: {certs}", + "migration_0021_patch_yunohost_conflicts": "Applying patch to workaround conflict issue...", "migrations_already_ran": "Those migrations are already done: {ids}", "migrations_cant_reach_migration_file": "Could not access migrations files at the path '%s'", "migrations_dependencies_not_satisfied": "Run these migrations: '{dependencies_id}', before migration {id}.", From 8e25895cbff9a2e374c47b9aa959574066d58248 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 7 Jun 2021 16:31:39 +0200 Subject: [PATCH 029/146] Fix helpers test: SimpleHTTPServer was python2 only, use http.server for python3/bullseye --- tests/test_helpers.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_helpers.sh b/tests/test_helpers.sh index 55d26483e..153ce1386 100644 --- a/tests/test_helpers.sh +++ b/tests/test_helpers.sh @@ -35,7 +35,7 @@ trap cleanup EXIT SIGINT HTTPSERVER_DIR=$(mktemp -d) HTTPSERVER_PORT=1312 pushd "$HTTPSERVER_DIR" >/dev/null -python -m SimpleHTTPServer $HTTPSERVER_PORT &>/dev/null & +python3 -m http.server $HTTPSERVER_PORT --bind 127.0.0.1 &>/dev/null & HTTPSERVER="$!" popd >/dev/null From a24ea4dafa90932675765c56ffb0f822bf56b675 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 7 Jun 2021 16:39:06 +0200 Subject: [PATCH 030/146] Stupid python3 issue in helpers --- data/helpers.d/backup | 4 ++-- data/helpers.d/network | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/data/helpers.d/backup b/data/helpers.d/backup index 17da0fb2e..ae746a37b 100644 --- a/data/helpers.d/backup +++ b/data/helpers.d/backup @@ -207,14 +207,14 @@ ynh_restore () { # usage: _get_archive_path ORIGIN_PATH _get_archive_path () { # For security reasons we use csv python library to read the CSV - python -c " + python3 -c " import sys import csv with open(sys.argv[1], 'r') as backup_file: backup_csv = csv.DictReader(backup_file, fieldnames=['source', 'dest']) for row in backup_csv: if row['source']==sys.argv[2].strip('\"'): - print row['dest'] + print(row['dest']) sys.exit(0) raise Exception('Original path for %s not found' % sys.argv[2]) " "${YNH_BACKUP_CSV}" "$1" diff --git a/data/helpers.d/network b/data/helpers.d/network index 2011d502b..4e536a8db 100644 --- a/data/helpers.d/network +++ b/data/helpers.d/network @@ -80,7 +80,7 @@ ynh_validate_ip() [ "$family" == "4" ] || [ "$family" == "6" ] || return 1 - python /dev/stdin << EOF + python3 /dev/stdin << EOF import socket import sys family = { "4" : socket.AF_INET, "6" : socket.AF_INET6 } From 43d924252fa0dc4d6ffdcfcbcb32a3a4f3ee18eb Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 7 Jun 2021 17:41:57 +0200 Subject: [PATCH 031/146] Fix patch of security repo in sources.list --- src/yunohost/data_migrations/0021_migrate_to_bullseye.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/yunohost/data_migrations/0021_migrate_to_bullseye.py b/src/yunohost/data_migrations/0021_migrate_to_bullseye.py index a5bb1e523..6678fa040 100644 --- a/src/yunohost/data_migrations/0021_migrate_to_bullseye.py +++ b/src/yunohost/data_migrations/0021_migrate_to_bullseye.py @@ -177,12 +177,14 @@ class MyMigration(Migration): # - replace single 'buster' occurence by 'bulleye' # - comments lines containing "backports" # - replace 'buster/updates' by 'bullseye/updates' (or same with -) + # Special note about the security suite: + # https://www.debian.org/releases/bullseye/amd64/release-notes/ch-information.en.html#security-archive for f in sources_list: command = ( f"sed -i {f} " "-e 's@ buster @ bullseye @g' " "-e '/backports/ s@^#*@#@' " - "-e 's@ buster/updates @ bullseye/updates @g' " + "-e 's@ buster/updates @ bullseye-security @g' " "-e 's@ buster-@ bullseye-@g' " ) os.system(command) From 43ef4f4a29e53f139439b4ab46004384abcfcf76 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 7 Jun 2021 17:44:24 +0200 Subject: [PATCH 032/146] Unecessary i18n strings --- locales/en.json | 2 -- 1 file changed, 2 deletions(-) diff --git a/locales/en.json b/locales/en.json index a479672d7..a739b93c4 100644 --- a/locales/en.json +++ b/locales/en.json @@ -464,9 +464,7 @@ "migration_0021_general_warning": "Please note that this migration is a delicate operation. The YunoHost team did its best to review and test it, but the migration might still break parts of the system or its apps.\n\nTherefore, it is recommended to:\n - Perform a backup of any critical data or app. More info on https://yunohost.org/backup;\n - Be patient after launching the migration: Depending on your Internet connection and hardware, it might take up to a few hours for everything to upgrade.", "migration_0021_problematic_apps_warning": "Please note that the following possibly problematic installed apps were detected. It looks like those were not installed from the YunoHost app catalog, or are not flagged as 'working'. Consequently, it cannot be guaranteed that they will still work after the upgrade: {problematic_apps}", "migration_0021_modified_files": "Please note that the following files were found to be manually modified and might be overwritten following the upgrade: {manually_modified_files}", - "migration_0021_specific_upgrade": "Starting upgrade of system packages that needs to be upgrade independently...", "migration_0021_cleaning_up": "Cleaning up cache and packages not useful anymore...", - "migration_0021_weak_certs": "The following certificates were found to still use weak signature algorithms and have to be upgraded to be compatible with the next version of nginx: {certs}", "migration_0021_patch_yunohost_conflicts": "Applying patch to workaround conflict issue...", "migrations_already_ran": "Those migrations are already done: {ids}", "migrations_cant_reach_migration_file": "Could not access migrations files at the path '%s'", From e22c683c3449b4d659fac5376959c05c550cd4d0 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 7 Jun 2021 19:17:31 +0200 Subject: [PATCH 033/146] Fix conflict issue on redis-server because bullseye version changed --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index cc39a838c..09926c961 100644 --- a/debian/control +++ b/debian/control @@ -45,7 +45,7 @@ Conflicts: iptables-persistent , openssl (>= 1.1.1l-1) , slapd (>= 2.4.58) , dovecot-core (>= 1:2.3.14) - , redis-server (>= 5:6.0.12) + , redis-server (>= 5:6.1) , fail2ban (>= 0.11.3) , iptables (>= 1.8.8) Description: manageable and configured self-hosting server From 0d8b8f6ca340e25d277b1bd2a369850af1cf3d5c Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 7 Jun 2021 19:22:15 +0200 Subject: [PATCH 034/146] (Re)Drop legacy --others_var --- data/helpers.d/fail2ban | 9 ++------- data/helpers.d/systemd | 6 +----- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/data/helpers.d/fail2ban b/data/helpers.d/fail2ban index 6ac7ae6d0..5e3eca706 100644 --- a/data/helpers.d/fail2ban +++ b/data/helpers.d/fail2ban @@ -10,9 +10,8 @@ # # ----------------------------------------------------------------------------- # -# usage 2: ynh_add_fail2ban_config --use_template [--others_var="list of others variables to replace"] +# usage 2: ynh_add_fail2ban_config --use_template # | arg: -t, --use_template - Use this helper in template mode -# | arg: -v, --others_var= - List of others variables to replace separeted by a space for example : 'var_1 var_2 ...' # # This will use a template in `../conf/f2b_jail.conf` and `../conf/f2b_filter.conf` # See the documentation of `ynh_add_config` for a description of the template @@ -65,22 +64,18 @@ ynh_add_fail2ban_config () { # Declare an array to define the options of this helper. local legacy_args=lrmptv - local -A args_array=( [l]=logpath= [r]=failregex= [m]=max_retry= [p]=ports= [t]=use_template [v]=others_var=) + local -A args_array=( [l]=logpath= [r]=failregex= [m]=max_retry= [p]=ports= [t]=use_template) local logpath local failregex local max_retry local ports - local others_var local use_template # Manage arguments with getopts ynh_handle_getopts_args "$@" max_retry=${max_retry:-3} ports=${ports:-http,https} - others_var="${others_var:-}" use_template="${use_template:-0}" - [[ -z "$others_var" ]] || ynh_print_warn --message="Packagers: using --others_var is unecessary since YunoHost 4.2" - if [ $use_template -ne 1 ] then # Usage 1, no template. Build a config file from scratch. diff --git a/data/helpers.d/systemd b/data/helpers.d/systemd index a1baff4b0..3b3a663e2 100644 --- a/data/helpers.d/systemd +++ b/data/helpers.d/systemd @@ -15,17 +15,13 @@ ynh_add_systemd_config () { # Declare an array to define the options of this helper. local legacy_args=stv - local -A args_array=( [s]=service= [t]=template= [v]=others_var=) + local -A args_array=( [s]=service= [t]=template=) local service local template - local others_var # Manage arguments with getopts ynh_handle_getopts_args "$@" service="${service:-$app}" template="${template:-systemd.service}" - others_var="${others_var:-}" - - [[ -z "$others_var" ]] || ynh_print_warn --message="Packagers: using --others_var is unecessary since YunoHost 4.2" ynh_add_config --template="$YNH_APP_BASEDIR/conf/$template" --destination="/etc/systemd/system/$service.service" From f6857625decd69f63bc9a783409003bb2922aeac Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 7 Jun 2021 22:06:54 +0200 Subject: [PATCH 035/146] Stupid encoding issue in migration 0023 --- src/yunohost/data_migrations/0023_postgresql_11_to_13.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/yunohost/data_migrations/0023_postgresql_11_to_13.py b/src/yunohost/data_migrations/0023_postgresql_11_to_13.py index 30527f0c8..145f15558 100644 --- a/src/yunohost/data_migrations/0023_postgresql_11_to_13.py +++ b/src/yunohost/data_migrations/0023_postgresql_11_to_13.py @@ -78,5 +78,5 @@ class MyMigration(Migration): ) ) - out = out.strip().split("\n") + out = out.strip().split(b"\n") return (returncode, out, err) From 653d7e8127e3485ea562802f11246c21ce813f83 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 12 Jun 2021 16:23:40 +0200 Subject: [PATCH 036/146] Switch to backups from 4.2 --- src/yunohost/backup.py | 2 +- src/yunohost/tests/test_backuprestore.py | 48 ++++++++++++------------ 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/yunohost/backup.py b/src/yunohost/backup.py index b94eda683..3eb564734 100644 --- a/src/yunohost/backup.py +++ b/src/yunohost/backup.py @@ -866,7 +866,7 @@ class RestoreManager: # early dev for next debian version from_version = re.sub(r'~\w+', '', from_version) - if not from_version or version.parse(from_version) < version.parse("3.8.0"): + if not from_version or version.parse(from_version) < version.parse("4.2.0"): raise YunohostValidationError("restore_backup_too_old") self.archive_path = self.info["path"] diff --git a/src/yunohost/tests/test_backuprestore.py b/src/yunohost/tests/test_backuprestore.py index 30204fa86..2a88e4042 100644 --- a/src/yunohost/tests/test_backuprestore.py +++ b/src/yunohost/tests/test_backuprestore.py @@ -47,8 +47,8 @@ def setup_function(function): for m in function.__dict__.get("pytestmark", []) } - if "with_wordpress_archive_from_3p8" in markers: - add_archive_wordpress_from_3p8() + if "with_wordpress_archive_from_4p2" in markers: + add_archive_wordpress_from_4p2() assert len(backup_list()["archives"]) == 1 if "with_legacy_app_installed" in markers: @@ -70,8 +70,8 @@ def setup_function(function): ) assert app_is_installed("backup_recommended_app") - if "with_system_archive_from_3p8" in markers: - add_archive_system_from_3p8() + if "with_system_archive_from_4p2" in markers: + add_archive_system_from_4p2() assert len(backup_list()["archives"]) == 1 if "with_permission_app_installed" in markers: @@ -148,7 +148,7 @@ def backup_test_dependencies_are_met(): # Dummy test apps (or backup archives) assert os.path.exists( - os.path.join(get_test_apps_dir(), "backup_wordpress_from_3p8") + os.path.join(get_test_apps_dir(), "backup_wordpress_from_4p2") ) assert os.path.exists(os.path.join(get_test_apps_dir(), "legacy_app_ynh")) assert os.path.exists( @@ -217,25 +217,25 @@ def install_app(app, path, additionnal_args=""): ) -def add_archive_wordpress_from_3p8(): +def add_archive_wordpress_from_4p2(): os.system("mkdir -p /home/yunohost.backup/archives") os.system( "cp " - + os.path.join(get_test_apps_dir(), "backup_wordpress_from_3p8/backup.tar.gz") - + " /home/yunohost.backup/archives/backup_wordpress_from_3p8.tar.gz" + + os.path.join(get_test_apps_dir(), "backup_wordpress_from_4p2/backup.tar") + + " /home/yunohost.backup/archives/backup_wordpress_from_4p2.tar" ) -def add_archive_system_from_3p8(): +def add_archive_system_from_4p2(): os.system("mkdir -p /home/yunohost.backup/archives") os.system( "cp " - + os.path.join(get_test_apps_dir(), "backup_system_from_3p8/backup.tar.gz") - + " /home/yunohost.backup/archives/backup_system_from_3p8.tar.gz" + + os.path.join(get_test_apps_dir(), "backup_system_from_4p2/backup.tar") + + " /home/yunohost.backup/archives/backup_system_from_4p2.tar" ) @@ -305,8 +305,8 @@ def test_backup_and_restore_all_sys(mocker): # -@pytest.mark.with_system_archive_from_3p8 -def test_restore_system_from_Ynh3p8(monkeypatch, mocker): +@pytest.mark.with_system_archive_from_4p2 +def test_restore_system_from_Ynh4p2(monkeypatch, mocker): # Backup current system with message(mocker, "backup_created"): @@ -451,9 +451,9 @@ def test_backup_using_copy_method(mocker): # -@pytest.mark.with_wordpress_archive_from_3p8 +@pytest.mark.with_wordpress_archive_from_4p2 @pytest.mark.with_custom_domain("yolo.test") -def test_restore_app_wordpress_from_Ynh3p8(mocker): +def test_restore_app_wordpress_from_Ynh4p2(mocker): with message(mocker, "restore_complete"): backup_restore( @@ -461,7 +461,7 @@ def test_restore_app_wordpress_from_Ynh3p8(mocker): ) -@pytest.mark.with_wordpress_archive_from_3p8 +@pytest.mark.with_wordpress_archive_from_4p2 @pytest.mark.with_custom_domain("yolo.test") def test_restore_app_script_failure_handling(monkeypatch, mocker): def custom_hook_exec(name, *args, **kwargs): @@ -482,7 +482,7 @@ def test_restore_app_script_failure_handling(monkeypatch, mocker): assert not _is_installed("wordpress") -@pytest.mark.with_wordpress_archive_from_3p8 +@pytest.mark.with_wordpress_archive_from_4p2 def test_restore_app_not_enough_free_space(monkeypatch, mocker): def custom_free_space_in_directory(dirpath): return 0 @@ -501,7 +501,7 @@ def test_restore_app_not_enough_free_space(monkeypatch, mocker): assert not _is_installed("wordpress") -@pytest.mark.with_wordpress_archive_from_3p8 +@pytest.mark.with_wordpress_archive_from_4p2 def test_restore_app_not_in_backup(mocker): assert not _is_installed("wordpress") @@ -517,7 +517,7 @@ def test_restore_app_not_in_backup(mocker): assert not _is_installed("yoloswag") -@pytest.mark.with_wordpress_archive_from_3p8 +@pytest.mark.with_wordpress_archive_from_4p2 @pytest.mark.with_custom_domain("yolo.test") def test_restore_app_already_installed(mocker): @@ -627,7 +627,7 @@ def test_restore_archive_with_no_json(mocker): # Create a backup with no info.json associated os.system("touch /tmp/afile") - os.system("tar -czvf /home/yunohost.backup/archives/badbackup.tar.gz /tmp/afile") + os.system("tar -cvf /home/yunohost.backup/archives/badbackup.tar /tmp/afile") assert "badbackup" in backup_list()["archives"] @@ -635,18 +635,18 @@ def test_restore_archive_with_no_json(mocker): backup_restore(name="badbackup", force=True) -@pytest.mark.with_wordpress_archive_from_3p8 +@pytest.mark.with_wordpress_archive_from_4p2 def test_restore_archive_with_bad_archive(mocker): # Break the archive os.system( - "head -n 1000 /home/yunohost.backup/archives/backup_wordpress_from_3p8.tar.gz > /home/yunohost.backup/archives/backup_wordpress_from_3p8_bad.tar.gz" + "head -n 1000 /home/yunohost.backup/archives/backup_wordpress_from_4p2.tar > /home/yunohost.backup/archives/backup_wordpress_from_4p2_bad.tar" ) - assert "backup_wordpress_from_3p8_bad" in backup_list()["archives"] + assert "backup_wordpress_from_4p2_bad" in backup_list()["archives"] with raiseYunohostError(mocker, "backup_archive_corrupted"): - backup_restore(name="backup_wordpress_from_3p8_bad", force=True) + backup_restore(name="backup_wordpress_from_4p2_bad", force=True) clean_tmp_backup_directory() From 82812bac2fb607a2ce2573efb96135b79c88e1ed Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 12 Jun 2021 18:01:43 +0200 Subject: [PATCH 037/146] Change service status hack for postgresql, 11 -> 13 --- src/yunohost/service.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/yunohost/service.py b/src/yunohost/service.py index 62f40d29c..b015d37cd 100644 --- a/src/yunohost/service.py +++ b/src/yunohost/service.py @@ -665,7 +665,7 @@ def _get_services(): if "postgresql" in services: if "description" in services["postgresql"]: del services["postgresql"]["description"] - services["postgresql"]["actual_systemd_service"] = "postgresql@11-main" + services["postgresql"]["actual_systemd_service"] = "postgresql@13-main" return services From 0843d35cc56dd19300dd33623caaee7e07984ee8 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 12 Jun 2021 18:02:12 +0200 Subject: [PATCH 038/146] Remove old hack for vpnclient --- src/yunohost/service.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/yunohost/service.py b/src/yunohost/service.py index b015d37cd..302b96167 100644 --- a/src/yunohost/service.py +++ b/src/yunohost/service.py @@ -653,9 +653,6 @@ def _get_services(): # Dirty hack to check the status of ynh-vpnclient if "ynh-vpnclient" in services: - status_check = "systemctl is-active openvpn@client.service" - if "test_status" not in services["ynh-vpnclient"]: - services["ynh-vpnclient"]["test_status"] = status_check if "log" not in services["ynh-vpnclient"]: services["ynh-vpnclient"]["log"] = ["/var/log/ynh-vpnclient.log"] From 20b5843b42dff6bea64200cc3fa367b517e9004d Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 12 Jun 2021 18:06:22 +0200 Subject: [PATCH 039/146] Remove php7.3-fpm from service list --- data/templates/yunohost/services.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/data/templates/yunohost/services.yml b/data/templates/yunohost/services.yml index b6ce7c117..5e19cd4c6 100644 --- a/data/templates/yunohost/services.yml +++ b/data/templates/yunohost/services.yml @@ -67,4 +67,5 @@ spamassassin: null rmilter: null php5-fpm: null php7.0-fpm: null +php7.3-fpm: nslcd: null From a274b6a8fca4ceebac9f685b57d862c4554be67f Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 3 Jul 2021 18:14:24 +0200 Subject: [PATCH 040/146] fix: Remove legacy --installed / filter for app_list in actionmap --- data/actionsmap/yunohost.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/data/actionsmap/yunohost.yml b/data/actionsmap/yunohost.yml index 0631a20c9..f86db5495 100644 --- a/data/actionsmap/yunohost.yml +++ b/data/actionsmap/yunohost.yml @@ -602,12 +602,6 @@ app: full: --full help: Display all details, including the app manifest and various other infos action: store_true - -i: - full: --installed - help: Dummy argument, does nothing anymore (still there only for backward compatibility) - action: store_true - filter: - nargs: '?' ### app_info() info: From 713612a6898d7fd9ed1b70d6c679ea65da134990 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Fri, 9 Jul 2021 21:50:41 +0200 Subject: [PATCH 041/146] Get rid of legacy script to reset ldap password --- debian/install | 1 - sbin/yunohost-reset-ldap-password | 3 --- 2 files changed, 4 deletions(-) delete mode 100755 sbin/yunohost-reset-ldap-password diff --git a/debian/install b/debian/install index 1691a4849..bc3cc1f48 100644 --- a/debian/install +++ b/debian/install @@ -1,5 +1,4 @@ bin/* /usr/bin/ -sbin/* /usr/sbin/ data/bash-completion.d/yunohost /etc/bash_completion.d/ doc/yunohost.8.gz /usr/share/man/man8/ data/actionsmap/* /usr/share/moulinette/actionsmap/ diff --git a/sbin/yunohost-reset-ldap-password b/sbin/yunohost-reset-ldap-password deleted file mode 100755 index 95f84875f..000000000 --- a/sbin/yunohost-reset-ldap-password +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -echo "Warning: this script is now deprecated. You can simply type 'yunohost tools adminpw' to change the root/admin password." -yunohost tools adminpw From 16b0411ea98732e36b71e76353a889768a824cb8 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 11 Aug 2021 15:45:35 +0200 Subject: [PATCH 042/146] Re-add legacy_permission_label so that we don't break the old legacy permission settings --- src/yunohost/utils/legacy.py | 51 ++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 src/yunohost/utils/legacy.py diff --git a/src/yunohost/utils/legacy.py b/src/yunohost/utils/legacy.py new file mode 100644 index 000000000..f3243eb52 --- /dev/null +++ b/src/yunohost/utils/legacy.py @@ -0,0 +1,51 @@ +LEGACY_PERMISSION_LABEL = { + ("nextcloud", "skipped"): "api", # .well-known + ("libreto", "skipped"): "pad access", # /[^/]+ + ("leed", "skipped"): "api", # /action.php, for cron task ... + ("mailman", "protected"): "admin", # /admin + ("prettynoemiecms", "protected"): "admin", # /admin + ("etherpad_mypads", "skipped"): "admin", # /admin + ("baikal", "protected"): "admin", # /admin/ + ("couchpotato", "unprotected"): "api", # /api + ("freshrss", "skipped"): "api", # /api/, + ("portainer", "skipped"): "api", # /api/webhooks/ + ("jeedom", "unprotected"): "api", # /core/api/jeeApi.php + ("bozon", "protected"): "user interface", # /index.php + ( + "limesurvey", + "protected", + ): "admin", # /index.php?r=admin,/index.php?r=plugins,/scripts + ("kanboard", "unprotected"): "api", # /jsonrpc.php + ("seafile", "unprotected"): "medias", # /media + ("ttrss", "skipped"): "api", # /public.php,/api,/opml.php?op=publish + ("libreerp", "protected"): "admin", # /web/database/manager + ("z-push", "skipped"): "api", # $domain/[Aa]uto[Dd]iscover/.* + ("radicale", "skipped"): "?", # $domain$path_url + ( + "jirafeau", + "protected", + ): "user interface", # $domain$path_url/$","$domain$path_url/admin.php.*$ + ("opensondage", "protected"): "admin", # $domain$path_url/admin/ + ( + "lstu", + "protected", + ): "user interface", # $domain$path_url/login$","$domain$path_url/logout$","$domain$path_url/api$","$domain$path_url/extensions$","$domain$path_url/stats$","$domain$path_url/d/.*$","$domain$path_url/a$","$domain$path_url/$ + ( + "lutim", + "protected", + ): "user interface", # $domain$path_url/stats/?$","$domain$path_url/manifest.webapp/?$","$domain$path_url/?$","$domain$path_url/[d-m]/.*$ + ( + "lufi", + "protected", + ): "user interface", # $domain$path_url/stats$","$domain$path_url/manifest.webapp$","$domain$path_url/$","$domain$path_url/d/.*$","$domain$path_url/m/.*$ + ( + "gogs", + "skipped", + ): "api", # $excaped_domain$excaped_path/[%w-.]*/[%w-.]*/git%-receive%-pack,$excaped_domain$excaped_path/[%w-.]*/[%w-.]*/git%-upload%-pack,$excaped_domain$excaped_path/[%w-.]*/[%w-.]*/info/refs +} + + +def legacy_permission_label(app, permission_type): + return LEGACY_PERMISSION_LABEL.get( + (app, permission_type), "Legacy %s urls" % permission_type + ) From 996a399f94f3e15f507dbf1334ebff37c4fa2e22 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Fri, 13 Aug 2021 17:58:46 +0200 Subject: [PATCH 043/146] bullseye migration: add new apg .deb signing key --- src/yunohost/data_migrations/0021_migrate_to_bullseye.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/yunohost/data_migrations/0021_migrate_to_bullseye.py b/src/yunohost/data_migrations/0021_migrate_to_bullseye.py index 6678fa040..4b40fcbe0 100644 --- a/src/yunohost/data_migrations/0021_migrate_to_bullseye.py +++ b/src/yunohost/data_migrations/0021_migrate_to_bullseye.py @@ -36,6 +36,13 @@ class MyMigration(Migration): logger.info(m18n.n("migration_0021_start")) + # + # Add new apt .deb signing key + # + + new_apt_key = "https://forge.yunohost.org/yunohost_bullseye.asc" + check_output(f"wget -O- {new_apt_key} -q | apt-key add -qq -") + # # Patch sources.list # From 9bcb7e0b9ef6e54e9eb6b42913343cfd14e742cc Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 21 Sep 2021 16:08:24 +0200 Subject: [PATCH 044/146] certificate.py: drop legacy 000-acmechallenge.conf stuff --- src/yunohost/certificate.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/yunohost/certificate.py b/src/yunohost/certificate.py index 817f9d57a..eb9d19c0b 100644 --- a/src/yunohost/certificate.py +++ b/src/yunohost/certificate.py @@ -500,13 +500,7 @@ Subject: %s def _check_acme_challenge_configuration(domain): domain_conf = "/etc/nginx/conf.d/%s.conf" % domain - if "include /etc/nginx/conf.d/acme-challenge.conf.inc" in read_file(domain_conf): - return True - else: - # This is for legacy setups which haven't updated their domain conf to - # the new conf that include the acme snippet... - legacy_acme_conf = "/etc/nginx/conf.d/%s.d/000-acmechallenge.conf" % domain - return os.path.exists(legacy_acme_conf) + return "include /etc/nginx/conf.d/acme-challenge.conf.inc" in read_file(domain_conf) def _fetch_and_enable_new_certificate(domain, staging=False, no_checks=False): From a6c72566a5f2e733aa1377497e36208a68f47d59 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 21 Sep 2021 16:09:06 +0200 Subject: [PATCH 045/146] services.py: drop legacy hack for glances --- src/yunohost/regenconf.py | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/yunohost/regenconf.py b/src/yunohost/regenconf.py index ef3c29b32..afcfb4360 100644 --- a/src/yunohost/regenconf.py +++ b/src/yunohost/regenconf.py @@ -125,16 +125,6 @@ def regen_conf( if not names: names = hook_list("conf_regen", list_by="name", show_info=False)["hooks"] - # Dirty hack for legacy code : avoid attempting to regen the conf for - # glances because it got removed ... This is only needed *once* - # during the upgrade from 3.7 to 3.8 because Yunohost will attempt to - # regen glance's conf *before* it gets automatically removed from - # services.yml (which will happens only during the regen-conf of - # 'yunohost', so at the very end of the regen-conf cycle) Anyway, - # this can be safely removed once we're in >= 4.0 - if "glances" in names: - names.remove("glances") - # [Optimization] We compute and feed the domain list to the conf regen # hooks to avoid having to call "yunohost domain list" so many times which # ends up in wasted time (about 3~5 seconds per call on a RPi2) @@ -451,10 +441,6 @@ def _save_regenconf_infos(infos): categories -- A dict containing the regenconf infos """ - # Ugly hack to get rid of legacy glances stuff - if "glances" in infos: - del infos["glances"] - try: with open(REGEN_CONF_FILE, "w") as f: yaml.safe_dump(infos, f, default_flow_style=False) From 2318ffc49356309683141d5dbd5b12fa3b950df4 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 21 Sep 2021 16:12:21 +0200 Subject: [PATCH 046/146] regenconf: drop old legacy code --- data/hooks/conf_regen/01-yunohost | 4 ---- data/hooks/conf_regen/37-mdns | 6 ------ 2 files changed, 10 deletions(-) diff --git a/data/hooks/conf_regen/01-yunohost b/data/hooks/conf_regen/01-yunohost index ef0bc09fc..6301708d5 100755 --- a/data/hooks/conf_regen/01-yunohost +++ b/data/hooks/conf_regen/01-yunohost @@ -71,10 +71,6 @@ do_pre_regen() { cd /usr/share/yunohost/templates/yunohost - # Legacy code that can be removed once on bullseye - touch /etc/yunohost/services.yml - yunohost tools shell -c "from yunohost.service import _get_services, _save_services; _save_services(_get_services())" - mkdir -p $pending_dir/etc/systemd/system mkdir -p $pending_dir/etc/cron.d/ mkdir -p $pending_dir/etc/cron.daily/ diff --git a/data/hooks/conf_regen/37-mdns b/data/hooks/conf_regen/37-mdns index 17f7bb8e2..a9ae402fb 100755 --- a/data/hooks/conf_regen/37-mdns +++ b/data/hooks/conf_regen/37-mdns @@ -51,12 +51,6 @@ do_post_regen() { systemctl daemon-reload fi - # Legacy stuff to enable the new yunomdns service on legacy systems - if [[ -e /etc/avahi/avahi-daemon.conf ]] && grep -q 'yunohost' /etc/avahi/avahi-daemon.conf - then - systemctl enable yunomdns - fi - [[ -z "$regen_conf_files" ]] \ || systemctl restart yunomdns } From f597bfe556b42c676d3cc16599327c8060992485 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 21 Sep 2021 16:32:00 +0200 Subject: [PATCH 047/146] No sbin anymore --- debian/install | 1 - 1 file changed, 1 deletion(-) diff --git a/debian/install b/debian/install index 8c6ba01dd..4680bc6be 100644 --- a/debian/install +++ b/debian/install @@ -1,5 +1,4 @@ bin/* /usr/bin/ -sbin/* /usr/sbin/ data/* /usr/share/yunohost/ data/bash-completion.d/yunohost /etc/bash_completion.d/ doc/yunohost.8.gz /usr/share/man/man8/ From bf21f9d0f2289f1d9385d55c96875c84c01ad433 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 2 Oct 2021 20:46:34 +0200 Subject: [PATCH 048/146] Stale i18n string --- locales/en.json | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/locales/en.json b/locales/en.json index caf19b44b..54d46f342 100644 --- a/locales/en.json +++ b/locales/en.json @@ -485,28 +485,6 @@ "mailbox_used_space_dovecot_down": "The Dovecot mailbox service needs to be up if you want to fetch used mailbox space", "main_domain_change_failed": "Unable to change the main domain", "main_domain_changed": "The main domain has been changed", - "migrating_legacy_permission_settings": "Migrating legacy permission settings...", - "migration_0015_cleaning_up": "Cleaning up cache and packages not useful anymore...", - "migration_0015_general_warning": "Please note that this migration is a delicate operation. The YunoHost team did its best to review and test it, but the migration might still break parts of the system or its apps.\n\nTherefore, it is recommended to:\n - Perform a backup of any critical data or app. More info on https://yunohost.org/backup;\n - Be patient after launching the migration: Depending on your Internet connection and hardware, it might take up to a few hours for everything to upgrade.", - "migration_0015_main_upgrade": "Starting main upgrade...", - "migration_0015_modified_files": "Please note that the following files were found to be manually modified and might be overwritten following the upgrade: {manually_modified_files}", - "migration_0015_not_enough_free_space": "Free space is pretty low in /var/! You should have at least 1GB free to run this migration.", - "migration_0015_not_stretch": "The current Debian distribution is not Stretch!", - "migration_0015_patching_sources_list": "Patching the sources.lists...", - "migration_0015_problematic_apps_warning": "Please note that the following possibly problematic installed apps were detected. It looks like those were not installed from the YunoHost app catalog, or are not flagged as 'working'. Consequently, it cannot be guaranteed that they will still work after the upgrade: {problematic_apps}", - "migration_0015_specific_upgrade": "Starting upgrade of system packages that needs to be upgrade independently...", - "migration_0015_start": "Starting migration to Buster", - "migration_0015_still_on_stretch_after_main_upgrade": "Something went wrong during the main upgrade, the system appears to still be on Debian Stretch", - "migration_0015_system_not_fully_up_to_date": "Your system is not fully up-to-date. Please perform a regular upgrade before running the migration to Buster.", - "migration_0015_weak_certs": "The following certificates were found to still use weak signature algorithms and have to be upgraded to be compatible with the next version of nginx: {certs}", - "migration_0015_yunohost_upgrade": "Starting YunoHost core upgrade...", - "migration_0017_not_enough_space": "Make sufficient space available in {path} to run the migration.", - "migration_0017_postgresql_11_not_installed": "PostgreSQL 9.6 is installed, but not postgresql 11‽ Something weird might have happened on your system :(...", - "migration_0017_postgresql_96_not_installed": "PostgreSQL was not installed on your system. Nothing to do.", - "migration_0018_failed_to_migrate_iptables_rules": "Failed to migrate legacy iptables rules to nftables: {error}", - "migration_0018_failed_to_reset_legacy_rules": "Failed to reset legacy iptables rules: {error}", - "migration_0019_add_new_attributes_in_ldap": "Add new attributes for permissions in LDAP database", - "migration_0019_slapd_config_will_be_overwritten": "It looks like you manually edited the slapd configuration. For this critical migration, YunoHost needs to force the update of the slapd configuration. The original files will be backuped in {conf_backup_folder}.", "migration_0021_start" : "Starting migration to Bullseye", "migration_0021_patching_sources_list": "Patching the sources.lists...", "migration_0021_main_upgrade": "Starting main upgrade...", @@ -523,12 +501,6 @@ "migration_0023_postgresql_11_not_installed": "PostgreSQL was not installed on your system. Nothing to do.", "migration_0023_postgresql_13_not_installed": "PostgreSQL 11 is installed, but not postgresql 13!? Something weird might have happened on your system :(...", "migration_0023_not_enough_space": "Make sufficient space available in {path} to run the migration.", - "migration_description_0015_migrate_to_buster": "Upgrade the system to Debian Buster and YunoHost 4.x", - "migration_description_0016_php70_to_php73_pools": "Migrate php7.0-fpm 'pool' conf files to php7.3", - "migration_description_0017_postgresql_9p6_to_11": "Migrate databases from PostgreSQL 9.6 to 11", - "migration_description_0018_xtable_to_nftable": "Migrate old network traffic rules to the new nftable system", - "migration_description_0019_extend_permissions_features": "Extend/rework the app permission management system", - "migration_description_0020_ssh_sftp_permissions": "Add SSH and SFTP permissions support", "migration_description_0021_migrate_to_bullseye": "Upgrade the system to Debian Bullseye and YunoHost 11.x", "migration_description_0022_php73_to_php74_pools": "Migrate php7.3-fpm 'pool' conf files to php7.4", "migration_description_0023_postgresql_11_to_13": "Migrate databases from PostgreSQL 11 to 13", @@ -536,7 +508,6 @@ "migration_ldap_can_not_backup_before_migration": "The backup of the system could not be completed before the migration failed. Error: {error}", "migration_ldap_migration_failed_trying_to_rollback": "Could not migrate... trying to roll back the system.", "migration_ldap_rollback_success": "System rolled back.", - "migration_update_LDAP_schema": "Updating LDAP schema...", "migrations_already_ran": "Those migrations are already done: {ids}", "migrations_cant_reach_migration_file": "Could not access migrations files at the path '%s'", "migrations_dependencies_not_satisfied": "Run these migrations: '{dependencies_id}', before migration {id}.", @@ -659,7 +630,6 @@ "service_enable_failed": "Could not make the service '{service}' automatically start at boot.\n\nRecent service logs:{logs}", "service_enabled": "The service '{service}' will now be automatically started during system boots.", "service_not_reloading_because_conf_broken": "Not reloading/restarting service '{name}' because its configuration is broken: {errors}", - "service_regen_conf_is_deprecated": "'yunohost service regen-conf' is deprecated! Please use 'yunohost tools regen-conf' instead.", "service_reload_failed": "Could not reload the service '{service}'\n\nRecent service logs:{logs}", "service_reload_or_restart_failed": "Could not reload or restart the service '{service}'\n\nRecent service logs:{logs}", "service_reloaded": "Service '{service}' reloaded", From 8375ef7d5b95d37f4cfa9cddc81b547b636f8462 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 2 Oct 2021 20:49:26 +0200 Subject: [PATCH 049/146] Re-drop app_fetchlist legacy --- src/yunohost/app.py | 1 - src/yunohost/app_catalog.py | 10 ---------- 2 files changed, 11 deletions(-) diff --git a/src/yunohost/app.py b/src/yunohost/app.py index 57e5698d0..3ca7f13d0 100644 --- a/src/yunohost/app.py +++ b/src/yunohost/app.py @@ -66,7 +66,6 @@ from yunohost.app_catalog import ( # noqa app_catalog, app_search, _load_apps_catalog, - app_fetchlist, ) logger = getActionLogger("yunohost.app") diff --git a/src/yunohost/app_catalog.py b/src/yunohost/app_catalog.py index e4ffa1db6..e73493366 100644 --- a/src/yunohost/app_catalog.py +++ b/src/yunohost/app_catalog.py @@ -23,16 +23,6 @@ APPS_CATALOG_API_VERSION = 2 APPS_CATALOG_DEFAULT_URL = "https://app.yunohost.org/default" -# Old legacy function... -def app_fetchlist(): - logger.warning( - "'yunohost app fetchlist' is deprecated. Please use 'yunohost tools update --apps' instead" - ) - from yunohost.tools import tools_update - - tools_update(target="apps") - - def app_catalog(full=False, with_categories=False): """ Return a dict of apps available to installation from Yunohost's app catalog From b677157924defca575aa0632fb9f9f45ebde1a6b Mon Sep 17 00:00:00 2001 From: Kay0u Date: Mon, 4 Oct 2021 15:17:59 +0200 Subject: [PATCH 050/146] fix mypy test --- .gitlab/ci/lint.gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab/ci/lint.gitlab-ci.yml b/.gitlab/ci/lint.gitlab-ci.yml index bffd3d7c4..0010e756a 100644 --- a/.gitlab/ci/lint.gitlab-ci.yml +++ b/.gitlab/ci/lint.gitlab-ci.yml @@ -23,7 +23,7 @@ mypy: image: "before-install" needs: [] script: - - tox -e py37-mypy + - tox -e py39-mypy format-check: stage: lint From 93cc48ca688981f9ad428c9925cc82b2927f8618 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 20 Oct 2021 20:56:33 +0200 Subject: [PATCH 051/146] Drop customization of my.cnf, keep default conf --- data/hooks/conf_regen/34-mysql | 2 +- data/templates/mysql/my.cnf | 92 ---------------------------------- 2 files changed, 1 insertion(+), 93 deletions(-) delete mode 100644 data/templates/mysql/my.cnf diff --git a/data/hooks/conf_regen/34-mysql b/data/hooks/conf_regen/34-mysql index da66d5b1c..13730e0bb 100755 --- a/data/hooks/conf_regen/34-mysql +++ b/data/hooks/conf_regen/34-mysql @@ -8,7 +8,7 @@ do_pre_regen() { cd /usr/share/yunohost/templates/mysql - install -D -m 644 my.cnf "${pending_dir}/etc/mysql/my.cnf" + # Nothing to do } do_post_regen() { diff --git a/data/templates/mysql/my.cnf b/data/templates/mysql/my.cnf deleted file mode 100644 index 3da4377e1..000000000 --- a/data/templates/mysql/my.cnf +++ /dev/null @@ -1,92 +0,0 @@ -# Example MySQL config file for small systems. -# -# This is for a system with little memory (<= 64M) where MySQL is only used -# from time to time and it's important that the mysqld daemon -# doesn't use much resources. -# -# MySQL programs look for option files in a set of -# locations which depend on the deployment platform. -# You can copy this option file to one of those -# locations. For information about these locations, see: -# http://dev.mysql.com/doc/mysql/en/option-files.html -# -# In this file, you can use all long options that a program supports. -# If you want to know which options a program supports, run the program -# with the "--help" option. - -# The following options will be passed to all MySQL clients -[client] -#password = your_password -port = 3306 -socket = /var/run/mysqld/mysqld.sock - -# Here follows entries for some specific programs - -# The MySQL server -[mysqld] -port = 3306 -socket = /var/run/mysqld/mysqld.sock -skip-external-locking -key_buffer_size = 16K -max_allowed_packet = 16M -table_open_cache = 4 -sort_buffer_size = 4M -read_buffer_size = 256K -read_rnd_buffer_size = 256K -net_buffer_length = 2K -thread_stack = 128K - -# to avoid corruption on powerfailure -default-storage-engine=innodb - -# Don't listen on a TCP/IP port at all. This can be a security enhancement, -# if all processes that need to connect to mysqld run on the same host. -# All interaction with mysqld must be made via Unix sockets or named pipes. -# Note that using this option without enabling named pipes on Windows -# (using the "enable-named-pipe" option) will render mysqld useless! -# -#skip-networking -server-id = 1 - -# Uncomment the following if you want to log updates -#log-bin=mysql-bin - -# binary logging format - mixed recommended -#binlog_format=mixed - -# Causes updates to non-transactional engines using statement format to be -# written directly to binary log. Before using this option make sure that -# there are no dependencies between transactional and non-transactional -# tables such as in the statement INSERT INTO t_myisam SELECT * FROM -# t_innodb; otherwise, slaves may diverge from the master. -#binlog_direct_non_transactional_updates=TRUE - -# Uncomment the following if you are using InnoDB tables -#innodb_data_home_dir = /var/lib/mysql -#innodb_data_file_path = ibdata1:10M:autoextend -#innodb_log_group_home_dir = /var/lib/mysql -# You can set .._buffer_pool_size up to 50 - 80 % -# of RAM but beware of setting memory usage too high -#innodb_buffer_pool_size = 16M -#innodb_additional_mem_pool_size = 2M -# Set .._log_file_size to 25 % of buffer pool size -#innodb_log_file_size = 5M -#innodb_log_buffer_size = 8M -#innodb_flush_log_at_trx_commit = 1 -#innodb_lock_wait_timeout = 50 - -[mysqldump] -quick -max_allowed_packet = 16M - -[mysql] -no-auto-rehash -# Remove the next comment character if you are not familiar with SQL -#safe-updates - -[myisamchk] -key_buffer_size = 8M -sort_buffer_size = 8M - -[mysqlhotcopy] -interactive-timeout From 4dc53d5a8e49447d5368b699676c41eee9ac0e9e Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 20 Oct 2021 21:07:53 +0200 Subject: [PATCH 052/146] migrate_to_bullseye: get rid of custom my.cnf --- .../data_migrations/0021_migrate_to_bullseye.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/yunohost/data_migrations/0021_migrate_to_bullseye.py b/src/yunohost/data_migrations/0021_migrate_to_bullseye.py index 4b40fcbe0..db10777bf 100644 --- a/src/yunohost/data_migrations/0021_migrate_to_bullseye.py +++ b/src/yunohost/data_migrations/0021_migrate_to_bullseye.py @@ -5,11 +5,11 @@ from moulinette import m18n from yunohost.utils.error import YunohostError from moulinette.utils.log import getActionLogger from moulinette.utils.process import check_output, call_async_output -from moulinette.utils.filesystem import read_file +from moulinette.utils.filesystem import read_file, rm from yunohost.tools import Migration, tools_update, tools_upgrade from yunohost.app import unstable_apps -from yunohost.regenconf import manually_modified_files +from yunohost.regenconf import manually_modified_files, _force_clear_hashes from yunohost.utils.filesystem import free_space_in_directory from yunohost.utils.packages import ( get_ynh_package_version, @@ -67,6 +67,16 @@ class MyMigration(Migration): self.patch_yunohost_conflicts() + # + # Specific tweaking to get rid of custom my.cnf and use debian's default one + # (my.cnf is actually a symlink to mariadb.cnf) + # + + _force_clear_hashes(["/etc/mysql/my.cnf"]) + rm("/etc/mysql/mariadb.cnf", force=True) + rm("/etc/mysql/my.cnf", force=True) + self.apt_install("mariadb-common --reinstall -o Dpkg::Options::='--force-confmiss'") + # # Main upgrade # From 93f1ab2b34bf98ac5ebafe000fe7c04ea45b206c Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 1 Nov 2021 18:19:23 +0100 Subject: [PATCH 053/146] Tweak debian control file to make php, mysql, metronome ~optional (but recommended) --- debian/control | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/debian/control b/debian/control index fe18b1de8..a1f84d579 100644 --- a/debian/control +++ b/debian/control @@ -16,8 +16,6 @@ Depends: ${python3:Depends}, ${misc:Depends} , python3-toml, python3-packaging, python3-publicsuffix, , python3-ldap, python3-zeroconf, python3-lexicon, , apt, apt-transport-https, apt-utils, dirmngr - , php7.3-common, php7.3-fpm, php7.3-ldap, php7.3-intl - , mariadb-server, php7.3-mysql , openssh-server, iptables, fail2ban, dnsutils, bind9utils , openssl, ca-certificates, netcat-openbsd, iproute2 , slapd, ldap-utils, sudo-ldap, libnss-ldapd, unscd, libpam-ldapd @@ -26,17 +24,19 @@ Depends: ${python3:Depends}, ${misc:Depends} , dovecot-core, dovecot-ldap, dovecot-lmtpd, dovecot-managesieved, dovecot-antispam , rspamd, opendkim-tools, postsrsd, procmail, mailutils , redis-server - , metronome (>=3.14.0) , acl , git, curl, wget, cron, unzip, jq, bc, at , lsb-release, haveged, fake-hwclock, equivs, lsof, whois Recommends: yunohost-admin , ntp, inetutils-ping | iputils-ping , bash-completion, rsyslog + , php7.3-common, php7.3-fpm, php7.3-ldap, php7.3-intl + , mariadb-server, php7.3-mysql , php7.3-gd, php7.3-curl, php-gettext , python3-pip , unattended-upgrades , libdbd-ldap-perl, libnet-dns-perl + , metronome (>=3.14.0) Suggests: htop, vim, rsync, acpi-support-base, udisks2 Conflicts: iptables-persistent , apache2 From 00bd7f16a5f4838e653b9f0c5045c56d89a9ed2c Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 1 Nov 2021 18:20:42 +0100 Subject: [PATCH 054/146] Tweak regenconf scripts for mysql, metronome, add one for postgresql --- data/helpers.d/postgresql | 31 +-------- data/hooks/conf_regen/12-metronome | 6 ++ data/hooks/conf_regen/34-mysql | 6 ++ data/hooks/conf_regen/35-postgresql | 66 ++++++++++++++++++++ data/hooks/conf_regen/{35-redis => 36-redis} | 0 5 files changed, 79 insertions(+), 30 deletions(-) create mode 100755 data/hooks/conf_regen/35-postgresql rename data/hooks/conf_regen/{35-redis => 36-redis} (100%) diff --git a/data/helpers.d/postgresql b/data/helpers.d/postgresql index 992474dd5..0e8d91936 100644 --- a/data/helpers.d/postgresql +++ b/data/helpers.d/postgresql @@ -292,34 +292,5 @@ ynh_psql_test_if_first_run() { # Make sure postgresql is indeed installed dpkg --list | grep -q "ii postgresql-$PSQL_VERSION" || ynh_die --message="postgresql-$PSQL_VERSION is not installed !?" - # Check for some weird issue where postgresql could be installed but etc folder would not exist ... - [ -e "/etc/postgresql/$PSQL_VERSION" ] || ynh_die --message="It looks like postgresql was not properly configured ? /etc/postgresql/$PSQL_VERSION is missing ... Could be due to a locale issue, c.f.https://serverfault.com/questions/426989/postgresql-etc-postgresql-doesnt-exist" - - # Make sure postgresql is started and enabled - # (N.B. : to check the active state, we check the cluster state because - # postgresql could be flagged as active even though the cluster is in - # failed state because of how the service is configured..) - systemctl is-active postgresql@$PSQL_VERSION-main -q || ynh_systemd_action --service_name=postgresql --action=restart - systemctl is-enabled postgresql -q || systemctl enable postgresql --quiet - - # If this is the very first time, we define the root password - # and configure a few things - if [ ! -f "$PSQL_ROOT_PWD_FILE" ]; then - local pg_hba=/etc/postgresql/$PSQL_VERSION/main/pg_hba.conf - - local psql_root_password="$(ynh_string_random)" - echo "$psql_root_password" >$PSQL_ROOT_PWD_FILE - sudo --login --user=postgres psql -c"ALTER user postgres WITH PASSWORD '$psql_root_password'" postgres - - # force all user to connect to local databases using hashed passwords - # https://www.postgresql.org/docs/current/static/auth-pg-hba-conf.html#EXAMPLE-PG-HBA.CONF - # Note: we can't use peer since YunoHost create users with nologin - # See: https://github.com/YunoHost/yunohost/blob/unstable/data/helpers.d/user - ynh_replace_string --match_string="local\(\s*\)all\(\s*\)all\(\s*\)peer" --replace_string="local\1all\2all\3md5" --target_file="$pg_hba" - - # Integrate postgresql service in yunohost - yunohost service add postgresql --log "/var/log/postgresql/" - - ynh_systemd_action --service_name=postgresql --action=reload - fi + yunohost tools regen-conf postgresql } diff --git a/data/hooks/conf_regen/12-metronome b/data/hooks/conf_regen/12-metronome index 5dfa7b5dc..c3c5ff828 100755 --- a/data/hooks/conf_regen/12-metronome +++ b/data/hooks/conf_regen/12-metronome @@ -2,6 +2,12 @@ set -e +if ! dpkg --list | grep -q 'ii *metronome ' +then + echo 'metronome is not installed, skipping' + exit 0 +fi + do_pre_regen() { pending_dir=$1 diff --git a/data/hooks/conf_regen/34-mysql b/data/hooks/conf_regen/34-mysql index 8b4d59288..c9115017d 100755 --- a/data/hooks/conf_regen/34-mysql +++ b/data/hooks/conf_regen/34-mysql @@ -3,6 +3,12 @@ set -e . /usr/share/yunohost/helpers +if ! dpkg --list | grep -q 'ii *mariadb-server ' +then + echo 'mysql/mariadb is not installed, skipping' + exit 0 +fi + do_pre_regen() { pending_dir=$1 diff --git a/data/hooks/conf_regen/35-postgresql b/data/hooks/conf_regen/35-postgresql new file mode 100755 index 000000000..0da0767cc --- /dev/null +++ b/data/hooks/conf_regen/35-postgresql @@ -0,0 +1,66 @@ +#!/bin/bash + +set -e +. /usr/share/yunohost/helpers + +if ! dpkg --list | grep -q "ii *postgresql-$PSQL_VERSION " +then + echo 'postgresql is not installed, skipping' + exit 0 +fi + +if [ ! -e "/etc/postgresql/$PSQL_VERSION" ] +then + ynh_die --message="It looks like postgresql was not properly configured ? /etc/postgresql/$PSQL_VERSION is missing ... Could be due to a locale issue, c.f.https://serverfault.com/questions/426989/postgresql-etc-postgresql-doesnt-exist" +fi + + +do_pre_regen() { + return 0 +} + +do_post_regen() { + regen_conf_files=$1 + + # Make sure postgresql is started and enabled + # (N.B. : to check the active state, we check the cluster state because + # postgresql could be flagged as active even though the cluster is in + # failed state because of how the service is configured..) + systemctl is-active postgresql@$PSQL_VERSION-main -q || ynh_systemd_action --service_name=postgresql --action=restart + systemctl is-enabled postgresql -q || systemctl enable postgresql --quiet + + # If this is the very first time, we define the root password + # and configure a few things + if [ ! -f "$PSQL_ROOT_PWD_FILE" ] || [ -z "$(cat $PSQL_ROOT_PWD_FILE)" ]; then + ynh_string_random >$PSQL_ROOT_PWD_FILE + fi + + sudo --login --user=postgres psql -c"ALTER user postgres WITH PASSWORD '$(cat $PSQL_ROOT_PWD_FILE)'" postgres + + # force all user to connect to local databases using hashed passwords + # https://www.postgresql.org/docs/current/static/auth-pg-hba-conf.html#EXAMPLE-PG-HBA.CONF + # Note: we can't use peer since YunoHost create users with nologin + # See: https://github.com/YunoHost/yunohost/blob/unstable/data/helpers.d/user + local pg_hba=/etc/postgresql/$PSQL_VERSION/main/pg_hba.conf + ynh_replace_string --match_string="local\(\s*\)all\(\s*\)all\(\s*\)peer" --replace_string="local\1all\2all\3md5" --target_file="$pg_hba" + + ynh_systemd_action --service_name=postgresql --action=reload +} + +FORCE=${2:-0} +DRY_RUN=${3:-0} + +case "$1" in + pre) + do_pre_regen $4 + ;; + post) + do_post_regen $4 + ;; + *) + echo "hook called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/data/hooks/conf_regen/35-redis b/data/hooks/conf_regen/36-redis similarity index 100% rename from data/hooks/conf_regen/35-redis rename to data/hooks/conf_regen/36-redis From 2282d0df61fa85e6f70fc57a425e3ba5cc0f2090 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 1 Nov 2021 18:35:36 +0100 Subject: [PATCH 055/146] Add sury by default in the core... --- data/helpers.d/apt | 33 --------------------------------- data/hooks/conf_regen/10-apt | 11 +++++++++++ 2 files changed, 11 insertions(+), 33 deletions(-) diff --git a/data/helpers.d/apt b/data/helpers.d/apt index cea850f6e..3d06608ac 100644 --- a/data/helpers.d/apt +++ b/data/helpers.d/apt @@ -262,8 +262,6 @@ ynh_install_app_dependencies() { || ynh_die --message="Inconsistent php versions in dependencies ... found : $specific_php_version" dependencies+=", php${specific_php_version}, php${specific_php_version}-fpm, php${specific_php_version}-common" - - ynh_add_sury fi @@ -285,23 +283,6 @@ ynh_install_app_dependencies() { dependencies="$current_dependencies, $dependencies" fi - # - # Epic ugly hack to fix the goddamn dependency nightmare of sury - # Sponsored by the "Djeezusse Fokin Kraiste Why Do Adminsys Has To Be So Fucking Complicated I Should Go Grow Potatoes Instead Of This Shit" collective - # https://github.com/YunoHost/issues/issues/1407 - # - # If we require to install php dependency - if grep --quiet 'php' <<< "$dependencies"; then - # And we have packages from sury installed (7.0.33-10+weirdshiftafter instead of 7.0.33-0 on debian) - if dpkg --list | grep "php7.0" | grep --quiet --invert-match "7.0.33-0+deb9"; then - # And sury ain't already in sources.lists - if ! grep --recursive --quiet "^ *deb.*sury" /etc/apt/sources.list*; then - # Re-add sury - ynh_add_sury - fi - fi - fi - cat >/tmp/${dep_app}-ynh-deps.control <>"${pending_dir}/etc/apt/preferences.d/ban_packages" + # Add sury + mkdir -p ${pending_dir}/etc/apt/sources.list.d/ + echo "deb https://packages.sury.org/php/ $(ynh_get_debian_release) main" > "${pending_dir}/etc/apt/sources.list.d/extra_php_version.list" + } do_post_regen() { regen_conf_files=$1 + # Add sury key + # We do this only at the post regen and if the key doesn't already exists, because we don't want the regenconf to fuck everything up if the regenconf runs while the network is down + if [[ ! -s /etc/apt/trusted.gpg.d/extra_php_version.gpg ]] + then + wget --timeout 900 --quiet "https://packages.sury.org/php/apt.gpg" --output-document=- | gpg --dearmor >"/etc/apt/trusted.gpg.d/extra_php_version.gpg" + fi + # Make sure php7.3 is the default version when using php in cli update-alternatives --set php /usr/bin/php7.3 } From 82f28efaafad73e0db72f1c7e8406f197d87af58 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 1 Nov 2021 18:44:12 +0100 Subject: [PATCH 056/146] Make php package always explicitly depend on the PHP version they're using, even if that's debian's default version --- data/helpers.d/apt | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/data/helpers.d/apt b/data/helpers.d/apt index 3d06608ac..194cae40f 100644 --- a/data/helpers.d/apt +++ b/data/helpers.d/apt @@ -252,9 +252,6 @@ ynh_install_app_dependencies() { # The (?<=php) syntax corresponds to lookbehind ;) local specific_php_version=$(echo $dependencies | grep -oP '(?<=php)[0-9.]+(?=-|\>)' | sort -u) - # Ignore case where the php version found is the one available in debian vanilla - [[ "$specific_php_version" != "$YNH_DEFAULT_PHP_VERSION" ]] || specific_php_version="" - if [[ -n "$specific_php_version" ]] then # Cover a small edge case where a packager could have specified "php7.4-pwet php5-gni" which is confusing @@ -301,17 +298,10 @@ EOF if [[ -n "$specific_php_version" ]] then - # Set the default php version back as the default version for php-cli. - update-alternatives --set php /usr/bin/php$YNH_DEFAULT_PHP_VERSION - - # Store phpversion into the config of this app ynh_app_setting_set --app=$app --key=phpversion --value=$specific_php_version - # Integrate new php-fpm service in yunohost - yunohost service add php${specific_php_version}-fpm --log "/var/log/php${phpversion}-fpm.log" - elif grep --quiet 'php' <<< "$dependencies"; then - # Store phpversion into the config of this app - ynh_app_setting_set --app=$app --key=phpversion --value=$YNH_DEFAULT_PHP_VERSION + # Set the default php version back as the default version for php-cli. + update-alternatives --set php /usr/bin/php$YNH_DEFAULT_PHP_VERSION fi } From 4ccd718183e5646378c17d407d275e1502fc58bb Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 1 Nov 2021 19:59:35 +0100 Subject: [PATCH 057/146] Improve handling of optional services/packages + dynamically handle the list of php-fpm versions --- data/templates/yunohost/services.yml | 15 ++++++++++---- src/yunohost/service.py | 29 +++++++++++++++------------- 2 files changed, 27 insertions(+), 17 deletions(-) diff --git a/data/templates/yunohost/services.yml b/data/templates/yunohost/services.yml index c781d54aa..967025d19 100644 --- a/data/templates/yunohost/services.yml +++ b/data/templates/yunohost/services.yml @@ -12,24 +12,31 @@ metronome: log: [/var/log/metronome/metronome.log,/var/log/metronome/metronome.err] needs_exposed_ports: [5222, 5269] category: xmpp + ignore_if_package_is_not_installed: metronome mysql: log: [/var/log/mysql.log,/var/log/mysql.err,/var/log/mysql/error.log] actual_systemd_service: mariadb category: database + ignore_if_package_is_not_installed: mariadb-server nginx: log: /var/log/nginx test_conf: nginx -t needs_exposed_ports: [80, 443] category: web -php7.3-fpm: - log: /var/log/php7.3-fpm.log - test_conf: php-fpm7.3 --test - category: web +# Yunohost will dynamically add installed php-fpm services (7.3, 7.4, 8.0, ...) in services.py +#php7.3-fpm: +# log: /var/log/php7.3-fpm.log +# test_conf: php-fpm7.3 --test +# category: web postfix: log: [/var/log/mail.log,/var/log/mail.err] actual_systemd_service: postfix@- needs_exposed_ports: [25, 587] category: email +postgresql: + actual_systemd_service: 'postgresql@11-main' + category: database + ignore_if_package_is_not_installed: postgresql-11 redis-server: log: /var/log/redis/redis-server.log category: database diff --git a/src/yunohost/service.py b/src/yunohost/service.py index f200d08c0..26d189d95 100644 --- a/src/yunohost/service.py +++ b/src/yunohost/service.py @@ -123,7 +123,7 @@ def service_add( # Try to get the description from systemd service _, systemd_info = _get_service_information_from_systemd(name) type_ = systemd_info.get("Type") if systemd_info is not None else "" - if type_ == "oneshot" and name != "postgresql": + if type_ == "oneshot": logger.warning( "/!\\ Packagers! Please provide a --test_status when adding oneshot-type services in Yunohost, such that it has a reliable way to check if the service is running or not." ) @@ -738,13 +738,20 @@ def _get_services(): if "log" not in services["ynh-vpnclient"]: services["ynh-vpnclient"]["log"] = ["/var/log/ynh-vpnclient.log"] - # Stupid hack for postgresql which ain't an official service ... Can't - # really inject that info otherwise. Real service we want to check for - # status and log is in fact postgresql@x.y-main (x.y being the version) - if "postgresql" in services: - if "description" in services["postgresql"]: - del services["postgresql"]["description"] - services["postgresql"]["actual_systemd_service"] = "postgresql@11-main" + services_with_package_condition = [name for name, infos in services.items() if infos.get("ignore_if_package_is_not_installed")] + for name in services_with_package_condition: + package = services[name]["ignore_if_package_is_not_installed"] + if os.system(f"dpkg --list | grep -q 'ii *{package}'") != 0: + del services[name] + + php_fpm_versions = check_output(r"dpkg --list | grep -P 'ii php\d.\d-fpm' | awk '{print $2}' | grep -o -P '\d.\d'") + php_fpm_versions = [v for v in php_fpm_versions.split('\n') if v.strip()] + for version in php_fpm_versions: + services[f"php{version}-fpm"] = { + "log": f"/var/log/php{version}-fpm.log", + "test_conf": f"php-fpm{version} --test", # ofc the service is phpx.y-fpm but the program is php-fpmx.y because why not ... + "category": "web" + } # Remove legacy /var/log/daemon.log and /var/log/syslog from log entries # because they are too general. Instead, now the journalctl log is @@ -864,11 +871,7 @@ def _get_journalctl_logs(service, number="all"): services = _get_services() systemd_service = services.get(service, {}).get("actual_systemd_service", service) try: - return check_output( - "journalctl --no-hostname --no-pager -u {0} -n{1}".format( - systemd_service, number - ) - ) + return check_output(f"journalctl --no-hostname --no-pager -u {systemd_service} -n{number}") except Exception: import traceback From b46a94a41dd6725653b2206b6d3e4ae80d2aa02c Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 1 Nov 2021 20:14:12 +0100 Subject: [PATCH 058/146] Automagically run ynh_psql_if_first_run / regenconf upon postgresl install --- data/helpers.d/apt | 9 +++++++++ data/helpers.d/postgresql | 2 ++ 2 files changed, 11 insertions(+) diff --git a/data/helpers.d/apt b/data/helpers.d/apt index 194cae40f..ecad3b14a 100644 --- a/data/helpers.d/apt +++ b/data/helpers.d/apt @@ -261,6 +261,7 @@ ynh_install_app_dependencies() { dependencies+=", php${specific_php_version}, php${specific_php_version}-fpm, php${specific_php_version}-common" fi + local psql_installed2="$(dpkg --list | grep -q "ii *postgresql-$PSQL_VERSION" && echo yes || echo no)" # The first time we run ynh_install_app_dependencies, we will replace the # entire control file (This is in particular meant to cover the case of @@ -303,6 +304,14 @@ EOF # Set the default php version back as the default version for php-cli. update-alternatives --set php /usr/bin/php$YNH_DEFAULT_PHP_VERSION fi + + # Trigger postgresql regenconf if we may have just installed postgresql + local psql_installed2="$(dpkg --list | grep -q "ii *postgresql-$PSQL_VERSION" && echo yes || echo no)" + if [[ "$psql_installed" != "$psql_installed2" ]] + then + yunohost tools regen-conf postgresql + fi + } # Add dependencies to install with ynh_install_app_dependencies diff --git a/data/helpers.d/postgresql b/data/helpers.d/postgresql index 0e8d91936..563d3e7be 100644 --- a/data/helpers.d/postgresql +++ b/data/helpers.d/postgresql @@ -281,6 +281,8 @@ ynh_psql_remove_db() { # Create a master password and set up global settings # +# [internal] +# # usage: ynh_psql_test_if_first_run # # It also make sure that postgresql is installed and running From 56f7cd87ecacc3b73d3994b1d13f9022133d9c06 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 1 Nov 2021 21:00:35 +0100 Subject: [PATCH 059/146] regenconf apt: ynh_get_debian_release undefined + reorder for clarity --- data/hooks/conf_regen/10-apt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/data/hooks/conf_regen/10-apt b/data/hooks/conf_regen/10-apt index d67951823..06662375d 100755 --- a/data/hooks/conf_regen/10-apt +++ b/data/hooks/conf_regen/10-apt @@ -7,6 +7,11 @@ do_pre_regen() { mkdir --parents "${pending_dir}/etc/apt/preferences.d" + # Add sury + mkdir -p ${pending_dir}/etc/apt/sources.list.d/ + echo "deb https://packages.sury.org/php/ $(lsb_release --codename --short) main" > "${pending_dir}/etc/apt/sources.list.d/extra_php_version.list" + + # Ban some packages from sury packages_to_refuse_from_sury="php php-fpm php-mysql php-xml php-zip php-mbstring php-ldap php-gd php-curl php-bz2 php-json php-sqlite3 php-intl openssl libssl1.1 libssl-dev" for package in $packages_to_refuse_from_sury; do echo " @@ -15,6 +20,7 @@ Pin: origin \"packages.sury.org\" Pin-Priority: -1" >>"${pending_dir}/etc/apt/preferences.d/extra_php_version" done + # Ban some packages that users may inadvertendly try to install such as apache2 ... echo " # PLEASE READ THIS WARNING AND DON'T EDIT THIS FILE @@ -44,9 +50,6 @@ Pin: release * Pin-Priority: -1 " >>"${pending_dir}/etc/apt/preferences.d/ban_packages" - # Add sury - mkdir -p ${pending_dir}/etc/apt/sources.list.d/ - echo "deb https://packages.sury.org/php/ $(ynh_get_debian_release) main" > "${pending_dir}/etc/apt/sources.list.d/extra_php_version.list" } From b953ae9dd4f8886a9dcec93946cdfa10cee3de80 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 2 Nov 2021 01:43:31 +0100 Subject: [PATCH 060/146] Typo + used existing ynh_package_is_installed helper --- data/helpers.d/apt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/helpers.d/apt b/data/helpers.d/apt index ecad3b14a..d35328f6a 100644 --- a/data/helpers.d/apt +++ b/data/helpers.d/apt @@ -261,7 +261,7 @@ ynh_install_app_dependencies() { dependencies+=", php${specific_php_version}, php${specific_php_version}-fpm, php${specific_php_version}-common" fi - local psql_installed2="$(dpkg --list | grep -q "ii *postgresql-$PSQL_VERSION" && echo yes || echo no)" + local psql_installed="$(ynh_package_is_installed "postgresql-$PSQL_VERSION" && echo yes || echo no)" # The first time we run ynh_install_app_dependencies, we will replace the # entire control file (This is in particular meant to cover the case of @@ -306,7 +306,7 @@ EOF fi # Trigger postgresql regenconf if we may have just installed postgresql - local psql_installed2="$(dpkg --list | grep -q "ii *postgresql-$PSQL_VERSION" && echo yes || echo no)" + local psql_installed2="$(ynh_package_is_installed "postgresql-$PSQL_VERSION" && echo yes || echo no)" if [[ "$psql_installed" != "$psql_installed2" ]] then yunohost tools regen-conf postgresql From c571516c68a883069d13518b264ea582e2c546b7 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 2 Nov 2021 01:44:48 +0100 Subject: [PATCH 061/146] i18n strings --- locales/en.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locales/en.json b/locales/en.json index 81e75eb32..8590c5c62 100644 --- a/locales/en.json +++ b/locales/en.json @@ -624,8 +624,8 @@ "service_description_fail2ban": "Protects against brute-force and other kinds of attacks from the Internet", "service_description_metronome": "Manage XMPP instant messaging accounts", "service_description_mysql": "Stores app data (SQL database)", + "service_description_postgresql": "Stores app data (SQL database)", "service_description_nginx": "Serves or provides access to all the websites hosted on your server", - "service_description_php7.3-fpm": "Runs apps written in PHP with NGINX", "service_description_postfix": "Used to send and receive e-mails", "service_description_redis-server": "A specialized database used for rapid data access, task queue, and communication between programs", "service_description_rspamd": "Filters spam, and other e-mail related features", From 99e46b3a61d73795267198bf99088dd8d00bcbc8 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 2 Nov 2021 02:50:32 +0100 Subject: [PATCH 062/146] ynh_local_curl: temporarily auto-add visitors if needed --- data/helpers.d/utils | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/data/helpers.d/utils b/data/helpers.d/utils index 453a1ab94..8b7179289 100644 --- a/data/helpers.d/utils +++ b/data/helpers.d/utils @@ -290,8 +290,18 @@ ynh_local_curl() { chown root $cookiefile chmod 700 $cookiefile + # Temporarily enable visitors if needed... + local visitors_enabled=$(ynh_permission_has_user "main" "visitors" && echo yes || echo no) + if [[ $visitors_enabled == "no" ]]; then + ynh_permission_update --permission "main" --add "visitors" + fi + # Curl the URL curl --silent --show-error --insecure --location --header "Host: $domain" --resolve $domain:443:127.0.0.1 $POST_data "$full_page_url" --cookie-jar $cookiefile --cookie $cookiefile + + if [[ $visitors_enabled == "no" ]]; then + ynh_permission_update --permission "main" --remove "visitors" + fi } # Create a dedicated config file from a template From 0489b717290016c511e86939964492c435e68495 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 3 Nov 2021 18:42:02 +0100 Subject: [PATCH 063/146] Update changelog for 4.3.1.8 --- debian/changelog | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/debian/changelog b/debian/changelog index 651f20a75..a7d6c2445 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,18 @@ +yunohost (4.3.1.8) testing; urgency=low + + - [enh] dyndns: Drop some YAGNI + improve IPv6-only support + resilience w.r.t. ns0 / ns1 being down (a61d0231, [#1367](https://github.com/YunoHost/yunohost/pull/1367)) + - [fix] helpers: improve composer debug when it can't install dependencies (4ebcaf8d) + - [enh] helpers: allow to get/set/delete app settings without explicitly passing app id everytime... (fcd2ef9d) + - [fix] helpers: Don't say the 'app was restored' when restore failed after failed upgrade (019d207c) + - [enh] helpers: temporarily auto-add visitors during ynh_local_curl if needed ([#1370](https://github.com/YunoHost/yunohost/pull/1370)) + - [enh] apps: Add YNH_ARCH to app script env for easier debugging and arch check in script (85eb43a7) + - [mod] misc fixes/enh (2687121f, 146fba7d, 86a9cb37, 4e917b5e, 974ea71f, edc5295d, ba489bfc) + - [i18n] Translations updated for Basque, French, Spanish + + Thanks to all contributors <3 ! (ljf, Page Asgardius, ppr, punkrockgirl) + + -- Alexandre Aubin Wed, 03 Nov 2021 18:35:18 +0100 + yunohost (4.3.1.7) testing; urgency=low - [fix] configpanel: Misc technical fixes ... (341059d0, 9c22329e) From dc55a2d99e6b7f0d083c6781c0acb4941dbc1bb0 Mon Sep 17 00:00:00 2001 From: punkrockgirl Date: Thu, 4 Nov 2021 16:57:53 +0000 Subject: [PATCH 064/146] Translated using Weblate (Basque) Currently translated at 100.0% (705 of 705 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/eu/ --- locales/eu.json | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/locales/eu.json b/locales/eu.json index bbe78029a..f8469c37e 100644 --- a/locales/eu.json +++ b/locales/eu.json @@ -65,7 +65,7 @@ "config_apply_failed": "Ezin izan da konfigurazio berria ezarri: {error}", "config_cant_set_value_on_section": "Ezinezkoa da balio bakar bat ezartzea konfigurazio atal oso batean.", "config_no_panel": "Ez da konfigurazio-panelik aurkitu.", - "diagnosis_found_errors_and_warnings": "{category} atalari dago(z)kion {errors} arazoa(k) (eta {warnings} abisua(k)) aurkitu d(ir)a!", + "diagnosis_found_errors_and_warnings": "{category} atalari dago(z)kion {errors} arazo (eta {warnings} abisu) aurkitu d(ir)a!", "diagnosis_description_regenconf": "Sistemaren ezarpenak", "app_upgrade_script_failed": "Errore bat gertatu da aplikazioaren eguneratze aginduan", "diagnosis_basesystem_hardware": "Zerbitzariaren arkitektura {virt} {arch} da", @@ -124,16 +124,16 @@ "diagnosis_basesystem_ynh_single_version": "{package} bertsioa: {version} ({repo})", "diagnosis_failed_for_category": "'{category}' ataleko diagnostikoak kale egin du: {error}", "diagnosis_cache_still_valid": "(Cachea oraindik baliogarria da {category} (ar)en diagnosirako. Ez da berrabiaraziko!)", - "diagnosis_found_errors": "{category} atalari dago(z)kion {errors} arazoa(k) aurkitu d(ir)a!", - "diagnosis_found_warnings": "{category} atalari dagokion eta hobetu daite(z)keen {warnings} abisua(k) aurkitu d(ir)a.", + "diagnosis_found_errors": "{category} atalari dago(z)kion {errors} arazo aurkitu d(ir)a!", + "diagnosis_found_warnings": "{category} atalari dagokion eta hobetu daite(z)keen {warnings} abisu aurkitu d(ir)a.", "diagnosis_ip_connected_ipv6": "Zerbitzaria IPv6 bidez dago internetera konektatuta!", "diagnosis_everything_ok": "Badirudi guztia zuzen dagoela {category} atalean!", "diagnosis_ip_no_ipv4": "Zerbitzariak ez du dabilen IPv4rik.", "diagnosis_ip_no_ipv6": "Zerbitzariak ez du dabilen IPv6rik.", "diagnosis_ip_broken_dnsresolution": "Domeinu izenaren ebazpena kaltetuta dagoela dirudi… Suebakiren bat ote dago DNS eskaerak oztopatzen?", - "diagnosis_diskusage_low": "{mountpoint} fitxategi-sistemak ({device} euskarrian) edukieraren {free} ({free_percent}%) bakarrik du erabilgarri ({total} orotara). Kontuz ibili.", + "diagnosis_diskusage_low": "{mountpoint} fitxategi-sistemak ({device} euskarrian) edukieraren {free} ({free_percent}%) bakarrik ditu erabilgarri ({total} orotara). Kontuz ibili.", "diagnosis_dns_good_conf": "DNS ezarpenak zuzen konfiguratuta daude {domain} domeinurako ({category} atala)", - "diagnosis_diskusage_verylow": "{mountpoint} fitxategi-sistemak ({device} euskarrian) edukieraren {free} ({free_percent}%) bakarrik du erabilgarri ({total} orotara). Zertxobait hustu beharko zenuke!", + "diagnosis_diskusage_verylow": "{mountpoint} fitxategi-sistemak ({device} euskarrian) edukieraren {free} ({free_percent}%) bakarrik ditu erabilgarri ({total} orotara). Zertxobait hustu beharko zenuke!", "diagnosis_description_basesystem": "Sistemaren oinarria", "diagnosis_description_services": "Zerbitzuen egoeraren egiaztapena", "diagnosis_http_could_not_diagnose": "Ezinezkoa izan da domeinuak IPv{ipversion} kanpotik eskuragarri dauden egiaztatzea.", @@ -170,12 +170,12 @@ "app_full_domain_unavailable": "Aplikazio honek bere domeinu propioa behar du, baina beste aplikazio batzuk daude dagoeneko instalatuta '{domain}' domeinuan. Azpidomeinu bat erabil zenezake instalatu nahi duzun aplikaziorako.", "app_install_script_failed": "Errore bat gertatu da aplikazioaren instalatzailearen aginduetan", "diagnosis_basesystem_host": "Zerbitzariak Debian {debian_version} darabil", - "diagnosis_ignored_issues": "(kontutan hartu ez d(ir)en + {nb_ignored} arazo)", + "diagnosis_ignored_issues": "(kontuan hartu ez d(ir)en + {nb_ignored} arazo)", "diagnosis_ip_dnsresolution_working": "Domeinu izenaren ebazpena badabil!", "diagnosis_failed": "Ezinezkoa izan da '{category}' ataleko diagnostikoa lortzea: {error}", "diagnosis_ip_weird_resolvconf": "DNS ebazpena badabilela dirudi, baina antza denez moldatutako /etc/resolv.conf fitxategia erabiltzen ari zara.", "diagnosis_dns_bad_conf": "DNS balio batzuk falta dira edo ez dira zuzenak {domain} domeinurako ({category} atala)", - "diagnosis_diskusage_ok": "{mountpoint} fitxategi-sistemak ({device} euskarrian) edukieraren {free} ({free_percent}%) du erabilgarri oraindik ({total} orotara)!", + "diagnosis_diskusage_ok": "{mountpoint} fitxategi-sistemak ({device} euskarrian) edukieraren {free} ({free_percent}%) ditu erabilgarri oraindik ({total} orotara)!", "apps_catalog_update_success": "Aplikazioen katalogoa eguneratu da!", "certmanager_warning_subdomain_dns_record": "'{subdomain}' azpidomeinuak ez dauka '{domain}'(e)k duen IP bera. Ezaugarri batzuk ez dira erabilgarri egongo hau zuzendu arte eta ziurtagiri bat birsortu arte.", "app_argument_choice_invalid": "Hautatu ({choices}) aukeretako bat '{name}' argumenturako: '{value}' ez dago aukera horien artean", @@ -183,7 +183,7 @@ "diagnosis_basesystem_ynh_main_version": "Zerbitzariak YunoHosten {main_version} ({repo}) darabil", "backup_custom_backup_error": "Neurrira egindako babeskopiak ezin izan du 'babeskopia egin' urratsetik haratago egin", "diagnosis_ip_broken_resolvconf": "Zure zerbitzarian domeinu izenaren ebazpena kaltetuta dagoela dirudi, antza denez /etc/resolv.conf fitxategia ez dago 127.0.0.1ra adi.", - "diagnosis_ip_no_ipv6_tip": "Dabilen IPv6 izatea ez da derrigorrezkoa zerbitzariaren funtzionamendurako, baina egokiena da interneten osasunerako. IPv6 automatikoki konfiguratu beharko luke sistemak edo telefono-konpainiak. Bestela, eskuz konfiguratu beharko zenituzke hainbat gauza dokumentazioan azaltzen den bezala. Ezin baduzu edo IPv6 gaitzea zuretzat kontu teknikoegia baldin bada, ez duzu abisu hau zertan kontutan hartu.", + "diagnosis_ip_no_ipv6_tip": "Dabilen IPv6 izatea ez da derrigorrezkoa zerbitzariaren funtzionamendurako, baina egokiena da interneten osasunerako. IPv6 automatikoki konfiguratu beharko luke sistemak edo operadoreak. Bestela, eskuz konfiguratu beharko zenituzke hainbat gauza dokumentazioan azaltzen den bezala. Ezin baduzu edo IPv6 gaitzea zuretzat kontu teknikoegia baldin bada, ez duzu abisu hau zertan kontuan hartu.", "diagnosis_http_nginx_conf_not_up_to_date_details": "Egoera konpontzeko, ikuskatu desberdintasunak yunohost tools regen-conf nginx --dry-run --with-diff komandoren bidez eta, proposatutako aldaketak onartzen badituzu, ezarri itzazu yunohost tools regen-conf nginx --force erabiliz.", "diagnosis_domain_not_found_details": "{domain} domeinua ez da WHOISen datubasean existitzen edo iraungi da!", "app_start_backup": "{app}(r)en babeskopia egiteko fitxategiak eskuratzen…", @@ -214,7 +214,7 @@ "backup_running_hooks": "Babeskopien kakoak exekutatzen…", "backup_unable_to_organize_files": "Ezinezkoa izan da modu azkarra erabiltzea fitxategiko artxiboak prestatzeko", "backup_output_symlink_dir_broken": "'{path}' fitxategi-katalogoaren symlink-a ez dabil. Agian [ber]muntatzea ahaztu zaizu edo euskarria atakara konektatzea ahaztu duzu.", - "backup_with_no_backup_script_for_app": "'{app}' aplikazioak ez du babeskopia egiteko agindurik. Ez da kontutan hartuko.", + "backup_with_no_backup_script_for_app": "'{app}' aplikazioak ez du babeskopia egiteko agindurik. Ez da kontuan hartuko.", "backup_with_no_restore_script_for_app": "{app}(e)k ez du lehengoratzeko agindurik, ezingo duzu aplikazio hau automatikoki lehengoratu.", "certmanager_attempt_to_renew_nonLE_cert": "'{domain}' domeinurako ziurtagiria ez da Let's Encryptek jaulkitakoa. Ezin da automatikoki berriztu!", "certmanager_attempt_to_renew_valid_cert": "'{domain}' domeinurako ziurtagiria iraungitzear dago! (Zertan ari zaren baldin badakizu, --force erabil dezakezu)", @@ -279,7 +279,7 @@ "dyndns_registration_failed": "Ezinezkoa izan da DynDNS domeinua erregistratzea: {error}", "extracting": "Ateratzen…", "diagnosis_ports_unreachable": "{port}. ataka ez dago eskuragarri kanpotik.", - "diagnosis_regenconf_manually_modified_details": "Ez dago arazorik zertan ari zaren baldin badakizu! YunoHostek fitxategi hau automatikoki eguneratzeari utziko dio… Baina kontutan izan YunoHosten eguneraketek aldaketa garrantzitsuak izan ditzaketela. Nahi izatekotan, desberdintasunak aztertu ditzakezu yunohost tools regen-conf {category} --dry-run --with-diff komandoa exekutatuz, eta gomendatutako konfiguraziora bueltatu yunohost tools regen-conf {category} --force erabiliz", + "diagnosis_regenconf_manually_modified_details": "Ez dago arazorik zertan ari zaren baldin badakizu! YunoHostek fitxategi hau automatikoki eguneratzeari utziko dio… Baina kontuan izan YunoHosten eguneraketek aldaketa garrantzitsuak izan ditzaketela. Nahi izatekotan, desberdintasunak aztertu ditzakezu yunohost tools regen-conf {category} --dry-run --with-diff komandoa exekutatuz, eta gomendatutako konfiguraziora bueltatu yunohost tools regen-conf {category} --force erabiliz", "experimental_feature": "Adi: Funtzio hau esperimentala eta ezegonkorra da, ez zenuke erabili beharko ez badakizu zertan ari zaren.", "global_settings_cant_write_settings": "Ezinezkoa izan da konfigurazio fitxategia gordetzea, zergatia: {reason}", "dyndns_domain_not_provided": "{provider} DynDNS enpresak ezin du {domain} domeinua eskaini.", @@ -351,7 +351,7 @@ "log_domain_dns_push": "Bidali '{}' domeinuaren DNS ezarpenak", "log_tools_migrations_migrate_forward": "Exekutatu migrazioak", "log_tools_postinstall": "Abiarazi YunoHost zerbitzariaren instalazio ondorengo prozesua", - "diagnosis_mail_fcrdns_nok_alternatives_4": "Operadore batzuek ez dute alderantzizko DNSa konfiguratzen uzten (edo funtzioa ez dabil…). Hau dela-eta arazoak badituzu, irtenbide batzuk eduki ditzakezu:
- Operadore batzuek relay posta zerbitzari bat eskaini dezakete, baina kasu horretan zure posta elektronikoa zelatatu dezakete.
- Pribatutasuna bermatzeko *IP publiko bat duen* VPN bat erabiltzea izan daiteke irtenbidea. Ikus https://yunohost.org/#/vpn_advantage
- Edo operadore desberdin batera aldatu", + "diagnosis_mail_fcrdns_nok_alternatives_4": "Operadore batzuek ez dute alderantzizko DNSa konfiguratzen uzten (edo funtzioa ez dabil…). Hau dela-eta arazoak badituzu, irtenbide batzuk eduki ditzakezu:
- Operadore batzuek relay posta zerbitzari bat eskaini dezakete, baina kasu horretan zure posta elektronikoa zelatatu dezakete.
- Pribatutasuna bermatzeko *IP publikoa* duen VPN bat erabiltzea izan daiteke irtenbidea. Ikus https://yunohost.org/#/vpn_advantage
- Edo operadore desberdin batera aldatu", "domain_dns_registrar_supported": "YunoHostek automatikoki antzeman du domeinu hau **{registrar}** erregistro-enpresak kudeatzen duela. Nahi baduzu YunoHostek automatikoki konfiguratu ditzake DNS ezarpenak, API egiaztagiri zuzenak zehazten badituzu. API egiaztagiriak non lortzeko dokumentazioa orri honetan duzu: https://yunohost.org/registar_api_{registrar}. (Baduzu DNS erregistroak eskuz konfiguratzeko aukera ere, gidalerro hauetan ageri den bezala: https://yunohost.org/dns)", "domain_dns_push_failed_to_list": "Ezinezkoa izan da APIa erabiliz oraingo erregistroak antzematea: {error}", "domain_dns_push_already_up_to_date": "Ezarpenak egunean daude, ez dago zereginik.", @@ -380,11 +380,11 @@ "log_user_create": "Gehitu '{}' erabiltzailea", "group_cannot_edit_visitors": "'bisitariak' taldea ezin da eskuz moldatu. Saiorik hasi gabeko bisitariak barne hartzen dituen talde berezia da", "diagnosis_ram_verylow": "Sistemak RAM memoriaren {available} ({available_percent}%) dauka bakarrik erabilgarri! ({total} orotara)", - "diagnosis_ram_low": "Sistemak {available} soilik du erabilgarri, RAM memoriaren ({available_percent}%) ({total} orotara). Kontuz ibili.", - "diagnosis_ram_ok": "Sistemak oraindik dauka RAM memoriaren {available} ({available_percent}%) erabilgarri, {total} orotara.", - "diagnosis_swap_none": "Sistemak ez du swap-ik. Gutxienez {recommended} gehitzen saiatu beharko zinateke, sistema memoriarik gabe gera ez dadin.", - "diagnosis_swap_ok": "Sistemak {total} swap dauka!", - "diagnosis_regenconf_allgood": "Konfigurazio fitxategi guztiak bat datoz gomendatutako ezarpenekin!", + "diagnosis_ram_low": "RAM memoriaren {available} ditu erabilgarri sistemak; memoria guztiaren {total} %{available_percent}a. Adi ibili.", + "diagnosis_ram_ok": "RAM memoriaren {available} ditu oraindik erabilgarri sistemak; memoria guztiaren {total} %{available_percent}a.", + "diagnosis_swap_none": "Sistemak ez du swap-ik. Gutxienez {recommended} izaten saiatu beharko zinateke, sistema memoriarik gabe gera ez dadin.", + "diagnosis_swap_ok": "Sistemak {total} swap dauzka!", + "diagnosis_regenconf_allgood": "Konfigurazio-fitxategi guztiak bat datoz gomendatutako ezarpenekin!", "diagnosis_regenconf_manually_modified": "Dirudienez {file} konfigurazio fitxategia eskuz aldatu da.", "diagnosis_security_vulnerable_to_meltdown": "Badirudi Meltdown izeneko segurtasun arazo larriak eragin diezazukela", "diagnosis_ports_could_not_diagnose": "Ezinezkoa izan da atakak IPv{ipversion} erabiliz kanpotik eskuragarri dauden egiaztatzea.", @@ -400,18 +400,18 @@ "diagnosis_mail_fcrdns_different_from_ehlo_domain_details": "Oraingo alderantzizko DNSa: {rdns_domain}
Esperotako balioa: {ehlo_domain}", "diagnosis_mail_queue_too_big": "Mezu gehiegi posta elektronikoaren ilaran: ({nb_pending} mezu)", "diagnosis_ports_could_not_diagnose_details": "Errorea: {error}", - "diagnosis_swap_tip": "Mesedez, kontutan hartu zerbitzari honen swap memoria SD edo SSD euskarri batean gordetzen bada, euskarri horren bizi-iraupena izugarri laburtu dezakeela.", + "diagnosis_swap_tip": "Mesedez, kontuan hartu zerbitzari honen swap memoria SD edo SSD euskarri batean gordetzeak euskarri horren bizi-iraupena izugarri laburtu dezakeela.", "invalid_regex": "'Regexa' ez da zuzena: '{regex}'", "group_creation_failed": "Ezinezkoa izan da '{group}' taldea sortzea: {error}", "log_user_permission_reset": "Berrezarri '{}' baimena", "group_cannot_edit_primary_group": "'{group}' taldea ezin da eskuz moldatu. Erabiltzaile zehatz bakar bat duen talde nagusia da.", - "diagnosis_swap_notsomuch": "Sistemak {total} swap baino ez du. Gutxienez {recommended} gehitzen saiatu beharko zinateke sistema memoriarik gabe gera ez dadin.", + "diagnosis_swap_notsomuch": "Sistemak {total} swap baino ez ditu. Gutxienez {recommended} izaten saiatu beharko zinateke sistema memoriarik gabe gera ez dadin.", "diagnosis_security_vulnerable_to_meltdown_details": "Arazoa konpontzeko, sistema eguneratu eta berrabiarazi beharko zenuke linux-en kernel berriagoa erabiltzeko (edo zerbitzariaren arduradunarekin jarri harremanetan). Ikus https://meltdownattack.com/ argibide gehiagorako.", "diagnosis_services_conf_broken": "{service} zerbitzuko konfigurazioa hondatuta dago!", "diagnosis_services_bad_status_tip": "Zerbitzua berrabiarazten saia zaitezke eta nahikoa ez bada, aztertu zerbitzuaren erregistroa administrariaren webgunean. (komandoak nahiago badituzu yunohost service restart {service} eta yunohost service log {service} hurrenez hurren).", "diagnosis_mail_ehlo_unreachable_details": "Ezinezkoa izan da zure zerbitzariko 25. atakari konektatzea IPv{ipversion} erabiliz. Badirudi ez dagoela eskuragarri.
1. Arazo honen zergati ohikoena 25. ataka egoki birbideratuta ez egotea da.
2. Egiaztatu postfix zerbitzua martxan dagoela.
3. Konfigurazio konplexuagoetan: egiaztatu suebaki edo reverse-proxyak konexioa oztopatzen ez dutela.", "group_already_exist_on_system_but_removing_it": "{group} taldea existitzen da sistemaren taldeetan, baina YunoHostek ezabatuko du…", - "diagnosis_mail_fcrdns_nok_details": "Lehenik eta behin zure routerraren konfigurazio gunean edo hostingaren enprearen aukeretan alderantzizko DNSa konfiguratzen saiatu beharko zinateke {ehlo_domain} erabiliz. (Hosting enpresaren arabera, ezinbestekoa da beraiekin harremanetan jartzea).", + "diagnosis_mail_fcrdns_nok_details": "Lehenik eta behin zure routerraren konfigurazio gunean edo hostingaren enpresaren aukeretan alderantzizko DNSa konfiguratzen saiatu beharko zinateke {ehlo_domain} erabiliz. (Hosting enpresaren arabera, ezinbestekoa da beraiekin harremanetan jartzea).", "diagnosis_mail_outgoing_port_25_ok": "SMTP posta zerbitzaria posta elektronikoa bidaltzeko gai da (25. atakaren irteera ez dago blokeatuta).", "diagnosis_ports_partially_unreachable": "{port}. ataka ez dago eskuragarri kanpotik Pv{failed} erabiliz.", "diagnosis_ports_forwarding_tip": "Arazoa konpontzeko, litekeena da operadorearen routerrean ataken birbideraketa konfiguratu behar izatea, https://yunohost.org/isp_box_config-n agertzen den bezala", @@ -458,7 +458,7 @@ "global_settings_setting_smtp_relay_user": "SMTP relay erabiltzailea", "domain_cert_gen_failed": "Ezinezkoa izan da ziurtagiria sortzea", "field_invalid": "'{}' ez da baliogarria", - "diagnosis_mail_outgoing_port_25_blocked_relay_vpn": "Operadore batzuei bost axola zaie internetaren neutraltasuna (Net Neutrality) eta ez dute 25. ataka desblokeatzen uzten.
- Operadore batzuek relay posta zerbitzari bat eskaini dezakete, baina kasu horretan zure posta elektronikoa zelatatu dezakete.
- Pribatutasuna bermatzeko *IP publiko bat duen* VPN bat erabiltzea izan daiteke irtenbidea. Ikus https://yunohost.org/#/vpn_advantage
- Edo operadore desberdin batera aldatu", + "diagnosis_mail_outgoing_port_25_blocked_relay_vpn": "Operadore batzuei bost axola zaie internetaren neutraltasuna (Net Neutrality) eta ez dute 25. ataka desblokeatzen uzten.
- Operadore batzuek relay posta zerbitzari bat eskaini dezakete, baina kasu horretan zure posta elektronikoa zelatatu dezakete.
- Pribatutasuna bermatzeko *IP publikoa* duen VPN bat erabiltzea izan daiteke irtenbidea. Ikus https://yunohost.org/#/vpn_advantage
- Edo operadore desberdin batera aldatu", "ldap_server_down": "Ezin izan da LDAP zerbitzarira konektatu", "ldap_server_is_down_restart_it": "LDAP zerbitzaria ez dago martxan, saia zaitez berrabiarazten…", "log_app_upgrade": "'{}' aplikazioa eguneratu", @@ -506,7 +506,7 @@ "migration_0015_not_stretch": "Debianen oraingo bertsioa ez da Stretch!", "migrations_success_forward": "{id} migrazioak amaitu du", "migrations_to_be_ran_manually": "{id} migrazioa eskuz abiarazi behar da. Mesedez, joan Erramintak → Migrazioak atalera administrazio-webgunean edo bestela exekutatu 'yunohost tools migrations run'.", - "permission_currently_allowed_for_all_users": "Baimen hau erabiltzaile guztiei esleitzen zaio eta baita beste talde batzuei ere. Litekeena da 'all users' baimena edo esleituta duten taldeei baimena kendu nahi izatea.", + "permission_currently_allowed_for_all_users": "Baimen hau erabiltzaile guztiei esleitzen zaie eta baita beste talde batzuei ere. Litekeena da 'all users' baimena edo esleituta duten taldeei baimena kendu nahi izatea.", "permission_require_account": "'{permission}' baimena zerbitzarian kontua duten erabiltzaileentzat da eta, beraz, ezin da gaitu bisitarientzat.", "postinstall_low_rootfsspace": "'root' fitxategi-sistemak 10 GB edo espazio gutxiago dauka, kezkatzekoa dena! Litekeena da espaziorik gabe geratzea aurki! Gomendagarria da 'root' fitxategi-sistemak gutxienez 16 GB libre izatea. Jakinarazpen honen ondoren YunoHost instalatzen jarraitu nahi baduzu, berrabiarazi agindua '--force-diskspace' gehituz", "this_action_broke_dpkg": "Eragiketa honek dpkg/APT (sistemaren pakete kudeatzaileak) kaltetu ditu… Arazoa konpontzeko SSH bidez konektatu eta 'sudo apt install --fix-broken' edota 'sudo dpkg --configure -a' exekutatu dezakezu.", @@ -559,7 +559,7 @@ "user_import_nothing_to_do": "Ez dago erabiltzaileak inportatu beharrik", "mailbox_used_space_dovecot_down": "Dovecot mailbox zerbitzua martxan egon behar da postak erabilitako espazioa ezagutzeko", "migration_0015_cleaning_up": "Beharrezkoak ez diren cache eta paketeak kentzen…", - "migration_0015_modified_files": "Mesedez, kontutan hartu ondorengo fitxategiak eskuz aldatu direla eta sistema eguneratzean euren gainean idatziko dela: {manually_modified_files}", + "migration_0015_modified_files": "Mesedez, kontuan hartu ondorengo fitxategiak eskuz aldatu direla eta sistema eguneratzean euren gainean idatziko dela: {manually_modified_files}", "migration_0015_not_enough_free_space": "/var/ fitxategi-sisteman oso espazio gutxi geratzen da! Gutxienez GB bat izan behar da migrazioa abiarazteko.", "migration_0015_weak_certs": "Sinadura-algoritmo ahulak darabiltzaten ziurtagiriak aurkitu dira eta eguneratu behar dira nginx-en hurrengo bertsioarekin bateragarriak izateko: {certs}", "migration_description_0017_postgresql_9p6_to_11": "Migratu datubaseak PostgreSQL 9.6-tik 11-ra", @@ -637,7 +637,7 @@ "migration_0015_main_upgrade": "Eguneraketa orokorra abiarazten…", "migration_ldap_backup_before_migration": "Sortu LDAP datubase eta aplikazioen ezarpenen babeskopia migrazioa abiarazi baino lehen.", "migration_ldap_can_not_backup_before_migration": "Sistemaren babeskopiak ez du amaitu migrazioak huts egin baino lehen. Errorea: {error}", - "migration_0015_problematic_apps_warning": "Mesedez, kontutan izan arazoak sor ditzaketen aplikazioak aurkitu direla. Badirudi ez zirela YunoHosten aplikazioen katalogotik instalatu, edo 'ez dabiltza' etiketa dute. Beraz, ezin da bermatu eguneratu eta gero funtzionatuko dutenik: {problematic_apps}", + "migration_0015_problematic_apps_warning": "Mesedez, kontuan izan arazoak sor ditzaketen aplikazioak aurkitu direla. Badirudi ez zirela YunoHosten aplikazioen katalogotik instalatu, edo 'ez dabiltza' etiketa dute. Beraz, ezin da bermatu eguneratu eta gero funtzionatuko dutenik: {problematic_apps}", "migration_0017_not_enough_space": "Espazio gehiago behar da {path}-n migrazioa exekutatzeko.", "migration_0017_postgresql_11_not_installed": "PostgreSQL 9.6 instalatuta egon arren postgresql 11 ez‽ Zerbait arraroa gertatu da zure sisteman :(…", "migration_0018_failed_to_reset_legacy_rules": "Ezinezkoa izan da zaharkitutako iptaulak berrezartzea: {error}", @@ -704,5 +704,5 @@ "service_description_redis-server": "Datuak bizkor atzitzeko, zereginak lerratzeko eta programen arteko komunikaziorako datubase berezi bat da", "service_description_rspamd": "Spama bahetu eta posta elektronikoarekin zerikusia duten bestelako futzioen ardura dauka", "service_description_slapd": "Erabiltzaileak, domeinuak eta hauei lotutako informazioa gordetzen du", - "service_description_yunohost-api": "YunoHosten web-interfazearen eta sistemaren arteko hartuemana kudeatzen du" + "service_description_yunohost-api": "YunoHosten web-atariaren eta sistemaren arteko hartuemana kudeatzen du" } From 2d89e15671bf9312d411dfc153d551f7878714d8 Mon Sep 17 00:00:00 2001 From: punkrockgirl Date: Thu, 4 Nov 2021 17:37:09 +0000 Subject: [PATCH 065/146] Translated using Weblate (Basque) Currently translated at 100.0% (705 of 705 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/eu/ --- locales/eu.json | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/locales/eu.json b/locales/eu.json index f8469c37e..b5f98dec5 100644 --- a/locales/eu.json +++ b/locales/eu.json @@ -36,7 +36,7 @@ "danger": "Arriskua:", "diagnosis_dns_discrepancy": "Ez dirudi ondorengo DNS balioak bat datozenik proposatutako konfigurazioarekin:
Mota: {type}
Izena: {name}
Oraingo balioa: {current}
Proposatutako balioa: {value}", "diagnosis_dns_specialusedomain": "{domain} domeinua top-level domain (TLD) erabilera berezikoa da .local edo .test bezala eta horregatik ez du DNS erregistrorik erabiltzeko beharrik.", - "diagnosis_http_bad_status_code": "Badirudi zerbitzari hau ez den beste gailu batek erantzun diola eskaerari (agian routerrak).
1. Honen arrazoi ohikoena 80 (eta 443) ataka zerbitzarira ondo birbidaltzen ez dela da.
2. Konfigurazio konplexua badarabilzu, egiaztatu suebakiak edo reverse-proxyk oztopatzen ez dutela.", + "diagnosis_http_bad_status_code": "Zerbitzari hau ez den beste gailu batek erantzun omen dio eskaerari (agian routerrak).
1. Honen arrazoi ohikoena 80 (eta 443) ataka zerbitzarira ondo birbidaltzen ez dela da.
2. Konfigurazio konplexua badarabilzu, egiaztatu suebakiak edo reverse-proxyk oztopatzen ez dutela.", "diagnosis_http_timeout": "Denbora agortu da sare lokaletik kanpo zure zerbitzarira konektatzeko ahaleginean. Eskuragarri ez dagoela dirudi.
1. 80 (eta 443) ataka zerbitzarira modu egokian birzuzentzen ez direla da ohiko zergatia.
2. Badaezpada egiaztatu nginx martxan dagoela.
3. Konfigurazio konplexuetan, egiaztatu suebakiak edo reverse-proxyk konexioa oztopatzen ez dutela.", "app_sources_fetch_failed": "Ezinezkoa izan da fitxategiak eskuratzea, zuzena al da URLa?", "app_make_default_location_already_used": "Ezinezkoa izan da '{app}' '{domain}' domeinuan lehenestea, '{other_app}'(e)k dagoeneko '{domain}' erabiltzen duelako", @@ -149,7 +149,7 @@ "diagnosis_dns_point_to_doc": "Mesedez, irakurri dokumentazioa DNS erregistroekin laguntza behar baduzu.", "diagnosis_mail_ehlo_unreachable": "SMTP posta zerbitzaria ez dago eskuragarri IPv{ipversion}ko sare lokaletik kanpo eta, beraz, ez da posta elektronikoa jasotzeko gai.", "diagnosis_mail_ehlo_bad_answer_details": "Litekeena da zure zerbitzaria ez den beste gailu batek erantzun izana.", - "diagnosis_mail_blacklist_listed_by": "Zure {item} IPa edo domeinua {blacklist_name} zerrenda beltzean ageri da", + "diagnosis_mail_blacklist_listed_by": "Zure domeinua edo {item} IPa {blacklist_name} zerrenda beltzean ageri da", "diagnosis_mail_blacklist_website": "Zerrenda beltzean zergatik zauden ulertu eta konpondu ondoren, {blacklist_website} webgunean zure IP edo domeinua bertatik atera dezatela eska dezakezu", "diagnosis_http_could_not_diagnose_details": "Errorea: {error}", "diagnosis_http_hairpinning_issue": "Dirudienez zure sareak ez du hairpinninga gaituta.", @@ -238,8 +238,8 @@ "diagnosis_backports_in_sources_list": "Dirudienez apt (pakete kudeatzailea) backports biltegia erabiltzeko konfiguratuta dago. Zertan ari zaren ez badakizu, ez zenuke backports biltegietako aplikaziorik instalatu beharko, ezegonkortasun eta gatazkak eragin ditzaketelako sistemarekin.", "app_restore_failed": "Ezinezkoa izan da {app} lehengoratzea: {error}", "diagnosis_apps_allgood": "Instalatutako aplikazioek oinarrizko pakete-jarraibideekin bat egiten dute", - "diagnosis_apps_bad_quality": "Aplikazio hau hondatuta dagoela dio YunoHosten aplikazioen katalogoak. Agian behin-behineko kontua da arduradunak arazoa konpondu bitartean. Momentuz, ezin da aplikazioa eguneratu.", - "diagnosis_apps_broken": "Aplikazio hau YunoHosten aplikazioen katalogoan hondatuta dagoela ageri da. Agian behin-behineko kontua da arduradunak konpondu bitartean. Momentuz, ezin da aplikazioa eguneratu.", + "diagnosis_apps_bad_quality": "Aplikazio hau hondatuta dagoela dio YunoHosten aplikazioen katalogoak. Agian behin-behineko kontua da arduradunak arazoa konpondu bitartean. Oraingoz, ezin da aplikazioa eguneratu.", + "diagnosis_apps_broken": "Aplikazio hau YunoHosten aplikazioen katalogoan hondatuta dagoela ageri da. Agian behin-behineko kontua da arduradunak konpondu bitartean. Oraingoz, ezin da aplikazioa eguneratu.", "diagnosis_apps_deprecated_practices": "Instalatutako aplikazio honen bertsioak oraindik darabiltza zaharkitutako pakete-jarraibideak. Eguneratzea hausnartu beharko zenuke.", "diagnosis_apps_issue": "Arazo bat dago {app} aplikazioarekin", "diagnosis_apps_not_in_app_catalog": "Aplikazio hau ez da YunoHosten aplikazioen katalogokoa. Iraganean egon bazen eta ezabatu izan balitz, desinstalatzea litzateke onena, ez baitu eguneraketarik jasoko eta sistemaren integritate eta segurtasuna arriskuan jarri lezakeelako.", @@ -316,7 +316,7 @@ "domain_dns_push_record_failed": "Ezinezkoa izan da {type}/{name} ezarpenak {action}: {error}", "domain_dns_push_success": "DNS ezarpenak eguneratu dira!", "domain_dns_push_failed": "DNS ezarpenen eguneratzeak kale egin du.", - "domain_dns_push_partial_failure": "DNS ezarpenak hala-nola eguneratu dira: jakinarazpen/errore batzuk egon dira.", + "domain_dns_push_partial_failure": "DNS ezarpenak erdipurdi eguneratu dira: jakinarazpen/errore batzuk egon dira.", "global_settings_setting_smtp_relay_host": "YunoHosten ordez posta elektronikoa bidaltzeko SMTP relay helbidea. Erabilgarri izan daiteke egoera hauetan: operadore edo VPS enpresak 25. ataka blokeatzen badu, DUHLen zure etxeko IPa ageri bada, ezin baduzu alderantzizko DNSa ezarri edo zerbitzari hau ez badago zuzenean internetera konektatuta baina posta elektronikoa bidali nahi baduzu.", "group_deletion_failed": "Ezinezkoa izan da '{group}' taldea ezabatzea: {error}", "invalid_number_min": "{min} baino handiagoa izan behar da", @@ -379,9 +379,9 @@ "diagnosis_mail_queue_unavailable": "Ezinezkoa da ilaran zenbat posta elektroniko dauden kontsultatzea", "log_user_create": "Gehitu '{}' erabiltzailea", "group_cannot_edit_visitors": "'bisitariak' taldea ezin da eskuz moldatu. Saiorik hasi gabeko bisitariak barne hartzen dituen talde berezia da", - "diagnosis_ram_verylow": "Sistemak RAM memoriaren {available} ({available_percent}%) dauka bakarrik erabilgarri! ({total} orotara)", - "diagnosis_ram_low": "RAM memoriaren {available} ditu erabilgarri sistemak; memoria guztiaren {total} %{available_percent}a. Adi ibili.", - "diagnosis_ram_ok": "RAM memoriaren {available} ditu oraindik erabilgarri sistemak; memoria guztiaren {total} %{available_percent}a.", + "diagnosis_ram_verylow": "RAM memoriaren {available} baino ez ditu erabilgarri sistemak; memoria guztiaren ({total}) %{available_percent}a bakarrik!", + "diagnosis_ram_low": "RAM memoriaren {available} ditu erabilgarri sistemak; memoria guztiaren ({total}) %{available_percent}a. Adi ibili.", + "diagnosis_ram_ok": "RAM memoriaren {available} ditu oraindik erabilgarri sistemak; memoria guztiaren ({total}) %{available_percent}a.", "diagnosis_swap_none": "Sistemak ez du swap-ik. Gutxienez {recommended} izaten saiatu beharko zinateke, sistema memoriarik gabe gera ez dadin.", "diagnosis_swap_ok": "Sistemak {total} swap dauzka!", "diagnosis_regenconf_allgood": "Konfigurazio-fitxategi guztiak bat datoz gomendatutako ezarpenekin!", @@ -396,7 +396,7 @@ "diagnosis_mail_outgoing_port_25_blocked": "SMTP posta zerbitzariak ezin ditu posta elektronikoak bidali 25. ataka itxita dagoelako IPv{ipversion}n.", "diagnosis_mail_outgoing_port_25_blocked_details": "Lehenik eta behin operadorearen routerreko aukeretan saiatu beharko zinateke 25. ataka desblokeatzen. (Hosting enpresaren arabera, beraiekin harremanetan jartzea beharrezkoa izango da).", "diagnosis_mail_ehlo_wrong_details": "Kanpo-diagnostikatzaileak IPv{ipversion}an jaso duen EHLOa eta zure zerbitzariaren domeinukoa ez datoz bat.
Jasotako EHLOa: {wrong_ehlo}
Esperotakoa: {right_ehlo}
Arazo honen zergati ohikoena 25. ataka zuzen konfiguratuta ez egotea da. Edo agian suebaki edo reverse-proxya oztopo izan daiteke.", - "diagnosis_mail_fcrdns_different_from_ehlo_domain": "Alderantzizko DNSa ez dago zuzen konfiguratuta IPv{ipversion}an. Litekeena da posta elektroniko batzuk hartzaileak jaso ezin izatea edo spam modura etiketatuak izatea.", + "diagnosis_mail_fcrdns_different_from_ehlo_domain": "Alderantzizko DNSa ez dago zuzen konfiguratuta IPv{ipversion}an. Litekeena da hartzaileak posta elektroniko batzuk jaso ezin izatea edo mezuok spam modura etiketatuak izatea.", "diagnosis_mail_fcrdns_different_from_ehlo_domain_details": "Oraingo alderantzizko DNSa: {rdns_domain}
Esperotako balioa: {ehlo_domain}", "diagnosis_mail_queue_too_big": "Mezu gehiegi posta elektronikoaren ilaran: ({nb_pending} mezu)", "diagnosis_ports_could_not_diagnose_details": "Errorea: {error}", @@ -467,7 +467,7 @@ "log_user_update": "Eguneratu '{}' erabiltzailearen informazioa", "dyndns_no_domain_registered": "Ez dago DynDNSrekin izena emandako domeinurik", "global_settings_bad_type_for_setting": "{setting} ezarpenerako mota okerra. {received_type} ezarri da, {expected_type} espero zen", - "diagnosis_mail_fcrdns_dns_missing": "Ez da alderantzizko DNSrik ezarri IPv{ipversion}rako. Litekeena da posta elektroniko batzuk hartzaileak jaso ezin izatea edo spam modura etiketatuak izatea.", + "diagnosis_mail_fcrdns_dns_missing": "Ez da alderantzizko DNSrik ezarri IPv{ipversion}rako. Litekeena da hartzaileak posta elektroniko batzuk jaso ezin izatea edo mezuok spam modura etiketatuak izatea.", "log_backup_create": "Sortu babeskopia fitxategia", "global_settings_setting_backup_compress_tar_archives": "Babeskopia berriak sortzean, konprimitu fitxategiak (.tar.gz) konprimitu gabeko fitxategien (.tar) ordez. Aukera hau gaitzean babeskopiek espazio gutxiago beharko dute, baina hasierako prozesua luzeagoa izango da eta CPUari lan handiagoa eragingo dio.", "global_settings_setting_security_webadmin_allowlist": "Administrazio-webgunea bisita ditzaketen IP helbideak, koma bidez bereiziak.", From 6ec12e92a6889ea30bd5e97c053710a3936bebe8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Quent=C3=AD?= Date: Thu, 4 Nov 2021 20:13:54 +0000 Subject: [PATCH 066/146] Translated using Weblate (Occitan) Currently translated at 50.0% (353 of 705 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/oc/ --- locales/oc.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/locales/oc.json b/locales/oc.json index a2a5bfe31..a794f5e04 100644 --- a/locales/oc.json +++ b/locales/oc.json @@ -78,8 +78,8 @@ "upnp_enabled": "UPnP es activat", "upnp_port_open_failed": "Impossible de dobrir los pòrts amb UPnP", "yunohost_already_installed": "YunoHost es ja installat", - "yunohost_configured": "YunoHost es estat configurat", - "yunohost_installing": "Installacion de YunoHost…", + "yunohost_configured": "YunoHost es ara configurat", + "yunohost_installing": "Installacion de YunoHost...", "backup_csv_creation_failed": "Creacion impossibla del fichièr CSV necessari a las operacions futuras de restauracion", "backup_output_symlink_dir_broken": "Vòstre repertòri d’archiu « {path} » es un ligam simbolic copat. Saique oblidèretz de re/montar o de connectar supòrt.", "backup_with_no_backup_script_for_app": "L’aplicacion {app} a pas cap de script de salvagarda. I fasèm pas cas.", @@ -144,7 +144,7 @@ "restore_already_installed_app": "Una aplicacion es ja installada amb l’id « {app} »", "app_restore_failed": "Impossible de restaurar l’aplicacion « {app} »: {error}", "backup_ask_for_copying_if_needed": "Volètz far una salvagarda en utilizant {size} Mo temporàriament ? (Aqueste biais de far es emplegat perque unes fichièrs an pas pogut èsser preparats amb un metòde mai eficaç.)", - "yunohost_not_installed": "YunoHost es pas installat o corrèctament installat. Mercés d’executar « yunohost tools postinstall »", + "yunohost_not_installed": "YunoHost es pas corrèctament installat. Mercés d’executar « yunohost tools postinstall »", "backup_output_directory_forbidden": "Causissètz un repertòri de destinacion deferent. Las salvagardas pòdon pas se realizar dins los repertòris bin, /boot, /dev, /etc, /lib, /root, /run, /sbin, /sys, /usr, /var ou /home/yunohost.backup/archives", "certmanager_attempt_to_replace_valid_cert": "Sètz a remplaçar un certificat corrècte e valid pel domeni {domain} ! (Utilizatz --force per cortcircuitar)", "certmanager_cert_renew_success": "Renovèlament capitat d’un certificat Let’s Encrypt pel domeni « {domain} »", @@ -513,4 +513,4 @@ "diagnosis_domain_expiration_not_found": "Impossible de verificar la data d’expiracion d’unes domenis", "backup_create_size_estimation": "L’archiu contendrà apr’aquí {size} de donadas.", "app_restore_script_failed": "Una error s’es producha a l’interior del script de restauracion de l’aplicacion" -} \ No newline at end of file +} From 875677a8632375647654194068ace6153e91c6fa Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Fri, 5 Nov 2021 02:33:48 +0100 Subject: [PATCH 067/146] Update changelog for 4.3.2 --- debian/changelog | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/debian/changelog b/debian/changelog index a7d6c2445..88d29d377 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +yunohost (4.3.2) stable; urgency=low + + - Release as stable + - [i18n] Translations updated for Basque, Occitan + + Thanks to all contributors <3 ! (punkrockgirl, Quentí) + + -- Alexandre Aubin Fri, 05 Nov 2021 02:32:56 +0100 + yunohost (4.3.1.8) testing; urgency=low - [enh] dyndns: Drop some YAGNI + improve IPv6-only support + resilience w.r.t. ns0 / ns1 being down (a61d0231, [#1367](https://github.com/YunoHost/yunohost/pull/1367)) From 09d5f6ea0029c73a49175dcb9675d522248d24fd Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 5 Nov 2021 12:07:16 +0100 Subject: [PATCH 068/146] Update nodejs --- data/helpers.d/nodejs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/helpers.d/nodejs b/data/helpers.d/nodejs index 69e9ce445..e7e61b0c6 100644 --- a/data/helpers.d/nodejs +++ b/data/helpers.d/nodejs @@ -1,6 +1,6 @@ #!/bin/bash -n_version=7.5.0 +n_version=8.0.0 n_install_dir="/opt/node_n" node_version_path="$n_install_dir/n/versions/node" # N_PREFIX is the directory of n, it needs to be loaded as a environment variable. @@ -16,7 +16,7 @@ export N_PREFIX="$n_install_dir" ynh_install_n() { # Build an app.src for n echo "SOURCE_URL=https://github.com/tj/n/archive/v${n_version}.tar.gz -SOURCE_SUM=d4da7ea91f680de0c9b5876e097e2a793e8234fcd0f7ca87a0599b925be087a3" >"$YNH_APP_BASEDIR/conf/n.src" +SOURCE_SUM=9e8879dc4f1c4c0fe4e08a108ed6c23046419b6865fe922ca5176ff7998ae6ff" >"$YNH_APP_BASEDIR/conf/n.src" # Download and extract n ynh_setup_source --dest_dir="$n_install_dir/git" --source_id=n # Install n From 3da2df6e292cd3efd2d708b512fd55cf7b42b8c0 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Fri, 5 Nov 2021 16:34:33 +0100 Subject: [PATCH 069/146] mdns: Add possibility to manually add .local aliases via /etc/yunohost/mdns.aliases (meant for internetcube) --- data/hooks/conf_regen/37-mdns | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/data/hooks/conf_regen/37-mdns b/data/hooks/conf_regen/37-mdns index 52213c297..f45356db9 100755 --- a/data/hooks/conf_regen/37-mdns +++ b/data/hooks/conf_regen/37-mdns @@ -11,6 +11,10 @@ _generate_config() { [[ "$domain" =~ ^[^.]+\.local$ ]] || continue echo " - $domain" done + for localalias in $(cat /etc/yunohost/mdns.aliases | grep -v "^ *$") + do + echo " - $localalias.local" + done } do_init_regen() { From 69b8603f148aee400660ec19398780826f99db20 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Fri, 5 Nov 2021 16:41:33 +0100 Subject: [PATCH 070/146] mdns: Aaaaand we don't want to crash if mdns.aliases doesnt exists obviously --- data/hooks/conf_regen/37-mdns | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/data/hooks/conf_regen/37-mdns b/data/hooks/conf_regen/37-mdns index f45356db9..faa581efa 100755 --- a/data/hooks/conf_regen/37-mdns +++ b/data/hooks/conf_regen/37-mdns @@ -11,10 +11,13 @@ _generate_config() { [[ "$domain" =~ ^[^.]+\.local$ ]] || continue echo " - $domain" done - for localalias in $(cat /etc/yunohost/mdns.aliases | grep -v "^ *$") - do - echo " - $localalias.local" - done + if [[ -e /etc/yunohot/mdns.aliases ]] + then + for localalias in $(cat /etc/yunohost/mdns.aliases | grep -v "^ *$") + do + echo " - $localalias.local" + done + fi } do_init_regen() { From 6558b23dd6fb2402edf9578b7c8419c8aef41ca8 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 6 Nov 2021 15:54:34 +0100 Subject: [PATCH 071/146] Fix conflict with redis-server --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index fe18b1de8..f99fe25a9 100644 --- a/debian/control +++ b/debian/control @@ -45,7 +45,7 @@ Conflicts: iptables-persistent , openssl (>= 1.1.1g) , slapd (>= 2.4.49) , dovecot-core (>= 1:2.3.7) - , redis-server (>= 5:5.0.7) + , redis-server (>= 5:5.1) , fail2ban (>= 0.11) , iptables (>= 1.8.3) Description: manageable and configured self-hosting server From 1cc3e44038746455dc5008ad2cae7f81abe9bc0e Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 6 Nov 2021 16:45:25 +0100 Subject: [PATCH 072/146] nginx: Refine experimental CSP header (in the end still gotta enable unsafe-inline and unsafe-eval for a bunch of things, but better than no policy at all...) --- data/templates/nginx/security.conf.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/templates/nginx/security.conf.inc b/data/templates/nginx/security.conf.inc index bcb821770..8d261daeb 100644 --- a/data/templates/nginx/security.conf.inc +++ b/data/templates/nginx/security.conf.inc @@ -26,11 +26,11 @@ ssl_dhparam /usr/share/yunohost/other/ffdhe2048.pem; # https://wiki.mozilla.org/Security/Guidelines/Web_Security # https://observatory.mozilla.org/ {% if experimental == "True" %} -more_set_headers "Content-Security-Policy : upgrade-insecure-requests; default-src https: data:"; +more_set_headers "Content-Security-Policy : upgrade-insecure-requests; default-src https: data: blob: ; object-src https: data: 'unsafe-inline'; style-src https: data: 'unsafe-inline' ; script-src https: data: 'unsafe-inline' 'unsafe-eval'"; {% else %} more_set_headers "Content-Security-Policy : upgrade-insecure-requests"; +more_set_headers "Content-Security-Policy-Report-Only : default-src https: data: blob: ; object-src https: data: 'unsafe-inline'; style-src https: data: 'unsafe-inline' ; script-src https: data: 'unsafe-inline' 'unsafe-eval'"; {% endif %} -more_set_headers "Content-Security-Policy-Report-Only : default-src https: data: 'unsafe-inline' 'unsafe-eval' "; more_set_headers "X-Content-Type-Options : nosniff"; more_set_headers "X-XSS-Protection : 1; mode=block"; more_set_headers "X-Download-Options : noopen"; From e6effd49d80916a272f0961fc6a9dfcb6444d5d5 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 6 Nov 2021 16:59:10 +0100 Subject: [PATCH 073/146] Update changelog for 4.3.2.1 --- debian/changelog | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/debian/changelog b/debian/changelog index 88d29d377..732e4af7b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +yunohost (4.3.2.1) stable; urgency=low + + - [enh] mdns: Add possibility to manually add .local aliases via /etc/yunohost/mdns.aliases (meant for internetcube) (3da2df6e) + - [fix] debian: Fix conflict with redis-server (6558b23d) + - [fix] nginx: Refine experimental CSP header (in the end still gotta enable unsafe-inline and unsafe-eval for a bunch of things, but better than no policy at all...) (1cc3e440) + + -- Alexandre Aubin Sat, 06 Nov 2021 16:58:07 +0100 + yunohost (4.3.2) stable; urgency=low - Release as stable From 74e2a51e4daa0e2eca5f3c984e7822358935a4a1 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 6 Nov 2021 17:39:46 +0100 Subject: [PATCH 074/146] nginx: Try to fix again the webadmin cache hell --- data/templates/nginx/yunohost_admin.conf.inc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/data/templates/nginx/yunohost_admin.conf.inc b/data/templates/nginx/yunohost_admin.conf.inc index 150fce6f6..b5eff7a5e 100644 --- a/data/templates/nginx/yunohost_admin.conf.inc +++ b/data/templates/nginx/yunohost_admin.conf.inc @@ -13,6 +13,12 @@ location /yunohost/admin/ { deny all; {% endif %} + location = /yunohost/admin/index.html { + etag off; + expires off; + more_set_headers "Cache-Control: no-store, no-cache, must-revalidate"; + } + more_set_headers "Content-Security-Policy: upgrade-insecure-requests; default-src 'self'; connect-src 'self' https://paste.yunohost.org wss://$host; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-eval'; object-src 'none'; img-src 'self' data:;"; more_set_headers "Content-Security-Policy-Report-Only:"; } From 5a08206837c6ed593bc2cee0514aaf2ee32ea1d8 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 6 Nov 2021 17:40:31 +0100 Subject: [PATCH 075/146] Update changelog for 4.3.2.2 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 732e4af7b..7adbe59dc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +yunohost (4.3.2.2) stable; urgency=low + + - [fix] nginx: Try to fix again the webadmin cache hell (74e2a51e) + + -- Alexandre Aubin Sat, 06 Nov 2021 17:39:58 +0100 + yunohost (4.3.2.1) stable; urgency=low - [enh] mdns: Add possibility to manually add .local aliases via /etc/yunohost/mdns.aliases (meant for internetcube) (3da2df6e) From fff1a8a4d682ca8177e49bcb66420dd5e516e811 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 6 Nov 2021 18:58:31 +0100 Subject: [PATCH 076/146] [enh] Smarter API self-upgrade mechanics --- debian/postinst | 11 +++ debian/rules | 2 +- src/yunohost/tools.py | 169 ++++++++++-------------------------------- 3 files changed, 51 insertions(+), 131 deletions(-) diff --git a/debian/postinst b/debian/postinst index 0dd1dedd0..b49260ae5 100644 --- a/debian/postinst +++ b/debian/postinst @@ -33,6 +33,17 @@ do_configure() { yunohost diagnosis run --force fi + # Trick to let yunohost handle the restart of the API, + # to prevent the webadmin from cutting the branch it's sitting on + if systemctl is-enabled yunohost-api --quiet + then + if [[ "${YUNOHOST_API_RESTART_WILL_BE_HANDLED_BY_YUNOHOST:-}" != "yes" ]]; + then + systemctl restart yunohost-api + else + echo "(Delaying the restart of yunohost-api, this should automatically happen after the end of this upgrade)" + fi + fi } # summary of how this script can be called: diff --git a/debian/rules b/debian/rules index 3790c0ef2..015143610 100755 --- a/debian/rules +++ b/debian/rules @@ -13,7 +13,7 @@ override_dh_auto_build: python3 doc/generate_manpages.py --gzip --output doc/yunohost.8.gz override_dh_installinit: - dh_installinit -pyunohost --name=yunohost-api --restart-after-upgrade + dh_installinit -pyunohost --name=yunohost-api --noscripts dh_installinit -pyunohost --name=yunohost-firewall --noscripts override_dh_systemd_enable: diff --git a/src/yunohost/tools.py b/src/yunohost/tools.py index fb9839814..ef84d98bd 100644 --- a/src/yunohost/tools.py +++ b/src/yunohost/tools.py @@ -531,19 +531,10 @@ def tools_upgrade( logger.info(m18n.n("upgrading_packages")) operation_logger.start() - # Critical packages are packages that we can't just upgrade - # randomly from yunohost itself... upgrading them is likely to - critical_packages = ["moulinette", "yunohost", "yunohost-admin", "ssowat"] - - critical_packages_upgradable = [ - p["name"] for p in upgradables if p["name"] in critical_packages - ] - noncritical_packages_upgradable = [ - p["name"] for p in upgradables if p["name"] not in critical_packages - ] - # Prepare dist-upgrade command dist_upgrade = "DEBIAN_FRONTEND=noninteractive" + if Moulinette.interface.type == "api": + dist_upgrade += "YUNOHOST_API_RESTART_WILL_BE_HANDLED_BY_YUNOHOST=yes" dist_upgrade += " APT_LISTCHANGES_FRONTEND=none" dist_upgrade += " apt-get" dist_upgrade += ( @@ -553,136 +544,54 @@ def tools_upgrade( dist_upgrade += ' -o Dpkg::Options::="--force-conf{}"'.format(conf_flag) dist_upgrade += " dist-upgrade" - # - # "Regular" packages upgrade - # - if noncritical_packages_upgradable: + logger.info(m18n.n("tools_upgrade")) - logger.info(m18n.n("tools_upgrade_regular_packages")) + logger.debug("Running apt command :\n{}".format(dist_upgrade)) - # Mark all critical packages as held - for package in critical_packages: - check_output("apt-mark hold %s" % package) + def is_relevant(line): + irrelevants = [ + "service sudo-ldap already provided", + "Reading database ...", + ] + return all(i not in line.rstrip() for i in irrelevants) - # Doublecheck with apt-mark showhold that packages are indeed held ... - held_packages = check_output("apt-mark showhold").split("\n") - if any(p not in held_packages for p in critical_packages): - logger.warning(m18n.n("tools_upgrade_cant_hold_critical_packages")) - operation_logger.error(m18n.n("packages_upgrade_failed")) - raise YunohostError(m18n.n("packages_upgrade_failed")) + callbacks = ( + lambda l: logger.info("+ " + l.rstrip() + "\r") + if is_relevant(l) + else logger.debug(l.rstrip() + "\r"), + lambda l: logger.warning(l.rstrip()) + if is_relevant(l) + else logger.debug(l.rstrip()), + ) + returncode = call_async_output(dist_upgrade, callbacks, shell=True) - logger.debug("Running apt command :\n{}".format(dist_upgrade)) + # If yunohost is being upgraded from the webadmin + if "yunohost" in upgradables and Moulinette.interface.type == "api": - def is_relevant(line): - irrelevants = [ - "service sudo-ldap already provided", - "Reading database ...", - ] - return all(i not in line.rstrip() for i in irrelevants) - - callbacks = ( - lambda l: logger.info("+ " + l.rstrip() + "\r") - if is_relevant(l) - else logger.debug(l.rstrip() + "\r"), - lambda l: logger.warning(l.rstrip()) - if is_relevant(l) - else logger.debug(l.rstrip()), + # Restart the API after 10 sec (at now doesn't support sub-minute times...) + # We do this so that the API / webadmin still gets the proper HTTP response + # It's then up to the webadmin to implement a proper UX process to wait 10 sec and then auto-fresh the webadmin + cmd = ( + "at -M now >/dev/null 2>&1 <<< \"sleep 10; systemctl restart yunohost-api\"" ) - returncode = call_async_output(dist_upgrade, callbacks, shell=True) - if returncode != 0: - upgradables = list(_list_upgradable_apt_packages()) - noncritical_packages_upgradable = [ - p["name"] for p in upgradables if p["name"] not in critical_packages - ] - logger.warning( - m18n.n( - "tools_upgrade_regular_packages_failed", - packages_list=", ".join(noncritical_packages_upgradable), - ) - ) - operation_logger.error(m18n.n("packages_upgrade_failed")) - raise YunohostError(m18n.n("packages_upgrade_failed")) + # For some reason subprocess doesn't like the redirections so we have to use bash -c explicity... + subprocess.check_call(["bash", "-c", cmd]) - # - # Critical packages upgrade - # - if critical_packages_upgradable and allow_yunohost_upgrade: - - logger.info(m18n.n("tools_upgrade_special_packages")) - - # Mark all critical packages as unheld - for package in critical_packages: - check_output("apt-mark unhold %s" % package) - - # Doublecheck with apt-mark showhold that packages are indeed unheld ... - held_packages = check_output("apt-mark showhold").split("\n") - if any(p in held_packages for p in critical_packages): - logger.warning(m18n.n("tools_upgrade_cant_unhold_critical_packages")) - operation_logger.error(m18n.n("packages_upgrade_failed")) - raise YunohostError(m18n.n("packages_upgrade_failed")) - - # - # Here we use a dirty hack to run a command after the current - # "yunohost tools upgrade", because the upgrade of yunohost - # will also trigger other yunohost commands (e.g. "yunohost tools migrations run") - # (also the upgrade of the package, if executed from the webadmin, is - # likely to kill/restart the api which is in turn likely to kill this - # command before it ends...) - # - logfile = operation_logger.log_path - dist_upgrade = dist_upgrade + " 2>&1 | tee -a {}".format(logfile) - - MOULINETTE_LOCK = "/var/run/moulinette_yunohost.lock" - wait_until_end_of_yunohost_command = ( - "(while [ -f {} ]; do sleep 2; done)".format(MOULINETTE_LOCK) - ) - mark_success = ( - "(echo 'Done!' | tee -a {} && echo 'success: true' >> {})".format( - logfile, operation_logger.md_path + if returncode != 0: + upgradables = list(_list_upgradable_apt_packages()) + logger.warning( + m18n.n( + "tools_upgrade_failed", + packages_list=", ".join(upgradables), ) ) - mark_failure = ( - "(echo 'Failed :(' | tee -a {} && echo 'success: false' >> {})".format( - logfile, operation_logger.md_path - ) - ) - update_log_metadata = "sed -i \"s/ended_at: .*$/ended_at: $(date -u +'%Y-%m-%d %H:%M:%S.%N')/\" {}" - update_log_metadata = update_log_metadata.format(operation_logger.md_path) + operation_logger.error(m18n.n("packages_upgrade_failed")) + raise YunohostError(m18n.n("packages_upgrade_failed")) - # Dirty hack such that the operation_logger does not add ended_at - # and success keys in the log metadata. (c.f. the code of the - # is_unit_operation + operation_logger.close()) We take care of - # this ourselves (c.f. the mark_success and updated_log_metadata in - # the huge command launched by os.system) - operation_logger.ended_at = "notyet" + # FIXME : add a dpkg --audit / check dpkg is broken here ? - upgrade_completed = "\n" + m18n.n( - "tools_upgrade_special_packages_completed" - ) - command = "({wait} && {dist_upgrade}) && {mark_success} || {mark_failure}; {update_metadata}; echo '{done}'".format( - wait=wait_until_end_of_yunohost_command, - dist_upgrade=dist_upgrade, - mark_success=mark_success, - mark_failure=mark_failure, - update_metadata=update_log_metadata, - done=upgrade_completed, - ) - - logger.warning(m18n.n("tools_upgrade_special_packages_explanation")) - logger.debug("Running command :\n{}".format(command)) - open("/tmp/yunohost-selfupgrade", "w").write( - "rm /tmp/yunohost-selfupgrade; " + command - ) - # Using systemd-run --scope is like nohup/disown and &, but more robust somehow - # (despite using nohup/disown and &, the self-upgrade process was still getting killed...) - # ref: https://unix.stackexchange.com/questions/420594/why-process-killed-with-nohup - # (though I still don't understand it 100%...) - os.system("systemd-run --scope bash /tmp/yunohost-selfupgrade &") - return - - else: - logger.success(m18n.n("system_upgraded")) - operation_logger.success() + logger.success(m18n.n("system_upgraded")) + operation_logger.success() @is_unit_operation() From b166abab1db9157b2b730ec9291daa881d661888 Mon Sep 17 00:00:00 2001 From: Romain Thouvenin Date: Sun, 7 Nov 2021 21:13:34 +0000 Subject: [PATCH 077/146] Read DNS Blacklist answer and compare it against list of non-BL codes --- data/hooks/diagnosis/24-mail.py | 4 ++-- data/other/dnsbl_list.yml | 27 +++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/data/hooks/diagnosis/24-mail.py b/data/hooks/diagnosis/24-mail.py index c5af4bbc6..7b7f5f502 100644 --- a/data/hooks/diagnosis/24-mail.py +++ b/data/hooks/diagnosis/24-mail.py @@ -209,8 +209,8 @@ class MailDiagnoser(Diagnoser): query = subdomain + "." + blacklist["dns_server"] # Do the DNS Query - status, _ = dig(query, "A") - if status != "ok": + status, answers = dig(query, "A") + if status != "ok" or (answers and set(answers) <= set(blacklist["non_blacklisted_return_code"])): continue # Try to get the reason diff --git a/data/other/dnsbl_list.yml b/data/other/dnsbl_list.yml index 1dc0175a3..ad86fd2a6 100644 --- a/data/other/dnsbl_list.yml +++ b/data/other/dnsbl_list.yml @@ -5,138 +5,161 @@ ipv4: true ipv6: true domain: false + non_blacklisted_return_code: [] - name: Barracuda Reputation Block List dns_server: b.barracudacentral.org website: https://barracudacentral.org/rbl/ ipv4: true ipv6: false domain: false + non_blacklisted_return_code: [] - name: Hostkarma dns_server: hostkarma.junkemailfilter.com website: https://ipadmin.junkemailfilter.com/remove.php ipv4: true ipv6: false domain: false + non_blacklisted_return_code: ['127.0.0.1', '127.0.0.5'] - name: ImproWare IP based spamlist dns_server: spamrbl.imp.ch website: https://antispam.imp.ch/ ipv4: true ipv6: false domain: false + non_blacklisted_return_code: [] - name: ImproWare IP based wormlist dns_server: wormrbl.imp.ch website: https://antispam.imp.ch/ ipv4: true ipv6: false domain: false + non_blacklisted_return_code: [] - name: Backscatterer.org dns_server: ips.backscatterer.org website: http://www.backscatterer.org/ ipv4: true ipv6: false domain: false + non_blacklisted_return_code: [] - name: inps.de dns_server: dnsbl.inps.de website: http://dnsbl.inps.de/ ipv4: true ipv6: false domain: false + non_blacklisted_return_code: [] - name: LASHBACK dns_server: ubl.unsubscore.com website: https://blacklist.lashback.com/ ipv4: true ipv6: false domain: false + non_blacklisted_return_code: [] - name: Mailspike.org dns_server: bl.mailspike.net website: http://www.mailspike.net/ ipv4: true ipv6: false domain: false + non_blacklisted_return_code: [] - name: NiX Spam dns_server: ix.dnsbl.manitu.net website: http://www.dnsbl.manitu.net/ ipv4: true ipv6: false domain: false + non_blacklisted_return_code: [] - name: REDHAWK dns_server: access.redhawk.org website: https://www.redhawk.org/SpamHawk/query.php ipv4: true ipv6: false domain: false + non_blacklisted_return_code: [] - name: SORBS Open SMTP relays dns_server: smtp.dnsbl.sorbs.net website: http://www.sorbs.net/ ipv4: true ipv6: false domain: false + non_blacklisted_return_code: [] - name: SORBS Spamhost (last 28 days) dns_server: recent.spam.dnsbl.sorbs.net website: http://www.sorbs.net/ ipv4: true ipv6: false domain: false + non_blacklisted_return_code: [] - name: SORBS Spamhost (last 48 hours) dns_server: new.spam.dnsbl.sorbs.net website: http://www.sorbs.net/ ipv4: true ipv6: false domain: false + non_blacklisted_return_code: [] - name: SpamCop Blocking List dns_server: bl.spamcop.net website: https://www.spamcop.net/bl.shtml ipv4: true ipv6: false domain: false + non_blacklisted_return_code: [] - name: Spam Eating Monkey SEM-BACKSCATTER dns_server: backscatter.spameatingmonkey.net website: https://spameatingmonkey.com/services ipv4: true ipv6: false domain: false + non_blacklisted_return_code: [] - name: Spam Eating Monkey SEM-BLACK dns_server: bl.spameatingmonkey.net website: https://spameatingmonkey.com/services ipv4: true ipv6: false domain: false + non_blacklisted_return_code: [] - name: Spam Eating Monkey SEM-IPV6BL dns_server: bl.ipv6.spameatingmonkey.net website: https://spameatingmonkey.com/services ipv4: false ipv6: true domain: false + non_blacklisted_return_code: [] - name: SpamRATS! all dns_server: all.spamrats.com website: http://www.spamrats.com/ ipv4: true ipv6: false domain: false + non_blacklisted_return_code: [] - name: PSBL (Passive Spam Block List) dns_server: psbl.surriel.com website: http://psbl.surriel.com/ ipv4: true ipv6: false domain: false + non_blacklisted_return_code: [] - name: SWINOG dns_server: dnsrbl.swinog.ch website: https://antispam.imp.ch/ ipv4: true ipv6: false domain: false + non_blacklisted_return_code: [] - name: GBUdb Truncate dns_server: truncate.gbudb.net website: http://www.gbudb.com/truncate/index.jsp ipv4: true ipv6: false domain: false + non_blacklisted_return_code: [] - name: Weighted Private Block List dns_server: db.wpbl.info website: http://www.wpbl.info/ ipv4: true ipv6: false domain: false + non_blacklisted_return_code: [] # Used by GAFAM - name: Composite Blocking List dns_server: cbl.abuseat.org @@ -144,6 +167,7 @@ ipv4: true ipv6: false domain: false + non_blacklisted_return_code: [] # Used by GAFAM - name: SenderScore Blacklist dns_server: bl.score.senderscore.com @@ -152,18 +176,21 @@ ipv6: false domain: false # Added cause it supports IPv6 + non_blacklisted_return_code: [] - name: AntiCaptcha.NET IPv6 dns_server: dnsbl6.anticaptcha.net website: http://anticaptcha.net/ ipv4: false ipv6: true domain: false + non_blacklisted_return_code: [] - name: Suomispam Blacklist dns_server: bl.suomispam.net website: http://suomispam.net/ ipv4: true ipv6: true domain: false + non_blacklisted_return_code: [] - name: NordSpam dns_server: bl.nordspam.com website: https://www.nordspam.com/ From 0a5bf3d021680def73a024a211501e07b4fc5c9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Mon, 8 Nov 2021 10:01:38 +0100 Subject: [PATCH 078/146] Fix dump_script_log_extract_for_debugging : We want to catch the last exit in the logs, not the first one. --- src/yunohost/log.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/yunohost/log.py b/src/yunohost/log.py index d73a62cd0..b4f8e181b 100644 --- a/src/yunohost/log.py +++ b/src/yunohost/log.py @@ -753,8 +753,16 @@ class OperationLogger(object): filters = [re.compile(f_) for f_ in filters] lines_to_display = [] - for line in lines: + # The logs may contain multiple ynh_exit_properly (backup + upgrade e.g) + # We want to get the last one. + rev_lines = reversed(lines) + for line in rev_lines: + if line.endswith("+ ynh_exit_properly") or " + ynh_die " in line: + lines_to_display.append(line) + break + + for line in rev_lines: if ": " not in line.strip(): continue @@ -768,10 +776,10 @@ class OperationLogger(object): lines_to_display.append(line) - if line.endswith("+ ynh_exit_properly") or " + ynh_die " in line: + if len(lines_to_display) > 20: break - elif len(lines_to_display) > 20: - lines_to_display.pop(0) + + lines_to_display.reverse() logger.warning( "Here's an extract of the logs before the crash. It might help debugging the error:" From a9b0619f426724d3e3d43a7cbe11b73c41bfbb59 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 8 Nov 2021 12:57:28 +0100 Subject: [PATCH 079/146] log: Factorize boring/irrelevant log line filter definition --- src/yunohost/log.py | 65 +++++++++++++++++++-------------------------- 1 file changed, 27 insertions(+), 38 deletions(-) diff --git a/src/yunohost/log.py b/src/yunohost/log.py index b4f8e181b..e2f6a7510 100644 --- a/src/yunohost/log.py +++ b/src/yunohost/log.py @@ -42,12 +42,36 @@ from yunohost.utils.packages import get_ynh_package_version from moulinette.utils.log import getActionLogger from moulinette.utils.filesystem import read_file, read_yaml +logger = getActionLogger("yunohost.log") + CATEGORIES_PATH = "/var/log/yunohost/categories/" OPERATIONS_PATH = "/var/log/yunohost/categories/operation/" METADATA_FILE_EXT = ".yml" LOG_FILE_EXT = ".log" -logger = getActionLogger("yunohost.log") +BORING_LOG_LINES = [ + r"set [+-]x$", + r"set [+-]o xtrace$", + r"set [+-]o errexit$", + r"set [+-]o nounset$", + r"trap '' EXIT", + r"local \w+$", + r"local exit_code=(1|0)$", + r"local legacy_args=.*$", + r"local -A args_array$", + r"args_array=.*$", + r"ret_code=1", + r".*Helper used in legacy mode.*", + r"ynh_handle_getopts_args", + r"ynh_script_progression", + r"sleep 0.5", + r"'\[' (1|0) -eq (1|0) '\]'$", + r"\[?\['? -n '' '?\]\]?$", + r"rm -rf /var/cache/yunohost/download/$", + r"type -t ynh_clean_setup$", + r"DEBUG - \+ echo '", + r"DEBUG - \+ exit (1|0)$", +] def log_list(limit=None, with_details=False, with_suboperations=False): @@ -163,30 +187,7 @@ def log_show( if filter_irrelevant: def _filter(lines): - filters = [ - r"set [+-]x$", - r"set [+-]o xtrace$", - r"set [+-]o errexit$", - r"set [+-]o nounset$", - r"trap '' EXIT", - r"local \w+$", - r"local exit_code=(1|0)$", - r"local legacy_args=.*$", - r"local -A args_array$", - r"args_array=.*$", - r"ret_code=1", - r".*Helper used in legacy mode.*", - r"ynh_handle_getopts_args", - r"ynh_script_progression", - r"sleep 0.5", - r"'\[' (1|0) -eq (1|0) '\]'$", - r"\[?\['? -n '' '?\]\]?$", - r"rm -rf /var/cache/yunohost/download/$", - r"type -t ynh_clean_setup$", - r"DEBUG - \+ echo '", - r"DEBUG - \+ exit (1|0)$", - ] - filters = [re.compile(f) for f in filters] + filters = [re.compile(f) for f in BORING_LOG_LINES] return [ line for line in lines @@ -738,19 +739,7 @@ class OperationLogger(object): with open(self.log_path, "r") as f: lines = f.readlines() - filters = [ - r"set [+-]x$", - r"set [+-]o xtrace$", - r"local \w+$", - r"local legacy_args=.*$", - r".*Helper used in legacy mode.*", - r"args_array=.*$", - r"local -A args_array$", - r"ynh_handle_getopts_args", - r"ynh_script_progression", - ] - - filters = [re.compile(f_) for f_ in filters] + filters = [re.compile(f_) for f_ in BORING_LOG_LINES] lines_to_display = [] From 03065dda4ea699c63df4a938226907850322dc45 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 8 Nov 2021 13:36:06 +0100 Subject: [PATCH 080/146] log: Simplify code to fetch lines before ynh_exit_properly in dump_script_log_extract_for_debugging --- src/yunohost/log.py | 43 +++++++++++++++++++------------------------ 1 file changed, 19 insertions(+), 24 deletions(-) diff --git a/src/yunohost/log.py b/src/yunohost/log.py index e2f6a7510..347fe2e65 100644 --- a/src/yunohost/log.py +++ b/src/yunohost/log.py @@ -739,36 +739,31 @@ class OperationLogger(object): with open(self.log_path, "r") as f: lines = f.readlines() + # A line typically looks like + # 2019-10-19 16:10:27,611: DEBUG - + mysql -u piwigo --password=********** -B piwigo + # And we just want the part starting by "DEBUG - " + lines = [line for line in lines if ":" in line.strip()] + lines = [line.strip().split(": ", 1)[1] for line in lines] + # And we ignore boring/irrelevant lines + # Annnnnnd we also ignore lines matching [number] + such as + # 72971 DEBUG 29739 + ynh_exit_properly + # which are lines from backup-before-upgrade or restore-after-failed-upgrade ... filters = [re.compile(f_) for f_ in BORING_LOG_LINES] + filters.append(re.compile(r'\d+ \+ ')) + lines = [line for line in lines if not any(filter_.search(line) for filter_ in filters)] lines_to_display = [] - # The logs may contain multiple ynh_exit_properly (backup + upgrade e.g) - # We want to get the last one. - rev_lines = reversed(lines) - for line in rev_lines: - if line.endswith("+ ynh_exit_properly") or " + ynh_die " in line: - lines_to_display.append(line) + # Get the 20 lines before the last 'ynh_exit_properly' + rev_lines = list(reversed(lines)) + for i, line in enumerate(rev_lines): + if line.endswith("+ ynh_exit_properly"): + lines_to_display = reversed(rev_lines[i:i + 20]) break - for line in rev_lines: - if ": " not in line.strip(): - continue - - # A line typically looks like - # 2019-10-19 16:10:27,611: DEBUG - + mysql -u piwigo --password=********** -B piwigo - # And we just want the part starting by "DEBUG - " - line = line.strip().split(": ", 1)[1] - - if any(filter_.search(line) for filter_ in filters): - continue - - lines_to_display.append(line) - - if len(lines_to_display) > 20: - break - - lines_to_display.reverse() + # If didnt find anything, just get the last 20 lines + if not lines_to_display: + lines_to_display = lines[-20:] logger.warning( "Here's an extract of the logs before the crash. It might help debugging the error:" From 7c569d16b787c52f36f4d07b2d5b31c06d29b778 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 8 Nov 2021 18:13:08 +0100 Subject: [PATCH 081/146] certificate: fix stupid certificate/diagnosis issue with subdomains of ynh domains --- src/yunohost/certificate.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/yunohost/certificate.py b/src/yunohost/certificate.py index fe350bf95..2679b2429 100644 --- a/src/yunohost/certificate.py +++ b/src/yunohost/certificate.py @@ -853,6 +853,7 @@ def _check_domain_is_ready_for_ACME(domain): from yunohost.domain import _get_parent_domain_of from yunohost.dns import _get_dns_zone_for_domain + from yunohost.utils.dns import is_yunohost_dyndns_domain httpreachable = ( Diagnoser.get_cached_report( @@ -876,6 +877,15 @@ def _check_domain_is_ready_for_ACME(domain): record_name = ( domain.replace(f".{base_dns_zone}", "") if domain != base_dns_zone else "@" ) + + # Stupid edge case for subdomains of ynh dyndns domains ... + # ... related to the fact that we don't actually check subdomains for + # dyndns domains because we assume that there's already the wildcard doing + # the job, hence no "A:foobar" ... Instead, just check that the parent domain + # is correctly configured. + if is_yunohost_dyndns_domain(parent_domain): + record_name = "@" + A_record_status = dnsrecords.get("data").get(f"A:{record_name}") AAAA_record_status = dnsrecords.get("data").get(f"AAAA:{record_name}") From 5de9e4fe6a2da619d1def5e91bd3ee30b53faddd Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 10 Nov 2021 17:56:02 +0100 Subject: [PATCH 082/146] Yolorework the repo dir structure --- {data/templates => conf}/dnsmasq/domain.tpl | 0 {data/templates => conf}/dnsmasq/plain/dnsmasq.conf | 0 {data/templates => conf}/dnsmasq/plain/etcdefault | 0 .../dnsmasq/plain/resolv.dnsmasq.conf | 0 {data/templates => conf}/dovecot/dovecot-ldap.conf | 0 {data/templates => conf}/dovecot/dovecot.conf | 0 {data/templates => conf}/dovecot/dovecot.sieve | 0 {data/templates => conf}/dovecot/post-ext.conf | 0 {data/templates => conf}/dovecot/pre-ext.conf | 0 {data/templates => conf}/fail2ban/jail.conf | 0 .../templates => conf}/fail2ban/yunohost-jails.conf | 0 {data/templates => conf}/fail2ban/yunohost.conf | 0 {data/templates => conf}/mdns/yunomdns.service | 0 .../templates => conf}/metronome/domain.tpl.cfg.lua | 0 .../templates => conf}/metronome/metronome.cfg.lua | 0 {lib => conf}/metronome/modules/ldap.lib.lua | 0 {lib => conf}/metronome/modules/mod_auth_ldap2.lua | 0 {lib => conf}/metronome/modules/mod_legacyauth.lua | 0 .../metronome/modules/mod_storage_ldap.lua | 0 {lib => conf}/metronome/modules/vcard.lib.lua | 0 {data/templates => conf}/nginx/autoconfig.tpl.xml | 0 .../nginx/plain/acme-challenge.conf.inc | 0 {data/templates => conf}/nginx/plain/global.conf | 0 {data/templates => conf}/nginx/plain/ssowat.conf | 0 .../nginx/plain/yunohost_panel.conf.inc | 0 .../nginx/plain/yunohost_sso.conf.inc | 0 .../templates => conf}/nginx/redirect_to_admin.conf | 0 {data/templates => conf}/nginx/security.conf.inc | 0 {data/templates => conf}/nginx/server.tpl.conf | 0 {data/templates => conf}/nginx/yunohost_admin.conf | 0 .../nginx/yunohost_admin.conf.inc | 0 .../templates => conf}/nginx/yunohost_api.conf.inc | 0 {data/templates => conf}/nslcd/nslcd.conf | 0 {data/templates => conf}/nsswitch/nsswitch.conf | 0 {data/templates => conf}/postfix/main.cf | 0 .../templates => conf}/postfix/plain/header_checks | 0 .../postfix/plain/ldap-accounts.cf | 0 .../postfix/plain/ldap-aliases.cf | 0 .../postfix/plain/ldap-domains.cf | 0 {data/templates => conf}/postfix/plain/master.cf | 0 .../postfix/plain/sender_canonical | 0 .../postfix/plain/smtp_reply_filter | 0 {data/templates => conf}/postfix/postsrsd | 0 {data/templates => conf}/rspamd/dkim_signing.conf | 0 {data/templates => conf}/rspamd/metrics.local.conf | 0 {data/templates => conf}/rspamd/milter_headers.conf | 0 {data/templates => conf}/rspamd/rspamd.sieve | 0 {data/templates => conf}/slapd/config.ldif | 0 {data/templates => conf}/slapd/db_init.ldif | 0 {data/templates => conf}/slapd/ldap.conf | 0 {data/templates => conf}/slapd/mailserver.ldif | 0 {data/templates => conf}/slapd/permission.ldif | 0 {data/templates => conf}/slapd/slapd.default | 0 {data/templates => conf}/slapd/sudo.ldif | 0 .../templates => conf}/slapd/systemd-override.conf | 0 {data/templates => conf}/ssh/sshd_config | 0 {data/templates => conf}/ssl/openssl.cnf | 0 {data/templates => conf}/yunohost/dpkg-origins | 0 {data/templates => conf}/yunohost/firewall.yml | 0 .../yunohost/proc-hidepid.service | 0 {data/templates => conf}/yunohost/services.yml | 0 .../templates => conf}/yunohost/yunoprompt.service | 0 .../generate_bash_completion.py | 0 {data/helpers.d => helpers}/apt | 0 {data/helpers.d => helpers}/backup | 0 {data/helpers.d => helpers}/config | 0 {data/helpers.d => helpers}/fail2ban | 0 {data/helpers.d => helpers}/getopts | 0 {data/helpers.d => helpers}/hardware | 0 {data/helpers.d => helpers}/logging | 0 {data/helpers.d => helpers}/logrotate | 0 {data/helpers.d => helpers}/multimedia | 0 {data/helpers.d => helpers}/mysql | 0 {data/helpers.d => helpers}/network | 0 {data/helpers.d => helpers}/nginx | 0 {data/helpers.d => helpers}/nodejs | 0 {data/helpers.d => helpers}/permission | 0 {data/helpers.d => helpers}/php | 0 {data/helpers.d => helpers}/postgresql | 0 {data/helpers.d => helpers}/setting | 0 {data/helpers.d => helpers}/string | 0 {data/helpers.d => helpers}/systemd | 0 {data/helpers.d => helpers}/user | 0 {data/helpers.d => helpers}/utils | 0 {data/hooks => hooks}/backup/05-conf_ldap | 0 {data/hooks => hooks}/backup/17-data_home | 0 {data/hooks => hooks}/backup/18-data_multimedia | 0 {data/hooks => hooks}/backup/20-conf_ynh_settings | 0 {data/hooks => hooks}/backup/21-conf_ynh_certs | 0 {data/hooks => hooks}/backup/23-data_mail | 0 {data/hooks => hooks}/backup/27-data_xmpp | 0 .../backup/50-conf_manually_modified_files | 0 {data/hooks => hooks}/conf_regen/01-yunohost | 0 {data/hooks => hooks}/conf_regen/02-ssl | 0 {data/hooks => hooks}/conf_regen/03-ssh | 0 {data/hooks => hooks}/conf_regen/06-slapd | 0 {data/hooks => hooks}/conf_regen/09-nslcd | 0 {data/hooks => hooks}/conf_regen/10-apt | 0 {data/hooks => hooks}/conf_regen/12-metronome | 0 {data/hooks => hooks}/conf_regen/15-nginx | 0 {data/hooks => hooks}/conf_regen/19-postfix | 0 {data/hooks => hooks}/conf_regen/25-dovecot | 0 {data/hooks => hooks}/conf_regen/31-rspamd | 0 {data/hooks => hooks}/conf_regen/34-mysql | 0 {data/hooks => hooks}/conf_regen/35-redis | 0 {data/hooks => hooks}/conf_regen/37-mdns | 0 {data/hooks => hooks}/conf_regen/43-dnsmasq | 0 {data/hooks => hooks}/conf_regen/46-nsswitch | 0 {data/hooks => hooks}/conf_regen/52-fail2ban | 0 .../hooks => hooks}/post_user_create/ynh_multimedia | 0 .../hooks => hooks}/post_user_delete/ynh_multimedia | 0 {data/hooks => hooks}/restore/05-conf_ldap | 0 {data/hooks => hooks}/restore/17-data_home | 0 {data/hooks => hooks}/restore/18-data_multimedia | 0 {data/hooks => hooks}/restore/20-conf_ynh_settings | 0 {data/hooks => hooks}/restore/21-conf_ynh_certs | 0 {data/hooks => hooks}/restore/23-data_mail | 0 {data/hooks => hooks}/restore/27-data_xmpp | 0 .../restore/50-conf_manually_modified_files | 0 .../100000-most-used-passwords.txt.gz | Bin .../actionsmap/yunohost.yml => share/actionsmap.yml | 0 {data/other => share}/config_domain.toml | 0 {data/other => share}/dnsbl_list.yml | 0 {data/other => share}/ffdhe2048.pem | 0 {data => share}/helpers | 0 {data/other => share}/registrar_list.toml | 0 src/{yunohost => }/__init__.py | 0 src/{yunohost => }/app.py | 0 src/{yunohost => }/app_catalog.py | 0 src/{yunohost => }/authenticators/ldap_admin.py | 0 src/{yunohost => }/backup.py | 0 src/{yunohost => }/certificate.py | 0 .../data_migrations/0021_migrate_to_bullseye.py | 0 .../data_migrations/0022_php73_to_php74_pools.py | 0 .../data_migrations/0023_postgresql_11_to_13.py | 0 src/{yunohost => }/data_migrations/__init__.py | 0 src/{yunohost => }/diagnosis.py | 0 {data/hooks => src}/diagnosis/00-basesystem.py | 0 {data/hooks => src}/diagnosis/10-ip.py | 0 {data/hooks => src}/diagnosis/12-dnsrecords.py | 0 {data/hooks => src}/diagnosis/14-ports.py | 0 {data/hooks => src}/diagnosis/21-web.py | 0 {data/hooks => src}/diagnosis/24-mail.py | 0 {data/hooks => src}/diagnosis/30-services.py | 0 {data/hooks => src}/diagnosis/50-systemresources.py | 0 {data/hooks => src}/diagnosis/70-regenconf.py | 0 {data/hooks => src}/diagnosis/80-apps.py | 0 src/{yunohost => }/dns.py | 0 src/{yunohost => }/domain.py | 0 src/{yunohost => }/dyndns.py | 0 src/{yunohost => }/firewall.py | 0 src/{yunohost => }/hook.py | 0 src/{yunohost => }/log.py | 0 src/{yunohost => }/permission.py | 0 src/{yunohost => }/regenconf.py | 0 src/{yunohost => }/service.py | 0 src/{yunohost => }/settings.py | 0 src/{yunohost => }/ssh.py | 0 src/{yunohost => }/tests/__init__.py | 0 src/{yunohost => }/tests/conftest.py | 0 src/{yunohost => }/tests/test_app_catalog.py | 0 src/{yunohost => }/tests/test_app_config.py | 0 src/{yunohost => }/tests/test_apps.py | 0 src/{yunohost => }/tests/test_appurl.py | 0 src/{yunohost => }/tests/test_backuprestore.py | 0 src/{yunohost => }/tests/test_changeurl.py | 0 src/{yunohost => }/tests/test_dns.py | 0 src/{yunohost => }/tests/test_domains.py | 0 src/{yunohost => }/tests/test_ldapauth.py | 0 src/{yunohost => }/tests/test_permission.py | 0 src/{yunohost => }/tests/test_questions.py | 0 src/{yunohost => }/tests/test_regenconf.py | 0 src/{yunohost => }/tests/test_service.py | 0 src/{yunohost => }/tests/test_settings.py | 0 src/{yunohost => }/tests/test_user-group.py | 0 src/{yunohost => }/tools.py | 0 src/{yunohost => }/user.py | 0 src/{yunohost => }/utils/__init__.py | 0 src/{yunohost => }/utils/config.py | 0 src/{yunohost => }/utils/dns.py | 0 src/{yunohost => }/utils/error.py | 0 src/{yunohost => }/utils/filesystem.py | 0 src/{yunohost => }/utils/i18n.py | 0 src/{yunohost => }/utils/ldap.py | 0 src/{yunohost => }/utils/legacy.py | 0 src/{yunohost => }/utils/network.py | 0 src/{yunohost => }/utils/packages.py | 0 src/{yunohost => }/utils/password.py | 0 src/{yunohost => }/utils/yunopaste.py | 0 src/{yunohost => }/vendor/__init__.py | 0 src/{yunohost => }/vendor/acme_tiny/__init__.py | 0 src/{yunohost => }/vendor/acme_tiny/acme_tiny.py | 0 .../vendor/spectre-meltdown-checker/Dockerfile | 0 .../vendor/spectre-meltdown-checker/LICENSE | 0 .../vendor/spectre-meltdown-checker/README.md | 0 .../spectre-meltdown-checker/docker-compose.yml | 0 .../spectre-meltdown-checker.sh | 0 197 files changed, 0 insertions(+), 0 deletions(-) rename {data/templates => conf}/dnsmasq/domain.tpl (100%) rename {data/templates => conf}/dnsmasq/plain/dnsmasq.conf (100%) rename {data/templates => conf}/dnsmasq/plain/etcdefault (100%) rename {data/templates => conf}/dnsmasq/plain/resolv.dnsmasq.conf (100%) rename {data/templates => conf}/dovecot/dovecot-ldap.conf (100%) rename {data/templates => conf}/dovecot/dovecot.conf (100%) rename {data/templates => conf}/dovecot/dovecot.sieve (100%) rename {data/templates => conf}/dovecot/post-ext.conf (100%) rename {data/templates => conf}/dovecot/pre-ext.conf (100%) rename {data/templates => conf}/fail2ban/jail.conf (100%) rename {data/templates => conf}/fail2ban/yunohost-jails.conf (100%) rename {data/templates => conf}/fail2ban/yunohost.conf (100%) rename {data/templates => conf}/mdns/yunomdns.service (100%) rename {data/templates => conf}/metronome/domain.tpl.cfg.lua (100%) rename {data/templates => conf}/metronome/metronome.cfg.lua (100%) rename {lib => conf}/metronome/modules/ldap.lib.lua (100%) rename {lib => conf}/metronome/modules/mod_auth_ldap2.lua (100%) rename {lib => conf}/metronome/modules/mod_legacyauth.lua (100%) rename {lib => conf}/metronome/modules/mod_storage_ldap.lua (100%) rename {lib => conf}/metronome/modules/vcard.lib.lua (100%) rename {data/templates => conf}/nginx/autoconfig.tpl.xml (100%) rename {data/templates => conf}/nginx/plain/acme-challenge.conf.inc (100%) rename {data/templates => conf}/nginx/plain/global.conf (100%) rename {data/templates => conf}/nginx/plain/ssowat.conf (100%) rename {data/templates => conf}/nginx/plain/yunohost_panel.conf.inc (100%) rename {data/templates => conf}/nginx/plain/yunohost_sso.conf.inc (100%) rename {data/templates => conf}/nginx/redirect_to_admin.conf (100%) rename {data/templates => conf}/nginx/security.conf.inc (100%) rename {data/templates => conf}/nginx/server.tpl.conf (100%) rename {data/templates => conf}/nginx/yunohost_admin.conf (100%) rename {data/templates => conf}/nginx/yunohost_admin.conf.inc (100%) rename {data/templates => conf}/nginx/yunohost_api.conf.inc (100%) rename {data/templates => conf}/nslcd/nslcd.conf (100%) rename {data/templates => conf}/nsswitch/nsswitch.conf (100%) rename {data/templates => conf}/postfix/main.cf (100%) rename {data/templates => conf}/postfix/plain/header_checks (100%) rename {data/templates => conf}/postfix/plain/ldap-accounts.cf (100%) rename {data/templates => conf}/postfix/plain/ldap-aliases.cf (100%) rename {data/templates => conf}/postfix/plain/ldap-domains.cf (100%) rename {data/templates => conf}/postfix/plain/master.cf (100%) rename {data/templates => conf}/postfix/plain/sender_canonical (100%) rename {data/templates => conf}/postfix/plain/smtp_reply_filter (100%) rename {data/templates => conf}/postfix/postsrsd (100%) rename {data/templates => conf}/rspamd/dkim_signing.conf (100%) rename {data/templates => conf}/rspamd/metrics.local.conf (100%) rename {data/templates => conf}/rspamd/milter_headers.conf (100%) rename {data/templates => conf}/rspamd/rspamd.sieve (100%) rename {data/templates => conf}/slapd/config.ldif (100%) rename {data/templates => conf}/slapd/db_init.ldif (100%) rename {data/templates => conf}/slapd/ldap.conf (100%) rename {data/templates => conf}/slapd/mailserver.ldif (100%) rename {data/templates => conf}/slapd/permission.ldif (100%) rename {data/templates => conf}/slapd/slapd.default (100%) rename {data/templates => conf}/slapd/sudo.ldif (100%) rename {data/templates => conf}/slapd/systemd-override.conf (100%) rename {data/templates => conf}/ssh/sshd_config (100%) rename {data/templates => conf}/ssl/openssl.cnf (100%) rename {data/templates => conf}/yunohost/dpkg-origins (100%) rename {data/templates => conf}/yunohost/firewall.yml (100%) rename {data/templates => conf}/yunohost/proc-hidepid.service (100%) rename {data/templates => conf}/yunohost/services.yml (100%) rename {data/templates => conf}/yunohost/yunoprompt.service (100%) rename data/actionsmap/yunohost_completion.py => doc/generate_bash_completion.py (100%) rename {data/helpers.d => helpers}/apt (100%) rename {data/helpers.d => helpers}/backup (100%) rename {data/helpers.d => helpers}/config (100%) rename {data/helpers.d => helpers}/fail2ban (100%) rename {data/helpers.d => helpers}/getopts (100%) rename {data/helpers.d => helpers}/hardware (100%) rename {data/helpers.d => helpers}/logging (100%) rename {data/helpers.d => helpers}/logrotate (100%) rename {data/helpers.d => helpers}/multimedia (100%) rename {data/helpers.d => helpers}/mysql (100%) rename {data/helpers.d => helpers}/network (100%) rename {data/helpers.d => helpers}/nginx (100%) rename {data/helpers.d => helpers}/nodejs (100%) rename {data/helpers.d => helpers}/permission (100%) rename {data/helpers.d => helpers}/php (100%) rename {data/helpers.d => helpers}/postgresql (100%) rename {data/helpers.d => helpers}/setting (100%) rename {data/helpers.d => helpers}/string (100%) rename {data/helpers.d => helpers}/systemd (100%) rename {data/helpers.d => helpers}/user (100%) rename {data/helpers.d => helpers}/utils (100%) rename {data/hooks => hooks}/backup/05-conf_ldap (100%) rename {data/hooks => hooks}/backup/17-data_home (100%) rename {data/hooks => hooks}/backup/18-data_multimedia (100%) rename {data/hooks => hooks}/backup/20-conf_ynh_settings (100%) rename {data/hooks => hooks}/backup/21-conf_ynh_certs (100%) rename {data/hooks => hooks}/backup/23-data_mail (100%) rename {data/hooks => hooks}/backup/27-data_xmpp (100%) rename {data/hooks => hooks}/backup/50-conf_manually_modified_files (100%) rename {data/hooks => hooks}/conf_regen/01-yunohost (100%) rename {data/hooks => hooks}/conf_regen/02-ssl (100%) rename {data/hooks => hooks}/conf_regen/03-ssh (100%) rename {data/hooks => hooks}/conf_regen/06-slapd (100%) rename {data/hooks => hooks}/conf_regen/09-nslcd (100%) rename {data/hooks => hooks}/conf_regen/10-apt (100%) rename {data/hooks => hooks}/conf_regen/12-metronome (100%) rename {data/hooks => hooks}/conf_regen/15-nginx (100%) rename {data/hooks => hooks}/conf_regen/19-postfix (100%) rename {data/hooks => hooks}/conf_regen/25-dovecot (100%) rename {data/hooks => hooks}/conf_regen/31-rspamd (100%) rename {data/hooks => hooks}/conf_regen/34-mysql (100%) rename {data/hooks => hooks}/conf_regen/35-redis (100%) rename {data/hooks => hooks}/conf_regen/37-mdns (100%) rename {data/hooks => hooks}/conf_regen/43-dnsmasq (100%) rename {data/hooks => hooks}/conf_regen/46-nsswitch (100%) rename {data/hooks => hooks}/conf_regen/52-fail2ban (100%) rename {data/hooks => hooks}/post_user_create/ynh_multimedia (100%) rename {data/hooks => hooks}/post_user_delete/ynh_multimedia (100%) rename {data/hooks => hooks}/restore/05-conf_ldap (100%) rename {data/hooks => hooks}/restore/17-data_home (100%) rename {data/hooks => hooks}/restore/18-data_multimedia (100%) rename {data/hooks => hooks}/restore/20-conf_ynh_settings (100%) rename {data/hooks => hooks}/restore/21-conf_ynh_certs (100%) rename {data/hooks => hooks}/restore/23-data_mail (100%) rename {data/hooks => hooks}/restore/27-data_xmpp (100%) rename {data/hooks => hooks}/restore/50-conf_manually_modified_files (100%) rename data/other/password/100000-most-used.txt.gz => share/100000-most-used-passwords.txt.gz (100%) rename data/actionsmap/yunohost.yml => share/actionsmap.yml (100%) rename {data/other => share}/config_domain.toml (100%) rename {data/other => share}/dnsbl_list.yml (100%) rename {data/other => share}/ffdhe2048.pem (100%) rename {data => share}/helpers (100%) rename {data/other => share}/registrar_list.toml (100%) rename src/{yunohost => }/__init__.py (100%) rename src/{yunohost => }/app.py (100%) rename src/{yunohost => }/app_catalog.py (100%) rename src/{yunohost => }/authenticators/ldap_admin.py (100%) rename src/{yunohost => }/backup.py (100%) rename src/{yunohost => }/certificate.py (100%) rename src/{yunohost => }/data_migrations/0021_migrate_to_bullseye.py (100%) rename src/{yunohost => }/data_migrations/0022_php73_to_php74_pools.py (100%) rename src/{yunohost => }/data_migrations/0023_postgresql_11_to_13.py (100%) rename src/{yunohost => }/data_migrations/__init__.py (100%) rename src/{yunohost => }/diagnosis.py (100%) rename {data/hooks => src}/diagnosis/00-basesystem.py (100%) rename {data/hooks => src}/diagnosis/10-ip.py (100%) rename {data/hooks => src}/diagnosis/12-dnsrecords.py (100%) rename {data/hooks => src}/diagnosis/14-ports.py (100%) rename {data/hooks => src}/diagnosis/21-web.py (100%) rename {data/hooks => src}/diagnosis/24-mail.py (100%) rename {data/hooks => src}/diagnosis/30-services.py (100%) rename {data/hooks => src}/diagnosis/50-systemresources.py (100%) rename {data/hooks => src}/diagnosis/70-regenconf.py (100%) rename {data/hooks => src}/diagnosis/80-apps.py (100%) rename src/{yunohost => }/dns.py (100%) rename src/{yunohost => }/domain.py (100%) rename src/{yunohost => }/dyndns.py (100%) rename src/{yunohost => }/firewall.py (100%) rename src/{yunohost => }/hook.py (100%) rename src/{yunohost => }/log.py (100%) rename src/{yunohost => }/permission.py (100%) rename src/{yunohost => }/regenconf.py (100%) rename src/{yunohost => }/service.py (100%) rename src/{yunohost => }/settings.py (100%) rename src/{yunohost => }/ssh.py (100%) rename src/{yunohost => }/tests/__init__.py (100%) rename src/{yunohost => }/tests/conftest.py (100%) rename src/{yunohost => }/tests/test_app_catalog.py (100%) rename src/{yunohost => }/tests/test_app_config.py (100%) rename src/{yunohost => }/tests/test_apps.py (100%) rename src/{yunohost => }/tests/test_appurl.py (100%) rename src/{yunohost => }/tests/test_backuprestore.py (100%) rename src/{yunohost => }/tests/test_changeurl.py (100%) rename src/{yunohost => }/tests/test_dns.py (100%) rename src/{yunohost => }/tests/test_domains.py (100%) rename src/{yunohost => }/tests/test_ldapauth.py (100%) rename src/{yunohost => }/tests/test_permission.py (100%) rename src/{yunohost => }/tests/test_questions.py (100%) rename src/{yunohost => }/tests/test_regenconf.py (100%) rename src/{yunohost => }/tests/test_service.py (100%) rename src/{yunohost => }/tests/test_settings.py (100%) rename src/{yunohost => }/tests/test_user-group.py (100%) rename src/{yunohost => }/tools.py (100%) rename src/{yunohost => }/user.py (100%) rename src/{yunohost => }/utils/__init__.py (100%) rename src/{yunohost => }/utils/config.py (100%) rename src/{yunohost => }/utils/dns.py (100%) rename src/{yunohost => }/utils/error.py (100%) rename src/{yunohost => }/utils/filesystem.py (100%) rename src/{yunohost => }/utils/i18n.py (100%) rename src/{yunohost => }/utils/ldap.py (100%) rename src/{yunohost => }/utils/legacy.py (100%) rename src/{yunohost => }/utils/network.py (100%) rename src/{yunohost => }/utils/packages.py (100%) rename src/{yunohost => }/utils/password.py (100%) rename src/{yunohost => }/utils/yunopaste.py (100%) rename src/{yunohost => }/vendor/__init__.py (100%) rename src/{yunohost => }/vendor/acme_tiny/__init__.py (100%) rename src/{yunohost => }/vendor/acme_tiny/acme_tiny.py (100%) rename src/{yunohost => }/vendor/spectre-meltdown-checker/Dockerfile (100%) rename src/{yunohost => }/vendor/spectre-meltdown-checker/LICENSE (100%) rename src/{yunohost => }/vendor/spectre-meltdown-checker/README.md (100%) rename src/{yunohost => }/vendor/spectre-meltdown-checker/docker-compose.yml (100%) rename src/{yunohost => }/vendor/spectre-meltdown-checker/spectre-meltdown-checker.sh (100%) diff --git a/data/templates/dnsmasq/domain.tpl b/conf/dnsmasq/domain.tpl similarity index 100% rename from data/templates/dnsmasq/domain.tpl rename to conf/dnsmasq/domain.tpl diff --git a/data/templates/dnsmasq/plain/dnsmasq.conf b/conf/dnsmasq/plain/dnsmasq.conf similarity index 100% rename from data/templates/dnsmasq/plain/dnsmasq.conf rename to conf/dnsmasq/plain/dnsmasq.conf diff --git a/data/templates/dnsmasq/plain/etcdefault b/conf/dnsmasq/plain/etcdefault similarity index 100% rename from data/templates/dnsmasq/plain/etcdefault rename to conf/dnsmasq/plain/etcdefault diff --git a/data/templates/dnsmasq/plain/resolv.dnsmasq.conf b/conf/dnsmasq/plain/resolv.dnsmasq.conf similarity index 100% rename from data/templates/dnsmasq/plain/resolv.dnsmasq.conf rename to conf/dnsmasq/plain/resolv.dnsmasq.conf diff --git a/data/templates/dovecot/dovecot-ldap.conf b/conf/dovecot/dovecot-ldap.conf similarity index 100% rename from data/templates/dovecot/dovecot-ldap.conf rename to conf/dovecot/dovecot-ldap.conf diff --git a/data/templates/dovecot/dovecot.conf b/conf/dovecot/dovecot.conf similarity index 100% rename from data/templates/dovecot/dovecot.conf rename to conf/dovecot/dovecot.conf diff --git a/data/templates/dovecot/dovecot.sieve b/conf/dovecot/dovecot.sieve similarity index 100% rename from data/templates/dovecot/dovecot.sieve rename to conf/dovecot/dovecot.sieve diff --git a/data/templates/dovecot/post-ext.conf b/conf/dovecot/post-ext.conf similarity index 100% rename from data/templates/dovecot/post-ext.conf rename to conf/dovecot/post-ext.conf diff --git a/data/templates/dovecot/pre-ext.conf b/conf/dovecot/pre-ext.conf similarity index 100% rename from data/templates/dovecot/pre-ext.conf rename to conf/dovecot/pre-ext.conf diff --git a/data/templates/fail2ban/jail.conf b/conf/fail2ban/jail.conf similarity index 100% rename from data/templates/fail2ban/jail.conf rename to conf/fail2ban/jail.conf diff --git a/data/templates/fail2ban/yunohost-jails.conf b/conf/fail2ban/yunohost-jails.conf similarity index 100% rename from data/templates/fail2ban/yunohost-jails.conf rename to conf/fail2ban/yunohost-jails.conf diff --git a/data/templates/fail2ban/yunohost.conf b/conf/fail2ban/yunohost.conf similarity index 100% rename from data/templates/fail2ban/yunohost.conf rename to conf/fail2ban/yunohost.conf diff --git a/data/templates/mdns/yunomdns.service b/conf/mdns/yunomdns.service similarity index 100% rename from data/templates/mdns/yunomdns.service rename to conf/mdns/yunomdns.service diff --git a/data/templates/metronome/domain.tpl.cfg.lua b/conf/metronome/domain.tpl.cfg.lua similarity index 100% rename from data/templates/metronome/domain.tpl.cfg.lua rename to conf/metronome/domain.tpl.cfg.lua diff --git a/data/templates/metronome/metronome.cfg.lua b/conf/metronome/metronome.cfg.lua similarity index 100% rename from data/templates/metronome/metronome.cfg.lua rename to conf/metronome/metronome.cfg.lua diff --git a/lib/metronome/modules/ldap.lib.lua b/conf/metronome/modules/ldap.lib.lua similarity index 100% rename from lib/metronome/modules/ldap.lib.lua rename to conf/metronome/modules/ldap.lib.lua diff --git a/lib/metronome/modules/mod_auth_ldap2.lua b/conf/metronome/modules/mod_auth_ldap2.lua similarity index 100% rename from lib/metronome/modules/mod_auth_ldap2.lua rename to conf/metronome/modules/mod_auth_ldap2.lua diff --git a/lib/metronome/modules/mod_legacyauth.lua b/conf/metronome/modules/mod_legacyauth.lua similarity index 100% rename from lib/metronome/modules/mod_legacyauth.lua rename to conf/metronome/modules/mod_legacyauth.lua diff --git a/lib/metronome/modules/mod_storage_ldap.lua b/conf/metronome/modules/mod_storage_ldap.lua similarity index 100% rename from lib/metronome/modules/mod_storage_ldap.lua rename to conf/metronome/modules/mod_storage_ldap.lua diff --git a/lib/metronome/modules/vcard.lib.lua b/conf/metronome/modules/vcard.lib.lua similarity index 100% rename from lib/metronome/modules/vcard.lib.lua rename to conf/metronome/modules/vcard.lib.lua diff --git a/data/templates/nginx/autoconfig.tpl.xml b/conf/nginx/autoconfig.tpl.xml similarity index 100% rename from data/templates/nginx/autoconfig.tpl.xml rename to conf/nginx/autoconfig.tpl.xml diff --git a/data/templates/nginx/plain/acme-challenge.conf.inc b/conf/nginx/plain/acme-challenge.conf.inc similarity index 100% rename from data/templates/nginx/plain/acme-challenge.conf.inc rename to conf/nginx/plain/acme-challenge.conf.inc diff --git a/data/templates/nginx/plain/global.conf b/conf/nginx/plain/global.conf similarity index 100% rename from data/templates/nginx/plain/global.conf rename to conf/nginx/plain/global.conf diff --git a/data/templates/nginx/plain/ssowat.conf b/conf/nginx/plain/ssowat.conf similarity index 100% rename from data/templates/nginx/plain/ssowat.conf rename to conf/nginx/plain/ssowat.conf diff --git a/data/templates/nginx/plain/yunohost_panel.conf.inc b/conf/nginx/plain/yunohost_panel.conf.inc similarity index 100% rename from data/templates/nginx/plain/yunohost_panel.conf.inc rename to conf/nginx/plain/yunohost_panel.conf.inc diff --git a/data/templates/nginx/plain/yunohost_sso.conf.inc b/conf/nginx/plain/yunohost_sso.conf.inc similarity index 100% rename from data/templates/nginx/plain/yunohost_sso.conf.inc rename to conf/nginx/plain/yunohost_sso.conf.inc diff --git a/data/templates/nginx/redirect_to_admin.conf b/conf/nginx/redirect_to_admin.conf similarity index 100% rename from data/templates/nginx/redirect_to_admin.conf rename to conf/nginx/redirect_to_admin.conf diff --git a/data/templates/nginx/security.conf.inc b/conf/nginx/security.conf.inc similarity index 100% rename from data/templates/nginx/security.conf.inc rename to conf/nginx/security.conf.inc diff --git a/data/templates/nginx/server.tpl.conf b/conf/nginx/server.tpl.conf similarity index 100% rename from data/templates/nginx/server.tpl.conf rename to conf/nginx/server.tpl.conf diff --git a/data/templates/nginx/yunohost_admin.conf b/conf/nginx/yunohost_admin.conf similarity index 100% rename from data/templates/nginx/yunohost_admin.conf rename to conf/nginx/yunohost_admin.conf diff --git a/data/templates/nginx/yunohost_admin.conf.inc b/conf/nginx/yunohost_admin.conf.inc similarity index 100% rename from data/templates/nginx/yunohost_admin.conf.inc rename to conf/nginx/yunohost_admin.conf.inc diff --git a/data/templates/nginx/yunohost_api.conf.inc b/conf/nginx/yunohost_api.conf.inc similarity index 100% rename from data/templates/nginx/yunohost_api.conf.inc rename to conf/nginx/yunohost_api.conf.inc diff --git a/data/templates/nslcd/nslcd.conf b/conf/nslcd/nslcd.conf similarity index 100% rename from data/templates/nslcd/nslcd.conf rename to conf/nslcd/nslcd.conf diff --git a/data/templates/nsswitch/nsswitch.conf b/conf/nsswitch/nsswitch.conf similarity index 100% rename from data/templates/nsswitch/nsswitch.conf rename to conf/nsswitch/nsswitch.conf diff --git a/data/templates/postfix/main.cf b/conf/postfix/main.cf similarity index 100% rename from data/templates/postfix/main.cf rename to conf/postfix/main.cf diff --git a/data/templates/postfix/plain/header_checks b/conf/postfix/plain/header_checks similarity index 100% rename from data/templates/postfix/plain/header_checks rename to conf/postfix/plain/header_checks diff --git a/data/templates/postfix/plain/ldap-accounts.cf b/conf/postfix/plain/ldap-accounts.cf similarity index 100% rename from data/templates/postfix/plain/ldap-accounts.cf rename to conf/postfix/plain/ldap-accounts.cf diff --git a/data/templates/postfix/plain/ldap-aliases.cf b/conf/postfix/plain/ldap-aliases.cf similarity index 100% rename from data/templates/postfix/plain/ldap-aliases.cf rename to conf/postfix/plain/ldap-aliases.cf diff --git a/data/templates/postfix/plain/ldap-domains.cf b/conf/postfix/plain/ldap-domains.cf similarity index 100% rename from data/templates/postfix/plain/ldap-domains.cf rename to conf/postfix/plain/ldap-domains.cf diff --git a/data/templates/postfix/plain/master.cf b/conf/postfix/plain/master.cf similarity index 100% rename from data/templates/postfix/plain/master.cf rename to conf/postfix/plain/master.cf diff --git a/data/templates/postfix/plain/sender_canonical b/conf/postfix/plain/sender_canonical similarity index 100% rename from data/templates/postfix/plain/sender_canonical rename to conf/postfix/plain/sender_canonical diff --git a/data/templates/postfix/plain/smtp_reply_filter b/conf/postfix/plain/smtp_reply_filter similarity index 100% rename from data/templates/postfix/plain/smtp_reply_filter rename to conf/postfix/plain/smtp_reply_filter diff --git a/data/templates/postfix/postsrsd b/conf/postfix/postsrsd similarity index 100% rename from data/templates/postfix/postsrsd rename to conf/postfix/postsrsd diff --git a/data/templates/rspamd/dkim_signing.conf b/conf/rspamd/dkim_signing.conf similarity index 100% rename from data/templates/rspamd/dkim_signing.conf rename to conf/rspamd/dkim_signing.conf diff --git a/data/templates/rspamd/metrics.local.conf b/conf/rspamd/metrics.local.conf similarity index 100% rename from data/templates/rspamd/metrics.local.conf rename to conf/rspamd/metrics.local.conf diff --git a/data/templates/rspamd/milter_headers.conf b/conf/rspamd/milter_headers.conf similarity index 100% rename from data/templates/rspamd/milter_headers.conf rename to conf/rspamd/milter_headers.conf diff --git a/data/templates/rspamd/rspamd.sieve b/conf/rspamd/rspamd.sieve similarity index 100% rename from data/templates/rspamd/rspamd.sieve rename to conf/rspamd/rspamd.sieve diff --git a/data/templates/slapd/config.ldif b/conf/slapd/config.ldif similarity index 100% rename from data/templates/slapd/config.ldif rename to conf/slapd/config.ldif diff --git a/data/templates/slapd/db_init.ldif b/conf/slapd/db_init.ldif similarity index 100% rename from data/templates/slapd/db_init.ldif rename to conf/slapd/db_init.ldif diff --git a/data/templates/slapd/ldap.conf b/conf/slapd/ldap.conf similarity index 100% rename from data/templates/slapd/ldap.conf rename to conf/slapd/ldap.conf diff --git a/data/templates/slapd/mailserver.ldif b/conf/slapd/mailserver.ldif similarity index 100% rename from data/templates/slapd/mailserver.ldif rename to conf/slapd/mailserver.ldif diff --git a/data/templates/slapd/permission.ldif b/conf/slapd/permission.ldif similarity index 100% rename from data/templates/slapd/permission.ldif rename to conf/slapd/permission.ldif diff --git a/data/templates/slapd/slapd.default b/conf/slapd/slapd.default similarity index 100% rename from data/templates/slapd/slapd.default rename to conf/slapd/slapd.default diff --git a/data/templates/slapd/sudo.ldif b/conf/slapd/sudo.ldif similarity index 100% rename from data/templates/slapd/sudo.ldif rename to conf/slapd/sudo.ldif diff --git a/data/templates/slapd/systemd-override.conf b/conf/slapd/systemd-override.conf similarity index 100% rename from data/templates/slapd/systemd-override.conf rename to conf/slapd/systemd-override.conf diff --git a/data/templates/ssh/sshd_config b/conf/ssh/sshd_config similarity index 100% rename from data/templates/ssh/sshd_config rename to conf/ssh/sshd_config diff --git a/data/templates/ssl/openssl.cnf b/conf/ssl/openssl.cnf similarity index 100% rename from data/templates/ssl/openssl.cnf rename to conf/ssl/openssl.cnf diff --git a/data/templates/yunohost/dpkg-origins b/conf/yunohost/dpkg-origins similarity index 100% rename from data/templates/yunohost/dpkg-origins rename to conf/yunohost/dpkg-origins diff --git a/data/templates/yunohost/firewall.yml b/conf/yunohost/firewall.yml similarity index 100% rename from data/templates/yunohost/firewall.yml rename to conf/yunohost/firewall.yml diff --git a/data/templates/yunohost/proc-hidepid.service b/conf/yunohost/proc-hidepid.service similarity index 100% rename from data/templates/yunohost/proc-hidepid.service rename to conf/yunohost/proc-hidepid.service diff --git a/data/templates/yunohost/services.yml b/conf/yunohost/services.yml similarity index 100% rename from data/templates/yunohost/services.yml rename to conf/yunohost/services.yml diff --git a/data/templates/yunohost/yunoprompt.service b/conf/yunohost/yunoprompt.service similarity index 100% rename from data/templates/yunohost/yunoprompt.service rename to conf/yunohost/yunoprompt.service diff --git a/data/actionsmap/yunohost_completion.py b/doc/generate_bash_completion.py similarity index 100% rename from data/actionsmap/yunohost_completion.py rename to doc/generate_bash_completion.py diff --git a/data/helpers.d/apt b/helpers/apt similarity index 100% rename from data/helpers.d/apt rename to helpers/apt diff --git a/data/helpers.d/backup b/helpers/backup similarity index 100% rename from data/helpers.d/backup rename to helpers/backup diff --git a/data/helpers.d/config b/helpers/config similarity index 100% rename from data/helpers.d/config rename to helpers/config diff --git a/data/helpers.d/fail2ban b/helpers/fail2ban similarity index 100% rename from data/helpers.d/fail2ban rename to helpers/fail2ban diff --git a/data/helpers.d/getopts b/helpers/getopts similarity index 100% rename from data/helpers.d/getopts rename to helpers/getopts diff --git a/data/helpers.d/hardware b/helpers/hardware similarity index 100% rename from data/helpers.d/hardware rename to helpers/hardware diff --git a/data/helpers.d/logging b/helpers/logging similarity index 100% rename from data/helpers.d/logging rename to helpers/logging diff --git a/data/helpers.d/logrotate b/helpers/logrotate similarity index 100% rename from data/helpers.d/logrotate rename to helpers/logrotate diff --git a/data/helpers.d/multimedia b/helpers/multimedia similarity index 100% rename from data/helpers.d/multimedia rename to helpers/multimedia diff --git a/data/helpers.d/mysql b/helpers/mysql similarity index 100% rename from data/helpers.d/mysql rename to helpers/mysql diff --git a/data/helpers.d/network b/helpers/network similarity index 100% rename from data/helpers.d/network rename to helpers/network diff --git a/data/helpers.d/nginx b/helpers/nginx similarity index 100% rename from data/helpers.d/nginx rename to helpers/nginx diff --git a/data/helpers.d/nodejs b/helpers/nodejs similarity index 100% rename from data/helpers.d/nodejs rename to helpers/nodejs diff --git a/data/helpers.d/permission b/helpers/permission similarity index 100% rename from data/helpers.d/permission rename to helpers/permission diff --git a/data/helpers.d/php b/helpers/php similarity index 100% rename from data/helpers.d/php rename to helpers/php diff --git a/data/helpers.d/postgresql b/helpers/postgresql similarity index 100% rename from data/helpers.d/postgresql rename to helpers/postgresql diff --git a/data/helpers.d/setting b/helpers/setting similarity index 100% rename from data/helpers.d/setting rename to helpers/setting diff --git a/data/helpers.d/string b/helpers/string similarity index 100% rename from data/helpers.d/string rename to helpers/string diff --git a/data/helpers.d/systemd b/helpers/systemd similarity index 100% rename from data/helpers.d/systemd rename to helpers/systemd diff --git a/data/helpers.d/user b/helpers/user similarity index 100% rename from data/helpers.d/user rename to helpers/user diff --git a/data/helpers.d/utils b/helpers/utils similarity index 100% rename from data/helpers.d/utils rename to helpers/utils diff --git a/data/hooks/backup/05-conf_ldap b/hooks/backup/05-conf_ldap similarity index 100% rename from data/hooks/backup/05-conf_ldap rename to hooks/backup/05-conf_ldap diff --git a/data/hooks/backup/17-data_home b/hooks/backup/17-data_home similarity index 100% rename from data/hooks/backup/17-data_home rename to hooks/backup/17-data_home diff --git a/data/hooks/backup/18-data_multimedia b/hooks/backup/18-data_multimedia similarity index 100% rename from data/hooks/backup/18-data_multimedia rename to hooks/backup/18-data_multimedia diff --git a/data/hooks/backup/20-conf_ynh_settings b/hooks/backup/20-conf_ynh_settings similarity index 100% rename from data/hooks/backup/20-conf_ynh_settings rename to hooks/backup/20-conf_ynh_settings diff --git a/data/hooks/backup/21-conf_ynh_certs b/hooks/backup/21-conf_ynh_certs similarity index 100% rename from data/hooks/backup/21-conf_ynh_certs rename to hooks/backup/21-conf_ynh_certs diff --git a/data/hooks/backup/23-data_mail b/hooks/backup/23-data_mail similarity index 100% rename from data/hooks/backup/23-data_mail rename to hooks/backup/23-data_mail diff --git a/data/hooks/backup/27-data_xmpp b/hooks/backup/27-data_xmpp similarity index 100% rename from data/hooks/backup/27-data_xmpp rename to hooks/backup/27-data_xmpp diff --git a/data/hooks/backup/50-conf_manually_modified_files b/hooks/backup/50-conf_manually_modified_files similarity index 100% rename from data/hooks/backup/50-conf_manually_modified_files rename to hooks/backup/50-conf_manually_modified_files diff --git a/data/hooks/conf_regen/01-yunohost b/hooks/conf_regen/01-yunohost similarity index 100% rename from data/hooks/conf_regen/01-yunohost rename to hooks/conf_regen/01-yunohost diff --git a/data/hooks/conf_regen/02-ssl b/hooks/conf_regen/02-ssl similarity index 100% rename from data/hooks/conf_regen/02-ssl rename to hooks/conf_regen/02-ssl diff --git a/data/hooks/conf_regen/03-ssh b/hooks/conf_regen/03-ssh similarity index 100% rename from data/hooks/conf_regen/03-ssh rename to hooks/conf_regen/03-ssh diff --git a/data/hooks/conf_regen/06-slapd b/hooks/conf_regen/06-slapd similarity index 100% rename from data/hooks/conf_regen/06-slapd rename to hooks/conf_regen/06-slapd diff --git a/data/hooks/conf_regen/09-nslcd b/hooks/conf_regen/09-nslcd similarity index 100% rename from data/hooks/conf_regen/09-nslcd rename to hooks/conf_regen/09-nslcd diff --git a/data/hooks/conf_regen/10-apt b/hooks/conf_regen/10-apt similarity index 100% rename from data/hooks/conf_regen/10-apt rename to hooks/conf_regen/10-apt diff --git a/data/hooks/conf_regen/12-metronome b/hooks/conf_regen/12-metronome similarity index 100% rename from data/hooks/conf_regen/12-metronome rename to hooks/conf_regen/12-metronome diff --git a/data/hooks/conf_regen/15-nginx b/hooks/conf_regen/15-nginx similarity index 100% rename from data/hooks/conf_regen/15-nginx rename to hooks/conf_regen/15-nginx diff --git a/data/hooks/conf_regen/19-postfix b/hooks/conf_regen/19-postfix similarity index 100% rename from data/hooks/conf_regen/19-postfix rename to hooks/conf_regen/19-postfix diff --git a/data/hooks/conf_regen/25-dovecot b/hooks/conf_regen/25-dovecot similarity index 100% rename from data/hooks/conf_regen/25-dovecot rename to hooks/conf_regen/25-dovecot diff --git a/data/hooks/conf_regen/31-rspamd b/hooks/conf_regen/31-rspamd similarity index 100% rename from data/hooks/conf_regen/31-rspamd rename to hooks/conf_regen/31-rspamd diff --git a/data/hooks/conf_regen/34-mysql b/hooks/conf_regen/34-mysql similarity index 100% rename from data/hooks/conf_regen/34-mysql rename to hooks/conf_regen/34-mysql diff --git a/data/hooks/conf_regen/35-redis b/hooks/conf_regen/35-redis similarity index 100% rename from data/hooks/conf_regen/35-redis rename to hooks/conf_regen/35-redis diff --git a/data/hooks/conf_regen/37-mdns b/hooks/conf_regen/37-mdns similarity index 100% rename from data/hooks/conf_regen/37-mdns rename to hooks/conf_regen/37-mdns diff --git a/data/hooks/conf_regen/43-dnsmasq b/hooks/conf_regen/43-dnsmasq similarity index 100% rename from data/hooks/conf_regen/43-dnsmasq rename to hooks/conf_regen/43-dnsmasq diff --git a/data/hooks/conf_regen/46-nsswitch b/hooks/conf_regen/46-nsswitch similarity index 100% rename from data/hooks/conf_regen/46-nsswitch rename to hooks/conf_regen/46-nsswitch diff --git a/data/hooks/conf_regen/52-fail2ban b/hooks/conf_regen/52-fail2ban similarity index 100% rename from data/hooks/conf_regen/52-fail2ban rename to hooks/conf_regen/52-fail2ban diff --git a/data/hooks/post_user_create/ynh_multimedia b/hooks/post_user_create/ynh_multimedia similarity index 100% rename from data/hooks/post_user_create/ynh_multimedia rename to hooks/post_user_create/ynh_multimedia diff --git a/data/hooks/post_user_delete/ynh_multimedia b/hooks/post_user_delete/ynh_multimedia similarity index 100% rename from data/hooks/post_user_delete/ynh_multimedia rename to hooks/post_user_delete/ynh_multimedia diff --git a/data/hooks/restore/05-conf_ldap b/hooks/restore/05-conf_ldap similarity index 100% rename from data/hooks/restore/05-conf_ldap rename to hooks/restore/05-conf_ldap diff --git a/data/hooks/restore/17-data_home b/hooks/restore/17-data_home similarity index 100% rename from data/hooks/restore/17-data_home rename to hooks/restore/17-data_home diff --git a/data/hooks/restore/18-data_multimedia b/hooks/restore/18-data_multimedia similarity index 100% rename from data/hooks/restore/18-data_multimedia rename to hooks/restore/18-data_multimedia diff --git a/data/hooks/restore/20-conf_ynh_settings b/hooks/restore/20-conf_ynh_settings similarity index 100% rename from data/hooks/restore/20-conf_ynh_settings rename to hooks/restore/20-conf_ynh_settings diff --git a/data/hooks/restore/21-conf_ynh_certs b/hooks/restore/21-conf_ynh_certs similarity index 100% rename from data/hooks/restore/21-conf_ynh_certs rename to hooks/restore/21-conf_ynh_certs diff --git a/data/hooks/restore/23-data_mail b/hooks/restore/23-data_mail similarity index 100% rename from data/hooks/restore/23-data_mail rename to hooks/restore/23-data_mail diff --git a/data/hooks/restore/27-data_xmpp b/hooks/restore/27-data_xmpp similarity index 100% rename from data/hooks/restore/27-data_xmpp rename to hooks/restore/27-data_xmpp diff --git a/data/hooks/restore/50-conf_manually_modified_files b/hooks/restore/50-conf_manually_modified_files similarity index 100% rename from data/hooks/restore/50-conf_manually_modified_files rename to hooks/restore/50-conf_manually_modified_files diff --git a/data/other/password/100000-most-used.txt.gz b/share/100000-most-used-passwords.txt.gz similarity index 100% rename from data/other/password/100000-most-used.txt.gz rename to share/100000-most-used-passwords.txt.gz diff --git a/data/actionsmap/yunohost.yml b/share/actionsmap.yml similarity index 100% rename from data/actionsmap/yunohost.yml rename to share/actionsmap.yml diff --git a/data/other/config_domain.toml b/share/config_domain.toml similarity index 100% rename from data/other/config_domain.toml rename to share/config_domain.toml diff --git a/data/other/dnsbl_list.yml b/share/dnsbl_list.yml similarity index 100% rename from data/other/dnsbl_list.yml rename to share/dnsbl_list.yml diff --git a/data/other/ffdhe2048.pem b/share/ffdhe2048.pem similarity index 100% rename from data/other/ffdhe2048.pem rename to share/ffdhe2048.pem diff --git a/data/helpers b/share/helpers similarity index 100% rename from data/helpers rename to share/helpers diff --git a/data/other/registrar_list.toml b/share/registrar_list.toml similarity index 100% rename from data/other/registrar_list.toml rename to share/registrar_list.toml diff --git a/src/yunohost/__init__.py b/src/__init__.py similarity index 100% rename from src/yunohost/__init__.py rename to src/__init__.py diff --git a/src/yunohost/app.py b/src/app.py similarity index 100% rename from src/yunohost/app.py rename to src/app.py diff --git a/src/yunohost/app_catalog.py b/src/app_catalog.py similarity index 100% rename from src/yunohost/app_catalog.py rename to src/app_catalog.py diff --git a/src/yunohost/authenticators/ldap_admin.py b/src/authenticators/ldap_admin.py similarity index 100% rename from src/yunohost/authenticators/ldap_admin.py rename to src/authenticators/ldap_admin.py diff --git a/src/yunohost/backup.py b/src/backup.py similarity index 100% rename from src/yunohost/backup.py rename to src/backup.py diff --git a/src/yunohost/certificate.py b/src/certificate.py similarity index 100% rename from src/yunohost/certificate.py rename to src/certificate.py diff --git a/src/yunohost/data_migrations/0021_migrate_to_bullseye.py b/src/data_migrations/0021_migrate_to_bullseye.py similarity index 100% rename from src/yunohost/data_migrations/0021_migrate_to_bullseye.py rename to src/data_migrations/0021_migrate_to_bullseye.py diff --git a/src/yunohost/data_migrations/0022_php73_to_php74_pools.py b/src/data_migrations/0022_php73_to_php74_pools.py similarity index 100% rename from src/yunohost/data_migrations/0022_php73_to_php74_pools.py rename to src/data_migrations/0022_php73_to_php74_pools.py diff --git a/src/yunohost/data_migrations/0023_postgresql_11_to_13.py b/src/data_migrations/0023_postgresql_11_to_13.py similarity index 100% rename from src/yunohost/data_migrations/0023_postgresql_11_to_13.py rename to src/data_migrations/0023_postgresql_11_to_13.py diff --git a/src/yunohost/data_migrations/__init__.py b/src/data_migrations/__init__.py similarity index 100% rename from src/yunohost/data_migrations/__init__.py rename to src/data_migrations/__init__.py diff --git a/src/yunohost/diagnosis.py b/src/diagnosis.py similarity index 100% rename from src/yunohost/diagnosis.py rename to src/diagnosis.py diff --git a/data/hooks/diagnosis/00-basesystem.py b/src/diagnosis/00-basesystem.py similarity index 100% rename from data/hooks/diagnosis/00-basesystem.py rename to src/diagnosis/00-basesystem.py diff --git a/data/hooks/diagnosis/10-ip.py b/src/diagnosis/10-ip.py similarity index 100% rename from data/hooks/diagnosis/10-ip.py rename to src/diagnosis/10-ip.py diff --git a/data/hooks/diagnosis/12-dnsrecords.py b/src/diagnosis/12-dnsrecords.py similarity index 100% rename from data/hooks/diagnosis/12-dnsrecords.py rename to src/diagnosis/12-dnsrecords.py diff --git a/data/hooks/diagnosis/14-ports.py b/src/diagnosis/14-ports.py similarity index 100% rename from data/hooks/diagnosis/14-ports.py rename to src/diagnosis/14-ports.py diff --git a/data/hooks/diagnosis/21-web.py b/src/diagnosis/21-web.py similarity index 100% rename from data/hooks/diagnosis/21-web.py rename to src/diagnosis/21-web.py diff --git a/data/hooks/diagnosis/24-mail.py b/src/diagnosis/24-mail.py similarity index 100% rename from data/hooks/diagnosis/24-mail.py rename to src/diagnosis/24-mail.py diff --git a/data/hooks/diagnosis/30-services.py b/src/diagnosis/30-services.py similarity index 100% rename from data/hooks/diagnosis/30-services.py rename to src/diagnosis/30-services.py diff --git a/data/hooks/diagnosis/50-systemresources.py b/src/diagnosis/50-systemresources.py similarity index 100% rename from data/hooks/diagnosis/50-systemresources.py rename to src/diagnosis/50-systemresources.py diff --git a/data/hooks/diagnosis/70-regenconf.py b/src/diagnosis/70-regenconf.py similarity index 100% rename from data/hooks/diagnosis/70-regenconf.py rename to src/diagnosis/70-regenconf.py diff --git a/data/hooks/diagnosis/80-apps.py b/src/diagnosis/80-apps.py similarity index 100% rename from data/hooks/diagnosis/80-apps.py rename to src/diagnosis/80-apps.py diff --git a/src/yunohost/dns.py b/src/dns.py similarity index 100% rename from src/yunohost/dns.py rename to src/dns.py diff --git a/src/yunohost/domain.py b/src/domain.py similarity index 100% rename from src/yunohost/domain.py rename to src/domain.py diff --git a/src/yunohost/dyndns.py b/src/dyndns.py similarity index 100% rename from src/yunohost/dyndns.py rename to src/dyndns.py diff --git a/src/yunohost/firewall.py b/src/firewall.py similarity index 100% rename from src/yunohost/firewall.py rename to src/firewall.py diff --git a/src/yunohost/hook.py b/src/hook.py similarity index 100% rename from src/yunohost/hook.py rename to src/hook.py diff --git a/src/yunohost/log.py b/src/log.py similarity index 100% rename from src/yunohost/log.py rename to src/log.py diff --git a/src/yunohost/permission.py b/src/permission.py similarity index 100% rename from src/yunohost/permission.py rename to src/permission.py diff --git a/src/yunohost/regenconf.py b/src/regenconf.py similarity index 100% rename from src/yunohost/regenconf.py rename to src/regenconf.py diff --git a/src/yunohost/service.py b/src/service.py similarity index 100% rename from src/yunohost/service.py rename to src/service.py diff --git a/src/yunohost/settings.py b/src/settings.py similarity index 100% rename from src/yunohost/settings.py rename to src/settings.py diff --git a/src/yunohost/ssh.py b/src/ssh.py similarity index 100% rename from src/yunohost/ssh.py rename to src/ssh.py diff --git a/src/yunohost/tests/__init__.py b/src/tests/__init__.py similarity index 100% rename from src/yunohost/tests/__init__.py rename to src/tests/__init__.py diff --git a/src/yunohost/tests/conftest.py b/src/tests/conftest.py similarity index 100% rename from src/yunohost/tests/conftest.py rename to src/tests/conftest.py diff --git a/src/yunohost/tests/test_app_catalog.py b/src/tests/test_app_catalog.py similarity index 100% rename from src/yunohost/tests/test_app_catalog.py rename to src/tests/test_app_catalog.py diff --git a/src/yunohost/tests/test_app_config.py b/src/tests/test_app_config.py similarity index 100% rename from src/yunohost/tests/test_app_config.py rename to src/tests/test_app_config.py diff --git a/src/yunohost/tests/test_apps.py b/src/tests/test_apps.py similarity index 100% rename from src/yunohost/tests/test_apps.py rename to src/tests/test_apps.py diff --git a/src/yunohost/tests/test_appurl.py b/src/tests/test_appurl.py similarity index 100% rename from src/yunohost/tests/test_appurl.py rename to src/tests/test_appurl.py diff --git a/src/yunohost/tests/test_backuprestore.py b/src/tests/test_backuprestore.py similarity index 100% rename from src/yunohost/tests/test_backuprestore.py rename to src/tests/test_backuprestore.py diff --git a/src/yunohost/tests/test_changeurl.py b/src/tests/test_changeurl.py similarity index 100% rename from src/yunohost/tests/test_changeurl.py rename to src/tests/test_changeurl.py diff --git a/src/yunohost/tests/test_dns.py b/src/tests/test_dns.py similarity index 100% rename from src/yunohost/tests/test_dns.py rename to src/tests/test_dns.py diff --git a/src/yunohost/tests/test_domains.py b/src/tests/test_domains.py similarity index 100% rename from src/yunohost/tests/test_domains.py rename to src/tests/test_domains.py diff --git a/src/yunohost/tests/test_ldapauth.py b/src/tests/test_ldapauth.py similarity index 100% rename from src/yunohost/tests/test_ldapauth.py rename to src/tests/test_ldapauth.py diff --git a/src/yunohost/tests/test_permission.py b/src/tests/test_permission.py similarity index 100% rename from src/yunohost/tests/test_permission.py rename to src/tests/test_permission.py diff --git a/src/yunohost/tests/test_questions.py b/src/tests/test_questions.py similarity index 100% rename from src/yunohost/tests/test_questions.py rename to src/tests/test_questions.py diff --git a/src/yunohost/tests/test_regenconf.py b/src/tests/test_regenconf.py similarity index 100% rename from src/yunohost/tests/test_regenconf.py rename to src/tests/test_regenconf.py diff --git a/src/yunohost/tests/test_service.py b/src/tests/test_service.py similarity index 100% rename from src/yunohost/tests/test_service.py rename to src/tests/test_service.py diff --git a/src/yunohost/tests/test_settings.py b/src/tests/test_settings.py similarity index 100% rename from src/yunohost/tests/test_settings.py rename to src/tests/test_settings.py diff --git a/src/yunohost/tests/test_user-group.py b/src/tests/test_user-group.py similarity index 100% rename from src/yunohost/tests/test_user-group.py rename to src/tests/test_user-group.py diff --git a/src/yunohost/tools.py b/src/tools.py similarity index 100% rename from src/yunohost/tools.py rename to src/tools.py diff --git a/src/yunohost/user.py b/src/user.py similarity index 100% rename from src/yunohost/user.py rename to src/user.py diff --git a/src/yunohost/utils/__init__.py b/src/utils/__init__.py similarity index 100% rename from src/yunohost/utils/__init__.py rename to src/utils/__init__.py diff --git a/src/yunohost/utils/config.py b/src/utils/config.py similarity index 100% rename from src/yunohost/utils/config.py rename to src/utils/config.py diff --git a/src/yunohost/utils/dns.py b/src/utils/dns.py similarity index 100% rename from src/yunohost/utils/dns.py rename to src/utils/dns.py diff --git a/src/yunohost/utils/error.py b/src/utils/error.py similarity index 100% rename from src/yunohost/utils/error.py rename to src/utils/error.py diff --git a/src/yunohost/utils/filesystem.py b/src/utils/filesystem.py similarity index 100% rename from src/yunohost/utils/filesystem.py rename to src/utils/filesystem.py diff --git a/src/yunohost/utils/i18n.py b/src/utils/i18n.py similarity index 100% rename from src/yunohost/utils/i18n.py rename to src/utils/i18n.py diff --git a/src/yunohost/utils/ldap.py b/src/utils/ldap.py similarity index 100% rename from src/yunohost/utils/ldap.py rename to src/utils/ldap.py diff --git a/src/yunohost/utils/legacy.py b/src/utils/legacy.py similarity index 100% rename from src/yunohost/utils/legacy.py rename to src/utils/legacy.py diff --git a/src/yunohost/utils/network.py b/src/utils/network.py similarity index 100% rename from src/yunohost/utils/network.py rename to src/utils/network.py diff --git a/src/yunohost/utils/packages.py b/src/utils/packages.py similarity index 100% rename from src/yunohost/utils/packages.py rename to src/utils/packages.py diff --git a/src/yunohost/utils/password.py b/src/utils/password.py similarity index 100% rename from src/yunohost/utils/password.py rename to src/utils/password.py diff --git a/src/yunohost/utils/yunopaste.py b/src/utils/yunopaste.py similarity index 100% rename from src/yunohost/utils/yunopaste.py rename to src/utils/yunopaste.py diff --git a/src/yunohost/vendor/__init__.py b/src/vendor/__init__.py similarity index 100% rename from src/yunohost/vendor/__init__.py rename to src/vendor/__init__.py diff --git a/src/yunohost/vendor/acme_tiny/__init__.py b/src/vendor/acme_tiny/__init__.py similarity index 100% rename from src/yunohost/vendor/acme_tiny/__init__.py rename to src/vendor/acme_tiny/__init__.py diff --git a/src/yunohost/vendor/acme_tiny/acme_tiny.py b/src/vendor/acme_tiny/acme_tiny.py similarity index 100% rename from src/yunohost/vendor/acme_tiny/acme_tiny.py rename to src/vendor/acme_tiny/acme_tiny.py diff --git a/src/yunohost/vendor/spectre-meltdown-checker/Dockerfile b/src/vendor/spectre-meltdown-checker/Dockerfile similarity index 100% rename from src/yunohost/vendor/spectre-meltdown-checker/Dockerfile rename to src/vendor/spectre-meltdown-checker/Dockerfile diff --git a/src/yunohost/vendor/spectre-meltdown-checker/LICENSE b/src/vendor/spectre-meltdown-checker/LICENSE similarity index 100% rename from src/yunohost/vendor/spectre-meltdown-checker/LICENSE rename to src/vendor/spectre-meltdown-checker/LICENSE diff --git a/src/yunohost/vendor/spectre-meltdown-checker/README.md b/src/vendor/spectre-meltdown-checker/README.md similarity index 100% rename from src/yunohost/vendor/spectre-meltdown-checker/README.md rename to src/vendor/spectre-meltdown-checker/README.md diff --git a/src/yunohost/vendor/spectre-meltdown-checker/docker-compose.yml b/src/vendor/spectre-meltdown-checker/docker-compose.yml similarity index 100% rename from src/yunohost/vendor/spectre-meltdown-checker/docker-compose.yml rename to src/vendor/spectre-meltdown-checker/docker-compose.yml diff --git a/src/yunohost/vendor/spectre-meltdown-checker/spectre-meltdown-checker.sh b/src/vendor/spectre-meltdown-checker/spectre-meltdown-checker.sh similarity index 100% rename from src/yunohost/vendor/spectre-meltdown-checker/spectre-meltdown-checker.sh rename to src/vendor/spectre-meltdown-checker/spectre-meltdown-checker.sh From 05f25fa85fa8495f97a81927991c1af9de6b1723 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 10 Nov 2021 18:25:37 +0100 Subject: [PATCH 083/146] Propagate dir structure change to scripts etc --- .coveragerc | 2 +- .gitignore | 4 +- .gitlab/ci/test.gitlab-ci.yml | 76 ++++++++++++++++----------------- conf/dovecot/dovecot.conf | 2 +- conf/nginx/security.conf.inc | 2 +- conf/postfix/main.cf | 2 +- debian/install | 9 ++-- debian/rules | 2 +- doc/generate_bash_completion.py | 5 +-- doc/generate_helper_doc.py | 2 +- doc/generate_manpages.py | 2 +- doc/helper_doc_template.md | 2 +- hooks/conf_regen/01-yunohost | 4 +- hooks/conf_regen/02-ssl | 8 ++-- hooks/conf_regen/03-ssh | 2 +- hooks/conf_regen/06-slapd | 6 +-- hooks/conf_regen/09-nslcd | 2 +- hooks/conf_regen/12-metronome | 2 +- hooks/conf_regen/15-nginx | 4 +- hooks/conf_regen/19-postfix | 2 +- hooks/conf_regen/25-dovecot | 2 +- hooks/conf_regen/31-rspamd | 2 +- hooks/conf_regen/34-mysql | 2 +- hooks/conf_regen/37-mdns | 2 +- hooks/conf_regen/43-dnsmasq | 2 +- hooks/conf_regen/46-nsswitch | 2 +- hooks/conf_regen/52-fail2ban | 2 +- src/diagnosis/10-ip.py | 2 +- src/diagnosis/24-mail.py | 2 +- src/dns.py | 2 +- src/domain.py | 2 +- src/service.py | 2 +- src/utils/config.py | 2 +- src/utils/password.py | 2 +- tests/add_missing_keys.py | 22 +++++----- tests/test_actionmap.py | 2 +- tests/test_i18n_keys.py | 26 +++++------ tox.ini | 6 +-- 38 files changed, 113 insertions(+), 111 deletions(-) diff --git a/.coveragerc b/.coveragerc index ed13dfa68..fe22c8381 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,2 +1,2 @@ [report] -omit=src/yunohost/tests/*,src/yunohost/vendor/*,/usr/lib/moulinette/yunohost/* +omit=src/tests/*,src/vendor/*,/usr/lib/moulinette/yunohost/* diff --git a/.gitignore b/.gitignore index 75f4ae6ea..eae46b4c5 100644 --- a/.gitignore +++ b/.gitignore @@ -31,7 +31,7 @@ pip-log.txt .mr.developer.cfg # moulinette lib -src/yunohost/locales +src/locales # Test -src/yunohost/tests/apps +src/tests/apps diff --git a/.gitlab/ci/test.gitlab-ci.yml b/.gitlab/ci/test.gitlab-ci.yml index 1aad46fbe..49c07e4b6 100644 --- a/.gitlab/ci/test.gitlab-ci.yml +++ b/.gitlab/ci/test.gitlab-ci.yml @@ -11,7 +11,7 @@ - *install_debs cache: paths: - - src/yunohost/tests/apps + - src/tests/apps key: "$CI_JOB_STAGE-$CI_COMMIT_REF_SLUG" needs: - job: build-yunohost @@ -36,7 +36,7 @@ full-tests: - *install_debs - yunohost tools postinstall -d domain.tld -p the_password --ignore-dyndns --force-diskspace script: - - python3 -m pytest --cov=yunohost tests/ src/yunohost/tests/ data/hooks/diagnosis/ --junitxml=report.xml + - python3 -m pytest --cov=yunohost tests/ src/tests/ src/diagnosis/ --junitxml=report.xml - cd tests - bash test_helpers.sh needs: @@ -57,8 +57,8 @@ test-i18n-keys: only: changes: - locales/en.json - - src/yunohost/*.py - - data/hooks/diagnosis/*.py + - src/*.py + - src/diagnosis/*.py test-translation-format-consistency: extends: .test-stage @@ -74,7 +74,7 @@ test-actionmap: - python3 -m pytest tests/test_actionmap.py only: changes: - - data/actionsmap/*.yml + - share/actionsmap.yml test-helpers: extends: .test-stage @@ -83,126 +83,126 @@ test-helpers: - bash test_helpers.sh only: changes: - - data/helpers.d/* + - helpers/* test-domains: extends: .test-stage script: - - python3 -m pytest src/yunohost/tests/test_domains.py + - python3 -m pytest src/tests/test_domains.py only: changes: - - src/yunohost/domain.py + - src/domain.py test-dns: extends: .test-stage script: - - python3 -m pytest src/yunohost/tests/test_dns.py + - python3 -m pytest src/tests/test_dns.py only: changes: - - src/yunohost/dns.py - - src/yunohost/utils/dns.py + - src/dns.py + - src/utils/dns.py test-apps: extends: .test-stage script: - - python3 -m pytest src/yunohost/tests/test_apps.py + - python3 -m pytest src/tests/test_apps.py only: changes: - - src/yunohost/app.py + - src/app.py test-appscatalog: extends: .test-stage script: - - python3 -m pytest src/yunohost/tests/test_app_catalog.py + - python3 -m pytest src/tests/test_app_catalog.py only: changes: - - src/yunohost/app_calalog.py + - src/app_calalog.py test-appurl: extends: .test-stage script: - - python3 -m pytest src/yunohost/tests/test_appurl.py + - python3 -m pytest src/tests/test_appurl.py only: changes: - - src/yunohost/app.py + - src/app.py test-questions: extends: .test-stage script: - - python3 -m pytest src/yunohost/tests/test_questions.py + - python3 -m pytest src/tests/test_questions.py only: changes: - - src/yunohost/utils/config.py + - src/utils/config.py test-app-config: extends: .test-stage script: - - python3 -m pytest src/yunohost/tests/test_app_config.py + - python3 -m pytest src/tests/test_app_config.py only: changes: - - src/yunohost/app.py - - src/yunohost/utils/config.py + - src/app.py + - src/utils/config.py test-changeurl: extends: .test-stage script: - - python3 -m pytest src/yunohost/tests/test_changeurl.py + - python3 -m pytest src/tests/test_changeurl.py only: changes: - - src/yunohost/app.py + - src/app.py test-backuprestore: extends: .test-stage script: - - python3 -m pytest src/yunohost/tests/test_backuprestore.py + - python3 -m pytest src/tests/test_backuprestore.py only: changes: - - src/yunohost/backup.py + - src/backup.py test-permission: extends: .test-stage script: - - python3 -m pytest src/yunohost/tests/test_permission.py + - python3 -m pytest src/tests/test_permission.py only: changes: - - src/yunohost/permission.py + - src/permission.py test-settings: extends: .test-stage script: - - python3 -m pytest src/yunohost/tests/test_settings.py + - python3 -m pytest src/tests/test_settings.py only: changes: - - src/yunohost/settings.py + - src/settings.py test-user-group: extends: .test-stage script: - - python3 -m pytest src/yunohost/tests/test_user-group.py + - python3 -m pytest src/tests/test_user-group.py only: changes: - - src/yunohost/user.py + - src/user.py test-regenconf: extends: .test-stage script: - - python3 -m pytest src/yunohost/tests/test_regenconf.py + - python3 -m pytest src/tests/test_regenconf.py only: changes: - - src/yunohost/regenconf.py + - src/regenconf.py test-service: extends: .test-stage script: - - python3 -m pytest src/yunohost/tests/test_service.py + - python3 -m pytest src/tests/test_service.py only: changes: - - src/yunohost/service.py + - src/service.py test-ldapauth: extends: .test-stage script: - - python3 -m pytest src/yunohost/tests/test_ldapauth.py + - python3 -m pytest src/tests/test_ldapauth.py only: changes: - - src/yunohost/authenticators/*.py + - src/authenticators/*.py diff --git a/conf/dovecot/dovecot.conf b/conf/dovecot/dovecot.conf index c7e937979..273bd45dc 100644 --- a/conf/dovecot/dovecot.conf +++ b/conf/dovecot/dovecot.conf @@ -23,7 +23,7 @@ ssl_cert = /path/to/dhparam -ssl_dh = /path/to/dhparam.pem # not actually 1024 bits, this applies to all DHE >= 1024 bits -smtpd_tls_dh1024_param_file = /usr/share/yunohost/other/ffdhe2048.pem +smtpd_tls_dh1024_param_file = /usr/share/yunohost/ffdhe2048.pem tls_medium_cipherlist = ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384 {% else %} diff --git a/debian/install b/debian/install index 4680bc6be..55c535ae8 100644 --- a/debian/install +++ b/debian/install @@ -1,7 +1,10 @@ bin/* /usr/bin/ -data/* /usr/share/yunohost/ -data/bash-completion.d/yunohost /etc/bash_completion.d/ +share/* /usr/share/yunohost/ +hooks/* /usr/share/yunohost/hooks/ +helpers/* /usr/share/yunohost/helpers.d/ +conf/* /usr/share/yunohost/conf/ doc/yunohost.8.gz /usr/share/man/man8/ +doc/bash-completion.sh /etc/bash_completion.d/yunohost lib/metronome/modules/* /usr/lib/metronome/modules/ locales/* /usr/lib/moulinette/yunohost/locales/ -src/yunohost /usr/lib/moulinette +src/ /usr/lib/moulinette/yunohost diff --git a/debian/rules b/debian/rules index 341ba2b01..d0cbd5138 100755 --- a/debian/rules +++ b/debian/rules @@ -6,7 +6,7 @@ override_dh_auto_build: # Generate bash completion file - python3 data/actionsmap/yunohost_completion.py + python3 doc/generate_bash_completion.py python3 doc/generate_manpages.py --gzip --output doc/yunohost.8.gz override_dh_installinit: diff --git a/doc/generate_bash_completion.py b/doc/generate_bash_completion.py index c801e2f3c..72a524210 100644 --- a/doc/generate_bash_completion.py +++ b/doc/generate_bash_completion.py @@ -12,9 +12,8 @@ import os import yaml THIS_SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) -ACTIONSMAP_FILE = THIS_SCRIPT_DIR + "/yunohost.yml" -os.system(f"mkdir {THIS_SCRIPT_DIR}/../bash-completion.d") -BASH_COMPLETION_FILE = THIS_SCRIPT_DIR + "/../bash-completion.d/yunohost" +ACTIONSMAP_FILE = THIS_SCRIPT_DIR + "/../share/actionsmap.yml" +BASH_COMPLETION_FILE = THIS_SCRIPT_DIR + "/bash-completion.sh" def get_dict_actions(OPTION_SUBTREE, category): diff --git a/doc/generate_helper_doc.py b/doc/generate_helper_doc.py index f2d5bf444..189a445d4 100644 --- a/doc/generate_helper_doc.py +++ b/doc/generate_helper_doc.py @@ -217,7 +217,7 @@ def malformed_error(line_number): def main(): - helper_files = sorted(glob.glob("../data/helpers.d/*")) + helper_files = sorted(glob.glob("../helpers/*")) helpers = [] for helper_file in helper_files: diff --git a/doc/generate_manpages.py b/doc/generate_manpages.py index fa042fb17..bdb1fcaee 100644 --- a/doc/generate_manpages.py +++ b/doc/generate_manpages.py @@ -22,7 +22,7 @@ template = Template(open(os.path.join(base_path, "manpage.template")).read()) THIS_SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) -ACTIONSMAP_FILE = os.path.join(THIS_SCRIPT_DIR, "../data/actionsmap/yunohost.yml") +ACTIONSMAP_FILE = os.path.join(THIS_SCRIPT_DIR, "../share/actionsmap.yml") def ordered_yaml_load(stream): diff --git a/doc/helper_doc_template.md b/doc/helper_doc_template.md index d41c0b6e9..ac5d455fb 100644 --- a/doc/helper_doc_template.md +++ b/doc/helper_doc_template.md @@ -52,7 +52,7 @@ Doc auto-generated by [this script](https://github.com/YunoHost/yunohost/blob/{{ {{ h.details }} {%- endif %} -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/{{ current_commit }}/data/helpers.d/{{ category }}#L{{ h.line + 1 }}) +[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/{{ current_commit }}/helpers/{{ category }}#L{{ h.line + 1 }}) [/details] ---------------- {% endfor %} diff --git a/hooks/conf_regen/01-yunohost b/hooks/conf_regen/01-yunohost index 963bd49d3..027be8020 100755 --- a/hooks/conf_regen/01-yunohost +++ b/hooks/conf_regen/01-yunohost @@ -8,7 +8,7 @@ do_init_regen() { exit 1 fi - cd /usr/share/yunohost/templates/yunohost + cd /usr/share/yunohost/conf/yunohost [[ -d /etc/yunohost ]] || mkdir -p /etc/yunohost @@ -71,7 +71,7 @@ do_init_regen() { do_pre_regen() { pending_dir=$1 - cd /usr/share/yunohost/templates/yunohost + cd /usr/share/yunohost/conf/yunohost mkdir -p $pending_dir/etc/systemd/system mkdir -p $pending_dir/etc/cron.d/ diff --git a/hooks/conf_regen/02-ssl b/hooks/conf_regen/02-ssl index 03478552c..f27a23cf8 100755 --- a/hooks/conf_regen/02-ssl +++ b/hooks/conf_regen/02-ssl @@ -6,7 +6,7 @@ ssl_dir="/usr/share/yunohost/yunohost-config/ssl/yunoCA" ynh_ca="/etc/yunohost/certs/yunohost.org/ca.pem" ynh_crt="/etc/yunohost/certs/yunohost.org/crt.pem" ynh_key="/etc/yunohost/certs/yunohost.org/key.pem" -openssl_conf="/usr/share/yunohost/templates/ssl/openssl.cnf" +openssl_conf="/usr/share/yunohost/conf/ssl/openssl.cnf" regen_local_ca() { @@ -26,7 +26,7 @@ regen_local_ca() { RANDFILE=.rnd openssl rand -hex 19 >serial rm -f index.txt touch index.txt - cp /usr/share/yunohost/templates/ssl/openssl.cnf openssl.ca.cnf + cp /usr/share/yunohost/conf/ssl/openssl.cnf openssl.ca.cnf sed -i "s/yunohost.org/${domain}/g" openssl.ca.cnf openssl req -x509 \ -new \ @@ -57,7 +57,7 @@ do_init_regen() { # Make sure this conf exists mkdir -p ${ssl_dir} - cp /usr/share/yunohost/templates/ssl/openssl.cnf ${ssl_dir}/openssl.ca.cnf + cp /usr/share/yunohost/conf/ssl/openssl.cnf ${ssl_dir}/openssl.ca.cnf # create default certificates if [[ ! -f "$ynh_ca" ]]; then @@ -99,7 +99,7 @@ do_init_regen() { do_pre_regen() { pending_dir=$1 - cd /usr/share/yunohost/templates/ssl + cd /usr/share/yunohost/conf/ssl install -D -m 644 openssl.cnf "${pending_dir}/${ssl_dir}/openssl.cnf" } diff --git a/hooks/conf_regen/03-ssh b/hooks/conf_regen/03-ssh index dd1589204..0c700c01f 100755 --- a/hooks/conf_regen/03-ssh +++ b/hooks/conf_regen/03-ssh @@ -7,7 +7,7 @@ set -e do_pre_regen() { pending_dir=$1 - cd /usr/share/yunohost/templates/ssh + cd /usr/share/yunohost/conf/ssh # do not listen to IPv6 if unavailable [[ -f /proc/net/if_inet6 ]] && ipv6_enabled=true || ipv6_enabled=false diff --git a/hooks/conf_regen/06-slapd b/hooks/conf_regen/06-slapd index 0c52e4998..616b383ec 100755 --- a/hooks/conf_regen/06-slapd +++ b/hooks/conf_regen/06-slapd @@ -4,8 +4,8 @@ set -e tmp_backup_dir_file="/root/slapd-backup-dir.txt" -config="/usr/share/yunohost/templates/slapd/config.ldif" -db_init="/usr/share/yunohost/templates/slapd/db_init.ldif" +config="/usr/share/yunohost/conf/slapd/config.ldif" +db_init="/usr/share/yunohost/conf/slapd/db_init.ldif" do_init_regen() { if [[ $EUID -ne 0 ]]; then @@ -109,7 +109,7 @@ do_pre_regen() { schema_dir="${ldap_dir}/schema" mkdir -p "$ldap_dir" "$schema_dir" - cd /usr/share/yunohost/templates/slapd + cd /usr/share/yunohost/conf/slapd # copy configuration files cp -a ldap.conf "$ldap_dir" diff --git a/hooks/conf_regen/09-nslcd b/hooks/conf_regen/09-nslcd index ff1c05433..9d5e5e538 100755 --- a/hooks/conf_regen/09-nslcd +++ b/hooks/conf_regen/09-nslcd @@ -10,7 +10,7 @@ do_init_regen() { do_pre_regen() { pending_dir=$1 - cd /usr/share/yunohost/templates/nslcd + cd /usr/share/yunohost/conf/nslcd install -D -m 644 nslcd.conf "${pending_dir}/etc/nslcd.conf" } diff --git a/hooks/conf_regen/12-metronome b/hooks/conf_regen/12-metronome index 5dfa7b5dc..4802b750e 100755 --- a/hooks/conf_regen/12-metronome +++ b/hooks/conf_regen/12-metronome @@ -5,7 +5,7 @@ set -e do_pre_regen() { pending_dir=$1 - cd /usr/share/yunohost/templates/metronome + cd /usr/share/yunohost/conf/metronome # create directories for pending conf metronome_dir="${pending_dir}/etc/metronome" diff --git a/hooks/conf_regen/15-nginx b/hooks/conf_regen/15-nginx index b585e3cb5..c1d943681 100755 --- a/hooks/conf_regen/15-nginx +++ b/hooks/conf_regen/15-nginx @@ -10,7 +10,7 @@ do_init_regen() { exit 1 fi - cd /usr/share/yunohost/templates/nginx + cd /usr/share/yunohost/conf/nginx nginx_dir="/etc/nginx" nginx_conf_dir="${nginx_dir}/conf.d" @@ -47,7 +47,7 @@ do_init_regen() { do_pre_regen() { pending_dir=$1 - cd /usr/share/yunohost/templates/nginx + cd /usr/share/yunohost/conf/nginx nginx_dir="${pending_dir}/etc/nginx" nginx_conf_dir="${nginx_dir}/conf.d" diff --git a/hooks/conf_regen/19-postfix b/hooks/conf_regen/19-postfix index 7865cd312..4a7325c41 100755 --- a/hooks/conf_regen/19-postfix +++ b/hooks/conf_regen/19-postfix @@ -7,7 +7,7 @@ set -e do_pre_regen() { pending_dir=$1 - cd /usr/share/yunohost/templates/postfix + cd /usr/share/yunohost/conf/postfix postfix_dir="${pending_dir}/etc/postfix" mkdir -p "$postfix_dir" diff --git a/hooks/conf_regen/25-dovecot b/hooks/conf_regen/25-dovecot index e95816604..9a51d0363 100755 --- a/hooks/conf_regen/25-dovecot +++ b/hooks/conf_regen/25-dovecot @@ -7,7 +7,7 @@ set -e do_pre_regen() { pending_dir=$1 - cd /usr/share/yunohost/templates/dovecot + cd /usr/share/yunohost/conf/dovecot dovecot_dir="${pending_dir}/etc/dovecot" mkdir -p "${dovecot_dir}/global_script" diff --git a/hooks/conf_regen/31-rspamd b/hooks/conf_regen/31-rspamd index 72a35fdcc..536aec7c2 100755 --- a/hooks/conf_regen/31-rspamd +++ b/hooks/conf_regen/31-rspamd @@ -5,7 +5,7 @@ set -e do_pre_regen() { pending_dir=$1 - cd /usr/share/yunohost/templates/rspamd + cd /usr/share/yunohost/conf/rspamd install -D -m 644 metrics.local.conf \ "${pending_dir}/etc/rspamd/local.d/metrics.conf" diff --git a/hooks/conf_regen/34-mysql b/hooks/conf_regen/34-mysql index 13730e0bb..d7ddf1a90 100755 --- a/hooks/conf_regen/34-mysql +++ b/hooks/conf_regen/34-mysql @@ -6,7 +6,7 @@ set -e do_pre_regen() { pending_dir=$1 - cd /usr/share/yunohost/templates/mysql + cd /usr/share/yunohost/conf/mysql # Nothing to do } diff --git a/hooks/conf_regen/37-mdns b/hooks/conf_regen/37-mdns index faa581efa..ff674c391 100755 --- a/hooks/conf_regen/37-mdns +++ b/hooks/conf_regen/37-mdns @@ -29,7 +29,7 @@ do_init_regen() { do_pre_regen() { pending_dir="$1" - cd /usr/share/yunohost/templates/mdns + cd /usr/share/yunohost/conf/mdns mkdir -p ${pending_dir}/etc/systemd/system/ cp yunomdns.service ${pending_dir}/etc/systemd/system/ diff --git a/hooks/conf_regen/43-dnsmasq b/hooks/conf_regen/43-dnsmasq index 13c442158..406762ecb 100755 --- a/hooks/conf_regen/43-dnsmasq +++ b/hooks/conf_regen/43-dnsmasq @@ -6,7 +6,7 @@ set -e do_pre_regen() { pending_dir=$1 - cd /usr/share/yunohost/templates/dnsmasq + cd /usr/share/yunohost/conf/dnsmasq # create directory for pending conf dnsmasq_dir="${pending_dir}/etc/dnsmasq.d" diff --git a/hooks/conf_regen/46-nsswitch b/hooks/conf_regen/46-nsswitch index 2c984a905..cc34d0277 100755 --- a/hooks/conf_regen/46-nsswitch +++ b/hooks/conf_regen/46-nsswitch @@ -10,7 +10,7 @@ do_init_regen() { do_pre_regen() { pending_dir=$1 - cd /usr/share/yunohost/templates/nsswitch + cd /usr/share/yunohost/conf/nsswitch install -D -m 644 nsswitch.conf "${pending_dir}/etc/nsswitch.conf" } diff --git a/hooks/conf_regen/52-fail2ban b/hooks/conf_regen/52-fail2ban index 6cbebbfb1..8129e977d 100755 --- a/hooks/conf_regen/52-fail2ban +++ b/hooks/conf_regen/52-fail2ban @@ -7,7 +7,7 @@ set -e do_pre_regen() { pending_dir=$1 - cd /usr/share/yunohost/templates/fail2ban + cd /usr/share/yunohost/conf/fail2ban fail2ban_dir="${pending_dir}/etc/fail2ban" mkdir -p "${fail2ban_dir}/filter.d" diff --git a/src/diagnosis/10-ip.py b/src/diagnosis/10-ip.py index 408019668..bc00fe25c 100644 --- a/src/diagnosis/10-ip.py +++ b/src/diagnosis/10-ip.py @@ -152,7 +152,7 @@ class IPDiagnoser(Diagnoser): # We use the resolver file as a list of well-known, trustable (ie not google ;)) IPs that we can ping resolver_file = ( - "/usr/share/yunohost/templates/dnsmasq/plain/resolv.dnsmasq.conf" + "/usr/share/yunohost/conf/dnsmasq/plain/resolv.dnsmasq.conf" ) resolvers = [ r.split(" ")[1] diff --git a/src/diagnosis/24-mail.py b/src/diagnosis/24-mail.py index c5af4bbc6..f29b2786d 100644 --- a/src/diagnosis/24-mail.py +++ b/src/diagnosis/24-mail.py @@ -14,7 +14,7 @@ from yunohost.domain import _get_maindomain, domain_list from yunohost.settings import settings_get from yunohost.utils.dns import dig -DEFAULT_DNS_BLACKLIST = "/usr/share/yunohost/other/dnsbl_list.yml" +DEFAULT_DNS_BLACKLIST = "/usr/share/yunohost/dnsbl_list.yml" class MailDiagnoser(Diagnoser): diff --git a/src/dns.py b/src/dns.py index 534ade918..cad0ff2f5 100644 --- a/src/dns.py +++ b/src/dns.py @@ -50,7 +50,7 @@ from yunohost.hook import hook_callback logger = getActionLogger("yunohost.domain") -DOMAIN_REGISTRAR_LIST_PATH = "/usr/share/yunohost/other/registrar_list.toml" +DOMAIN_REGISTRAR_LIST_PATH = "/usr/share/yunohost/registrar_list.toml" def domain_dns_suggest(domain): diff --git a/src/domain.py b/src/domain.py index 0bd84ea82..3c244f9cf 100644 --- a/src/domain.py +++ b/src/domain.py @@ -44,7 +44,7 @@ from yunohost.log import is_unit_operation logger = getActionLogger("yunohost.domain") -DOMAIN_CONFIG_PATH = "/usr/share/yunohost/other/config_domain.toml" +DOMAIN_CONFIG_PATH = "/usr/share/yunohost/config_domain.toml" DOMAIN_SETTINGS_DIR = "/etc/yunohost/domains" # Lazy dev caching to avoid re-query ldap every time we need the domain list diff --git a/src/service.py b/src/service.py index 73534e2e3..527ca5813 100644 --- a/src/service.py +++ b/src/service.py @@ -48,7 +48,7 @@ from moulinette.utils.filesystem import ( MOULINETTE_LOCK = "/var/run/moulinette_yunohost.lock" SERVICES_CONF = "/etc/yunohost/services.yml" -SERVICES_CONF_BASE = "/usr/share/yunohost/templates/yunohost/services.yml" +SERVICES_CONF_BASE = "/usr/share/yunohost/conf/yunohost/services.yml" logger = getActionLogger("yunohost.service") diff --git a/src/utils/config.py b/src/utils/config.py index 5d1d1f9d2..352e25be6 100644 --- a/src/utils/config.py +++ b/src/utils/config.py @@ -192,7 +192,7 @@ def evaluate_simple_js_expression(expr, context={}): class ConfigPanel: entity_type = "config" save_path_tpl: Union[str, None] = None - config_path_tpl = "/usr/share/yunohost/other/config_{entity_type}.toml" + config_path_tpl = "/usr/share/yunohost/config_{entity_type}.toml" save_mode = "full" @classmethod diff --git a/src/utils/password.py b/src/utils/password.py index 188850183..04a1ed272 100644 --- a/src/utils/password.py +++ b/src/utils/password.py @@ -36,7 +36,7 @@ SMALL_PWD_LIST = [ "rpi", ] -MOST_USED_PASSWORDS = "/usr/share/yunohost/other/password/100000-most-used.txt" +MOST_USED_PASSWORDS = "/usr/share/yunohost/password/100000-most-used-passwords.txt" # Length, digits, lowers, uppers, others STRENGTH_LEVELS = [ diff --git a/tests/add_missing_keys.py b/tests/add_missing_keys.py index 30c6c6640..1bf335418 100644 --- a/tests/add_missing_keys.py +++ b/tests/add_missing_keys.py @@ -24,11 +24,11 @@ def find_expected_string_keys(): p3 = re.compile(r"YunohostValidationError\(\n*\s*[\'\"](\w+)[\'\"]") p4 = re.compile(r"# i18n: [\'\"]?(\w+)[\'\"]?") - python_files = glob.glob("src/yunohost/*.py") - python_files.extend(glob.glob("src/yunohost/utils/*.py")) - python_files.extend(glob.glob("src/yunohost/data_migrations/*.py")) - python_files.extend(glob.glob("src/yunohost/authenticators/*.py")) - python_files.extend(glob.glob("data/hooks/diagnosis/*.py")) + python_files = glob.glob("src/*.py") + python_files.extend(glob.glob("src/utils/*.py")) + python_files.extend(glob.glob("src/data_migrations/*.py")) + python_files.extend(glob.glob("src/authenticators/*.py")) + python_files.extend(glob.glob("src/diagnosis/*.py")) python_files.append("bin/yunohost") for python_file in python_files: @@ -51,7 +51,7 @@ def find_expected_string_keys(): # For each diagnosis, try to find strings like "diagnosis_stuff_foo" (c.f. diagnosis summaries) # Also we expect to have "diagnosis_description_" for each diagnosis p3 = re.compile(r"[\"\'](diagnosis_[a-z]+_\w+)[\"\']") - for python_file in glob.glob("data/hooks/diagnosis/*.py"): + for python_file in glob.glob("src/diagnosis/*.py"): content = open(python_file).read() for m in p3.findall(content): if m.endswith("_"): @@ -63,14 +63,14 @@ def find_expected_string_keys(): ] # For each migration, expect to find "migration_description_" - for path in glob.glob("src/yunohost/data_migrations/*.py"): + for path in glob.glob("src/data_migrations/*.py"): if "__init__" in path: continue yield "migration_description_" + os.path.basename(path)[:-3] # For each default service, expect to find "service_description_" for service, info in yaml.safe_load( - open("data/templates/yunohost/services.yml") + open("conf/yunohost/services.yml") ).items(): if info is None: continue @@ -79,7 +79,7 @@ def find_expected_string_keys(): # For all unit operations, expect to find "log_" # A unit operation is created either using the @is_unit_operation decorator # or using OperationLogger( - cmd = "grep -hr '@is_unit_operation' src/yunohost/ -A3 2>/dev/null | grep '^def' | sed -E 's@^def (\\w+)\\(.*@\\1@g'" + cmd = "grep -hr '@is_unit_operation' src/ -A3 2>/dev/null | grep '^def' | sed -E 's@^def (\\w+)\\(.*@\\1@g'" for funcname in ( subprocess.check_output(cmd, shell=True).decode("utf-8").strip().split("\n") ): @@ -94,14 +94,14 @@ def find_expected_string_keys(): # Global settings descriptions # Will be on a line like : ("service.ssh.allow_deprecated_dsa_hostkey", {"type": "bool", ... p5 = re.compile(r" \(\n*\s*[\"\'](\w[\w\.]+)[\"\'],") - content = open("src/yunohost/settings.py").read() + content = open("src/settings.py").read() for m in ( "global_settings_setting_" + s.replace(".", "_") for s in p5.findall(content) ): yield m # Keys for the actionmap ... - for category in yaml.safe_load(open("data/actionsmap/yunohost.yml")).values(): + for category in yaml.safe_load(open("share/actionsmap.yml")).values(): if "actions" not in category.keys(): continue for action in category["actions"].values(): diff --git a/tests/test_actionmap.py b/tests/test_actionmap.py index 0b8abb152..e482bdfe1 100644 --- a/tests/test_actionmap.py +++ b/tests/test_actionmap.py @@ -2,4 +2,4 @@ import yaml def test_yaml_syntax(): - yaml.safe_load(open("data/actionsmap/yunohost.yml")) + yaml.safe_load(open("share/actionsmap.yml")) diff --git a/tests/test_i18n_keys.py b/tests/test_i18n_keys.py index 103241085..d0ae75bfc 100644 --- a/tests/test_i18n_keys.py +++ b/tests/test_i18n_keys.py @@ -25,11 +25,11 @@ def find_expected_string_keys(): p3 = re.compile(r"YunohostValidationError\(\n*\s*[\'\"](\w+)[\'\"]") p4 = re.compile(r"# i18n: [\'\"]?(\w+)[\'\"]?") - python_files = glob.glob("src/yunohost/*.py") - python_files.extend(glob.glob("src/yunohost/utils/*.py")) - python_files.extend(glob.glob("src/yunohost/data_migrations/*.py")) - python_files.extend(glob.glob("src/yunohost/authenticators/*.py")) - python_files.extend(glob.glob("data/hooks/diagnosis/*.py")) + python_files = glob.glob("src/*.py") + python_files.extend(glob.glob("src/utils/*.py")) + python_files.extend(glob.glob("src/data_migrations/*.py")) + python_files.extend(glob.glob("src/authenticators/*.py")) + python_files.extend(glob.glob("src/diagnosis/*.py")) python_files.append("bin/yunohost") for python_file in python_files: @@ -52,7 +52,7 @@ def find_expected_string_keys(): # For each diagnosis, try to find strings like "diagnosis_stuff_foo" (c.f. diagnosis summaries) # Also we expect to have "diagnosis_description_" for each diagnosis p3 = re.compile(r"[\"\'](diagnosis_[a-z]+_\w+)[\"\']") - for python_file in glob.glob("data/hooks/diagnosis/*.py"): + for python_file in glob.glob("src/diagnosis/*.py"): content = open(python_file).read() for m in p3.findall(content): if m.endswith("_"): @@ -64,14 +64,14 @@ def find_expected_string_keys(): ] # For each migration, expect to find "migration_description_" - for path in glob.glob("src/yunohost/data_migrations/*.py"): + for path in glob.glob("src/data_migrations/*.py"): if "__init__" in path: continue yield "migration_description_" + os.path.basename(path)[:-3] # For each default service, expect to find "service_description_" for service, info in yaml.safe_load( - open("data/templates/yunohost/services.yml") + open("conf/yunohost/services.yml") ).items(): if info is None: continue @@ -80,7 +80,7 @@ def find_expected_string_keys(): # For all unit operations, expect to find "log_" # A unit operation is created either using the @is_unit_operation decorator # or using OperationLogger( - cmd = "grep -hr '@is_unit_operation' src/yunohost/ -A3 2>/dev/null | grep '^def' | sed -E 's@^def (\\w+)\\(.*@\\1@g'" + cmd = "grep -hr '@is_unit_operation' src/ -A3 2>/dev/null | grep '^def' | sed -E 's@^def (\\w+)\\(.*@\\1@g'" for funcname in ( subprocess.check_output(cmd, shell=True).decode("utf-8").strip().split("\n") ): @@ -95,14 +95,14 @@ def find_expected_string_keys(): # Global settings descriptions # Will be on a line like : ("service.ssh.allow_deprecated_dsa_hostkey", {"type": "bool", ... p5 = re.compile(r" \(\n*\s*[\"\'](\w[\w\.]+)[\"\'],") - content = open("src/yunohost/settings.py").read() + content = open("src/settings.py").read() for m in ( "global_settings_setting_" + s.replace(".", "_") for s in p5.findall(content) ): yield m # Keys for the actionmap ... - for category in yaml.safe_load(open("data/actionsmap/yunohost.yml")).values(): + for category in yaml.safe_load(open("src/actionsmap.yml")).values(): if "actions" not in category.keys(): continue for action in category["actions"].values(): @@ -130,13 +130,13 @@ def find_expected_string_keys(): yield "backup_applying_method_%s" % method yield "backup_method_%s_finished" % method - registrars = toml.load(open("data/other/registrar_list.toml")) + registrars = toml.load(open("share/registrar_list.toml")) supported_registrars = ["ovh", "gandi", "godaddy"] for registrar in supported_registrars: for key in registrars[registrar].keys(): yield f"domain_config_{key}" - domain_config = toml.load(open("data/other/config_domain.toml")) + domain_config = toml.load(open("share/config_domain.toml")) for panel in domain_config.values(): if not isinstance(panel, dict): continue diff --git a/tox.ini b/tox.ini index f00cc7fb8..e5cffb696 100644 --- a/tox.ini +++ b/tox.ini @@ -8,8 +8,8 @@ deps = py39-black-{run,check}: black py39-mypy: mypy >= 0.900 commands = - py39-lint: flake8 src doc data tests --ignore E402,E501,E203,W503 --exclude src/yunohost/vendor - py39-invalidcode: flake8 src data --exclude src/yunohost/tests,src/yunohost/vendor --select F,E722,W605 + py39-lint: flake8 src doc data tests --ignore E402,E501,E203,W503 --exclude src/vendor + py39-invalidcode: flake8 src data --exclude src/tests,src/vendor --select F,E722,W605 py39-black-check: black --check --diff src doc data tests py39-black-run: black src doc data tests - py39-mypy: mypy --ignore-missing-import --install-types --non-interactive --follow-imports silent src/yunohost/ --exclude (acme_tiny|data_migrations) + py39-mypy: mypy --ignore-missing-import --install-types --non-interactive --follow-imports silent src/ --exclude (acme_tiny|data_migrations) From ebf9d522e05f01038ffbe948e9c23e162c57baa9 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 10 Nov 2021 19:51:11 +0100 Subject: [PATCH 084/146] Adapt diagnosers code to load them as python modules instead of hooks --- src/diagnosis.py | 68 ++++++++++++++++++----------- src/diagnosis/00-basesystem.py | 21 +++++---- src/diagnosis/10-ip.py | 13 +++--- src/diagnosis/12-dnsrecords.py | 12 +++-- src/diagnosis/14-ports.py | 6 +-- src/diagnosis/21-web.py | 6 +-- src/diagnosis/24-mail.py | 11 +++-- src/diagnosis/30-services.py | 6 +-- src/diagnosis/50-systemresources.py | 6 +-- src/diagnosis/70-regenconf.py | 6 +-- src/diagnosis/80-apps.py | 6 +-- 11 files changed, 74 insertions(+), 87 deletions(-) diff --git a/src/diagnosis.py b/src/diagnosis.py index 4ac5e2731..a7b6c725c 100644 --- a/src/diagnosis.py +++ b/src/diagnosis.py @@ -27,6 +27,8 @@ import re import os import time +import glob +from importlib import import_module from moulinette import m18n, Moulinette from moulinette.utils import log @@ -38,7 +40,6 @@ from moulinette.utils.filesystem import ( ) from yunohost.utils.error import YunohostError, YunohostValidationError -from yunohost.hook import hook_list, hook_exec logger = log.getActionLogger("yunohost.diagnosis") @@ -48,15 +49,13 @@ DIAGNOSIS_SERVER = "diagnosis.yunohost.org" def diagnosis_list(): - all_categories_names = [h for h, _ in _list_diagnosis_categories()] - return {"categories": all_categories_names} + return {"categories": _list_diagnosis_categories()} def diagnosis_get(category, item): # Get all the categories - all_categories = _list_diagnosis_categories() - all_categories_names = [c for c, _ in all_categories] + all_categories_names = _list_diagnosis_categories() if category not in all_categories_names: raise YunohostValidationError( @@ -84,8 +83,7 @@ def diagnosis_show( return # Get all the categories - all_categories = _list_diagnosis_categories() - all_categories_names = [category for category, _ in all_categories] + all_categories_names = _list_diagnosis_categories() # Check the requested category makes sense if categories == []: @@ -174,8 +172,7 @@ def diagnosis_run( return # Get all the categories - all_categories = _list_diagnosis_categories() - all_categories_names = [category for category, _ in all_categories] + all_categories_names = _list_diagnosis_categories() # Check the requested category makes sense if categories == []: @@ -192,10 +189,11 @@ def diagnosis_run( diagnosed_categories = [] for category in categories: logger.debug("Running diagnosis for %s ..." % category) - path = [p for n, p in all_categories if n == category][0] + + diagnoser = _load_diagnoser(category) try: - code, report = hook_exec(path, args={"force": force}, env=None) + code, report = diagnoser.diagnose(force=force) except Exception: import traceback @@ -275,8 +273,7 @@ def _diagnosis_ignore(add_filter=None, remove_filter=None, list=False): def validate_filter_criterias(filter_): # Get all the categories - all_categories = _list_diagnosis_categories() - all_categories_names = [category for category, _ in all_categories] + all_categories_names = _list_diagnosis_categories() # Sanity checks for the provided arguments if len(filter_) == 0: @@ -404,12 +401,8 @@ def add_ignore_flag_to_issues(report): class Diagnoser: - def __init__(self, args, env, loggers): + def __init__(self): - # FIXME ? That stuff with custom loggers is weird ... (mainly inherited from the bash hooks, idk) - self.logger_debug, self.logger_warning, self.logger_info = loggers - self.env = env - self.args = args or {} self.cache_file = Diagnoser.cache_file(self.id_) self.description = Diagnoser.get_description(self.id_) @@ -424,10 +417,10 @@ class Diagnoser: os.makedirs(DIAGNOSIS_CACHE) return write_to_json(self.cache_file, report) - def diagnose(self): + def diagnose(self, force=False): if ( - not self.args.get("force", False) + not force and self.cached_time_ago() < self.cache_duration ): self.logger_debug("Cache still valid : %s" % self.cache_file) @@ -666,13 +659,36 @@ class Diagnoser: def _list_diagnosis_categories(): - hooks_raw = hook_list("diagnosis", list_by="priority", show_info=True)["hooks"] - hooks = [] - for _, some_hooks in sorted(hooks_raw.items(), key=lambda h: int(h[0])): - for name, info in some_hooks.items(): - hooks.append((name, info["path"])) - return hooks + paths = glob.glob(os.path.dirname(__file__) + "/diagnosis/??-*.py") + names = sorted([os.path.basename(path)[: -len(".py")] for path in paths]) + + return names + + +def _load_diagnoser(diagnoser_name): + + logger.debug(f"Loading diagnoser {diagnoser_name}") + + paths = glob.glob(os.path.dirname(__file__) + f"/diagnosis/??-{diagnoser_name}.py") + + if len(paths) != 1: + raise YunohostError(f"Uhoh, found several matches (or none?) for diagnoser {diagnoser_name} : {paths}", raw_msg=True) + + module_id = os.path.basename(paths[0][: -len(".py")]) + + try: + # this is python builtin method to import a module using a name, we + # use that to import the migration as a python object so we'll be + # able to run it in the next loop + module = import_module("yunohost.diagnosis.{}".format(module_id)) + return module.MyDiagnoser() + except Exception as e: + import traceback + + traceback.print_exc() + + raise YunohostError(f"Failed to load diagnoser {diagnoser_name} : {e}", raw_msg=True) def _email_diagnosis_issues(): diff --git a/src/diagnosis/00-basesystem.py b/src/diagnosis/00-basesystem.py index b472a2d32..66a2bf47b 100644 --- a/src/diagnosis/00-basesystem.py +++ b/src/diagnosis/00-basesystem.py @@ -4,13 +4,16 @@ import os import json import subprocess +from moulinette.utils import log from moulinette.utils.process import check_output from moulinette.utils.filesystem import read_file, read_json, write_to_json from yunohost.diagnosis import Diagnoser from yunohost.utils.packages import ynh_packages_version +logger = log.getActionLogger("yunohost.diagnosis") -class BaseSystemDiagnoser(Diagnoser): + +class MyDiagnoser(Diagnoser): id_ = os.path.splitext(os.path.basename(__file__))[0].split("-")[1] cache_duration = 600 @@ -172,7 +175,7 @@ class BaseSystemDiagnoser(Diagnoser): try: return int(n_failures) except Exception: - self.logger_warning( + logger.warning( "Failed to parse number of recent auth failures, expected an int, got '%s'" % n_failures ) @@ -196,7 +199,7 @@ class BaseSystemDiagnoser(Diagnoser): if not os.path.exists(dpkg_log) or os.path.getmtime( cache_file ) > os.path.getmtime(dpkg_log): - self.logger_debug( + logger.debug( "Using cached results for meltdown checker, from %s" % cache_file ) return read_json(cache_file)[0]["VULNERABLE"] @@ -209,7 +212,7 @@ class BaseSystemDiagnoser(Diagnoser): # example output from the script: # [{"NAME":"MELTDOWN","CVE":"CVE-2017-5754","VULNERABLE":false,"INFOS":"PTI mitigates the vulnerability"}] try: - self.logger_debug("Running meltdown vulnerability checker") + logger.debug("Running meltdown vulnerability checker") call = subprocess.Popen( "bash %s --batch json --variant 3" % SCRIPT_PATH, shell=True, @@ -231,7 +234,7 @@ class BaseSystemDiagnoser(Diagnoser): # stuff which should be the last line output = output.strip() if "\n" in output: - self.logger_debug("Original meltdown checker output : %s" % output) + logger.debug("Original meltdown checker output : %s" % output) output = output.split("\n")[-1] CVEs = json.loads(output) @@ -241,18 +244,14 @@ class BaseSystemDiagnoser(Diagnoser): import traceback traceback.print_exc() - self.logger_warning( + logger.warning( "Something wrong happened when trying to diagnose Meltdown vunerability, exception: %s" % e ) raise Exception("Command output for failed meltdown check: '%s'" % output) - self.logger_debug( + logger.debug( "Writing results from meltdown checker to cache file, %s" % cache_file ) write_to_json(cache_file, CVEs) return CVEs[0]["VULNERABLE"] - - -def main(args, env, loggers): - return BaseSystemDiagnoser(args, env, loggers).diagnose() diff --git a/src/diagnosis/10-ip.py b/src/diagnosis/10-ip.py index bc00fe25c..4ad4cfbfc 100644 --- a/src/diagnosis/10-ip.py +++ b/src/diagnosis/10-ip.py @@ -4,6 +4,7 @@ import re import os import random +from moulinette.utils import log from moulinette.utils.network import download_text from moulinette.utils.process import check_output from moulinette.utils.filesystem import read_file @@ -11,8 +12,10 @@ from moulinette.utils.filesystem import read_file from yunohost.diagnosis import Diagnoser from yunohost.utils.network import get_network_interfaces +logger = log.getActionLogger("yunohost.diagnosis") -class IPDiagnoser(Diagnoser): + +class MyDiagnoser(Diagnoser): id_ = os.path.splitext(os.path.basename(__file__))[0].split("-")[1] cache_duration = 600 @@ -144,7 +147,7 @@ class IPDiagnoser(Diagnoser): ) if not any(is_default_route(r) for r in routes): - self.logger_debug( + logger.debug( "No default route for IPv%s, so assuming there's no IP address for that version" % protocol ) @@ -220,11 +223,7 @@ class IPDiagnoser(Diagnoser): try: return download_text(url, timeout=30).strip() except Exception as e: - self.logger_debug( + logger.debug( "Could not get public IPv%s : %s" % (str(protocol), str(e)) ) return None - - -def main(args, env, loggers): - return IPDiagnoser(args, env, loggers).diagnose() diff --git a/src/diagnosis/12-dnsrecords.py b/src/diagnosis/12-dnsrecords.py index d45ebd9b8..305fda79b 100644 --- a/src/diagnosis/12-dnsrecords.py +++ b/src/diagnosis/12-dnsrecords.py @@ -6,6 +6,7 @@ import re from datetime import datetime, timedelta from publicsuffix2 import PublicSuffixList +from moulinette.utils import log from moulinette.utils.process import check_output from yunohost.utils.dns import ( @@ -18,8 +19,9 @@ from yunohost.diagnosis import Diagnoser from yunohost.domain import domain_list, _get_maindomain from yunohost.dns import _build_dns_conf, _get_dns_zone_for_domain +logger = log.getActionLogger("yunohost.diagnosis") -class DNSRecordsDiagnoser(Diagnoser): +class MyDiagnoser(Diagnoser): id_ = os.path.splitext(os.path.basename(__file__))[0].split("-")[1] cache_duration = 600 @@ -31,7 +33,7 @@ class DNSRecordsDiagnoser(Diagnoser): major_domains = domain_list(exclude_subdomains=True)["domains"] for domain in major_domains: - self.logger_debug("Diagnosing DNS conf for %s" % domain) + logger.debug("Diagnosing DNS conf for %s" % domain) for report in self.check_domain( domain, @@ -223,7 +225,7 @@ class DNSRecordsDiagnoser(Diagnoser): ) ) else: - self.logger_debug("Dyndns domain: %s" % (domain)) + logger.debug("Dyndns domain: %s" % (domain)) continue expire_in = expire_date - datetime.now() @@ -298,7 +300,3 @@ class DNSRecordsDiagnoser(Diagnoser): return datetime.strptime(match.group(1), "%d-%b-%Y") return "expiration_not_found" - - -def main(args, env, loggers): - return DNSRecordsDiagnoser(args, env, loggers).diagnose() diff --git a/src/diagnosis/14-ports.py b/src/diagnosis/14-ports.py index 7581a1ac6..e339a946c 100644 --- a/src/diagnosis/14-ports.py +++ b/src/diagnosis/14-ports.py @@ -6,7 +6,7 @@ from yunohost.diagnosis import Diagnoser from yunohost.service import _get_services -class PortsDiagnoser(Diagnoser): +class MyDiagnoser(Diagnoser): id_ = os.path.splitext(os.path.basename(__file__))[0].split("-")[1] cache_duration = 600 @@ -146,7 +146,3 @@ class PortsDiagnoser(Diagnoser): "diagnosis_ports_forwarding_tip", ], ) - - -def main(args, env, loggers): - return PortsDiagnoser(args, env, loggers).diagnose() diff --git a/src/diagnosis/21-web.py b/src/diagnosis/21-web.py index 450296e7e..3d9fb9f73 100644 --- a/src/diagnosis/21-web.py +++ b/src/diagnosis/21-web.py @@ -13,7 +13,7 @@ from yunohost.utils.dns import is_special_use_tld DIAGNOSIS_SERVER = "diagnosis.yunohost.org" -class WebDiagnoser(Diagnoser): +class MyDiagnoser(Diagnoser): id_ = os.path.splitext(os.path.basename(__file__))[0].split("-")[1] cache_duration = 600 @@ -198,7 +198,3 @@ class WebDiagnoser(Diagnoser): summary="diagnosis_http_partially_unreachable", details=[detail.replace("error_http_check", "diagnosis_http")], ) - - -def main(args, env, loggers): - return WebDiagnoser(args, env, loggers).diagnose() diff --git a/src/diagnosis/24-mail.py b/src/diagnosis/24-mail.py index f29b2786d..af7af1a16 100644 --- a/src/diagnosis/24-mail.py +++ b/src/diagnosis/24-mail.py @@ -6,6 +6,7 @@ import re from subprocess import CalledProcessError +from moulinette.utils import log from moulinette.utils.process import check_output from moulinette.utils.filesystem import read_yaml @@ -16,8 +17,10 @@ from yunohost.utils.dns import dig DEFAULT_DNS_BLACKLIST = "/usr/share/yunohost/dnsbl_list.yml" +logger = log.getActionLogger("yunohost.diagnosis") -class MailDiagnoser(Diagnoser): + +class MyDiagnoser(Diagnoser): id_ = os.path.splitext(os.path.basename(__file__))[0].split("-")[1] cache_duration = 600 @@ -42,7 +45,7 @@ class MailDiagnoser(Diagnoser): "check_queue", # i18n: diagnosis_mail_queue_ok ] for check in checks: - self.logger_debug("Running " + check) + logger.debug("Running " + check) reports = list(getattr(self, check)()) for report in reports: yield report @@ -292,7 +295,3 @@ class MailDiagnoser(Diagnoser): if global_ipv6: outgoing_ips.append(global_ipv6) return (outgoing_ipversions, outgoing_ips) - - -def main(args, env, loggers): - return MailDiagnoser(args, env, loggers).diagnose() diff --git a/src/diagnosis/30-services.py b/src/diagnosis/30-services.py index adbcc73b9..daf86ab1e 100644 --- a/src/diagnosis/30-services.py +++ b/src/diagnosis/30-services.py @@ -6,7 +6,7 @@ from yunohost.diagnosis import Diagnoser from yunohost.service import service_status -class ServicesDiagnoser(Diagnoser): +class MyDiagnoser(Diagnoser): id_ = os.path.splitext(os.path.basename(__file__))[0].split("-")[1] cache_duration = 300 @@ -41,7 +41,3 @@ class ServicesDiagnoser(Diagnoser): item["summary"] = "diagnosis_services_running" yield item - - -def main(args, env, loggers): - return ServicesDiagnoser(args, env, loggers).diagnose() diff --git a/src/diagnosis/50-systemresources.py b/src/diagnosis/50-systemresources.py index a662e392e..265e62acb 100644 --- a/src/diagnosis/50-systemresources.py +++ b/src/diagnosis/50-systemresources.py @@ -9,7 +9,7 @@ from moulinette.utils.process import check_output from yunohost.diagnosis import Diagnoser -class SystemResourcesDiagnoser(Diagnoser): +class MyDiagnoser(Diagnoser): id_ = os.path.splitext(os.path.basename(__file__))[0].split("-")[1] cache_duration = 300 @@ -214,7 +214,3 @@ def round_(n): if n > 10: n = int(round(n)) return n - - -def main(args, env, loggers): - return SystemResourcesDiagnoser(args, env, loggers).diagnose() diff --git a/src/diagnosis/70-regenconf.py b/src/diagnosis/70-regenconf.py index 8ccbeed58..63f6f2b32 100644 --- a/src/diagnosis/70-regenconf.py +++ b/src/diagnosis/70-regenconf.py @@ -9,7 +9,7 @@ from yunohost.regenconf import _get_regenconf_infos, _calculate_hash from moulinette.utils.filesystem import read_file -class RegenconfDiagnoser(Diagnoser): +class MyDiagnoser(Diagnoser): id_ = os.path.splitext(os.path.basename(__file__))[0].split("-")[1] cache_duration = 300 @@ -70,7 +70,3 @@ class RegenconfDiagnoser(Diagnoser): for path, hash_ in infos["conffiles"].items(): if hash_ != _calculate_hash(path): yield {"path": path, "category": category} - - -def main(args, env, loggers): - return RegenconfDiagnoser(args, env, loggers).diagnose() diff --git a/src/diagnosis/80-apps.py b/src/diagnosis/80-apps.py index 5aec48ed8..e62acaa1f 100644 --- a/src/diagnosis/80-apps.py +++ b/src/diagnosis/80-apps.py @@ -7,7 +7,7 @@ from yunohost.app import app_list from yunohost.diagnosis import Diagnoser -class AppDiagnoser(Diagnoser): +class MyDiagnoser(Diagnoser): id_ = os.path.splitext(os.path.basename(__file__))[0].split("-")[1] cache_duration = 300 @@ -90,7 +90,3 @@ class AppDiagnoser(Diagnoser): == 0 ): yield ("error", "diagnosis_apps_deprecated_practices") - - -def main(args, env, loggers): - return AppDiagnoser(args, env, loggers).diagnose() From 248d7f5678437ef0f25b0783e90fda510eae213f Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 10 Nov 2021 19:53:05 +0100 Subject: [PATCH 085/146] data_migrations -> migrations --- .../0021_migrate_to_bullseye.py | 0 .../0022_php73_to_php74_pools.py | 0 .../0023_postgresql_11_to_13.py | 0 src/{data_migrations => migrations}/__init__.py | 0 src/tools.py | 10 +++++----- tests/add_missing_keys.py | 4 ++-- tests/test_i18n_keys.py | 4 ++-- tox.ini | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) rename src/{data_migrations => migrations}/0021_migrate_to_bullseye.py (100%) rename src/{data_migrations => migrations}/0022_php73_to_php74_pools.py (100%) rename src/{data_migrations => migrations}/0023_postgresql_11_to_13.py (100%) rename src/{data_migrations => migrations}/__init__.py (100%) diff --git a/src/data_migrations/0021_migrate_to_bullseye.py b/src/migrations/0021_migrate_to_bullseye.py similarity index 100% rename from src/data_migrations/0021_migrate_to_bullseye.py rename to src/migrations/0021_migrate_to_bullseye.py diff --git a/src/data_migrations/0022_php73_to_php74_pools.py b/src/migrations/0022_php73_to_php74_pools.py similarity index 100% rename from src/data_migrations/0022_php73_to_php74_pools.py rename to src/migrations/0022_php73_to_php74_pools.py diff --git a/src/data_migrations/0023_postgresql_11_to_13.py b/src/migrations/0023_postgresql_11_to_13.py similarity index 100% rename from src/data_migrations/0023_postgresql_11_to_13.py rename to src/migrations/0023_postgresql_11_to_13.py diff --git a/src/data_migrations/__init__.py b/src/migrations/__init__.py similarity index 100% rename from src/data_migrations/__init__.py rename to src/migrations/__init__.py diff --git a/src/tools.py b/src/tools.py index a92e478de..f9de32cfe 100644 --- a/src/tools.py +++ b/src/tools.py @@ -933,12 +933,12 @@ def _get_migrations_list(): migrations = [] try: - from . import data_migrations + from . import migrations except ImportError: # not data migrations present, return empty list return migrations - migrations_path = data_migrations.__path__[0] + migrations_path = migrations.__path__[0] if not os.path.exists(migrations_path): logger.warn(m18n.n("migrations_cant_reach_migration_file", migrations_path)) @@ -973,11 +973,11 @@ def _get_migration_by_name(migration_name): """ try: - from . import data_migrations + from . import migrations except ImportError: raise AssertionError("Unable to find migration with name %s" % migration_name) - migrations_path = data_migrations.__path__[0] + migrations_path = migrations.__path__[0] migrations_found = [ x for x in os.listdir(migrations_path) @@ -1001,7 +1001,7 @@ def _load_migration(migration_file): # this is python builtin method to import a module using a name, we # use that to import the migration as a python object so we'll be # able to run it in the next loop - module = import_module("yunohost.data_migrations.{}".format(migration_id)) + module = import_module("yunohost.migrations.{}".format(migration_id)) return module.MyMigration(migration_id) except Exception as e: import traceback diff --git a/tests/add_missing_keys.py b/tests/add_missing_keys.py index 1bf335418..e1ecbf56e 100644 --- a/tests/add_missing_keys.py +++ b/tests/add_missing_keys.py @@ -26,7 +26,7 @@ def find_expected_string_keys(): python_files = glob.glob("src/*.py") python_files.extend(glob.glob("src/utils/*.py")) - python_files.extend(glob.glob("src/data_migrations/*.py")) + python_files.extend(glob.glob("src/migrations/*.py")) python_files.extend(glob.glob("src/authenticators/*.py")) python_files.extend(glob.glob("src/diagnosis/*.py")) python_files.append("bin/yunohost") @@ -63,7 +63,7 @@ def find_expected_string_keys(): ] # For each migration, expect to find "migration_description_" - for path in glob.glob("src/data_migrations/*.py"): + for path in glob.glob("src/migrations/*.py"): if "__init__" in path: continue yield "migration_description_" + os.path.basename(path)[:-3] diff --git a/tests/test_i18n_keys.py b/tests/test_i18n_keys.py index d0ae75bfc..b25d35923 100644 --- a/tests/test_i18n_keys.py +++ b/tests/test_i18n_keys.py @@ -27,7 +27,7 @@ def find_expected_string_keys(): python_files = glob.glob("src/*.py") python_files.extend(glob.glob("src/utils/*.py")) - python_files.extend(glob.glob("src/data_migrations/*.py")) + python_files.extend(glob.glob("src/migrations/*.py")) python_files.extend(glob.glob("src/authenticators/*.py")) python_files.extend(glob.glob("src/diagnosis/*.py")) python_files.append("bin/yunohost") @@ -64,7 +64,7 @@ def find_expected_string_keys(): ] # For each migration, expect to find "migration_description_" - for path in glob.glob("src/data_migrations/*.py"): + for path in glob.glob("src/migrations/*.py"): if "__init__" in path: continue yield "migration_description_" + os.path.basename(path)[:-3] diff --git a/tox.ini b/tox.ini index e5cffb696..3e3fcbf2e 100644 --- a/tox.ini +++ b/tox.ini @@ -12,4 +12,4 @@ commands = py39-invalidcode: flake8 src data --exclude src/tests,src/vendor --select F,E722,W605 py39-black-check: black --check --diff src doc data tests py39-black-run: black src doc data tests - py39-mypy: mypy --ignore-missing-import --install-types --non-interactive --follow-imports silent src/ --exclude (acme_tiny|data_migrations) + py39-mypy: mypy --ignore-missing-import --install-types --non-interactive --follow-imports silent src/ --exclude (acme_tiny|migrations) From e19330b0c2b13f32f47e1f0d51a4695893b6e210 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 10 Nov 2021 19:56:59 +0100 Subject: [PATCH 086/146] Aaaaand forgot to git add diagnosis/__init__.py --- src/diagnosis/__init__.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 src/diagnosis/__init__.py diff --git a/src/diagnosis/__init__.py b/src/diagnosis/__init__.py new file mode 100644 index 000000000..e69de29bb From 244287bdd0e1dd0cba83e50f6352dc467afe50a8 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Fri, 12 Nov 2021 21:31:11 +0100 Subject: [PATCH 087/146] ci: Idk why dch ain't there by default anymore but meh, installing devscripts should solve the issue... --- .gitlab/ci/build.gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab/ci/build.gitlab-ci.yml b/.gitlab/ci/build.gitlab-ci.yml index 82def4eb3..db691b9d2 100644 --- a/.gitlab/ci/build.gitlab-ci.yml +++ b/.gitlab/ci/build.gitlab-ci.yml @@ -11,6 +11,7 @@ - $YNH_BUILD_DIR/*.deb .build_script: &build_script + - DEBIAN_FRONTEND=noninteractive apt --assume-yes -o Dpkg::Options::="--force-confold" install devscripts --no-install-recommends - cd $YNH_BUILD_DIR/$PACKAGE - VERSION=$(dpkg-parsechangelog -S Version 2>/dev/null) - VERSION_NIGHTLY="${VERSION}+$(date +%Y%m%d%H%M)" From 51d5dca03387d18842388379b5177b6e83833e4d Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 13 Nov 2021 18:36:38 +0100 Subject: [PATCH 088/146] Make ynh_add_fpm_config more robust to some edge cases --- data/helpers.d/php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/data/helpers.d/php b/data/helpers.d/php index b0e9fa59d..d6ccc52cd 100644 --- a/data/helpers.d/php +++ b/data/helpers.d/php @@ -90,9 +90,11 @@ ynh_add_fpm_config() { local old_php_fpm_config_dir=$(ynh_app_setting_get --app=$app --key=fpm_config_dir) local old_php_finalphpconf="$old_php_fpm_config_dir/pool.d/$app.conf" - ynh_backup_if_checksum_is_different --file="$old_php_finalphpconf" - - ynh_remove_fpm_config + if [[ -f "$old_php_finalphpconf" ]] + then + ynh_backup_if_checksum_is_different --file="$old_php_finalphpconf" + ynh_remove_fpm_config + fi fi # Legacy args (packager should just list their php dependency as regular apt dependencies... From 044038d1c7c254fbef4c5effe9bb3673df3d4c18 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 13 Nov 2021 20:12:52 +0100 Subject: [PATCH 089/146] ci: Attempt to ignore branches created by the CI .. --- .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d1cb36b73..ba0d9fd3e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -19,6 +19,8 @@ workflow: - if: $CI_PIPELINE_SOURCE == "merge_request_event" # If we move to gitlab one day - if: $CI_PIPELINE_SOURCE == "external_pull_request_event" # For github PR - if: $CI_COMMIT_TAG # For tags + - if: $CI_COMMIT_REF_NAME =~ /^ci-/ # Ignore branches names ci-* (created by those pipelines) + when: never - if: $CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "push" # If it's not the default branch and if it's a push, then do not trigger a build when: never - when: always From 8d5e69566b1b54926ca2557b4ae979ab3ae74a23 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 13 Nov 2021 20:14:25 +0100 Subject: [PATCH 090/146] Fix error during mysql regenconf, no templates folder anymoar --- data/hooks/conf_regen/34-mysql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/hooks/conf_regen/34-mysql b/data/hooks/conf_regen/34-mysql index 13730e0bb..27c956ced 100755 --- a/data/hooks/conf_regen/34-mysql +++ b/data/hooks/conf_regen/34-mysql @@ -6,7 +6,7 @@ set -e do_pre_regen() { pending_dir=$1 - cd /usr/share/yunohost/templates/mysql + #cd /usr/share/yunohost/templates/mysql # Nothing to do } From 38f5352fc0f80a6ef57006a72012652dcbe3af7c Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 14 Nov 2021 16:06:04 +0100 Subject: [PATCH 091/146] Fix -conf_ynh_settings backup/restore when /etc/yunohost/domains doesn't exist --- data/hooks/backup/20-conf_ynh_settings | 2 +- data/hooks/restore/20-conf_ynh_settings | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/data/hooks/backup/20-conf_ynh_settings b/data/hooks/backup/20-conf_ynh_settings index 9b56f1579..76ab0aaca 100644 --- a/data/hooks/backup/20-conf_ynh_settings +++ b/data/hooks/backup/20-conf_ynh_settings @@ -12,7 +12,7 @@ backup_dir="${1}/conf/ynh" # Backup the configuration ynh_backup "/etc/yunohost/firewall.yml" "${backup_dir}/firewall.yml" ynh_backup "/etc/yunohost/current_host" "${backup_dir}/current_host" -ynh_backup "/etc/yunohost/domains" "${backup_dir}/domains" +[ ! -d "/etc/yunohost/domains" ] || ynh_backup "/etc/yunohost/domains" "${backup_dir}/domains" [ ! -e "/etc/yunohost/settings.json" ] || ynh_backup "/etc/yunohost/settings.json" "${backup_dir}/settings.json" [ ! -d "/etc/yunohost/dyndns" ] || ynh_backup "/etc/yunohost/dyndns" "${backup_dir}/dyndns" [ ! -d "/etc/dkim" ] || ynh_backup "/etc/dkim" "${backup_dir}/dkim" diff --git a/data/hooks/restore/20-conf_ynh_settings b/data/hooks/restore/20-conf_ynh_settings index 4c4c6ed5e..2d731bd54 100644 --- a/data/hooks/restore/20-conf_ynh_settings +++ b/data/hooks/restore/20-conf_ynh_settings @@ -2,7 +2,7 @@ backup_dir="$1/conf/ynh" cp -a "${backup_dir}/current_host" /etc/yunohost/current_host cp -a "${backup_dir}/firewall.yml" /etc/yunohost/firewall.yml -cp -a "${backup_dir}/domains" /etc/yunohost/domains +[ ! -d "${backup_dir}/domains" ] || cp -a "${backup_dir}/domains" /etc/yunohost/domains [ ! -e "${backup_dir}/settings.json" ] || cp -a "${backup_dir}/settings.json" "/etc/yunohost/settings.json" [ ! -d "${backup_dir}/dyndns" ] || cp -raT "${backup_dir}/dyndns" "/etc/yunohost/dyndns" [ ! -d "${backup_dir}/dkim" ] || cp -raT "${backup_dir}/dkim" "/etc/dkim" From 02e397ccc8aa099f40f905abdf5bd9ebdf121260 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 14 Nov 2021 17:43:34 +0100 Subject: [PATCH 092/146] ci: Fix filter on ci branches ... my regex doesn't seem to be working :| --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ba0d9fd3e..8403cb8e8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -19,7 +19,7 @@ workflow: - if: $CI_PIPELINE_SOURCE == "merge_request_event" # If we move to gitlab one day - if: $CI_PIPELINE_SOURCE == "external_pull_request_event" # For github PR - if: $CI_COMMIT_TAG # For tags - - if: $CI_COMMIT_REF_NAME =~ /^ci-/ # Ignore branches names ci-* (created by those pipelines) + - if: $CI_COMMIT_REF_NAME == "ci-format-dev" # Ignore black formatting branch created by the CI when: never - if: $CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "push" # If it's not the default branch and if it's a push, then do not trigger a build when: never From 697dd8b9c2289b089c1093018e351a822a6f2195 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sun, 14 Nov 2021 16:52:57 +0000 Subject: [PATCH 093/146] [CI] Format code with Black --- data/hooks/diagnosis/24-mail.py | 5 ++++- src/yunohost/log.py | 10 +++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/data/hooks/diagnosis/24-mail.py b/data/hooks/diagnosis/24-mail.py index 7b7f5f502..99a4aef28 100644 --- a/data/hooks/diagnosis/24-mail.py +++ b/data/hooks/diagnosis/24-mail.py @@ -210,7 +210,10 @@ class MailDiagnoser(Diagnoser): # Do the DNS Query status, answers = dig(query, "A") - if status != "ok" or (answers and set(answers) <= set(blacklist["non_blacklisted_return_code"])): + if status != "ok" or ( + answers + and set(answers) <= set(blacklist["non_blacklisted_return_code"]) + ): continue # Try to get the reason diff --git a/src/yunohost/log.py b/src/yunohost/log.py index 347fe2e65..0e534f9f8 100644 --- a/src/yunohost/log.py +++ b/src/yunohost/log.py @@ -749,8 +749,12 @@ class OperationLogger(object): # 72971 DEBUG 29739 + ynh_exit_properly # which are lines from backup-before-upgrade or restore-after-failed-upgrade ... filters = [re.compile(f_) for f_ in BORING_LOG_LINES] - filters.append(re.compile(r'\d+ \+ ')) - lines = [line for line in lines if not any(filter_.search(line) for filter_ in filters)] + filters.append(re.compile(r"\d+ \+ ")) + lines = [ + line + for line in lines + if not any(filter_.search(line) for filter_ in filters) + ] lines_to_display = [] @@ -758,7 +762,7 @@ class OperationLogger(object): rev_lines = list(reversed(lines)) for i, line in enumerate(rev_lines): if line.endswith("+ ynh_exit_properly"): - lines_to_display = reversed(rev_lines[i:i + 20]) + lines_to_display = reversed(rev_lines[i : i + 20]) break # If didnt find anything, just get the last 20 lines From 094c5f0807037149d740f34b998ef93d57f7ae6d Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 14 Nov 2021 21:10:44 +0100 Subject: [PATCH 094/146] Attempt to fix the CI again ... for some reason it complains that pytest ain't in the image despite being installed ... --- .gitlab/ci/test.gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab/ci/test.gitlab-ci.yml b/.gitlab/ci/test.gitlab-ci.yml index 1aad46fbe..776e3474c 100644 --- a/.gitlab/ci/test.gitlab-ci.yml +++ b/.gitlab/ci/test.gitlab-ci.yml @@ -1,6 +1,7 @@ .install_debs: &install_debs - apt-get update -o Acquire::Retries=3 - DEBIAN_FRONTEND=noninteractive SUDO_FORCE_REMOVE=yes apt --assume-yes -o Dpkg::Options::="--force-confold" --allow-downgrades install ./$YNH_BUILD_DIR/*.deb + - pip3 install -U mock pip pytest pytest-cov pytest-mock pytest-sugar requests-mock tox ansi2html black jinja2 .test-stage: stage: tests From 1d33a74b4c585d42f52c549207727d8b5995ecb9 Mon Sep 17 00:00:00 2001 From: punkrockgirl Date: Fri, 5 Nov 2021 15:39:30 +0000 Subject: [PATCH 095/146] Translated using Weblate (Basque) Currently translated at 100.0% (705 of 705 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/eu/ --- locales/eu.json | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/locales/eu.json b/locales/eu.json index b5f98dec5..1f69866bb 100644 --- a/locales/eu.json +++ b/locales/eu.json @@ -131,9 +131,9 @@ "diagnosis_ip_no_ipv4": "Zerbitzariak ez du dabilen IPv4rik.", "diagnosis_ip_no_ipv6": "Zerbitzariak ez du dabilen IPv6rik.", "diagnosis_ip_broken_dnsresolution": "Domeinu izenaren ebazpena kaltetuta dagoela dirudi… Suebakiren bat ote dago DNS eskaerak oztopatzen?", - "diagnosis_diskusage_low": "{mountpoint} fitxategi-sistemak ({device} euskarrian) edukieraren {free} ({free_percent}%) bakarrik ditu erabilgarri ({total} orotara). Kontuz ibili.", + "diagnosis_diskusage_low": "{mountpoint} fitxategi-sistemak ({device} euskarrian) edukieraren {free} (%{free_percent}a) bakarrik ditu erabilgarri ({total} orotara). Kontuz ibili.", "diagnosis_dns_good_conf": "DNS ezarpenak zuzen konfiguratuta daude {domain} domeinurako ({category} atala)", - "diagnosis_diskusage_verylow": "{mountpoint} fitxategi-sistemak ({device} euskarrian) edukieraren {free} ({free_percent}%) bakarrik ditu erabilgarri ({total} orotara). Zertxobait hustu beharko zenuke!", + "diagnosis_diskusage_verylow": "{mountpoint} fitxategi-sistemak ({device} euskarrian) edukieraren {free} (%{free_percent}a) bakarrik ditu erabilgarri ({total} orotara). Zertxobait hustu beharko zenuke!", "diagnosis_description_basesystem": "Sistemaren oinarria", "diagnosis_description_services": "Zerbitzuen egoeraren egiaztapena", "diagnosis_http_could_not_diagnose": "Ezinezkoa izan da domeinuak IPv{ipversion} kanpotik eskuragarri dauden egiaztatzea.", @@ -145,7 +145,7 @@ "diagnosis_description_mail": "Posta elektronikoa", "diagnosis_http_connection_error": "Arazoa konexioan: ezin izan da domeinu horretara konektatu, litekeena da eskuragarri ez egotea.", "diagnosis_description_web": "Weba", - "diagnosis_display_tip": "Aurkitu diren arazoak ikusteko joan Diagnosien atalera administrazio-webgunean, edo exekutatu 'yunohost diagnosis show --issues --human-readable' komandoak nahiago badituzu.", + "diagnosis_display_tip": "Aurkitu diren arazoak ikusteko joan administrazio-atariko Diagnostikoak atalera, edo exekutatu 'yunohost diagnosis show --issues --human-readable' komandoak nahiago badituzu.", "diagnosis_dns_point_to_doc": "Mesedez, irakurri dokumentazioa DNS erregistroekin laguntza behar baduzu.", "diagnosis_mail_ehlo_unreachable": "SMTP posta zerbitzaria ez dago eskuragarri IPv{ipversion}ko sare lokaletik kanpo eta, beraz, ez da posta elektronikoa jasotzeko gai.", "diagnosis_mail_ehlo_bad_answer_details": "Litekeena da zure zerbitzaria ez den beste gailu batek erantzun izana.", @@ -175,7 +175,7 @@ "diagnosis_failed": "Ezinezkoa izan da '{category}' ataleko diagnostikoa lortzea: {error}", "diagnosis_ip_weird_resolvconf": "DNS ebazpena badabilela dirudi, baina antza denez moldatutako /etc/resolv.conf fitxategia erabiltzen ari zara.", "diagnosis_dns_bad_conf": "DNS balio batzuk falta dira edo ez dira zuzenak {domain} domeinurako ({category} atala)", - "diagnosis_diskusage_ok": "{mountpoint} fitxategi-sistemak ({device} euskarrian) edukieraren {free} ({free_percent}%) ditu erabilgarri oraindik ({total} orotara)!", + "diagnosis_diskusage_ok": "{mountpoint} fitxategi-sistemak ({device} euskarrian) edukieraren {free} (%{free_percent}a) ditu erabilgarri oraindik ({total} orotara)!", "apps_catalog_update_success": "Aplikazioen katalogoa eguneratu da!", "certmanager_warning_subdomain_dns_record": "'{subdomain}' azpidomeinuak ez dauka '{domain}'(e)k duen IP bera. Ezaugarri batzuk ez dira erabilgarri egongo hau zuzendu arte eta ziurtagiri bat birsortu arte.", "app_argument_choice_invalid": "Hautatu ({choices}) aukeretako bat '{name}' argumenturako: '{value}' ez dago aukera horien artean", @@ -295,7 +295,7 @@ "global_settings_setting_security_experimental_enabled": "Gaitu segurtasun funtzio esperimentalak (ez ezazu egin ez badakizu zertan ari zaren!)", "good_practices_about_admin_password": "Administrazio-pasahitz berria ezartzear zaude. Pasahitzak zortzi karaktere izan beharko lituzke gutxienez, baina gomendagarria da pasahitz luzeagoa erabiltzea (esaldi bat, esaterako) edota karaktere desberdinak erabiltzea (hizki larriak, txikiak, zenbakiak eta karaktere bereziak).", "log_help_to_get_failed_log": "Ezin izan da '{desc}' eragiketa exekutatu. Mesedez, laguntza nahi baduzu partekatu eragiketa honen erregistro osoa 'yunohost log share {name}' komandoa erabiliz", - "global_settings_setting_security_webadmin_allowlist_enabled": "Baimendu IP zehatz batzuk bakarrik administrazio-webgunean.", + "global_settings_setting_security_webadmin_allowlist_enabled": "Baimendu IP zehatz batzuk bakarrik administrazio-atarian.", "group_unknown": "'{group}' taldea ezezaguna da", "group_updated": "'{group}' taldea eguneratu da", "group_update_failed": "Ezinezkoa izan da '{group}' taldea eguneratzea: {error}", @@ -408,7 +408,7 @@ "diagnosis_swap_notsomuch": "Sistemak {total} swap baino ez ditu. Gutxienez {recommended} izaten saiatu beharko zinateke sistema memoriarik gabe gera ez dadin.", "diagnosis_security_vulnerable_to_meltdown_details": "Arazoa konpontzeko, sistema eguneratu eta berrabiarazi beharko zenuke linux-en kernel berriagoa erabiltzeko (edo zerbitzariaren arduradunarekin jarri harremanetan). Ikus https://meltdownattack.com/ argibide gehiagorako.", "diagnosis_services_conf_broken": "{service} zerbitzuko konfigurazioa hondatuta dago!", - "diagnosis_services_bad_status_tip": "Zerbitzua berrabiarazten saia zaitezke eta nahikoa ez bada, aztertu zerbitzuaren erregistroa administrariaren webgunean. (komandoak nahiago badituzu yunohost service restart {service} eta yunohost service log {service} hurrenez hurren).", + "diagnosis_services_bad_status_tip": "Zerbitzua berrabiarazten saia zaitezke eta nahikoa ez bada, aztertu zerbitzuaren erregistroa administrazio-atarian. (komandoak nahiago badituzu yunohost service restart {service} eta yunohost service log {service} hurrenez hurren).", "diagnosis_mail_ehlo_unreachable_details": "Ezinezkoa izan da zure zerbitzariko 25. atakari konektatzea IPv{ipversion} erabiliz. Badirudi ez dagoela eskuragarri.
1. Arazo honen zergati ohikoena 25. ataka egoki birbideratuta ez egotea da.
2. Egiaztatu postfix zerbitzua martxan dagoela.
3. Konfigurazio konplexuagoetan: egiaztatu suebaki edo reverse-proxyak konexioa oztopatzen ez dutela.", "group_already_exist_on_system_but_removing_it": "{group} taldea existitzen da sistemaren taldeetan, baina YunoHostek ezabatuko du…", "diagnosis_mail_fcrdns_nok_details": "Lehenik eta behin zure routerraren konfigurazio gunean edo hostingaren enpresaren aukeretan alderantzizko DNSa konfiguratzen saiatu beharko zinateke {ehlo_domain} erabiliz. (Hosting enpresaren arabera, ezinbestekoa da beraiekin harremanetan jartzea).", @@ -470,7 +470,7 @@ "diagnosis_mail_fcrdns_dns_missing": "Ez da alderantzizko DNSrik ezarri IPv{ipversion}rako. Litekeena da hartzaileak posta elektroniko batzuk jaso ezin izatea edo mezuok spam modura etiketatuak izatea.", "log_backup_create": "Sortu babeskopia fitxategia", "global_settings_setting_backup_compress_tar_archives": "Babeskopia berriak sortzean, konprimitu fitxategiak (.tar.gz) konprimitu gabeko fitxategien (.tar) ordez. Aukera hau gaitzean babeskopiek espazio gutxiago beharko dute, baina hasierako prozesua luzeagoa izango da eta CPUari lan handiagoa eragingo dio.", - "global_settings_setting_security_webadmin_allowlist": "Administrazio-webgunea bisita ditzaketen IP helbideak, koma bidez bereiziak.", + "global_settings_setting_security_webadmin_allowlist": "Administrazio-ataria bisita dezaketen IP helbideak, koma bidez bereiziak.", "global_settings_key_doesnt_exists": "'{settings_key}' gakoa ez da existitzen konfigurazio orokorrean; erabilgarri dauden gakoak ikus ditzakezu 'yunohost settings list' exekutatuz", "global_settings_setting_ssowat_panel_overlay_enabled": "Gaitu SSOwat paneleko \"overlay\"a", "log_backup_restore_system": "Lehengoratu sistema babeskopia fitxategi batetik", @@ -505,12 +505,12 @@ "yunohost_already_installed": "YunoHost instalatuta dago dagoeneko", "migration_0015_not_stretch": "Debianen oraingo bertsioa ez da Stretch!", "migrations_success_forward": "{id} migrazioak amaitu du", - "migrations_to_be_ran_manually": "{id} migrazioa eskuz abiarazi behar da. Mesedez, joan Erramintak → Migrazioak atalera administrazio-webgunean edo bestela exekutatu 'yunohost tools migrations run'.", + "migrations_to_be_ran_manually": "{id} migrazioa eskuz abiarazi behar da. Mesedez, joan Erramintak → Migrazioak atalera administrazio-atarian edo bestela exekutatu 'yunohost tools migrations run'.", "permission_currently_allowed_for_all_users": "Baimen hau erabiltzaile guztiei esleitzen zaie eta baita beste talde batzuei ere. Litekeena da 'all users' baimena edo esleituta duten taldeei baimena kendu nahi izatea.", "permission_require_account": "'{permission}' baimena zerbitzarian kontua duten erabiltzaileentzat da eta, beraz, ezin da gaitu bisitarientzat.", "postinstall_low_rootfsspace": "'root' fitxategi-sistemak 10 GB edo espazio gutxiago dauka, kezkatzekoa dena! Litekeena da espaziorik gabe geratzea aurki! Gomendagarria da 'root' fitxategi-sistemak gutxienez 16 GB libre izatea. Jakinarazpen honen ondoren YunoHost instalatzen jarraitu nahi baduzu, berrabiarazi agindua '--force-diskspace' gehituz", "this_action_broke_dpkg": "Eragiketa honek dpkg/APT (sistemaren pakete kudeatzaileak) kaltetu ditu… Arazoa konpontzeko SSH bidez konektatu eta 'sudo apt install --fix-broken' edota 'sudo dpkg --configure -a' exekutatu dezakezu.", - "tools_upgrade_special_packages_explanation": "Eguneraketa bereziak atzeko planoan jarraituko du. Mesedez, ez abiarazi bestelako eragiketarik datozen ~10 minutuetan (zure hardwarearen abiaduraren arabera). Honen ondoren litekeena da saioa berriro hasi behar izatea. Eguneraketaren erregistroa Erramintak → Erregistroak (administrazio-webgunean) edo 'yunohost log list' komandoa erabiliz egongo da ikusgai.", + "tools_upgrade_special_packages_explanation": "Eguneraketa bereziak atzeko planoan jarraituko du. Mesedez, ez abiarazi bestelako eragiketarik datozen ~10 minutuetan (zure hardwarearen abiaduraren arabera). Honen ondoren litekeena da saioa berriro hasi behar izatea. Eguneraketaren erregistroa Erramintak → Erregistroak atalean (administrazio-atarian) edo 'yunohost log list' komandoa erabiliz egongo da ikusgai.", "user_import_bad_line": "{line} lerro okerra: {details}", "restore_complete": "Lehengoratzea amaitu da", "restore_extracting": "Behar diren fitxategiak ateratzen…", @@ -659,7 +659,7 @@ "port_already_opened": "{port}. ataka dagoeneko irekita dago {ip_version} konexioetarako", "user_home_creation_failed": "Ezin izan da erabiltzailearentzat '{home}' direktorioa sortu", "user_unknown": "Erabiltzaile ezezaguna: {user}", - "yunohost_postinstall_end_tip": "Instalazio ondorengo prozesua amaitu da! Sistemaren konfigurazioa bukatzeko:\n- gehitu erabiltzaile bat administrazio-webguneko 'Erabiltzaileak' atalean (edo 'yunohost user create ' komandoa erabiliz);\n- erabili 'Diagnostikoa' atala ohiko arazoei aurre hartzeko. Administrazio-webgunean abiarazi edo 'yunohost diagnosis run' exekutatu;\n- irakurri 'Finalizing your setup' eta 'Getting to know YunoHost' atalak. Dokumentazioan aurki ditzakezu: https://yunohost.org/admindoc.", + "yunohost_postinstall_end_tip": "Instalazio ondorengo prozesua amaitu da! Sistemaren konfigurazioa bukatzeko:\n- gehitu erabiltzaile bat administrazio-atariko 'Erabiltzaileak' atalean (edo 'yunohost user create ' komandoa erabiliz);\n- erabili 'Diagnostikoak' atala ohiko arazoei aurre hartzeko. Administrazio-atarian abiarazi edo 'yunohost diagnosis run' exekutatu;\n- irakurri 'Finalizing your setup' eta 'Getting to know YunoHost' atalak. Dokumentazioan aurki ditzakezu: https://yunohost.org/admindoc.", "yunohost_not_installed": "YunoHost ez da zuzen instalatu. Mesedez, exekutatu 'yunohost tools postinstall'", "migration_0019_slapd_config_will_be_overwritten": "Badirudi eskuz moldatu duzula slapd konfigurazioa. Migrazio garrantzitsu honetarako, YunoHostek slapd ezarpenak eguneratu behar ditu. Oraingo fitxategiak {conf_backup_folder}-n kopiatuko dira.", "unlimit": "Mugarik ez", From 983c1a81ba54bb30c68ed6804e021634c96c3988 Mon Sep 17 00:00:00 2001 From: dagangtie Date: Fri, 5 Nov 2021 14:31:34 +0000 Subject: [PATCH 096/146] Translated using Weblate (Chinese (Simplified)) Currently translated at 89.2% (629 of 705 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/zh_Hans/ --- locales/zh_Hans.json | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/locales/zh_Hans.json b/locales/zh_Hans.json index 9176ebab9..fa3b7bb03 100644 --- a/locales/zh_Hans.json +++ b/locales/zh_Hans.json @@ -625,5 +625,30 @@ "log_user_group_delete": "删除组'{}'", "log_user_group_create": "创建组'{}'", "log_user_delete": "删除用户'{}'", - "log_user_create": "添加用户'{}'" -} \ No newline at end of file + "log_user_create": "添加用户'{}'", + "domain_registrar_is_not_configured": "尚未为域 {domain} 配置注册商。", + "domain_dns_push_not_applicable": "的自动DNS配置的特征是不适用域{域}。您应该按照 https://yunohost.org/dns_config 上的文档手动配置DNS 记录。", + "disk_space_not_sufficient_update": "没有足够的磁盘空间来更新此应用程序", + "diagnosis_high_number_auth_failures": "最近出现了大量可疑的失败身份验证。您的fail2ban正在运行且配置正确,或使用自定义端口的SSH作为https://yunohost.org/解释的安全性。", + "diagnosis_apps_not_in_app_catalog": "此应用程序不在 YunoHost 的应用程序目录中。如果它过去有被删除过,您应该考虑卸载此应用程,因为它不会更新,并且可能会损害您系统的完整和安全性。", + "app_config_unable_to_apply": "无法应用配置面板值。", + "app_config_unable_to_read": "无法读取配置面板值。", + "config_forbidden_keyword": "关键字“{keyword}”是保留的,您不能创建或使用带有此 ID 的问题的配置面板。", + "config_no_panel": "未找到配置面板。", + "config_unknown_filter_key": "该过滤器钥匙“{filter_key}”有误。", + "diagnosis_apps_outdated_ynh_requirement": "此应用程序的安装 版本只需要 yunohost >= 2.x,这往往表明它与推荐的打包实践和帮助程序不是最新的。你真的应该考虑更新它。", + "disk_space_not_sufficient_install": "没有足够的磁盘空间来安装此应用程序", + "config_apply_failed": "应用新配置 失败:{错误}", + "config_cant_set_value_on_section": "无法在整个配置部分设置单个值 。", + "config_validate_color": "是有效的 RGB 十六进制颜色", + "config_validate_date": "有效日期格式为YYYY-MM-DD", + "config_validate_email": "是有效的电子邮件", + "config_validate_time": "应该是像 HH:MM 这样的有效时间", + "config_validate_url": "应该是有效的URL", + "config_version_not_supported": "不支持配置面板版本“{ version }”。", + "danger": "警告:", + "diagnosis_apps_allgood": "所有已安装的应用程序都遵守基本的打包原则", + "diagnosis_apps_deprecated_practices": "此应用程序的安装 版本仍然使用一些超旧的弃用打包原则。推荐您升级它。", + "diagnosis_apps_issue": "发现应用{ app } 存在问题", + "diagnosis_description_apps": "应用" +} From d066aab364b4f1a382a96e5e917a718defd6bbdf Mon Sep 17 00:00:00 2001 From: liimee Date: Sat, 6 Nov 2021 00:46:35 +0000 Subject: [PATCH 097/146] Translated using Weblate (Indonesian) Currently translated at 6.2% (44 of 705 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/id/ --- locales/id.json | 47 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/locales/id.json b/locales/id.json index 9e26dfeeb..1f28ae7e5 100644 --- a/locales/id.json +++ b/locales/id.json @@ -1 +1,46 @@ -{} \ No newline at end of file +{ + "admin_password": "Kata sandi administrasi", + "admin_password_change_failed": "Tidak dapat mengubah kata sandi", + "admin_password_changed": "Kata sandi administrasi diubah", + "admin_password_too_long": "Harap pilih kata sandi yang lebih pendek dari 127 karakter", + "already_up_to_date": "Tak ada yang harus dilakukan. Semuanya sudah mutakhir.", + "app_action_broke_system": "Tindakan ini sepertinya telah merusak layanan-layanan penting ini: {services}", + "app_already_installed": "{app} sudah terpasang", + "app_already_up_to_date": "{app} sudah dalam versi mutakhir", + "app_argument_required": "Argumen '{name}' dibutuhkan", + "app_change_url_identical_domains": "Domain)url_path yang lama dan baru identik ('{domain}{path}'), tak ada yang perlu dilakukan.", + "app_change_url_no_script": "Aplikasi '{app_name}' belum mendukung pengubahan URL. Mungkin Anda harus memperbaruinya.", + "app_change_url_success": "URL {app} sekarang adalah {domain}{path}", + "app_id_invalid": "ID aplikasi tidak valid", + "app_install_failed": "Tidak dapat memasang {app}: {error}", + "app_install_files_invalid": "Berkas-berkas ini tidak dapat dipasang", + "app_install_script_failed": "Sebuah kesalahan terjadi pada script pemasangan aplikasi", + "app_manifest_install_ask_admin": "Pilih seorang administrator untuk aplikasi ini", + "app_manifest_install_ask_domain": "Pilih di domain mana aplikasi ini harus dipasang", + "app_not_installed": "Tidak dapat menemukan {app} di daftar aplikasi yang terpasang: {all_apps}", + "app_not_properly_removed": "{app} belum dihapus dengan benar", + "app_remove_after_failed_install": "Menghapus aplikasi mengikuti kegagalan pemasangan...", + "app_removed": "{app} dihapus", + "app_restore_failed": "Tidak dapat memulihkan {app}: {error}", + "app_upgrade_some_app_failed": "Beberapa aplikasi tidak dapat diperbarui", + "app_upgraded": "{app} diperbarui", + "apps_already_up_to_date": "Semua aplikasi sudah pada versi mutakhir", + "apps_catalog_update_success": "Katalog aplikasi telah diperbarui!", + "apps_catalog_updating": "Memperbarui katalog aplikasi...", + "ask_firstname": "Nama depan", + "ask_lastname": "Nama belakang", + "ask_main_domain": "Domain utama", + "ask_new_domain": "Domain baru", + "ask_user_domain": "Domain yang digunakan untuk alamat surel dan akun XMPP pengguna", + "app_not_correctly_installed": "{app} kelihatannya terpasang dengan salah", + "app_start_restore": "Memulihkan {app}...", + "app_unknown": "Aplikasi tak dikenal", + "ask_new_admin_password": "Kata sandi administrasi baru", + "ask_password": "Kata sandi", + "app_upgrade_app_name": "Memperbarui {app}...", + "app_upgrade_failed": "Tidak dapat memperbarui {app}: {error}", + "app_start_install": "Memasang {app}...", + "app_start_remove": "Menghapus {app}...", + "app_manifest_install_ask_password": "Pilih kata sandi administrasi untuk aplikasi ini", + "app_upgrade_several_apps": "Aplikasi-aplikasi berikut akan diperbarui: {apps}" +} From 347e972693581a720324cb42160a4d3adb1604e2 Mon Sep 17 00:00:00 2001 From: Flavio Cristoforetti Date: Mon, 8 Nov 2021 11:56:54 +0000 Subject: [PATCH 098/146] Translated using Weblate (Italian) Currently translated at 88.6% (625 of 705 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/it/ --- locales/it.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/locales/it.json b/locales/it.json index 1332712ef..f47223a37 100644 --- a/locales/it.json +++ b/locales/it.json @@ -629,5 +629,7 @@ "global_settings_setting_security_webadmin_allowlist": "Indirizzi IP con il permesso di accedere al webadmin, separati da virgola.", "global_settings_setting_security_webadmin_allowlist_enabled": "Permetti solo ad alcuni IP di accedere al webadmin.", "disk_space_not_sufficient_update": "Non c'è abbastanza spazio libero per aggiornare questa applicazione", - "disk_space_not_sufficient_install": "Non c'è abbastanza spazio libero per installare questa applicazione" -} \ No newline at end of file + "disk_space_not_sufficient_install": "Non c'è abbastanza spazio libero per installare questa applicazione", + "app_config_unable_to_apply": "Applicazione dei valori nel pannello di configurazione non riuscita.", + "app_config_unable_to_read": "Lettura dei valori nel pannello di configurazione non riuscita." +} From cfb05e0ca50f5e335195d37bdac1d01fb8bd5d2d Mon Sep 17 00:00:00 2001 From: Tymofii-Lytvynenko Date: Wed, 10 Nov 2021 11:56:01 +0000 Subject: [PATCH 099/146] Translated using Weblate (Ukrainian) Currently translated at 100.0% (705 of 705 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/uk/ --- locales/uk.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/locales/uk.json b/locales/uk.json index 648c97fca..4baf6d20f 100644 --- a/locales/uk.json +++ b/locales/uk.json @@ -247,8 +247,8 @@ "log_help_to_get_log": "Щоб переглянути журнал операції '{desc}', використовуйте команду 'yunohost log show {name}'", "log_link_to_log": "Повний журнал цієї операції: '{desc}'", "log_corrupted_md_file": "Файл метаданих YAML, пов'язаний з журналами, пошкоджено: '{md_file}\nПомилка: {error}'", - "iptables_unavailable": "Ви не можете грати з iptables тут. Ви перебуваєте або в контейнері, або ваше ядро не підтримує його", - "ip6tables_unavailable": "Ви не можете грати з ip6tables тут. Ви перебуваєте або в контейнері, або ваше ядро не підтримує його", + "iptables_unavailable": "Ви не можете відтворювати з iptables тут. Ви перебуваєте або в контейнері, або ваше ядро не підтримує його", + "ip6tables_unavailable": "Ви не можете відтворювати з ip6tables тут. Ви перебуваєте або в контейнері, або ваше ядро не підтримує його", "invalid_regex": "Неприпустимий regex: '{regex}'", "installation_complete": "Установлення завершено", "hook_name_unknown": "Невідома назва хука '{name}'", From d9b53b08ea58140f546d3e794c791b2b0e66b2e8 Mon Sep 17 00:00:00 2001 From: Tommi Date: Sun, 14 Nov 2021 12:17:12 +0000 Subject: [PATCH 100/146] Translated using Weblate (Italian) Currently translated at 99.8% (704 of 705 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/it/ --- locales/it.json | 80 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 77 insertions(+), 3 deletions(-) diff --git a/locales/it.json b/locales/it.json index f47223a37..7f3997839 100644 --- a/locales/it.json +++ b/locales/it.json @@ -42,7 +42,7 @@ "ask_new_admin_password": "Nuova password dell'amministrazione", "backup_app_failed": "Non è possibile fare il backup {app}", "backup_archive_app_not_found": "{app} non è stata trovata nel archivio di backup", - "app_argument_choice_invalid": "Usa una delle seguenti scelte '{choices}' per il parametro '{name}' invece di '{value}'", + "app_argument_choice_invalid": "Scegli un opzione valida per il parametro '{name}': '{value}' non è fra le opzioni disponibili ('{choices}')", "app_argument_invalid": "Scegli un valore valido per il parametro '{name}': {error}", "app_argument_required": "L'argomento '{name}' è requisito", "app_id_invalid": "Identificativo dell'applicazione non valido", @@ -301,7 +301,7 @@ "app_manifest_install_ask_is_public": "Quest'applicazione dovrà essere visibile ai visitatori anonimi?", "app_manifest_install_ask_admin": "Scegli un utente amministratore per quest'applicazione", "app_manifest_install_ask_password": "Scegli una password di amministrazione per quest'applicazione", - "app_manifest_install_ask_path": "Scegli il percorso dove installare quest'applicazione", + "app_manifest_install_ask_path": "Scegli il percorso URL (dopo il dominio) dove installare quest'applicazione", "app_manifest_install_ask_domain": "Scegli il dominio dove installare quest'app", "app_argument_password_no_default": "Errore durante il parsing dell'argomento '{name}': l'argomento password non può avere un valore di default per ragioni di sicurezza", "additional_urls_already_added": "L'URL aggiuntivo '{url}' è già utilizzato come URL aggiuntivo per il permesso '{permission}'", @@ -631,5 +631,79 @@ "disk_space_not_sufficient_update": "Non c'è abbastanza spazio libero per aggiornare questa applicazione", "disk_space_not_sufficient_install": "Non c'è abbastanza spazio libero per installare questa applicazione", "app_config_unable_to_apply": "Applicazione dei valori nel pannello di configurazione non riuscita.", - "app_config_unable_to_read": "Lettura dei valori nel pannello di configurazione non riuscita." + "app_config_unable_to_read": "Lettura dei valori nel pannello di configurazione non riuscita.", + "diagnosis_apps_issue": "È stato rilevato un errore per l’app {app}", + "global_settings_setting_security_nginx_redirect_to_https": "Reindirizza richieste HTTP a HTTPs di default (NON DISABILITARE a meno che tu non sappia veramente bene cosa stai facendo!)", + "diagnosis_http_special_use_tld": "Il dominio {domain} è basato su un dominio di primo livello (TLD) dall’uso speciale, come .local o .test, perciò non è previsto che sia esposto al di fuori della rete locale.", + "domain_dns_conf_special_use_tld": "Questo dominio è basato su un dominio di primo livello (TLD) dall’uso speciale, come .local o .test, perciò non è previsto abbia reali record DNS.", + "domain_dns_push_not_applicable": "La configurazione automatica del DNS non è applicabile al dominio {domain}. Dovresti configurare i tuoi record DNS manualmente, seguendo la documentazione su https://yunohost.org/dns_config.", + "domain_dns_registrar_not_supported": "YunoHost non è riuscito a riconoscere quale registrar sta gestendo questo dominio. Dovresti configurare i tuoi record DNS manualmente, seguendo la documentazione.", + "domain_dns_registrar_experimental": "Per ora, il collegamento con le API di **{registrar}** non è stata opportunamente testata e revisionata dalla comunità di YunoHost. Questa funzionalità è **altamente sperimentale**, fai attenzione!", + "domain_dns_push_failed_to_authenticate": "L’autenticazione sulle API del registrar per il dominio '{domain}' è fallita. Probabilmente le credenziali non sono corrette. (Error: {error})", + "domain_dns_push_failed_to_list": "Il reperimento dei record attuali usando le API del registrar è fallito: {error}", + "domain_dns_push_already_up_to_date": "I record sono aggiornati, nulla da fare.", + "domain_dns_pushing": "Sincronizzando i record DNS…", + "domain_config_mail_out": "Email in uscita", + "domain_config_xmpp": "Messaggistica (XMPP)", + "domain_config_auth_token": "Token di autenticazione", + "domain_config_auth_key": "Chiave di autenticazione", + "domain_config_auth_secret": "Autenticazione segreta", + "domain_config_api_protocol": "Protocollo API", + "domain_config_auth_entrypoint": "API entry point", + "other_available_options": "… e {n} altre opzioni di variabili non mostrate", + "service_description_yunomdns": "Ti permette di raggiungere il tuo server usando 'yunohost.local' all’interno della tua rete locale", + "user_import_nothing_to_do": "Nessun utente deve essere importato", + "user_import_partial_failed": "L’importazione degli utenti è parzialmente fallita", + "domain_unknown": "Il dominio '{domain}' è sconosciuto", + "log_user_import": "Importa utenti", + "invalid_password": "Password non valida", + "diagnosis_high_number_auth_failures": "Recentemente c’è stato un numero insolitamente alto di autenticazioni fallite. Potresti assicurarti che fail2ban stia funzionando e che sia configurato correttamente, oppure usare una differente porta SSH, come spiegato in https://yunohost.org/security.", + "diagnosis_apps_allgood": "Tutte le applicazioni installate rispettano le pratiche di packaging di base", + "config_apply_failed": "L’applicazione della nuova configurazione è fallita: {error}", + "diagnosis_apps_outdated_ynh_requirement": "La versione installata di quest’app richiede esclusivamente YunoHost >= 2.x, che tendenzialmente significa che non è aggiornata secondo le pratiche di packaging raccomandate. Dovresti proprio considerare di aggiornarla.", + "global_settings_setting_security_experimental_enabled": "Abilita funzionalità di sicurezza sperimentali (non abilitare se non sai cosa stai facendo!)", + "invalid_number_min": "Deve essere più grande di {min}", + "invalid_number_max": "Deve essere meno di {max}", + "log_app_config_set": "Applica la configurazione all’app '{}'", + "log_domain_dns_push": "Sincronizza i record DNS per il dominio '{}'", + "user_import_bad_file": "Il tuo file CSV non è formattato correttamente e sarà ignorato per evitare potenziali perdite di dati", + "user_import_failed": "L’operazione di importazione è completamente fallita", + "user_import_missing_columns": "Mancano le seguenti colonne: {columns}", + "user_import_success": "Utenti importati con successo", + "diagnosis_apps_bad_quality": "Sul catalogo delle applicazioni di YunoHost, questa applicazione è momentaneamente segnalata come non funzionante. Potrebbe trattarsi di un problema temporaneo, mentre i manutentori provano a risolverlo. Nel frattempo, l’aggiornamento di quest’app è disabilitato.", + "diagnosis_apps_broken": "Sul catalogo delle applicazioni di YunoHost, questa applicazione è momentaneamente segnalata come non funzionante. Potrebbe trattarsi di un problema temporaneo, mentre i manutentori provano a risolverlo. Nel frattempo, l’aggiornamento di quest’app è disabilitato.", + "diagnosis_apps_deprecated_practices": "La versione installata di questa app usa ancora delle pratiche di packaging super-vecchie oppure deprecate. Dovresti proprio considerare di aggiornarla.", + "diagnosis_apps_not_in_app_catalog": "Questa applicazione non è nel catalogo delle applicazioni di YunoHost. Se precedentemente lo era ed è stata rimossa, dovresti considerare di disinstallare l’app, dato che non riceverà aggiornamenti e potrebbe compromettere l’integrità e la sicurezza del tuo sistema.", + "diagnosis_dns_specialusedomain": "Il dominio {domain} è basato su un dominio di primo livello (TLD) dall’uso speciale, come .local o .test, perciò non è previsto abbia reali record DNS.", + "domain_dns_registrar_supported": "YunoHost ha automaticamente riconosciuto che questo dominio è gestito dal registrar **{registrar}**. Se vuoi e se fornirai le credenziali API appropriate, YunoHost può configurare automaticamente questa zona DNS. Puoi trovare la documentazione su come ottenere le tue credenziali API su questa pagina. (Puoi anche configurare i tuoi record DNS manualmente, seguendo la documentazione)", + "service_not_reloading_because_conf_broken": "Non sto ricaricando/riavviando il servizio '{name}' perché la sua configurazione è rotta: {errors}", + "config_cant_set_value_on_section": "Non puoi impostare un unico parametro in un’intera sezione della configurazione.", + "config_forbidden_keyword": "La parola chiave '{keyword}' è riservata, non puoi creare o utilizzare un pannello di configurazione con una domanda con questo id.", + "config_no_panel": "Nessun panello di configurazione trovato.", + "config_unknown_filter_key": "Il valore del filtro '{filter_key}' non è corretto.", + "config_validate_color": "È necessario inserire un codice colore in RGB esadecimale", + "config_validate_date": "È necessario inserire una data valida nel formato AAAA-MM-GG", + "config_validate_email": "È necessario inserire un’email valida", + "diagnosis_description_apps": "Applicazioni", + "domain_registrar_is_not_configured": "Il registrar non è ancora configurato per il dominio {domain}.", + "domain_dns_registrar_managed_in_parent_domain": "Questo dominio è un sotto-dominio di {parent_domain_link}. La configurazione del registrar DNS dovrebbe essere gestita dal pannello di configurazione di {parent_domain}.", + "domain_dns_registrar_yunohost": "Questo dominio è un nohost.me / nohost.st / ynh.fr, perciò la sua configurazione DNS è gestita automaticamente da YunoHost, senza alcuna ulteriore configurazione. (vedi il comando yunohost dyndns update)", + "domain_dns_push_success": "Record DNS aggiornati!", + "domain_dns_push_failed": "L’aggiornamento dei record DNS è miseramente fallito.", + "domain_dns_push_partial_failure": "Record DNS parzialmente aggiornati: alcuni segnali/errori sono stati riportati.", + "domain_config_features_disclaimer": "Per ora, abilitare/disabilitare le impostazioni di posta o XMPP impatta unicamente sulle configurazioni DNS raccomandate o ottimizzate, non cambia quelle di sistema!", + "domain_config_mail_in": "Email in arrivo", + "domain_config_auth_application_key": "Chiave applicazione", + "domain_config_auth_application_secret": "Chiave segreta applicazione", + "domain_config_auth_consumer_key": "Chiave consumatore", + "ldap_attribute_already_exists": "L’attributo LDAP '{attribute}' esiste già con il valore '{value}'", + "config_validate_time": "È necessario inserire un orario valido, come HH:MM", + "config_version_not_supported": "Le versioni '{version}' del pannello di configurazione non sono supportate.", + "danger": "Attenzione:", + "log_domain_config_set": "Aggiorna la configurazione per il dominio '{}'", + "domain_dns_push_managed_in_parent_domain": "La configurazione automatica del DNS è gestita nel dominio genitore {parent_domain}.", + "user_import_bad_line": "Linea errata {line}: {details}", + "config_validate_url": "È necessario inserire un URL web valido", + "ldap_server_down": "Impossibile raggiungere il server LDAP", + "ldap_server_is_down_restart_it": "Il servizio LDAP è down, prova a riavviarlo…" } From 4154ece1bbbe09eb9d668411114bfb06910c754a Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sun, 14 Nov 2021 21:07:58 +0000 Subject: [PATCH 101/146] [CI] Reformat / remove stale translated strings --- locales/ca.json | 3 --- locales/de.json | 5 +---- locales/eo.json | 2 -- locales/es.json | 5 +---- locales/eu.json | 3 +-- locales/fa.json | 4 ---- locales/fr.json | 9 +-------- locales/gl.json | 9 +-------- locales/hi.json | 1 - locales/id.json | 2 +- locales/it.json | 5 +---- locales/nb_NO.json | 1 - locales/nl.json | 1 - locales/oc.json | 4 +--- locales/pt.json | 3 +-- locales/ru.json | 3 +-- locales/sl.json | 2 +- locales/uk.json | 9 +-------- locales/zh_Hans.json | 9 +++------ 19 files changed, 15 insertions(+), 65 deletions(-) diff --git a/locales/ca.json b/locales/ca.json index b29a94fb6..bb656214f 100644 --- a/locales/ca.json +++ b/locales/ca.json @@ -17,7 +17,6 @@ "app_install_files_invalid": "Aquests fitxers no es poden instal·lar", "app_make_default_location_already_used": "No es pot fer l'aplicació '{app}' l'aplicació per defecte en el domini «{domain}», ja que ja és utilitzat per '{other_app}'", "app_location_unavailable": "Aquesta URL no està disponible o entra en conflicte amb aplicacions ja instal·lades:\n{apps}", - "app_manifest_invalid": "Hi ha algun error amb el manifest de l'aplicació: {error}", "app_not_correctly_installed": "{app} sembla estar mal instal·lada", "app_not_installed": "No s'ha trobat {app} en la llista d'aplicacions instal·lades: {all_apps}", "app_not_properly_removed": "{app} no s'ha pogut suprimir correctament", @@ -132,7 +131,6 @@ "domains_available": "Dominis disponibles:", "done": "Fet", "downloading": "Descarregant...", - "dyndns_could_not_check_provide": "No s'ha pogut verificar si {provider} pot oferir {domain}.", "dyndns_could_not_check_available": "No s'ha pogut verificar la disponibilitat de {domain} a {provider}.", "dyndns_ip_update_failed": "No s'ha pogut actualitzar l'adreça IP al DynDNS", "dyndns_ip_updated": "S'ha actualitzat l'adreça IP al DynDNS", @@ -590,7 +588,6 @@ "global_settings_setting_smtp_relay_password": "Tramesa de la contrasenya d'amfitrió SMTP", "global_settings_setting_smtp_relay_user": "Tramesa de compte d'usuari SMTP", "global_settings_setting_smtp_relay_port": "Port de tramesa SMTP", - "domain_name_unknown": "Domini «{domain}» desconegut", "diagnosis_processes_killed_by_oom_reaper": "El sistema ha matat alguns processos recentment perquè s'ha quedat sense memòria. Això acostuma a ser un símptoma de falta de memòria en el sistema o d'un procés que consumeix massa memòria. Llista dels processos que s'han matat:\n{kills_summary}", "diagnosis_package_installed_from_sury_details": "Alguns paquets s'han instal·lat per equivocació des d'un repositori de tercers anomenat Sury. L'equip de YunoHost a millorat l'estratègia per a gestionar aquests paquets, però s'espera que algunes configuracions que han instal·lat aplicacions PHP7.3 a Stretch puguin tenir algunes inconsistències. Per a resoldre aquesta situació, hauríeu d'intentar executar la següent ordre: {cmd_to_fix}", "diagnosis_package_installed_from_sury": "Alguns paquets del sistema s'han de tornar a versions anteriors", diff --git a/locales/de.json b/locales/de.json index 5dd8c059d..e491c5ac2 100644 --- a/locales/de.json +++ b/locales/de.json @@ -10,7 +10,6 @@ "app_extraction_failed": "Installationsdateien konnten nicht entpackt werden", "app_id_invalid": "Falsche App-ID", "app_install_files_invalid": "Diese Dateien können nicht installiert werden", - "app_manifest_invalid": "Mit dem App-Manifest stimmt etwas nicht: {error}", "app_not_installed": "{app} konnte nicht in der Liste installierter Apps gefunden werden: {all_apps}", "app_removed": "{app} wurde entfernt", "app_sources_fetch_failed": "Quelldateien konnten nicht abgerufen werden, ist die URL korrekt?", @@ -185,7 +184,6 @@ "experimental_feature": "Warnung: Der Maintainer hat diese Funktion als experimentell gekennzeichnet. Sie ist nicht stabil. Sie sollten sie nur verwenden, wenn Sie wissen, was Sie tun.", "dyndns_domain_not_provided": "Der DynDNS-Anbieter {provider} kann die Domäne(n) {domain} nicht bereitstellen.", "dyndns_could_not_check_available": "Konnte nicht überprüfen, ob {domain} auf {provider} verfügbar ist.", - "dyndns_could_not_check_provide": "Konnte nicht überprüft, ob {provider} die Domain(s) {domain} bereitstellen kann.", "domain_dns_conf_is_just_a_recommendation": "Dieser Befehl zeigt dir die *empfohlene* Konfiguration. Er konfiguriert *nicht* das DNS für dich. Es liegt in deiner Verantwortung, die DNS-Zone bei deinem DNS-Registrar nach dieser Empfehlung zu konfigurieren.", "dpkg_lock_not_available": "Dieser Befehl kann momentan nicht ausgeführt werden, da anscheinend ein anderes Programm die Sperre von dpkg (dem Systempaket-Manager) verwendet", "confirm_app_install_thirdparty": "WARNUNG! Diese Applikation ist nicht Teil des YunoHost-Applikationskatalogs. Das Installieren von Drittanbieterapplikationen könnte die Sicherheit und Integrität Ihres Systems beeinträchtigen. Sie sollten wahrscheinlich NICHT fortfahren, es sei denn, Sie wissen, was Sie tun. Es wird KEIN SUPPORT angeboten, wenn die Applikation nicht funktionieren oder Ihr System beschädigen sollte... Wenn Sie das Risiko trotzdem eingehen möchten, tippen Sie '{answers}'", @@ -435,7 +433,6 @@ "diagnosis_http_nginx_conf_not_up_to_date_details": "Um dieses Problem zu beheben, geben Sie in der Kommandozeile yunohost tools regen-conf nginx --dry-run --with-diff ein. Dieses Tool zeigt ihnen den Unterschied an. Wenn Sie damit einverstanden sind, können Sie mit yunohost tools regen-conf nginx --force die Änderungen übernehmen.", "diagnosis_backports_in_sources_list": "Sie haben anscheinend apt (den Paketmanager) für das Backports-Repository konfiguriert. Wir raten strikte davon ab, Pakete aus dem Backports-Repository zu installieren. Diese würden wahrscheinlich zu Instabilitäten und Konflikten führen. Es sei denn, Sie wissen was Sie tun.", "diagnosis_basesystem_hardware_model": "Das Servermodell ist {model}", - "domain_name_unknown": "Domäne '{domain}' unbekannt", "group_user_not_in_group": "Benutzer:in {user} ist nicht in der Gruppe {group}", "group_user_already_in_group": "Benutzer:in {user} ist bereits in der Gruppe {group}", "group_cannot_edit_visitors": "Die Gruppe \"Besucher\" kann nicht manuell editiert werden. Sie ist eine Sondergruppe und repräsentiert anonyme Besucher", @@ -642,4 +639,4 @@ "config_validate_time": "Sollte eine zulässige Zeit wie HH:MM sein", "config_validate_url": "Sollte eine zulässige web URL sein", "config_version_not_supported": "Konfigurationspanel Versionen '{version}' sind nicht unterstützt." -} +} \ No newline at end of file diff --git a/locales/eo.json b/locales/eo.json index 8973e6344..49040b768 100644 --- a/locales/eo.json +++ b/locales/eo.json @@ -51,7 +51,6 @@ "ask_new_path": "Nova vojo", "backup_custom_mount_error": "Propra rezerva metodo ne povis preterpasi la paŝon 'monto'", "app_upgrade_app_name": "Nun ĝisdatigu {app}...", - "app_manifest_invalid": "Io misas pri la aplika manifesto: {error}", "backup_cleaning_failed": "Ne povis purigi la provizoran rezervan dosierujon", "backup_creation_failed": "Ne povis krei la rezervan ar archiveivon", "backup_hook_unknown": "La rezerva hoko '{hook}' estas nekonata", @@ -244,7 +243,6 @@ "log_help_to_get_failed_log": "La operacio '{desc}' ne povis finiĝi. Bonvolu dividi la plenan ŝtipon de ĉi tiu operacio per la komando 'yunohost log share {name}' por akiri helpon", "port_already_closed": "Haveno {port} estas jam fermita por {ip_version} rilatoj", "hook_name_unknown": "Nekonata hoko-nomo '{name}'", - "dyndns_could_not_check_provide": "Ne povis kontroli ĉu {provider} povas provizi {domain}.", "restore_nothings_done": "Nenio estis restarigita", "log_tools_postinstall": "Afiŝu vian servilon YunoHost", "dyndns_unavailable": "La domajno '{domain}' ne haveblas.", diff --git a/locales/es.json b/locales/es.json index dec90b42b..d6382c262 100644 --- a/locales/es.json +++ b/locales/es.json @@ -10,7 +10,6 @@ "app_extraction_failed": "No se pudieron extraer los archivos de instalación", "app_id_invalid": "ID de la aplicación no válida", "app_install_files_invalid": "Estos archivos no se pueden instalar", - "app_manifest_invalid": "Algo va mal con el manifiesto de la aplicación: {error}", "app_not_correctly_installed": "La aplicación {app} 8 parece estar incorrectamente instalada", "app_not_installed": "No se pudo encontrar «{app}» en la lista de aplicaciones instaladas: {all_apps}", "app_not_properly_removed": "La {app} 0 no ha sido desinstalada correctamente", @@ -194,7 +193,6 @@ "backup_system_part_failed": "No se pudo respaldar la parte del sistema «{part}»", "backup_with_no_backup_script_for_app": "La aplicación «{app}» no tiene un guión de respaldo. Omitiendo.", "backup_with_no_restore_script_for_app": "«{app}» no tiene un script de restauración, no podá restaurar automáticamente la copia de seguridad de esta aplicación.", - "dyndns_could_not_check_provide": "No se pudo verificar si {provider} puede ofrecer {domain}.", "dyndns_domain_not_provided": "El proveedor de DynDNS {provider} no puede proporcionar el dominio {domain}.", "experimental_feature": "Aviso : esta funcionalidad es experimental y no se considera estable, no debería usarla a menos que sepa lo que está haciendo.", "good_practices_about_user_password": "Ahora está a punto de definir una nueva contraseña de usuario. La contraseña debe tener al menos 8 caracteres, aunque es una buena práctica usar una contraseña más larga (es decir, una frase de contraseña) y / o una variación de caracteres (mayúsculas, minúsculas, dígitos y caracteres especiales).", @@ -544,7 +542,6 @@ "global_settings_setting_smtp_relay_port": "Puerto de envio / relay SMTP", "global_settings_setting_smtp_relay_host": "El servidor relay de SMTP para enviar correo en lugar de esta instalación YunoHost. Útil si estás en una de estas situaciones: tu puerto 25 esta bloqueado por tu ISP o VPS, si estás en usado una IP marcada como residencial o DUHL, si no puedes configurar un DNS inverso o si el servidor no está directamente expuesto a internet y quieres utilizar otro servidor para enviar correos.", "global_settings_setting_smtp_allow_ipv6": "Permitir el uso de IPv6 para enviar y recibir correo", - "domain_name_unknown": "Dominio «{domain}» desconocido", "diagnosis_processes_killed_by_oom_reaper": "Algunos procesos fueron terminados por el sistema recientemente porque se quedó sin memoria. Típicamente es sintoma de falta de memoria o de un proceso que se adjudicó demasiada memoria.
Resumen de los procesos terminados:
\n{kills_summary}", "diagnosis_http_nginx_conf_not_up_to_date_details": "Para arreglar este asunto, estudia las diferencias mediante el comando yunohost tools regen-conf nginx --dry-run --with-diff y si te parecen bien aplica los cambios mediante yunohost tools regen-conf nginx --force.", "diagnosis_http_nginx_conf_not_up_to_date": "Parece que la configuración nginx de este dominio haya sido modificada manualmente, esto no deja que YunoHost pueda diagnosticar si es accesible mediante HTTP.", @@ -587,4 +584,4 @@ "app_config_unable_to_read": "No se pudieron leer los valores del panel configuración.", "backup_create_size_estimation": "El archivo contendrá aproximadamente {size} de datos.", "config_cant_set_value_on_section": "No puede establecer un único valor en una sección de configuración completa." -} +} \ No newline at end of file diff --git a/locales/eu.json b/locales/eu.json index 1f69866bb..21c23260c 100644 --- a/locales/eu.json +++ b/locales/eu.json @@ -368,7 +368,6 @@ "log_app_change_url": "'{}' aplikazioaren URLa aldatu", "log_app_config_set": "Ezarri '{}' aplikazioko konfigurazioa", "downloading": "Deskargatzen…", - "dyndns_could_not_check_provide": "Ezinezkoa izan da {provider}(e)k {domain} eskaini dezakeen egiaztatzea.", "log_available_on_yunopaste": "Erregistroa {url} estekan ikus daiteke", "log_dyndns_update": "Eguneratu YunoHosten '{}' domeinuari lotutako IP helbidea", "log_letsencrypt_cert_install": "Instalatu Let's Encrypt ziurtagiria '{}' domeinurako", @@ -705,4 +704,4 @@ "service_description_rspamd": "Spama bahetu eta posta elektronikoarekin zerikusia duten bestelako futzioen ardura dauka", "service_description_slapd": "Erabiltzaileak, domeinuak eta hauei lotutako informazioa gordetzen du", "service_description_yunohost-api": "YunoHosten web-atariaren eta sistemaren arteko hartuemana kudeatzen du" -} +} \ No newline at end of file diff --git a/locales/fa.json b/locales/fa.json index f566fed90..e7ab1595f 100644 --- a/locales/fa.json +++ b/locales/fa.json @@ -183,7 +183,6 @@ "app_manifest_install_ask_password": "گذرواژه مدیریتی را برای این برنامه انتخاب کنید", "app_manifest_install_ask_path": "مسیر URL (بعد از دامنه) را انتخاب کنید که این برنامه باید در آن نصب شود", "app_manifest_install_ask_domain": "دامنه ای را انتخاب کنید که این برنامه باید در آن نصب شود", - "app_manifest_invalid": "مشکلی در مانیفست برنامه وجود دارد: {error}", "app_location_unavailable": "این نشانی وب یا در دسترس نیست یا با برنامه (هایی) که قبلاً نصب شده در تعارض است:\n{apps}", "app_label_deprecated": "این دستور منسوخ شده است! لطفاً برای مدیریت برچسب برنامه از فرمان جدید'yunohost به روز رسانی مجوز کاربر' استفاده کنید.", "app_make_default_location_already_used": "نمی توان '{app}' را برنامه پیش فرض در دامنه قرار داد ، '{domain}' قبلاً توسط '{other_app}' استفاده می شود", @@ -199,7 +198,6 @@ "diagnosis_http_connection_error": "خطای اتصال: ارتباط با دامنه درخواست شده امکان پذیر نیست، به احتمال زیاد غیرقابل دسترسی است.", "diagnosis_http_timeout": "زمان تلاش برای تماس با سرور از خارج به پایان رسید. به نظر می رسد غیرقابل دسترسی است.
1. شایع ترین علت برای این مشکل ، پورت 80 است (و 443) به درستی به سرور شما ارسال نمی شوند.
2. همچنین باید مطمئن شوید که سرویس nginx در حال اجرا است
3. در تنظیمات پیچیده تر: مطمئن شوید که هیچ فایروال یا پروکسی معکوسی تداخل نداشته باشد.", "diagnosis_http_ok": "دامنه {domain} از طریق HTTP از خارج از شبکه محلی قابل دسترسی است.", - "diagnosis_http_localdomain": "انتظار نمی رود که دامنه {domain} ، با TLD محلی. از خارج از شبکه محلی به آن دسترسی پیدا کند.", "diagnosis_http_could_not_diagnose_details": "خطا: {error}", "diagnosis_http_could_not_diagnose": "نمی توان تشخیص داد که در IPv{ipversion} دامنه ها از خارج قابل دسترسی هستند یا خیر.", "diagnosis_http_hairpinning_issue_details": "این احتمالاً به دلیل جعبه / روتر ISP شما است. در نتیجه ، افراد خارج از شبکه محلی شما می توانند به سرور شما مطابق انتظار دسترسی پیدا کنند ، اما افراد داخل شبکه محلی (احتمالاً مثل شما؟) هنگام استفاده از نام دامنه یا IP جهانی. ممکن است بتوانید وضعیت را بهبود بخشید با نگاهی به https://yunohost.org/dns_local_network", @@ -348,13 +346,11 @@ "dyndns_ip_updated": "IP خود را در DynDNS به روز کرد", "dyndns_ip_update_failed": "آدرس IP را به DynDNS به روز نکرد", "dyndns_could_not_check_available": "بررسی نشد که آیا {domain} در {provider} در دسترس است یا خیر.", - "dyndns_could_not_check_provide": "بررسی نشد که آیا {provider} می تواند {domain} را ارائه دهد یا خیر.", "dpkg_lock_not_available": "این دستور در حال حاضر قابل اجرا نیست زیرا به نظر می رسد برنامه دیگری از قفل dpkg (مدیر بسته سیستم) استفاده می کند", "dpkg_is_broken": "شما نمی توانید این کار را در حال حاضر انجام دهید زیرا dpkg/APT (اداره کنندگان سیستم بسته ها) به نظر می رسد در وضعیت خرابی است… می توانید با اتصال از طریق SSH و اجرا این فرمان `sudo apt install --fix-broken` and/or `sudo dpkg --configure -a` مشکل را حل کنید.", "downloading": "در حال بارگیری...", "done": "انجام شد", "domains_available": "دامنه های موجود:", - "domain_name_unknown": "دامنه '{domain}' ناشناخته است", "domain_uninstall_app_first": "این برنامه ها هنوز روی دامنه شما نصب هستند:\n{apps}\n\nلطفاً قبل از اقدام به حذف دامنه ، آنها را با استفاده از 'برنامه yunohost remove the_app_id' حذف کرده یا با استفاده از 'yunohost app change-url the_app_id' به دامنه دیگری منتقل کنید", "domain_remove_confirm_apps_removal": "حذف این دامنه برنامه های زیر را حذف می کند:\n{apps}\n\nآیا طمئن هستید که میخواهید انجام دهید؟ [{answers}]", "domain_hostname_failed": "نام میزبان جدید قابل تنظیم نیست. این ممکن است بعداً مشکلی ایجاد کند (ممکن هم هست خوب باشد).", diff --git a/locales/fr.json b/locales/fr.json index 5b2ea6225..07bdcfad3 100644 --- a/locales/fr.json +++ b/locales/fr.json @@ -10,7 +10,6 @@ "app_extraction_failed": "Impossible d'extraire les fichiers d'installation", "app_id_invalid": "Identifiant d'application invalide", "app_install_files_invalid": "Fichiers d'installation incorrects", - "app_manifest_invalid": "Manifeste d'application incorrect : {error}", "app_not_correctly_installed": "{app} semble être mal installé", "app_not_installed": "Nous n'avons pas trouvé {app} dans la liste des applications installées : {all_apps}", "app_not_properly_removed": "{app} n'a pas été supprimé correctement", @@ -223,7 +222,6 @@ "server_reboot": "Le serveur va redémarrer", "server_reboot_confirm": "Le serveur va redémarrer immédiatement, le voulez-vous vraiment ? [{answers}]", "app_upgrade_some_app_failed": "Certaines applications n'ont pas été mises à jour", - "dyndns_could_not_check_provide": "Impossible de vérifier si {provider} peut fournir {domain}.", "dyndns_domain_not_provided": "Le fournisseur DynDNS {provider} ne peut pas fournir le domaine {domain}.", "app_make_default_location_already_used": "Impossible de configurer l'application '{app}' par défaut pour le domaine '{domain}' car il est déjà utilisé par l'application '{other_app}'", "app_upgrade_app_name": "Mise à jour de {app}...", @@ -602,7 +600,6 @@ "migration_0019_add_new_attributes_in_ldap": "Ajouter de nouveaux attributs pour les autorisations dans la base de données LDAP", "migrating_legacy_permission_settings": "Migration des anciens paramètres d'autorisation...", "invalid_regex": "Regex non valide : '{regex}'", - "domain_name_unknown": "Domaine '{domain}' inconnu", "app_label_deprecated": "Cette commande est obsolète ! Veuillez utiliser la nouvelle commande 'yunohost user permission update' pour gérer l'étiquette de l'application.", "additional_urls_already_removed": "URL supplémentaire '{url}' déjà supprimées pour la permission '{permission}'", "invalid_number": "Doit être un nombre", @@ -631,7 +628,6 @@ "backup_create_size_estimation": "L'archive contiendra environ {size} de données.", "global_settings_setting_security_webadmin_allowlist": "Adresses IP autorisées à accéder à la webadmin. Elles doivent être séparées par une virgule.", "global_settings_setting_security_webadmin_allowlist_enabled": "Autoriser seulement certaines IP à accéder à la webadmin.", - "diagnosis_http_localdomain": "Le domaine {domain}, avec un TLD .local, ne devrait pas être exposé en dehors du réseau local.", "diagnosis_dns_specialusedomain": "Le domaine {domain} est basé sur un domaine de premier niveau (TLD) à usage spécial comme .local ou .test et ne devrait donc pas avoir d'enregistrements DNS réels.", "invalid_password": "Mot de passe incorrect", "ldap_server_is_down_restart_it": "Le service LDAP est en panne, essayez de le redémarrer...", @@ -669,13 +665,10 @@ "config_validate_url": "Doit être une URL Web valide", "config_version_not_supported": "Les versions du panneau de configuration '{version}' ne sont pas prises en charge.", "danger": "Danger :", - "file_extension_not_accepted": "Le fichier '{path}' est refusé car son extension ne fait pas partie des extensions acceptées : {accept}", "invalid_number_min": "Doit être supérieur à {min}", "invalid_number_max": "Doit être inférieur à {max}", "log_app_config_set": "Appliquer la configuration à l'application '{}'", "service_not_reloading_because_conf_broken": "Le service '{name}' n'a pas été rechargé/redémarré car sa configuration est cassée : {errors}", - "app_argument_password_help_keep": "Tapez sur Entrée pour conserver la valeur actuelle", - "app_argument_password_help_optional": "Tapez un espace pour vider le mot de passe", "domain_registrar_is_not_configured": "Le registrar n'est pas encore configuré pour le domaine {domain}.", "domain_dns_push_not_applicable": "La fonction de configuration DNS automatique n'est pas applicable au domaine {domain}. Vous devez configurer manuellement vos enregistrements DNS en suivant la documentation sur https://yunohost.org/dns_config.", "domain_dns_registrar_yunohost": "Ce domaine est de type nohost.me / nohost.st / ynh.fr et sa configuration DNS est donc automatiquement gérée par YunoHost sans qu'il n'y ait d'autre configuration à faire. (voir la commande 'yunohost dyndns update')", @@ -711,4 +704,4 @@ "other_available_options": "... et {n} autres options disponibles non affichées", "domain_config_auth_consumer_key": "Consumer key", "domain_unknown": "Domaine '{domain}' inconnu" -} +} \ No newline at end of file diff --git a/locales/gl.json b/locales/gl.json index 0d7d1afee..ac41200a6 100644 --- a/locales/gl.json +++ b/locales/gl.json @@ -76,7 +76,6 @@ "app_manifest_install_ask_password": "Elixe un contrasinal de administración para esta app", "app_manifest_install_ask_path": "Elixe a ruta URL (após o dominio) onde será instalada esta app", "app_manifest_install_ask_domain": "Elixe o dominio onde queres instalar esta app", - "app_manifest_invalid": "Hai algún erro no manifesto da app: {error}", "app_location_unavailable": "Este URL ou ben non está dispoñible ou entra en conflito cunha app(s) xa instalada:\n{apps}", "app_label_deprecated": "Este comando está anticuado! Utiliza o novo comando 'yunohost user permission update' para xestionar a etiqueta da app.", "app_make_default_location_already_used": "Non se puido establecer a '{app}' como app por defecto no dominio, '{domain}' xa está utilizado por '{other_app}'", @@ -288,13 +287,11 @@ "dyndns_ip_updated": "Actualizouse o IP en DynDNS", "dyndns_ip_update_failed": "Non se actualizou o enderezo IP en DynDNS", "dyndns_could_not_check_available": "Non se comprobou se {domain} está dispoñible en {provider}.", - "dyndns_could_not_check_provide": "Non se comprobou se {provider} pode proporcionar {domain}.", "dpkg_lock_not_available": "Non se pode executar agora mesmo este comando porque semella que outro programa está a utilizar dpkg (o xestos de paquetes do sistema)", "dpkg_is_broken": "Non podes facer isto agora mesmo porque dpkg/APT (o xestor de paquetes do sistema) semella que non está a funcionar... Podes intentar solucionalo conectándote a través de SSH e executando `sudo apt install --fix-broken`e/ou `sudo dpkg --configure -a`.", "downloading": "Descargando...", "done": "Feito", "domains_available": "Dominios dispoñibles:", - "domain_name_unknown": "Dominio '{domain}' descoñecido", "domain_uninstall_app_first": "Aínda están instaladas estas aplicacións no teu dominio:\n{apps}\n\nPrimeiro desinstalaas utilizando 'yunohost app remove id_da_app' ou móveas a outro dominio con 'yunohost app change-url id_da_app' antes de eliminar o dominio", "domain_remove_confirm_apps_removal": "Ao eliminar o dominio tamén vas eliminar estas aplicacións:\n{apps}\n\nTes a certeza de querer facelo? [{answers}]", "domain_hostname_failed": "Non se puido establecer o novo nome de servidor. Esto pode causar problemas máis tarde (tamén podería ser correcto).", @@ -454,7 +451,6 @@ "migration_0015_specific_upgrade": "Iniciando a actualización dos paquetes do sistema que precisan ser actualizados de xeito independente...", "migration_0015_modified_files": "Ten en conta que os seguintes ficheiros semella que foron modificados manualmente e poderían ser sobrescritos na actualización: {manually_modified_files}", "migration_0015_problematic_apps_warning": "Ten en conta que se detectaron as seguintes apps que poderían ser problemáticas. Semella que non foron instaladas usando o catálogo de YunoHost, ou non están marcadas como 'funcionais'. En consecuencia, non se pode garantir que seguirán funcionando após a actualización: {problematic_apps}", - "diagnosis_http_localdomain": "O dominio {domain}, cun TLD .local, non é de agardar que esté exposto ao exterior da rede local.", "diagnosis_dns_specialusedomain": "O dominio {domain} baséase un dominio de nivel alto e uso especial (TLD) como .local ou .test polo que non é de agardar que realmente teña rexistros DNS.", "upnp_enabled": "UPnP activado", "upnp_disabled": "UPnP desactivado", @@ -655,13 +651,11 @@ "diagnosis_apps_broken": "Actualmente esta aplicación está marcada como estragada no catálogo de aplicacións de YunoHost. Podería tratarse dun problema temporal mentras as mantedoras intentan arraxala. Entanto así a actualización da app está desactivada.", "diagnosis_apps_issue": "Atopouse un problema na app {app}", "diagnosis_apps_not_in_app_catalog": "Esta aplicación non está no catálgo de aplicacións de YunoHost. Se estivo no pasado e foi eliminada, deberías considerar desinstalala porque non recibirá actualizacións, e podería comprometer a integridade e seguridade do teu sistema.", - "app_argument_password_help_optional": "Escribe un espazo para limpar o contrasinal", "config_validate_date": "Debe ser unha data válida co formato YYYY-MM-DD", "config_validate_email": "Debe ser un email válido", "config_validate_time": "Debe ser unha hora válida tal que HH:MM", "config_validate_url": "Debe ser un URL válido", "danger": "Perigo:", - "app_argument_password_help_keep": "Preme Enter para manter o valor actual", "app_config_unable_to_read": "Fallou a lectura dos valores de configuración.", "config_apply_failed": "Fallou a aplicación da nova configuración: {error}", "config_forbidden_keyword": "O palabra chave '{keyword}' está reservada, non podes crear ou usar un panel de configuración cunha pregunta con este id.", @@ -673,7 +667,6 @@ "app_config_unable_to_apply": "Fallou a aplicación dos valores de configuración.", "config_cant_set_value_on_section": "Non podes establecer un valor único na sección completa de configuración.", "config_version_not_supported": "A versión do panel de configuración '{version}' non está soportada.", - "file_extension_not_accepted": "Rexeitouse o ficheiro '{path}' porque a súa extensión non está entre as aceptadas: {accept}", "invalid_number_max": "Ten que ser menor de {max}", "service_not_reloading_because_conf_broken": "Non se recargou/reiniciou o servizo '{name}' porque a súa configuración está estragada: {errors}", "diagnosis_http_special_use_tld": "O dominio {domain} baséase nun dominio de alto-nivel (TLD) especial como .local ou .test e por isto non é de agardar que esté exposto fóra da rede local.", @@ -711,4 +704,4 @@ "ldap_attribute_already_exists": "Xa existe o atributo LDAP '{attribute}' con valor '{value}'", "log_domain_config_set": "Actualizar configuración para o dominio '{}'", "domain_unknown": "Dominio '{domain}' descoñecido" -} +} \ No newline at end of file diff --git a/locales/hi.json b/locales/hi.json index 5f521b1dc..1eed9faa4 100644 --- a/locales/hi.json +++ b/locales/hi.json @@ -10,7 +10,6 @@ "app_extraction_failed": "इन्सटाल्ड फ़ाइलों को निकालने में असमर्थ", "app_id_invalid": "अवैध एप्लिकेशन id", "app_install_files_invalid": "फाइलों की अमान्य स्थापना", - "app_manifest_invalid": "एप्लीकेशन का मैनिफेस्ट अमान्य", "app_not_correctly_installed": "{app} ठीक ढंग से इनस्टॉल नहीं हुई", "app_not_installed": "{app} इनस्टॉल नहीं हुई", "app_not_properly_removed": "{app} ठीक ढंग से नहीं अनइन्सटॉल की गई", diff --git a/locales/id.json b/locales/id.json index 1f28ae7e5..c9778dd5f 100644 --- a/locales/id.json +++ b/locales/id.json @@ -43,4 +43,4 @@ "app_start_remove": "Menghapus {app}...", "app_manifest_install_ask_password": "Pilih kata sandi administrasi untuk aplikasi ini", "app_upgrade_several_apps": "Aplikasi-aplikasi berikut akan diperbarui: {apps}" -} +} \ No newline at end of file diff --git a/locales/it.json b/locales/it.json index 7f3997839..742e38b0d 100644 --- a/locales/it.json +++ b/locales/it.json @@ -26,7 +26,6 @@ "admin_password_change_failed": "Impossibile cambiare la password", "admin_password_changed": "La password d'amministrazione è stata cambiata", "app_install_files_invalid": "Questi file non possono essere installati", - "app_manifest_invalid": "C'è qualcosa di scorretto nel manifesto dell'applicazione: {error}", "app_not_correctly_installed": "{app} sembra di non essere installata correttamente", "app_not_properly_removed": "{app} non è stata correttamente rimossa", "action_invalid": "L'azione '{action}' non è valida", @@ -223,7 +222,6 @@ "dpkg_is_broken": "Non puoi eseguire questo ora perchè dpkg/APT (i gestori di pacchetti del sistema) sembrano essere in stato danneggiato... Puoi provare a risolvere il problema connettendoti via SSH ed eseguire `sudo apt install --fix-broken` e/o `sudo dpkg --configure -a`.", "domain_cannot_remove_main": "Non puoi rimuovere '{domain}' essendo il dominio principale, prima devi impostare un nuovo dominio principale con il comando 'yunohost domain main-domain -n '; ecco la lista dei domini candidati: {other_domains}", "domain_dns_conf_is_just_a_recommendation": "Questo comando ti mostra la configurazione *raccomandata*. Non ti imposta la configurazione DNS al tuo posto. È tua responsabilità configurare la tua zona DNS nel tuo registrar in accordo con queste raccomandazioni.", - "dyndns_could_not_check_provide": "Impossibile controllare se {provider} possano fornire {domain}.", "dyndns_could_not_check_available": "Impossibile controllare se {domain} è disponibile su {provider}.", "dyndns_domain_not_provided": "Il fornitore DynDNS {provider} non può fornire il dominio {domain}.", "experimental_feature": "Attenzione: Questa funzionalità è sperimentale e non è considerata stabile, non dovresti utilizzarla a meno che tu non sappia cosa stai facendo.", @@ -558,7 +556,6 @@ "global_settings_setting_pop3_enabled": "Abilita il protocollo POP3 per il server mail", "dyndns_provider_unreachable": "Incapace di raggiungere il provider DynDNS {provider}: o il tuo YunoHost non è connesso ad internet o il server dynette è down.", "dpkg_lock_not_available": "Impossibile eseguire il comando in questo momento perché un altro programma sta bloccando dpkg (il package manager di sistema)", - "domain_name_unknown": "Dominio '{domain}' sconosciuto", "domain_cannot_remove_main_add_new_one": "Non puoi rimuovere '{domain}' visto che è il dominio principale nonché il tuo unico dominio, devi prima aggiungere un altro dominio eseguendo 'yunohost domain add ', impostarlo come dominio principale con 'yunohost domain main-domain n ', e solo allora potrai rimuovere il dominio '{domain}' eseguendo 'yunohost domain remove {domain}'.'", "domain_cannot_add_xmpp_upload": "Non puoi aggiungere domini che iniziano per 'xmpp-upload.'. Questo tipo di nome è riservato per la funzionalità di upload XMPP integrata in YunoHost.", "diagnosis_processes_killed_by_oom_reaper": "Alcuni processi sono stati terminati dal sistema che era a corto di memoria. Questo è un sintomo di insufficienza di memoria nel sistema o di un processo che richiede troppa memoria. Lista dei processi terminati:\n{kills_summary}", @@ -706,4 +703,4 @@ "config_validate_url": "È necessario inserire un URL web valido", "ldap_server_down": "Impossibile raggiungere il server LDAP", "ldap_server_is_down_restart_it": "Il servizio LDAP è down, prova a riavviarlo…" -} +} \ No newline at end of file diff --git a/locales/nb_NO.json b/locales/nb_NO.json index dc217d74e..e81d3af05 100644 --- a/locales/nb_NO.json +++ b/locales/nb_NO.json @@ -30,7 +30,6 @@ "domains_available": "Tilgjengelige domener:", "done": "Ferdig", "downloading": "Laster ned…", - "dyndns_could_not_check_provide": "Kunne ikke sjekke om {provider} kan tilby {domain}.", "dyndns_could_not_check_available": "Kunne ikke sjekke om {domain} er tilgjengelig på {provider}.", "mail_domain_unknown": "Ukjent e-postadresse for domenet '{domain}'", "log_remove_on_failed_restore": "Fjern '{}' etter mislykket gjenoppretting fra sikkerhetskopiarkiv", diff --git a/locales/nl.json b/locales/nl.json index 5e612fc77..f5923fa9a 100644 --- a/locales/nl.json +++ b/locales/nl.json @@ -8,7 +8,6 @@ "app_extraction_failed": "Kan installatiebestanden niet uitpakken", "app_id_invalid": "Ongeldige app-id", "app_install_files_invalid": "Deze bestanden kunnen niet worden geïnstalleerd", - "app_manifest_invalid": "Ongeldig app-manifest", "app_not_installed": "{app} is niet geïnstalleerd", "app_removed": "{app} succesvol verwijderd", "app_sources_fetch_failed": "Kan bronbestanden niet ophalen, klopt de URL?", diff --git a/locales/oc.json b/locales/oc.json index a794f5e04..9de7944c5 100644 --- a/locales/oc.json +++ b/locales/oc.json @@ -33,7 +33,6 @@ "app_change_url_identical_domains": "L’ancian e lo novèl coble domeni/camin son identics per {domain}{path}, pas res a far.", "app_change_url_success": "L’URL de l’aplicacion {app} es ara {domain}{path}", "app_extraction_failed": "Extraccion dels fichièrs d’installacion impossibla", - "app_manifest_invalid": "I a quicòm que truca amb lo manifest de l’aplicacion : {error}", "app_requirements_checking": "Verificacion dels paquets requesits per {app}...", "app_sources_fetch_failed": "Recuperacion dels fichièrs fonts impossibla, l’URL es corrècta ?", "app_unsupported_remote_type": "Lo tipe alonhat utilizat per l’aplicacion es pas suportat", @@ -110,7 +109,6 @@ "domains_available": "Domenis disponibles :", "done": "Acabat", "downloading": "Telecargament…", - "dyndns_could_not_check_provide": "Impossible de verificar se {provider} pòt provesir {domain}.", "dyndns_ip_update_failed": "Impossible d’actualizar l’adreça IP sul domeni DynDNS", "dyndns_ip_updated": "Vòstra adreça IP actualizada pel domeni DynDNS", "dyndns_key_generating": "La clau DNS es a se generar… pòt trigar una estona.", @@ -513,4 +511,4 @@ "diagnosis_domain_expiration_not_found": "Impossible de verificar la data d’expiracion d’unes domenis", "backup_create_size_estimation": "L’archiu contendrà apr’aquí {size} de donadas.", "app_restore_script_failed": "Una error s’es producha a l’interior del script de restauracion de l’aplicacion" -} +} \ No newline at end of file diff --git a/locales/pt.json b/locales/pt.json index d285948be..154ab700f 100644 --- a/locales/pt.json +++ b/locales/pt.json @@ -7,7 +7,6 @@ "app_extraction_failed": "Não foi possível extrair os arquivos para instalação", "app_id_invalid": "App ID invaĺido", "app_install_files_invalid": "Esses arquivos não podem ser instalados", - "app_manifest_invalid": "Manifesto da aplicação inválido: {error}", "app_not_installed": "Não foi possível encontrar {app} na lista de aplicações instaladas: {all_apps}", "app_removed": "{app} desinstalada", "app_sources_fetch_failed": "Não foi possível carregar os arquivos de código fonte, a URL está correta?", @@ -255,4 +254,4 @@ "diagnosis_backports_in_sources_list": "Parece que o apt (o gerenciador de pacotes) está configurado para usar o repositório backport. A não ser que você saiba o que você esteá fazendo, desencorajamos fortemente a instalação de pacotes de backports porque é provável que crie instabilidades ou conflitos no seu sistema.", "certmanager_cert_renew_success": "Certificado Let's Encrypt renovado para o domínio '{domain}'", "certmanager_warning_subdomain_dns_record": "O subdomínio '{subdomain}' não resolve para o mesmo IP que '{domain}'. Algumas funcionalidades não estarão disponíveis até que você conserte isto e regenere o certificado." -} +} \ No newline at end of file diff --git a/locales/ru.json b/locales/ru.json index 5c9a39322..58bd1846d 100644 --- a/locales/ru.json +++ b/locales/ru.json @@ -16,7 +16,6 @@ "app_id_invalid": "Неправильный ID приложения", "app_install_files_invalid": "Эти файлы не могут быть установлены", "app_location_unavailable": "Этот URL отсутствует или конфликтует с уже установленным приложением или приложениями:\n{apps}", - "app_manifest_invalid": "Недопустимый манифест приложения: {error}", "app_not_correctly_installed": "{app} , кажется, установлены неправильно", "app_not_installed": "{app} не найдено в списке установленных приложений: {all_apps}", "app_not_properly_removed": "{app} удалены неправильно", @@ -75,4 +74,4 @@ "yunohost_already_installed": "YunoHost уже установлен", "yunohost_configured": "Теперь YunoHost настроен", "upgrading_packages": "Обновление пакетов..." -} +} \ No newline at end of file diff --git a/locales/sl.json b/locales/sl.json index 0967ef424..9e26dfeeb 100644 --- a/locales/sl.json +++ b/locales/sl.json @@ -1 +1 @@ -{} +{} \ No newline at end of file diff --git a/locales/uk.json b/locales/uk.json index 4baf6d20f..ae59b0274 100644 --- a/locales/uk.json +++ b/locales/uk.json @@ -1,6 +1,5 @@ { "app_manifest_install_ask_domain": "Оберіть домен, в якому треба встановити цей застосунок", - "app_manifest_invalid": "Щось не так з маніфестом застосунку: {error}", "app_location_unavailable": "Ця URL-адреса або недоступна, або конфліктує з уже встановленим застосунком (застосунками):\n{apps}", "app_label_deprecated": "Ця команда застаріла! Будь ласка, використовуйте нову команду 'yunohost user permission update' для управління заголовком застосунку.", "app_make_default_location_already_used": "Неможливо зробити '{app}' типовим застосунком на домені, '{domain}' вже використовується '{other_app}'", @@ -318,13 +317,11 @@ "dyndns_ip_updated": "Вашу IP-адресу в DynDNS оновлено", "dyndns_ip_update_failed": "Не вдалося оновити IP-адресу в DynDNS", "dyndns_could_not_check_available": "Не вдалося перевірити, чи {domain} доступний у {provider}.", - "dyndns_could_not_check_provide": "Не вдалося перевірити, чи може {provider} надати {domain}.", "dpkg_lock_not_available": "Ця команда не може бути виконана прямо зараз, тому що інша програма, схоже, використовує блокування dpkg (системного менеджера пакетів)", "dpkg_is_broken": "Ви не можете зробити це прямо зараз, тому що dpkg/APT (системні менеджери пакетів), схоже, знаходяться в зламаному стані... Ви можете спробувати вирішити цю проблему, під'єднавшись через SSH і виконавши `sudo apt install --fix-broken` та/або `sudo dpkg --configure -a`.", "downloading": "Завантаження…", "done": "Готово", "domains_available": "Доступні домени:", - "domain_name_unknown": "Домен '{domain}' невідомий", "domain_uninstall_app_first": "Ці застосунки все ще встановлені на вашому домені:\n{apps}\n\nВидаліть їх за допомогою 'yunohost app remove the_app_id' або перемістіть їх на інший домен за допомогою 'yunohost app change-url the_app_id', перш ніж приступити до вилучення домену", "domain_remove_confirm_apps_removal": "Вилучення цього домену призведе до вилучення таких застосунків:\n{apps}\n\nВи впевнені, що хочете це зробити? [{answers}]", "domain_hostname_failed": "Неможливо встановити нову назву хоста. Це може викликати проблеми в подальшому (можливо, все буде в порядку).", @@ -356,7 +353,6 @@ "diagnosis_http_connection_error": "Помилка з'єднання: не вдалося з'єднатися із запитуваним доменом, швидше за все, він недоступний.", "diagnosis_http_timeout": "При спробі зв'язатися з вашим сервером ззовні стався тайм-аут. Він здається недоступним.
1. Найбільш поширеною причиною цієї проблеми є те, що порт 80 (і 443) неправильно перенаправлено на ваш сервер .
2. Ви також повинні переконатися, що служба nginx запущена
3.На більш складних установках: переконайтеся, що немає фаєрвола або зворотного проксі.", "diagnosis_http_ok": "Домен {domain} доступний по HTTP поза локальною мережею.", - "diagnosis_http_localdomain": "Домен {domain} з .local TLD не може бути доступний ззовні локальної мережі.", "diagnosis_http_could_not_diagnose_details": "Помилка: {error}", "diagnosis_http_could_not_diagnose": "Не вдалося діагностувати досяжність доменів ззовні в IPv{ipversion}.", "diagnosis_http_hairpinning_issue_details": "Можливо, це пов'язано з коробкою/маршрутизатором вашого інтернет-провайдера. В результаті, люди ззовні вашої локальної мережі зможуть отримати доступ до вашого сервера, як і очікувалося, але не люди зсередини локальної мережі (як ви, ймовірно?) При використанні доменного імені або глобального IP. Можливо, ви зможете поліпшити ситуацію, глянувши https://yunohost.org/dns_local_network ", @@ -669,13 +665,10 @@ "config_validate_url": "Вебадреса має бути дійсною", "config_version_not_supported": "Версії конфігураційної панелі '{version}' не підтримуються.", "danger": "Небезпека:", - "file_extension_not_accepted": "Файл '{path}' відхиляється, бо його розширення не входить в число прийнятих розширень: {accept}", "invalid_number_min": "Має бути більшим за {min}", "invalid_number_max": "Має бути меншим за {max}", "log_app_config_set": "Застосувати конфігурацію до застосунку '{}'", "service_not_reloading_because_conf_broken": "Неможливо перезавантажити/перезапустити службу '{name}', тому що її конфігурацію порушено: {errors}", - "app_argument_password_help_optional": "Введіть один пробіл, щоб очистити пароль", - "app_argument_password_help_keep": "Натисніть Enter, щоб зберегти поточне значення", "domain_registrar_is_not_configured": "Реєстратор ще не конфігуровано для домену {domain}.", "domain_dns_push_not_applicable": "Функція автоматичної конфігурації DNS не застосовується до домену {domain}. Вам слід вручну конфігурувати записи DNS відповідно до документації за адресою https://yunohost.org/dns_config.", "domain_dns_registrar_not_supported": "YunoHost не зміг автоматично виявити реєстратора, який обробляє цей домен. Вам слід вручну конфігурувати записи DNS відповідно до документації за адресою https://yunohost.org/dns.", @@ -711,4 +704,4 @@ "ldap_attribute_already_exists": "Атрибут LDAP '{attribute}' вже існує зі значенням '{value}'", "domain_dns_push_already_up_to_date": "Записи вже оновлені, нічого не потрібно робити.", "domain_unknown": "Домен '{domain}' є невідомим" -} +} \ No newline at end of file diff --git a/locales/zh_Hans.json b/locales/zh_Hans.json index fa3b7bb03..c1cad8425 100644 --- a/locales/zh_Hans.json +++ b/locales/zh_Hans.json @@ -137,7 +137,6 @@ "additional_urls_already_removed": "权限'{permission}'的其他URL中已经删除了附加URL'{url}'", "app_manifest_install_ask_path": "选择安装此应用的路径", "app_manifest_install_ask_domain": "选择应安装此应用程序的域", - "app_manifest_invalid": "应用清单错误: {error}", "app_location_unavailable": "该URL不可用,或与已安装的应用冲突:\n{apps}", "app_label_deprecated": "不推荐使用此命令!请使用新命令 'yunohost user permission update'来管理应用标签。", "app_make_default_location_already_used": "无法将'{app}' 设置为域上的默认应用,'{other_app}'已在使用'{domain}'", @@ -353,13 +352,11 @@ "dyndns_ip_updated": "在DynDNS上更新了您的IP", "dyndns_ip_update_failed": "无法将IP地址更新到DynDNS", "dyndns_could_not_check_available": "无法检查{provider}上是否可用 {domain}。", - "dyndns_could_not_check_provide": "无法检查{provider}是否可以提供 {domain}.", "dpkg_lock_not_available": "该命令现在无法运行,因为另一个程序似乎正在使用dpkg锁(系统软件包管理器)", "dpkg_is_broken": "您现在不能执行此操作,因为dpkg / APT(系统软件包管理器)似乎处于损坏状态……您可以尝试通过SSH连接并运行sudo apt install --fix-broken和/或 sudo dpkg --configure-a 来解决此问题.", "downloading": "下载中…", "done": "完成", "domains_available": "可用域:", - "domain_name_unknown": "域'{domain}'未知", "domain_uninstall_app_first": "这些应用程序仍安装在您的域中:\n{apps}\n\n请先使用 'yunohost app remove the_app_id' 将其卸载,或使用 'yunohost app change-url the_app_id'将其移至另一个域,然后再继续删除域", "domain_remove_confirm_apps_removal": "删除该域将删除这些应用程序:\n{apps}\n\n您确定要这样做吗? [{answers}]", "domain_hostname_failed": "无法设置新的主机名。稍后可能会引起问题(可能没问题)。", @@ -627,7 +624,7 @@ "log_user_delete": "删除用户'{}'", "log_user_create": "添加用户'{}'", "domain_registrar_is_not_configured": "尚未为域 {domain} 配置注册商。", - "domain_dns_push_not_applicable": "的自动DNS配置的特征是不适用域{域}。您应该按照 https://yunohost.org/dns_config 上的文档手动配置DNS 记录。", + "domain_dns_push_not_applicable": "的自动DNS配置的特征是不适用域{domain}。您应该按照 https://yunohost.org/dns_config 上的文档手动配置DNS 记录。", "disk_space_not_sufficient_update": "没有足够的磁盘空间来更新此应用程序", "diagnosis_high_number_auth_failures": "最近出现了大量可疑的失败身份验证。您的fail2ban正在运行且配置正确,或使用自定义端口的SSH作为https://yunohost.org/解释的安全性。", "diagnosis_apps_not_in_app_catalog": "此应用程序不在 YunoHost 的应用程序目录中。如果它过去有被删除过,您应该考虑卸载此应用程,因为它不会更新,并且可能会损害您系统的完整和安全性。", @@ -638,7 +635,7 @@ "config_unknown_filter_key": "该过滤器钥匙“{filter_key}”有误。", "diagnosis_apps_outdated_ynh_requirement": "此应用程序的安装 版本只需要 yunohost >= 2.x,这往往表明它与推荐的打包实践和帮助程序不是最新的。你真的应该考虑更新它。", "disk_space_not_sufficient_install": "没有足够的磁盘空间来安装此应用程序", - "config_apply_failed": "应用新配置 失败:{错误}", + "config_apply_failed": "应用新配置 失败:{error}", "config_cant_set_value_on_section": "无法在整个配置部分设置单个值 。", "config_validate_color": "是有效的 RGB 十六进制颜色", "config_validate_date": "有效日期格式为YYYY-MM-DD", @@ -651,4 +648,4 @@ "diagnosis_apps_deprecated_practices": "此应用程序的安装 版本仍然使用一些超旧的弃用打包原则。推荐您升级它。", "diagnosis_apps_issue": "发现应用{ app } 存在问题", "diagnosis_description_apps": "应用" -} +} \ No newline at end of file From 35850f75cd62831ed7af329f1b9dfae1f735a1b7 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 14 Nov 2021 22:58:43 +0100 Subject: [PATCH 102/146] Update changelog for 4.3.3 --- debian/changelog | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/debian/changelog b/debian/changelog index 7adbe59dc..f2266e871 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,17 @@ +yunohost (4.3.3) stable; urgency=low + + - [fix] log: fix dump_script_log_extract_for_debugging displaying wrong log snippet during failed upgrade ([#1376](https://github.com/YunoHost/yunohost/pull/1376)) + - [fix] certificate: fix stupid certificate/diagnosis issue with subdomains of ynh domains (7c569d16) + - [fix] diagnosis: Read DNS Blacklist answer and compare it against list of non-BL codes ([#1375](https://github.com/YunoHost/yunohost/pull/1375)) + - [enh] helpers: Update n to 8.0.0 ([#1372](https://github.com/YunoHost/yunohost/pull/1372)) + - [fix] helpers: Make ynh_add_fpm_config more robust to some edge cases (51d5dca0) + - [fix] backup: conf_ynh_settings backup/restore hook, /etc/yunohost/domains may not exist (38f5352f) + - [i18n] Translations updated for Basque, Chinese (Simplified), Indonesian, Italian, Ukrainian + + Thanks to all contributors <3 ! (dagangtie, ericgaspar, Félix Piédallu, Flavio Cristoforetti, liimee, punkrockgirl, Romain Thouvenin, Tommi, Tymofii-Lytvynenko) + + -- Alexandre Aubin Sun, 14 Nov 2021 22:55:16 +0100 + yunohost (4.3.2.2) stable; urgency=low - [fix] nginx: Try to fix again the webadmin cache hell (74e2a51e) From 6b9ac717de86f8925d5e92b737e3126a1baaf290 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 14 Nov 2021 23:15:08 +0100 Subject: [PATCH 103/146] debian: fix metronome modules install --- debian/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/install b/debian/install index 55c535ae8..0a23cbfc9 100644 --- a/debian/install +++ b/debian/install @@ -5,6 +5,6 @@ helpers/* /usr/share/yunohost/helpers.d/ conf/* /usr/share/yunohost/conf/ doc/yunohost.8.gz /usr/share/man/man8/ doc/bash-completion.sh /etc/bash_completion.d/yunohost -lib/metronome/modules/* /usr/lib/metronome/modules/ +conf/metronome/modules/* /usr/lib/metronome/modules/ locales/* /usr/lib/moulinette/yunohost/locales/ src/ /usr/lib/moulinette/yunohost From 42e86a80c5e46799839a5291756fc016eb42be0d Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 15 Nov 2021 03:17:43 +0100 Subject: [PATCH 104/146] debian: bump ssowat and moulinette requirements --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index a06823a16..17eb56f55 100644 --- a/debian/control +++ b/debian/control @@ -10,7 +10,7 @@ Package: yunohost Essential: yes Architecture: all Depends: ${python3:Depends}, ${misc:Depends} - , moulinette (>= 4.3), ssowat (>= 4.3) + , moulinette (>= 11.0), ssowat (>= 11.0) , python3-psutil, python3-requests, python3-dnspython, python3-openssl , python3-miniupnpc, python3-dbus, python3-jinja2 , python3-toml, python3-packaging, python3-publicsuffix2 From 467c04f3820572ed82860c0ba296a2ab6b0541c6 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 15 Nov 2021 04:00:47 +0100 Subject: [PATCH 105/146] codequality: Apply black on python script in bin/ --- bin/yunohost | 51 +++++++++++++++++++++++++++--------------------- bin/yunohost-api | 38 ++++++++++++++++++++++++------------ bin/yunomdns | 43 ++++++++++++++++++++++++++++------------ 3 files changed, 85 insertions(+), 47 deletions(-) diff --git a/bin/yunohost b/bin/yunohost index 0220c5f09..d3af76d92 100755 --- a/bin/yunohost +++ b/bin/yunohost @@ -12,37 +12,42 @@ import yunohost def _parse_cli_args(): """Parse additional arguments for the cli""" parser = argparse.ArgumentParser(add_help=False) - parser.add_argument('--output-as', - choices=['json', 'plain', 'none'], default=None, - help="Output result in another format" + parser.add_argument( + "--output-as", + choices=["json", "plain", "none"], + default=None, + help="Output result in another format", ) - parser.add_argument('--debug', - action='store_true', default=False, - help="Log and print debug messages" + parser.add_argument( + "--debug", + action="store_true", + default=False, + help="Log and print debug messages", ) - parser.add_argument('--quiet', - action='store_true', default=False, - help="Don't produce any output" + parser.add_argument( + "--quiet", action="store_true", default=False, help="Don't produce any output" ) - parser.add_argument('--timeout', - type=int, default=None, - help="Number of seconds before this command will timeout because it can't acquire the lock (meaning that another command is currently running), by default there is no timeout and the command will wait until it can get the lock" + parser.add_argument( + "--timeout", + type=int, + default=None, + help="Number of seconds before this command will timeout because it can't acquire the lock (meaning that another command is currently running), by default there is no timeout and the command will wait until it can get the lock", ) # deprecated arguments - parser.add_argument('--plain', - action='store_true', default=False, help=argparse.SUPPRESS + parser.add_argument( + "--plain", action="store_true", default=False, help=argparse.SUPPRESS ) - parser.add_argument('--json', - action='store_true', default=False, help=argparse.SUPPRESS + parser.add_argument( + "--json", action="store_true", default=False, help=argparse.SUPPRESS ) opts, args = parser.parse_known_args() # output compatibility if opts.plain: - opts.output_as = 'plain' + opts.output_as = "plain" elif opts.json: - opts.output_as = 'json' + opts.output_as = "json" return (parser, opts, args) @@ -54,10 +59,12 @@ if os.environ["PATH"] != default_path: # Main action ---------------------------------------------------------- -if __name__ == '__main__': +if __name__ == "__main__": if os.geteuid() != 0: - sys.stderr.write("\033[1;31mError:\033[0m yunohost command must be " - "run as root or with sudo.\n") + sys.stderr.write( + "\033[1;31mError:\033[0m yunohost command must be " + "run as root or with sudo.\n" + ) sys.exit(1) parser, opts, args = _parse_cli_args() @@ -69,5 +76,5 @@ if __name__ == '__main__': output_as=opts.output_as, timeout=opts.timeout, args=args, - parser=parser + parser=parser, ) diff --git a/bin/yunohost-api b/bin/yunohost-api index b3ed3a817..6a809b198 100755 --- a/bin/yunohost-api +++ b/bin/yunohost-api @@ -8,37 +8,49 @@ sys.path.insert(0, "/usr/lib/moulinette/") import yunohost # Default server configuration -DEFAULT_HOST = 'localhost' +DEFAULT_HOST = "localhost" DEFAULT_PORT = 6787 def _parse_api_args(): """Parse main arguments for the api""" - parser = argparse.ArgumentParser(add_help=False, + parser = argparse.ArgumentParser( + add_help=False, description="Run the YunoHost API to manage your server.", ) - srv_group = parser.add_argument_group('server configuration') - srv_group.add_argument('-h', '--host', - action='store', default=DEFAULT_HOST, + srv_group = parser.add_argument_group("server configuration") + srv_group.add_argument( + "-h", + "--host", + action="store", + default=DEFAULT_HOST, help="Host to listen on (default: %s)" % DEFAULT_HOST, ) - srv_group.add_argument('-p', '--port', - action='store', default=DEFAULT_PORT, type=int, + srv_group.add_argument( + "-p", + "--port", + action="store", + default=DEFAULT_PORT, + type=int, help="Port to listen on (default: %d)" % DEFAULT_PORT, ) - glob_group = parser.add_argument_group('global arguments') - glob_group.add_argument('--debug', - action='store_true', default=False, + glob_group = parser.add_argument_group("global arguments") + glob_group.add_argument( + "--debug", + action="store_true", + default=False, help="Set log level to DEBUG", ) - glob_group.add_argument('--help', - action='help', help="Show this help message and exit", + glob_group.add_argument( + "--help", + action="help", + help="Show this help message and exit", ) return parser.parse_args() -if __name__ == '__main__': +if __name__ == "__main__": opts = _parse_api_args() # Run the server yunohost.api(debug=opts.debug, host=opts.host, port=opts.port) diff --git a/bin/yunomdns b/bin/yunomdns index 0aee28195..661c7c71f 100755 --- a/bin/yunomdns +++ b/bin/yunomdns @@ -21,8 +21,18 @@ def get_network_local_interfaces() -> Dict[str, Dict[str, List[str]]]: interfaces = { adapter.name: { - "ipv4": [ip.ip for ip in adapter.ips if ip.is_IPv4 and ip_address(ip.ip).is_private], - "ipv6": [ip.ip[0] for ip in adapter.ips if ip.is_IPv6 and ip_address(ip.ip[0]).is_private and not ip_address(ip.ip[0]).is_link_local], + "ipv4": [ + ip.ip + for ip in adapter.ips + if ip.is_IPv4 and ip_address(ip.ip).is_private + ], + "ipv6": [ + ip.ip[0] + for ip in adapter.ips + if ip.is_IPv6 + and ip_address(ip.ip[0]).is_private + and not ip_address(ip.ip[0]).is_link_local + ], } for adapter in ifaddr.get_adapters() if adapter.name != "lo" @@ -33,7 +43,6 @@ def get_network_local_interfaces() -> Dict[str, Dict[str, List[str]]]: # Listener class, to detect duplicates on the network # Stores the list of servers in its list property class Listener: - def __init__(self): self.list = [] @@ -66,14 +75,18 @@ def main() -> bool: return False if "interfaces" not in config: - config["interfaces"] = [interface - for interface, local_ips in interfaces.items() - if local_ips["ipv4"]] + config["interfaces"] = [ + interface + for interface, local_ips in interfaces.items() + if local_ips["ipv4"] + ] if "ban_interfaces" in config: - config["interfaces"] = [interface - for interface in config["interfaces"] - if interface not in config["ban_interfaces"]] + config["interfaces"] = [ + interface + for interface in config["interfaces"] + if interface not in config["ban_interfaces"] + ] # Let's discover currently published .local domains accross the network zc = Zeroconf() @@ -103,14 +116,18 @@ def main() -> bool: return domain_i - config['domains'] = [find_domain_not_already_published(domain) for domain in config['domains']] + config["domains"] = [ + find_domain_not_already_published(domain) for domain in config["domains"] + ] zcs: Dict[Zeroconf, List[ServiceInfo]] = {} for interface in config["interfaces"]: if interface not in interfaces: - print(f"Interface {interface} listed in config file is not present on system.") + print( + f"Interface {interface} listed in config file is not present on system." + ) continue # Only broadcast IPv4 because IPv6 is buggy ... because we ain't using python3-ifaddr >= 0.1.7 @@ -149,7 +166,9 @@ def main() -> bool: print("Registering...") for zc, infos in zcs.items(): for info in infos: - zc.register_service(info, allow_name_change=True, cooperating_responders=True) + zc.register_service( + info, allow_name_change=True, cooperating_responders=True + ) try: print("Registered. Press Ctrl+C or stop service to stop.") From 01ff6c932cff90b40b5e19ba5aeccd929e7ea50e Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 15 Nov 2021 04:02:45 +0100 Subject: [PATCH 106/146] Attempt to fix debian install following repo structure change --- debian/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/install b/debian/install index 0a23cbfc9..534dccebd 100644 --- a/debian/install +++ b/debian/install @@ -7,4 +7,4 @@ doc/yunohost.8.gz /usr/share/man/man8/ doc/bash-completion.sh /etc/bash_completion.d/yunohost conf/metronome/modules/* /usr/lib/metronome/modules/ locales/* /usr/lib/moulinette/yunohost/locales/ -src/ /usr/lib/moulinette/yunohost +src/* /usr/lib/moulinette/yunohost/ From 26e6b4a41450449f1c3cbad8548d6253e309e4fc Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 15 Nov 2021 04:34:25 +0100 Subject: [PATCH 107/146] debian: another tweak to install actionsmap to the right place --- debian/install | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/install b/debian/install index 534dccebd..37840662b 100644 --- a/debian/install +++ b/debian/install @@ -1,5 +1,6 @@ bin/* /usr/bin/ share/* /usr/share/yunohost/ +share/actionsmap.yml /usr/share/moulinette/actionsmap/yunohost.yml hooks/* /usr/share/yunohost/hooks/ helpers/* /usr/share/yunohost/helpers.d/ conf/* /usr/share/yunohost/conf/ From 7bfa15d4716daf25cf76462aa3aecf99596137a4 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 17 Nov 2021 20:12:18 +0100 Subject: [PATCH 108/146] Propagate changes from moulinette --- bin/yunohost | 2 -- bin/yunohost-api | 3 --- debian/install | 5 ++--- share/actionsmap.yml | 3 ++- src/__init__.py | 13 +++++++++++-- 5 files changed, 15 insertions(+), 11 deletions(-) diff --git a/bin/yunohost b/bin/yunohost index d3af76d92..8cebdee8e 100755 --- a/bin/yunohost +++ b/bin/yunohost @@ -4,8 +4,6 @@ import os import sys import argparse - -sys.path.insert(0, "/usr/lib/moulinette/") import yunohost diff --git a/bin/yunohost-api b/bin/yunohost-api index 6a809b198..8cf9d4f26 100755 --- a/bin/yunohost-api +++ b/bin/yunohost-api @@ -1,10 +1,7 @@ #! /usr/bin/python3 # -*- coding: utf-8 -*- -import sys import argparse - -sys.path.insert(0, "/usr/lib/moulinette/") import yunohost # Default server configuration diff --git a/debian/install b/debian/install index 37840662b..db88462ab 100644 --- a/debian/install +++ b/debian/install @@ -1,11 +1,10 @@ bin/* /usr/bin/ share/* /usr/share/yunohost/ -share/actionsmap.yml /usr/share/moulinette/actionsmap/yunohost.yml hooks/* /usr/share/yunohost/hooks/ helpers/* /usr/share/yunohost/helpers.d/ conf/* /usr/share/yunohost/conf/ +locales/* /usr/share/yunohost/locales/ doc/yunohost.8.gz /usr/share/man/man8/ doc/bash-completion.sh /etc/bash_completion.d/yunohost conf/metronome/modules/* /usr/lib/metronome/modules/ -locales/* /usr/lib/moulinette/yunohost/locales/ -src/* /usr/lib/moulinette/yunohost/ +src/* /usr/lib/python3/dist-packages/yunohost/ diff --git a/share/actionsmap.yml b/share/actionsmap.yml index 6ea82e8ab..cad0212b2 100644 --- a/share/actionsmap.yml +++ b/share/actionsmap.yml @@ -33,7 +33,8 @@ # Global parameters # ############################# _global: - name: yunohost.admin + namespace: yunohost + cookie_name: yunohost.admin authentication: api: ldap_admin cli: null diff --git a/src/__init__.py b/src/__init__.py index dad73e2a4..b9dcd93d9 100644 --- a/src/__init__.py +++ b/src/__init__.py @@ -22,7 +22,14 @@ def cli(debug, quiet, output_as, timeout, args, parser): if not is_installed(): check_command_is_valid_before_postinstall(args) - ret = moulinette.cli(args, output_as=output_as, timeout=timeout, top_parser=parser) + ret = moulinette.cli( + args, + actionsmap="/usr/share/yunohost/actionsmap.yml", + locales_dir="/usr/share/yunohost/locales/", + output_as=output_as, + timeout=timeout, + top_parser=parser + ) sys.exit(ret) @@ -39,6 +46,8 @@ def api(debug, host, port): ret = moulinette.api( host=host, port=port, + actionsmap="/usr/share/yunohost/actionsmap.yml", + locales_dir="/usr/share/yunohost/locales/", routes={("GET", "/installed"): is_installed_api}, ) sys.exit(ret) @@ -78,7 +87,7 @@ def init(interface="cli", debug=False, quiet=False, logdir="/var/log/yunohost"): def init_i18n(): # This should only be called when not willing to go through moulinette.cli # or moulinette.api but still willing to call m18n.n/g... - m18n.load_namespace("yunohost") + m18n.set_locales_dir("/usr/share/yunohost/locales/") m18n.set_locale(get_locale()) From bc9a9414a2e99ed5238ee8770380f854e93966a0 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 18 Nov 2021 01:23:00 +0100 Subject: [PATCH 109/146] Fix diagnosis/ vs. diagnosis.py ambiguity, breaking python imports --- .gitlab/ci/test.gitlab-ci.yml | 4 ++-- src/{diagnosis => diagnosers}/00-basesystem.py | 0 src/{diagnosis => diagnosers}/10-ip.py | 0 src/{diagnosis => diagnosers}/12-dnsrecords.py | 0 src/{diagnosis => diagnosers}/14-ports.py | 0 src/{diagnosis => diagnosers}/21-web.py | 0 src/{diagnosis => diagnosers}/24-mail.py | 0 src/{diagnosis => diagnosers}/30-services.py | 0 src/{diagnosis => diagnosers}/50-systemresources.py | 0 src/{diagnosis => diagnosers}/70-regenconf.py | 0 src/{diagnosis => diagnosers}/80-apps.py | 0 src/{diagnosis => diagnosers}/__init__.py | 0 src/diagnosis.py | 6 +++--- tests/add_missing_keys.py | 4 ++-- tests/test_i18n_keys.py | 4 ++-- 15 files changed, 9 insertions(+), 9 deletions(-) rename src/{diagnosis => diagnosers}/00-basesystem.py (100%) rename src/{diagnosis => diagnosers}/10-ip.py (100%) rename src/{diagnosis => diagnosers}/12-dnsrecords.py (100%) rename src/{diagnosis => diagnosers}/14-ports.py (100%) rename src/{diagnosis => diagnosers}/21-web.py (100%) rename src/{diagnosis => diagnosers}/24-mail.py (100%) rename src/{diagnosis => diagnosers}/30-services.py (100%) rename src/{diagnosis => diagnosers}/50-systemresources.py (100%) rename src/{diagnosis => diagnosers}/70-regenconf.py (100%) rename src/{diagnosis => diagnosers}/80-apps.py (100%) rename src/{diagnosis => diagnosers}/__init__.py (100%) diff --git a/.gitlab/ci/test.gitlab-ci.yml b/.gitlab/ci/test.gitlab-ci.yml index e98927f38..1165e4826 100644 --- a/.gitlab/ci/test.gitlab-ci.yml +++ b/.gitlab/ci/test.gitlab-ci.yml @@ -37,7 +37,7 @@ full-tests: - *install_debs - yunohost tools postinstall -d domain.tld -p the_password --ignore-dyndns --force-diskspace script: - - python3 -m pytest --cov=yunohost tests/ src/tests/ src/diagnosis/ --junitxml=report.xml + - python3 -m pytest --cov=yunohost tests/ src/tests/ src/diagnosers/ --junitxml=report.xml - cd tests - bash test_helpers.sh needs: @@ -59,7 +59,7 @@ test-i18n-keys: changes: - locales/en.json - src/*.py - - src/diagnosis/*.py + - src/diagnosers/*.py test-translation-format-consistency: extends: .test-stage diff --git a/src/diagnosis/00-basesystem.py b/src/diagnosers/00-basesystem.py similarity index 100% rename from src/diagnosis/00-basesystem.py rename to src/diagnosers/00-basesystem.py diff --git a/src/diagnosis/10-ip.py b/src/diagnosers/10-ip.py similarity index 100% rename from src/diagnosis/10-ip.py rename to src/diagnosers/10-ip.py diff --git a/src/diagnosis/12-dnsrecords.py b/src/diagnosers/12-dnsrecords.py similarity index 100% rename from src/diagnosis/12-dnsrecords.py rename to src/diagnosers/12-dnsrecords.py diff --git a/src/diagnosis/14-ports.py b/src/diagnosers/14-ports.py similarity index 100% rename from src/diagnosis/14-ports.py rename to src/diagnosers/14-ports.py diff --git a/src/diagnosis/21-web.py b/src/diagnosers/21-web.py similarity index 100% rename from src/diagnosis/21-web.py rename to src/diagnosers/21-web.py diff --git a/src/diagnosis/24-mail.py b/src/diagnosers/24-mail.py similarity index 100% rename from src/diagnosis/24-mail.py rename to src/diagnosers/24-mail.py diff --git a/src/diagnosis/30-services.py b/src/diagnosers/30-services.py similarity index 100% rename from src/diagnosis/30-services.py rename to src/diagnosers/30-services.py diff --git a/src/diagnosis/50-systemresources.py b/src/diagnosers/50-systemresources.py similarity index 100% rename from src/diagnosis/50-systemresources.py rename to src/diagnosers/50-systemresources.py diff --git a/src/diagnosis/70-regenconf.py b/src/diagnosers/70-regenconf.py similarity index 100% rename from src/diagnosis/70-regenconf.py rename to src/diagnosers/70-regenconf.py diff --git a/src/diagnosis/80-apps.py b/src/diagnosers/80-apps.py similarity index 100% rename from src/diagnosis/80-apps.py rename to src/diagnosers/80-apps.py diff --git a/src/diagnosis/__init__.py b/src/diagnosers/__init__.py similarity index 100% rename from src/diagnosis/__init__.py rename to src/diagnosers/__init__.py diff --git a/src/diagnosis.py b/src/diagnosis.py index a7b6c725c..67128217c 100644 --- a/src/diagnosis.py +++ b/src/diagnosis.py @@ -660,7 +660,7 @@ class Diagnoser: def _list_diagnosis_categories(): - paths = glob.glob(os.path.dirname(__file__) + "/diagnosis/??-*.py") + paths = glob.glob(os.path.dirname(__file__) + "/diagnosers/??-*.py") names = sorted([os.path.basename(path)[: -len(".py")] for path in paths]) return names @@ -670,7 +670,7 @@ def _load_diagnoser(diagnoser_name): logger.debug(f"Loading diagnoser {diagnoser_name}") - paths = glob.glob(os.path.dirname(__file__) + f"/diagnosis/??-{diagnoser_name}.py") + paths = glob.glob(os.path.dirname(__file__) + f"/diagnosers/??-{diagnoser_name}.py") if len(paths) != 1: raise YunohostError(f"Uhoh, found several matches (or none?) for diagnoser {diagnoser_name} : {paths}", raw_msg=True) @@ -681,7 +681,7 @@ def _load_diagnoser(diagnoser_name): # this is python builtin method to import a module using a name, we # use that to import the migration as a python object so we'll be # able to run it in the next loop - module = import_module("yunohost.diagnosis.{}".format(module_id)) + module = import_module("yunohost.diagnosers.{}".format(module_id)) return module.MyDiagnoser() except Exception as e: import traceback diff --git a/tests/add_missing_keys.py b/tests/add_missing_keys.py index e1ecbf56e..ebee80a1b 100644 --- a/tests/add_missing_keys.py +++ b/tests/add_missing_keys.py @@ -28,7 +28,7 @@ def find_expected_string_keys(): python_files.extend(glob.glob("src/utils/*.py")) python_files.extend(glob.glob("src/migrations/*.py")) python_files.extend(glob.glob("src/authenticators/*.py")) - python_files.extend(glob.glob("src/diagnosis/*.py")) + python_files.extend(glob.glob("src/diagnosers/*.py")) python_files.append("bin/yunohost") for python_file in python_files: @@ -51,7 +51,7 @@ def find_expected_string_keys(): # For each diagnosis, try to find strings like "diagnosis_stuff_foo" (c.f. diagnosis summaries) # Also we expect to have "diagnosis_description_" for each diagnosis p3 = re.compile(r"[\"\'](diagnosis_[a-z]+_\w+)[\"\']") - for python_file in glob.glob("src/diagnosis/*.py"): + for python_file in glob.glob("src/diagnosers/*.py"): content = open(python_file).read() for m in p3.findall(content): if m.endswith("_"): diff --git a/tests/test_i18n_keys.py b/tests/test_i18n_keys.py index b25d35923..62cad7cbb 100644 --- a/tests/test_i18n_keys.py +++ b/tests/test_i18n_keys.py @@ -29,7 +29,7 @@ def find_expected_string_keys(): python_files.extend(glob.glob("src/utils/*.py")) python_files.extend(glob.glob("src/migrations/*.py")) python_files.extend(glob.glob("src/authenticators/*.py")) - python_files.extend(glob.glob("src/diagnosis/*.py")) + python_files.extend(glob.glob("src/diagnosers/*.py")) python_files.append("bin/yunohost") for python_file in python_files: @@ -52,7 +52,7 @@ def find_expected_string_keys(): # For each diagnosis, try to find strings like "diagnosis_stuff_foo" (c.f. diagnosis summaries) # Also we expect to have "diagnosis_description_" for each diagnosis p3 = re.compile(r"[\"\'](diagnosis_[a-z]+_\w+)[\"\']") - for python_file in glob.glob("src/diagnosis/*.py"): + for python_file in glob.glob("src/diagnosers/*.py"): content = open(python_file).read() for m in p3.findall(content): if m.endswith("_"): From 124dc158fc8aa888cddc42dd230e412343f68d8a Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 18 Nov 2021 02:33:37 +0100 Subject: [PATCH 110/146] Fix redeclaration of 'migrations' var --- src/tools.py | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/src/tools.py b/src/tools.py index f9de32cfe..8962f41a3 100644 --- a/src/tools.py +++ b/src/tools.py @@ -930,19 +930,6 @@ def _write_migration_state(migration_id, state): def _get_migrations_list(): - migrations = [] - - try: - from . import migrations - except ImportError: - # not data migrations present, return empty list - return migrations - - migrations_path = migrations.__path__[0] - - if not os.path.exists(migrations_path): - logger.warn(m18n.n("migrations_cant_reach_migration_file", migrations_path)) - return migrations # states is a datastructure that represents the last run migration # it has this form: @@ -955,9 +942,11 @@ def _get_migrations_list(): # (in particular, pending migrations / not already ran are not listed states = tools_migrations_state()["migrations"] + migrations = [] + migrations_folder = os.path.dirname(__file__) + "/migrations/" for migration_file in [ x - for x in os.listdir(migrations_path) + for x in os.listdir(migrations_folder) if re.match(r"^\d+_[a-zA-Z0-9_]+\.py$", x) ]: m = _load_migration(migration_file) From 23b8418ee65230a4d8cf97dea30b0261a68caabe Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 18 Nov 2021 03:09:18 +0100 Subject: [PATCH 111/146] Fix diagnosis category listing --- src/diagnosis.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/diagnosis.py b/src/diagnosis.py index 67128217c..ea33b59f3 100644 --- a/src/diagnosis.py +++ b/src/diagnosis.py @@ -661,7 +661,7 @@ class Diagnoser: def _list_diagnosis_categories(): paths = glob.glob(os.path.dirname(__file__) + "/diagnosers/??-*.py") - names = sorted([os.path.basename(path)[: -len(".py")] for path in paths]) + names = sorted([os.path.basename(path)[: -len(".py")].split("-")[-1] for path in paths]) return names From 33d3db62b283b80d75973741f2c97d7f95449849 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 18 Nov 2021 03:12:08 +0100 Subject: [PATCH 112/146] Fix i18n key test --- tests/test_i18n_keys.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_i18n_keys.py b/tests/test_i18n_keys.py index 62cad7cbb..ec582ba72 100644 --- a/tests/test_i18n_keys.py +++ b/tests/test_i18n_keys.py @@ -102,7 +102,7 @@ def find_expected_string_keys(): yield m # Keys for the actionmap ... - for category in yaml.safe_load(open("src/actionsmap.yml")).values(): + for category in yaml.safe_load(open("share/actionsmap.yml")).values(): if "actions" not in category.keys(): continue for action in category["actions"].values(): From a792ed6e412d998c167945236be8005068e5e887 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 18 Nov 2021 03:54:25 +0100 Subject: [PATCH 113/146] Moar technical fixes --- src/diagnosis.py | 4 ++-- src/tests/conftest.py | 6 ------ 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/diagnosis.py b/src/diagnosis.py index ea33b59f3..cdb125eb1 100644 --- a/src/diagnosis.py +++ b/src/diagnosis.py @@ -423,7 +423,7 @@ class Diagnoser: not force and self.cached_time_ago() < self.cache_duration ): - self.logger_debug("Cache still valid : %s" % self.cache_file) + logger.debug("Cache still valid : %s" % self.cache_file) logger.info( m18n.n("diagnosis_cache_still_valid", category=self.description) ) @@ -457,7 +457,7 @@ class Diagnoser: new_report = {"id": self.id_, "cached_for": self.cache_duration, "items": items} - self.logger_debug("Updating cache %s" % self.cache_file) + logger.debug("Updating cache %s" % self.cache_file) self.write_cache(new_report) Diagnoser.i18n(new_report) add_ignore_flag_to_issues(new_report) diff --git a/src/tests/conftest.py b/src/tests/conftest.py index a07c44346..cd5cb307e 100644 --- a/src/tests/conftest.py +++ b/src/tests/conftest.py @@ -61,12 +61,6 @@ def new_translate(self, key, *args, **kwargs): moulinette.core.Translator.translate = new_translate -def new_m18nn(self, key, *args, **kwargs): - return self._namespaces[self._current_namespace].translate(key, *args, **kwargs) - - -moulinette.core.Moulinette18n.n = new_m18nn - # # Init the moulinette to have the cli loggers stuff # # From 799609c7a8e5946988d51779dce0eda4556b5fba Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 18 Nov 2021 13:53:00 +0100 Subject: [PATCH 114/146] Fix most used password file path --- src/utils/password.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/password.py b/src/utils/password.py index 04a1ed272..f0dacc8f3 100644 --- a/src/utils/password.py +++ b/src/utils/password.py @@ -36,7 +36,7 @@ SMALL_PWD_LIST = [ "rpi", ] -MOST_USED_PASSWORDS = "/usr/share/yunohost/password/100000-most-used-passwords.txt" +MOST_USED_PASSWORDS = "/usr/share/yunohost/100000-most-used-passwords.txt" # Length, digits, lowers, uppers, others STRENGTH_LEVELS = [ From 9c28c07af4b342d6db6a53818353bf19e0325ad1 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 22 Nov 2021 08:10:14 +0100 Subject: [PATCH 115/146] Fix overly complex location for ssl workdir --- conf/ssl/openssl.cnf | 4 ++-- hooks/conf_regen/01-yunohost | 2 ++ hooks/conf_regen/02-ssl | 2 +- src/certificate.py | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/conf/ssl/openssl.cnf b/conf/ssl/openssl.cnf index 3ef7d80c3..a19a9c3df 100644 --- a/conf/ssl/openssl.cnf +++ b/conf/ssl/openssl.cnf @@ -5,7 +5,7 @@ # This definition stops the following lines choking if HOME isn't # defined. -HOME = /usr/share/yunohost/yunohost-config/ssl +HOME = /usr/share/yunohost/ssl RANDFILE = $ENV::HOME/.rnd # Extra OBJECT IDENTIFIER info: @@ -34,7 +34,7 @@ default_ca = Yunohost # The default ca section #################################################################### [ Yunohost ] -dir = /usr/share/yunohost/yunohost-config/ssl/yunoCA # Where everything is kept +dir = /usr/share/yunohost/ssl # Where everything is kept certs = $dir/certs # Where the issued certs are kept crl_dir = $dir/crl # Where the issued crl are kept database = $dir/index.txt # database index file. diff --git a/hooks/conf_regen/01-yunohost b/hooks/conf_regen/01-yunohost index 027be8020..7716f04c3 100755 --- a/hooks/conf_regen/01-yunohost +++ b/hooks/conf_regen/01-yunohost @@ -181,6 +181,8 @@ do_post_regen() { find /etc/cron.d/yunohost-* -type f -exec chmod 644 {} \; find /etc/cron.*/yunohost-* -type f -exec chown root:root {} \; + chmod 750 /usr/share/yunohost/ssl + chown root:root /var/cache/yunohost chmod 700 /var/cache/yunohost chown root:root /var/cache/moulinette diff --git a/hooks/conf_regen/02-ssl b/hooks/conf_regen/02-ssl index f27a23cf8..a824c91f8 100755 --- a/hooks/conf_regen/02-ssl +++ b/hooks/conf_regen/02-ssl @@ -2,7 +2,7 @@ set -e -ssl_dir="/usr/share/yunohost/yunohost-config/ssl/yunoCA" +ssl_dir="/usr/share/yunohost/ssl" ynh_ca="/etc/yunohost/certs/yunohost.org/ca.pem" ynh_crt="/etc/yunohost/certs/yunohost.org/crt.pem" ynh_key="/etc/yunohost/certs/yunohost.org/key.pem" diff --git a/src/certificate.py b/src/certificate.py index c697a487b..46aa9c818 100644 --- a/src/certificate.py +++ b/src/certificate.py @@ -54,7 +54,7 @@ WEBROOT_FOLDER = "/tmp/acme-challenge-public/" SELF_CA_FILE = "/etc/ssl/certs/ca-yunohost_crt.pem" ACCOUNT_KEY_FILE = "/etc/yunohost/letsencrypt_account.pem" -SSL_DIR = "/usr/share/yunohost/yunohost-config/ssl/yunoCA" +SSL_DIR = "/usr/share/yunohost/ssl" KEY_SIZE = 3072 From 10e00b3318a3350aff683a5d89c53fc9055fbd21 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 22 Nov 2021 08:13:14 +0100 Subject: [PATCH 116/146] Fix old moulinette stuff not relevant anymore --- debian/postinst | 4 ---- hooks/conf_regen/01-yunohost | 2 -- 2 files changed, 6 deletions(-) diff --git a/debian/postinst b/debian/postinst index 0dd1dedd0..aa2d17107 100644 --- a/debian/postinst +++ b/debian/postinst @@ -3,10 +3,6 @@ set -e do_configure() { - rm -rf /var/cache/moulinette/* - - mkdir -p /usr/share/moulinette/actionsmap/ - ln -sf /usr/share/yunohost/actionsmap/yunohost.yml /usr/share/moulinette/actionsmap/yunohost.yml if [ ! -f /etc/yunohost/installed ]; then # If apps/ is not empty, we're probably already installed in the past and diff --git a/hooks/conf_regen/01-yunohost b/hooks/conf_regen/01-yunohost index 7716f04c3..d73a899da 100755 --- a/hooks/conf_regen/01-yunohost +++ b/hooks/conf_regen/01-yunohost @@ -185,8 +185,6 @@ do_post_regen() { chown root:root /var/cache/yunohost chmod 700 /var/cache/yunohost - chown root:root /var/cache/moulinette - chmod 700 /var/cache/moulinette setfacl -m g:all_users:--- /var/www setfacl -m g:all_users:--- /var/log/nginx From a399675f6057790e1c9e63eef851a649cd066bb8 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 22 Nov 2021 08:14:45 +0100 Subject: [PATCH 117/146] Fix location for specte meltdown checker script --- src/diagnosers/00-basesystem.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/diagnosers/00-basesystem.py b/src/diagnosers/00-basesystem.py index 66a2bf47b..0ef1a5197 100644 --- a/src/diagnosers/00-basesystem.py +++ b/src/diagnosers/00-basesystem.py @@ -206,7 +206,7 @@ class MyDiagnoser(Diagnoser): # script taken from https://github.com/speed47/spectre-meltdown-checker # script commit id is store directly in the script - SCRIPT_PATH = "/usr/lib/moulinette/yunohost/vendor/spectre-meltdown-checker/spectre-meltdown-checker.sh" + SCRIPT_PATH = "/usr/lib/python3/dist-packages/yunohost/vendor/spectre-meltdown-checker/spectre-meltdown-checker.sh" # '--variant 3' corresponds to Meltdown # example output from the script: From 4f6d3c426ab5159230b017b1b23ea8e9bfe0a8f9 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Tue, 23 Nov 2021 21:22:22 +0000 Subject: [PATCH 118/146] Allow tilde in username/organization for repo URLs --- src/yunohost/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/yunohost/app.py b/src/yunohost/app.py index 649110267..f6d940da8 100644 --- a/src/yunohost/app.py +++ b/src/yunohost/app.py @@ -79,7 +79,7 @@ re_app_instance_name = re.compile( ) APP_REPO_URL = re.compile( - r"^https://[a-zA-Z0-9-_.]+/[a-zA-Z0-9-_./]+/[a-zA-Z0-9-_.]+_ynh(/?(-/)?tree/[a-zA-Z0-9-_.]+)?(\.git)?/?$" + r"^https://[a-zA-Z0-9-_.]+/[a-zA-Z0-9-_./~]+/[a-zA-Z0-9-_.]+_ynh(/?(-/)?tree/[a-zA-Z0-9-_.]+)?(\.git)?/?$" ) APP_FILES_TO_COPY = [ From 6a8aa333eac7eada56f24f86771b30060f7fb66b Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 23 Nov 2021 23:11:37 +0100 Subject: [PATCH 119/146] appurl: Add test for app url containing tilde --- src/yunohost/tests/test_appurl.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/yunohost/tests/test_appurl.py b/src/yunohost/tests/test_appurl.py index 7b4c6e2e3..00bfe5c58 100644 --- a/src/yunohost/tests/test_appurl.py +++ b/src/yunohost/tests/test_appurl.py @@ -70,6 +70,7 @@ def test_repo_url_definition(): ) assert _is_app_repo_url("https://github.com/YunoHost-Apps/foobar_ynh/tree/1.23.4") assert _is_app_repo_url("git@github.com:YunoHost-Apps/foobar_ynh.git") + assert _is_app_repo_url("https://git.super.host/~max/foobar_ynh") assert not _is_app_repo_url("github.com/YunoHost-Apps/foobar_ynh") assert not _is_app_repo_url("http://github.com/YunoHost-Apps/foobar_ynh") From 6488b4f6493c65592c69a8f435b882f822449f7b Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 25 Nov 2021 20:01:54 +0100 Subject: [PATCH 120/146] Fix /etc/yunohost permissions on some setups --- data/hooks/conf_regen/01-yunohost | 3 +++ 1 file changed, 3 insertions(+) diff --git a/data/hooks/conf_regen/01-yunohost b/data/hooks/conf_regen/01-yunohost index 1703dccd1..e2ea1bbcb 100755 --- a/data/hooks/conf_regen/01-yunohost +++ b/data/hooks/conf_regen/01-yunohost @@ -179,6 +179,9 @@ do_post_regen() { chown admin:root /home/yunohost.backup chown admin:root /home/yunohost.backup/archives + # NB: x permission for 'others' is important for ssl-cert (and maybe mdns), otherwise slapd will fail to start because can't access the certs + chmod 755 /etc/yunohost + # Certs # We do this with find because there could be a lot of them... chown -R root:ssl-cert /etc/yunohost/certs From 7e7dbe41d711462d6db746e4d0dd4a44ad4c4b2e Mon Sep 17 00:00:00 2001 From: ljf Date: Fri, 26 Nov 2021 02:18:00 +0100 Subject: [PATCH 121/146] [enh] Hotspot and hairpining use cases --- data/hooks/conf_regen/43-dnsmasq | 17 ++++++++++++++--- data/templates/dnsmasq/domain.tpl | 6 ++++-- data/templates/dnsmasq/plain/dnsmasq.conf | 6 +++++- 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/data/hooks/conf_regen/43-dnsmasq b/data/hooks/conf_regen/43-dnsmasq index 13c442158..0370d10b4 100755 --- a/data/hooks/conf_regen/43-dnsmasq +++ b/data/hooks/conf_regen/43-dnsmasq @@ -14,7 +14,7 @@ do_pre_regen() { etcdefault_dir="${pending_dir}/etc/default" mkdir -p "$etcdefault_dir" - # add general conf files + # add default conf files cp plain/etcdefault ${pending_dir}/etc/default/dnsmasq cp plain/dnsmasq.conf ${pending_dir}/etc/dnsmasq.conf @@ -26,11 +26,22 @@ do_pre_regen() { ynh_validate_ip4 "$ipv4" || ipv4='127.0.0.1' ipv6=$(curl -s -6 https://ip6.yunohost.org 2>/dev/null || true) ynh_validate_ip6 "$ipv6" || ipv6='' + IFS=' ' read -a interfaces <<< "$(ls /sys/class/net)" + wireless_interfaces=() + for dev in "${interfaces[@]}"; do + if [ -d "/sys/class/net/$dev/wireless" ]; then + wireless_interfaces+=("$dev") + fi + done - export ipv4 - export ipv6 + # General configuration + export wireless_interfaces + ynh_render_template "dnsmasq.conf.tpl" "${pending_dir}/etc/dnsmasq.conf" # add domain conf files + export interfaces + export ipv4 + export ipv6 for domain in $YNH_DOMAINS; do [[ ! $domain =~ \.local$ ]] || continue export domain diff --git a/data/templates/dnsmasq/domain.tpl b/data/templates/dnsmasq/domain.tpl index c4bb56d1d..faa93954c 100644 --- a/data/templates/dnsmasq/domain.tpl +++ b/data/templates/dnsmasq/domain.tpl @@ -1,5 +1,7 @@ -host-record={{ domain }},{{ ipv4 }} -host-record=xmpp-upload.{{ domain }},{{ ipv4 }} +{% for interface in interfaces %} +interface-name={{ domain }},{{ interface }} +interface-name=xmpp-upload.{{ domain }},{{ interface }} +{% endfor %} {% if ipv6 %} host-record={{ domain }},{{ ipv6 }} host-record=xmpp-upload.{{ domain }},{{ ipv6 }} diff --git a/data/templates/dnsmasq/plain/dnsmasq.conf b/data/templates/dnsmasq/plain/dnsmasq.conf index 12a14048a..ac4d125de 100644 --- a/data/templates/dnsmasq/plain/dnsmasq.conf +++ b/data/templates/dnsmasq/plain/dnsmasq.conf @@ -1,6 +1,10 @@ domain-needed expand-hosts +localise-queries -listen-address=127.0.0.1 + +{% for interface in wireless_interfaces %} +interface={{ interface }} +{% endfor %} resolv-file=/etc/resolv.dnsmasq.conf cache-size=256 From c4f8c9e0221c5ba31cbc34b2a5b74583ca98c2ef Mon Sep 17 00:00:00 2001 From: ljf Date: Fri, 26 Nov 2021 02:18:33 +0100 Subject: [PATCH 122/146] [enh] Move dnsmasq conf in template dir --- data/templates/dnsmasq/{plain/dnsmasq.conf => dnsmasq.conf.tpl} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename data/templates/dnsmasq/{plain/dnsmasq.conf => dnsmasq.conf.tpl} (100%) diff --git a/data/templates/dnsmasq/plain/dnsmasq.conf b/data/templates/dnsmasq/dnsmasq.conf.tpl similarity index 100% rename from data/templates/dnsmasq/plain/dnsmasq.conf rename to data/templates/dnsmasq/dnsmasq.conf.tpl From c49628346f5c691639f93fb48b7b587d771c6aca Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Fri, 26 Nov 2021 18:20:40 +0100 Subject: [PATCH 123/146] mdns: Don't add yunohost.local in config if it's already among the yunohost domains --- data/hooks/conf_regen/37-mdns | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/data/hooks/conf_regen/37-mdns b/data/hooks/conf_regen/37-mdns index faa581efa..95c7a522b 100755 --- a/data/hooks/conf_regen/37-mdns +++ b/data/hooks/conf_regen/37-mdns @@ -4,7 +4,11 @@ set -e _generate_config() { echo "domains:" - echo " - yunohost.local" + # Add yunohost.local (only if yunohost.local ain't already in ynh_domains) + if ! echo "$YNH_DOMAINS" | tr ' ' '\n' | grep -q --line-regexp 'yunohost.local' + then + echo " - yunohost.local" + fi for domain in $YNH_DOMAINS; do # Only keep .local domains (don't keep [[ "$domain" =~ [^.]+\.[^.]+\.local$ ]] && echo "Subdomain $domain cannot be handled by Bonjour/Zeroconf/mDNS" >&2 From 321c8dd5ba94bf7b0eb999afd7fce532e7f67536 Mon Sep 17 00:00:00 2001 From: ljf Date: Fri, 26 Nov 2021 18:42:22 +0100 Subject: [PATCH 124/146] [fix] Bash array not supported in ynh_render_template --- data/hooks/conf_regen/43-dnsmasq | 6 +++--- data/templates/dnsmasq/dnsmasq.conf.tpl | 4 ++-- data/templates/dnsmasq/domain.tpl | 3 ++- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/data/hooks/conf_regen/43-dnsmasq b/data/hooks/conf_regen/43-dnsmasq index 0370d10b4..7f65b9494 100755 --- a/data/hooks/conf_regen/43-dnsmasq +++ b/data/hooks/conf_regen/43-dnsmasq @@ -26,11 +26,11 @@ do_pre_regen() { ynh_validate_ip4 "$ipv4" || ipv4='127.0.0.1' ipv6=$(curl -s -6 https://ip6.yunohost.org 2>/dev/null || true) ynh_validate_ip6 "$ipv6" || ipv6='' - IFS=' ' read -a interfaces <<< "$(ls /sys/class/net)" - wireless_interfaces=() + interfaces="$(ls /sys/class/net)" + wireless_interfaces="" for dev in "${interfaces[@]}"; do if [ -d "/sys/class/net/$dev/wireless" ]; then - wireless_interfaces+=("$dev") + wireless_interfaces+=" $dev" fi done diff --git a/data/templates/dnsmasq/dnsmasq.conf.tpl b/data/templates/dnsmasq/dnsmasq.conf.tpl index ac4d125de..eece530dc 100644 --- a/data/templates/dnsmasq/dnsmasq.conf.tpl +++ b/data/templates/dnsmasq/dnsmasq.conf.tpl @@ -2,8 +2,8 @@ domain-needed expand-hosts localise-queries - -{% for interface in wireless_interfaces %} +{% set interfaces = wireless_interfaces.strip().split(' ') %} +{% for interface in interfaces %} interface={{ interface }} {% endfor %} resolv-file=/etc/resolv.dnsmasq.conf diff --git a/data/templates/dnsmasq/domain.tpl b/data/templates/dnsmasq/domain.tpl index faa93954c..50b946176 100644 --- a/data/templates/dnsmasq/domain.tpl +++ b/data/templates/dnsmasq/domain.tpl @@ -1,4 +1,5 @@ -{% for interface in interfaces %} +{% set interfaces_list = interfaces.split(' ') %} +{% for interface in interfaces_list %} interface-name={{ domain }},{{ interface }} interface-name=xmpp-upload.{{ domain }},{{ interface }} {% endfor %} From f34f9e5fc35cbe3f6c1986ad3f23695da637fab7 Mon Sep 17 00:00:00 2001 From: ljf Date: Fri, 26 Nov 2021 19:39:37 +0100 Subject: [PATCH 125/146] [fix] DNSmasq template generation --- data/hooks/conf_regen/43-dnsmasq | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/data/hooks/conf_regen/43-dnsmasq b/data/hooks/conf_regen/43-dnsmasq index 7f65b9494..8b5691dc6 100755 --- a/data/hooks/conf_regen/43-dnsmasq +++ b/data/hooks/conf_regen/43-dnsmasq @@ -16,7 +16,6 @@ do_pre_regen() { # add default conf files cp plain/etcdefault ${pending_dir}/etc/default/dnsmasq - cp plain/dnsmasq.conf ${pending_dir}/etc/dnsmasq.conf # add resolver file cat plain/resolv.dnsmasq.conf | grep "^nameserver" | shuf >${pending_dir}/etc/resolv.dnsmasq.conf @@ -26,9 +25,9 @@ do_pre_regen() { ynh_validate_ip4 "$ipv4" || ipv4='127.0.0.1' ipv6=$(curl -s -6 https://ip6.yunohost.org 2>/dev/null || true) ynh_validate_ip6 "$ipv6" || ipv6='' - interfaces="$(ls /sys/class/net)" - wireless_interfaces="" - for dev in "${interfaces[@]}"; do + interfaces="$(ls -m /sys/class/net | sed s/,//g)" + wireless_interfaces="lo" + for dev in $(ls /sys/class/net); do if [ -d "/sys/class/net/$dev/wireless" ]; then wireless_interfaces+=" $dev" fi From a0344d44bd7e117dc2aec495408ec6aa135dc3ed Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 27 Nov 2021 00:56:03 +0100 Subject: [PATCH 126/146] Update changelog for 4.3.4 --- debian/changelog | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/debian/changelog b/debian/changelog index f2266e871..fbf9bcefd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,14 @@ +yunohost (4.3.4) stable; urgency=low + + - [fix] apps: Allow tilde in username/organization for repo URLs ([#1382](https://github.com/YunoHost/yunohost/pull/1382)) + - [fix] misc: /etc/yunohost permissions broken on some setups (6488b4f6) + - [fix] mdns: Don't add yunohost.local in config if it's already among the yunohost domains (c4962834) + - [enh] dnsmasq: Tweak conf for better support of some stuff like the hotspot app ([#1383](https://github.com/YunoHost/yunohost/pull/1383)) + + Thanks to all contributors <3 ! (ljf, tituspijean) + + -- Alexandre Aubin Sat, 27 Nov 2021 00:53:16 +0100 + yunohost (4.3.3) stable; urgency=low - [fix] log: fix dump_script_log_extract_for_debugging displaying wrong log snippet during failed upgrade ([#1376](https://github.com/YunoHost/yunohost/pull/1376)) From 5881938c69b2eb2cd1a7dcf2d34aee77e6190556 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 27 Nov 2021 16:33:29 +0100 Subject: [PATCH 127/146] Force permission on /etc/resolv.dnsmasq.conf to fix an issue on some setup with umask=027 --- data/hooks/conf_regen/43-dnsmasq | 3 +++ 1 file changed, 3 insertions(+) diff --git a/data/hooks/conf_regen/43-dnsmasq b/data/hooks/conf_regen/43-dnsmasq index 8b5691dc6..7acc16e4b 100755 --- a/data/hooks/conf_regen/43-dnsmasq +++ b/data/hooks/conf_regen/43-dnsmasq @@ -61,6 +61,9 @@ do_pre_regen() { do_post_regen() { regen_conf_files=$1 + # Force permission (to cover some edge cases where root's umask is like 027 and then dnsmasq cant read this file) + chown 644 /etc/resolv.dnsmasq.conf + # Fuck it, those domain/search entries from dhclient are usually annoying # lying shit from the ISP trying to MiTM if grep -q -E "^ *(domain|search)" /run/resolvconf/resolv.conf; then From 31dfb19a02b431ebf538099d3c19e66753ee5a65 Mon Sep 17 00:00:00 2001 From: ljf Date: Sat, 27 Nov 2021 19:29:20 +0100 Subject: [PATCH 128/146] [fix] Try to fix the return line bug in dnsmasq conf --- data/hooks/conf_regen/43-dnsmasq | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/hooks/conf_regen/43-dnsmasq b/data/hooks/conf_regen/43-dnsmasq index 8b5691dc6..a2aa4520b 100755 --- a/data/hooks/conf_regen/43-dnsmasq +++ b/data/hooks/conf_regen/43-dnsmasq @@ -25,7 +25,7 @@ do_pre_regen() { ynh_validate_ip4 "$ipv4" || ipv4='127.0.0.1' ipv6=$(curl -s -6 https://ip6.yunohost.org 2>/dev/null || true) ynh_validate_ip6 "$ipv6" || ipv6='' - interfaces="$(ls -m /sys/class/net | sed s/,//g)" + interfaces="$(ip -j addr show | jq -r '[.[].ifname]|join(" ")')" wireless_interfaces="lo" for dev in $(ls /sys/class/net); do if [ -d "/sys/class/net/$dev/wireless" ]; then From b3df36dd168d52bfd81d4bc785bd42b074950920 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 27 Nov 2021 20:27:29 +0100 Subject: [PATCH 129/146] =?UTF-8?q?Typo=20=C3=A9=5F=C3=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/hooks/conf_regen/37-mdns | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/hooks/conf_regen/37-mdns b/data/hooks/conf_regen/37-mdns index 95c7a522b..bd11001e7 100755 --- a/data/hooks/conf_regen/37-mdns +++ b/data/hooks/conf_regen/37-mdns @@ -15,7 +15,7 @@ _generate_config() { [[ "$domain" =~ ^[^.]+\.local$ ]] || continue echo " - $domain" done - if [[ -e /etc/yunohot/mdns.aliases ]] + if [[ -e /etc/yunohost/mdns.aliases ]] then for localalias in $(cat /etc/yunohost/mdns.aliases | grep -v "^ *$") do From e3f33d6c203983820f4c9cd748cf5d63cede6af3 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 27 Nov 2021 21:17:06 +0100 Subject: [PATCH 130/146] Update changelog for 4.3.4.1 --- debian/changelog | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/debian/changelog b/debian/changelog index fbf9bcefd..f53b259b6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +yunohost (4.3.4.1) stable; urgency=low + + - [fix] regenconf: Force permission on /etc/resolv.dnsmasq.conf to fix an issue on some setup with umask=027 (5881938c) + - [fix] regenconf: Typo in custom mdns alias regen conf (b3df36dd) + - [fix] regenconf: Try to fix the return line bug in dnsmasq conf ([#1385](https://github.com/YunoHost/yunohost/pull/1385)) + + Thanks to all contributors <3 ! (ljf) + + -- Alexandre Aubin Sat, 27 Nov 2021 21:15:29 +0100 + yunohost (4.3.4) stable; urgency=low - [fix] apps: Allow tilde in username/organization for repo URLs ([#1382](https://github.com/YunoHost/yunohost/pull/1382)) From 6854f23cca74fad1b131f5bdec7d92c7cc62aec4 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 28 Nov 2021 02:51:58 +0100 Subject: [PATCH 131/146] [fix] yunomdns: Ignore ipv4 link-local addresses --- bin/yunomdns | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/yunomdns b/bin/yunomdns index 0aee28195..11bed3215 100755 --- a/bin/yunomdns +++ b/bin/yunomdns @@ -21,7 +21,7 @@ def get_network_local_interfaces() -> Dict[str, Dict[str, List[str]]]: interfaces = { adapter.name: { - "ipv4": [ip.ip for ip in adapter.ips if ip.is_IPv4 and ip_address(ip.ip).is_private], + "ipv4": [ip.ip for ip in adapter.ips if ip.is_IPv4 and ip_address(ip.ip).is_private and not ip_address(ip.ip).is_link_local], "ipv6": [ip.ip[0] for ip in adapter.ips if ip.is_IPv6 and ip_address(ip.ip[0]).is_private and not ip_address(ip.ip[0]).is_link_local], } for adapter in ifaddr.get_adapters() From f43e567bf0930373e822d814ad21df3ec8b91bae Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 28 Nov 2021 16:12:24 +0100 Subject: [PATCH 132/146] apps: Remove the 'HOME' var from hook_exec env, because it's often defined in CLI but not in API because yunohost-api runs in a systemd service --- src/hook.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/hook.py b/src/hook.py index 98b624f12..fbf336ed7 100644 --- a/src/hook.py +++ b/src/hook.py @@ -439,6 +439,12 @@ def _hook_exec_bash(path, args, chdir, env, user, return_format, loggers): _env = os.environ.copy() _env.update(env) + # Remove the 'HOME' var which is causing some inconsistencies between + # cli and webapi (HOME ain't defined in yunohost-api because ran from systemd) + # Apps that need the HOME var should define it in the app scripts + if "HOME" in _env: + del _env["HOME"] + returncode = call_async_output(command, loggers, shell=False, cwd=chdir, env=_env) raw_content = None From bfa5092c103de871fb745d5a81a529c0e55e3d24 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 28 Nov 2021 13:39:16 +0100 Subject: [PATCH 133/146] ci: Yolorework i18n tests, add a maintenance/ folder --- .gitlab/ci/test.gitlab-ci.yml | 19 -- .gitlab/ci/translation.gitlab-ci.yml | 14 +- locales/ca.json | 34 --- locales/de.json | 38 +--- locales/en.json | 95 +++++---- locales/eo.json | 5 - locales/es.json | 21 +- locales/eu.json | 36 +--- locales/fa.json | 37 ---- locales/fr.json | 42 +--- locales/gl.json | 42 +--- locales/hi.json | 1 - locales/id.json | 2 +- locales/it.json | 38 +--- locales/nb_NO.json | 1 - locales/nl.json | 1 - locales/oc.json | 16 +- locales/pt.json | 3 +- locales/ru.json | 3 +- locales/sl.json | 2 +- locales/uk.json | 42 +--- locales/zh_Hans.json | 42 +--- maintenance/autofix_locale_format.py | 169 +++++++++++++++ maintenance/make_changelog.sh | 36 ++++ .../missing_i18n_keys.py | 95 +++++---- tests/add_missing_keys.py | 193 ------------------ tests/autofix_locale_format.py | 53 ----- tests/reformat_locales.py | 60 ------ tests/remove_stale_translated_strings.py | 25 --- tests/test_translation_format_consistency.py | 52 ----- 30 files changed, 334 insertions(+), 883 deletions(-) create mode 100644 maintenance/autofix_locale_format.py create mode 100644 maintenance/make_changelog.sh rename tests/test_i18n_keys.py => maintenance/missing_i18n_keys.py (71%) delete mode 100644 tests/add_missing_keys.py delete mode 100644 tests/autofix_locale_format.py delete mode 100644 tests/reformat_locales.py delete mode 100644 tests/remove_stale_translated_strings.py delete mode 100644 tests/test_translation_format_consistency.py diff --git a/.gitlab/ci/test.gitlab-ci.yml b/.gitlab/ci/test.gitlab-ci.yml index 1165e4826..27df0658d 100644 --- a/.gitlab/ci/test.gitlab-ci.yml +++ b/.gitlab/ci/test.gitlab-ci.yml @@ -23,7 +23,6 @@ artifacts: true - job: upgrade - ######################################## # TESTS ######################################## @@ -51,24 +50,6 @@ full-tests: reports: junit: report.xml -test-i18n-keys: - extends: .test-stage - script: - - python3 -m pytest tests/test_i18n_keys.py - only: - changes: - - locales/en.json - - src/*.py - - src/diagnosers/*.py - -test-translation-format-consistency: - extends: .test-stage - script: - - python3 -m pytest tests/test_translation_format_consistency.py - only: - changes: - - locales/* - test-actionmap: extends: .test-stage script: diff --git a/.gitlab/ci/translation.gitlab-ci.yml b/.gitlab/ci/translation.gitlab-ci.yml index 41e8c82d2..159dc7aa0 100644 --- a/.gitlab/ci/translation.gitlab-ci.yml +++ b/.gitlab/ci/translation.gitlab-ci.yml @@ -1,6 +1,14 @@ ######################################## # TRANSLATION ######################################## +test-i18n-keys: + script: + - python3 maintenance/missing_i18n_keys --check + only: + changes: + - locales/en.json + - src/*.py + - src/diagnosers/*.py autofix-translated-strings: stage: translation @@ -12,12 +20,10 @@ autofix-translated-strings: - git config --global user.name "$GITHUB_USER" - git remote set-url origin https://$GITHUB_TOKEN:x-oauth-basic@github.com/YunoHost/yunohost.git script: - - cd tests # Maybe move this script location to another folder? # create a local branch that will overwrite distant one - git checkout -b "ci-autofix-translated-strings-${CI_COMMIT_REF_NAME}" --no-track - - python3 remove_stale_translated_strings.py - - python3 autofix_locale_format.py - - python3 reformat_locales.py + - python3 maintenance/missing_i18n_keys --fix + - python3 maintenanceautofix_locale_format.py - '[ $(git diff -w | 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 "HEAD":"ci-remove-stale-translated-strings-${CI_COMMIT_REF_NAME}" diff --git a/locales/ca.json b/locales/ca.json index 00e3f65ad..4b1c51edd 100644 --- a/locales/ca.json +++ b/locales/ca.json @@ -17,7 +17,6 @@ "app_install_files_invalid": "Aquests fitxers no es poden instal·lar", "app_make_default_location_already_used": "No es pot fer l'aplicació '{app}' l'aplicació per defecte en el domini «{domain}», ja que ja és utilitzat per '{other_app}'", "app_location_unavailable": "Aquesta URL no està disponible o entra en conflicte amb aplicacions ja instal·lades:\n{apps}", - "app_manifest_invalid": "Hi ha algun error amb el manifest de l'aplicació: {error}", "app_not_correctly_installed": "{app} sembla estar mal instal·lada", "app_not_installed": "No s'ha trobat {app} en la llista d'aplicacions instal·lades: {all_apps}", "app_not_properly_removed": "{app} no s'ha pogut suprimir correctament", @@ -132,7 +131,6 @@ "domains_available": "Dominis disponibles:", "done": "Fet", "downloading": "Descarregant...", - "dyndns_could_not_check_provide": "No s'ha pogut verificar si {provider} pot oferir {domain}.", "dyndns_could_not_check_available": "No s'ha pogut verificar la disponibilitat de {domain} a {provider}.", "dyndns_ip_update_failed": "No s'ha pogut actualitzar l'adreça IP al DynDNS", "dyndns_ip_updated": "S'ha actualitzat l'adreça IP al DynDNS", @@ -297,7 +295,6 @@ "service_disabled": "El servei «{service}» ja no començarà al arrancar el sistema.", "service_enable_failed": "No s'ha pogut fer que el servei «{service}» comenci automàticament a l'arrancada.\n\nRegistres recents: {logs}", "service_enabled": "El servei «{service}» començarà automàticament durant l'arrancada del sistema.", - "service_regen_conf_is_deprecated": "«yunohost service regen-conf» està desfasat! Utilitzeu «yunohost tools regen-conf» en el seu lloc.", "service_remove_failed": "No s'ha pogut eliminar el servei «{service}»", "service_removed": "S'ha eliminat el servei «{service}»", "service_reload_failed": "No s'ha pogut tornar a carregar el servei «{service}»\n\nRegistres recents: {logs}", @@ -316,8 +313,6 @@ "system_upgraded": "S'ha actualitzat el sistema", "system_username_exists": "El nom d'usuari ja existeix en la llista d'usuaris de sistema", "this_action_broke_dpkg": "Aquesta acció a trencat dpkg/APT (els gestors de paquets del sistema)... Podeu intentar resoldre el problema connectant-vos amb SSH i executant «sudo apt install --fix-broken» i/o «sudo dpkg --configure -a».", - "tools_upgrade_at_least_one": "Especifiqueu «apps», o «system»", - "tools_upgrade_cant_both": "No es poden actualitzar tant el sistema com les aplicacions al mateix temps", "tools_upgrade_cant_hold_critical_packages": "No es poden mantenir els paquets crítics...", "tools_upgrade_cant_unhold_critical_packages": "No es poden deixar de mantenir els paquets crítics...", "tools_upgrade_regular_packages": "Actualitzant els paquets «normals» (no relacionats amb YunoHost)...", @@ -547,31 +542,7 @@ "restore_already_installed_apps": "No s'han pogut restaurar les següents aplicacions perquè ja estan instal·lades: {apps}", "app_packaging_format_not_supported": "No es pot instal·lar aquesta aplicació ja que el format del paquet no és compatible amb la versió de YunoHost del sistema. Hauríeu de considerar actualitzar el sistema.", "diagnosis_dns_try_dyndns_update_force": "La configuració DNS d'aquest domini hauria de ser gestionada automàticament per YunoHost. Si aquest no és el cas, podeu intentar forçar-ne l'actualització utilitzant yunohost dyndns update --force.", - "migration_0015_cleaning_up": "Netejant la memòria cau i els paquets que ja no són necessaris...", - "migration_0015_specific_upgrade": "Començant l'actualització dels paquets del sistema que s'han d'actualitzar de forma independent...", - "migration_0015_modified_files": "Tingueu en compte que s'han trobat els següents fitxers que es van modificar manualment i podria ser que es sobreescriguin durant l'actualització: {manually_modified_files}", - "migration_0015_problematic_apps_warning": "Tingueu en compte que s'han trobat les següents aplicacions que podrien ser problemàtiques. Sembla que aquestes aplicacions no s'han instal·lat des del catàleg d'aplicacions de YunoHost, o no estan marcades com «funcionant». En conseqüència, no es pot garantir que segueixin funcionant després de l'actualització: {problematic_apps}", - "migration_0015_general_warning": "Tingueu en compte que aquesta migració és una operació delicada. L'equip de YunoHost ha fet tots els possibles per revisar i testejar, però tot i això podria ser que la migració trenqui alguna part del sistema o algunes aplicacions.\n\nPer tant, està recomana:\n - Fer una còpia de seguretat de totes les dades o aplicacions crítiques. Més informació a https://yunohost.org/backup;\n - Ser pacient un cop comenci la migració: en funció de la connexió Internet i del maquinari, podria estar unes hores per actualitzar-ho tot.", - "migration_0015_system_not_fully_up_to_date": "El sistema no està completament al dia. Heu de fer una actualització normal abans de fer la migració a Buster.", - "migration_0015_not_enough_free_space": "Hi ha poc espai lliure a /var/! HI hauria d'haver un mínim de 1GB lliure per poder fer aquesta migració.", - "migration_0015_not_stretch": "La distribució actual de Debian no és Stretch!", - "migration_0015_yunohost_upgrade": "Començant l'actualització del nucli de YunoHost...", - "migration_0015_still_on_stretch_after_main_upgrade": "Alguna cosa ha anat malament durant la actualització principal, sembla que el sistema encara està en Debian Stretch", - "migration_0015_main_upgrade": "Començant l'actualització principal...", - "migration_0015_patching_sources_list": "Apedaçament de source.lists...", - "migration_0015_start": "Començant la migració a Buster", - "migration_description_0015_migrate_to_buster": "Actualitza els sistema a Debian Buster i YunoHost 4.x", "regenconf_need_to_explicitly_specify_ssh": "La configuració ssh ha estat modificada manualment, però heu d'especificar explícitament la categoria «ssh» amb --force per fer realment els canvis.", - "migration_0015_weak_certs": "S'han trobat els següents certificats que encara utilitzen algoritmes de signatura febles i s'han d'actualitzar per a ser compatibles amb la propera versió de nginx: {certs}", - "service_description_php7.4-fpm": "Executa aplicacions escrites en PHP amb NGINX", - "migration_0018_failed_to_reset_legacy_rules": "No s'ha pogut restaurar les regles legacy iptables: {error}", - "migration_0018_failed_to_migrate_iptables_rules": "No s'ha pogut migrar les regles legacy iptables a nftables: {error}", - "migration_0017_not_enough_space": "Feu suficient espai disponible en {path} per a realitzar la migració.", - "migration_0017_postgresql_11_not_installed": "PostgreSQL 9.6 està instal·lat, però postgreSQL 11 no? Potser que hagi passat alguna cosa rara en aquest sistema :(...", - "migration_0017_postgresql_96_not_installed": "PostgreSQL no està instal·lat en aquest sistema. No s'ha de realitzar cap operació.", - "migration_description_0018_xtable_to_nftable": "Migrar les regles del trànsit de xarxa al nou sistema nftable", - "migration_description_0017_postgresql_9p6_to_11": "Migrar les bases de dades de PosrgreSQL 9.6 a 11", - "migration_description_0016_php70_to_php73_pools": "Migrar els fitxers de configuració «pool» php7.0-fpm a php7.3", "global_settings_setting_backup_compress_tar_archives": "Comprimir els arxius (.tar.gz) en lloc d'arxius no comprimits (.tar) al crear noves còpies de seguretat. N.B.: activar aquesta opció permet fer arxius de còpia de seguretat més lleugers, però el procés inicial de còpia de seguretat serà significativament més llarg i més exigent a nivell de CPU.", "global_settings_setting_smtp_relay_host": "L'amfitrió de tramesa SMTP que s'ha d'utilitzar per enviar correus electrònics en lloc d'aquesta instància de YunoHost. És útil si esteu en una de les següents situacions: el port 25 està bloquejat per el vostre proveïdor d'accés a internet o proveïdor de servidor privat virtual, si teniu una IP residencial llistada a DUHL, si no podeu configurar el DNS invers o si el servidor no està directament exposat a internet i voleu utilitzar-ne un altre per enviar correus electrònics.", "unknown_main_domain_path": "Domini o ruta desconeguda per a «{app}». Heu d'especificar un domini i una ruta per a poder especificar una URL per al permís.", @@ -582,15 +553,10 @@ "permission_protected": "El permís {permission} està protegit. No podeu afegir o eliminar el grup visitants a o d'aquest permís.", "pattern_email_forward": "Ha de ser una adreça de correu vàlida, s'accepta el símbol «+» (per exemple, algu+etiqueta@exemple.cat)", "invalid_number": "Ha de ser una xifra", - "migration_0019_slapd_config_will_be_overwritten": "Sembla que heu modificat manualment la configuració sldap. Per a aquesta migració crítica, YunoHist necessita forçar l'actualització de la configuració sldap. Es crearà una còpia de seguretat dels fitxers originals a {conf_backup_folder}.", - "migration_0019_add_new_attributes_in_ldap": "Afegir nous atributs per als permisos en la base de dades LDAP", - "migration_description_0019_extend_permissions_features": "Amplia/refés el sistema de gestió dels permisos de l'aplicació", - "migrating_legacy_permission_settings": "Migració dels paràmetres de permisos antics...", "invalid_regex": "Regex no vàlid: «{regex}»", "global_settings_setting_smtp_relay_password": "Tramesa de la contrasenya d'amfitrió SMTP", "global_settings_setting_smtp_relay_user": "Tramesa de compte d'usuari SMTP", "global_settings_setting_smtp_relay_port": "Port de tramesa SMTP", - "domain_name_unknown": "Domini «{domain}» desconegut", "diagnosis_processes_killed_by_oom_reaper": "El sistema ha matat alguns processos recentment perquè s'ha quedat sense memòria. Això acostuma a ser un símptoma de falta de memòria en el sistema o d'un procés que consumeix massa memòria. Llista dels processos que s'han matat:\n{kills_summary}", "diagnosis_package_installed_from_sury_details": "Alguns paquets s'han instal·lat per equivocació des d'un repositori de tercers anomenat Sury. L'equip de YunoHost a millorat l'estratègia per a gestionar aquests paquets, però s'espera que algunes configuracions que han instal·lat aplicacions PHP7.3 a Stretch puguin tenir algunes inconsistències. Per a resoldre aquesta situació, hauríeu d'intentar executar la següent ordre: {cmd_to_fix}", "diagnosis_package_installed_from_sury": "Alguns paquets del sistema s'han de tornar a versions anteriors", diff --git a/locales/de.json b/locales/de.json index 5dd8c059d..260ba3214 100644 --- a/locales/de.json +++ b/locales/de.json @@ -10,7 +10,6 @@ "app_extraction_failed": "Installationsdateien konnten nicht entpackt werden", "app_id_invalid": "Falsche App-ID", "app_install_files_invalid": "Diese Dateien können nicht installiert werden", - "app_manifest_invalid": "Mit dem App-Manifest stimmt etwas nicht: {error}", "app_not_installed": "{app} konnte nicht in der Liste installierter Apps gefunden werden: {all_apps}", "app_removed": "{app} wurde entfernt", "app_sources_fetch_failed": "Quelldateien konnten nicht abgerufen werden, ist die URL korrekt?", @@ -185,7 +184,6 @@ "experimental_feature": "Warnung: Der Maintainer hat diese Funktion als experimentell gekennzeichnet. Sie ist nicht stabil. Sie sollten sie nur verwenden, wenn Sie wissen, was Sie tun.", "dyndns_domain_not_provided": "Der DynDNS-Anbieter {provider} kann die Domäne(n) {domain} nicht bereitstellen.", "dyndns_could_not_check_available": "Konnte nicht überprüfen, ob {domain} auf {provider} verfügbar ist.", - "dyndns_could_not_check_provide": "Konnte nicht überprüft, ob {provider} die Domain(s) {domain} bereitstellen kann.", "domain_dns_conf_is_just_a_recommendation": "Dieser Befehl zeigt dir die *empfohlene* Konfiguration. Er konfiguriert *nicht* das DNS für dich. Es liegt in deiner Verantwortung, die DNS-Zone bei deinem DNS-Registrar nach dieser Empfehlung zu konfigurieren.", "dpkg_lock_not_available": "Dieser Befehl kann momentan nicht ausgeführt werden, da anscheinend ein anderes Programm die Sperre von dpkg (dem Systempaket-Manager) verwendet", "confirm_app_install_thirdparty": "WARNUNG! Diese Applikation ist nicht Teil des YunoHost-Applikationskatalogs. Das Installieren von Drittanbieterapplikationen könnte die Sicherheit und Integrität Ihres Systems beeinträchtigen. Sie sollten wahrscheinlich NICHT fortfahren, es sei denn, Sie wissen, was Sie tun. Es wird KEIN SUPPORT angeboten, wenn die Applikation nicht funktionieren oder Ihr System beschädigen sollte... Wenn Sie das Risiko trotzdem eingehen möchten, tippen Sie '{answers}'", @@ -308,9 +306,6 @@ "backup_archive_cant_retrieve_info_json": "Die Informationen für das Archiv '{archive}' konnten nicht geladen werden... Die Datei info.json wurde nicht gefunden (oder ist kein gültiges json).", "app_packaging_format_not_supported": "Diese App kann nicht installiert werden da das Paketformat nicht von der YunoHost-Version unterstützt wird. Denken Sie darüber nach das System zu aktualisieren.", "certmanager_domain_not_diagnosed_yet": "Für die Domain {domain} gibt es noch keine Diagnose-Resultate. Bitte widerhole die Diagnose für die Kategorien 'DNS records' und 'Web' im Diagnose-Bereich um zu überprüfen ob die Domain für Let's Encrypt bereit ist. (Wenn du weißt was du tust, kannst du --no-checks benutzen, um diese Überprüfung zu überspringen.)", - "migration_0015_patching_sources_list": "sources.lists wird repariert...", - "migration_0015_start": "Start der Migration auf Buster", - "migration_description_0015_migrate_to_buster": "Auf Debian Buster und YunoHost 4.x upgraden", "mail_unavailable": "Diese E-Mail Adresse ist reserviert und wird dem/der ersten Benutzer:in automatisch zugewiesen", "diagnosis_services_conf_broken": "Die Konfiguration für den Dienst {service} ist fehlerhaft!", "diagnosis_services_running": "Dienst {service} läuft!", @@ -335,7 +330,6 @@ "diagnosis_http_timeout": "Wartezeit wurde beim Versuch, von außen eine Verbindung zum Server aufzubauen, überschritten. Er scheint nicht erreichbar zu sein.
1. Die häufigste Ursache für dieses Problem ist daß der Port 80 (und 433) nicht richtig zu Ihrem Server weitergeleitet werden.
2. Sie sollten auch sicherstellen, daß der Dienst nginx läuft.
3. In komplexeren Umgebungen: Stellen Sie sicher, daß keine Firewall oder Reverse-Proxy stört.", "service_reloaded_or_restarted": "Der Dienst '{service}' wurde erfolgreich neu geladen oder gestartet", "service_restarted": "Der Dienst '{service}' wurde neu gestartet", - "service_regen_conf_is_deprecated": "'yunohost service regen-conf' ist veraltet! Bitte verwenden Sie stattdessen 'yunohost tools regen-conf'.", "certmanager_warning_subdomain_dns_record": "Die Subdomäne \"{subdomain}\" löst nicht zur gleichen IP Adresse auf wie \"{domain}\". Einige Funktionen sind nicht verfügbar bis du dies behebst und die Zertifikate neu erzeugst.", "diagnosis_ports_ok": "Port {port} ist von außen erreichbar.", "diagnosis_ram_verylow": "Das System hat nur {available} ({available_percent}%) RAM zur Verfügung! (von insgesamt {total})", @@ -358,7 +352,6 @@ "diagnosis_swap_none": "Das System hat gar keinen Swap. Sie sollten sich überlegen mindestens {recommended} an Swap einzurichten, um Situationen zu verhindern, in welchen der RAM des Systems knapp wird.", "diagnosis_mail_ehlo_unreachable_details": "Konnte keine Verbindung zu Ihrem Server auf dem Port 25 herzustellen per IPv{ipversion}. Er scheint nicht erreichbar zu sein.
1. Das häufigste Problem ist, dass der Port 25 nicht richtig zu Ihrem Server weitergeleitet ist.
2. Sie sollten auch sicherstellen, dass der Postfix-Dienst läuft.
3. In komplexeren Umgebungen: Stellen Sie sicher, daß keine Firewall oder Reverse-Proxy stört.", "diagnosis_mail_ehlo_wrong": "Ein anderer SMTP-Server antwortet auf IPv{ipversion}. Ihr Server wird wahrscheinlich nicht in der Lage sein, E-Mails zu empfangen.", - "migration_description_0018_xtable_to_nftable": "Alte Netzwerkverkehrsregeln zum neuen nftable-System migrieren", "service_reload_failed": "Der Dienst '{service}' konnte nicht erneut geladen werden.\n\nKürzlich erstellte Logs des Dienstes: {logs}", "service_reloaded": "Der Dienst '{service}' wurde erneut geladen", "service_restart_failed": "Der Dienst '{service}' konnte nicht erneut gestartet werden.\n\nKürzlich erstellte Logs des Dienstes: {logs}", @@ -435,7 +428,6 @@ "diagnosis_http_nginx_conf_not_up_to_date_details": "Um dieses Problem zu beheben, geben Sie in der Kommandozeile yunohost tools regen-conf nginx --dry-run --with-diff ein. Dieses Tool zeigt ihnen den Unterschied an. Wenn Sie damit einverstanden sind, können Sie mit yunohost tools regen-conf nginx --force die Änderungen übernehmen.", "diagnosis_backports_in_sources_list": "Sie haben anscheinend apt (den Paketmanager) für das Backports-Repository konfiguriert. Wir raten strikte davon ab, Pakete aus dem Backports-Repository zu installieren. Diese würden wahrscheinlich zu Instabilitäten und Konflikten führen. Es sei denn, Sie wissen was Sie tun.", "diagnosis_basesystem_hardware_model": "Das Servermodell ist {model}", - "domain_name_unknown": "Domäne '{domain}' unbekannt", "group_user_not_in_group": "Benutzer:in {user} ist nicht in der Gruppe {group}", "group_user_already_in_group": "Benutzer:in {user} ist bereits in der Gruppe {group}", "group_cannot_edit_visitors": "Die Gruppe \"Besucher\" kann nicht manuell editiert werden. Sie ist eine Sondergruppe und repräsentiert anonyme Besucher", @@ -459,7 +451,6 @@ "log_available_on_yunopaste": "Das Protokoll ist nun via {url} verfügbar", "log_app_action_run": "Führe Aktion der Applikation '{}' aus", "invalid_regex": "Ungültige Regex:'{regex}'", - "migration_description_0016_php70_to_php73_pools": "Migrieren der php7.0-fpm-Konfigurationsdateien zu php7.3", "mailbox_disabled": "E-Mail für Benutzer:in {user} deaktiviert", "log_tools_reboot": "Server neustarten", "log_tools_shutdown": "Server ausschalten", @@ -483,28 +474,9 @@ "log_domain_remove": "Entfernen der Domäne '{}' aus der Systemkonfiguration", "log_domain_add": "Hinzufügen der Domäne '{}' zur Systemkonfiguration", "log_remove_on_failed_install": "Entfernen von '{}' nach einer fehlgeschlagenen Installation", - "migration_0015_still_on_stretch_after_main_upgrade": "Etwas ist schiefgelaufen während dem Haupt-Upgrade. Das System scheint immer noch auf Debian Stretch zu laufen", - "migration_0015_yunohost_upgrade": "Beginne YunoHost-Core-Upgrade...", - "migration_description_0019_extend_permissions_features": "Erweitern und überarbeiten des Applikationsberechtigungs-Managementsystems", - "migrating_legacy_permission_settings": "Migrieren der Legacy-Berechtigungseinstellungen...", - "migration_description_0017_postgresql_9p6_to_11": "Migrieren der Datenbanken von PostgreSQL 9.6 nach 11", - "migration_0015_main_upgrade": "Beginne Haupt-Upgrade...", - "migration_0015_not_stretch": "Die aktuelle Debian-Distribution ist nicht Stretch!", - "migration_0015_not_enough_free_space": "Der freie Speicher in /var/ ist sehr gering! Sie sollten minimal 1GB frei haben, um diese Migration durchzuführen.", "domain_remove_confirm_apps_removal": "Wenn Sie diese Domäne löschen, werden folgende Applikationen entfernt:\n{apps}\n\nSind Sie sicher? [{answers}]", - "migration_0015_cleaning_up": "Bereinigung des Cache und der Pakete, welche nicht mehr benötigt werden...", - "migration_0017_postgresql_96_not_installed": "PostgreSQL wurde auf ihrem System nicht installiert. Nichts zu tun.", - "migration_0015_system_not_fully_up_to_date": "Ihr System ist nicht vollständig auf dem neuesten Stand. Bitte führen Sie ein reguläres Upgrade durch, bevor Sie die Migration auf Buster durchführen.", - "migration_0015_modified_files": "Bitte beachten Sie, dass die folgenden Dateien als manuell bearbeitet erkannt wurden und beim nächsten Upgrade überschrieben werden könnten: {manually_modified_files}", - "migration_0015_general_warning": "Bitte beachten Sie, dass diese Migration eine heikle Angelegenheit darstellt. Das YunoHost-Team hat alles unternommen, um sie zu testen und zu überarbeiten. Dennoch ist es möglich, dass diese Migration Teile des Systems oder Applikationen beschädigen könnte.\n\nDeshalb ist folgendes zu empfehlen:\n…- Führen Sie ein Backup aller kritischen Daten und Applikationen durch. Mehr unter https://yunohost.org/backup;\n…- Seien Sie geduldig nachdem Sie die Migration gestartet haben: Abhängig von Ihrer Internetverbindung und Ihrer Hardware kann es einige Stunden dauern, bis das Upgrade fertig ist.", - "migration_0015_problematic_apps_warning": "Bitte beachten Sie, dass folgende möglicherweise problematischen Applikationen auf Ihrer Installation erkannt wurden. Es scheint, als ob sie nicht aus dem YunoHost-Applikationskatalog installiert oder nicht als 'working' gekennzeichnet worden sind. Folglich kann nicht garantiert werden, dass sie nach dem Upgrade immer noch funktionieren: {problematic_apps}", - "migration_0015_specific_upgrade": "Start des Upgrades der Systempakete, deren Upgrade separat durchgeführt werden muss...", - "migration_0015_weak_certs": "Die folgenden Zertifikate verwenden immer noch schwache Signierungsalgorithmen und müssen aktualisiert werden um mit der nächsten Version von nginx kompatibel zu sein: {certs}", "migrations_pending_cant_rerun": "Diese Migrationen sind immer noch anstehend und können deshalb nicht erneut durchgeführt werden: {ids}", - "migration_0019_add_new_attributes_in_ldap": "Hinzufügen neuer Attribute für die Berechtigungen in der LDAP-Datenbank", "migrations_not_pending_cant_skip": "Diese Migrationen sind nicht anstehend und können deshalb nicht übersprungen werden: {ids}", - "migration_0018_failed_to_reset_legacy_rules": "Zurücksetzen der veralteten iptables-Regeln fehlgeschlagen: {error}", - "migration_0019_slapd_config_will_be_overwritten": "Es schaut aus, als ob Sie die slapd-Konfigurationsdatei manuell bearbeitet haben. Für diese kritische Migration muss das Update der slapd-Konfiguration erzwungen werden. Von der Originaldatei wird ein Backup gemacht in {conf_backup_folder}.", "migrations_success_forward": "Migration {id} abgeschlossen", "migrations_cant_reach_migration_file": "Die Migrationsdateien konnten nicht aufgerufen werden im Verzeichnis '%s'", "migrations_dependencies_not_satisfied": "Führen Sie diese Migrationen aus: '{dependencies_id}', vor der Migration {id}.", @@ -516,9 +488,6 @@ "migrations_must_provide_explicit_targets": "Sie müssen konkrete Ziele angeben, wenn Sie '--skip' oder '--force-rerun' verwenden", "migrations_need_to_accept_disclaimer": "Um die Migration {id} durchzuführen, müssen Sie den Disclaimer akzeptieren.\n---\n{disclaimer}\n---\n Wenn Sie bestätigen, dass Sie die Migration durchführen wollen, wiederholen Sie bitte den Befehl mit der Option '--accept-disclaimer'.", "migrations_no_migrations_to_run": "Keine Migrationen durchzuführen", - "migration_0017_postgresql_11_not_installed": "PostgreSQL 9.6 ist installiert aber nicht postgreSQL 11? Etwas komisches ist Ihrem System zugestossen :(...", - "migration_0017_not_enough_space": "Stellen Siea ausreichend Speicherplatz im Verzeichnis {path} zur Verfügung um die Migration durchzuführen.", - "migration_0018_failed_to_migrate_iptables_rules": "Migration der veralteten iptables-Regeln zu nftables fehlgeschlagen: {error}", "migrations_exclusive_options": "'--auto', '--skip' und '--force-rerun' sind Optionen, die sich gegenseitig ausschliessen.", "migrations_no_such_migration": "Es existiert keine Migration genannt '{id}'", "migrations_running_forward": "Durchführen der Migrationen {id}...", @@ -572,7 +541,6 @@ "regex_with_only_domain": "Du kannst regex nicht als Domain verwenden, sondern nur als Pfad", "root_password_desynchronized": "Das Admin-Passwort wurde verändert, aber das Root-Passwort ist immer noch das alte!", "regenconf_need_to_explicitly_specify_ssh": "Die SSH-Konfiguration wurde manuell modifiziert, aber Sie müssen explizit die Kategorie 'SSH' mit --force spezifizieren, um die Änderungen tatsächlich anzuwenden.", - "migration_update_LDAP_schema": "Aktualisiere das LDAP-Schema...", "log_backup_create": "Erstelle ein Backup-Archiv", "diagnosis_sshd_config_inconsistent": "Es sieht aus, als ob der SSH-Port manuell geändert wurde in /etc/ssh/ssh_config. Seit YunoHost 4.2 ist eine neue globale Einstellung 'security.ssh.port' verfügbar um zu verhindern, dass die Konfiguration manuell verändert wird.", "diagnosis_sshd_config_insecure": "Die SSH-Konfiguration wurde scheinbar manuell geändert und ist unsicher, weil sie keine 'AllowGroups'- oder 'AllowUsers' -Direktiven für die Beschränkung des Zugriffs durch autorisierte Benutzer enthält.", @@ -582,7 +550,6 @@ "migration_ldap_rollback_success": "System-Rollback erfolgreich.", "migration_ldap_migration_failed_trying_to_rollback": "Migrieren war nicht möglich... Versuch, ein Rollback des Systems durchzuführen.", "migration_ldap_backup_before_migration": "Vor der eigentlichen Migration ein Backup der LDAP-Datenbank und der Applikations-Einstellungen erstellen.", - "migration_description_0020_ssh_sftp_permissions": "Unterstützung für SSH- und SFTP-Berechtigungen hinzufügen", "global_settings_setting_ssowat_panel_overlay_enabled": "Das SSOwat-Overlay-Panel aktivieren", "global_settings_setting_security_ssh_port": "SSH-Port", "diagnosis_sshd_config_inconsistent_details": "Bitte führen Sie yunohost settings set security.ssh.port -v YOUR_SSH_PORT aus, um den SSH-Port festzulegen, und prüfen Sie yunohost tools regen-conf ssh --dry-run --with-diff und yunohost tools regen-conf ssh --force um Ihre conf auf die YunoHost-Empfehlung zurückzusetzen.", @@ -603,7 +570,6 @@ "service_description_yunohost-firewall": "Verwaltet offene und geschlossene Ports zur Verbindung mit Diensten", "service_description_yunohost-api": "Verwaltet die Interaktionen zwischen der Weboberfläche von YunoHost und dem System", "service_description_ssh": "Ermöglicht die Verbindung zu Ihrem Server über ein Terminal (SSH-Protokoll)", - "service_description_php7.3-fpm": "Führt in PHP geschriebene Apps mit NGINX aus", "server_reboot_confirm": "Der Server wird sofort heruntergefahren, sind Sie sicher? [{answers}]", "server_reboot": "Der Server wird neu gestartet", "server_shutdown_confirm": "Der Server wird sofort heruntergefahren, sind Sie sicher? [{answers}]", @@ -615,8 +581,6 @@ "tools_upgrade_regular_packages": "Momentan werden Upgrades für das System (YunoHost-unabhängige) Pakete durchgeführt...", "tools_upgrade_cant_unhold_critical_packages": "Konnte für die kritischen Pakete das Flag 'hold' nicht aufheben...", "tools_upgrade_cant_hold_critical_packages": "Konnte für die kritischen Pakete das Flag 'hold' nicht setzen...", - "tools_upgrade_cant_both": "Kann das Upgrade für das System und die Applikation nicht gleichzeitig durchführen", - "tools_upgrade_at_least_one": "Bitte geben Sie '--apps' oder '--system' an", "this_action_broke_dpkg": "Diese Aktion hat unkonfigurierte Pakete verursacht, welche durch dpkg/apt (die Paketverwaltungen dieses Systems) zurückgelassen wurden... Sie können versuchen dieses Problem zu lösen, indem Sie 'sudo apt install --fix-broken' und/oder 'sudo dpkg --configure -a' ausführen.", "update_apt_cache_failed": "Kann den Cache von APT (Debians Paketmanager) nicht aktualisieren. Hier ist ein Auszug aus den sources.list-Zeilen, die helfen könnten, das Problem zu identifizieren:\n{sourceslist}", "tools_upgrade_special_packages_completed": "YunoHost-Paketupdate beendet.\nDrücke [Enter], um zurück zur Kommandoziele zu kommen", @@ -642,4 +606,4 @@ "config_validate_time": "Sollte eine zulässige Zeit wie HH:MM sein", "config_validate_url": "Sollte eine zulässige web URL sein", "config_version_not_supported": "Konfigurationspanel Versionen '{version}' sind nicht unterstützt." -} +} \ No newline at end of file diff --git a/locales/en.json b/locales/en.json index 20667d076..f720af34e 100644 --- a/locales/en.json +++ b/locales/en.json @@ -213,11 +213,11 @@ "diagnosis_http_could_not_diagnose_details": "Error: {error}", "diagnosis_http_hairpinning_issue": "Your local network does not seem to have hairpinning enabled.", "diagnosis_http_hairpinning_issue_details": "This is probably because of your ISP box / router. As a result, people from outside your local network will be able to access your server as expected, but not people from inside the local network (like you, probably?) when using the domain name or global IP. You may be able to improve the situation by having a look at https://yunohost.org/dns_local_network", - "diagnosis_http_special_use_tld": "Domain {domain} is based on a special-use top-level domain (TLD) such as .local or .test and is therefore not expected to be exposed outside the local network.", "diagnosis_http_nginx_conf_not_up_to_date": "This domain's nginx configuration appears to have been modified manually, and prevents YunoHost from diagnosing if it's reachable on HTTP.", "diagnosis_http_nginx_conf_not_up_to_date_details": "To fix the situation, inspect the difference with the command line using yunohost tools regen-conf nginx --dry-run --with-diff and if you're ok, apply the changes with yunohost tools regen-conf nginx --force.", "diagnosis_http_ok": "Domain {domain} is reachable through HTTP from outside the local network.", "diagnosis_http_partially_unreachable": "Domain {domain} appears unreachable through HTTP from outside the local network in IPv{failed}, though it works in IPv{passed}.", + "diagnosis_http_special_use_tld": "Domain {domain} is based on a special-use top-level domain (TLD) such as .local or .test and is therefore not expected to be exposed outside the local network.", "diagnosis_http_timeout": "Timed-out while trying to contact your server from outside. It appears to be unreachable.
1. The most common cause for this issue is that port 80 (and 443) are not correctly forwarded to your server.
2. You should also make sure that the service nginx is running
3. On more complex setups: make sure that no firewall or reverse-proxy is interfering.", "diagnosis_http_unreachable": "Domain {domain} appears unreachable through HTTP from outside the local network.", "diagnosis_ignored_issues": "(+ {nb_ignored} ignored issue(s))", @@ -302,47 +302,47 @@ "domain_cannot_remove_main": "You cannot remove '{domain}' since it's the main domain, you first need to set another domain as the main domain using 'yunohost domain main-domain -n '; here is the list of candidate domains: {other_domains}", "domain_cannot_remove_main_add_new_one": "You cannot remove '{domain}' since it's the main domain and your only domain, you need to first add another domain using 'yunohost domain add ', then set is as the main domain using 'yunohost domain main-domain -n ' and then you can remove the domain '{domain}' using 'yunohost domain remove {domain}'.'", "domain_cert_gen_failed": "Could not generate certificate", + "domain_config_api_protocol": "API protocol", + "domain_config_auth_application_key": "Application key", + "domain_config_auth_application_secret": "Application secret key", + "domain_config_auth_consumer_key": "Consumer key", + "domain_config_auth_entrypoint": "API entry point", + "domain_config_auth_key": "Authentication key", + "domain_config_auth_secret": "Authentication secret", + "domain_config_auth_token": "Authentication token", + "domain_config_features_disclaimer": "So far, enabling/disabling mail or XMPP features only impact the recommended and automatic DNS configuration, not system configurations!", + "domain_config_mail_in": "Incoming emails", + "domain_config_mail_out": "Outgoing emails", + "domain_config_xmpp": "Instant messaging (XMPP)", "domain_created": "Domain created", "domain_creation_failed": "Unable to create domain {domain}: {error}", "domain_deleted": "Domain deleted", "domain_deletion_failed": "Unable to delete domain {domain}: {error}", "domain_dns_conf_is_just_a_recommendation": "This command shows you the *recommended* configuration. It does not actually set up the DNS configuration for you. It is your responsability to configure your DNS zone in your registrar according to this recommendation.", "domain_dns_conf_special_use_tld": "This domain is based on a special-use top-level domain (TLD) such as .local or .test and is therefore not expected to have actual DNS records.", + "domain_dns_push_already_up_to_date": "Records already up to date, nothing to do.", + "domain_dns_push_failed": "Updating the DNS records failed miserably.", + "domain_dns_push_failed_to_authenticate": "Failed to authenticate on registrar's API for domain '{domain}'. Most probably the credentials are incorrect? (Error: {error})", + "domain_dns_push_failed_to_list": "Failed to list current records using the registrar's API: {error}", + "domain_dns_push_managed_in_parent_domain": "The automatic DNS configuration feature is managed in the parent domain {parent_domain}.", + "domain_dns_push_not_applicable": "The automatic DNS configuration feature is not applicable to domain {domain}. You should manually configure your DNS records following the documentation at https://yunohost.org/dns_config.", + "domain_dns_push_partial_failure": "DNS records partially updated: some warnings/errors were reported.", + "domain_dns_push_record_failed": "Failed to {action} record {type}/{name} : {error}", + "domain_dns_push_success": "DNS records updated!", + "domain_dns_pushing": "Pushing DNS records...", + "domain_dns_registrar_experimental": "So far, the interface with **{registrar}**'s API has not been properly tested and reviewed by the YunoHost community. Support is **very experimental** - be careful!", + "domain_dns_registrar_managed_in_parent_domain": "This domain is a subdomain of {parent_domain_link}. DNS registrar configuration should be managed in {parent_domain}'s configuration panel.", + "domain_dns_registrar_not_supported": "YunoHost could not automatically detect the registrar handling this domain. You should manually configure your DNS records following the documentation at https://yunohost.org/dns.", + "domain_dns_registrar_supported": "YunoHost automatically detected that this domain is handled by the registrar **{registrar}**. If you want, YunoHost will automatically configure this DNS zone, if you provide it with the appropriate API credentials. You can find documentation on how to obtain your API credentials on this page: https://yunohost.org/registar_api_{registrar}. (You can also manually configure your DNS records following the documentation at https://yunohost.org/dns )", + "domain_dns_registrar_yunohost": "This domain is a nohost.me / nohost.st / ynh.fr and its DNS configuration is therefore automatically handled by YunoHost without any further configuration. (see the 'yunohost dyndns update' command)", "domain_dyndns_already_subscribed": "You have already subscribed to a DynDNS domain", "domain_dyndns_root_unknown": "Unknown DynDNS root domain", "domain_exists": "The domain already exists", "domain_hostname_failed": "Unable to set new hostname. This might cause an issue later (it might be fine).", - "domain_unknown": "Domain '{domain}' unknown", + "domain_registrar_is_not_configured": "The registrar is not yet configured for domain {domain}.", "domain_remove_confirm_apps_removal": "Removing this domain will remove those applications:\n{apps}\n\nAre you sure you want to do that? [{answers}]", "domain_uninstall_app_first": "Those applications are still installed on your domain:\n{apps}\n\nPlease uninstall them using 'yunohost app remove the_app_id' or move them to another domain using 'yunohost app change-url the_app_id' before proceeding to domain removal", - "domain_registrar_is_not_configured": "The registrar is not yet configured for domain {domain}.", - "domain_dns_push_not_applicable": "The automatic DNS configuration feature is not applicable to domain {domain}. You should manually configure your DNS records following the documentation at https://yunohost.org/dns_config.", - "domain_dns_push_managed_in_parent_domain": "The automatic DNS configuration feature is managed in the parent domain {parent_domain}.", - "domain_dns_registrar_managed_in_parent_domain": "This domain is a subdomain of {parent_domain_link}. DNS registrar configuration should be managed in {parent_domain}'s configuration panel.", - "domain_dns_registrar_yunohost": "This domain is a nohost.me / nohost.st / ynh.fr and its DNS configuration is therefore automatically handled by YunoHost without any further configuration. (see the 'yunohost dyndns update' command)", - "domain_dns_registrar_not_supported": "YunoHost could not automatically detect the registrar handling this domain. You should manually configure your DNS records following the documentation at https://yunohost.org/dns.", - "domain_dns_registrar_supported": "YunoHost automatically detected that this domain is handled by the registrar **{registrar}**. If you want, YunoHost will automatically configure this DNS zone, if you provide it with the appropriate API credentials. You can find documentation on how to obtain your API credentials on this page: https://yunohost.org/registar_api_{registrar}. (You can also manually configure your DNS records following the documentation at https://yunohost.org/dns )", - "domain_dns_registrar_experimental": "So far, the interface with **{registrar}**'s API has not been properly tested and reviewed by the YunoHost community. Support is **very experimental** - be careful!", - "domain_dns_push_failed_to_authenticate": "Failed to authenticate on registrar's API for domain '{domain}'. Most probably the credentials are incorrect? (Error: {error})", - "domain_dns_push_failed_to_list": "Failed to list current records using the registrar's API: {error}", - "domain_dns_push_already_up_to_date": "Records already up to date, nothing to do.", - "domain_dns_pushing": "Pushing DNS records...", - "domain_dns_push_record_failed": "Failed to {action} record {type}/{name} : {error}", - "domain_dns_push_success": "DNS records updated!", - "domain_dns_push_failed": "Updating the DNS records failed miserably.", - "domain_dns_push_partial_failure": "DNS records partially updated: some warnings/errors were reported.", - "domain_config_features_disclaimer": "So far, enabling/disabling mail or XMPP features only impact the recommended and automatic DNS configuration, not system configurations!", - "domain_config_mail_in": "Incoming emails", - "domain_config_mail_out": "Outgoing emails", - "domain_config_xmpp": "Instant messaging (XMPP)", - "domain_config_auth_token": "Authentication token", - "domain_config_auth_key": "Authentication key", - "domain_config_auth_secret": "Authentication secret", - "domain_config_api_protocol": "API protocol", - "domain_config_auth_entrypoint": "API entry point", - "domain_config_auth_application_key": "Application key", - "domain_config_auth_application_secret": "Application secret key", - "domain_config_auth_consumer_key": "Consumer key", + "domain_unknown": "Domain '{domain}' unknown", "domains_available": "Available domains:", "done": "Done", "downloading": "Downloading...", @@ -419,15 +419,15 @@ "hook_name_unknown": "Unknown hook name '{name}'", "installation_complete": "Installation completed", "invalid_number": "Must be a number", - "invalid_number_min": "Must be greater than {min}", "invalid_number_max": "Must be lesser than {max}", + "invalid_number_min": "Must be greater than {min}", "invalid_password": "Invalid password", "invalid_regex": "Invalid regex:'{regex}'", "ip6tables_unavailable": "You cannot play with ip6tables here. You are either in a container or your kernel does not support it", "iptables_unavailable": "You cannot play with iptables here. You are either in a container or your kernel does not support it", + "ldap_attribute_already_exists": "LDAP attribute '{attribute}' already exists with value '{value}'", "ldap_server_down": "Unable to reach LDAP server", "ldap_server_is_down_restart_it": "The LDAP service is down, attempt to restart it...", - "ldap_attribute_already_exists": "LDAP attribute '{attribute}' already exists with value '{value}'", "log_app_action_run": "Run action of the '{}' app", "log_app_change_url": "Change the URL of the '{}' app", "log_app_config_set": "Apply config to the '{}' app", @@ -443,9 +443,9 @@ "log_does_exists": "There is no operation log with the name '{log}', use 'yunohost log list' to see all available operation logs", "log_domain_add": "Add '{}' domain into system configuration", "log_domain_config_set": "Update configuration for domain '{}'", + "log_domain_dns_push": "Push DNS records for domain '{}'", "log_domain_main_domain": "Make '{}' the main domain", "log_domain_remove": "Remove '{}' domain from system configuration", - "log_domain_dns_push": "Push DNS records for domain '{}'", "log_dyndns_subscribe": "Subscribe to a YunoHost subdomain '{}'", "log_dyndns_update": "Update the IP associated with your YunoHost subdomain '{}'", "log_help_to_get_failed_log": "The operation '{desc}' could not be completed. Please share the full log of this operation using the command 'yunohost log share {name}' to get help", @@ -484,22 +484,22 @@ "mailbox_used_space_dovecot_down": "The Dovecot mailbox service needs to be up if you want to fetch used mailbox space", "main_domain_change_failed": "Unable to change the main domain", "main_domain_changed": "The main domain has been changed", - "migration_0021_start" : "Starting migration to Bullseye", - "migration_0021_patching_sources_list": "Patching the sources.lists...", - "migration_0021_main_upgrade": "Starting main upgrade...", - "migration_0021_still_on_buster_after_main_upgrade": "Something went wrong during the main upgrade, the system appears to still be on Debian Buster", - "migration_0021_yunohost_upgrade" : "Starting YunoHost core upgrade...", - "migration_0021_not_buster" : "The current Debian distribution is not Buster!", - "migration_0021_not_enough_free_space" : "Free space is pretty low in /var/! You should have at least 1GB free to run this migration.", - "migration_0021_system_not_fully_up_to_date": "Your system is not fully up-to-date. Please perform a regular upgrade before running the migration to Bullseye.", - "migration_0021_general_warning": "Please note that this migration is a delicate operation. The YunoHost team did its best to review and test it, but the migration might still break parts of the system or its apps.\n\nTherefore, it is recommended to:\n - Perform a backup of any critical data or app. More info on https://yunohost.org/backup;\n - Be patient after launching the migration: Depending on your Internet connection and hardware, it might take up to a few hours for everything to upgrade.", - "migration_0021_problematic_apps_warning": "Please note that the following possibly problematic installed apps were detected. It looks like those were not installed from the YunoHost app catalog, or are not flagged as 'working'. Consequently, it cannot be guaranteed that they will still work after the upgrade: {problematic_apps}", - "migration_0021_modified_files": "Please note that the following files were found to be manually modified and might be overwritten following the upgrade: {manually_modified_files}", "migration_0021_cleaning_up": "Cleaning up cache and packages not useful anymore...", + "migration_0021_general_warning": "Please note that this migration is a delicate operation. The YunoHost team did its best to review and test it, but the migration might still break parts of the system or its apps.\n\nTherefore, it is recommended to:\n - Perform a backup of any critical data or app. More info on https://yunohost.org/backup;\n - Be patient after launching the migration: Depending on your Internet connection and hardware, it might take up to a few hours for everything to upgrade.", + "migration_0021_main_upgrade": "Starting main upgrade...", + "migration_0021_modified_files": "Please note that the following files were found to be manually modified and might be overwritten following the upgrade: {manually_modified_files}", + "migration_0021_not_buster": "The current Debian distribution is not Buster!", + "migration_0021_not_enough_free_space": "Free space is pretty low in /var/! You should have at least 1GB free to run this migration.", "migration_0021_patch_yunohost_conflicts": "Applying patch to workaround conflict issue...", + "migration_0021_patching_sources_list": "Patching the sources.lists...", + "migration_0021_problematic_apps_warning": "Please note that the following possibly problematic installed apps were detected. It looks like those were not installed from the YunoHost app catalog, or are not flagged as 'working'. Consequently, it cannot be guaranteed that they will still work after the upgrade: {problematic_apps}", + "migration_0021_start": "Starting migration to Bullseye", + "migration_0021_still_on_buster_after_main_upgrade": "Something went wrong during the main upgrade, the system appears to still be on Debian Buster", + "migration_0021_system_not_fully_up_to_date": "Your system is not fully up-to-date. Please perform a regular upgrade before running the migration to Bullseye.", + "migration_0021_yunohost_upgrade": "Starting YunoHost core upgrade...", + "migration_0023_not_enough_space": "Make sufficient space available in {path} to run the migration.", "migration_0023_postgresql_11_not_installed": "PostgreSQL was not installed on your system. Nothing to do.", "migration_0023_postgresql_13_not_installed": "PostgreSQL 11 is installed, but not postgresql 13!? Something weird might have happened on your system :(...", - "migration_0023_not_enough_space": "Make sufficient space available in {path} to run the migration.", "migration_description_0021_migrate_to_bullseye": "Upgrade the system to Debian Bullseye and YunoHost 11.x", "migration_description_0022_php73_to_php74_pools": "Migrate php7.3-fpm 'pool' conf files to php7.4", "migration_description_0023_postgresql_11_to_13": "Migrate databases from PostgreSQL 11 to 13", @@ -508,7 +508,6 @@ "migration_ldap_migration_failed_trying_to_rollback": "Could not migrate... trying to roll back the system.", "migration_ldap_rollback_success": "System rolled back.", "migrations_already_ran": "Those migrations are already done: {ids}", - "migrations_cant_reach_migration_file": "Could not access migrations files at the path '%s'", "migrations_dependencies_not_satisfied": "Run these migrations: '{dependencies_id}', before migration {id}.", "migrations_exclusive_options": "'--auto', '--skip', and '--force-rerun' are mutually exclusive options.", "migrations_failed_to_load_migration": "Could not load migration {id}: {error}", @@ -614,9 +613,9 @@ "service_description_fail2ban": "Protects against brute-force and other kinds of attacks from the Internet", "service_description_metronome": "Manage XMPP instant messaging accounts", "service_description_mysql": "Stores app data (SQL database)", - "service_description_postgresql": "Stores app data (SQL database)", "service_description_nginx": "Serves or provides access to all the websites hosted on your server", "service_description_postfix": "Used to send and receive e-mails", + "service_description_postgresql": "Stores app data (SQL database)", "service_description_redis-server": "A specialized database used for rapid data access, task queue, and communication between programs", "service_description_rspamd": "Filters spam, and other e-mail related features", "service_description_slapd": "Stores users, domains and related info", @@ -691,4 +690,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 - adding a first user through the 'Users' section of the webadmin (or 'yunohost user create ' in command-line);\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/locales/eo.json b/locales/eo.json index 8973e6344..1d98e8597 100644 --- a/locales/eo.json +++ b/locales/eo.json @@ -51,7 +51,6 @@ "ask_new_path": "Nova vojo", "backup_custom_mount_error": "Propra rezerva metodo ne povis preterpasi la paŝon 'monto'", "app_upgrade_app_name": "Nun ĝisdatigu {app}...", - "app_manifest_invalid": "Io misas pri la aplika manifesto: {error}", "backup_cleaning_failed": "Ne povis purigi la provizoran rezervan dosierujon", "backup_creation_failed": "Ne povis krei la rezervan ar archiveivon", "backup_hook_unknown": "La rezerva hoko '{hook}' estas nekonata", @@ -219,7 +218,6 @@ "pattern_mailbox_quota": "Devas esti grandeco kun la sufikso b/k/M/G/T aŭ 0 por ne havi kvoton", "user_deletion_failed": "Ne povis forigi uzanton {user}: {error}", "backup_with_no_backup_script_for_app": "La app '{app}' ne havas sekretan skripton. Ignorante.", - "service_regen_conf_is_deprecated": "'yunohost service regen-conf' malakceptas! Bonvolu uzi anstataŭe 'yunohost tools regen-conf'.", "global_settings_key_doesnt_exists": "La ŝlosilo '{settings_key}' ne ekzistas en la tutmondaj agordoj, vi povas vidi ĉiujn disponeblajn klavojn per uzado de 'yunohost settings list'", "dyndns_no_domain_registered": "Neniu domajno registrita ĉe DynDNS", "dyndns_could_not_check_available": "Ne povis kontroli ĉu {domain} haveblas sur {provider}.", @@ -235,16 +233,13 @@ "service_stop_failed": "Ne povis maldaŭrigi la servon '{service}'\n\nLastatempaj servaj protokoloj: {logs}", "unbackup_app": "App '{app}' ne konserviĝos", "updating_apt_cache": "Akirante haveblajn ĝisdatigojn por sistemaj pakoj…", - "tools_upgrade_at_least_one": "Bonvolu specifi '--apps' aŭ '--system'", "service_already_stopped": "La servo '{service}' jam ĉesis", - "tools_upgrade_cant_both": "Ne eblas ĝisdatigi ambaŭ sistemon kaj programojn samtempe", "restore_extracting": "Eltirante bezonatajn dosierojn el la ar theivo…", "upnp_port_open_failed": "Ne povis malfermi havenon per UPnP", "log_app_upgrade": "Ĝisdatigu la aplikon '{}'", "log_help_to_get_failed_log": "La operacio '{desc}' ne povis finiĝi. Bonvolu dividi la plenan ŝtipon de ĉi tiu operacio per la komando 'yunohost log share {name}' por akiri helpon", "port_already_closed": "Haveno {port} estas jam fermita por {ip_version} rilatoj", "hook_name_unknown": "Nekonata hoko-nomo '{name}'", - "dyndns_could_not_check_provide": "Ne povis kontroli ĉu {provider} povas provizi {domain}.", "restore_nothings_done": "Nenio estis restarigita", "log_tools_postinstall": "Afiŝu vian servilon YunoHost", "dyndns_unavailable": "La domajno '{domain}' ne haveblas.", diff --git a/locales/es.json b/locales/es.json index dec90b42b..4226b19e9 100644 --- a/locales/es.json +++ b/locales/es.json @@ -10,7 +10,6 @@ "app_extraction_failed": "No se pudieron extraer los archivos de instalación", "app_id_invalid": "ID de la aplicación no válida", "app_install_files_invalid": "Estos archivos no se pueden instalar", - "app_manifest_invalid": "Algo va mal con el manifiesto de la aplicación: {error}", "app_not_correctly_installed": "La aplicación {app} 8 parece estar incorrectamente instalada", "app_not_installed": "No se pudo encontrar «{app}» en la lista de aplicaciones instaladas: {all_apps}", "app_not_properly_removed": "La {app} 0 no ha sido desinstalada correctamente", @@ -194,7 +193,6 @@ "backup_system_part_failed": "No se pudo respaldar la parte del sistema «{part}»", "backup_with_no_backup_script_for_app": "La aplicación «{app}» no tiene un guión de respaldo. Omitiendo.", "backup_with_no_restore_script_for_app": "«{app}» no tiene un script de restauración, no podá restaurar automáticamente la copia de seguridad de esta aplicación.", - "dyndns_could_not_check_provide": "No se pudo verificar si {provider} puede ofrecer {domain}.", "dyndns_domain_not_provided": "El proveedor de DynDNS {provider} no puede proporcionar el dominio {domain}.", "experimental_feature": "Aviso : esta funcionalidad es experimental y no se considera estable, no debería usarla a menos que sepa lo que está haciendo.", "good_practices_about_user_password": "Ahora está a punto de definir una nueva contraseña de usuario. La contraseña debe tener al menos 8 caracteres, aunque es una buena práctica usar una contraseña más larga (es decir, una frase de contraseña) y / o una variación de caracteres (mayúsculas, minúsculas, dígitos y caracteres especiales).", @@ -212,8 +210,6 @@ "tools_upgrade_regular_packages": "Actualizando ahora paquetes «normales» (no relacionados con YunoHost)…", "tools_upgrade_cant_unhold_critical_packages": "No se pudo liberar los paquetes críticos…", "tools_upgrade_cant_hold_critical_packages": "No se pudieron retener los paquetes críticos…", - "tools_upgrade_cant_both": "No se puede actualizar el sistema y las aplicaciones al mismo tiempo", - "tools_upgrade_at_least_one": "Especifique «--apps», o «--system»", "this_action_broke_dpkg": "Esta acción rompió dpkg/APT(los gestores de paquetes del sistema)… Puede tratar de solucionar este problema conectando mediante SSH y ejecutando `sudo dpkg --configure -a`.", "service_reloaded_or_restarted": "El servicio '{service}' fue recargado o reiniciado", "service_reload_or_restart_failed": "No se pudo recargar o reiniciar el servicio «{service}»\n\nRegistro de servicios recientes:{logs}", @@ -221,7 +217,6 @@ "service_restart_failed": "No se pudo reiniciar el servicio «{service}»\n\nRegistro de servicios recientes:{logs}", "service_reloaded": "Servicio '{service}' recargado", "service_reload_failed": "No se pudo recargar el servicio «{service}»\n\nRegistro de servicios recientes:{logs}", - "service_regen_conf_is_deprecated": "¡«yunohost service regen-conf» está obsoleto! Use «yunohost tools regen-conf» en su lugar.", "service_description_yunohost-firewall": "Gestiona los puertos de conexiones abiertos y cerrados a los servicios", "service_description_yunohost-api": "Gestiona las interacciones entre la interfaz web de YunoHost y el sistema", "service_description_ssh": "Permite conectar a su servidor remotamente mediante un terminal (protocolo SSH)", @@ -524,19 +519,6 @@ "app_manifest_install_ask_domain": "Seleccione el dominio donde esta app debería ser instalada", "app_label_deprecated": "Este comando está depreciado! Favor usar el nuevo comando 'yunohost user permission update' para administrar la etiqueta de app.", "app_argument_password_no_default": "Error al interpretar argumento de contraseña'{name}': El argumento de contraseña no puede tener un valor por defecto por razón de seguridad", - "migration_0015_not_enough_free_space": "¡El espacio es muy bajo en `/var/`! Deberías tener almenos 1Gb de espacio libre para ejecutar la migración.", - "migration_0015_not_stretch": "¡La distribución actual de Debian no es Stretch!", - "migration_0015_yunohost_upgrade": "Iniciando la actualización del núcleo de YunoHost...", - "migration_0015_still_on_stretch_after_main_upgrade": "Algo fue mal durante la actualización principal, el sistema parece que está todavía en Debian Stretch", - "migration_0015_main_upgrade": "Comenzando la actualización principal...", - "migration_0015_patching_sources_list": "Adaptando las sources.lists...", - "migration_0015_start": "Comenzando la migración a Buster", - "migration_description_0019_extend_permissions_features": "Extiende/rehaz el sistema de gestión de permisos de la aplicación", - "migration_description_0018_xtable_to_nftable": "Migra las viejas reglas de tráfico de red al nuevo sistema nftable", - "migration_description_0017_postgresql_9p6_to_11": "Migra las bases de datos de PostgreSQL 9.6 a 11", - "migration_description_0016_php70_to_php73_pools": "Migra el «pool» de ficheros php7.0-fpm a php7.3", - "migration_description_0015_migrate_to_buster": "Actualiza el sistema a Debian Buster y YunoHost 4.x", - "migrating_legacy_permission_settings": "Migrando los antiguos parámetros de permisos...", "invalid_regex": "Regex no valido: «{regex}»", "global_settings_setting_backup_compress_tar_archives": "Cuando se creen nuevas copias de respaldo, comprimir los archivos (.tar.gz) en lugar de descomprimir los archivos (.tar). N.B.: activar esta opción quiere decir que los archivos serán más pequeños pero que el proceso tardará más y utilizará más CPU.", "global_settings_setting_smtp_relay_password": "Clave de uso del SMTP", @@ -544,7 +526,6 @@ "global_settings_setting_smtp_relay_port": "Puerto de envio / relay SMTP", "global_settings_setting_smtp_relay_host": "El servidor relay de SMTP para enviar correo en lugar de esta instalación YunoHost. Útil si estás en una de estas situaciones: tu puerto 25 esta bloqueado por tu ISP o VPS, si estás en usado una IP marcada como residencial o DUHL, si no puedes configurar un DNS inverso o si el servidor no está directamente expuesto a internet y quieres utilizar otro servidor para enviar correos.", "global_settings_setting_smtp_allow_ipv6": "Permitir el uso de IPv6 para enviar y recibir correo", - "domain_name_unknown": "Dominio «{domain}» desconocido", "diagnosis_processes_killed_by_oom_reaper": "Algunos procesos fueron terminados por el sistema recientemente porque se quedó sin memoria. Típicamente es sintoma de falta de memoria o de un proceso que se adjudicó demasiada memoria.
Resumen de los procesos terminados:
\n{kills_summary}", "diagnosis_http_nginx_conf_not_up_to_date_details": "Para arreglar este asunto, estudia las diferencias mediante el comando yunohost tools regen-conf nginx --dry-run --with-diff y si te parecen bien aplica los cambios mediante yunohost tools regen-conf nginx --force.", "diagnosis_http_nginx_conf_not_up_to_date": "Parece que la configuración nginx de este dominio haya sido modificada manualmente, esto no deja que YunoHost pueda diagnosticar si es accesible mediante HTTP.", @@ -587,4 +568,4 @@ "app_config_unable_to_read": "No se pudieron leer los valores del panel configuración.", "backup_create_size_estimation": "El archivo contendrá aproximadamente {size} de datos.", "config_cant_set_value_on_section": "No puede establecer un único valor en una sección de configuración completa." -} +} \ No newline at end of file diff --git a/locales/eu.json b/locales/eu.json index 1f69866bb..91d744a7f 100644 --- a/locales/eu.json +++ b/locales/eu.json @@ -368,7 +368,6 @@ "log_app_change_url": "'{}' aplikazioaren URLa aldatu", "log_app_config_set": "Ezarri '{}' aplikazioko konfigurazioa", "downloading": "Deskargatzen…", - "dyndns_could_not_check_provide": "Ezinezkoa izan da {provider}(e)k {domain} eskaini dezakeen egiaztatzea.", "log_available_on_yunopaste": "Erregistroa {url} estekan ikus daiteke", "log_dyndns_update": "Eguneratu YunoHosten '{}' domeinuari lotutako IP helbidea", "log_letsencrypt_cert_install": "Instalatu Let's Encrypt ziurtagiria '{}' domeinurako", @@ -488,7 +487,6 @@ "unexpected_error": "Ezusteko zerbaitek huts egin du: {error}", "updating_apt_cache": "Sistemaren paketeen eguneraketak eskuratzen…", "mail_forward_remove_failed": "Ezinezkoa izan da '{mail}' posta elektronikoko birbidalketa ezabatzea", - "migration_description_0020_ssh_sftp_permissions": "Gehitu SSH eta SFTP baimenak", "migration_ldap_migration_failed_trying_to_rollback": "Ezinezkoa izan da migratzea… sistema lehengoratzen saiatzen.", "migrations_exclusive_options": "'--auto', '--skip', eta '--force-rerun' aukerek batak bestea baztertzen du.", "migrations_running_forward": "{id} migrazioa exekutatzen…", @@ -503,7 +501,6 @@ "user_import_partial_failed": "Erabiltzaileak inportatzeko eragiketak erdizka huts egin du", "user_import_success": "Erabiltzaileak arazorik gabe inportatu dira", "yunohost_already_installed": "YunoHost instalatuta dago dagoeneko", - "migration_0015_not_stretch": "Debianen oraingo bertsioa ez da Stretch!", "migrations_success_forward": "{id} migrazioak amaitu du", "migrations_to_be_ran_manually": "{id} migrazioa eskuz abiarazi behar da. Mesedez, joan Erramintak → Migrazioak atalera administrazio-atarian edo bestela exekutatu 'yunohost tools migrations run'.", "permission_currently_allowed_for_all_users": "Baimen hau erabiltzaile guztiei esleitzen zaie eta baita beste talde batzuei ere. Litekeena da 'all users' baimena edo esleituta duten taldeei baimena kendu nahi izatea.", @@ -518,7 +515,6 @@ "tools_upgrade_regular_packages": "Orain pakete \"arruntak\" (YunoHostekin zerikusia ez dutenak) eguneratzen…", "tools_upgrade_special_packages": "Orain pakete \"bereziak\" (YunoHostekin zerikusia dutenak) eguneratzen…", "regenconf_would_be_updated": "'{category}' atalerako konfigurazioa eguneratu izango litzatekeen", - "migration_description_0018_xtable_to_nftable": "Migratu internet trafiko arau zaharrak nftaula sistema berrira", "migrations_dependencies_not_satisfied": "Exekutatu honako migrazioak: '{dependencies_id}', {id} migratu baino lehen.", "permission_created": "'{permission}' baimena sortu da", "regenconf_now_managed_by_yunohost": "'{conf}' konfigurazio fitxategia YunoHostek kudeatzen du orain ({category} atala).", @@ -528,8 +524,6 @@ "service_restarted": "'{service}' zerbitzua berrabiarazi da", "service_start_failed": "Ezin izan da '{service}' zerbitzua abiarazi\n\nZerbitzuen azken erregistroak: {logs}", "ssowat_conf_updated": "SSOwat ezarpenak eguneratu dira", - "tools_upgrade_at_least_one": "Mesedez, zehaztu '--apps' edo '--system'", - "tools_upgrade_cant_both": "Ezin dira sistema eta aplikazioak une berean eguneratu", "update_apt_cache_failed": "Ezin da APT Debian-en pakete kudeatzailearen cachea eguneratu. Hemen dituzu sources.list fitxategiaren lerroak, arazoa identifikatzeko baliagarria izan dezakezuna:\n{sourceslist}", "update_apt_cache_warning": "Zerbaitek huts egin du APT Debian-en pakete kudeatzailearen cachea eguneratzean. Hemen dituzu sources.list fitxategiaren lerroak, arazoa identifikatzeko baliagarria izan dezakezuna:\n{sourceslist}", "user_created": "Erabiltzailea sortu da", @@ -558,11 +552,6 @@ "regenconf_pending_applying": "'{category}' atalerako konfigurazioa ezartzen…", "user_import_nothing_to_do": "Ez dago erabiltzaileak inportatu beharrik", "mailbox_used_space_dovecot_down": "Dovecot mailbox zerbitzua martxan egon behar da postak erabilitako espazioa ezagutzeko", - "migration_0015_cleaning_up": "Beharrezkoak ez diren cache eta paketeak kentzen…", - "migration_0015_modified_files": "Mesedez, kontuan hartu ondorengo fitxategiak eskuz aldatu direla eta sistema eguneratzean euren gainean idatziko dela: {manually_modified_files}", - "migration_0015_not_enough_free_space": "/var/ fitxategi-sisteman oso espazio gutxi geratzen da! Gutxienez GB bat izan behar da migrazioa abiarazteko.", - "migration_0015_weak_certs": "Sinadura-algoritmo ahulak darabiltzaten ziurtagiriak aurkitu dira eta eguneratu behar dira nginx-en hurrengo bertsioarekin bateragarriak izateko: {certs}", - "migration_description_0017_postgresql_9p6_to_11": "Migratu datubaseak PostgreSQL 9.6-tik 11-ra", "other_available_options": "… eta erakusten ez diren beste {n} aukera daude", "permission_cannot_remove_main": "Ezin da baimen nagusi bat kendu", "service_not_reloading_because_conf_broken": "Ez da '{name}' zerbitzua birkargatu/berrabiarazi konfigurazioa kaltetuta dagoelako: {errors}", @@ -577,16 +566,9 @@ "upnp_disabled": "UPnP itzalita dago", "main_domain_change_failed": "Ezinezkoa izan da domeinu nagusia aldatzea", "regenconf_failed": "Ezinezkoa izan da ondorengo atal(ar)en konfigurazioa berregitea: {categories}", - "migration_0015_start": "Buster-erako migrazioa abiarazten", - "migration_0015_patching_sources_list": "sources.lists petatxatzen…", - "migration_0015_yunohost_upgrade": "YunoHosten muinaren eguneraketa abiarazten…", - "migration_0017_postgresql_96_not_installed": "Ez da PostgreSQL instalatu. Ez dago egitekorik.", "pattern_email_forward": "Helbide elektroniko baliagarri bat izan behar da, '+' karakterea onartzen da (adibidez: izena+urtea@domeinua.eus)", - "migrating_legacy_permission_settings": "Zaharkitutako baimenen ezarpenak migratzen…", - "migration_0019_add_new_attributes_in_ldap": "Gehitu LDAP datubasean baimenetarako atributu berriak", "regenconf_file_manually_removed": "'{conf}' konfigurazio fitxategia eskuz ezabatu da eta ez da berriro sortuko", "regenconf_up_to_date": "Konfigurazioa egunean dago dagoeneko '{category}' atalerako", - "service_regen_conf_is_deprecated": "'yunohost service regen-conf' zaharkitua dago! Mesedez, erabili 'yunohost tools regen-conf' haren ordez.", "migrations_no_such_migration": "Ez dago '{id}' izeneko migraziorik", "migrations_not_pending_cant_skip": "Migrazio hauek ez daude exekutatzeke eta, beraz, ezin dira saihestu: {ids}", "regex_with_only_domain": "Ezin duzu regex domeinuetarako erabili; bideetarako bakarrik", @@ -599,7 +581,6 @@ "service_enable_failed": "Ezin izan da '{service}' zerbitzua sistema abiaraztearekin batera exekutatzea lortu.\n\nZerbitzuen erregistro berrienak: {logs}", "system_username_exists": "Erabiltzaile izena existitzen da dagoeneko sistemaren erabiltzaileen zerrendan", "user_already_exists": "'{user}' erabiltzailea existitzen da dagoeneko", - "migration_0018_failed_to_migrate_iptables_rules": "Zaharkitutako iptaulak nftauletara eguneratzeak huts egin du: {error}", "mail_domain_unknown": "Ezinezkoa da posta elektroniko hori '{domain}' domeinurako erabiltzea. Mesedez, erabili zerbitzari honek kudeatzen duen domeinu bat.", "migrations_list_conflict_pending_done": "Ezin dituzu '--previous' eta '--done' aldi berean erabili.", "migrations_loading_migration": "{id} migrazioa kargatzen…", @@ -627,20 +608,11 @@ "user_update_failed": "Ezin izan da {user} erabiltzailea eguneratu: {error}", "user_updated": "Erabiltzailearen informazioa aldatu da", "yunohost_configured": "YunoHost konfiguratuta dago", - "migration_0015_system_not_fully_up_to_date": "Sistema ez dago guztiz eguneratuta. Mesedez, exekutatu eguneraketa orokorra Buster-erako migrazioa abiarazi baino lehen.", - "migration_description_0015_migrate_to_buster": "Eguneratu sistema Debian Buster eta YunoHost 4.x-ra", "service_description_yunomdns": "Sare lokalean zerbitzarira 'yunohost.local' erabiliz konektatzea ahalbidetzen du", "mail_alias_remove_failed": "Ezin izan da '{mail}' e-mail ezizena ezabatu", "mail_unavailable": "Helbide elektroniko hau lehenengo erabiltzailearentzat gorde da eta hari ezarri zaio automatikoki", - "migration_description_0016_php70_to_php73_pools": "Migratu php7.0-fpm 'pool' fitxategiak php7.3-ra", - "migration_description_0019_extend_permissions_features": "Hedatu aplikazioen baimenen kudeaketa sistema", - "migration_0015_main_upgrade": "Eguneraketa orokorra abiarazten…", "migration_ldap_backup_before_migration": "Sortu LDAP datubase eta aplikazioen ezarpenen babeskopia migrazioa abiarazi baino lehen.", "migration_ldap_can_not_backup_before_migration": "Sistemaren babeskopiak ez du amaitu migrazioak huts egin baino lehen. Errorea: {error}", - "migration_0015_problematic_apps_warning": "Mesedez, kontuan izan arazoak sor ditzaketen aplikazioak aurkitu direla. Badirudi ez zirela YunoHosten aplikazioen katalogotik instalatu, edo 'ez dabiltza' etiketa dute. Beraz, ezin da bermatu eguneratu eta gero funtzionatuko dutenik: {problematic_apps}", - "migration_0017_not_enough_space": "Espazio gehiago behar da {path}-n migrazioa exekutatzeko.", - "migration_0017_postgresql_11_not_installed": "PostgreSQL 9.6 instalatuta egon arren postgresql 11 ez‽ Zerbait arraroa gertatu da zure sisteman :(…", - "migration_0018_failed_to_reset_legacy_rules": "Ezinezkoa izan da zaharkitutako iptaulak berrezartzea: {error}", "migrations_migration_has_failed": "{id} migrazioak ez du amaitu, geldiarazten. Errorea: {exception}", "migrations_need_to_accept_disclaimer": "{id} migrazioa abiarazteko, ondorengo baldintzak onartu behar dituzu:\n---\n{disclaimer}\n---\nMigrazioa onartzen baduzu, mesedez berrabiarazi prozesua komandoan '--accept-disclaimer' aukera gehituz.", "not_enough_disk_space": "Ez dago nahikoa espazio librerik '{path}'-n", @@ -652,8 +624,6 @@ "pattern_port_or_range": "Ataka zenbaki (0-65535) edo errenkada (100:200) baliagarri bat izan behar da", "permission_already_disallowed": "'{group}' taldeak desgaituta dauka dagoeneko '{permission} baimena", "permission_already_up_to_date": "Baimena ez da eguneratu egindako eskaria egungo egoerarekin bat datorrelako.", - "migration_0015_still_on_stretch_after_main_upgrade": "Zerbaitek huts egin du eguneraketa orokorrean; badirudi sistemak oraindik darabilela Debian Stretch", - "migration_update_LDAP_schema": "LDAP eskema eguneratzen…", "permission_protected": "'{permission}' baimena babestuta dago. Ezin duzu bisitarien taldea baimen honetara gehitu / baimen honetatik kendu.", "permission_update_failed": "Ezinezkoa izan da '{permission}' baimena aldatzea: {error}", "port_already_opened": "{port}. ataka dagoeneko irekita dago {ip_version} konexioetarako", @@ -661,11 +631,8 @@ "user_unknown": "Erabiltzaile ezezaguna: {user}", "yunohost_postinstall_end_tip": "Instalazio ondorengo prozesua amaitu da! Sistemaren konfigurazioa bukatzeko:\n- gehitu erabiltzaile bat administrazio-atariko 'Erabiltzaileak' atalean (edo 'yunohost user create ' komandoa erabiliz);\n- erabili 'Diagnostikoak' atala ohiko arazoei aurre hartzeko. Administrazio-atarian abiarazi edo 'yunohost diagnosis run' exekutatu;\n- irakurri 'Finalizing your setup' eta 'Getting to know YunoHost' atalak. Dokumentazioan aurki ditzakezu: https://yunohost.org/admindoc.", "yunohost_not_installed": "YunoHost ez da zuzen instalatu. Mesedez, exekutatu 'yunohost tools postinstall'", - "migration_0019_slapd_config_will_be_overwritten": "Badirudi eskuz moldatu duzula slapd konfigurazioa. Migrazio garrantzitsu honetarako, YunoHostek slapd ezarpenak eguneratu behar ditu. Oraingo fitxategiak {conf_backup_folder}-n kopiatuko dira.", "unlimit": "Mugarik ez", "restore_already_installed_apps": "Ondorengo aplikazioak ezin dira lehengoratu dagoeneko instalatuta daudelako: {apps}", - "migration_0015_general_warning": "Mesedez, uler ezazu migrazio hau eragiketa zaila dela. YunoHosten kideek ahalik eta hoberen egin dute prozesua egiaztatzeko, baina hala ere sistemaren atalak edo aplikazioak kaltetu litezke.\n\nHorregatik gomendagarria da:\n- Informazio edo aplikazio garrantzitsuen babeskopia egitea. Argibide gehiagorako: https://yunohost.org/backup;\n- Pazientzia izatea migrazioa abiarazterakoan: zure internet konexioaren eta hardwarearen arabera litekeena da ordu batzuk behar izatea eguneraketa amaitu arte.", - "migration_0015_specific_upgrade": "Aparte eguneratu behar diren sistemaren paketeen eguneraketa abiarazten…", "password_too_simple_4": "Pasahitzak 12 karaktere izan behar ditu gutxienez eta zenbakiren bat, hizki larriren bat, txikiren bat eta karaktere bereziren bat izan behar ditu", "pattern_email": "Helbide elektroniko baliagarri bat izan behar da, '+' karaktererik gabe (adibidez: izena@domeinua.eus)", "pattern_username": "Txikiz idatzitako karaktere alfanumerikoak eta azpiko marra soilik eduki ditzake", @@ -700,9 +667,8 @@ "service_description_metronome": "Bat-bateko XMPP mezularitza kontuak kudeatzen ditu", "service_description_mysql": "Aplikazioen datuak gordetzen ditu (SQL datubasea)", "service_description_nginx": "Zerbitzariak ostatazen dituen webguneak ikusgai egiten ditu", - "service_description_php7.3-fpm": "PHP aplikazioak exekutatzen ditu NGINXi esker", "service_description_redis-server": "Datuak bizkor atzitzeko, zereginak lerratzeko eta programen arteko komunikaziorako datubase berezi bat da", "service_description_rspamd": "Spama bahetu eta posta elektronikoarekin zerikusia duten bestelako futzioen ardura dauka", "service_description_slapd": "Erabiltzaileak, domeinuak eta hauei lotutako informazioa gordetzen du", "service_description_yunohost-api": "YunoHosten web-atariaren eta sistemaren arteko hartuemana kudeatzen du" -} +} \ No newline at end of file diff --git a/locales/fa.json b/locales/fa.json index f566fed90..ce2ba91bd 100644 --- a/locales/fa.json +++ b/locales/fa.json @@ -183,7 +183,6 @@ "app_manifest_install_ask_password": "گذرواژه مدیریتی را برای این برنامه انتخاب کنید", "app_manifest_install_ask_path": "مسیر URL (بعد از دامنه) را انتخاب کنید که این برنامه باید در آن نصب شود", "app_manifest_install_ask_domain": "دامنه ای را انتخاب کنید که این برنامه باید در آن نصب شود", - "app_manifest_invalid": "مشکلی در مانیفست برنامه وجود دارد: {error}", "app_location_unavailable": "این نشانی وب یا در دسترس نیست یا با برنامه (هایی) که قبلاً نصب شده در تعارض است:\n{apps}", "app_label_deprecated": "این دستور منسوخ شده است! لطفاً برای مدیریت برچسب برنامه از فرمان جدید'yunohost به روز رسانی مجوز کاربر' استفاده کنید.", "app_make_default_location_already_used": "نمی توان '{app}' را برنامه پیش فرض در دامنه قرار داد ، '{domain}' قبلاً توسط '{other_app}' استفاده می شود", @@ -199,7 +198,6 @@ "diagnosis_http_connection_error": "خطای اتصال: ارتباط با دامنه درخواست شده امکان پذیر نیست، به احتمال زیاد غیرقابل دسترسی است.", "diagnosis_http_timeout": "زمان تلاش برای تماس با سرور از خارج به پایان رسید. به نظر می رسد غیرقابل دسترسی است.
1. شایع ترین علت برای این مشکل ، پورت 80 است (و 443) به درستی به سرور شما ارسال نمی شوند.
2. همچنین باید مطمئن شوید که سرویس nginx در حال اجرا است
3. در تنظیمات پیچیده تر: مطمئن شوید که هیچ فایروال یا پروکسی معکوسی تداخل نداشته باشد.", "diagnosis_http_ok": "دامنه {domain} از طریق HTTP از خارج از شبکه محلی قابل دسترسی است.", - "diagnosis_http_localdomain": "انتظار نمی رود که دامنه {domain} ، با TLD محلی. از خارج از شبکه محلی به آن دسترسی پیدا کند.", "diagnosis_http_could_not_diagnose_details": "خطا: {error}", "diagnosis_http_could_not_diagnose": "نمی توان تشخیص داد که در IPv{ipversion} دامنه ها از خارج قابل دسترسی هستند یا خیر.", "diagnosis_http_hairpinning_issue_details": "این احتمالاً به دلیل جعبه / روتر ISP شما است. در نتیجه ، افراد خارج از شبکه محلی شما می توانند به سرور شما مطابق انتظار دسترسی پیدا کنند ، اما افراد داخل شبکه محلی (احتمالاً مثل شما؟) هنگام استفاده از نام دامنه یا IP جهانی. ممکن است بتوانید وضعیت را بهبود بخشید با نگاهی به https://yunohost.org/dns_local_network", @@ -348,13 +346,11 @@ "dyndns_ip_updated": "IP خود را در DynDNS به روز کرد", "dyndns_ip_update_failed": "آدرس IP را به DynDNS به روز نکرد", "dyndns_could_not_check_available": "بررسی نشد که آیا {domain} در {provider} در دسترس است یا خیر.", - "dyndns_could_not_check_provide": "بررسی نشد که آیا {provider} می تواند {domain} را ارائه دهد یا خیر.", "dpkg_lock_not_available": "این دستور در حال حاضر قابل اجرا نیست زیرا به نظر می رسد برنامه دیگری از قفل dpkg (مدیر بسته سیستم) استفاده می کند", "dpkg_is_broken": "شما نمی توانید این کار را در حال حاضر انجام دهید زیرا dpkg/APT (اداره کنندگان سیستم بسته ها) به نظر می رسد در وضعیت خرابی است… می توانید با اتصال از طریق SSH و اجرا این فرمان `sudo apt install --fix-broken` and/or `sudo dpkg --configure -a` مشکل را حل کنید.", "downloading": "در حال بارگیری...", "done": "انجام شد", "domains_available": "دامنه های موجود:", - "domain_name_unknown": "دامنه '{domain}' ناشناخته است", "domain_uninstall_app_first": "این برنامه ها هنوز روی دامنه شما نصب هستند:\n{apps}\n\nلطفاً قبل از اقدام به حذف دامنه ، آنها را با استفاده از 'برنامه yunohost remove the_app_id' حذف کرده یا با استفاده از 'yunohost app change-url the_app_id' به دامنه دیگری منتقل کنید", "domain_remove_confirm_apps_removal": "حذف این دامنه برنامه های زیر را حذف می کند:\n{apps}\n\nآیا طمئن هستید که میخواهید انجام دهید؟ [{answers}]", "domain_hostname_failed": "نام میزبان جدید قابل تنظیم نیست. این ممکن است بعداً مشکلی ایجاد کند (ممکن هم هست خوب باشد).", @@ -413,39 +409,10 @@ "migrations_dependencies_not_satisfied": "این مهاجرت ها را اجرا کنید: '{dependencies_id}' ، قبل از مهاجرت {id}.", "migrations_cant_reach_migration_file": "دسترسی به پرونده های مهاجرت در مسیر '٪ s' امکان پذیر نیست", "migrations_already_ran": "این مهاجرت ها قبلاً انجام شده است: {ids}", - "migration_0019_slapd_config_will_be_overwritten": "به نظر می رسد که شما پیکربندی slapd را به صورت دستی ویرایش کرده اید. برای این مهاجرت بحرانی ، YunoHost باید به روز رسانی پیکربندی slapd را مجبور کند. فایلهای اصلی در {conf_backup_folder} پشتیبان گیری می شوند.", - "migration_0019_add_new_attributes_in_ldap": "اضافه کردن ویژگی های جدید برای مجوزها در پایگاه داده LDAP", - "migration_0018_failed_to_reset_legacy_rules": "تنظیم مجدد قوانین iptables قدیمی انجام نشد: {error}", - "migration_0018_failed_to_migrate_iptables_rules": "انتقال قوانین قدیمی iptables به nftables انجام نشد: {error}", - "migration_0017_not_enough_space": "فضای کافی در {path} برای اجرای مهاجرت در دسترس قرار دهید.", - "migration_0017_postgresql_11_not_installed": "PostgreSQL 9.6 نصب شده است ، اما postgresql 11 نه؟ ممکن است اتفاق عجیبی در سیستم شما رخ داده باشد:(...", - "migration_0017_postgresql_96_not_installed": "PostgreSQL روی سیستم شما نصب نشده است. کاری برای انجام دادن نیست.", - "migration_0015_weak_certs": "گواهینامه های زیر هنوز از الگوریتم های امضای ضعیف استفاده می کنند و برای سازگاری با نسخه بعدی nginx باید ارتقاء یابند: {certs}", - "migration_0015_cleaning_up": "پاک کردن حافظه پنهان و بسته ها دیگر مفید نیست...", - "migration_0015_specific_upgrade": "شروع به روزرسانی بسته های سیستم که باید به طور مستقل ارتقا یابد...", - "migration_0015_modified_files": "لطفاً توجه داشته باشید که فایل های زیر به صورت دستی اصلاح شده اند و ممکن است پس از ارتقاء رونویسی شوند: {manually_modified_files}", - "migration_0015_problematic_apps_warning": "لطفاً توجه داشته باشید که احتمالاً برنامه های نصب شده مشکل ساز تشخیص داده شده. به نظر می رسد که آنها از فهرست برنامه YunoHost نصب نشده اند یا به عنوان 'working' علامت گذاری نشده اند. در نتیجه ، نمی توان تضمین کرد که پس از ارتقاء همچنان کار خواهند کرد: {problematic_apps}", - "migration_0015_general_warning": "لطفاً توجه داشته باشید که این مهاجرت یک عملیات ظریف است. تیم YunoHost تمام تلاش خود را برای بررسی و آزمایش آن انجام داد ، اما مهاجرت ممکن است بخشهایی از سیستم یا برنامه های آن را خراب کند.\n\nبنابراین ، توصیه می شود:\n- پشتیبان گیری از هرگونه داده یا برنامه حیاتی را انجام دهید. اطلاعات بیشتر در https://yunohost.org/backup ؛\n- پس از راه اندازی مهاجرت صبور باشید: بسته به اتصال به اینترنت و سخت افزار شما ، ممکن است چند ساعت طول بکشد تا همه چیز ارتقا یابد.", - "migration_0015_system_not_fully_up_to_date": "سیستم شما کاملاً به روز نیست. لطفاً قبل از اجرای مهاجرت به Buster ، یک ارتقاء منظم انجام دهید.", - "migration_0015_not_enough_free_space": "فضای آزاد در /var /بسیار کم است! برای اجرای این مهاجرت باید حداقل 1 گیگابایت فضای آزاد داشته باشید.", - "migration_0015_not_stretch": "توزیع دبیان فعلی استرچ نیست!", - "migration_0015_yunohost_upgrade": "شروع به روز رسانی اصلی YunoHost...", - "migration_0015_still_on_stretch_after_main_upgrade": "هنگام ارتقاء اصلی مشکلی پیش آمد ، به نظر می رسد سیستم هنوز در Debian Stretch است", - "migration_0015_main_upgrade": "شروع به روزرسانی اصلی...", - "migration_0015_patching_sources_list": "وصله منابع. لیست ها...", - "migration_0015_start": "شروع مهاجرت به باستر", - "migration_update_LDAP_schema": "در حال به روزرسانی طرح وشمای LDAP...", "migration_ldap_rollback_success": "سیستم برگردانده شد.", "migration_ldap_migration_failed_trying_to_rollback": "نمی توان مهاجرت کرد... تلاش برای بازگرداندن سیستم.", "migration_ldap_can_not_backup_before_migration": "نمی توان پشتیبان گیری سیستم را قبل از شکست مهاجرت تکمیل کرد. خطا: {error}", "migration_ldap_backup_before_migration": "ایجاد پشتیبان از پایگاه داده LDAP و تنظیمات برنامه ها قبل از مهاجرت واقعی.", - "migration_description_0020_ssh_sftp_permissions": "پشتیبانی مجوزهای SSH و SFTP را اضافه کنید", - "migration_description_0019_extend_permissions_features": "سیستم مدیریت مجوز برنامه را تمدید / دوباره کار بندازید", - "migration_description_0018_xtable_to_nftable": "مهاجرت از قوانین قدیمی ترافیک شبکه به سیستم جدید nftable", - "migration_description_0017_postgresql_9p6_to_11": "مهاجرت پایگاه های داده از PostgreSQL 9.6 به 11", - "migration_description_0016_php70_to_php73_pools": "انتقال فایلهای conf php7.0-fpm 'pool' به php7.3", - "migration_description_0015_migrate_to_buster": "سیستم را به Debian Buster و YunoHost 4.x ارتقا دهید", - "migrating_legacy_permission_settings": "در حال انتقال تنظیمات مجوز قدیمی...", "main_domain_changed": "دامنه اصلی تغییر کرده است", "main_domain_change_failed": "تغییر دامنه اصلی امکان پذیر نیست", "mail_unavailable": "این آدرس ایمیل محفوظ است و باید به طور خودکار به اولین کاربر اختصاص داده شود", @@ -538,8 +505,6 @@ "tools_upgrade_regular_packages": "در حال ارتقاء بسته های 'regular' (غیر مرتبط با yunohost)...", "tools_upgrade_cant_unhold_critical_packages": "بسته های مهم و حیاتی را نمی توان نگه نداشت...", "tools_upgrade_cant_hold_critical_packages": "بسته های مهم و حیاتی را نمی توان نگه داشت...", - "tools_upgrade_cant_both": "نمی توان سیستم و برنامه ها را به طور همزمان ارتقا داد", - "tools_upgrade_at_least_one": "لطفاً مشخص کنید 'apps' ، یا 'system'", "this_action_broke_dpkg": "این اقدام dpkg/APT (مدیران بسته های سیستم) را خراب کرد... می توانید با اتصال از طریق SSH و اجرای فرمان `sudo apt install --fix -break` و/یا` sudo dpkg --configure -a` این مشکل را حل کنید.", "system_username_exists": "نام کاربری قبلاً در لیست کاربران سیستم وجود دارد", "system_upgraded": "سیستم ارتقا یافت", @@ -560,7 +525,6 @@ "service_reload_failed": "سرویس '{service}' بارگیری نشد\n\nگزارشات اخیر سرویس: {logs}", "service_removed": "سرویس '{service}' حذف شد", "service_remove_failed": "سرویس '{service}' حذف نشد", - "service_regen_conf_is_deprecated": "فرمان 'yunohost service regen-conf' منسوخ شده است! لطفاً به جای آن از 'yunohost tools regen-conf' استفاده کنید.", "service_enabled": "سرویس '{service}' اکنون بطور خودکار در هنگام بوت شدن سیستم راه اندازی می شود.", "service_enable_failed": "انجام سرویس '{service}' به طور خودکار در هنگام راه اندازی امکان پذیر نیست.\n\nگزارشات اخیر سرویس: {logs}", "service_disabled": "هنگام راه اندازی سیستم ، سرویس '{service}' دیگر راه اندازی نمی شود.", @@ -572,7 +536,6 @@ "service_description_rspamd": "هرزنامه ها و سایر ویژگی های مربوط به ایمیل را فیلتر می کند", "service_description_redis-server": "یک پایگاه داده تخصصی برای دسترسی سریع به داده ها ، صف وظیفه و ارتباط بین برنامه ها استفاده می شود", "service_description_postfix": "برای ارسال و دریافت ایمیل استفاده می شود", - "service_description_php7.3-fpm": "برنامه های نوشته شده با PHP را با NGINX اجرا می کند", "service_description_nginx": "به همه وب سایت هایی که روی سرور شما میزبانی شده اند سرویس می دهد یا دسترسی به آنها را فراهم می کند", "service_description_mysql": "ذخیره داده های برنامه (پایگاه داده SQL)", "service_description_metronome": "مدیریت حساب های پیام رسانی فوری XMPP", diff --git a/locales/fr.json b/locales/fr.json index 5b23b7a11..c9609a307 100644 --- a/locales/fr.json +++ b/locales/fr.json @@ -10,7 +10,6 @@ "app_extraction_failed": "Impossible d'extraire les fichiers d'installation", "app_id_invalid": "Identifiant d'application invalide", "app_install_files_invalid": "Fichiers d'installation incorrects", - "app_manifest_invalid": "Manifeste d'application incorrect : {error}", "app_not_correctly_installed": "{app} semble être mal installé", "app_not_installed": "Nous n'avons pas trouvé {app} dans la liste des applications installées : {all_apps}", "app_not_properly_removed": "{app} n'a pas été supprimé correctement", @@ -223,7 +222,6 @@ "server_reboot": "Le serveur va redémarrer", "server_reboot_confirm": "Le serveur va redémarrer immédiatement, le voulez-vous vraiment ? [{answers}]", "app_upgrade_some_app_failed": "Certaines applications n'ont pas été mises à jour", - "dyndns_could_not_check_provide": "Impossible de vérifier si {provider} peut fournir {domain}.", "dyndns_domain_not_provided": "Le fournisseur DynDNS {provider} ne peut pas fournir le domaine {domain}.", "app_make_default_location_already_used": "Impossible de configurer l'application '{app}' par défaut pour le domaine '{domain}' car il est déjà utilisé par l'application '{other_app}'", "app_upgrade_app_name": "Mise à jour de {app}...", @@ -340,9 +338,6 @@ "regenconf_dry_pending_applying": "Vérification de la configuration en attente qui aurait été appliquée pour la catégorie '{category}'...", "regenconf_failed": "Impossible de régénérer la configuration pour la ou les catégorie(s) : '{categories}'", "regenconf_pending_applying": "Applique la configuration en attente pour la catégorie '{category}'...", - "service_regen_conf_is_deprecated": "'yunohost service regen-conf' est obsolète ! Veuillez plutôt utiliser 'yunohost tools regen-conf' à la place.", - "tools_upgrade_at_least_one": "Veuillez spécifier '--apps' ou '--system'", - "tools_upgrade_cant_both": "Impossible de mettre à niveau le système et les applications en même temps", "tools_upgrade_cant_hold_critical_packages": "Impossibilité d'ajouter le drapeau 'hold' pour les paquets critiques...", "tools_upgrade_regular_packages": "Mise à jour des paquets du système (non liés a YunoHost)...", "tools_upgrade_regular_packages_failed": "Impossible de mettre à jour les paquets suivants : {packages_list}", @@ -549,33 +544,9 @@ "diagnosis_swap_tip": "Merci d'être prudent et conscient que si vous hébergez une partition SWAP sur une carte SD ou un disque SSD, cela risque de réduire drastiquement l'espérance de vie du périphérique.", "restore_already_installed_apps": "Les applications suivantes ne peuvent pas être restaurées car elles sont déjà installées : {apps}", "regenconf_need_to_explicitly_specify_ssh": "La configuration de ssh a été modifiée manuellement. Vous devez explicitement indiquer la mention --force à \"ssh\" pour appliquer les changements.", - "migration_0015_cleaning_up": "Nettoyage du cache et des paquets qui ne sont plus nécessaires ...", - "migration_0015_specific_upgrade": "Démarrage de la mise à jour des paquets du système qui doivent être mis à jour séparément...", - "migration_0015_modified_files": "Veuillez noter que les fichiers suivants ont été modifiés manuellement et pourraient être écrasés à la suite de la mise à niveau : {manually_modified_files}", - "migration_0015_problematic_apps_warning": "Veuillez noter que des applications qui peuvent poser problèmes ont été détectées. Il semble qu'elles n'aient pas été installées à partir du catalogue d'applications YunoHost, ou bien qu'elles ne soient pas signalées comme \"fonctionnelles\". Par conséquent, il n'est pas possible de garantir que les applications suivantes fonctionneront encore après la mise à niveau : {problematic_apps}", - "migration_0015_general_warning": "Veuillez noter que cette migration est une opération délicate. L'équipe YunoHost a fait de son mieux pour la revérifier et la tester, mais la migration pourrait quand même casser des éléments du système ou de ses applications.\n\nIl est donc recommandé :\n...- de faire une sauvegarde de toute donnée ou application critique. Plus d'informations ici https://yunohost.org/backup ;\n...- d'être patient après le lancement de la migration. Selon votre connexion internet et votre matériel, la mise à niveau peut prendre jusqu'à quelques heures.", - "migration_0015_system_not_fully_up_to_date": "Votre système n'est pas entièrement à jour. Veuillez effectuer une mise à jour normale avant de lancer la migration vers Buster.", - "migration_0015_not_enough_free_space": "L'espace libre est très faible dans /var/ ! Vous devriez avoir au moins 1 Go de libre pour effectuer cette migration.", - "migration_0015_not_stretch": "La distribution Debian actuelle n'est pas Stretch !", - "migration_0015_yunohost_upgrade": "Démarrage de la mise à jour de YunoHost ...", - "migration_0015_still_on_stretch_after_main_upgrade": "Quelque chose s'est mal passé lors de la mise à niveau, le système semble toujours être sous Debian Stretch", - "migration_0015_main_upgrade": "Démarrage de la mise à niveau générale...", - "migration_0015_patching_sources_list": "Mise à jour du fichier sources.lists...", - "migration_0015_start": "Démarrage de la migration vers Buster", - "migration_description_0015_migrate_to_buster": "Mise à niveau du système vers Debian Buster et YunoHost 4.x", "diagnosis_dns_try_dyndns_update_force": "La configuration DNS de ce domaine devrait être automatiquement gérée par YunoHost. Si ce n'est pas le cas, vous pouvez essayer de forcer une mise à jour en utilisant yunohost dyndns update --force.", "app_packaging_format_not_supported": "Cette application ne peut pas être installée car son format n'est pas pris en charge par votre version de YunoHost. Vous devriez probablement envisager de mettre à jour votre système.", - "migration_0015_weak_certs": "Il a été constaté que les certificats suivants utilisent encore des algorithmes de signature peu robustes et doivent être mis à jour pour être compatibles avec la prochaine version de NGINX : {certs}", "global_settings_setting_backup_compress_tar_archives": "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.", - "migration_description_0018_xtable_to_nftable": "Migrer les anciennes règles de trafic réseau vers le nouveau système basé sur nftables", - "service_description_php7.4-fpm": "Exécute les applications écrites en PHP avec NGINX", - "migration_0018_failed_to_reset_legacy_rules": "La réinitialisation des règles iptable par défaut a échoué : {error}", - "migration_0018_failed_to_migrate_iptables_rules": "Échec de la migration des anciennes règles iptables vers nftables : {error}", - "migration_0017_not_enough_space": "Laissez suffisamment d'espace disponible dans {path} avant de lancer la migration.", - "migration_0017_postgresql_11_not_installed": "PostgreSQL 9.6 est installé mais pas posgreSQL 11 ? Il s'est sans doute passé quelque chose d'étrange sur votre système :(...", - "migration_0017_postgresql_96_not_installed": "PostgreSQL n'a pas été installé sur votre système. Aucune opération à effectuer.", - "migration_description_0017_postgresql_9p6_to_11": "Migrer les bases de données de PostgreSQL 9.6 vers 11", - "migration_description_0016_php70_to_php73_pools": "Migrer les configurations php7.0 vers php7.3", "diagnosis_processes_killed_by_oom_reaper": "Certains processus ont été arrêtés récemment par le système car il manquait de mémoire. Cela apparaît généralement quand le système manque de mémoire ou qu'un processus consomme trop de mémoire. Liste des processus tués :\n{kills_summary}", "ask_user_domain": "Domaine à utiliser pour l'adresse email de l'utilisateur et le compte XMPP", "app_manifest_install_ask_is_public": "Cette application devrait-elle être visible par les visiteurs anonymes ?", @@ -598,15 +569,10 @@ "regex_with_only_domain": "Vous ne pouvez pas utiliser une expression régulière pour le domaine, uniquement pour le chemin", "regex_incompatible_with_tile": "/!\\ Packagers ! La permission '{permission}' a 'show_tile' définie sur 'true' et vous ne pouvez donc pas définir une URL regex comme URL principale", "permission_protected": "L'autorisation {permission} est protégée. Vous ne pouvez pas ajouter ou supprimer le groupe visiteurs à/de cette autorisation.", - "migration_0019_slapd_config_will_be_overwritten": "Il semble que vous ayez modifié manuellement la configuration de slapd. Pour cette migration critique, YunoHost doit forcer la mise à jour de la configuration slapd. Les fichiers originaux seront sauvegardés dans {conf_backup_folder}.", - "migration_0019_add_new_attributes_in_ldap": "Ajouter de nouveaux attributs pour les autorisations dans la base de données LDAP", - "migrating_legacy_permission_settings": "Migration des anciens paramètres d'autorisation...", "invalid_regex": "Regex non valide : '{regex}'", - "domain_name_unknown": "Domaine '{domain}' inconnu", "app_label_deprecated": "Cette commande est obsolète ! Veuillez utiliser la nouvelle commande 'yunohost user permission update' pour gérer l'étiquette de l'application.", "additional_urls_already_removed": "URL supplémentaire '{url}' déjà supprimées pour la permission '{permission}'", "invalid_number": "Doit être un nombre", - "migration_description_0019_extend_permissions_features": "Étendre et retravailler le système de gestion des permissions applicatives", "diagnosis_basesystem_hardware_model": "Le modèle/architecture du serveur est {model}", "diagnosis_backports_in_sources_list": "Il semble qu'apt (le gestionnaire de paquets) soit configuré pour utiliser le dépôt des rétroportages (backports). A moins que vous ne sachiez vraiment ce que vous faites, nous vous déconseillons fortement d'installer des paquets provenant des rétroportages, car cela risque de créer des instabilités ou des conflits sur votre système.", "postinstall_low_rootfsspace": "Le système de fichiers a une taille totale inférieure à 10 Go, ce qui est préoccupant et devrait attirer votre attention ! Vous allez certainement arriver à court d'espace disque (très) rapidement ! Il est recommandé d'avoir au moins 16 Go à la racine pour ce système de fichiers. Si vous voulez installer YunoHost malgré cet avertissement, relancez la post-installation avec --force-diskspace", @@ -615,7 +581,6 @@ "diagnosis_rootfstotalspace_warning": "Le système de fichiers racine n'est que de {space}. Cela peut suffire, mais faites attention car vous risquez de les remplir rapidement... Il est recommandé d'avoir au moins 16 GB pour ce système de fichiers.", "app_restore_script_failed": "Une erreur s'est produite dans le script de restauration de l'application", "restore_backup_too_old": "Cette sauvegarde ne peut pas être restaurée car elle provient d'une version trop ancienne de YunoHost.", - "migration_update_LDAP_schema": "Mise à jour du schéma LDAP...", "log_backup_create": "Créer une archive de sauvegarde", "global_settings_setting_ssowat_panel_overlay_enabled": "Activer la superposition de la vignette SSOwat", "migration_ldap_rollback_success": "Système rétabli dans son état initial.", @@ -623,7 +588,6 @@ "migration_ldap_migration_failed_trying_to_rollback": "Impossible de migrer... tentative de restauration du système.", "migration_ldap_can_not_backup_before_migration": "La sauvegarde du système n'a pas pu être terminée avant l'échec de la migration. Erreur : {error }", "migration_ldap_backup_before_migration": "Création d'une sauvegarde de la base de données LDAP et des paramètres des applications avant la migration proprement dite.", - "migration_description_0020_ssh_sftp_permissions": "Ajouter la prise en charge des autorisations SSH et SFTP", "global_settings_setting_security_ssh_port": "Port SSH", "diagnosis_sshd_config_inconsistent_details": "Veuillez exécuter yunohost settings set security.ssh.port -v VOTRE_PORT_SSH pour définir le port SSH, et vérifiez yunohost tools regen-conf ssh --dry-run --with-diff et yunohost tools regen-conf ssh --force pour réinitialiser votre configuration aux recommandations YunoHost.", "diagnosis_sshd_config_inconsistent": "Il semble que le port SSH a été modifié manuellement dans /etc/ssh/sshd_config. Depuis YunoHost 4.2, un nouveau paramètre global 'security.ssh.port' est disponible pour éviter de modifier manuellement la configuration.", @@ -631,7 +595,6 @@ "backup_create_size_estimation": "L'archive contiendra environ {size} de données.", "global_settings_setting_security_webadmin_allowlist": "Adresses IP autorisées à accéder à la webadmin. Elles doivent être séparées par une virgule.", "global_settings_setting_security_webadmin_allowlist_enabled": "Autoriser seulement certaines IP à accéder à la webadmin.", - "diagnosis_http_localdomain": "Le domaine {domain}, avec un TLD .local, ne devrait pas être exposé en dehors du réseau local.", "diagnosis_dns_specialusedomain": "Le domaine {domain} est basé sur un domaine de premier niveau (TLD) à usage spécial comme .local ou .test et ne devrait donc pas avoir d'enregistrements DNS réels.", "invalid_password": "Mot de passe incorrect", "ldap_server_is_down_restart_it": "Le service LDAP est en panne, essayez de le redémarrer...", @@ -669,13 +632,10 @@ "config_validate_url": "Doit être une URL Web valide", "config_version_not_supported": "Les versions du panneau de configuration '{version}' ne sont pas prises en charge.", "danger": "Danger :", - "file_extension_not_accepted": "Le fichier '{path}' est refusé car son extension ne fait pas partie des extensions acceptées : {accept}", "invalid_number_min": "Doit être supérieur à {min}", "invalid_number_max": "Doit être inférieur à {max}", "log_app_config_set": "Appliquer la configuration à l'application '{}'", "service_not_reloading_because_conf_broken": "Le service '{name}' n'a pas été rechargé/redémarré car sa configuration est cassée : {errors}", - "app_argument_password_help_keep": "Tapez sur Entrée pour conserver la valeur actuelle", - "app_argument_password_help_optional": "Tapez un espace pour vider le mot de passe", "domain_registrar_is_not_configured": "Le registrar n'est pas encore configuré pour le domaine {domain}.", "domain_dns_push_not_applicable": "La fonction de configuration DNS automatique n'est pas applicable au domaine {domain}. Vous devez configurer manuellement vos enregistrements DNS en suivant la documentation sur https://yunohost.org/dns_config.", "domain_dns_registrar_yunohost": "Ce domaine est de type nohost.me / nohost.st / ynh.fr et sa configuration DNS est donc automatiquement gérée par YunoHost sans qu'il n'y ait d'autre configuration à faire. (voir la commande 'yunohost dyndns update')", @@ -711,4 +671,4 @@ "other_available_options": "... et {n} autres options disponibles non affichées", "domain_config_auth_consumer_key": "Consumer key", "domain_unknown": "Domaine '{domain}' inconnu" -} +} \ No newline at end of file diff --git a/locales/gl.json b/locales/gl.json index 0d7d1afee..14351b388 100644 --- a/locales/gl.json +++ b/locales/gl.json @@ -76,7 +76,6 @@ "app_manifest_install_ask_password": "Elixe un contrasinal de administración para esta app", "app_manifest_install_ask_path": "Elixe a ruta URL (após o dominio) onde será instalada esta app", "app_manifest_install_ask_domain": "Elixe o dominio onde queres instalar esta app", - "app_manifest_invalid": "Hai algún erro no manifesto da app: {error}", "app_location_unavailable": "Este URL ou ben non está dispoñible ou entra en conflito cunha app(s) xa instalada:\n{apps}", "app_label_deprecated": "Este comando está anticuado! Utiliza o novo comando 'yunohost user permission update' para xestionar a etiqueta da app.", "app_make_default_location_already_used": "Non se puido establecer a '{app}' como app por defecto no dominio, '{domain}' xa está utilizado por '{other_app}'", @@ -288,13 +287,11 @@ "dyndns_ip_updated": "Actualizouse o IP en DynDNS", "dyndns_ip_update_failed": "Non se actualizou o enderezo IP en DynDNS", "dyndns_could_not_check_available": "Non se comprobou se {domain} está dispoñible en {provider}.", - "dyndns_could_not_check_provide": "Non se comprobou se {provider} pode proporcionar {domain}.", "dpkg_lock_not_available": "Non se pode executar agora mesmo este comando porque semella que outro programa está a utilizar dpkg (o xestos de paquetes do sistema)", "dpkg_is_broken": "Non podes facer isto agora mesmo porque dpkg/APT (o xestor de paquetes do sistema) semella que non está a funcionar... Podes intentar solucionalo conectándote a través de SSH e executando `sudo apt install --fix-broken`e/ou `sudo dpkg --configure -a`.", "downloading": "Descargando...", "done": "Feito", "domains_available": "Dominios dispoñibles:", - "domain_name_unknown": "Dominio '{domain}' descoñecido", "domain_uninstall_app_first": "Aínda están instaladas estas aplicacións no teu dominio:\n{apps}\n\nPrimeiro desinstalaas utilizando 'yunohost app remove id_da_app' ou móveas a outro dominio con 'yunohost app change-url id_da_app' antes de eliminar o dominio", "domain_remove_confirm_apps_removal": "Ao eliminar o dominio tamén vas eliminar estas aplicacións:\n{apps}\n\nTes a certeza de querer facelo? [{answers}]", "domain_hostname_failed": "Non se puido establecer o novo nome de servidor. Esto pode causar problemas máis tarde (tamén podería ser correcto).", @@ -394,19 +391,10 @@ "log_does_exists": "Non hai rexistro de operación co nome '{log}', usa 'yunohost log list' para ver tódolos rexistros de operacións dispoñibles", "log_help_to_get_failed_log": "A operación '{desc}' non se completou. Comparte o rexistro completo da operación utilizando o comando 'yunohost log share {name}' para obter axuda", "log_link_to_failed_log": "Non se completou a operación '{desc}'. Por favor envía o rexistro completo desta operación premendo aquí para obter axuda", - "migration_0015_start": "Comezando a migración a Buster", - "migration_update_LDAP_schema": "Actualizando esquema LDAP...", "migration_ldap_rollback_success": "Sistema restablecido.", "migration_ldap_migration_failed_trying_to_rollback": "Non se puido migrar... intentando volver á versión anterior do sistema.", "migration_ldap_can_not_backup_before_migration": "O sistema de copia de apoio do sistema non se completou antes de que fallase a migración. Erro: {error}", "migration_ldap_backup_before_migration": "Crear copia de apoio da base de datos LDAP e axustes de apps antes de realizar a migración.", - "migration_description_0020_ssh_sftp_permissions": "Engadir soporte para permisos SSH e SFTP", - "migration_description_0019_extend_permissions_features": "Extender/recrear o sistema de xestión de permisos de apps", - "migration_description_0018_xtable_to_nftable": "Migrar as regras de tráfico de rede antigas ao novo sistema nftable", - "migration_description_0017_postgresql_9p6_to_11": "Migrar bases de datos desde PostgreSQL 9.6 a 11", - "migration_description_0016_php70_to_php73_pools": "Migrar o ficheiros de configuración 'pool' de php7.0-fpm a php7.3", - "migration_description_0015_migrate_to_buster": "Actualizar o sistema a Debian Buster e YunoHost 4.x", - "migrating_legacy_permission_settings": "Migrando os axustes dos permisos anteriores...", "main_domain_changed": "Foi cambiado o dominio principal", "main_domain_change_failed": "Non se pode cambiar o dominio principal", "mail_unavailable": "Este enderezo de email está reservado e debería adxudicarse automáticamente á primeira usuaria", @@ -433,28 +421,7 @@ "log_letsencrypt_cert_renew": "Anovar certificado Let's Encrypt para '{}'", "log_selfsigned_cert_install": "Instalar certificado auto-asinado para o dominio '{}'", "log_permission_url": "Actualizar URL relativo ao permiso '{}'", - "migration_0015_general_warning": "Ten en conta que a migración é unha operación delicada. O equipo YunoHost esforzouse revisando e comprobandoa, aínda así algo podería fallar en partes do teu sistema ou as súas apps.\n\nPor tanto, é recomendable:\n- realiza unha copia de apoio de tódolos datos ou apps importantes. Máis info en https://yunohost.org/backup;\n - ten paciencia tras iniciar o proceso: dependendo da túa conexión de internet e hardware podería demorar varias horas a actualización de tódolos compoñentes.", - "migration_0015_system_not_fully_up_to_date": "O teu sistema non está ao día. Realiza unha actualización común antes de realizar a migración a Buster.", - "migration_0015_not_enough_free_space": "Queda moi pouco espazo en /var/! Deberías ter polo menos 1GB libre para realizar a migración.", - "migration_0015_not_stretch": "A distribución Debian actual non é Stretch!", - "migration_0015_yunohost_upgrade": "Iniciando a actualización do núcleo YunoHost...", - "migration_0015_still_on_stretch_after_main_upgrade": "Algo foi mal durante a actualiza ión principal, o sistema semella que aínda está en Debian Stretch", - "migration_0015_main_upgrade": "Iniciando a actualización principal...", - "migration_0015_patching_sources_list": "Correxindo os sources.lists...", "migrations_already_ran": "Xa se realizaron estas migracións: {ids}", - "migration_0019_slapd_config_will_be_overwritten": "Semella que editaches manualmente a configuración slapd. Para esta migración crítica YunoHost precisa forzar a actualización da configuración slapd. Os ficheiros orixinais van ser copiados en {conf_backup_folder}.", - "migration_0019_add_new_attributes_in_ldap": "Engadir novos atributos para os permisos na base de datos LDAP", - "migration_0018_failed_to_reset_legacy_rules": "Fallou o restablecemento das regras antigas de iptables: {error}", - "migration_0018_failed_to_migrate_iptables_rules": "Fallou a migración das regras antigas de iptables a nftables: {error}", - "migration_0017_not_enough_space": "Crea espazo suficiente en {path} para executar a migración.", - "migration_0017_postgresql_11_not_installed": "PostgreSQL 9.6 está instado, pero non postgresql 11? Algo raro debeu acontecer no teu sistema :(...", - "migration_0017_postgresql_96_not_installed": "PostgreSQL non está instalado no teu sistema. Nada que facer.", - "migration_0015_weak_certs": "Os seguintes certificados están a utilizar algoritmos de sinatura débiles e teñen que ser actualizados para ser compatibles coa seguinte versión de nginx: {certs}", - "migration_0015_cleaning_up": "Limpando a caché e paquetes que xa non son útiles...", - "migration_0015_specific_upgrade": "Iniciando a actualización dos paquetes do sistema que precisan ser actualizados de xeito independente...", - "migration_0015_modified_files": "Ten en conta que os seguintes ficheiros semella que foron modificados manualmente e poderían ser sobrescritos na actualización: {manually_modified_files}", - "migration_0015_problematic_apps_warning": "Ten en conta que se detectaron as seguintes apps que poderían ser problemáticas. Semella que non foron instaladas usando o catálogo de YunoHost, ou non están marcadas como 'funcionais'. En consecuencia, non se pode garantir que seguirán funcionando após a actualización: {problematic_apps}", - "diagnosis_http_localdomain": "O dominio {domain}, cun TLD .local, non é de agardar que esté exposto ao exterior da rede local.", "diagnosis_dns_specialusedomain": "O dominio {domain} baséase un dominio de nivel alto e uso especial (TLD) como .local ou .test polo que non é de agardar que realmente teña rexistros DNS.", "upnp_enabled": "UPnP activado", "upnp_disabled": "UPnP desactivado", @@ -549,7 +516,6 @@ "service_description_rspamd": "Filtra spam e outras características relacionadas co email", "service_description_redis-server": "Unha base de datos especial utilizada para o acceso rápido a datos, cola de tarefas e comunicación entre programas", "service_description_postfix": "Utilizado para enviar e recibir emails", - "service_description_php7.3-fpm": "Executa aplicacións escritas en PHP con NGINX", "service_description_nginx": "Serve ou proporciona acceso a tódolos sitios web hospedados no teu servidor", "service_description_mysql": "Almacena datos da app (base de datos SQL)", "service_description_metronome": "Xestiona as contas de mensaxería instantánea XMPP", @@ -613,8 +579,6 @@ "tools_upgrade_regular_packages": "Actualizando os paquetes 'regular' (non-yunohost-related)...", "tools_upgrade_cant_unhold_critical_packages": "Non se desbloquearon os paquetes críticos...", "tools_upgrade_cant_hold_critical_packages": "Non se puideron bloquear os paquetes críticos...", - "tools_upgrade_cant_both": "Non se pode actualizar o sistema e as apps ao mesmo tempo", - "tools_upgrade_at_least_one": "Por favor indica 'apps', ou 'system'", "this_action_broke_dpkg": "Esta acción rachou dpkg/APT (xestores de paquetes do sistema)... Podes intentar resolver o problema conectando a través de SSH e executando `sudo apt install --fix-broken`e/ou `sudo dpkg --configure -a`.", "system_username_exists": "Xa existe este nome de usuaria na lista de usuarias do sistema", "system_upgraded": "Sistema actualizado", @@ -635,7 +599,6 @@ "service_reload_failed": "Non se recargou o servizo '{service}'\n\nRexistros recentes do servizo: {logs}", "service_removed": "Eliminado o servizo '{service}'", "service_remove_failed": "Non se eliminou o servizo '{service}'", - "service_regen_conf_is_deprecated": "'yunohost service regen-conf' xa non se utiliza! Executa 'yunohost tools regen-conf' no seu lugar.", "service_enabled": "O servizo '{service}' vai ser iniciado automáticamente no inicio do sistema.", "diagnosis_apps_allgood": "Tódalas apps instaladas respectan as prácticas básicas de empaquetado", "diagnosis_apps_bad_quality": "Esta aplicación está actualmente marcada como estragada no catálogo de aplicacións de YunoHost. Podería ser un problema temporal mentras as mantedoras intentan arranxar o problema. Ata ese momento a actualización desta app está desactivada.", @@ -655,13 +618,11 @@ "diagnosis_apps_broken": "Actualmente esta aplicación está marcada como estragada no catálogo de aplicacións de YunoHost. Podería tratarse dun problema temporal mentras as mantedoras intentan arraxala. Entanto así a actualización da app está desactivada.", "diagnosis_apps_issue": "Atopouse un problema na app {app}", "diagnosis_apps_not_in_app_catalog": "Esta aplicación non está no catálgo de aplicacións de YunoHost. Se estivo no pasado e foi eliminada, deberías considerar desinstalala porque non recibirá actualizacións, e podería comprometer a integridade e seguridade do teu sistema.", - "app_argument_password_help_optional": "Escribe un espazo para limpar o contrasinal", "config_validate_date": "Debe ser unha data válida co formato YYYY-MM-DD", "config_validate_email": "Debe ser un email válido", "config_validate_time": "Debe ser unha hora válida tal que HH:MM", "config_validate_url": "Debe ser un URL válido", "danger": "Perigo:", - "app_argument_password_help_keep": "Preme Enter para manter o valor actual", "app_config_unable_to_read": "Fallou a lectura dos valores de configuración.", "config_apply_failed": "Fallou a aplicación da nova configuración: {error}", "config_forbidden_keyword": "O palabra chave '{keyword}' está reservada, non podes crear ou usar un panel de configuración cunha pregunta con este id.", @@ -673,7 +634,6 @@ "app_config_unable_to_apply": "Fallou a aplicación dos valores de configuración.", "config_cant_set_value_on_section": "Non podes establecer un valor único na sección completa de configuración.", "config_version_not_supported": "A versión do panel de configuración '{version}' non está soportada.", - "file_extension_not_accepted": "Rexeitouse o ficheiro '{path}' porque a súa extensión non está entre as aceptadas: {accept}", "invalid_number_max": "Ten que ser menor de {max}", "service_not_reloading_because_conf_broken": "Non se recargou/reiniciou o servizo '{name}' porque a súa configuración está estragada: {errors}", "diagnosis_http_special_use_tld": "O dominio {domain} baséase nun dominio de alto-nivel (TLD) especial como .local ou .test e por isto non é de agardar que esté exposto fóra da rede local.", @@ -711,4 +671,4 @@ "ldap_attribute_already_exists": "Xa existe o atributo LDAP '{attribute}' con valor '{value}'", "log_domain_config_set": "Actualizar configuración para o dominio '{}'", "domain_unknown": "Dominio '{domain}' descoñecido" -} +} \ No newline at end of file diff --git a/locales/hi.json b/locales/hi.json index 5f521b1dc..1eed9faa4 100644 --- a/locales/hi.json +++ b/locales/hi.json @@ -10,7 +10,6 @@ "app_extraction_failed": "इन्सटाल्ड फ़ाइलों को निकालने में असमर्थ", "app_id_invalid": "अवैध एप्लिकेशन id", "app_install_files_invalid": "फाइलों की अमान्य स्थापना", - "app_manifest_invalid": "एप्लीकेशन का मैनिफेस्ट अमान्य", "app_not_correctly_installed": "{app} ठीक ढंग से इनस्टॉल नहीं हुई", "app_not_installed": "{app} इनस्टॉल नहीं हुई", "app_not_properly_removed": "{app} ठीक ढंग से नहीं अनइन्सटॉल की गई", diff --git a/locales/id.json b/locales/id.json index 1f28ae7e5..c9778dd5f 100644 --- a/locales/id.json +++ b/locales/id.json @@ -43,4 +43,4 @@ "app_start_remove": "Menghapus {app}...", "app_manifest_install_ask_password": "Pilih kata sandi administrasi untuk aplikasi ini", "app_upgrade_several_apps": "Aplikasi-aplikasi berikut akan diperbarui: {apps}" -} +} \ No newline at end of file diff --git a/locales/it.json b/locales/it.json index bd1dba8bd..bb2e7af6c 100644 --- a/locales/it.json +++ b/locales/it.json @@ -26,7 +26,6 @@ "admin_password_change_failed": "Impossibile cambiare la password", "admin_password_changed": "La password d'amministrazione è stata cambiata", "app_install_files_invalid": "Questi file non possono essere installati", - "app_manifest_invalid": "C'è qualcosa di scorretto nel manifesto dell'applicazione: {error}", "app_not_correctly_installed": "{app} sembra di non essere installata correttamente", "app_not_properly_removed": "{app} non è stata correttamente rimossa", "action_invalid": "L'azione '{action}' non è valida", @@ -223,7 +222,6 @@ "dpkg_is_broken": "Non puoi eseguire questo ora perchè dpkg/APT (i gestori di pacchetti del sistema) sembrano essere in stato danneggiato... Puoi provare a risolvere il problema connettendoti via SSH ed eseguire `sudo apt install --fix-broken` e/o `sudo dpkg --configure -a`.", "domain_cannot_remove_main": "Non puoi rimuovere '{domain}' essendo il dominio principale, prima devi impostare un nuovo dominio principale con il comando 'yunohost domain main-domain -n '; ecco la lista dei domini candidati: {other_domains}", "domain_dns_conf_is_just_a_recommendation": "Questo comando ti mostra la configurazione *raccomandata*. Non ti imposta la configurazione DNS al tuo posto. È tua responsabilità configurare la tua zona DNS nel tuo registrar in accordo con queste raccomandazioni.", - "dyndns_could_not_check_provide": "Impossibile controllare se {provider} possano fornire {domain}.", "dyndns_could_not_check_available": "Impossibile controllare se {domain} è disponibile su {provider}.", "dyndns_domain_not_provided": "Il fornitore DynDNS {provider} non può fornire il dominio {domain}.", "experimental_feature": "Attenzione: Questa funzionalità è sperimentale e non è considerata stabile, non dovresti utilizzarla a meno che tu non sappia cosa stai facendo.", @@ -400,8 +398,6 @@ "tools_upgrade_regular_packages": "Adesso aggiorno i pacchetti 'normali' (non correlati a yunohost)...", "tools_upgrade_cant_unhold_critical_packages": "Impossibile annullare il blocco dei pacchetti critici/importanti...", "tools_upgrade_cant_hold_critical_packages": "Impossibile bloccare i pacchetti critici/importanti...", - "tools_upgrade_cant_both": "Impossibile aggiornare sia il sistema e le app nello stesso momento", - "tools_upgrade_at_least_one": "Specifica 'apps', o 'system'", "show_tile_cant_be_enabled_for_regex": "Non puoi abilitare 'show_tile' in questo momento, perché l'URL del permesso '{permission}' è una regex", "show_tile_cant_be_enabled_for_url_not_defined": "Non puoi abilitare 'show_tile' in questo momento, devi prima definire un URL per il permesso '{permission}'", "service_reloaded_or_restarted": "Il servizio '{service}' è stato ricaricato o riavviato", @@ -410,7 +406,6 @@ "service_restart_failed": "Impossibile riavviare il servizio '{service}'\n\nUltimi registri del servizio: {logs}", "service_reloaded": "Servizio '{service}' ricaricato", "service_reload_failed": "Impossibile ricaricare il servizio '{service}'\n\nUltimi registri del servizio: {logs}", - "service_regen_conf_is_deprecated": "'yunohost service regen-conf' è obsoleto! Per favore usa 'yunohost tools regen-conf' al suo posto.", "service_description_yunohost-firewall": "Gestisce l'apertura e la chiusura delle porte ai servizi", "service_description_yunohost-api": "Gestisce l'interazione tra l'interfaccia web YunoHost ed il sistema", "service_description_ssh": "Ti consente di accedere da remoto al tuo server attraverso il terminale (protocollo SSH)", @@ -418,7 +413,6 @@ "service_description_rspamd": "Filtra SPAM, e altre funzionalità legate alle mail", "service_description_redis-server": "Un database specializzato usato per un veloce accesso ai dati, task queue, e comunicazioni tra programmi", "service_description_postfix": "Usato per inviare e ricevere email", - "service_description_php7.4-fpm": "Esegue app scritte in PHP con NGINX", "service_description_nginx": "Serve o permette l'accesso a tutti i siti pubblicati sul tuo server", "service_description_mysql": "Memorizza i dati delle app (database SQL)", "service_description_metronome": "Gestisce gli account di messaggistica instantanea XMPP", @@ -492,33 +486,6 @@ "migrations_dependencies_not_satisfied": "Esegui queste migrazioni: '{dependencies_id}', prima di {id}.", "migrations_cant_reach_migration_file": "Impossibile accedere ai file di migrazione nel path '%s'", "migrations_already_ran": "Migrazioni già effettuate: {ids}", - "migration_0019_slapd_config_will_be_overwritten": "Sembra che tu abbia modificato manualmente la configurazione slapd. Per questa importante migrazione, YunoHost deve forzare l'aggiornamento della configurazione slapd. I file originali verranno back-uppati in {conf_backup_folder}.", - "migration_0019_add_new_attributes_in_ldap": "Aggiungi nuovi attributi ai permessi nel database LDAP", - "migration_0018_failed_to_reset_legacy_rules": "Impossibile resettare le regole iptables legacy: {error}", - "migration_0018_failed_to_migrate_iptables_rules": "Migrazione fallita delle iptables legacy a nftables: {error}", - "migration_0017_not_enough_space": "Libera abbastanza spazio in {path} per eseguire la migrazione.", - "migration_0017_postgresql_11_not_installed": "PostgreSQL 9.6 è installato, ma non PostgreSQL 11 ?! Qualcosa di strano potrebbe esser successo al tuo sistema :'( ...", - "migration_0017_postgresql_96_not_installed": "PostgreSQL non è stato installato sul tuo sistema. Nulla da fare.", - "migration_0015_weak_certs": "I seguenti certificati utilizzano ancora un algoritmo di firma debole e dovrebbero essere aggiornati per essere compatibili con la prossima versione di nginx: {certs}", - "migration_0015_cleaning_up": "Sto pulendo la cache e i pacchetti non più utili...", - "migration_0015_specific_upgrade": "Inizio l'aggiornamento dei pacchetti di sistema che necessitano di essere aggiornati da soli...", - "migration_0015_modified_files": "Attenzioni, i seguenti file sembrano esser stati modificati manualmente, e potrebbero essere sovrascritti dopo l'aggiornamento: {manually_modified_files}", - "migration_0015_problematic_apps_warning": "Alcune applicazioni potenzialmente problematiche sono state rilevate nel sistema. Sembra che non siano state installate attraverso il catalogo app YunoHost, o non erano flaggate come 'working'/'funzionanti'. Di conseguenza, non è possibile garantire che funzioneranno ancora dopo l'aggiornamento: {problematic_apps}", - "migration_0015_general_warning": "Attenzione, sappi che questa migrazione è un'operazione delicata. Il team YunoHost ha fatto del suo meglio nel controllarla e testarla, ma le probabilità che il sistema e/o qualche app si danneggi non sono nulle.\n\nPerciò, ti raccomandiamo di:\n\t- Effettuare un backup di tutti i dati e app importanti. Maggiori informazioni su https://yunohost.org/backup;\n\t- Sii paziente dopo aver lanciato l'operazione: in base alla tua connessione internet e al tuo hardware, potrebbero volerci alcune ore per aggiornare tutto.", - "migration_0015_system_not_fully_up_to_date": "Il tuo sistema non è completamente aggiornato. Esegui un aggiornamento classico prima di lanciare la migrazione a Buster.", - "migration_0015_not_enough_free_space": "Poco spazio libero disponibile in /var/! Dovresti avere almeno 1GB libero per effettuare questa migrazione.", - "migration_0015_not_stretch": "La distribuzione Debian corrente non è Stretch!", - "migration_0015_yunohost_upgrade": "Inizio l'aggiornamento del core di YunoHost...", - "migration_0015_still_on_stretch_after_main_upgrade": "Qualcosa è andato storto durante l'aggiornamento principale, il sistema sembra essere ancora su Debian Stretch", - "migration_0015_main_upgrade": "Inizio l'aggiornamento principale...", - "migration_0015_patching_sources_list": "Applico le patch a sources.lists...", - "migration_0015_start": "Inizio migrazione a Buster", - "migration_description_0019_extend_permissions_features": "Estendi il sistema di gestione dei permessi app", - "migration_description_0018_xtable_to_nftable": "Migra le vecchie regole di traffico network sul nuovo sistema nftable", - "migration_description_0017_postgresql_9p6_to_11": "Migra i database da PostgreSQL 9.6 a 11", - "migration_description_0016_php70_to_php73_pools": "MIgra i file di configurazione 'pool' di php7.0-fpm su php7.3", - "migration_description_0015_migrate_to_buster": "Aggiorna il sistema a Debian Buster e YunoHost 4.X", - "migrating_legacy_permission_settings": "Impostando le impostazioni legacy dei permessi..", "mailbox_disabled": "E-mail disabilitate per l'utente {user}", "log_user_permission_reset": "Resetta il permesso '{}'", "log_user_permission_update": "Aggiorna gli accessi del permesso '{}'", @@ -558,7 +525,6 @@ "global_settings_setting_pop3_enabled": "Abilita il protocollo POP3 per il server mail", "dyndns_provider_unreachable": "Incapace di raggiungere il provider DynDNS {provider}: o il tuo YunoHost non è connesso ad internet o il server dynette è down.", "dpkg_lock_not_available": "Impossibile eseguire il comando in questo momento perché un altro programma sta bloccando dpkg (il package manager di sistema)", - "domain_name_unknown": "Dominio '{domain}' sconosciuto", "domain_cannot_remove_main_add_new_one": "Non puoi rimuovere '{domain}' visto che è il dominio principale nonché il tuo unico dominio, devi prima aggiungere un altro dominio eseguendo 'yunohost domain add ', impostarlo come dominio principale con 'yunohost domain main-domain n ', e solo allora potrai rimuovere il dominio '{domain}' eseguendo 'yunohost domain remove {domain}'.'", "domain_cannot_add_xmpp_upload": "Non puoi aggiungere domini che iniziano per 'xmpp-upload.'. Questo tipo di nome è riservato per la funzionalità di upload XMPP integrata in YunoHost.", "diagnosis_processes_killed_by_oom_reaper": "Alcuni processi sono stati terminati dal sistema che era a corto di memoria. Questo è un sintomo di insufficienza di memoria nel sistema o di un processo che richiede troppa memoria. Lista dei processi terminati:\n{kills_summary}", @@ -612,12 +578,10 @@ "diagnosis_rootfstotalspace_warning": "La radice del filesystem ha un totale di solo {space}. Potrebbe non essere un problema, ma stai attento perché potresti consumare tutta la memoria velocemente... Raccomandiamo di avere almeno 16 GB per la radice del filesystem.", "restore_backup_too_old": "Questo archivio backup non può essere ripristinato perché è stato generato da una versione troppo vecchia di YunoHost.", "permission_cant_add_to_all_users": "Il permesso {permission} non può essere aggiunto a tutto gli utenti.", - "migration_update_LDAP_schema": "Aggiorno lo schema LDAP...", "migration_ldap_rollback_success": "Sistema ripristinato allo stato precedente.", "migration_ldap_migration_failed_trying_to_rollback": "Impossibile migrare... provo a ripristinare il sistema.", "migration_ldap_can_not_backup_before_migration": "Il backup del sistema non è stato completato prima che la migrazione fallisse. Errore: {error}", "migration_ldap_backup_before_migration": "Sto generando il backup del database LDAP e delle impostazioni delle app prima di effettuare la migrazione.", - "migration_description_0020_ssh_sftp_permissions": "Aggiungi il supporto ai permessi SSH e SFTP", "log_backup_create": "Crea un archivio backup", "global_settings_setting_ssowat_panel_overlay_enabled": "Abilita il pannello sovrapposto SSOwat", "global_settings_setting_security_ssh_port": "Porta SSH", @@ -706,4 +670,4 @@ "config_validate_url": "È necessario inserire un URL web valido", "ldap_server_down": "Impossibile raggiungere il server LDAP", "ldap_server_is_down_restart_it": "Il servizio LDAP è down, prova a riavviarlo…" -} +} \ No newline at end of file diff --git a/locales/nb_NO.json b/locales/nb_NO.json index dc217d74e..e81d3af05 100644 --- a/locales/nb_NO.json +++ b/locales/nb_NO.json @@ -30,7 +30,6 @@ "domains_available": "Tilgjengelige domener:", "done": "Ferdig", "downloading": "Laster ned…", - "dyndns_could_not_check_provide": "Kunne ikke sjekke om {provider} kan tilby {domain}.", "dyndns_could_not_check_available": "Kunne ikke sjekke om {domain} er tilgjengelig på {provider}.", "mail_domain_unknown": "Ukjent e-postadresse for domenet '{domain}'", "log_remove_on_failed_restore": "Fjern '{}' etter mislykket gjenoppretting fra sikkerhetskopiarkiv", diff --git a/locales/nl.json b/locales/nl.json index 5e612fc77..f5923fa9a 100644 --- a/locales/nl.json +++ b/locales/nl.json @@ -8,7 +8,6 @@ "app_extraction_failed": "Kan installatiebestanden niet uitpakken", "app_id_invalid": "Ongeldige app-id", "app_install_files_invalid": "Deze bestanden kunnen niet worden geïnstalleerd", - "app_manifest_invalid": "Ongeldig app-manifest", "app_not_installed": "{app} is niet geïnstalleerd", "app_removed": "{app} succesvol verwijderd", "app_sources_fetch_failed": "Kan bronbestanden niet ophalen, klopt de URL?", diff --git a/locales/oc.json b/locales/oc.json index a794f5e04..d9ec19b09 100644 --- a/locales/oc.json +++ b/locales/oc.json @@ -33,7 +33,6 @@ "app_change_url_identical_domains": "L’ancian e lo novèl coble domeni/camin son identics per {domain}{path}, pas res a far.", "app_change_url_success": "L’URL de l’aplicacion {app} es ara {domain}{path}", "app_extraction_failed": "Extraccion dels fichièrs d’installacion impossibla", - "app_manifest_invalid": "I a quicòm que truca amb lo manifest de l’aplicacion : {error}", "app_requirements_checking": "Verificacion dels paquets requesits per {app}...", "app_sources_fetch_failed": "Recuperacion dels fichièrs fonts impossibla, l’URL es corrècta ?", "app_unsupported_remote_type": "Lo tipe alonhat utilizat per l’aplicacion es pas suportat", @@ -110,7 +109,6 @@ "domains_available": "Domenis disponibles :", "done": "Acabat", "downloading": "Telecargament…", - "dyndns_could_not_check_provide": "Impossible de verificar se {provider} pòt provesir {domain}.", "dyndns_ip_update_failed": "Impossible d’actualizar l’adreça IP sul domeni DynDNS", "dyndns_ip_updated": "Vòstra adreça IP actualizada pel domeni DynDNS", "dyndns_key_generating": "La clau DNS es a se generar… pòt trigar una estona.", @@ -332,18 +330,15 @@ "regenconf_dry_pending_applying": "Verificacion de la configuracion que seriá estada aplicada a la categoria « {category} »…", "regenconf_failed": "Regeneracion impossibla de la configuracion per la(s) categoria(s) : {categories}", "regenconf_pending_applying": "Aplicacion de la configuracion en espèra per la categoria « {category} »…", - "tools_upgrade_cant_both": "Actualizacion impossibla del sistèma e de las aplicacions a l’encòp", "tools_upgrade_cant_hold_critical_packages": "Manteniment impossible dels paquets critiques…", "global_settings_setting_security_nginx_compatibility": "Solucion de compromés entre compatibilitat e seguretat pel servidor web NGINX Afècta los criptografs (e d’autres aspèctes ligats amb la seguretat)", "global_settings_setting_security_ssh_compatibility": "Solucion de compromés entre compatibilitat e seguretat pel servidor SSH. Afècta los criptografs (e d’autres aspèctes ligats amb la seguretat)", "global_settings_setting_security_postfix_compatibility": "Solucion de compromés entre compatibilitat e seguretat pel servidor Postfix. Afècta los criptografs (e d’autres aspèctes ligats amb la seguretat)", - "service_regen_conf_is_deprecated": "« yunohost service regen-conf » es despreciat ! Utilizatz « yunohost tools regen-conf » allòc.", "service_reload_failed": "Impossible de recargar lo servici « {service} »\n\nJornal d’audit recent : {logs}", "service_restart_failed": "Impossible de reaviar lo servici « {service} »\n\nJornal d’audit recent : {logs}", "service_reload_or_restart_failed": "Impossible de recargar o reaviar lo servici « {service} »\n\nJornal d’audit recent : {logs}", "regenconf_file_kept_back": "S’espèra que lo fichièr de configuracion « {conf} » siá suprimit per regen-conf (categoria {category} mas es estat mantengut.", "this_action_broke_dpkg": "Aquesta accion a copat dpkg/apt (los gestionaris de paquets del sistèma)… Podètz ensajar de resòlver aqueste problèma en vos connectant amb SSH e executant « sudo dpkg --configure -a ».", - "tools_upgrade_at_least_one": "Especificatz --apps O --system", "tools_upgrade_cant_unhold_critical_packages": "Se pòt pas quitar de manténer los paquets critics…", "tools_upgrade_regular_packages": "Actualizacion dels paquets « normals » (pas ligats a YunoHost)…", "tools_upgrade_special_packages": "Actualizacion dels paquets « especials » (ligats a YunoHost)…", @@ -480,7 +475,6 @@ "diagnosis_basesystem_hardware": "L’arquitectura del servidor es {virt} {arch}", "backup_archive_corrupted": "Sembla que l’archiu de la salvagarda « {archive} » es corromput : {error}", "diagnosis_domain_expires_in": "{domain} expiraà d’aquí {days} jorns.", - "migration_0015_cleaning_up": "Netejatge de la memòria cache e dels paquets pas mai necessaris…", "restore_already_installed_apps": "Restauracion impossibla de las aplicacions seguentas que son ja installadas : {apps}", "diagnosis_package_installed_from_sury": "D’unes paquets sistèma devon èsser meses a nivèl", "ask_user_domain": "Domeni d’utilizar per l’adreça de corrièl de l’utilizaire e lo compte XMPP", @@ -493,14 +487,6 @@ "app_label_deprecated": "Aquesta comanda es estada renduda obsolèta. Mercés d'utilizar lo nòva \"yunohost user permission update\" per gerir letiquetada de l'aplication", "additional_urls_already_removed": "URL addicionala {url} es ja estada elimida per la permission «#permission:s»", "additional_urls_already_added": "URL addicionadal «{url}'» es ja estada aponduda per la permission «{permission}»", - "migration_0015_yunohost_upgrade": "Aviada de la mesa a jorn de YunoHost...", - "migration_0015_main_upgrade": "Aviada de la mesa a nivèl generala...", - "migration_0015_patching_sources_list": "Mesa a jorn del fichièr sources.lists...", - "migration_0015_start": "Aviar la migracion cap a Buster", - "migration_description_0017_postgresql_9p6_to_11": "Migrar las basas de donadas de PostgreSQL 9.6 cap a 11", - "migration_description_0016_php70_to_php73_pools": "Migrar los fichièrs de configuracion php7.0 cap a php7.3", - "migration_description_0015_migrate_to_buster": "Mesa a nivèl dels sistèmas Debian Buster e YunoHost 4.x", - "migrating_legacy_permission_settings": "Migracion dels paramètres de permission ancians...", "log_app_action_run": "Executar l’accion de l’aplicacion « {} »", "diagnosis_basesystem_hardware_model": "Lo modèl del servidor es {model}", "backup_archive_cant_retrieve_info_json": "Obtencion impossibla de las informacions de l’archiu « {archive} »... Se pòt pas recuperar lo fichièr info.json (o es pas un fichièr json valid).", @@ -513,4 +499,4 @@ "diagnosis_domain_expiration_not_found": "Impossible de verificar la data d’expiracion d’unes domenis", "backup_create_size_estimation": "L’archiu contendrà apr’aquí {size} de donadas.", "app_restore_script_failed": "Una error s’es producha a l’interior del script de restauracion de l’aplicacion" -} +} \ No newline at end of file diff --git a/locales/pt.json b/locales/pt.json index d285948be..154ab700f 100644 --- a/locales/pt.json +++ b/locales/pt.json @@ -7,7 +7,6 @@ "app_extraction_failed": "Não foi possível extrair os arquivos para instalação", "app_id_invalid": "App ID invaĺido", "app_install_files_invalid": "Esses arquivos não podem ser instalados", - "app_manifest_invalid": "Manifesto da aplicação inválido: {error}", "app_not_installed": "Não foi possível encontrar {app} na lista de aplicações instaladas: {all_apps}", "app_removed": "{app} desinstalada", "app_sources_fetch_failed": "Não foi possível carregar os arquivos de código fonte, a URL está correta?", @@ -255,4 +254,4 @@ "diagnosis_backports_in_sources_list": "Parece que o apt (o gerenciador de pacotes) está configurado para usar o repositório backport. A não ser que você saiba o que você esteá fazendo, desencorajamos fortemente a instalação de pacotes de backports porque é provável que crie instabilidades ou conflitos no seu sistema.", "certmanager_cert_renew_success": "Certificado Let's Encrypt renovado para o domínio '{domain}'", "certmanager_warning_subdomain_dns_record": "O subdomínio '{subdomain}' não resolve para o mesmo IP que '{domain}'. Algumas funcionalidades não estarão disponíveis até que você conserte isto e regenere o certificado." -} +} \ No newline at end of file diff --git a/locales/ru.json b/locales/ru.json index 5c9a39322..58bd1846d 100644 --- a/locales/ru.json +++ b/locales/ru.json @@ -16,7 +16,6 @@ "app_id_invalid": "Неправильный ID приложения", "app_install_files_invalid": "Эти файлы не могут быть установлены", "app_location_unavailable": "Этот URL отсутствует или конфликтует с уже установленным приложением или приложениями:\n{apps}", - "app_manifest_invalid": "Недопустимый манифест приложения: {error}", "app_not_correctly_installed": "{app} , кажется, установлены неправильно", "app_not_installed": "{app} не найдено в списке установленных приложений: {all_apps}", "app_not_properly_removed": "{app} удалены неправильно", @@ -75,4 +74,4 @@ "yunohost_already_installed": "YunoHost уже установлен", "yunohost_configured": "Теперь YunoHost настроен", "upgrading_packages": "Обновление пакетов..." -} +} \ No newline at end of file diff --git a/locales/sl.json b/locales/sl.json index 0967ef424..9e26dfeeb 100644 --- a/locales/sl.json +++ b/locales/sl.json @@ -1 +1 @@ -{} +{} \ No newline at end of file diff --git a/locales/uk.json b/locales/uk.json index 4baf6d20f..00df81891 100644 --- a/locales/uk.json +++ b/locales/uk.json @@ -1,6 +1,5 @@ { "app_manifest_install_ask_domain": "Оберіть домен, в якому треба встановити цей застосунок", - "app_manifest_invalid": "Щось не так з маніфестом застосунку: {error}", "app_location_unavailable": "Ця URL-адреса або недоступна, або конфліктує з уже встановленим застосунком (застосунками):\n{apps}", "app_label_deprecated": "Ця команда застаріла! Будь ласка, використовуйте нову команду 'yunohost user permission update' для управління заголовком застосунку.", "app_make_default_location_already_used": "Неможливо зробити '{app}' типовим застосунком на домені, '{domain}' вже використовується '{other_app}'", @@ -40,7 +39,6 @@ "service_reload_failed": "Не вдалося перезавантажити службу '{service}'\n\nОстанні журнали служби: {logs}", "service_removed": "Служба '{service}' вилучена", "service_remove_failed": "Не вдалося видалити службу '{service}'", - "service_regen_conf_is_deprecated": "'yunohost service regen-conf' застарів! Будь ласка, використовуйте 'yunohost tools regen-conf' замість цього.", "service_enabled": "Служба '{service}' тепер буде автоматично запускатися під час завантаження системи.", "service_enable_failed": "Неможливо змусити службу '{service}' автоматично запускатися під час завантаження.\n\nНедавні журнали служби: {logs}", "service_disabled": "Служба '{service}' більше не буде запускатися під час завантаження системи.", @@ -52,7 +50,6 @@ "service_description_rspamd": "Фільтри спаму і інші функції, пов'язані з е-поштою", "service_description_redis-server": "Спеціалізована база даних, яка використовується для швидкого доступу до даних, черги завдань і зв'язку між програмами", "service_description_postfix": "Використовується для надсилання та отримання е-пошти", - "service_description_php7.3-fpm": "Запускає застосунки, написані мовою програмування PHP за допомогою NGINX", "service_description_nginx": "Обслуговує або надає доступ до всіх вебсайтів, розміщених на вашому сервері", "service_description_mysql": "Зберігає дані застосунків (база даних SQL)", "service_description_metronome": "Управління обліковими записами миттєвих повідомлень XMPP", @@ -162,39 +159,10 @@ "migrations_dependencies_not_satisfied": "Запустіть ці міграції: '{dependencies_id}', перед міграцією {id}.", "migrations_cant_reach_migration_file": "Не вдалося отримати доступ до файлів міграцій за шляхом '%s'", "migrations_already_ran": "Наступні міграції вже виконано: {ids}", - "migration_0019_slapd_config_will_be_overwritten": "Схоже, що ви вручну відредагували конфігурацію slapd. Для цього критичного переходу YunoHost повинен примусово оновити конфігурацію slapd. Оригінальні файли будуть збережені в {conf_backup_folder}.", - "migration_0019_add_new_attributes_in_ldap": "Додавання нових атрибутів для дозволів у базі даних LDAP", - "migration_0018_failed_to_reset_legacy_rules": "Не вдалося скинути спадкові правила iptables: {error}", - "migration_0018_failed_to_migrate_iptables_rules": "Не вдалося перенести спадкові правила iptables в nftables: {error}", - "migration_0017_not_enough_space": "Звільніть достатньо місця в {path} для запуску міграції.", - "migration_0017_postgresql_11_not_installed": "PostgreSQL 9.6 встановлено, але не PostgreSQL 11‽ Можливо, у вашій системі відбулося щось дивне :(...", - "migration_0017_postgresql_96_not_installed": "PostgreSQL не встановлено у вашій системі. Нічого не потрібно робити.", - "migration_0015_weak_certs": "Було виявлено, що такі сертифікати все ще використовують слабкі алгоритми підпису і повинні бути оновлені для сумісності з наступною версією nginx: {certs}", - "migration_0015_cleaning_up": "Очищення кеш-пам'яті і пакетів, які більше не потрібні...", - "migration_0015_specific_upgrade": "Початок оновлення системних пакетів, які повинні бути оновлені незалежно...", - "migration_0015_modified_files": "Зверніть увагу, що такі файли були змінені вручну і можуть бути перезаписані після оновлення: {manually_modified_files}", - "migration_0015_problematic_apps_warning": "Зверніть увагу, що були виявлені наступні, можливо, проблемні встановлені застосунки. Схоже, що вони не були встановлені з каталогу застосунків YunoHost або не зазначені як «робочі». Отже, не можна гарантувати, що вони будуть працювати після оновлення: {problematic_apps}", - "migration_0015_general_warning": "Будь ласка, зверніть увагу, що ця міграція є делікатною операцією. Команда YunoHost зробила все можливе, щоб перевірити і протестувати її, але міграція все ще може порушити частина системи або її застосунків.\n\nТому рекомендовано:\n - Виконати резервне копіювання всіх важливих даних або застосунків. Подробиці на сайті https://yunohost.org/backup; \n - Наберіться терпіння після запуску міграції: В залежності від вашого з'єднання з Інтернетом і апаратного забезпечення, оновлення може зайняти до декількох годин.", - "migration_0015_system_not_fully_up_to_date": "Ваша система не повністю оновлена. Будь ласка, виконайте регулярне оновлення перед запуском міграції на Buster.", - "migration_0015_not_enough_free_space": "Вільного місця в /var/ досить мало! У вас повинно бути не менше 1 ГБ вільного місця, щоб запустити цю міграцію.", - "migration_0015_not_stretch": "Поточний дистрибутив Debian не є Stretch!", - "migration_0015_yunohost_upgrade": "Початок оновлення ядра YunoHost...", - "migration_0015_still_on_stretch_after_main_upgrade": "Щось пішло не так під час основного оновлення, система, схоже, все ще знаходиться на Debian Stretch", - "migration_0015_main_upgrade": "Початок основного оновлення...", - "migration_0015_patching_sources_list": "Виправлення sources.lists...", - "migration_0015_start": "Початок міграції на Buster", - "migration_update_LDAP_schema": "Оновлення схеми LDAP...", "migration_ldap_rollback_success": "Система відкотилася.", "migration_ldap_migration_failed_trying_to_rollback": "Не вдалося виконати міграцію... Пробуємо відкотити систему.", "migration_ldap_can_not_backup_before_migration": "Не вдалося завершити резервне копіювання системи перед невдалою міграцією. Помилка: {error}", "migration_ldap_backup_before_migration": "Створення резервної копії бази даних LDAP і налаштування застосунків перед фактичною міграцією.", - "migration_description_0020_ssh_sftp_permissions": "Додавання підтримки дозволів SSH і SFTP", - "migration_description_0019_extend_permissions_features": "Розширення/переробка системи управління дозволами застосунків", - "migration_description_0018_xtable_to_nftable": "Перенесення старих правил мережевого трафіку в нову систему nftable", - "migration_description_0017_postgresql_9p6_to_11": "Перенесення баз даних з PostgreSQL 9.6 на 11", - "migration_description_0016_php70_to_php73_pools": "Перенесення php7.0-fpm 'pool' conf файлів на php7.3", - "migration_description_0015_migrate_to_buster": "Оновлення системи до Debian Buster і YunoHost 4.x", - "migrating_legacy_permission_settings": "Перенесення спадкових налаштувань дозволів...", "main_domain_changed": "Основний домен було змінено", "main_domain_change_failed": "Неможливо змінити основний домен", "mail_unavailable": "Ця е-пошта зарезервована і буде автоматично виділена найпершому користувачеві", @@ -318,13 +286,11 @@ "dyndns_ip_updated": "Вашу IP-адресу в DynDNS оновлено", "dyndns_ip_update_failed": "Не вдалося оновити IP-адресу в DynDNS", "dyndns_could_not_check_available": "Не вдалося перевірити, чи {domain} доступний у {provider}.", - "dyndns_could_not_check_provide": "Не вдалося перевірити, чи може {provider} надати {domain}.", "dpkg_lock_not_available": "Ця команда не може бути виконана прямо зараз, тому що інша програма, схоже, використовує блокування dpkg (системного менеджера пакетів)", "dpkg_is_broken": "Ви не можете зробити це прямо зараз, тому що dpkg/APT (системні менеджери пакетів), схоже, знаходяться в зламаному стані... Ви можете спробувати вирішити цю проблему, під'єднавшись через SSH і виконавши `sudo apt install --fix-broken` та/або `sudo dpkg --configure -a`.", "downloading": "Завантаження…", "done": "Готово", "domains_available": "Доступні домени:", - "domain_name_unknown": "Домен '{domain}' невідомий", "domain_uninstall_app_first": "Ці застосунки все ще встановлені на вашому домені:\n{apps}\n\nВидаліть їх за допомогою 'yunohost app remove the_app_id' або перемістіть їх на інший домен за допомогою 'yunohost app change-url the_app_id', перш ніж приступити до вилучення домену", "domain_remove_confirm_apps_removal": "Вилучення цього домену призведе до вилучення таких застосунків:\n{apps}\n\nВи впевнені, що хочете це зробити? [{answers}]", "domain_hostname_failed": "Неможливо встановити нову назву хоста. Це може викликати проблеми в подальшому (можливо, все буде в порядку).", @@ -356,7 +322,6 @@ "diagnosis_http_connection_error": "Помилка з'єднання: не вдалося з'єднатися із запитуваним доменом, швидше за все, він недоступний.", "diagnosis_http_timeout": "При спробі зв'язатися з вашим сервером ззовні стався тайм-аут. Він здається недоступним.
1. Найбільш поширеною причиною цієї проблеми є те, що порт 80 (і 443) неправильно перенаправлено на ваш сервер .
2. Ви також повинні переконатися, що служба nginx запущена
3.На більш складних установках: переконайтеся, що немає фаєрвола або зворотного проксі.", "diagnosis_http_ok": "Домен {domain} доступний по HTTP поза локальною мережею.", - "diagnosis_http_localdomain": "Домен {domain} з .local TLD не може бути доступний ззовні локальної мережі.", "diagnosis_http_could_not_diagnose_details": "Помилка: {error}", "diagnosis_http_could_not_diagnose": "Не вдалося діагностувати досяжність доменів ззовні в IPv{ipversion}.", "diagnosis_http_hairpinning_issue_details": "Можливо, це пов'язано з коробкою/маршрутизатором вашого інтернет-провайдера. В результаті, люди ззовні вашої локальної мережі зможуть отримати доступ до вашого сервера, як і очікувалося, але не люди зсередини локальної мережі (як ви, ймовірно?) При використанні доменного імені або глобального IP. Можливо, ви зможете поліпшити ситуацію, глянувши https://yunohost.org/dns_local_network ", @@ -446,8 +411,6 @@ "tools_upgrade_regular_packages": "Тепер оновлюємо 'звичайні' (не пов'язані з yunohost) пакети…", "tools_upgrade_cant_unhold_critical_packages": "Не вдалося розтримати критичні пакети…", "tools_upgrade_cant_hold_critical_packages": "Не вдалося утримати критичні пакети…", - "tools_upgrade_cant_both": "Неможливо оновити систему і застосунки одночасно", - "tools_upgrade_at_least_one": "Будь ласка, вкажіть 'apps', або 'system'", "this_action_broke_dpkg": "Ця дія порушила dpkg/APT (системні менеджери пакетів)... Ви можете спробувати вирішити цю проблему, під'єднавшись по SSH і запустивши `sudo apt install --fix-broken` та/або `sudo dpkg --configure -a`.", "system_username_exists": "Ім'я користувача вже існує в списку користувачів системи", "system_upgraded": "Систему оновлено", @@ -669,13 +632,10 @@ "config_validate_url": "Вебадреса має бути дійсною", "config_version_not_supported": "Версії конфігураційної панелі '{version}' не підтримуються.", "danger": "Небезпека:", - "file_extension_not_accepted": "Файл '{path}' відхиляється, бо його розширення не входить в число прийнятих розширень: {accept}", "invalid_number_min": "Має бути більшим за {min}", "invalid_number_max": "Має бути меншим за {max}", "log_app_config_set": "Застосувати конфігурацію до застосунку '{}'", "service_not_reloading_because_conf_broken": "Неможливо перезавантажити/перезапустити службу '{name}', тому що її конфігурацію порушено: {errors}", - "app_argument_password_help_optional": "Введіть один пробіл, щоб очистити пароль", - "app_argument_password_help_keep": "Натисніть Enter, щоб зберегти поточне значення", "domain_registrar_is_not_configured": "Реєстратор ще не конфігуровано для домену {domain}.", "domain_dns_push_not_applicable": "Функція автоматичної конфігурації DNS не застосовується до домену {domain}. Вам слід вручну конфігурувати записи DNS відповідно до документації за адресою https://yunohost.org/dns_config.", "domain_dns_registrar_not_supported": "YunoHost не зміг автоматично виявити реєстратора, який обробляє цей домен. Вам слід вручну конфігурувати записи DNS відповідно до документації за адресою https://yunohost.org/dns.", @@ -711,4 +671,4 @@ "ldap_attribute_already_exists": "Атрибут LDAP '{attribute}' вже існує зі значенням '{value}'", "domain_dns_push_already_up_to_date": "Записи вже оновлені, нічого не потрібно робити.", "domain_unknown": "Домен '{domain}' є невідомим" -} +} \ No newline at end of file diff --git a/locales/zh_Hans.json b/locales/zh_Hans.json index fa3b7bb03..4b3067909 100644 --- a/locales/zh_Hans.json +++ b/locales/zh_Hans.json @@ -137,7 +137,6 @@ "additional_urls_already_removed": "权限'{permission}'的其他URL中已经删除了附加URL'{url}'", "app_manifest_install_ask_path": "选择安装此应用的路径", "app_manifest_install_ask_domain": "选择应安装此应用程序的域", - "app_manifest_invalid": "应用清单错误: {error}", "app_location_unavailable": "该URL不可用,或与已安装的应用冲突:\n{apps}", "app_label_deprecated": "不推荐使用此命令!请使用新命令 'yunohost user permission update'来管理应用标签。", "app_make_default_location_already_used": "无法将'{app}' 设置为域上的默认应用,'{other_app}'已在使用'{domain}'", @@ -218,7 +217,6 @@ "service_description_rspamd": "过滤垃圾邮件和其他与电子邮件相关的功能", "service_description_redis-server": "用于快速数据访问,任务队列和程序之间通信的专用数据库", "service_description_postfix": "用于发送和接收电子邮件", - "service_description_php7.3-fpm": "使用NGINX运行用PHP编写的应用程序", "service_description_nginx": "为你的服务器上托管的所有网站提供服务或访问", "service_description_mysql": "存储应用程序数据(SQL数据库)", "service_description_metronome": "管理XMPP即时消息传递帐户", @@ -235,7 +233,6 @@ "service_reload_failed": "无法重新加载服务'{service}'\n\n最近的服务日志:{logs}", "service_removed": "服务 '{service}' 已删除", "service_remove_failed": "无法删除服务'{service}'", - "service_regen_conf_is_deprecated": "不建议使用'yunohost service regen-conf' ! 请改用'yunohost tools regen-conf'。", "service_enabled": "现在,服务'{service}' 将在系统引导过程中自动启动。", "service_enable_failed": "无法使服务 '{service}'在启动时自动启动。\n\n最近的服务日志:{logs}", "service_disabled": "系统启动时,服务 '{service}' 将不再启动。", @@ -243,8 +240,6 @@ "tools_upgrade_regular_packages": "现在正在升级 'regular' (与yunohost无关)的软件包…", "tools_upgrade_cant_unhold_critical_packages": "无法解压关键软件包…", "tools_upgrade_cant_hold_critical_packages": "无法保存重要软件包…", - "tools_upgrade_cant_both": "无法同时升级系统和应用程序", - "tools_upgrade_at_least_one": "请指定'apps', 或 'system'", "this_action_broke_dpkg": "此操作破坏了dpkg / APT(系统软件包管理器)...您可以尝试通过SSH连接并运行`sudo apt install --fix-broken`和/或`sudo dpkg --configure -a`来解决此问题。", "system_username_exists": "用户名已存在于系统用户列表中", "system_upgraded": "系统升级", @@ -353,13 +348,11 @@ "dyndns_ip_updated": "在DynDNS上更新了您的IP", "dyndns_ip_update_failed": "无法将IP地址更新到DynDNS", "dyndns_could_not_check_available": "无法检查{provider}上是否可用 {domain}。", - "dyndns_could_not_check_provide": "无法检查{provider}是否可以提供 {domain}.", "dpkg_lock_not_available": "该命令现在无法运行,因为另一个程序似乎正在使用dpkg锁(系统软件包管理器)", "dpkg_is_broken": "您现在不能执行此操作,因为dpkg / APT(系统软件包管理器)似乎处于损坏状态……您可以尝试通过SSH连接并运行sudo apt install --fix-broken和/或 sudo dpkg --configure-a 来解决此问题.", "downloading": "下载中…", "done": "完成", "domains_available": "可用域:", - "domain_name_unknown": "域'{domain}'未知", "domain_uninstall_app_first": "这些应用程序仍安装在您的域中:\n{apps}\n\n请先使用 'yunohost app remove the_app_id' 将其卸载,或使用 'yunohost app change-url the_app_id'将其移至另一个域,然后再继续删除域", "domain_remove_confirm_apps_removal": "删除该域将删除这些应用程序:\n{apps}\n\n您确定要这样做吗? [{answers}]", "domain_hostname_failed": "无法设置新的主机名。稍后可能会引起问题(可能没问题)。", @@ -571,39 +564,10 @@ "migrations_dependencies_not_satisfied": "在迁移{id}之前运行以下迁移: '{dependencies_id}'。", "migrations_cant_reach_migration_file": "无法访问路径'%s'处的迁移文件", "migrations_already_ran": "这些迁移已经完成: {ids}", - "migration_0019_slapd_config_will_be_overwritten": "好像您手动编辑了slapd配置。对于此关键迁移,YunoHost需要强制更新slapd配置。原始文件将备份在{conf_backup_folder}中。", - "migration_0019_add_new_attributes_in_ldap": "在LDAP数据库中添加权限的新属性", - "migration_0018_failed_to_reset_legacy_rules": "无法重置旧版iptables规则: {error}", - "migration_0018_failed_to_migrate_iptables_rules": "无法将旧的iptables规则迁移到nftables: {error}", - "migration_0017_not_enough_space": "在{path}中提供足够的空间来运行迁移。", - "migration_0017_postgresql_11_not_installed": "已安装PostgreSQL 9.6,但未安装PostgreSQL11?您的系统上可能发生了一些奇怪的事情:(...", - "migration_0017_postgresql_96_not_installed": "PostgreSQL未安装在您的系统上。无事可做。", - "migration_0015_weak_certs": "发现以下证书仍然使用弱签名算法,并且必须升级以与下一版本的nginx兼容: {certs}", - "migration_0015_cleaning_up": "清理不再有用的缓存和软件包...", - "migration_0015_specific_upgrade": "开始升级需要独立升级的系统软件包...", - "migration_0015_modified_files": "请注意,发现以下文件是手动修改的,并且在升级后可能会被覆盖: {manually_modified_files}", - "migration_0015_problematic_apps_warning": "请注意,已检测到以下可能有问题的已安装应用程序。看起来好像那些不是从YunoHost应用程序目录中安装的,或者没有标记为“正在运行”。因此,不能保证它们在升级后仍然可以使用: {problematic_apps}", - "migration_0015_general_warning": "请注意,此迁移是一项微妙的操作。YunoHost团队竭尽全力对其进行检查和测试,但迁移仍可能会破坏系统或其应用程序的某些部分。\n\n因此,建议:\n -对任何关键数据或应用程序执行备份。有关更多信息,请访问https://yunohost.org/backup;\n -启动迁移后要耐心:根据您的Internet连接和硬件,升级所有内容最多可能需要几个小时。", - "migration_0015_system_not_fully_up_to_date": "您的系统不是最新的。请先执行常规升级,然后再运行向Buster的迁移。", - "migration_0015_not_enough_free_space": "/var/中的可用空间非常低!您应该至少有1GB的可用空间来运行此迁移。", - "migration_0015_not_stretch": "当前的Debian发行版不是Stretch!", - "migration_0015_yunohost_upgrade": "正在启动YunoHost核心升级...", - "migration_0015_still_on_stretch_after_main_upgrade": "在主要升级期间出了点问题,系统似乎仍在Debian Stretch上", - "migration_0015_main_upgrade": "正在开始主要升级...", - "migration_0015_patching_sources_list": "修补sources.lists ...", - "migration_0015_start": "开始迁移至Buster", - "migration_update_LDAP_schema": "正在更新LDAP模式...", "migration_ldap_rollback_success": "系统回滚。", "migration_ldap_migration_failed_trying_to_rollback": "无法迁移...试图回滚系统。", "migration_ldap_can_not_backup_before_migration": "迁移失败之前,无法完成系统的备份。错误: {error}", "migration_ldap_backup_before_migration": "在实际迁移之前,请创建LDAP数据库和应用程序设置的备份。", - "migration_description_0020_ssh_sftp_permissions": "添加SSH和SFTP权限支持", - "migration_description_0019_extend_permissions_features": "扩展/修改应用程序的权限管理系统", - "migration_description_0018_xtable_to_nftable": "将旧的网络流量规则迁移到新的nftable系统", - "migration_description_0017_postgresql_9p6_to_11": "将数据库从PostgreSQL 9.6迁移到11", - "migration_description_0016_php70_to_php73_pools": "将php7.0-fpm'pool'conf文件迁移到php7.3", - "migration_description_0015_migrate_to_buster": "将系统升级到Debian Buster和YunoHost 4.x", - "migrating_legacy_permission_settings": "正在迁移旧版权限设置...", "main_domain_changed": "主域已更改", "main_domain_change_failed": "无法更改主域", "mail_unavailable": "该电子邮件地址是保留的,并且将自动分配给第一个用户", @@ -627,7 +591,7 @@ "log_user_delete": "删除用户'{}'", "log_user_create": "添加用户'{}'", "domain_registrar_is_not_configured": "尚未为域 {domain} 配置注册商。", - "domain_dns_push_not_applicable": "的自动DNS配置的特征是不适用域{域}。您应该按照 https://yunohost.org/dns_config 上的文档手动配置DNS 记录。", + "domain_dns_push_not_applicable": "的自动DNS配置的特征是不适用域{domain}。您应该按照 https://yunohost.org/dns_config 上的文档手动配置DNS 记录。", "disk_space_not_sufficient_update": "没有足够的磁盘空间来更新此应用程序", "diagnosis_high_number_auth_failures": "最近出现了大量可疑的失败身份验证。您的fail2ban正在运行且配置正确,或使用自定义端口的SSH作为https://yunohost.org/解释的安全性。", "diagnosis_apps_not_in_app_catalog": "此应用程序不在 YunoHost 的应用程序目录中。如果它过去有被删除过,您应该考虑卸载此应用程,因为它不会更新,并且可能会损害您系统的完整和安全性。", @@ -638,7 +602,7 @@ "config_unknown_filter_key": "该过滤器钥匙“{filter_key}”有误。", "diagnosis_apps_outdated_ynh_requirement": "此应用程序的安装 版本只需要 yunohost >= 2.x,这往往表明它与推荐的打包实践和帮助程序不是最新的。你真的应该考虑更新它。", "disk_space_not_sufficient_install": "没有足够的磁盘空间来安装此应用程序", - "config_apply_failed": "应用新配置 失败:{错误}", + "config_apply_failed": "应用新配置 失败:{error}", "config_cant_set_value_on_section": "无法在整个配置部分设置单个值 。", "config_validate_color": "是有效的 RGB 十六进制颜色", "config_validate_date": "有效日期格式为YYYY-MM-DD", @@ -651,4 +615,4 @@ "diagnosis_apps_deprecated_practices": "此应用程序的安装 版本仍然使用一些超旧的弃用打包原则。推荐您升级它。", "diagnosis_apps_issue": "发现应用{ app } 存在问题", "diagnosis_description_apps": "应用" -} +} \ No newline at end of file diff --git a/maintenance/autofix_locale_format.py b/maintenance/autofix_locale_format.py new file mode 100644 index 000000000..400704ddb --- /dev/null +++ b/maintenance/autofix_locale_format.py @@ -0,0 +1,169 @@ +import os +import re +import json +import glob +from collections import OrderedDict + +ROOT = os.path.dirname(__file__) + "/../" +LOCALE_FOLDER = ROOT + "/locales/" + +# List all locale files (except en.json being the ref) +TRANSLATION_FILES = glob.glob(LOCALE_FOLDER + "*.json") +TRANSLATION_FILES = [filename.split("/")[-1] for filename in TRANSLATION_FILES] +print(LOCALE_FOLDER) +TRANSLATION_FILES.remove("en.json") + +REFERENCE_FILE = LOCALE_FOLDER + "en.json" + + +def autofix_i18n_placeholders(): + def _autofix_i18n_placeholders(locale_file): + """ + This tries for magically fix mismatch between en.json format and other.json format + e.g. an i18n string with: + source: "Lorem ipsum {some_var}" + fr: "Lorem ipsum {une_variable}" + (ie the keyword in {} was translated but shouldnt have been) + """ + + this_locale = json.loads(open(LOCALE_FOLDER + locale_file).read()) + fixed_stuff = False + reference = json.loads(open(REFERENCE_FILE).read()) + + # We iterate over all keys/string in en.json + for key, string in reference.items(): + + # Ignore check if there's no translation yet for this key + if key not in this_locale: + continue + + # Then we check that every "{stuff}" (for python's .format()) + # should also be in the translated string, otherwise the .format + # will trigger an exception! + subkeys_in_ref = [k[0] for k in re.findall(r"{(\w+)(:\w)?}", string)] + subkeys_in_this_locale = [ + k[0] for k in re.findall(r"{(\w+)(:\w)?}", this_locale[key]) + ] + + if set(subkeys_in_ref) != set(subkeys_in_this_locale) and ( + len(subkeys_in_ref) == len(subkeys_in_this_locale) + ): + for i, subkey in enumerate(subkeys_in_ref): + this_locale[key] = this_locale[key].replace( + "{%s}" % subkeys_in_this_locale[i], "{%s}" % subkey + ) + fixed_stuff = True + + # Validate that now it's okay ? + subkeys_in_ref = [k[0] for k in re.findall(r"{(\w+)(:\w)?}", string)] + subkeys_in_this_locale = [ + k[0] for k in re.findall(r"{(\w+)(:\w)?}", this_locale[key]) + ] + if any(k not in subkeys_in_ref for k in subkeys_in_this_locale): + raise Exception("""\n +========================== +Format inconsistency for string {key} in {locale_file}:" +en.json -> {string} +{locale_file} -> {translated_string} +Please fix it manually ! + """.format( + key=key, + string=string.encode("utf-8"), + locale_file=locale_file, + translated_string=this_locale[key].encode("utf-8"), + )) + + if fixed_stuff: + json.dump( + this_locale, + open(LOCALE_FOLDER + locale_file, "w"), + indent=4, + ensure_ascii=False, + ) + + for locale_file in TRANSLATION_FILES: + _autofix_i18n_placeholders(locale_file) + + +def autofix_orthotypography_and_standardized_words(): + + def reformat(lang, transformations): + + locale = open(f"../locales/{lang}.json").read() + for pattern, replace in transformations.items(): + locale = re.compile(pattern).sub(replace, locale) + + open(f"../locales/{lang}.json", "w").write(locale) + + ###################################################### + + godamn_spaces_of_hell = [ + "\u00a0", + "\u2000", + "\u2001", + "\u2002", + "\u2003", + "\u2004", + "\u2005", + "\u2006", + "\u2007", + "\u2008", + "\u2009", + "\u200A", + "\u202f", + "\u202F", + "\u3000", + ] + + transformations = {s: " " for s in godamn_spaces_of_hell} + transformations.update( + { + "…": "...", + } + ) + + reformat("en", transformations) + + ###################################################### + + transformations.update( + { + "courriel": "email", + "e-mail": "email", + "Courriel": "Email", + "E-mail": "Email", + "« ": "'", + "«": "'", + " »": "'", + "»": "'", + "’": "'", + # r"$(\w{1,2})'|( \w{1,2})'": r"\1\2’", + } + ) + + reformat("fr", transformations) + + +def remove_stale_translated_strings(): + + reference = json.loads(open(LOCALE_FOLDER + "en.json").read()) + + for locale_file in TRANSLATION_FILES: + + print(locale_file) + this_locale = json.loads( + open(LOCALE_FOLDER + locale_file).read(), object_pairs_hook=OrderedDict + ) + this_locale_fixed = {k: v for k, v in this_locale.items() if k in reference} + + json.dump( + this_locale_fixed, + open(LOCALE_FOLDER + locale_file, "w"), + indent=4, + ensure_ascii=False, + ) + + +autofix_orthotypography_and_standardized_words() +remove_stale_translated_strings() +autofix_i18n_placeholders() diff --git a/maintenance/make_changelog.sh b/maintenance/make_changelog.sh new file mode 100644 index 000000000..038d4741d --- /dev/null +++ b/maintenance/make_changelog.sh @@ -0,0 +1,36 @@ +VERSION="?" +RELEASE="testing" +REPO=$(basename $(git rev-parse --show-toplevel)) +REPO_URL=$(git remote get-url origin) +ME=$(git config --global --get user.name) +EMAIL=$(git config --global --get user.email) + +LAST_RELEASE=$(git tag --list | grep debian | tail -n 1) + +echo "$REPO ($VERSION) $RELEASE; urgency=low" +echo "" + +git log $LAST_RELEASE.. -n 10000 --first-parent --pretty=tformat:' - %b%s (%h)' \ +| sed -E "s@Merge .*#([0-9]+).*\$@ \([#\1]\($REPO_URL/pull/\1\)\)@g" \ +| grep -v "Update from Weblate" \ +| tac + +TRANSLATIONS=$(git log $LAST_RELEASE... -n 10000 --pretty=format:"%s" \ + | grep "Translated using Weblate" \ + | sed -E "s/Translated using Weblate \((.*)\)/\1/g" \ + | sort | uniq | tr '\n' ', ' | sed -e 's/,$//g' -e 's/,/, /g') +[[ -z "$TRANSLATIONS" ]] || echo " - [i18n] Translations updated for $TRANSLATIONS" + +echo "" +CONTRIBUTORS=$(git logc $LAST_RELEASE... -n 10000 --pretty=format:"%an" \ + | sort | uniq | grep -v "$ME" \ + | tr '\n' ', ' | sed -e 's/,$//g' -e 's/,/, /g') +[[ -z "$CONTRIBUTORS" ]] || echo " Thanks to all contributors <3 ! ($CONTRIBUTORS)" +echo "" +echo " -- $ME <$EMAIL> $(date -R)" +echo "" + + + +# PR links can be converted to regular texts using : sed -E 's@\[(#[0-9]*)\]\([^ )]*\)@\1@g' +# Or readded with sed -E 's@#([0-9]*)@[YunoHost#\1](https://github.com/yunohost/yunohost/pull/\1)@g' | sed -E 's@\((\w+)\)@([YunoHost/\1](https://github.com/yunohost/yunohost/commit/\1))@g' diff --git a/tests/test_i18n_keys.py b/maintenance/missing_i18n_keys.py similarity index 71% rename from tests/test_i18n_keys.py rename to maintenance/missing_i18n_keys.py index ec582ba72..3dbca8027 100644 --- a/tests/test_i18n_keys.py +++ b/maintenance/missing_i18n_keys.py @@ -1,12 +1,17 @@ # -*- coding: utf-8 -*- +import toml import os import re import glob import json import yaml import subprocess -import toml +import sys + +ROOT = os.path.dirname(__file__) + "/../" +LOCALE_FOLDER = ROOT + "/locales/" +REFERENCE_FILE = LOCALE_FOLDER + "en.json" ############################################################################### # Find used keys in python code # @@ -25,12 +30,12 @@ def find_expected_string_keys(): p3 = re.compile(r"YunohostValidationError\(\n*\s*[\'\"](\w+)[\'\"]") p4 = re.compile(r"# i18n: [\'\"]?(\w+)[\'\"]?") - python_files = glob.glob("src/*.py") - python_files.extend(glob.glob("src/utils/*.py")) - python_files.extend(glob.glob("src/migrations/*.py")) - python_files.extend(glob.glob("src/authenticators/*.py")) - python_files.extend(glob.glob("src/diagnosers/*.py")) - python_files.append("bin/yunohost") + python_files = glob.glob(ROOT + "src/*.py") + python_files.extend(glob.glob(ROOT + "src/utils/*.py")) + python_files.extend(glob.glob(ROOT + "src/migrations/*.py")) + python_files.extend(glob.glob(ROOT + "src/authenticators/*.py")) + python_files.extend(glob.glob(ROOT + "src/diagnosers/*.py")) + python_files.append(ROOT + "bin/yunohost") for python_file in python_files: content = open(python_file).read() @@ -52,7 +57,9 @@ def find_expected_string_keys(): # For each diagnosis, try to find strings like "diagnosis_stuff_foo" (c.f. diagnosis summaries) # Also we expect to have "diagnosis_description_" for each diagnosis p3 = re.compile(r"[\"\'](diagnosis_[a-z]+_\w+)[\"\']") - for python_file in glob.glob("src/diagnosers/*.py"): + for python_file in glob.glob(ROOT + "src/diagnosers/*.py"): + if "__init__.py" in python_file: + continue content = open(python_file).read() for m in p3.findall(content): if m.endswith("_"): @@ -64,14 +71,14 @@ def find_expected_string_keys(): ] # For each migration, expect to find "migration_description_" - for path in glob.glob("src/migrations/*.py"): + for path in glob.glob(ROOT + "src/migrations/*.py"): if "__init__" in path: continue yield "migration_description_" + os.path.basename(path)[:-3] # For each default service, expect to find "service_description_" for service, info in yaml.safe_load( - open("conf/yunohost/services.yml") + open(ROOT + "conf/yunohost/services.yml") ).items(): if info is None: continue @@ -80,7 +87,7 @@ def find_expected_string_keys(): # For all unit operations, expect to find "log_" # A unit operation is created either using the @is_unit_operation decorator # or using OperationLogger( - cmd = "grep -hr '@is_unit_operation' src/ -A3 2>/dev/null | grep '^def' | sed -E 's@^def (\\w+)\\(.*@\\1@g'" + cmd = f"grep -hr '@is_unit_operation' {ROOT}/src/ -A3 2>/dev/null | grep '^def' | sed -E 's@^def (\\w+)\\(.*@\\1@g'" for funcname in ( subprocess.check_output(cmd, shell=True).decode("utf-8").strip().split("\n") ): @@ -95,14 +102,14 @@ def find_expected_string_keys(): # Global settings descriptions # Will be on a line like : ("service.ssh.allow_deprecated_dsa_hostkey", {"type": "bool", ... p5 = re.compile(r" \(\n*\s*[\"\'](\w[\w\.]+)[\"\'],") - content = open("src/settings.py").read() + content = open(ROOT + "src/settings.py").read() for m in ( "global_settings_setting_" + s.replace(".", "_") for s in p5.findall(content) ): yield m # Keys for the actionmap ... - for category in yaml.safe_load(open("share/actionsmap.yml")).values(): + for category in yaml.safe_load(open(ROOT + "share/actionsmap.yml")).values(): if "actions" not in category.keys(): continue for action in category["actions"].values(): @@ -130,13 +137,13 @@ def find_expected_string_keys(): yield "backup_applying_method_%s" % method yield "backup_method_%s_finished" % method - registrars = toml.load(open("share/registrar_list.toml")) + registrars = toml.load(open(ROOT + "share/registrar_list.toml")) supported_registrars = ["ovh", "gandi", "godaddy"] for registrar in supported_registrars: for key in registrars[registrar].keys(): yield f"domain_config_{key}" - domain_config = toml.load(open("share/config_domain.toml")) + domain_config = toml.load(open(ROOT + "share/config_domain.toml")) for panel in domain_config.values(): if not isinstance(panel, dict): continue @@ -149,41 +156,53 @@ def find_expected_string_keys(): yield f"domain_config_{key}" -############################################################################### -# Load en locale json keys # -############################################################################### - - -def keys_defined_for_en(): - return json.loads(open("locales/en.json").read()).keys() - - ############################################################################### # Compare keys used and keys defined # ############################################################################### +if len(sys.argv) <= 1 or sys.argv[1] not in ["--check", "--fix"]: + print("Please specify --check or --fix") + sys.exit(1) expected_string_keys = set(find_expected_string_keys()) -keys_defined = set(keys_defined_for_en()) +keys_defined_for_en = json.loads(open(REFERENCE_FILE).read()).keys() +keys_defined = set(keys_defined_for_en) +unused_keys = keys_defined.difference(expected_string_keys) +unused_keys = sorted(unused_keys) -def test_undefined_i18n_keys(): - undefined_keys = expected_string_keys.difference(keys_defined) - undefined_keys = sorted(undefined_keys) +undefined_keys = expected_string_keys.difference(keys_defined) +undefined_keys = sorted(undefined_keys) + +mode = sys.argv[1].strip("-") +if mode == "check": + + # Unused keys are not too problematic, will be automatically + # removed by the other autoreformat script, + # but still informative to display them + if unused_keys: + print( + "Those i18n keys appears unused:\n" " - " + "\n - ".join(unused_keys) + ) if undefined_keys: - raise Exception( + print( "Those i18n keys should be defined in en.json:\n" " - " + "\n - ".join(undefined_keys) ) + sys.exit(1) +elif mode == "fix": + j = json.loads(open(REFERENCE_FILE).read()) + for key in undefined_keys: + j[key] = "FIXME" + for key in unused_keys: + del j[key] -def test_unused_i18n_keys(): - - unused_keys = keys_defined.difference(expected_string_keys) - unused_keys = sorted(unused_keys) - - if unused_keys: - raise Exception( - "Those i18n keys appears unused:\n" " - " + "\n - ".join(unused_keys) - ) + json.dump( + j, + open(REFERENCE_FILE, "w"), + indent=4, + ensure_ascii=False, + sort_keys=True, + ) diff --git a/tests/add_missing_keys.py b/tests/add_missing_keys.py deleted file mode 100644 index ebee80a1b..000000000 --- a/tests/add_missing_keys.py +++ /dev/null @@ -1,193 +0,0 @@ -# -*- coding: utf-8 -*- - -import os -import re -import glob -import json -import yaml -import subprocess - -############################################################################### -# Find used keys in python code # -############################################################################### - - -def find_expected_string_keys(): - - # Try to find : - # m18n.n( "foo" - # YunohostError("foo" - # YunohostValidationError("foo" - # # i18n: foo - p1 = re.compile(r"m18n\.n\(\n*\s*[\"\'](\w+)[\"\']") - p2 = re.compile(r"YunohostError\(\n*\s*[\'\"](\w+)[\'\"]") - p3 = re.compile(r"YunohostValidationError\(\n*\s*[\'\"](\w+)[\'\"]") - p4 = re.compile(r"# i18n: [\'\"]?(\w+)[\'\"]?") - - python_files = glob.glob("src/*.py") - python_files.extend(glob.glob("src/utils/*.py")) - python_files.extend(glob.glob("src/migrations/*.py")) - python_files.extend(glob.glob("src/authenticators/*.py")) - python_files.extend(glob.glob("src/diagnosers/*.py")) - python_files.append("bin/yunohost") - - for python_file in python_files: - content = open(python_file).read() - for m in p1.findall(content): - if m.endswith("_"): - continue - yield m - for m in p2.findall(content): - if m.endswith("_"): - continue - yield m - for m in p3.findall(content): - if m.endswith("_"): - continue - yield m - for m in p4.findall(content): - yield m - - # For each diagnosis, try to find strings like "diagnosis_stuff_foo" (c.f. diagnosis summaries) - # Also we expect to have "diagnosis_description_" for each diagnosis - p3 = re.compile(r"[\"\'](diagnosis_[a-z]+_\w+)[\"\']") - for python_file in glob.glob("src/diagnosers/*.py"): - content = open(python_file).read() - for m in p3.findall(content): - if m.endswith("_"): - # Ignore some name fragments which are actually concatenated with other stuff.. - continue - yield m - yield "diagnosis_description_" + os.path.basename(python_file)[:-3].split("-")[ - -1 - ] - - # For each migration, expect to find "migration_description_" - for path in glob.glob("src/migrations/*.py"): - if "__init__" in path: - continue - yield "migration_description_" + os.path.basename(path)[:-3] - - # For each default service, expect to find "service_description_" - for service, info in yaml.safe_load( - open("conf/yunohost/services.yml") - ).items(): - if info is None: - continue - yield "service_description_" + service - - # For all unit operations, expect to find "log_" - # A unit operation is created either using the @is_unit_operation decorator - # or using OperationLogger( - cmd = "grep -hr '@is_unit_operation' src/ -A3 2>/dev/null | grep '^def' | sed -E 's@^def (\\w+)\\(.*@\\1@g'" - for funcname in ( - subprocess.check_output(cmd, shell=True).decode("utf-8").strip().split("\n") - ): - yield "log_" + funcname - - p4 = re.compile(r"OperationLogger\(\n*\s*[\"\'](\w+)[\"\']") - for python_file in python_files: - content = open(python_file).read() - for m in ("log_" + match for match in p4.findall(content)): - yield m - - # Global settings descriptions - # Will be on a line like : ("service.ssh.allow_deprecated_dsa_hostkey", {"type": "bool", ... - p5 = re.compile(r" \(\n*\s*[\"\'](\w[\w\.]+)[\"\'],") - content = open("src/settings.py").read() - for m in ( - "global_settings_setting_" + s.replace(".", "_") for s in p5.findall(content) - ): - yield m - - # Keys for the actionmap ... - for category in yaml.safe_load(open("share/actionsmap.yml")).values(): - if "actions" not in category.keys(): - continue - for action in category["actions"].values(): - if "arguments" not in action.keys(): - continue - for argument in action["arguments"].values(): - extra = argument.get("extra") - if not extra: - continue - if "password" in extra: - yield extra["password"] - if "ask" in extra: - yield extra["ask"] - if "comment" in extra: - yield extra["comment"] - if "pattern" in extra: - yield extra["pattern"][1] - if "help" in extra: - yield extra["help"] - - # Hardcoded expected keys ... - yield "admin_password" # Not sure that's actually used nowadays... - - for method in ["tar", "copy", "custom"]: - yield "backup_applying_method_%s" % method - yield "backup_method_%s_finished" % method - - for level in ["danger", "thirdparty", "warning"]: - yield "confirm_app_install_%s" % level - - for errortype in ["not_found", "error", "warning", "success", "not_found_details"]: - yield "diagnosis_domain_expiration_%s" % errortype - yield "diagnosis_domain_not_found_details" - - for errortype in ["bad_status_code", "connection_error", "timeout"]: - yield "diagnosis_http_%s" % errortype - - yield "password_listed" - for i in [1, 2, 3, 4]: - yield "password_too_simple_%s" % i - - checks = [ - "outgoing_port_25_ok", - "ehlo_ok", - "fcrdns_ok", - "blacklist_ok", - "queue_ok", - "ehlo_bad_answer", - "ehlo_unreachable", - "ehlo_bad_answer_details", - "ehlo_unreachable_details", - ] - for check in checks: - yield "diagnosis_mail_%s" % check - - -############################################################################### -# Load en locale json keys # -############################################################################### - - -def keys_defined_for_en(): - return json.loads(open("locales/en.json").read()).keys() - - -############################################################################### -# Compare keys used and keys defined # -############################################################################### - - -expected_string_keys = set(find_expected_string_keys()) -keys_defined = set(keys_defined_for_en()) - - -undefined_keys = expected_string_keys.difference(keys_defined) -undefined_keys = sorted(undefined_keys) - - -j = json.loads(open("locales/en.json").read()) -for key in undefined_keys: - j[key] = "FIXME" - -json.dump( - j, - open("locales/en.json", "w"), - indent=4, - ensure_ascii=False, - sort_keys=True, -) diff --git a/tests/autofix_locale_format.py b/tests/autofix_locale_format.py deleted file mode 100644 index f3825bd30..000000000 --- a/tests/autofix_locale_format.py +++ /dev/null @@ -1,53 +0,0 @@ -import re -import json -import glob - -# List all locale files (except en.json being the ref) -locale_folder = "../locales/" -locale_files = glob.glob(locale_folder + "*.json") -locale_files = [filename.split("/")[-1] for filename in locale_files] -locale_files.remove("en.json") - -reference = json.loads(open(locale_folder + "en.json").read()) - - -def fix_locale(locale_file): - - this_locale = json.loads(open(locale_folder + locale_file).read()) - fixed_stuff = False - - # We iterate over all keys/string in en.json - for key, string in reference.items(): - - # Ignore check if there's no translation yet for this key - if key not in this_locale: - continue - - # Then we check that every "{stuff}" (for python's .format()) - # should also be in the translated string, otherwise the .format - # will trigger an exception! - subkeys_in_ref = [k[0] for k in re.findall(r"{(\w+)(:\w)?}", string)] - subkeys_in_this_locale = [ - k[0] for k in re.findall(r"{(\w+)(:\w)?}", this_locale[key]) - ] - - if set(subkeys_in_ref) != set(subkeys_in_this_locale) and ( - len(subkeys_in_ref) == len(subkeys_in_this_locale) - ): - for i, subkey in enumerate(subkeys_in_ref): - this_locale[key] = this_locale[key].replace( - "{%s}" % subkeys_in_this_locale[i], "{%s}" % subkey - ) - fixed_stuff = True - - if fixed_stuff: - json.dump( - this_locale, - open(locale_folder + locale_file, "w"), - indent=4, - ensure_ascii=False, - ) - - -for locale_file in locale_files: - fix_locale(locale_file) diff --git a/tests/reformat_locales.py b/tests/reformat_locales.py deleted file mode 100644 index 86c2664d7..000000000 --- a/tests/reformat_locales.py +++ /dev/null @@ -1,60 +0,0 @@ -import re - - -def reformat(lang, transformations): - - locale = open(f"../locales/{lang}.json").read() - for pattern, replace in transformations.items(): - locale = re.compile(pattern).sub(replace, locale) - - open(f"../locales/{lang}.json", "w").write(locale) - - -###################################################### - -godamn_spaces_of_hell = [ - "\u00a0", - "\u2000", - "\u2001", - "\u2002", - "\u2003", - "\u2004", - "\u2005", - "\u2006", - "\u2007", - "\u2008", - "\u2009", - "\u200A", - "\u202f", - "\u202F", - "\u3000", -] - -transformations = {s: " " for s in godamn_spaces_of_hell} -transformations.update( - { - "…": "...", - } -) - - -reformat("en", transformations) - -###################################################### - -transformations.update( - { - "courriel": "email", - "e-mail": "email", - "Courriel": "Email", - "E-mail": "Email", - "« ": "'", - "«": "'", - " »": "'", - "»": "'", - "’": "'", - # r"$(\w{1,2})'|( \w{1,2})'": r"\1\2’", - } -) - -reformat("fr", transformations) diff --git a/tests/remove_stale_translated_strings.py b/tests/remove_stale_translated_strings.py deleted file mode 100644 index 48f2180e4..000000000 --- a/tests/remove_stale_translated_strings.py +++ /dev/null @@ -1,25 +0,0 @@ -import json -import glob -from collections import OrderedDict - -locale_folder = "../locales/" -locale_files = glob.glob(locale_folder + "*.json") -locale_files = [filename.split("/")[-1] for filename in locale_files] -locale_files.remove("en.json") - -reference = json.loads(open(locale_folder + "en.json").read()) - -for locale_file in locale_files: - - print(locale_file) - this_locale = json.loads( - open(locale_folder + locale_file).read(), object_pairs_hook=OrderedDict - ) - this_locale_fixed = {k: v for k, v in this_locale.items() if k in reference} - - json.dump( - this_locale_fixed, - open(locale_folder + locale_file, "w"), - indent=4, - ensure_ascii=False, - ) diff --git a/tests/test_translation_format_consistency.py b/tests/test_translation_format_consistency.py deleted file mode 100644 index 86d1c3279..000000000 --- a/tests/test_translation_format_consistency.py +++ /dev/null @@ -1,52 +0,0 @@ -import re -import json -import glob -import pytest - -# List all locale files (except en.json being the ref) -locale_folder = "locales/" -locale_files = glob.glob(locale_folder + "*.json") -locale_files = [filename.split("/")[-1] for filename in locale_files] -locale_files.remove("en.json") - -reference = json.loads(open(locale_folder + "en.json").read()) - - -def find_inconsistencies(locale_file): - - this_locale = json.loads(open(locale_folder + locale_file).read()) - - # We iterate over all keys/string in en.json - for key, string in reference.items(): - - # Ignore check if there's no translation yet for this key - if key not in this_locale: - continue - - # Then we check that every "{stuff}" (for python's .format()) - # should also be in the translated string, otherwise the .format - # will trigger an exception! - subkeys_in_ref = set(k[0] for k in re.findall(r"{(\w+)(:\w)?}", string)) - subkeys_in_this_locale = set( - k[0] for k in re.findall(r"{(\w+)(:\w)?}", this_locale[key]) - ) - - if any(k not in subkeys_in_ref for k in subkeys_in_this_locale): - yield """\n -========================== -Format inconsistency for string {key} in {locale_file}:" -en.json -> {string} -{locale_file} -> {translated_string} -""".format( - key=key, - string=string.encode("utf-8"), - locale_file=locale_file, - translated_string=this_locale[key].encode("utf-8"), - ) - - -@pytest.mark.parametrize("locale_file", locale_files) -def test_translation_format_consistency(locale_file): - inconsistencies = list(find_inconsistencies(locale_file)) - if inconsistencies: - raise Exception("".join(inconsistencies)) From d831ccef4c5ea561d82cd09c19be183b080647de Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 28 Nov 2021 16:24:13 +0100 Subject: [PATCH 134/146] ci: Try to fix mypy --- src/diagnosers/00-basesystem.py | 3 ++- src/diagnosers/10-ip.py | 3 ++- src/diagnosers/12-dnsrecords.py | 5 +++-- src/diagnosers/14-ports.py | 3 ++- src/diagnosers/21-web.py | 3 ++- src/diagnosers/24-mail.py | 3 ++- src/diagnosers/30-services.py | 3 ++- src/diagnosers/50-systemresources.py | 3 ++- src/diagnosers/70-regenconf.py | 3 ++- src/diagnosers/80-apps.py | 3 ++- 10 files changed, 21 insertions(+), 11 deletions(-) diff --git a/src/diagnosers/00-basesystem.py b/src/diagnosers/00-basesystem.py index 0ef1a5197..104fa698e 100644 --- a/src/diagnosers/00-basesystem.py +++ b/src/diagnosers/00-basesystem.py @@ -3,6 +3,7 @@ import os import json import subprocess +from typing import List from moulinette.utils import log from moulinette.utils.process import check_output @@ -17,7 +18,7 @@ class MyDiagnoser(Diagnoser): id_ = os.path.splitext(os.path.basename(__file__))[0].split("-")[1] cache_duration = 600 - dependencies = [] + dependencies: List[str] = [] def run(self): diff --git a/src/diagnosers/10-ip.py b/src/diagnosers/10-ip.py index 4ad4cfbfc..d495e3277 100644 --- a/src/diagnosers/10-ip.py +++ b/src/diagnosers/10-ip.py @@ -3,6 +3,7 @@ import re import os import random +from typing import List from moulinette.utils import log from moulinette.utils.network import download_text @@ -19,7 +20,7 @@ class MyDiagnoser(Diagnoser): id_ = os.path.splitext(os.path.basename(__file__))[0].split("-")[1] cache_duration = 600 - dependencies = [] + dependencies: List[str] = [] def run(self): diff --git a/src/diagnosers/12-dnsrecords.py b/src/diagnosers/12-dnsrecords.py index 305fda79b..85f70ca44 100644 --- a/src/diagnosers/12-dnsrecords.py +++ b/src/diagnosers/12-dnsrecords.py @@ -2,7 +2,7 @@ import os import re - +from typing import List from datetime import datetime, timedelta from publicsuffix2 import PublicSuffixList @@ -21,11 +21,12 @@ from yunohost.dns import _build_dns_conf, _get_dns_zone_for_domain logger = log.getActionLogger("yunohost.diagnosis") + class MyDiagnoser(Diagnoser): id_ = os.path.splitext(os.path.basename(__file__))[0].split("-")[1] cache_duration = 600 - dependencies = ["ip"] + dependencies: List[str] = ["ip"] def run(self): diff --git a/src/diagnosers/14-ports.py b/src/diagnosers/14-ports.py index e339a946c..be172e524 100644 --- a/src/diagnosers/14-ports.py +++ b/src/diagnosers/14-ports.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +from typing import List from yunohost.diagnosis import Diagnoser from yunohost.service import _get_services @@ -10,7 +11,7 @@ class MyDiagnoser(Diagnoser): id_ = os.path.splitext(os.path.basename(__file__))[0].split("-")[1] cache_duration = 600 - dependencies = ["ip"] + dependencies: List[str] = ["ip"] def run(self): diff --git a/src/diagnosers/21-web.py b/src/diagnosers/21-web.py index 3d9fb9f73..584505ad1 100644 --- a/src/diagnosers/21-web.py +++ b/src/diagnosers/21-web.py @@ -3,6 +3,7 @@ import os import random import requests +from typing import List from moulinette.utils.filesystem import read_file @@ -17,7 +18,7 @@ class MyDiagnoser(Diagnoser): id_ = os.path.splitext(os.path.basename(__file__))[0].split("-")[1] cache_duration = 600 - dependencies = ["ip"] + dependencies: List[str] = ["ip"] def run(self): diff --git a/src/diagnosers/24-mail.py b/src/diagnosers/24-mail.py index c4df3ca54..7fe7a08db 100644 --- a/src/diagnosers/24-mail.py +++ b/src/diagnosers/24-mail.py @@ -3,6 +3,7 @@ import os import dns.resolver import re +from typing import List from subprocess import CalledProcessError @@ -24,7 +25,7 @@ class MyDiagnoser(Diagnoser): id_ = os.path.splitext(os.path.basename(__file__))[0].split("-")[1] cache_duration = 600 - dependencies = ["ip"] + dependencies: List[str] = ["ip"] def run(self): diff --git a/src/diagnosers/30-services.py b/src/diagnosers/30-services.py index daf86ab1e..f09688911 100644 --- a/src/diagnosers/30-services.py +++ b/src/diagnosers/30-services.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +from typing import List from yunohost.diagnosis import Diagnoser from yunohost.service import service_status @@ -10,7 +11,7 @@ class MyDiagnoser(Diagnoser): id_ = os.path.splitext(os.path.basename(__file__))[0].split("-")[1] cache_duration = 300 - dependencies = [] + dependencies: List[str] = [] def run(self): diff --git a/src/diagnosers/50-systemresources.py b/src/diagnosers/50-systemresources.py index 265e62acb..d259e7713 100644 --- a/src/diagnosers/50-systemresources.py +++ b/src/diagnosers/50-systemresources.py @@ -3,6 +3,7 @@ import os import psutil import datetime import re +from typing import List from moulinette.utils.process import check_output @@ -13,7 +14,7 @@ class MyDiagnoser(Diagnoser): id_ = os.path.splitext(os.path.basename(__file__))[0].split("-")[1] cache_duration = 300 - dependencies = [] + dependencies: List[str] = [] def run(self): diff --git a/src/diagnosers/70-regenconf.py b/src/diagnosers/70-regenconf.py index 63f6f2b32..591f883a4 100644 --- a/src/diagnosers/70-regenconf.py +++ b/src/diagnosers/70-regenconf.py @@ -2,6 +2,7 @@ import os import re +from typing import List from yunohost.settings import settings_get from yunohost.diagnosis import Diagnoser @@ -13,7 +14,7 @@ class MyDiagnoser(Diagnoser): id_ = os.path.splitext(os.path.basename(__file__))[0].split("-")[1] cache_duration = 300 - dependencies = [] + dependencies: List[str] = [] def run(self): diff --git a/src/diagnosers/80-apps.py b/src/diagnosers/80-apps.py index e62acaa1f..56e45f831 100644 --- a/src/diagnosers/80-apps.py +++ b/src/diagnosers/80-apps.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +from typing import List from yunohost.app import app_list @@ -11,7 +12,7 @@ class MyDiagnoser(Diagnoser): id_ = os.path.splitext(os.path.basename(__file__))[0].split("-")[1] cache_duration = 300 - dependencies = [] + dependencies: List[str] = [] def run(self): From c6df391a9af7dcc7f79a6c44d7c6b1a001054e30 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 28 Nov 2021 16:29:45 +0100 Subject: [PATCH 135/146] ci: Oopsies --- .gitlab/ci/translation.gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab/ci/translation.gitlab-ci.yml b/.gitlab/ci/translation.gitlab-ci.yml index 159dc7aa0..8daa4f473 100644 --- a/.gitlab/ci/translation.gitlab-ci.yml +++ b/.gitlab/ci/translation.gitlab-ci.yml @@ -2,6 +2,7 @@ # TRANSLATION ######################################## test-i18n-keys: + stage: translation script: - python3 maintenance/missing_i18n_keys --check only: From 73da37f152e545744fbb52ad7efb905833d05339 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 30 Nov 2021 20:46:43 +0100 Subject: [PATCH 136/146] Attempt to fix the weird selfsigned certificate generation error --- hooks/conf_regen/02-ssl | 17 ++++++----------- src/certificate.py | 2 +- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/hooks/conf_regen/02-ssl b/hooks/conf_regen/02-ssl index a824c91f8..eded92854 100755 --- a/hooks/conf_regen/02-ssl +++ b/hooks/conf_regen/02-ssl @@ -6,7 +6,7 @@ ssl_dir="/usr/share/yunohost/ssl" ynh_ca="/etc/yunohost/certs/yunohost.org/ca.pem" ynh_crt="/etc/yunohost/certs/yunohost.org/crt.pem" ynh_key="/etc/yunohost/certs/yunohost.org/key.pem" -openssl_conf="/usr/share/yunohost/conf/ssl/openssl.cnf" +template_dir="/usr/share/yunohost/conf/ssl/" regen_local_ca() { @@ -26,7 +26,7 @@ regen_local_ca() { RANDFILE=.rnd openssl rand -hex 19 >serial rm -f index.txt touch index.txt - cp /usr/share/yunohost/conf/ssl/openssl.cnf openssl.ca.cnf + cp ${template_dir}/openssl.cnf openssl.ca.cnf sed -i "s/yunohost.org/${domain}/g" openssl.ca.cnf openssl req -x509 \ -new \ @@ -57,7 +57,7 @@ do_init_regen() { # Make sure this conf exists mkdir -p ${ssl_dir} - cp /usr/share/yunohost/conf/ssl/openssl.cnf ${ssl_dir}/openssl.ca.cnf + install -D -m 644 ${template_dir}/openssl.cnf "${ssl_dir}/openssl.cnf" # create default certificates if [[ ! -f "$ynh_ca" ]]; then @@ -68,14 +68,13 @@ do_init_regen() { echo -e "\n# Creating initial key and certificate \n" >>$LOGFILE openssl req -new \ - -config "$openssl_conf" \ - -days 730 \ + -config "${ssl_dir}/openssl.cnf" \ -out "${ssl_dir}/certs/yunohost_csr.pem" \ -keyout "${ssl_dir}/certs/yunohost_key.pem" \ -nodes -batch &>>$LOGFILE openssl ca \ - -config "$openssl_conf" \ + -config "${ssl_dir}/openssl.cnf" \ -days 730 \ -in "${ssl_dir}/certs/yunohost_csr.pem" \ -out "${ssl_dir}/certs/yunohost_crt.pem" \ @@ -92,16 +91,12 @@ do_init_regen() { chown -R root:ssl-cert /etc/yunohost/certs/yunohost.org/ chmod o-rwx /etc/yunohost/certs/yunohost.org/ - - install -D -m 644 $openssl_conf "${ssl_dir}/openssl.cnf" } do_pre_regen() { pending_dir=$1 - cd /usr/share/yunohost/conf/ssl - - install -D -m 644 openssl.cnf "${pending_dir}/${ssl_dir}/openssl.cnf" + install -D -m 644 $template_dir/openssl.cnf "${pending_dir}/${ssl_dir}/openssl.cnf" } do_post_regen() { diff --git a/src/certificate.py b/src/certificate.py index 46aa9c818..724d9b62e 100644 --- a/src/certificate.py +++ b/src/certificate.py @@ -181,7 +181,7 @@ def _certificate_install_selfsigned(domain_list, force=False): # Use OpenSSL command line to create a certificate signing request, # and self-sign the cert commands = [ - "openssl req -new -config %s -days 3650 -out %s -keyout %s -nodes -batch" + "openssl req -new -config %s -out %s -keyout %s -nodes -batch" % (conf_file, csr_file, key_file), "openssl ca -config %s -days 3650 -in %s -out %s -batch" % (conf_file, csr_file, crt_file), From 76075909c9164e316a64bbd130223f78cb43520f Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 30 Nov 2021 21:29:11 +0100 Subject: [PATCH 137/146] Moar attempt to fix ssl cert generation + automigrate legacy + enforce sensible permissions --- hooks/conf_regen/01-yunohost | 2 -- hooks/conf_regen/02-ssl | 22 ++++++++++++++++++---- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/hooks/conf_regen/01-yunohost b/hooks/conf_regen/01-yunohost index e2924bd6d..d30d77ace 100755 --- a/hooks/conf_regen/01-yunohost +++ b/hooks/conf_regen/01-yunohost @@ -184,8 +184,6 @@ do_post_regen() { find /etc/cron.d/yunohost-* -type f -exec chmod 644 {} \; find /etc/cron.*/yunohost-* -type f -exec chown root:root {} \; - chmod 750 /usr/share/yunohost/ssl - chown root:root /var/cache/yunohost chmod 700 /var/cache/yunohost diff --git a/hooks/conf_regen/02-ssl b/hooks/conf_regen/02-ssl index eded92854..a50e51187 100755 --- a/hooks/conf_regen/02-ssl +++ b/hooks/conf_regen/02-ssl @@ -3,10 +3,10 @@ set -e ssl_dir="/usr/share/yunohost/ssl" +template_dir="/usr/share/yunohost/conf/ssl/" ynh_ca="/etc/yunohost/certs/yunohost.org/ca.pem" ynh_crt="/etc/yunohost/certs/yunohost.org/crt.pem" ynh_key="/etc/yunohost/certs/yunohost.org/key.pem" -template_dir="/usr/share/yunohost/conf/ssl/" regen_local_ca() { @@ -56,7 +56,7 @@ do_init_regen() { chmod 640 $LOGFILE # Make sure this conf exists - mkdir -p ${ssl_dir} + mkdir -p ${ssl_dir}/{ca,certs,crl,newcerts} install -D -m 644 ${template_dir}/openssl.cnf "${ssl_dir}/openssl.cnf" # create default certificates @@ -104,12 +104,26 @@ do_post_regen() { current_local_ca_domain=$(openssl x509 -in $ynh_ca -text | tr ',' '\n' | grep Issuer | awk '{print $4}') main_domain=$(cat /etc/yunohost/current_host) + + # Automigrate legacy folder + if [ -e /usr/share/yunohost/yunohost-config/ssl/yunoCA ] + then + mv /usr/share/yunohost/yunohost-config/ssl/yunoCA/* ${ssl_dir} + rm -rf /usr/share/yunohost/yunohost-config + fi + + mkdir -p ${ssl_dir}/{ca,certs,crl,newcerts} + chown root:root ${ssl_dir} + chmod 750 ${ssl_dir} + chmod -R o-rwx ${ssl_dir} + chmod o+x ${ssl_dir}/certs + chmod o+r ${ssl_dir}/certs/yunohost_crt.pem if [[ "$current_local_ca_domain" != "$main_domain" ]]; then regen_local_ca $main_domain # Idk how useful this is, but this was in the previous python code (domain.main_domain()) - ln -sf /etc/yunohost/certs/$domain/crt.pem /etc/ssl/certs/yunohost_crt.pem - ln -sf /etc/yunohost/certs/$domain/key.pem /etc/ssl/private/yunohost_key.pem + ln -sf /etc/yunohost/certs/$main_domain/crt.pem /etc/ssl/certs/yunohost_crt.pem + ln -sf /etc/yunohost/certs/$main_domain/key.pem /etc/ssl/private/yunohost_key.pem fi } From 34b7e667a774376a888f57867b20c2ee84ad596c Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 30 Nov 2021 23:25:25 +0100 Subject: [PATCH 138/146] Aaaaand try again to fix certificate generation --- hooks/conf_regen/02-ssl | 3 +++ src/certificate.py | 12 +++--------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/hooks/conf_regen/02-ssl b/hooks/conf_regen/02-ssl index a50e51187..e98c70c6e 100755 --- a/hooks/conf_regen/02-ssl +++ b/hooks/conf_regen/02-ssl @@ -110,6 +110,9 @@ do_post_regen() { then mv /usr/share/yunohost/yunohost-config/ssl/yunoCA/* ${ssl_dir} rm -rf /usr/share/yunohost/yunohost-config + # Overwrite openssl.cnf because it may still contain references to the old yunoCA dir + rm -f ${ssl_dir}/openssl.ca.cnf + install -D -m 644 ${template_dir}/openssl.cnf "${ssl_dir}/openssl.cnf" fi mkdir -p ${ssl_dir}/{ca,certs,crl,newcerts} diff --git a/src/certificate.py b/src/certificate.py index 724d9b62e..86a63a996 100644 --- a/src/certificate.py +++ b/src/certificate.py @@ -143,11 +143,7 @@ def _certificate_install_selfsigned(domain_list, force=False): # Paths of files and folder we'll need date_tag = datetime.utcnow().strftime("%Y%m%d.%H%M%S") - new_cert_folder = "%s/%s-history/%s-selfsigned" % ( - CERT_FOLDER, - domain, - date_tag, - ) + new_cert_folder = f"{CERT_FOLDER}/{domain}-history/{date_tag}-selfsigned" conf_template = os.path.join(SSL_DIR, "openssl.cnf") @@ -181,10 +177,8 @@ def _certificate_install_selfsigned(domain_list, force=False): # Use OpenSSL command line to create a certificate signing request, # and self-sign the cert commands = [ - "openssl req -new -config %s -out %s -keyout %s -nodes -batch" - % (conf_file, csr_file, key_file), - "openssl ca -config %s -days 3650 -in %s -out %s -batch" - % (conf_file, csr_file, crt_file), + f"openssl req -new -config {conf_file} -out {csr_file} -keyout {key_file} -nodes -batch", + f"openssl ca -config {conf_file} -days 3650 -in {csr_file} -out {crt_file} -batch", ] for command in commands: From 9488b419c3facda0dddd9c00a6d6960420a7fa90 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 1 Dec 2021 00:24:31 +0100 Subject: [PATCH 139/146] Having an openssl.ca.cnf is needed to create domains --- hooks/conf_regen/02-ssl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hooks/conf_regen/02-ssl b/hooks/conf_regen/02-ssl index e98c70c6e..1aaab59d1 100755 --- a/hooks/conf_regen/02-ssl +++ b/hooks/conf_regen/02-ssl @@ -111,8 +111,9 @@ do_post_regen() { mv /usr/share/yunohost/yunohost-config/ssl/yunoCA/* ${ssl_dir} rm -rf /usr/share/yunohost/yunohost-config # Overwrite openssl.cnf because it may still contain references to the old yunoCA dir - rm -f ${ssl_dir}/openssl.ca.cnf install -D -m 644 ${template_dir}/openssl.cnf "${ssl_dir}/openssl.cnf" + install -D -m 644 ${template_dir}/openssl.cnf "${ssl_dir}/openssl.ca.cnf" + sed -i "s/yunohost.org/${main_domain}/g" openssl.ca.cnf fi mkdir -p ${ssl_dir}/{ca,certs,crl,newcerts} From 8feb63be0c93ffd881d9863764d7cee417792672 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 1 Dec 2021 18:37:59 +0100 Subject: [PATCH 140/146] Tweak definition of self-signed cert to cover cases where issuer is not the current main domain anymore --- src/certificate.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/certificate.py b/src/certificate.py index 86a63a996..c89d2e312 100644 --- a/src/certificate.py +++ b/src/certificate.py @@ -664,6 +664,8 @@ def _prepare_certificate_signing_request(domain, key_file, output_folder): def _get_status(domain): + import yunohost.domain + cert_file = os.path.join(CERT_FOLDER, domain, "crt.pem") if not os.path.isfile(cert_file): @@ -692,7 +694,7 @@ def _get_status(domain): ) days_remaining = (valid_up_to - datetime.utcnow()).days - if cert_issuer == "yunohost.org" or cert_issuer == _name_self_CA(): + if cert_issuer in ["yunohost.org"] + yunohost.domain.domain_list()["domains"]: CA_type = { "code": "self-signed", "verbose": "Self-signed", From 6622a9f2647ec9f3a5f30a2fc2cbb1cd3769d3a4 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 1 Dec 2021 19:08:16 +0100 Subject: [PATCH 141/146] Typo in conf/yunohost/services.yml ? --- conf/yunohost/services.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/yunohost/services.yml b/conf/yunohost/services.yml index ed92ac47c..45621876e 100644 --- a/conf/yunohost/services.yml +++ b/conf/yunohost/services.yml @@ -75,6 +75,6 @@ spamassassin: null rmilter: null php5-fpm: null php7.0-fpm: null -php7.3-fpm: +php7.3-fpm: null nslcd: null avahi-daemon: null From 55937a933e0854f043527c7b35b28a3004525ae8 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 1 Dec 2021 19:44:42 +0100 Subject: [PATCH 142/146] Typo --- src/yunohost/tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/yunohost/tools.py b/src/yunohost/tools.py index ef84d98bd..32e02413b 100644 --- a/src/yunohost/tools.py +++ b/src/yunohost/tools.py @@ -534,7 +534,7 @@ def tools_upgrade( # Prepare dist-upgrade command dist_upgrade = "DEBIAN_FRONTEND=noninteractive" if Moulinette.interface.type == "api": - dist_upgrade += "YUNOHOST_API_RESTART_WILL_BE_HANDLED_BY_YUNOHOST=yes" + dist_upgrade += " YUNOHOST_API_RESTART_WILL_BE_HANDLED_BY_YUNOHOST=yes" dist_upgrade += " APT_LISTCHANGES_FRONTEND=none" dist_upgrade += " apt-get" dist_upgrade += ( From 94ac15e4de00aa9450e4cab08c9fc1d68adf304c Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 1 Dec 2021 19:53:28 +0100 Subject: [PATCH 143/146] Update changelog for 11.0.1~alpha / bullseye alpha --- debian/changelog | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index b90838102..78023c71e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,26 @@ -yunohost (11.0.0~alpha) unstable; urgency=low +yunohost (11.0.1~alpha) unstable; urgency=low - - Placeholder for 11.0 + - [mod] Various tweaks for Python 3.9, PHP 7.4, and other changes related to Buster->Bullseye ecosystem + - [mod] quality: Rework repository code architecture ([#1377](https://github.com/YunoHost/yunohost/pull/1377)) + - [mod] quality: Rework where yunohost files are deployed (yunohost now a proper python lib with files in /usr/lib/python3/dist-packages/yunohost/, and other files are in /usr/share/yunohost) ([#1377](https://github.com/YunoHost/yunohost/pull/1377)) + - [mod] debian: Moved mysql, php, and metronome from Depends to Recommends ([#1369](https://github.com/YunoHost/yunohost/pull/1369)) + - [mod] apt: Add sury by default ([#1369](https://github.com/YunoHost/yunohost/pull/1369)) + - [enh] regenconf/helpers: Better integration for postgresql ([#1369](https://github.com/YunoHost/yunohost/pull/1369)) + - [enh] mysql: Drop super old mysql config, now rely on Debian default's one ([44c972f...144126f](https://github.com/YunoHost/yunohost/compare/44c972f2dd65...144126f56a3d)) + - [enh] upgrade: Try to implement a smarter self-upgrade mechanism to prevent/limit API downtime and related UX issues ([#1374](https://github.com/YunoHost/yunohost/pull/1374)) + - [mod] app: During app scripts (and all stuff run in hook_exec), do not inject the HOME variable if it exists. This aims to prevent inconsistencies between CLI (where HOME usually is defined) and API (where HOME doesnt exists) (f43e567b) + - [mod] quality: Cleanup legacy stuff + - Drop `--other_vars` options in ynh_add_fail2ban_config and systemd_config helpers + - Drop deprecated/superold `ynh_bind_or_cp`, `ynh_mkdir_tmp`, `ynh_get_plain_key` helpers + - Drop obsolete `yunohost-reset-ldap-password` command + - Drop obsolete `yunohost dyndns installcron` and `removecron` commands + - Drop deprecated `yunohost service regen-conf` command (see `tools regen-conf` instead) + - Drop deprecated `yunohost app fetchlist` command + - Drop obsolete `yunohost app add/remove/clearaccess` commands + - Drop depcreated `--list` and `--filter` options in `yunohost app list` + - Drop deprecated `--apps` and `--system` options in `yunohost tools update/upgrade` (no double dashes anymore) + - Drop deprecated `--status` and `--log_type` options in `yunohost service add` + - Drop deprecated `--mail` option in `yunohost user create` -- Alexandre Aubin Fri, 05 Feb 2021 00:02:38 +0100 From bc71e18cba713164dc6b2b6c59033f21cb2ecda1 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 1 Dec 2021 20:33:48 +0100 Subject: [PATCH 144/146] Aleks broke everything again /o\ --- debian/rules | 6 ------ 1 file changed, 6 deletions(-) diff --git a/debian/rules b/debian/rules index 8c9bc5976..5527d8703 100755 --- a/debian/rules +++ b/debian/rules @@ -12,9 +12,3 @@ override_dh_auto_build: override_dh_installinit: dh_installinit -pyunohost --name=yunohost-api --noscripts dh_installinit -pyunohost --name=yunohost-firewall --noscripts - -override_dh_systemd_enable: - dh_systemd_enable --name=yunohost-api \ - yunohost-api.service - dh_systemd_enable --name=yunohost-firewall --no-enable \ - yunohost-firewall.service From 613fc67bd1a1d1feb2133cd172c2df41590f7836 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 1 Dec 2021 20:35:51 +0100 Subject: [PATCH 145/146] Fix i18n strings --- locales/en.json | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/locales/en.json b/locales/en.json index f720af34e..fc4e4283a 100644 --- a/locales/en.json +++ b/locales/en.json @@ -648,13 +648,8 @@ "system_upgraded": "System upgraded", "system_username_exists": "Username already exists in the list of system users", "this_action_broke_dpkg": "This action broke dpkg/APT (the system package managers)... You can try to solve this issue by connecting through SSH and running `sudo apt install --fix-broken` and/or `sudo dpkg --configure -a`.", - "tools_upgrade_cant_hold_critical_packages": "Could not hold critical packages...", - "tools_upgrade_cant_unhold_critical_packages": "Could not unhold critical packages...", - "tools_upgrade_regular_packages": "Now upgrading 'regular' (non-yunohost-related) packages...", - "tools_upgrade_regular_packages_failed": "Could not upgrade packages: {packages_list}", - "tools_upgrade_special_packages": "Now upgrading 'special' (yunohost-related) packages...", - "tools_upgrade_special_packages_completed": "YunoHost package upgrade completed.\nPress [Enter] to get the command line back", - "tools_upgrade_special_packages_explanation": "The special upgrade will continue in the background. Please don't start any other actions on your server for the next ~10 minutes (depending on hardware speed). After this, you may have to re-log in to the webadmin. The upgrade log will be available in Tools → Log (in the webadmin) or using 'yunohost log list' (from the command-line).", + "tools_upgrade": "Upgrading system packages", + "tools_upgrade_failed": "Could not upgrade packages: {packages_list}", "unbackup_app": "{app} will not be saved", "unexpected_error": "Something unexpected went wrong: {error}", "unknown_main_domain_path": "Unknown domain or path for '{app}'. You need to specify a domain and a path to be able to specify a URL for permission.", @@ -690,4 +685,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 - adding a first user through the 'Users' section of the webadmin (or 'yunohost user create ' in command-line);\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 +} From 8eaa7012309d4a9a58bbadf17274b0dca5ce050f Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 1 Dec 2021 21:06:53 +0100 Subject: [PATCH 146/146] Fuckit I don't understand how to properly manage systemctl service with debian files while having flexibility on when the api restart happens, let's manage everything with the regen conf --- {debian => conf/yunohost}/yunohost-api.service | 4 +--- .../yunohost}/yunohost-firewall.service | 0 debian/rules | 4 ---- debian/yunohost-api.default | 4 ---- hooks/conf_regen/01-yunohost | 14 ++++++++++++++ 5 files changed, 15 insertions(+), 11 deletions(-) rename {debian => conf/yunohost}/yunohost-api.service (59%) rename {debian => conf/yunohost}/yunohost-firewall.service (100%) delete mode 100644 debian/yunohost-api.default diff --git a/debian/yunohost-api.service b/conf/yunohost/yunohost-api.service similarity index 59% rename from debian/yunohost-api.service rename to conf/yunohost/yunohost-api.service index 850255127..aa429ec7a 100644 --- a/debian/yunohost-api.service +++ b/conf/yunohost/yunohost-api.service @@ -4,9 +4,7 @@ After=network.target [Service] Type=simple -Environment=DAEMON_OPTS= -EnvironmentFile=-/etc/default/yunohost-api -ExecStart=/usr/bin/yunohost-api $DAEMON_OPTS +ExecStart=/usr/bin/yunohost-api Restart=always RestartSec=5 TimeoutStopSec=30 diff --git a/debian/yunohost-firewall.service b/conf/yunohost/yunohost-firewall.service similarity index 100% rename from debian/yunohost-firewall.service rename to conf/yunohost/yunohost-firewall.service diff --git a/debian/rules b/debian/rules index 5527d8703..5cf1d9bee 100755 --- a/debian/rules +++ b/debian/rules @@ -8,7 +8,3 @@ override_dh_auto_build: # Generate bash completion file python3 doc/generate_bash_completion.py python3 doc/generate_manpages.py --gzip --output doc/yunohost.8.gz - -override_dh_installinit: - dh_installinit -pyunohost --name=yunohost-api --noscripts - dh_installinit -pyunohost --name=yunohost-firewall --noscripts diff --git a/debian/yunohost-api.default b/debian/yunohost-api.default deleted file mode 100644 index b6a9e5a99..000000000 --- a/debian/yunohost-api.default +++ /dev/null @@ -1,4 +0,0 @@ -# Override yunohost-api options. -# Example to log debug: DAEMON_OPTS="--debug" -# -#DAEMON_OPTS="" diff --git a/hooks/conf_regen/01-yunohost b/hooks/conf_regen/01-yunohost index d30d77ace..22929db33 100755 --- a/hooks/conf_regen/01-yunohost +++ b/hooks/conf_regen/01-yunohost @@ -56,7 +56,16 @@ do_init_regen() { chown root:root /var/cache/yunohost chmod 700 /var/cache/yunohost + cp yunohost-api.service /etc/systemd/system/yunohost-api.service + cp yunohost-firewall.service /etc/systemd/system/yunohost-firewall.service cp yunoprompt.service /etc/systemd/system/yunoprompt.service + + systemctl daemon-reload + + systemctl enable yunohost-api.service + systemctl start yunohost-api.service + # Yunohost-firewall is enabled only during postinstall, not init, not 100% sure why + cp dpkg-origins /etc/dpkg/origins/yunohost # Change dpkg vendor @@ -142,6 +151,8 @@ HandleLidSwitchDocked=ignore HandleLidSwitchExternalPower=ignore EOF + cp yunohost-api.service ${pending_dir}/etc/systemd/system/yunohost-api.service + cp yunohost-firewall.service ${pending_dir}/etc/systemd/system/yunohost-firewall.service cp yunoprompt.service ${pending_dir}/etc/systemd/system/yunoprompt.service if [[ "$(yunohost settings get 'security.experimental.enabled')" == "True" ]]; then @@ -219,6 +230,9 @@ do_post_regen() { } [[ ! "$regen_conf_files" =~ "nftables.service.d/ynh-override.conf" ]] || systemctl daemon-reload [[ ! "$regen_conf_files" =~ "login.conf.d/ynh-override.conf" ]] || systemctl daemon-reload + [[ ! "$regen_conf_files" =~ "yunohost-firewall.service" ]] || systemctl daemon-reload + [[ ! "$regen_conf_files" =~ "yunohost-api.service" ]] || systemctl daemon-reload + if [[ "$regen_conf_files" =~ "yunoprompt.service" ]]; then systemctl daemon-reload action=$([[ -e /etc/systemd/system/yunoprompt.service ]] && echo 'enable' || echo 'disable')